diff --git a/config.json b/config.json new file mode 100644 index 0000000..d681e86 --- /dev/null +++ b/config.json @@ -0,0 +1,4 @@ +{ + "inputFilePath": "./contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol", + "outputDir": "./flat" +} diff --git a/contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol b/contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol new file mode 100644 index 0000000..31d5644 --- /dev/null +++ b/contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol @@ -0,0 +1,83 @@ +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.6 <0.9.0; + +import {CryptOrchidGoerli} from "../CryptOrchidGoerli/CryptOrchidGoerli.sol"; +import {AccessControlMixin} from "../Libraries/matic/common/AccessControlMixin.sol"; +import {IChildToken} from "../Libraries/matic/child/ChildToken/IChildToken.sol"; +import {NativeMetaTransaction} from "../Libraries/matic/common/NativeMetaTransaction.sol"; +import {ContextMixin} from "../Libraries/matic/common/ContextMixin.sol"; +import {FxBaseChildTunnel} from "../Libraries/tunnel/FxBaseChildTunnel.sol"; + +contract CryptOrchidERC721Child is + CryptOrchidGoerli, + IChildToken, + AccessControlMixin, + NativeMetaTransaction, + ContextMixin, + FxBaseChildTunnel +{ + bytes32 public constant DEPOSITOR_ROLE = keccak256("DEPOSITOR_ROLE"); + + // limit batching of tokens due to gas limit restrictions + uint256 public constant BATCH_LIMIT = 20; + + event WithdrawnBatch(address indexed user, uint256[] tokenIds); + event TransferWithMetadata(address indexed from, address indexed to, uint256 indexed tokenId, bytes metaData); + + constructor(address childChainManager, address _fxChild) public CryptOrchidGoerli() FxBaseChildTunnel(_fxChild) { + _setupContractId("CryptOrchidERC721Child"); + _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); + _setupRole(DEPOSITOR_ROLE, childChainManager); + _initializeEIP712("CryptOrchids"); + } + + // This is to support Native meta transactions + // never use msg.sender directly, use _msgSender() instead + function _msgSender() internal view override returns (address payable sender) { + return ContextMixin.msgSender(); + } + + /** + * @notice called when token is deposited on root chain + * @dev Should be callable only by ChildChainManager + * Should handle deposit by minting the required tokenId for user + * Make sure minting is done only by this function + * @param user user address for whom deposit is being done + * @param depositData abi encoded tokenId + */ + function deposit(address user, bytes calldata depositData) external override only(DEPOSITOR_ROLE) { + // deposit single + if (depositData.length == 32) { + uint256 tokenId = abi.decode(depositData, (uint256)); + _mint(user, tokenId); + + // deposit batch + } else { + uint256[] memory tokenIds = abi.decode(depositData, (uint256[])); + uint256 length = tokenIds.length; + for (uint256 i; i < length; i++) { + _mint(user, tokenIds[i]); + } + } + } + + function _processMessageFromRoot( + uint256 stateId, + address sender, + bytes memory data + ) internal override validateSender(sender) { + (string memory species, uint256 plantedAt, uint256 waterLevel, uint256 tokenId) = abi.decode( + data, + (string, uint256, uint256, uint256) + ); + + require(cryptorchids[tokenId].plantedAt == 0, "Metdata already transferred"); + + cryptorchids[tokenId] = CryptOrchid({species: species, plantedAt: plantedAt, waterLevel: waterLevel}); + } + + function sendMessageToRoot(bytes memory message) public { + _sendMessageToRoot(message); + } +} diff --git a/contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol b/contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol new file mode 100644 index 0000000..61c2669 --- /dev/null +++ b/contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol @@ -0,0 +1,265 @@ +// SPDX-License-Identifier: MIT + +// NB: this is only meant to deploy to goerli, where chainlink VRF is unavailable. +// goerli connects to polygon mumbai, which is what we need to test PoS bridging. +// Deploy scripts prevent other contracts from goerli deploy, and this contract from +// anything other than goerlui +pragma solidity >=0.6.6 <0.9.0; + +import "@openzeppelin/contracts/access/Ownable.sol"; +import "@openzeppelin/contracts/math/SafeMath.sol"; +import "@openzeppelin/contracts/presets/ERC721PresetMinterPauserAutoId.sol"; +import "@openzeppelin/contracts/utils/Counters.sol"; +import "../Libraries/CurrentTime.sol"; + +contract CryptOrchidGoerli is ERC721PresetMinterPauserAutoId, Ownable, CurrentTime { + using SafeMath for uint256; + using Strings for string; + using Counters for Counters.Counter; + + struct CryptOrchid { + string species; + uint256 plantedAt; + uint256 waterLevel; + } + mapping(uint256 => CryptOrchid) public cryptorchids; + + enum Stage {Unsold, Seed, Flower, Dead} + + bool internal saleStarted = false; + bool internal growingStarted = false; + + uint256 public constant MAX_CRYPTORCHIDS = 10000; + uint256 public constant GROWTH_CYCLE = 604800; // 7 days + uint256 public constant WATERING_WINDOW = 10800; // 3 hours + uint256 internal constant MAX_TIMESTAMP = 2**256 - 1; + string internal constant GRANUM_IPFS = "QmWd1mn7DuGyx9ByfNeqCsgdSUsJZ1cragitgaygsqDvEm"; + + uint16[10] private limits = [0, 3074, 6074, 8074, 9074, 9574, 9824, 9924, 9974, 9999]; + string[10] private genum = [ + "shenzhenica orchidaceae", + "phalaenopsis micholitzii", + "guarianthe aurantiaca", + "vanda coerulea", + "cypripedium calceolus", + "paphiopedilum vietnamense", + "miltonia kayasimae", + "platanthera azorica", + "dendrophylax lindenii", + "paphiopedilum rothschildianum" + ]; + + string[10] private speciesIPFSConstant = [ + "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/shenzhenica-orchidaceae.json", + "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/phalaenopsis-micholitzii.json", + "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/guarianthe-aurantiaca.json", + "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/vanda-coerulea.json", + "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/cypripedium-calceolus.json", + "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/paphiopedilum-vietnamense.json", + "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/miltonia-kayasimae.json", + "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/platanthera-azorica.json", + "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/dendrophylax-lindenii.json", + "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/paphiopedilum-rothschildianum.json" + ]; + + string[10] private deadSpeciesIPFSConstant = [ + "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/shenzhenica-orchidaceae.json", + "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/phalaenopsis-micholitzii.json", + "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/guarianthe-aurantiaca.json", + "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/vanda-coerulea.json", + "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/cypripedium-calceolus.json", + "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/paphiopedilum-vietnamense.json", + "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/miltonia-kayasimae.json", + "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/platanthera-azorica.json", + "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/dendrophylax-lindenii.json", + "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/paphiopedilum-rothschildianum.json" + ]; + + Counters.Counter private _tokenIds; + + mapping(bytes32 => uint256) public requestToToken; + mapping(bytes32 => string) private speciesIPFS; + mapping(bytes32 => string) private deadSpeciesIPFS; + + constructor() public payable ERC721PresetMinterPauserAutoId("CryptOrchids", "ORCHD", "ipfs://") { + for (uint256 index = 0; index < genum.length; index++) { + speciesIPFS[keccak256(abi.encode(genum[index]))] = speciesIPFSConstant[index]; + deadSpeciesIPFS[keccak256(abi.encode(genum[index]))] = deadSpeciesIPFSConstant[index]; + } + } + + function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { + (string memory species, , , ) = getTokenMetadata(tokenId); + + if (growthStage(tokenId) == Stage.Seed) { + return string(abi.encodePacked(baseURI(), GRANUM_IPFS)); + } + + if (growthStage(tokenId) == Stage.Flower) { + return string(abi.encodePacked(baseURI(), speciesIPFS[keccak256(abi.encode(species))])); + } + + return string(abi.encodePacked(baseURI(), deadSpeciesIPFS[keccak256(abi.encode(species))])); + } + + function _beforeTokenTransfer( + address from, + address to, + uint256 tokenId + ) internal virtual override { + require(address(0) == to || alive(tokenId), "Dead CryptOrchids cannot be transferred"); + super._beforeTokenTransfer(from, to, tokenId); + } + + function currentPrice() public view returns (uint256 price) { + uint256 currentSupply = totalSupply(); + if (currentSupply >= 9900) { + return 1000000000000000000; // 9900+: 1.00 ETH + } else if (currentSupply >= 9500) { + return 640000000000000000; // 9500-9500: 0.64 ETH + } else if (currentSupply >= 7500) { + return 320000000000000000; // 7500-9500: 0.32 ETH + } else if (currentSupply >= 3500) { + return 160000000000000000; // 3500-7500: 0.16 ETH + } else if (currentSupply >= 1500) { + return 80000000000000000; // 1500-3500: 0.08 ETH + } else if (currentSupply >= 500) { + return 60000000000000000; // 500-1500: 0.06 ETH + } else { + return 40000000000000000; // 0 - 500 0.04 ETH + } + } + + function startSale() public onlyOwner { + saleStarted = true; + } + + function startGrowing() public onlyOwner { + growingStarted = true; + } + + /** + * @dev Withdraw ether from this contract (Callable by owner only) + */ + function withdraw() public onlyOwner { + uint256 balance = address(this).balance; + msg.sender.transfer(balance); + } + + receive() external payable {} + + function webMint(uint256 units) public payable { + require(saleStarted, "The Nursery is closed"); + require(units <= MAX_CRYPTORCHIDS - totalSupply(), "Not enough bulbs left"); + require(totalSupply() < MAX_CRYPTORCHIDS, "Sale has already ended"); + require(units > 0 && units <= 20, "You can plant minimum 1, maximum 20 CryptOrchids"); + require(SafeMath.add(totalSupply(), units) <= MAX_CRYPTORCHIDS, "Exceeds MAX_CRYPTORCHIDS"); + require(msg.value >= SafeMath.mul(currentPrice(), units), "Ether value sent is below the price"); + + for (uint256 i = 0; i < units; i++) { + _tokenIds.increment(); + uint256 newItemId = _tokenIds.current(); + cryptorchids[newItemId] = CryptOrchid({species: "granum", plantedAt: MAX_TIMESTAMP, waterLevel: 0}); + _safeMint(msg.sender, newItemId); + } + } + + function germinate(uint256 tokenId, uint256 userProvidedSeed) public { + require(growingStarted, "Germination starts 2021-04-12T16:00:00Z"); + require(_isApprovedOrOwner(_msgSender(), tokenId), "Only the Owner can germinate a CryptOrchid."); + _requestRandom(tokenId, userProvidedSeed); + } + + function _requestRandom(uint256 tokenId, uint256 userProvidedSeed) internal returns (bytes32 requestId) { + uint256 pseudoRand = uint256(keccak256(abi.encodePacked(block.timestamp, block.difficulty, userProvidedSeed))); + fulfillRandomness(tokenId, pseudoRand); + } + + function fulfillRandomness(uint256 tokenId, uint256 randomness) internal { + CryptOrchid storage orchid = cryptorchids[tokenId]; + string memory species = pickSpecies(SafeMath.mod(randomness, 10000)); + orchid.species = species; + orchid.plantedAt = currentTime(); + address tokenOwner = ownerOf(tokenId); + } + + function alive(uint256 tokenId) public view returns (bool) { + return growthStage(tokenId) != Stage.Dead; + } + + function flowering(uint256 tokenId) public view returns (bool) { + return growthStage(tokenId) == Stage.Flower; + } + + function growthStage(uint256 tokenId) public view returns (Stage) { + CryptOrchid memory orchid = cryptorchids[tokenId]; + if (orchid.plantedAt == 0) return Stage.Unsold; + if (orchid.plantedAt == MAX_TIMESTAMP) return Stage.Seed; + uint256 currentWaterLevel = orchid.waterLevel; + uint256 elapsed = currentTime() - orchid.plantedAt; + uint256 fullCycles = SafeMath.div(uint256(elapsed), GROWTH_CYCLE); + uint256 modulo = SafeMath.mod(elapsed, GROWTH_CYCLE); + + if (currentWaterLevel == fullCycles) { + return Stage.Flower; + } + + if (SafeMath.add(currentWaterLevel, 1) == fullCycles && modulo < WATERING_WINDOW) { + return Stage.Flower; + } + + return Stage.Dead; + } + + function water(uint256 tokenId) public { + require(_isApprovedOrOwner(_msgSender(), tokenId), "Only the Owner can water a CryptOrchid."); + + if (!alive(tokenId)) { + return; + } + + CryptOrchid storage orchid = cryptorchids[tokenId]; + + uint256 wateringLevel = orchid.waterLevel; + uint256 elapsed = currentTime() - orchid.plantedAt; + uint256 fullCycles = SafeMath.div(uint256(elapsed), GROWTH_CYCLE); + + if (wateringLevel > fullCycles) { + return; + } + + uint256 newWaterLevel = SafeMath.add(wateringLevel, 1); + orchid.waterLevel = newWaterLevel; + } + + function getTokenMetadata(uint256 tokenId) + public + view + returns ( + string memory, + uint256, + uint256, + Stage + ) + { + return ( + cryptorchids[tokenId].species, + cryptorchids[tokenId].plantedAt, + cryptorchids[tokenId].waterLevel, + growthStage(tokenId) + ); + } + + /** + * @notice Pick species for random number index + * @param randomIndex uint256 + * @return species string + */ + function pickSpecies(uint256 randomIndex) private view returns (string memory) { + for (uint256 i = 0; i < 10; i++) { + if (randomIndex <= limits[i]) { + return genum[i]; + } + } + } +} diff --git a/contracts/CryptOrchidRootTunnel/CryptOrchidRootTunnel.sol b/contracts/CryptOrchidRootTunnel/CryptOrchidRootTunnel.sol new file mode 100644 index 0000000..760859d --- /dev/null +++ b/contracts/CryptOrchidRootTunnel/CryptOrchidRootTunnel.sol @@ -0,0 +1,59 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.6.6 <0.9.0; + +import {FxBaseRootTunnel} from "../Libraries/tunnel/FxBaseRootTunnel.sol"; + +interface CryptOrchidParent { + enum Stage {Unsold, Seed, Flower, Dead} + + function getTokenMetadata(uint256 tokenId) + external + view + returns ( + string memory, + uint256, + uint256, + Stage + ); + + /// @notice Find the owner of an NFT + /// @dev NFTs assigned to zero address are considered invalid, and queries + /// about them do throw. + /// @param _tokenId The identifier for an NFT + /// @return The address of the owner of the NFT + function ownerOf(uint256 _tokenId) external view returns (address); +} + +/** + * @title CryptOrchidRootTunnel + */ +contract CryptOrchidRootTunnel is FxBaseRootTunnel { + bytes public latestData; + address public CryptOrchidERC721; + + constructor( + address _checkpointManager, + address _fxRoot, + address _CryptOrchidERC721 + ) public FxBaseRootTunnel(_checkpointManager, _fxRoot) { + CryptOrchidERC721 = _CryptOrchidERC721; + } + + // Effectively a no-op, FXBaseRootTunnel requires that we implement this + function _processMessageFromChild(bytes memory data) internal override { + latestData = data; + } + + function sendMessageToChild(uint256 tokenId) public { + try CryptOrchidParent(CryptOrchidERC721).ownerOf(tokenId) returns (address owner) { + if (owner == msg.sender) { + (string memory species, uint256 plantedAt, uint256 waterLevel, ) = CryptOrchidParent(CryptOrchidERC721) + .getTokenMetadata(tokenId); + + bytes memory message = abi.encode(species, plantedAt, waterLevel, tokenId); + + _sendMessageToChild(message); + } + } catch {} // solhint-disable-line no-empty-blocks + } +} diff --git a/contracts/Libraries/matic/Migrations.sol b/contracts/Libraries/matic/Migrations.sol new file mode 100644 index 0000000..73a2d26 --- /dev/null +++ b/contracts/Libraries/matic/Migrations.sol @@ -0,0 +1,20 @@ +pragma solidity 0.6.6; + + +contract Migrations { + address public owner; + uint256 public last_completed_migration; + + constructor() public { + owner = msg.sender; + } + + modifier restricted() { + require(msg.sender == owner, "Sender should be owner"); + _; + } + + function setCompleted(uint256 completed) public restricted { + last_completed_migration = completed; + } +} diff --git a/contracts/Libraries/matic/child/ChildChainManager/ChildChainManager.sol b/contracts/Libraries/matic/child/ChildChainManager/ChildChainManager.sol new file mode 100644 index 0000000..317138e --- /dev/null +++ b/contracts/Libraries/matic/child/ChildChainManager/ChildChainManager.sol @@ -0,0 +1,124 @@ +pragma solidity 0.6.6; + +import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import {IChildChainManager} from "./IChildChainManager.sol"; +import {IChildToken} from "../ChildToken/IChildToken.sol"; +import {Initializable} from "../../common/Initializable.sol"; +import {AccessControlMixin} from "../../common/AccessControlMixin.sol"; +import {IStateReceiver} from "../IStateReceiver.sol"; + + +contract ChildChainManager is + IChildChainManager, + Initializable, + AccessControlMixin, + IStateReceiver +{ + bytes32 public constant DEPOSIT = keccak256("DEPOSIT"); + bytes32 public constant MAP_TOKEN = keccak256("MAP_TOKEN"); + bytes32 public constant MAPPER_ROLE = keccak256("MAPPER_ROLE"); + bytes32 public constant STATE_SYNCER_ROLE = keccak256("STATE_SYNCER_ROLE"); + + mapping(address => address) public rootToChildToken; + mapping(address => address) public childToRootToken; + + function initialize(address _owner) external initializer { + _setupContractId("ChildChainManager"); + _setupRole(DEFAULT_ADMIN_ROLE, _owner); + _setupRole(MAPPER_ROLE, _owner); + _setupRole(STATE_SYNCER_ROLE, _owner); + } + + /** + * @notice Map a token to enable its movement via the PoS Portal, callable only by mappers + * Normally mapping should happen automatically using state sync + * This function should be used only while initial deployment when state sync is not registrered or if it fails + * @param rootToken address of token on root chain + * @param childToken address of token on child chain + */ + function mapToken(address rootToken, address childToken) + external + override + only(MAPPER_ROLE) + { + _mapToken(rootToken, childToken); + } + + /** + * @notice Receive state sync data from root chain, only callable by state syncer + * @dev state syncing mechanism is used for both depositing tokens and mapping them + * @param data bytes data from RootChainManager contract + * `data` is made up of bytes32 `syncType` and bytes `syncData` + * `syncType` determines if it is deposit or token mapping + * in case of token mapping, `syncData` is encoded address `rootToken`, address `childToken` and bytes32 `tokenType` + * in case of deposit, `syncData` is encoded address `user`, address `rootToken` and bytes `depositData` + * `depositData` is token specific data (amount in case of ERC20). It is passed as is to child token + */ + function onStateReceive(uint256, bytes calldata data) + external + override + only(STATE_SYNCER_ROLE) + { + (bytes32 syncType, bytes memory syncData) = abi.decode( + data, + (bytes32, bytes) + ); + + if (syncType == DEPOSIT) { + _syncDeposit(syncData); + } else if (syncType == MAP_TOKEN) { + (address rootToken, address childToken, ) = abi.decode( + syncData, + (address, address, bytes32) + ); + _mapToken(rootToken, childToken); + } else { + revert("ChildChainManager: INVALID_SYNC_TYPE"); + } + } + + /** + * @notice Clean polluted token mapping + * @param rootToken address of token on root chain. Since rename token was introduced later stage, + * clean method is used to clean pollulated mapping + */ + function cleanMapToken( + address rootToken, + address childToken + ) external override only(MAPPER_ROLE) { + rootToChildToken[rootToken] = address(0); + childToRootToken[childToken] = address(0); + + emit TokenMapped(rootToken, childToken); + } + + function _mapToken(address rootToken, address childToken) private { + address oldChildToken = rootToChildToken[rootToken]; + address oldRootToken = childToRootToken[childToken]; + + if (rootToChildToken[oldRootToken] != address(0)) { + rootToChildToken[oldRootToken] = address(0); + } + + if (childToRootToken[oldChildToken] != address(0)) { + childToRootToken[oldChildToken] = address(0); + } + + rootToChildToken[rootToken] = childToken; + childToRootToken[childToken] = rootToken; + + emit TokenMapped(rootToken, childToken); + } + + function _syncDeposit(bytes memory syncData) private { + (address user, address rootToken, bytes memory depositData) = abi + .decode(syncData, (address, address, bytes)); + address childTokenAddress = rootToChildToken[rootToken]; + require( + childTokenAddress != address(0x0), + "ChildChainManager: TOKEN_NOT_MAPPED" + ); + IChildToken childTokenContract = IChildToken(childTokenAddress); + childTokenContract.deposit(user, depositData); + } +} diff --git a/contracts/Libraries/matic/child/ChildChainManager/ChildChainManagerProxy.sol b/contracts/Libraries/matic/child/ChildChainManager/ChildChainManagerProxy.sol new file mode 100644 index 0000000..e0471a8 --- /dev/null +++ b/contracts/Libraries/matic/child/ChildChainManager/ChildChainManagerProxy.sol @@ -0,0 +1,11 @@ +pragma solidity 0.6.6; + +import {UpgradableProxy} from "../../common/Proxy/UpgradableProxy.sol"; + + +contract ChildChainManagerProxy is UpgradableProxy { + constructor(address _proxyTo) + public + UpgradableProxy(_proxyTo) + {} +} diff --git a/contracts/Libraries/matic/child/ChildChainManager/IChildChainManager.sol b/contracts/Libraries/matic/child/ChildChainManager/IChildChainManager.sol new file mode 100644 index 0000000..e73923c --- /dev/null +++ b/contracts/Libraries/matic/child/ChildChainManager/IChildChainManager.sol @@ -0,0 +1,8 @@ +pragma solidity 0.6.6; + +interface IChildChainManager { + event TokenMapped(address indexed rootToken, address indexed childToken); + + function mapToken(address rootToken, address childToken) external; + function cleanMapToken(address rootToken, address childToken) external; +} diff --git a/contracts/Libraries/matic/child/ChildToken/ChildERC1155.sol b/contracts/Libraries/matic/child/ChildToken/ChildERC1155.sol new file mode 100644 index 0000000..ef77ca3 --- /dev/null +++ b/contracts/Libraries/matic/child/ChildToken/ChildERC1155.sol @@ -0,0 +1,82 @@ +pragma solidity 0.6.6; + +import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; +import {AccessControlMixin} from "../../common/AccessControlMixin.sol"; +import {IChildToken} from "./IChildToken.sol"; +import {NativeMetaTransaction} from "../../common/NativeMetaTransaction.sol"; +import {ContextMixin} from "../../common/ContextMixin.sol"; + +contract ChildERC1155 is + ERC1155, + IChildToken, + AccessControlMixin, + NativeMetaTransaction, + ContextMixin +{ + bytes32 public constant DEPOSITOR_ROLE = keccak256("DEPOSITOR_ROLE"); + + constructor(string memory uri_, address childChainManager) + public + ERC1155(uri_) + { + _setupContractId("ChildERC1155"); + _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); + _setupRole(DEPOSITOR_ROLE, childChainManager); + _initializeEIP712(uri_); + } + + // This is to support Native meta transactions + // never use msg.sender directly, use _msgSender() instead + function _msgSender() + internal + override + view + returns (address payable sender) + { + return ContextMixin.msgSender(); + } + + /** + * @notice called when tokens are deposited on root chain + * @dev Should be callable only by ChildChainManager + * Should handle deposit by minting the required tokens for user + * Make sure minting is done only by this function + * @param user user address for whom deposit is being done + * @param depositData abi encoded ids array and amounts array + */ + function deposit(address user, bytes calldata depositData) + external + override + only(DEPOSITOR_ROLE) + { + ( + uint256[] memory ids, + uint256[] memory amounts, + bytes memory data + ) = abi.decode(depositData, (uint256[], uint256[], bytes)); + require(user != address(0x0), "ChildERC1155: INVALID_DEPOSIT_USER"); + _mintBatch(user, ids, amounts, data); + } + + /** + * @notice called when user wants to withdraw single token back to root chain + * @dev Should burn user's tokens. This transaction will be verified when exiting on root chain + * @param id id to withdraw + * @param amount amount to withdraw + */ + function withdrawSingle(uint256 id, uint256 amount) external { + _burn(_msgSender(), id, amount); + } + + /** + * @notice called when user wants to batch withdraw tokens back to root chain + * @dev Should burn user's tokens. This transaction will be verified when exiting on root chain + * @param ids ids to withdraw + * @param amounts amounts to withdraw + */ + function withdrawBatch(uint256[] calldata ids, uint256[] calldata amounts) + external + { + _burnBatch(_msgSender(), ids, amounts); + } +} diff --git a/contracts/Libraries/matic/child/ChildToken/ChildERC20.sol b/contracts/Libraries/matic/child/ChildToken/ChildERC20.sol new file mode 100644 index 0000000..234d9c0 --- /dev/null +++ b/contracts/Libraries/matic/child/ChildToken/ChildERC20.sol @@ -0,0 +1,68 @@ +pragma solidity 0.6.6; + +import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; +import {AccessControlMixin} from "../../common/AccessControlMixin.sol"; +import {IChildToken} from "./IChildToken.sol"; +import {NativeMetaTransaction} from "../../common/NativeMetaTransaction.sol"; +import {ContextMixin} from "../../common/ContextMixin.sol"; + + +contract ChildERC20 is + ERC20, + IChildToken, + AccessControlMixin, + NativeMetaTransaction, + ContextMixin +{ + bytes32 public constant DEPOSITOR_ROLE = keccak256("DEPOSITOR_ROLE"); + + constructor( + string memory name_, + string memory symbol_, + uint8 decimals_, + address childChainManager + ) public ERC20(name_, symbol_) { + _setupContractId("ChildERC20"); + _setupDecimals(decimals_); + _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); + _setupRole(DEPOSITOR_ROLE, childChainManager); + _initializeEIP712(name_); + } + + // This is to support Native meta transactions + // never use msg.sender directly, use _msgSender() instead + function _msgSender() + internal + override + view + returns (address payable sender) + { + return ContextMixin.msgSender(); + } + + /** + * @notice called when token is deposited on root chain + * @dev Should be callable only by ChildChainManager + * Should handle deposit by minting the required amount for user + * Make sure minting is done only by this function + * @param user user address for whom deposit is being done + * @param depositData abi encoded amount + */ + function deposit(address user, bytes calldata depositData) + external + override + only(DEPOSITOR_ROLE) + { + uint256 amount = abi.decode(depositData, (uint256)); + _mint(user, amount); + } + + /** + * @notice called when user wants to withdraw tokens back to root chain + * @dev Should burn user's tokens. This transaction will be verified when exiting on root chain + * @param amount amount of tokens to withdraw + */ + function withdraw(uint256 amount) external { + _burn(_msgSender(), amount); + } +} diff --git a/contracts/Libraries/matic/child/ChildToken/ChildERC721.sol b/contracts/Libraries/matic/child/ChildToken/ChildERC721.sol new file mode 100644 index 0000000..1312d3f --- /dev/null +++ b/contracts/Libraries/matic/child/ChildToken/ChildERC721.sol @@ -0,0 +1,136 @@ +pragma solidity 0.6.6; + +import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol"; +import {AccessControlMixin} from "../../common/AccessControlMixin.sol"; +import {IChildToken} from "./IChildToken.sol"; +import {NativeMetaTransaction} from "../../common/NativeMetaTransaction.sol"; +import {ContextMixin} from "../../common/ContextMixin.sol"; + +contract ChildERC721 is + ERC721, + IChildToken, + AccessControlMixin, + NativeMetaTransaction, + ContextMixin +{ + bytes32 public constant DEPOSITOR_ROLE = keccak256("DEPOSITOR_ROLE"); + + // limit batching of tokens due to gas limit restrictions + uint256 public constant BATCH_LIMIT = 20; + + event WithdrawnBatch(address indexed user, uint256[] tokenIds); + event TransferWithMetadata(address indexed from, address indexed to, uint256 indexed tokenId, bytes metaData); + + constructor( + string memory name_, + string memory symbol_, + address childChainManager + ) public ERC721(name_, symbol_) { + _setupContractId("ChildERC721"); + _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); + _setupRole(DEPOSITOR_ROLE, childChainManager); + _initializeEIP712(name_); + } + + // This is to support Native meta transactions + // never use msg.sender directly, use _msgSender() instead + function _msgSender() + internal + override + view + returns (address payable sender) + { + return ContextMixin.msgSender(); + } + + /** + * @notice called when token is deposited on root chain + * @dev Should be callable only by ChildChainManager + * Should handle deposit by minting the required tokenId for user + * Make sure minting is done only by this function + * @param user user address for whom deposit is being done + * @param depositData abi encoded tokenId + */ + function deposit(address user, bytes calldata depositData) + external + override + only(DEPOSITOR_ROLE) + { + // deposit single + if (depositData.length == 32) { + uint256 tokenId = abi.decode(depositData, (uint256)); + _mint(user, tokenId); + + // deposit batch + } else { + uint256[] memory tokenIds = abi.decode(depositData, (uint256[])); + uint256 length = tokenIds.length; + for (uint256 i; i < length; i++) { + _mint(user, tokenIds[i]); + } + } + } + + /** + * @notice called when user wants to withdraw token back to root chain + * @dev Should burn user's token. This transaction will be verified when exiting on root chain + * @param tokenId tokenId to withdraw + */ + function withdraw(uint256 tokenId) external { + require(_msgSender() == ownerOf(tokenId), "ChildERC721: INVALID_TOKEN_OWNER"); + _burn(tokenId); + } + + /** + * @notice called when user wants to withdraw multiple tokens back to root chain + * @dev Should burn user's tokens. This transaction will be verified when exiting on root chain + * @param tokenIds tokenId list to withdraw + */ + function withdrawBatch(uint256[] calldata tokenIds) external { + uint256 length = tokenIds.length; + require(length <= BATCH_LIMIT, "ChildERC721: EXCEEDS_BATCH_LIMIT"); + for (uint256 i; i < length; i++) { + uint256 tokenId = tokenIds[i]; + require(_msgSender() == ownerOf(tokenId), string(abi.encodePacked("ChildERC721: INVALID_TOKEN_OWNER ", tokenId))); + _burn(tokenId); + } + emit WithdrawnBatch(_msgSender(), tokenIds); + } + + /** + * @notice called when user wants to withdraw token back to root chain with arbitrary metadata + * @dev Should handle withraw by burning user's token. + * + * This transaction will be verified when exiting on root chain + * + * @param tokenId tokenId to withdraw + */ + function withdrawWithMetadata(uint256 tokenId) external { + + require(_msgSender() == ownerOf(tokenId), "ChildERC721: INVALID_TOKEN_OWNER"); + + // Encoding metadata associated with tokenId & emitting event + emit TransferWithMetadata(_msgSender(), address(0), tokenId, this.encodeTokenMetadata(tokenId)); + + _burn(tokenId); + + } + + /** + * @notice This method is supposed to be called by client when withdrawing token with metadata + * and pass return value of this function as second paramter of `withdrawWithMetadata` method + * + * It can be overridden by clients to encode data in a different form, which needs to + * be decoded back by them correctly during exiting + * + * @param tokenId Token for which URI to be fetched + */ + function encodeTokenMetadata(uint256 tokenId) external view virtual returns (bytes memory) { + + // You're always free to change this default implementation + // and pack more data in byte array which can be decoded back + // in L1 + return abi.encode(tokenURI(tokenId)); + + } +} diff --git a/contracts/Libraries/matic/child/ChildToken/ChildMintableERC1155.sol b/contracts/Libraries/matic/child/ChildToken/ChildMintableERC1155.sol new file mode 100644 index 0000000..ac0d052 --- /dev/null +++ b/contracts/Libraries/matic/child/ChildToken/ChildMintableERC1155.sol @@ -0,0 +1,115 @@ +pragma solidity 0.6.6; + +import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; +import {AccessControlMixin} from "../../common/AccessControlMixin.sol"; +import {IChildToken} from "./IChildToken.sol"; +import {NativeMetaTransaction} from "../../common/NativeMetaTransaction.sol"; +import {ContextMixin} from "../../common/ContextMixin.sol"; + +contract ChildMintableERC1155 is + ERC1155, + IChildToken, + AccessControlMixin, + NativeMetaTransaction, + ContextMixin +{ + bytes32 public constant DEPOSITOR_ROLE = keccak256("DEPOSITOR_ROLE"); + + constructor(string memory uri_, address childChainManager) + public + ERC1155(uri_) + { + _setupContractId("ChildMintableERC1155"); + _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); + _setupRole(DEPOSITOR_ROLE, childChainManager); + _initializeEIP712(uri_); + } + + // This is to support Native meta transactions + // never use msg.sender directly, use _msgSender() instead + function _msgSender() + internal + override + view + returns (address payable sender) + { + return ContextMixin.msgSender(); + } + + /** + * @notice called when tokens are deposited on root chain + * @dev Should be callable only by ChildChainManager + * Should handle deposit by minting the required tokens for user + * Make sure minting is done only by this function + * @param user user address for whom deposit is being done + * @param depositData abi encoded ids array and amounts array + */ + function deposit(address user, bytes calldata depositData) + external + override + only(DEPOSITOR_ROLE) + { + ( + uint256[] memory ids, + uint256[] memory amounts, + bytes memory data + ) = abi.decode(depositData, (uint256[], uint256[], bytes)); + + require( + user != address(0), + "ChildMintableERC1155: INVALID_DEPOSIT_USER" + ); + + _mintBatch(user, ids, amounts, data); + } + + /** + * @notice called when user wants to withdraw single token back to root chain + * @dev Should burn user's tokens. This transaction will be verified when exiting on root chain + * @param id id to withdraw + * @param amount amount to withdraw + */ + function withdrawSingle(uint256 id, uint256 amount) external { + _burn(_msgSender(), id, amount); + } + + /** + * @notice called when user wants to batch withdraw tokens back to root chain + * @dev Should burn user's tokens. This transaction will be verified when exiting on root chain + * @param ids ids to withdraw + * @param amounts amounts to withdraw + */ + function withdrawBatch(uint256[] calldata ids, uint256[] calldata amounts) + external + { + _burnBatch(_msgSender(), ids, amounts); + } + + /** + * @notice See definition of `_mint` in ERC1155 contract + * @dev This implementation only allows admins to mint tokens + * but can be changed as per requirement + */ + function mint( + address account, + uint256 id, + uint256 amount, + bytes calldata data + ) external only(DEFAULT_ADMIN_ROLE) { + _mint(account, id, amount, data); + } + + /** + * @notice See definition of `_mintBatch` in ERC1155 contract + * @dev This implementation only allows admins to mint tokens + * but can be changed as per requirement + */ + function mintBatch( + address to, + uint256[] calldata ids, + uint256[] calldata amounts, + bytes calldata data + ) external only(DEFAULT_ADMIN_ROLE) { + _mintBatch(to, ids, amounts, data); + } +} diff --git a/contracts/Libraries/matic/child/ChildToken/ChildMintableERC20.sol b/contracts/Libraries/matic/child/ChildToken/ChildMintableERC20.sol new file mode 100644 index 0000000..b0f280e --- /dev/null +++ b/contracts/Libraries/matic/child/ChildToken/ChildMintableERC20.sol @@ -0,0 +1,79 @@ +pragma solidity 0.6.6; + +import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; +import {AccessControlMixin} from "../../common/AccessControlMixin.sol"; +import {IChildToken} from "./IChildToken.sol"; +import {NativeMetaTransaction} from "../../common/NativeMetaTransaction.sol"; +import {ContextMixin} from "../../common/ContextMixin.sol"; + + +contract ChildMintableERC20 is + ERC20, + IChildToken, + AccessControlMixin, + NativeMetaTransaction, + ContextMixin +{ + bytes32 public constant DEPOSITOR_ROLE = keccak256("DEPOSITOR_ROLE"); + + constructor( + string memory name_, + string memory symbol_, + uint8 decimals_, + address childChainManager + ) public ERC20(name_, symbol_) { + _setupContractId("ChildMintableERC20"); + _setupDecimals(decimals_); + _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); + _setupRole(DEPOSITOR_ROLE, childChainManager); + _initializeEIP712(name_); + } + + // This is to support Native meta transactions + // never use msg.sender directly, use _msgSender() instead + function _msgSender() + internal + override + view + returns (address payable sender) + { + return ContextMixin.msgSender(); + } + + /** + * @notice called when token is deposited on root chain + * @dev Should be callable only by ChildChainManager + * Should handle deposit by minting the required amount for user + * Make sure minting is done only by this function + * @param user user address for whom deposit is being done + * @param depositData abi encoded amount + */ + function deposit(address user, bytes calldata depositData) + external + override + only(DEPOSITOR_ROLE) + { + uint256 amount = abi.decode(depositData, (uint256)); + _mint(user, amount); + } + + /** + * @notice called when user wants to withdraw tokens back to root chain + * @dev Should burn user's tokens. This transaction will be verified when exiting on root chain + * @param amount amount of tokens to withdraw + */ + function withdraw(uint256 amount) external { + _burn(_msgSender(), amount); + } + + /** + * @notice Example function to handle minting tokens on matic chain + * @dev Minting can be done as per requirement, + * This implementation allows only admin to mint tokens but it can be changed as per requirement + * @param user user for whom tokens are being minted + * @param amount amount of token to mint + */ + function mint(address user, uint256 amount) public only(DEFAULT_ADMIN_ROLE) { + _mint(user, amount); + } +} diff --git a/contracts/Libraries/matic/child/ChildToken/ChildMintableERC721.sol b/contracts/Libraries/matic/child/ChildToken/ChildMintableERC721.sol new file mode 100644 index 0000000..2a10191 --- /dev/null +++ b/contracts/Libraries/matic/child/ChildToken/ChildMintableERC721.sol @@ -0,0 +1,173 @@ +pragma solidity 0.6.6; + +import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol"; +import {AccessControlMixin} from "../../common/AccessControlMixin.sol"; +import {IChildToken} from "./IChildToken.sol"; +import {NativeMetaTransaction} from "../../common/NativeMetaTransaction.sol"; +import {ContextMixin} from "../../common/ContextMixin.sol"; + + +contract ChildMintableERC721 is + ERC721, + IChildToken, + AccessControlMixin, + NativeMetaTransaction, + ContextMixin +{ + bytes32 public constant DEPOSITOR_ROLE = keccak256("DEPOSITOR_ROLE"); + mapping (uint256 => bool) public withdrawnTokens; + + // limit batching of tokens due to gas limit restrictions + uint256 public constant BATCH_LIMIT = 20; + + event WithdrawnBatch(address indexed user, uint256[] tokenIds); + event TransferWithMetadata(address indexed from, address indexed to, uint256 indexed tokenId, bytes metaData); + + constructor( + string memory name_, + string memory symbol_, + address childChainManager + ) public ERC721(name_, symbol_) { + _setupContractId("ChildMintableERC721"); + _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); + _setupRole(DEPOSITOR_ROLE, childChainManager); + _initializeEIP712(name_); + } + + // This is to support Native meta transactions + // never use msg.sender directly, use _msgSender() instead + function _msgSender() + internal + override + view + returns (address payable sender) + { + return ContextMixin.msgSender(); + } + + /** + * @notice called when token is deposited on root chain + * @dev Should be callable only by ChildChainManager + * Should handle deposit by minting the required tokenId(s) for user + * Should set `withdrawnTokens` mapping to `false` for the tokenId being deposited + * Minting can also be done by other functions + * @param user user address for whom deposit is being done + * @param depositData abi encoded tokenIds. Batch deposit also supported. + */ + function deposit(address user, bytes calldata depositData) + external + override + only(DEPOSITOR_ROLE) + { + + // deposit single + if (depositData.length == 32) { + uint256 tokenId = abi.decode(depositData, (uint256)); + withdrawnTokens[tokenId] = false; + _mint(user, tokenId); + + // deposit batch + } else { + uint256[] memory tokenIds = abi.decode(depositData, (uint256[])); + uint256 length = tokenIds.length; + for (uint256 i; i < length; i++) { + withdrawnTokens[tokenIds[i]] = false; + _mint(user, tokenIds[i]); + } + } + + } + + /** + * @notice called when user wants to withdraw token back to root chain + * @dev Should handle withraw by burning user's token. + * Should set `withdrawnTokens` mapping to `true` for the tokenId being withdrawn + * This transaction will be verified when exiting on root chain + * @param tokenId tokenId to withdraw + */ + function withdraw(uint256 tokenId) external { + require(_msgSender() == ownerOf(tokenId), "ChildMintableERC721: INVALID_TOKEN_OWNER"); + withdrawnTokens[tokenId] = true; + _burn(tokenId); + } + + /** + * @notice called when user wants to withdraw multiple tokens back to root chain + * @dev Should burn user's tokens. This transaction will be verified when exiting on root chain + * @param tokenIds tokenId list to withdraw + */ + function withdrawBatch(uint256[] calldata tokenIds) external { + + uint256 length = tokenIds.length; + require(length <= BATCH_LIMIT, "ChildMintableERC721: EXCEEDS_BATCH_LIMIT"); + + // Iteratively burn ERC721 tokens, for performing + // batch withdraw + for (uint256 i; i < length; i++) { + + uint256 tokenId = tokenIds[i]; + + require(_msgSender() == ownerOf(tokenId), string(abi.encodePacked("ChildMintableERC721: INVALID_TOKEN_OWNER ", tokenId))); + withdrawnTokens[tokenId] = true; + _burn(tokenId); + + } + + // At last emit this event, which will be used + // in MintableERC721 predicate contract on L1 + // while verifying burn proof + emit WithdrawnBatch(_msgSender(), tokenIds); + + } + + /** + * @notice called when user wants to withdraw token back to root chain with token URI + * @dev Should handle withraw by burning user's token. + * Should set `withdrawnTokens` mapping to `true` for the tokenId being withdrawn + * This transaction will be verified when exiting on root chain + * + * @param tokenId tokenId to withdraw + */ + function withdrawWithMetadata(uint256 tokenId) external { + + require(_msgSender() == ownerOf(tokenId), "ChildMintableERC721: INVALID_TOKEN_OWNER"); + withdrawnTokens[tokenId] = true; + + // Encoding metadata associated with tokenId & emitting event + emit TransferWithMetadata(ownerOf(tokenId), address(0), tokenId, this.encodeTokenMetadata(tokenId)); + + _burn(tokenId); + + } + + /** + * @notice This method is supposed to be called by client when withdrawing token with metadata + * and pass return value of this function as second paramter of `withdrawWithMetadata` method + * + * It can be overridden by clients to encode data in a different form, which needs to + * be decoded back by them correctly during exiting + * + * @param tokenId Token for which URI to be fetched + */ + function encodeTokenMetadata(uint256 tokenId) external view virtual returns (bytes memory) { + + // You're always free to change this default implementation + // and pack more data in byte array which can be decoded back + // in L1 + return abi.encode(tokenURI(tokenId)); + + } + + /** + * @notice Example function to handle minting tokens on matic chain + * @dev Minting can be done as per requirement, + * This implementation allows only admin to mint tokens but it can be changed as per requirement + * Should verify if token is withdrawn by checking `withdrawnTokens` mapping + * @param user user for whom tokens are being minted + * @param tokenId tokenId to mint + */ + function mint(address user, uint256 tokenId) public only(DEFAULT_ADMIN_ROLE) { + require(!withdrawnTokens[tokenId], "ChildMintableERC721: TOKEN_EXISTS_ON_ROOT_CHAIN"); + _mint(user, tokenId); + } +} diff --git a/contracts/Libraries/matic/child/ChildToken/DappTokens/UChildDAI.sol b/contracts/Libraries/matic/child/ChildToken/DappTokens/UChildDAI.sol new file mode 100644 index 0000000..0159344 --- /dev/null +++ b/contracts/Libraries/matic/child/ChildToken/DappTokens/UChildDAI.sol @@ -0,0 +1,54 @@ +pragma solidity 0.6.6; + +import {UChildERC20} from "../UpgradeableChildERC20/UChildERC20.sol"; + +contract UChildDAI is UChildERC20 { + // bytes32 public constant PERMIT_TYPEHASH = keccak256("Permit(address holder,address spender,uint256 nonce,uint256 expiry,bool allowed)"); + bytes32 public constant PERMIT_TYPEHASH = 0xea2aa0a1be11a07ed86d755c93467f4f82362b452371d1ba94d1715123511acb; + + // --- Alias --- + function push(address usr, uint wad) external { + transferFrom(msg.sender, usr, wad); + } + function pull(address usr, uint wad) external { + transferFrom(usr, msg.sender, wad); + } + function move(address src, address dst, uint wad) external { + transferFrom(src, dst, wad); + } + + // --- Approve by signature --- + function permit( + address holder, + address spender, + uint256 nonce, + uint256 expiry, + bool allowed, + uint8 v, + bytes32 r, + bytes32 s + ) external { + bytes32 digest = keccak256( + abi.encodePacked( + "\x19\x01", + getDomainSeperator(), + keccak256( + abi.encode( + PERMIT_TYPEHASH, + holder, + spender, + nonce, + expiry, + allowed + ) + ) + )); + + require(holder == ecrecover(digest, v, r, s), "UChildDAI: INVALID-PERMIT"); + require(expiry == 0 || now <= expiry, "UChildDAI: PERMIT-EXPIRED"); + require(nonce == nonces[holder]++, "UChildDAI: INVALID-NONCE"); + require(msg.sender != address(this), "UChildDAI: PERMIT_META_TX_DISABLED"); + uint wad = allowed ? uint(-1) : 0; + _approve(holder, spender, wad); + } +} diff --git a/contracts/Libraries/matic/child/ChildToken/IChildToken.sol b/contracts/Libraries/matic/child/ChildToken/IChildToken.sol new file mode 100644 index 0000000..d3a2f39 --- /dev/null +++ b/contracts/Libraries/matic/child/ChildToken/IChildToken.sol @@ -0,0 +1,5 @@ +pragma solidity 0.6.6; + +interface IChildToken { + function deposit(address user, bytes calldata depositData) external; +} diff --git a/contracts/Libraries/matic/child/ChildToken/MaticWETH.sol b/contracts/Libraries/matic/child/ChildToken/MaticWETH.sol new file mode 100644 index 0000000..0df4e84 --- /dev/null +++ b/contracts/Libraries/matic/child/ChildToken/MaticWETH.sol @@ -0,0 +1,7 @@ +pragma solidity 0.6.6; + +import {ChildERC20} from "./ChildERC20.sol"; + +contract MaticWETH is ChildERC20 { + constructor(address childChainManager) public ChildERC20("Wrapped Ether", "WETH", 18, childChainManager) {} +} diff --git a/contracts/Libraries/matic/child/ChildToken/UpgradeableChildERC20/ERC20.sol b/contracts/Libraries/matic/child/ChildToken/UpgradeableChildERC20/ERC20.sol new file mode 100644 index 0000000..ea9afaf --- /dev/null +++ b/contracts/Libraries/matic/child/ChildToken/UpgradeableChildERC20/ERC20.sol @@ -0,0 +1,328 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.6.0; + + +import "@openzeppelin/contracts/GSN/Context.sol"; +import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import "@openzeppelin/contracts/math/SafeMath.sol"; +import "@openzeppelin/contracts/utils/Address.sol"; + +/** + * Modified openzeppelin implemtation to add setters for name, symbol and decimals. + * This was needed because the variables cannot be set in constructor as the contract is upgradeable. + */ + +/** + * @dev openzeppelin Implementation of the {IERC20} interface. + * + * Modified to add setters for name, symbol and decimals. This was needed + * because + * + * This implementation is agnostic to the way tokens are created. This means + * that a supply mechanism has to be added in a derived contract using {_mint}. + * For a generic mechanism see {ERC20PresetMinterPauser}. + * + * TIP: For a detailed writeup see our guide + * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How + * to implement supply mechanisms]. + * + * We have followed general OpenZeppelin guidelines: functions revert instead + * of returning `false` on failure. This behavior is nonetheless conventional + * and does not conflict with the expectations of ERC20 applications. + * + * Additionally, an {Approval} event is emitted on calls to {transferFrom}. + * This allows applications to reconstruct the allowance for all accounts just + * by listening to said events. Other implementations of the EIP may not emit + * these events, as it isn't required by the specification. + * + * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} + * functions have been added to mitigate the well-known issues around setting + * allowances. See {IERC20-approve}. + */ +contract ERC20 is Context, IERC20 { + using SafeMath for uint256; + using Address for address; + + mapping (address => uint256) private _balances; + + mapping (address => mapping (address => uint256)) private _allowances; + + uint256 private _totalSupply; + + string private _name; + string private _symbol; + uint8 private _decimals; + + /** + * @dev Sets the values for {name} and {symbol}, initializes {decimals} with + * a default value of 18. + * + * To select a different value for {decimals}, use {_setupDecimals}. + * + * All three of these values are immutable: they can only be set once during + * construction. + */ + constructor (string memory name, string memory symbol) public { + _name = name; + _symbol = symbol; + _decimals = 18; + } + + /** + * @dev Returns the name of the token. + */ + function name() public view returns (string memory) { + return _name; + } + + function setName(string memory newName) internal { + _name = newName; + } + + /** + * @dev Returns the symbol of the token, usually a shorter version of the + * name. + */ + function symbol() public view returns (string memory) { + return _symbol; + } + + function setSymbol(string memory newSymbol) internal { + _symbol = newSymbol; + } + + /** + * @dev Returns the number of decimals used to get its user representation. + * For example, if `decimals` equals `2`, a balance of `505` tokens should + * be displayed to a user as `5,05` (`505 / 10 ** 2`). + * + * Tokens usually opt for a value of 18, imitating the relationship between + * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is + * called. + * + * NOTE: This information is only used for _display_ purposes: it in + * no way affects any of the arithmetic of the contract, including + * {IERC20-balanceOf} and {IERC20-transfer}. + */ + function decimals() public view returns (uint8) { + return _decimals; + } + + function setDecimals(uint8 newDecimals) internal { + _decimals = newDecimals; + } + + /** + * @dev See {IERC20-totalSupply}. + */ + function totalSupply() public view override returns (uint256) { + return _totalSupply; + } + + /** + * @dev See {IERC20-balanceOf}. + */ + function balanceOf(address account) public view override returns (uint256) { + return _balances[account]; + } + + /** + * @dev See {IERC20-transfer}. + * + * Requirements: + * + * - `recipient` cannot be the zero address. + * - the caller must have a balance of at least `amount`. + */ + function transfer(address recipient, uint256 amount) public virtual override returns (bool) { + _transfer(_msgSender(), recipient, amount); + return true; + } + + /** + * @dev See {IERC20-allowance}. + */ + function allowance(address owner, address spender) public view virtual override returns (uint256) { + return _allowances[owner][spender]; + } + + /** + * @dev See {IERC20-approve}. + * + * Requirements: + * + * - `spender` cannot be the zero address. + */ + function approve(address spender, uint256 amount) public virtual override returns (bool) { + _approve(_msgSender(), spender, amount); + return true; + } + + /** + * @dev See {IERC20-transferFrom}. + * + * Emits an {Approval} event indicating the updated allowance. This is not + * required by the EIP. See the note at the beginning of {ERC20}; + * + * Requirements: + * - `sender` and `recipient` cannot be the zero address. + * - `sender` must have a balance of at least `amount`. + * - the caller must have allowance for ``sender``'s tokens of at least + * `amount`. + */ + function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { + _transfer(sender, recipient, amount); + _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); + return true; + } + + /** + * @dev Atomically increases the allowance granted to `spender` by the caller. + * + * This is an alternative to {approve} that can be used as a mitigation for + * problems described in {IERC20-approve}. + * + * Emits an {Approval} event indicating the updated allowance. + * + * Requirements: + * + * - `spender` cannot be the zero address. + */ + function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { + _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); + return true; + } + + /** + * @dev Atomically decreases the allowance granted to `spender` by the caller. + * + * This is an alternative to {approve} that can be used as a mitigation for + * problems described in {IERC20-approve}. + * + * Emits an {Approval} event indicating the updated allowance. + * + * Requirements: + * + * - `spender` cannot be the zero address. + * - `spender` must have allowance for the caller of at least + * `subtractedValue`. + */ + function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { + _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); + return true; + } + + /** + * @dev Moves tokens `amount` from `sender` to `recipient`. + * + * This is internal function is equivalent to {transfer}, and can be used to + * e.g. implement automatic token fees, slashing mechanisms, etc. + * + * Emits a {Transfer} event. + * + * Requirements: + * + * - `sender` cannot be the zero address. + * - `recipient` cannot be the zero address. + * - `sender` must have a balance of at least `amount`. + */ + function _transfer(address sender, address recipient, uint256 amount) internal virtual { + require(sender != address(0), "ERC20: transfer from the zero address"); + require(recipient != address(0), "ERC20: transfer to the zero address"); + + _beforeTokenTransfer(sender, recipient, amount); + + _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); + _balances[recipient] = _balances[recipient].add(amount); + emit Transfer(sender, recipient, amount); + } + + /** @dev Creates `amount` tokens and assigns them to `account`, increasing + * the total supply. + * + * Emits a {Transfer} event with `from` set to the zero address. + * + * Requirements + * + * - `to` cannot be the zero address. + */ + function _mint(address account, uint256 amount) internal virtual { + require(account != address(0), "ERC20: mint to the zero address"); + + _beforeTokenTransfer(address(0), account, amount); + + _totalSupply = _totalSupply.add(amount); + _balances[account] = _balances[account].add(amount); + emit Transfer(address(0), account, amount); + } + + /** + * @dev Destroys `amount` tokens from `account`, reducing the + * total supply. + * + * Emits a {Transfer} event with `to` set to the zero address. + * + * Requirements + * + * - `account` cannot be the zero address. + * - `account` must have at least `amount` tokens. + */ + function _burn(address account, uint256 amount) internal virtual { + require(account != address(0), "ERC20: burn from the zero address"); + + _beforeTokenTransfer(account, address(0), amount); + + _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); + _totalSupply = _totalSupply.sub(amount); + emit Transfer(account, address(0), amount); + } + + /** + * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens. + * + * This is internal function is equivalent to `approve`, and can be used to + * e.g. set automatic allowances for certain subsystems, etc. + * + * Emits an {Approval} event. + * + * Requirements: + * + * - `owner` cannot be the zero address. + * - `spender` cannot be the zero address. + */ + function _approve(address owner, address spender, uint256 amount) internal virtual { + require(owner != address(0), "ERC20: approve from the zero address"); + require(spender != address(0), "ERC20: approve to the zero address"); + + _allowances[owner][spender] = amount; + emit Approval(owner, spender, amount); + } + + /** + * @dev Sets {decimals} to a value other than the default one of 18. + * + * WARNING: This function should only be called from the constructor. Most + * applications that interact with token contracts will not expect + * {decimals} to ever change, and may work incorrectly if it does. + */ + function _setupDecimals(uint8 decimals_) internal { + _decimals = decimals_; + } + + /** + * @dev Hook that is called before any transfer of tokens. This includes + * minting and burning. + * + * Calling conditions: + * + * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens + * will be to transferred to `to`. + * - when `from` is zero, `amount` tokens will be minted for `to`. + * - when `to` is zero, `amount` of ``from``'s tokens will be burned. + * - `from` and `to` are never both zero. + * + * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. + */ + function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } +} diff --git a/contracts/Libraries/matic/child/ChildToken/UpgradeableChildERC20/UChildERC20.sol b/contracts/Libraries/matic/child/ChildToken/UpgradeableChildERC20/UChildERC20.sol new file mode 100644 index 0000000..a2bfae6 --- /dev/null +++ b/contracts/Libraries/matic/child/ChildToken/UpgradeableChildERC20/UChildERC20.sol @@ -0,0 +1,84 @@ +pragma solidity 0.6.6; + +import {ERC20} from "./ERC20.sol"; +import {AccessControlMixin} from "../../../common/AccessControlMixin.sol"; +import {IChildToken} from "../IChildToken.sol"; +import {NativeMetaTransaction} from "../../../common/NativeMetaTransaction.sol"; +import {ContextMixin} from "../../../common/ContextMixin.sol"; + + +contract UChildERC20 is + ERC20, + IChildToken, + AccessControlMixin, + NativeMetaTransaction, + ContextMixin +{ + bytes32 public constant DEPOSITOR_ROLE = keccak256("DEPOSITOR_ROLE"); + + constructor() public ERC20("", "") {} + + /** + * @notice Initialize the contract after it has been proxified + * @dev meant to be called once immediately after deployment + */ + function initialize( + string calldata name_, + string calldata symbol_, + uint8 decimals_, + address childChainManager + ) + external + initializer + { + setName(name_); + setSymbol(symbol_); + setDecimals(decimals_); + _setupContractId(string(abi.encodePacked("Child", symbol_))); + _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); + _setupRole(DEPOSITOR_ROLE, childChainManager); + _initializeEIP712(name_); + } + + // This is to support Native meta transactions + // never use msg.sender directly, use _msgSender() instead + function _msgSender() + internal + override + view + returns (address payable sender) + { + return ContextMixin.msgSender(); + } + + function changeName(string calldata name_) external only(DEFAULT_ADMIN_ROLE) { + setName(name_); + _setDomainSeperator(name_); + } + + /** + * @notice called when token is deposited on root chain + * @dev Should be callable only by ChildChainManager + * Should handle deposit by minting the required amount for user + * Make sure minting is done only by this function + * @param user user address for whom deposit is being done + * @param depositData abi encoded amount + */ + function deposit(address user, bytes calldata depositData) + external + override + only(DEPOSITOR_ROLE) + { + uint256 amount = abi.decode(depositData, (uint256)); + _mint(user, amount); + } + + /** + * @notice called when user wants to withdraw tokens back to root chain + * @dev Should burn user's tokens. This transaction will be verified when exiting on root chain + * @param amount amount of tokens to withdraw + */ + function withdraw(uint256 amount) external { + _burn(_msgSender(), amount); + } +} diff --git a/contracts/Libraries/matic/child/ChildToken/UpgradeableChildERC20/UChildERC20Proxy.sol b/contracts/Libraries/matic/child/ChildToken/UpgradeableChildERC20/UChildERC20Proxy.sol new file mode 100644 index 0000000..93afed3 --- /dev/null +++ b/contracts/Libraries/matic/child/ChildToken/UpgradeableChildERC20/UChildERC20Proxy.sol @@ -0,0 +1,10 @@ +pragma solidity 0.6.6; + +import {UpgradableProxy} from "../../../common/Proxy/UpgradableProxy.sol"; + +contract UChildERC20Proxy is UpgradableProxy { + constructor(address _proxyTo) + public + UpgradableProxy(_proxyTo) + {} +} diff --git a/contracts/Libraries/matic/child/IStateReceiver.sol b/contracts/Libraries/matic/child/IStateReceiver.sol new file mode 100644 index 0000000..444c3b8 --- /dev/null +++ b/contracts/Libraries/matic/child/IStateReceiver.sol @@ -0,0 +1,5 @@ +pragma solidity 0.6.6; + +interface IStateReceiver { + function onStateReceive(uint256 id, bytes calldata data) external; +} diff --git a/contracts/Libraries/matic/common/AccessControlMixin.sol b/contracts/Libraries/matic/common/AccessControlMixin.sol new file mode 100644 index 0000000..eaa5b60 --- /dev/null +++ b/contracts/Libraries/matic/common/AccessControlMixin.sol @@ -0,0 +1,18 @@ +pragma solidity 0.6.6; + +import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol"; + +contract AccessControlMixin is AccessControl { + string private _revertMsg; + function _setupContractId(string memory contractId) internal { + _revertMsg = string(abi.encodePacked(contractId, ": INSUFFICIENT_PERMISSIONS")); + } + + modifier only(bytes32 role) { + require( + hasRole(role, _msgSender()), + _revertMsg + ); + _; + } +} diff --git a/contracts/Libraries/matic/common/ContextMixin.sol b/contracts/Libraries/matic/common/ContextMixin.sol new file mode 100644 index 0000000..e544486 --- /dev/null +++ b/contracts/Libraries/matic/common/ContextMixin.sol @@ -0,0 +1,24 @@ +pragma solidity 0.6.6; + +abstract contract ContextMixin { + function msgSender() + internal + view + returns (address payable sender) + { + if (msg.sender == address(this)) { + bytes memory array = msg.data; + uint256 index = msg.data.length; + assembly { + // Load the 32 bytes word from memory with the address on the lower 20 bytes, and mask those. + sender := and( + mload(add(array, index)), + 0xffffffffffffffffffffffffffffffffffffffff + ) + } + } else { + sender = msg.sender; + } + return sender; + } +} diff --git a/contracts/Libraries/matic/common/EIP712Base.sol b/contracts/Libraries/matic/common/EIP712Base.sol new file mode 100644 index 0000000..a67e3cb --- /dev/null +++ b/contracts/Libraries/matic/common/EIP712Base.sol @@ -0,0 +1,75 @@ +pragma solidity 0.6.6; + +import {Initializable} from "./Initializable.sol"; + +contract EIP712Base is Initializable { + struct EIP712Domain { + string name; + string version; + address verifyingContract; + bytes32 salt; + } + + string constant public ERC712_VERSION = "1"; + + bytes32 internal constant EIP712_DOMAIN_TYPEHASH = keccak256( + bytes( + "EIP712Domain(string name,string version,address verifyingContract,bytes32 salt)" + ) + ); + bytes32 internal domainSeperator; + + // supposed to be called once while initializing. + // one of the contractsa that inherits this contract follows proxy pattern + // so it is not possible to do this in a constructor + function _initializeEIP712( + string memory name + ) + internal + initializer + { + _setDomainSeperator(name); + } + + function _setDomainSeperator(string memory name) internal { + domainSeperator = keccak256( + abi.encode( + EIP712_DOMAIN_TYPEHASH, + keccak256(bytes(name)), + keccak256(bytes(ERC712_VERSION)), + address(this), + bytes32(getChainId()) + ) + ); + } + + function getDomainSeperator() public view returns (bytes32) { + return domainSeperator; + } + + function getChainId() public pure returns (uint256) { + uint256 id; + assembly { + id := chainid() + } + return id; + } + + /** + * Accept message hash and returns hash message in EIP712 compatible form + * So that it can be used to recover signer from signature signed using EIP712 formatted data + * https://eips.ethereum.org/EIPS/eip-712 + * "\\x19" makes the encoding deterministic + * "\\x01" is the version byte to make it compatible to EIP-191 + */ + function toTypedMessageHash(bytes32 messageHash) + internal + view + returns (bytes32) + { + return + keccak256( + abi.encodePacked("\x19\x01", getDomainSeperator(), messageHash) + ); + } +} diff --git a/contracts/Libraries/matic/common/Initializable.sol b/contracts/Libraries/matic/common/Initializable.sol new file mode 100644 index 0000000..312a85b --- /dev/null +++ b/contracts/Libraries/matic/common/Initializable.sol @@ -0,0 +1,11 @@ +pragma solidity 0.6.6; + +contract Initializable { + bool inited = false; + + modifier initializer() { + require(!inited, "already inited"); + _; + inited = true; + } +} diff --git a/contracts/Libraries/matic/common/NativeMetaTransaction.sol b/contracts/Libraries/matic/common/NativeMetaTransaction.sol new file mode 100644 index 0000000..405317c --- /dev/null +++ b/contracts/Libraries/matic/common/NativeMetaTransaction.sol @@ -0,0 +1,104 @@ +pragma solidity 0.6.6; + +import {SafeMath} from "@openzeppelin/contracts/math/SafeMath.sol"; +import {EIP712Base} from "./EIP712Base.sol"; + +contract NativeMetaTransaction is EIP712Base { + using SafeMath for uint256; + bytes32 private constant META_TRANSACTION_TYPEHASH = keccak256( + bytes( + "MetaTransaction(uint256 nonce,address from,bytes functionSignature)" + ) + ); + event MetaTransactionExecuted( + address userAddress, + address payable relayerAddress, + bytes functionSignature + ); + mapping(address => uint256) nonces; + + /* + * Meta transaction structure. + * No point of including value field here as if user is doing value transfer then he has the funds to pay for gas + * He should call the desired function directly in that case. + */ + struct MetaTransaction { + uint256 nonce; + address from; + bytes functionSignature; + } + + function executeMetaTransaction( + address userAddress, + bytes memory functionSignature, + bytes32 sigR, + bytes32 sigS, + uint8 sigV + ) public payable returns (bytes memory) { + MetaTransaction memory metaTx = MetaTransaction({ + nonce: nonces[userAddress], + from: userAddress, + functionSignature: functionSignature + }); + + require( + verify(userAddress, metaTx, sigR, sigS, sigV), + "Signer and signature do not match" + ); + + // increase nonce for user (to avoid re-use) + nonces[userAddress] = nonces[userAddress].add(1); + + emit MetaTransactionExecuted( + userAddress, + msg.sender, + functionSignature + ); + + // Append userAddress and relayer address at the end to extract it from calling context + (bool success, bytes memory returnData) = address(this).call( + abi.encodePacked(functionSignature, userAddress) + ); + require(success, "Function call not successful"); + + return returnData; + } + + function hashMetaTransaction(MetaTransaction memory metaTx) + internal + pure + returns (bytes32) + { + return + keccak256( + abi.encode( + META_TRANSACTION_TYPEHASH, + metaTx.nonce, + metaTx.from, + keccak256(metaTx.functionSignature) + ) + ); + } + + function getNonce(address user) public view returns (uint256 nonce) { + nonce = nonces[user]; + } + + function verify( + address signer, + MetaTransaction memory metaTx, + bytes32 sigR, + bytes32 sigS, + uint8 sigV + ) internal view returns (bool) { + require(signer != address(0), "NativeMetaTransaction: INVALID_SIGNER"); + return + signer == + ecrecover( + toTypedMessageHash(hashMetaTransaction(metaTx)), + sigV, + sigR, + sigS + ); + } +} diff --git a/contracts/Libraries/matic/common/Proxy/IERCProxy.sol b/contracts/Libraries/matic/common/Proxy/IERCProxy.sol new file mode 100644 index 0000000..f87f220 --- /dev/null +++ b/contracts/Libraries/matic/common/Proxy/IERCProxy.sol @@ -0,0 +1,7 @@ +pragma solidity 0.6.6; + +interface IERCProxy { + function proxyType() external pure returns (uint256 proxyTypeId); + + function implementation() external view returns (address codeAddr); +} diff --git a/contracts/Libraries/matic/common/Proxy/Proxy.sol b/contracts/Libraries/matic/common/Proxy/Proxy.sol new file mode 100644 index 0000000..8ca3233 --- /dev/null +++ b/contracts/Libraries/matic/common/Proxy/Proxy.sol @@ -0,0 +1,39 @@ +pragma solidity 0.6.6; +import {IERCProxy} from "./IERCProxy.sol"; + +abstract contract Proxy is IERCProxy { + function delegatedFwd(address _dst, bytes memory _calldata) internal { + // solium-disable-next-line security/no-inline-assembly + assembly { + let result := delegatecall( + sub(gas(), 10000), + _dst, + add(_calldata, 0x20), + mload(_calldata), + 0, + 0 + ) + let size := returndatasize() + + let ptr := mload(0x40) + returndatacopy(ptr, 0, size) + + // revert instead of invalid() bc if the underlying call failed with invalid() it already wasted gas. + // if the call returned error data, forward it + switch result + case 0 { + revert(ptr, size) + } + default { + return(ptr, size) + } + } + } + + function proxyType() external virtual override pure returns (uint256 proxyTypeId) { + // Upgradeable proxy + proxyTypeId = 2; + } + + function implementation() external virtual override view returns (address); +} diff --git a/contracts/Libraries/matic/common/Proxy/UpgradableProxy.sol b/contracts/Libraries/matic/common/Proxy/UpgradableProxy.sol new file mode 100644 index 0000000..c88142a --- /dev/null +++ b/contracts/Libraries/matic/common/Proxy/UpgradableProxy.sol @@ -0,0 +1,103 @@ +pragma solidity 0.6.6; + +import {Proxy} from "./Proxy.sol"; + +contract UpgradableProxy is Proxy { + event ProxyUpdated(address indexed _new, address indexed _old); + event ProxyOwnerUpdate(address _new, address _old); + + bytes32 constant IMPLEMENTATION_SLOT = keccak256("matic.network.proxy.implementation"); + bytes32 constant OWNER_SLOT = keccak256("matic.network.proxy.owner"); + + constructor(address _proxyTo) public { + setProxyOwner(msg.sender); + setImplementation(_proxyTo); + } + + fallback() external payable { + delegatedFwd(loadImplementation(), msg.data); + } + + receive() external payable { + delegatedFwd(loadImplementation(), msg.data); + } + + modifier onlyProxyOwner() { + require(loadProxyOwner() == msg.sender, "NOT_OWNER"); + _; + } + + function proxyOwner() external view returns(address) { + return loadProxyOwner(); + } + + function loadProxyOwner() internal view returns(address) { + address _owner; + bytes32 position = OWNER_SLOT; + assembly { + _owner := sload(position) + } + return _owner; + } + + function implementation() external override view returns (address) { + return loadImplementation(); + } + + function loadImplementation() internal view returns(address) { + address _impl; + bytes32 position = IMPLEMENTATION_SLOT; + assembly { + _impl := sload(position) + } + return _impl; + } + + function transferProxyOwnership(address newOwner) public onlyProxyOwner { + require(newOwner != address(0), "ZERO_ADDRESS"); + emit ProxyOwnerUpdate(newOwner, loadProxyOwner()); + setProxyOwner(newOwner); + } + + function setProxyOwner(address newOwner) private { + bytes32 position = OWNER_SLOT; + assembly { + sstore(position, newOwner) + } + } + + function updateImplementation(address _newProxyTo) public onlyProxyOwner { + require(_newProxyTo != address(0x0), "INVALID_PROXY_ADDRESS"); + require(isContract(_newProxyTo), "DESTINATION_ADDRESS_IS_NOT_A_CONTRACT"); + + emit ProxyUpdated(_newProxyTo, loadImplementation()); + + setImplementation(_newProxyTo); + } + + function updateAndCall(address _newProxyTo, bytes memory data) payable public onlyProxyOwner { + updateImplementation(_newProxyTo); + + (bool success, bytes memory returnData) = address(this).call{value: msg.value}(data); + require(success, string(returnData)); + } + + function setImplementation(address _newProxyTo) private { + bytes32 position = IMPLEMENTATION_SLOT; + assembly { + sstore(position, _newProxyTo) + } + } + + function isContract(address _target) internal view returns (bool) { + if (_target == address(0)) { + return false; + } + + uint256 size; + assembly { + size := extcodesize(_target) + } + return size > 0; + } +} diff --git a/contracts/Libraries/matic/lib/Merkle.sol b/contracts/Libraries/matic/lib/Merkle.sol new file mode 100644 index 0000000..5a9e1a7 --- /dev/null +++ b/contracts/Libraries/matic/lib/Merkle.sol @@ -0,0 +1,37 @@ +pragma solidity 0.6.6; + +library Merkle { + function checkMembership( + bytes32 leaf, + uint256 index, + bytes32 rootHash, + bytes memory proof + ) internal pure returns (bool) { + require(proof.length % 32 == 0, "Invalid proof length"); + uint256 proofHeight = proof.length / 32; + // Proof of size n means, height of the tree is n+1. + // In a tree of height n+1, max #leafs possible is 2 ^ n + require(index < 2 ** proofHeight, "Leaf index is too big"); + + bytes32 proofElement; + bytes32 computedHash = leaf; + for (uint256 i = 32; i <= proof.length; i += 32) { + assembly { + proofElement := mload(add(proof, i)) + } + + if (index % 2 == 0) { + computedHash = keccak256( + abi.encodePacked(computedHash, proofElement) + ); + } else { + computedHash = keccak256( + abi.encodePacked(proofElement, computedHash) + ); + } + + index = index / 2; + } + return computedHash == rootHash; + } +} diff --git a/contracts/Libraries/matic/lib/MerklePatriciaProof.sol b/contracts/Libraries/matic/lib/MerklePatriciaProof.sol new file mode 100644 index 0000000..25233b6 --- /dev/null +++ b/contracts/Libraries/matic/lib/MerklePatriciaProof.sol @@ -0,0 +1,165 @@ +/* + * @title MerklePatriciaVerifier + * @author Sam Mayo (sammayo888@gmail.com) + * + * @dev Library for verifing merkle patricia proofs. + */ +pragma solidity 0.6.6; + +import {RLPReader} from "./RLPReader.sol"; + +library MerklePatriciaProof { + /* + * @dev Verifies a merkle patricia proof. + * @param value The terminating value in the trie. + * @param encodedPath The path in the trie leading to value. + * @param rlpParentNodes The rlp encoded stack of nodes. + * @param root The root hash of the trie. + * @return The boolean validity of the proof. + */ + function verify( + bytes memory value, + bytes memory encodedPath, + bytes memory rlpParentNodes, + bytes32 root + ) internal pure returns (bool) { + RLPReader.RLPItem memory item = RLPReader.toRlpItem(rlpParentNodes); + RLPReader.RLPItem[] memory parentNodes = RLPReader.toList(item); + + bytes memory currentNode; + RLPReader.RLPItem[] memory currentNodeList; + + bytes32 nodeKey = root; + uint256 pathPtr = 0; + + bytes memory path = _getNibbleArray(encodedPath); + if (path.length == 0) { + return false; + } + + for (uint256 i = 0; i < parentNodes.length; i++) { + if (pathPtr > path.length) { + return false; + } + + currentNode = RLPReader.toRlpBytes(parentNodes[i]); + if (nodeKey != keccak256(currentNode)) { + return false; + } + currentNodeList = RLPReader.toList(parentNodes[i]); + + if (currentNodeList.length == 17) { + if (pathPtr == path.length) { + if ( + keccak256(RLPReader.toBytes(currentNodeList[16])) == + keccak256(value) + ) { + return true; + } else { + return false; + } + } + + uint8 nextPathNibble = uint8(path[pathPtr]); + if (nextPathNibble > 16) { + return false; + } + nodeKey = bytes32( + RLPReader.toUintStrict(currentNodeList[nextPathNibble]) + ); + pathPtr += 1; + } else if (currentNodeList.length == 2) { + uint256 traversed = _nibblesToTraverse( + RLPReader.toBytes(currentNodeList[0]), + path, + pathPtr + ); + if (pathPtr + traversed == path.length) { + //leaf node + if ( + keccak256(RLPReader.toBytes(currentNodeList[1])) == + keccak256(value) + ) { + return true; + } else { + return false; + } + } + + //extension node + if (traversed == 0) { + return false; + } + + pathPtr += traversed; + nodeKey = bytes32(RLPReader.toUintStrict(currentNodeList[1])); + } else { + return false; + } + } + } + + function _nibblesToTraverse( + bytes memory encodedPartialPath, + bytes memory path, + uint256 pathPtr + ) private pure returns (uint256) { + uint256 len = 0; + // encodedPartialPath has elements that are each two hex characters (1 byte), but partialPath + // and slicedPath have elements that are each one hex character (1 nibble) + bytes memory partialPath = _getNibbleArray(encodedPartialPath); + bytes memory slicedPath = new bytes(partialPath.length); + + // pathPtr counts nibbles in path + // partialPath.length is a number of nibbles + for (uint256 i = pathPtr; i < pathPtr + partialPath.length; i++) { + bytes1 pathNibble = path[i]; + slicedPath[i - pathPtr] = pathNibble; + } + + if (keccak256(partialPath) == keccak256(slicedPath)) { + len = partialPath.length; + } else { + len = 0; + } + return len; + } + + // bytes b must be hp encoded + function _getNibbleArray(bytes memory b) + internal + pure + returns (bytes memory) + { + bytes memory nibbles = ""; + if (b.length > 0) { + uint8 offset; + uint8 hpNibble = uint8(_getNthNibbleOfBytes(0, b)); + if (hpNibble == 1 || hpNibble == 3) { + nibbles = new bytes(b.length * 2 - 1); + bytes1 oddNibble = _getNthNibbleOfBytes(1, b); + nibbles[0] = oddNibble; + offset = 1; + } else { + nibbles = new bytes(b.length * 2 - 2); + offset = 0; + } + + for (uint256 i = offset; i < nibbles.length; i++) { + nibbles[i] = _getNthNibbleOfBytes(i - offset + 2, b); + } + } + return nibbles; + } + + function _getNthNibbleOfBytes(uint256 n, bytes memory str) + private + pure + returns (bytes1) + { + return + bytes1( + n % 2 == 0 ? uint8(str[n / 2]) / 0x10 : uint8(str[n / 2]) % 0x10 + ); + } +} diff --git a/contracts/Libraries/matic/lib/RLPReader.sol b/contracts/Libraries/matic/lib/RLPReader.sol new file mode 100644 index 0000000..813e602 --- /dev/null +++ b/contracts/Libraries/matic/lib/RLPReader.sol @@ -0,0 +1,262 @@ +/* + * @author Hamdi Allam hamdi.allam97@gmail.com + * Please reach out with any questions or concerns + * https://github.com/hamdiallam/Solidity-RLP/blob/e681e25a376dbd5426b509380bc03446f05d0f97/contracts/RLPReader.sol + */ +pragma solidity 0.6.6; + +library RLPReader { + uint8 constant STRING_SHORT_START = 0x80; + uint8 constant STRING_LONG_START = 0xb8; + uint8 constant LIST_SHORT_START = 0xc0; + uint8 constant LIST_LONG_START = 0xf8; + uint8 constant WORD_SIZE = 32; + + struct RLPItem { + uint256 len; + uint256 memPtr; + } + + /* + * @param item RLP encoded bytes + */ + function toRlpItem(bytes memory item) + internal + pure + returns (RLPItem memory) + { + require(item.length > 0, "RLPReader: INVALID_BYTES_LENGTH"); + uint256 memPtr; + assembly { + memPtr := add(item, 0x20) + } + + return RLPItem(item.length, memPtr); + } + + /* + * @param item RLP encoded list in bytes + */ + function toList(RLPItem memory item) + internal + pure + returns (RLPItem[] memory) + { + require(isList(item), "RLPReader: ITEM_NOT_LIST"); + + uint256 items = numItems(item); + RLPItem[] memory result = new RLPItem[](items); + uint256 listLength = _itemLength(item.memPtr); + require(listLength == item.len, "RLPReader: LIST_DECODED_LENGTH_MISMATCH"); + + uint256 memPtr = item.memPtr + _payloadOffset(item.memPtr); + uint256 dataLen; + for (uint256 i = 0; i < items; i++) { + dataLen = _itemLength(memPtr); + result[i] = RLPItem(dataLen, memPtr); + memPtr = memPtr + dataLen; + } + + return result; + } + + // @return indicator whether encoded payload is a list. negate this function call for isData. + function isList(RLPItem memory item) internal pure returns (bool) { + uint8 byte0; + uint256 memPtr = item.memPtr; + assembly { + byte0 := byte(0, mload(memPtr)) + } + + if (byte0 < LIST_SHORT_START) return false; + return true; + } + + /** RLPItem conversions into data types **/ + + // @returns raw rlp encoding in bytes + function toRlpBytes(RLPItem memory item) + internal + pure + returns (bytes memory) + { + bytes memory result = new bytes(item.len); + + uint256 ptr; + assembly { + ptr := add(0x20, result) + } + + copy(item.memPtr, ptr, item.len); + return result; + } + + function toAddress(RLPItem memory item) internal pure returns (address) { + require(!isList(item), "RLPReader: DECODING_LIST_AS_ADDRESS"); + // 1 byte for the length prefix + require(item.len == 21, "RLPReader: INVALID_ADDRESS_LENGTH"); + + return address(toUint(item)); + } + + function toUint(RLPItem memory item) internal pure returns (uint256) { + require(!isList(item), "RLPReader: DECODING_LIST_AS_UINT"); + require(item.len <= 33, "RLPReader: INVALID_UINT_LENGTH"); + + uint256 itemLength = _itemLength(item.memPtr); + require(itemLength == item.len, "RLPReader: UINT_DECODED_LENGTH_MISMATCH"); + + uint256 offset = _payloadOffset(item.memPtr); + uint256 len = item.len - offset; + uint256 result; + uint256 memPtr = item.memPtr + offset; + assembly { + result := mload(memPtr) + + // shfit to the correct location if neccesary + if lt(len, 32) { + result := div(result, exp(256, sub(32, len))) + } + } + + return result; + } + + // enforces 32 byte length + function toUintStrict(RLPItem memory item) internal pure returns (uint256) { + uint256 itemLength = _itemLength(item.memPtr); + require(itemLength == item.len, "RLPReader: UINT_STRICT_DECODED_LENGTH_MISMATCH"); + // one byte prefix + require(item.len == 33, "RLPReader: INVALID_UINT_STRICT_LENGTH"); + + uint256 result; + uint256 memPtr = item.memPtr + 1; + assembly { + result := mload(memPtr) + } + + return result; + } + + function toBytes(RLPItem memory item) internal pure returns (bytes memory) { + uint256 listLength = _itemLength(item.memPtr); + require(listLength == item.len, "RLPReader: BYTES_DECODED_LENGTH_MISMATCH"); + uint256 offset = _payloadOffset(item.memPtr); + + uint256 len = item.len - offset; // data length + bytes memory result = new bytes(len); + + uint256 destPtr; + assembly { + destPtr := add(0x20, result) + } + + copy(item.memPtr + offset, destPtr, len); + return result; + } + + /* + * Private Helpers + */ + + // @return number of payload items inside an encoded list. + function numItems(RLPItem memory item) private pure returns (uint256) { + // add `isList` check if `item` is expected to be passsed without a check from calling function + // require(isList(item), "RLPReader: NUM_ITEMS_NOT_LIST"); + + uint256 count = 0; + uint256 currPtr = item.memPtr + _payloadOffset(item.memPtr); + uint256 endPtr = item.memPtr + item.len; + while (currPtr < endPtr) { + currPtr = currPtr + _itemLength(currPtr); // skip over an item + require(currPtr <= endPtr, "RLPReader: NUM_ITEMS_DECODED_LENGTH_MISMATCH"); + count++; + } + + return count; + } + + // @return entire rlp item byte length + function _itemLength(uint256 memPtr) private pure returns (uint256) { + uint256 itemLen; + uint256 byte0; + assembly { + byte0 := byte(0, mload(memPtr)) + } + + if (byte0 < STRING_SHORT_START) itemLen = 1; + else if (byte0 < STRING_LONG_START) + itemLen = byte0 - STRING_SHORT_START + 1; + else if (byte0 < LIST_SHORT_START) { + assembly { + let byteLen := sub(byte0, 0xb7) // # of bytes the actual length is + memPtr := add(memPtr, 1) // skip over the first byte + + /* 32 byte word size */ + let dataLen := div(mload(memPtr), exp(256, sub(32, byteLen))) // right shifting to get the len + itemLen := add(dataLen, add(byteLen, 1)) + } + } else if (byte0 < LIST_LONG_START) { + itemLen = byte0 - LIST_SHORT_START + 1; + } else { + assembly { + let byteLen := sub(byte0, 0xf7) + memPtr := add(memPtr, 1) + + let dataLen := div(mload(memPtr), exp(256, sub(32, byteLen))) // right shifting to the correct length + itemLen := add(dataLen, add(byteLen, 1)) + } + } + + return itemLen; + } + + // @return number of bytes until the data + function _payloadOffset(uint256 memPtr) private pure returns (uint256) { + uint256 byte0; + assembly { + byte0 := byte(0, mload(memPtr)) + } + + if (byte0 < STRING_SHORT_START) return 0; + else if ( + byte0 < STRING_LONG_START || + (byte0 >= LIST_SHORT_START && byte0 < LIST_LONG_START) + ) return 1; + else if (byte0 < LIST_SHORT_START) + // being explicit + return byte0 - (STRING_LONG_START - 1) + 1; + else return byte0 - (LIST_LONG_START - 1) + 1; + } + + /* + * @param src Pointer to source + * @param dest Pointer to destination + * @param len Amount of memory to copy from the source + */ + function copy( + uint256 src, + uint256 dest, + uint256 len + ) private pure { + if (len == 0) return; + + // copy as many word sizes as possible + for (; len >= WORD_SIZE; len -= WORD_SIZE) { + assembly { + mstore(dest, mload(src)) + } + + src += WORD_SIZE; + dest += WORD_SIZE; + } + + // left over bytes. Mask is used to remove unwanted bytes from the word + uint256 mask = 256**(WORD_SIZE - len) - 1; + assembly { + let srcpart := and(mload(src), not(mask)) // zero out src + let destpart := and(mload(dest), mask) // retrieve the bytes + mstore(dest, or(destpart, srcpart)) + } + } +} diff --git a/contracts/Libraries/matic/root/ICheckpointManager.sol b/contracts/Libraries/matic/root/ICheckpointManager.sol new file mode 100644 index 0000000..a859d09 --- /dev/null +++ b/contracts/Libraries/matic/root/ICheckpointManager.sol @@ -0,0 +1,17 @@ +pragma solidity 0.6.6; + +contract ICheckpointManager { + struct HeaderBlock { + bytes32 root; + uint256 start; + uint256 end; + uint256 createdAt; + address proposer; + } + + /** + * @notice mapping of checkpoint header numbers to block details + * @dev These checkpoints are submited by plasma contracts + */ + mapping(uint256 => HeaderBlock) public headerBlocks; +} diff --git a/contracts/Libraries/matic/root/MockCheckpointManager.sol b/contracts/Libraries/matic/root/MockCheckpointManager.sol new file mode 100644 index 0000000..338b993 --- /dev/null +++ b/contracts/Libraries/matic/root/MockCheckpointManager.sol @@ -0,0 +1,26 @@ +pragma solidity 0.6.6; + +import {SafeMath} from "@openzeppelin/contracts/math/SafeMath.sol"; +import {ICheckpointManager} from "./ICheckpointManager.sol"; + +/** +* @notice Mock Checkpoint Manager contract to simulate plasma checkpoints while testing +*/ +contract MockCheckpointManager is ICheckpointManager { + using SafeMath for uint256; + + uint256 public currentCheckpointNumber = 0; + + function setCheckpoint(bytes32 rootHash, uint256 start, uint256 end) public { + HeaderBlock memory headerBlock = HeaderBlock({ + root: rootHash, + start: start, + end: end, + createdAt: now, + proposer: msg.sender + }); + + currentCheckpointNumber = currentCheckpointNumber.add(1); + headerBlocks[currentCheckpointNumber] = headerBlock; + } +} diff --git a/contracts/Libraries/matic/root/RootChainManager/IRootChainManager.sol b/contracts/Libraries/matic/root/RootChainManager/IRootChainManager.sol new file mode 100644 index 0000000..c7e1406 --- /dev/null +++ b/contracts/Libraries/matic/root/RootChainManager/IRootChainManager.sol @@ -0,0 +1,44 @@ +pragma solidity 0.6.6; + +interface IRootChainManager { + event TokenMapped( + address indexed rootToken, + address indexed childToken, + bytes32 indexed tokenType + ); + + event PredicateRegistered( + bytes32 indexed tokenType, + address indexed predicateAddress + ); + + function registerPredicate(bytes32 tokenType, address predicateAddress) + external; + + function mapToken( + address rootToken, + address childToken, + bytes32 tokenType + ) external; + + function cleanMapToken( + address rootToken, + address childToken + ) external; + + function remapToken( + address rootToken, + address childToken, + bytes32 tokenType + ) external; + + function depositEtherFor(address user) external payable; + + function depositFor( + address user, + address rootToken, + bytes calldata depositData + ) external; + + function exit(bytes calldata inputData) external; +} diff --git a/contracts/Libraries/matic/root/RootChainManager/RootChainManager.sol b/contracts/Libraries/matic/root/RootChainManager/RootChainManager.sol new file mode 100644 index 0000000..8fd9c12 --- /dev/null +++ b/contracts/Libraries/matic/root/RootChainManager/RootChainManager.sol @@ -0,0 +1,445 @@ +pragma solidity 0.6.6; + +import {SafeMath} from "@openzeppelin/contracts/math/SafeMath.sol"; +import {IRootChainManager} from "./IRootChainManager.sol"; +import {RootChainManagerStorage} from "./RootChainManagerStorage.sol"; +import {IStateSender} from "../StateSender/IStateSender.sol"; +import {ICheckpointManager} from "../ICheckpointManager.sol"; +import {RLPReader} from "../../lib/RLPReader.sol"; +import {MerklePatriciaProof} from "../../lib/MerklePatriciaProof.sol"; +import {Merkle} from "../../lib/Merkle.sol"; +import {ITokenPredicate} from "../TokenPredicates/ITokenPredicate.sol"; +import {Initializable} from "../../common/Initializable.sol"; +import {NativeMetaTransaction} from "../../common/NativeMetaTransaction.sol"; +import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol"; +import {AccessControlMixin} from "../../common/AccessControlMixin.sol"; +import {ContextMixin} from "../../common/ContextMixin.sol"; + +contract RootChainManager is + IRootChainManager, + Initializable, + AccessControl, // included to match old storage layout while upgrading + RootChainManagerStorage, // created to match old storage layout while upgrading + AccessControlMixin, + NativeMetaTransaction, + ContextMixin +{ + using RLPReader for bytes; + using RLPReader for RLPReader.RLPItem; + using Merkle for bytes32; + using SafeMath for uint256; + + // maybe DEPOSIT and MAP_TOKEN can be reduced to bytes4 + bytes32 public constant DEPOSIT = keccak256("DEPOSIT"); + bytes32 public constant MAP_TOKEN = keccak256("MAP_TOKEN"); + address public constant ETHER_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; + bytes32 public constant MAPPER_ROLE = keccak256("MAPPER_ROLE"); + + function _msgSender() + internal + override + view + returns (address payable sender) + { + return ContextMixin.msgSender(); + } + + /** + * @notice Deposit ether by directly sending to the contract + * The account sending ether receives WETH on child chain + */ + receive() external payable { + _depositEtherFor(_msgSender()); + } + + /** + * @notice Initialize the contract after it has been proxified + * @dev meant to be called once immediately after deployment + * @param _owner the account that should be granted admin role + */ + function initialize( + address _owner + ) + external + initializer + { + _initializeEIP712("RootChainManager"); + _setupContractId("RootChainManager"); + _setupRole(DEFAULT_ADMIN_ROLE, _owner); + _setupRole(MAPPER_ROLE, _owner); + } + + // adding seperate function setupContractId since initialize is already called with old implementation + function setupContractId() + external + only(DEFAULT_ADMIN_ROLE) + { + _setupContractId("RootChainManager"); + } + + // adding seperate function initializeEIP712 since initialize is already called with old implementation + function initializeEIP712() + external + only(DEFAULT_ADMIN_ROLE) + { + _setDomainSeperator("RootChainManager"); + } + + /** + * @notice Set the state sender, callable only by admins + * @dev This should be the state sender from plasma contracts + * It is used to send bytes from root to child chain + * @param newStateSender address of state sender contract + */ + function setStateSender(address newStateSender) + external + only(DEFAULT_ADMIN_ROLE) + { + _stateSender = IStateSender(newStateSender); + } + + /** + * @notice Get the address of contract set as state sender + * @return The address of state sender contract + */ + function stateSenderAddress() external view returns (address) { + return address(_stateSender); + } + + /** + * @notice Set the checkpoint manager, callable only by admins + * @dev This should be the plasma contract responsible for keeping track of checkpoints + * @param newCheckpointManager address of checkpoint manager contract + */ + function setCheckpointManager(address newCheckpointManager) + external + only(DEFAULT_ADMIN_ROLE) + { + _checkpointManager = ICheckpointManager(newCheckpointManager); + } + + /** + * @notice Get the address of contract set as checkpoint manager + * @return The address of checkpoint manager contract + */ + function checkpointManagerAddress() external view returns (address) { + return address(_checkpointManager); + } + + /** + * @notice Set the child chain manager, callable only by admins + * @dev This should be the contract responsible to receive deposit bytes on child chain + * @param newChildChainManager address of child chain manager contract + */ + function setChildChainManagerAddress(address newChildChainManager) + external + only(DEFAULT_ADMIN_ROLE) + { + require(newChildChainManager != address(0x0), "RootChainManager: INVALID_CHILD_CHAIN_ADDRESS"); + childChainManagerAddress = newChildChainManager; + } + + /** + * @notice Register a token predicate address against its type, callable only by mappers + * @dev A predicate is a contract responsible to process the token specific logic while locking or exiting tokens + * @param tokenType bytes32 unique identifier for the token type + * @param predicateAddress address of token predicate address + */ + function registerPredicate(bytes32 tokenType, address predicateAddress) + external + override + only(DEFAULT_ADMIN_ROLE) + { + typeToPredicate[tokenType] = predicateAddress; + emit PredicateRegistered(tokenType, predicateAddress); + } + + /** + * @notice Map a token to enable its movement via the PoS Portal, callable only by mappers + * @param rootToken address of token on root chain + * @param childToken address of token on child chain + * @param tokenType bytes32 unique identifier for the token type + */ + function mapToken( + address rootToken, + address childToken, + bytes32 tokenType + ) external override only(MAPPER_ROLE) { + // explicit check if token is already mapped to avoid accidental remaps + require( + rootToChildToken[rootToken] == address(0) && + childToRootToken[childToken] == address(0), + "RootChainManager: ALREADY_MAPPED" + ); + _mapToken(rootToken, childToken, tokenType); + } + + /** + * @notice Clean polluted token mapping + * @param rootToken address of token on root chain. Since rename token was introduced later stage, + * clean method is used to clean pollulated mapping + */ + function cleanMapToken( + address rootToken, + address childToken + ) external override only(DEFAULT_ADMIN_ROLE) { + rootToChildToken[rootToken] = address(0); + childToRootToken[childToken] = address(0); + tokenToType[rootToken] = bytes32(0); + + emit TokenMapped(rootToken, childToken, tokenToType[rootToken]); + } + + /** + * @notice Remap a token that has already been mapped, properly cleans up old mapping + * Callable only by mappers + * @param rootToken address of token on root chain + * @param childToken address of token on child chain + * @param tokenType bytes32 unique identifier for the token type + */ + function remapToken( + address rootToken, + address childToken, + bytes32 tokenType + ) external override only(DEFAULT_ADMIN_ROLE) { + // cleanup old mapping + address oldChildToken = rootToChildToken[rootToken]; + address oldRootToken = childToRootToken[childToken]; + + if (rootToChildToken[oldRootToken] != address(0)) { + rootToChildToken[oldRootToken] = address(0); + tokenToType[oldRootToken] = bytes32(0); + } + + if (childToRootToken[oldChildToken] != address(0)) { + childToRootToken[oldChildToken] = address(0); + } + + _mapToken(rootToken, childToken, tokenType); + } + + function _mapToken( + address rootToken, + address childToken, + bytes32 tokenType + ) private { + require( + typeToPredicate[tokenType] != address(0x0), + "RootChainManager: TOKEN_TYPE_NOT_SUPPORTED" + ); + + rootToChildToken[rootToken] = childToken; + childToRootToken[childToken] = rootToken; + tokenToType[rootToken] = tokenType; + + emit TokenMapped(rootToken, childToken, tokenType); + + bytes memory syncData = abi.encode(rootToken, childToken, tokenType); + _stateSender.syncState( + childChainManagerAddress, + abi.encode(MAP_TOKEN, syncData) + ); + } + + /** + * @notice Move ether from root to child chain, accepts ether transfer + * Keep in mind this ether cannot be used to pay gas on child chain + * Use Matic tokens deposited using plasma mechanism for that + * @param user address of account that should receive WETH on child chain + */ + function depositEtherFor(address user) external override payable { + _depositEtherFor(user); + } + + /** + * @notice Move tokens from root to child chain + * @dev This mechanism supports arbitrary tokens as long as its predicate has been registered and the token is mapped + * @param user address of account that should receive this deposit on child chain + * @param rootToken address of token that is being deposited + * @param depositData bytes data that is sent to predicate and child token contracts to handle deposit + */ + function depositFor( + address user, + address rootToken, + bytes calldata depositData + ) external override { + require( + rootToken != ETHER_ADDRESS, + "RootChainManager: INVALID_ROOT_TOKEN" + ); + _depositFor(user, rootToken, depositData); + } + + function _depositEtherFor(address user) private { + bytes memory depositData = abi.encode(msg.value); + _depositFor(user, ETHER_ADDRESS, depositData); + + // payable(typeToPredicate[tokenToType[ETHER_ADDRESS]]).transfer(msg.value); + // transfer doesn't work as expected when receiving contract is proxified so using call + (bool success, /* bytes memory data */) = typeToPredicate[tokenToType[ETHER_ADDRESS]].call{value: msg.value}(""); + if (!success) { + revert("RootChainManager: ETHER_TRANSFER_FAILED"); + } + } + + function _depositFor( + address user, + address rootToken, + bytes memory depositData + ) private { + bytes32 tokenType = tokenToType[rootToken]; + require( + rootToChildToken[rootToken] != address(0x0) && + tokenType != 0, + "RootChainManager: TOKEN_NOT_MAPPED" + ); + address predicateAddress = typeToPredicate[tokenType]; + require( + predicateAddress != address(0), + "RootChainManager: INVALID_TOKEN_TYPE" + ); + require( + user != address(0), + "RootChainManager: INVALID_USER" + ); + + ITokenPredicate(predicateAddress).lockTokens( + _msgSender(), + user, + rootToken, + depositData + ); + bytes memory syncData = abi.encode(user, rootToken, depositData); + _stateSender.syncState( + childChainManagerAddress, + abi.encode(DEPOSIT, syncData) + ); + } + + /** + * @notice exit tokens by providing proof + * @dev This function verifies if the transaction actually happened on child chain + * the transaction log is then sent to token predicate to handle it accordingly + * + * @param inputData RLP encoded data of the reference tx containing following list of fields + * 0 - headerNumber - Checkpoint header block number containing the reference tx + * 1 - blockProof - Proof that the block header (in the child chain) is a leaf in the submitted merkle root + * 2 - blockNumber - Block number containing the reference tx on child chain + * 3 - blockTime - Reference tx block time + * 4 - txRoot - Transactions root of block + * 5 - receiptRoot - Receipts root of block + * 6 - receipt - Receipt of the reference transaction + * 7 - receiptProof - Merkle proof of the reference receipt + * 8 - branchMask - 32 bits denoting the path of receipt in merkle tree + * 9 - receiptLogIndex - Log Index to read from the receipt + */ + function exit(bytes calldata inputData) external override { + RLPReader.RLPItem[] memory inputDataRLPList = inputData + .toRlpItem() + .toList(); + + // checking if exit has already been processed + // unique exit is identified using hash of (blockNumber, branchMask, receiptLogIndex) + bytes32 exitHash = keccak256( + abi.encodePacked( + inputDataRLPList[2].toUint(), // blockNumber + // first 2 nibbles are dropped while generating nibble array + // this allows branch masks that are valid but bypass exitHash check (changing first 2 nibbles only) + // so converting to nibble array and then hashing it + MerklePatriciaProof._getNibbleArray(inputDataRLPList[8].toBytes()), // branchMask + inputDataRLPList[9].toUint() // receiptLogIndex + ) + ); + require( + processedExits[exitHash] == false, + "RootChainManager: EXIT_ALREADY_PROCESSED" + ); + processedExits[exitHash] = true; + + RLPReader.RLPItem[] memory receiptRLPList = inputDataRLPList[6] + .toBytes() + .toRlpItem() + .toList(); + RLPReader.RLPItem memory logRLP = receiptRLPList[3] + .toList()[ + inputDataRLPList[9].toUint() // receiptLogIndex + ]; + + address childToken = RLPReader.toAddress(logRLP.toList()[0]); // log emitter address field + // log should be emmited only by the child token + address rootToken = childToRootToken[childToken]; + require( + rootToken != address(0), + "RootChainManager: TOKEN_NOT_MAPPED" + ); + + address predicateAddress = typeToPredicate[ + tokenToType[rootToken] + ]; + + // branch mask can be maximum 32 bits + require( + inputDataRLPList[8].toUint() & + 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000 == + 0, + "RootChainManager: INVALID_BRANCH_MASK" + ); + + // verify receipt inclusion + require( + MerklePatriciaProof.verify( + inputDataRLPList[6].toBytes(), // receipt + inputDataRLPList[8].toBytes(), // branchMask + inputDataRLPList[7].toBytes(), // receiptProof + bytes32(inputDataRLPList[5].toUint()) // receiptRoot + ), + "RootChainManager: INVALID_PROOF" + ); + + // verify checkpoint inclusion + _checkBlockMembershipInCheckpoint( + inputDataRLPList[2].toUint(), // blockNumber + inputDataRLPList[3].toUint(), // blockTime + bytes32(inputDataRLPList[4].toUint()), // txRoot + bytes32(inputDataRLPList[5].toUint()), // receiptRoot + inputDataRLPList[0].toUint(), // headerNumber + inputDataRLPList[1].toBytes() // blockProof + ); + + ITokenPredicate(predicateAddress).exitTokens( + _msgSender(), + rootToken, + logRLP.toRlpBytes() + ); + } + + function _checkBlockMembershipInCheckpoint( + uint256 blockNumber, + uint256 blockTime, + bytes32 txRoot, + bytes32 receiptRoot, + uint256 headerNumber, + bytes memory blockProof + ) private view returns (uint256) { + ( + bytes32 headerRoot, + uint256 startBlock, + , + uint256 createdAt, + + ) = _checkpointManager.headerBlocks(headerNumber); + + require( + keccak256( + abi.encodePacked(blockNumber, blockTime, txRoot, receiptRoot) + ) + .checkMembership( + blockNumber.sub(startBlock), + headerRoot, + blockProof + ), + "RootChainManager: INVALID_HEADER" + ); + return createdAt; + } +} diff --git a/contracts/Libraries/matic/root/RootChainManager/RootChainManagerProxy.sol b/contracts/Libraries/matic/root/RootChainManager/RootChainManagerProxy.sol new file mode 100644 index 0000000..ad5540c --- /dev/null +++ b/contracts/Libraries/matic/root/RootChainManager/RootChainManagerProxy.sol @@ -0,0 +1,10 @@ +pragma solidity 0.6.6; + +import {UpgradableProxy} from "../../common/Proxy/UpgradableProxy.sol"; + +contract RootChainManagerProxy is UpgradableProxy { + constructor(address _proxyTo) + public + UpgradableProxy(_proxyTo) + {} +} diff --git a/contracts/Libraries/matic/root/RootChainManager/RootChainManagerStorage.sol b/contracts/Libraries/matic/root/RootChainManager/RootChainManagerStorage.sol new file mode 100644 index 0000000..465f457 --- /dev/null +++ b/contracts/Libraries/matic/root/RootChainManager/RootChainManagerStorage.sol @@ -0,0 +1,15 @@ +pragma solidity 0.6.6; + +import {IStateSender} from "../StateSender/IStateSender.sol"; +import {ICheckpointManager} from "../ICheckpointManager.sol"; + +abstract contract RootChainManagerStorage { + mapping(bytes32 => address) public typeToPredicate; + mapping(address => address) public rootToChildToken; + mapping(address => address) public childToRootToken; + mapping(address => bytes32) public tokenToType; + mapping(bytes32 => bool) public processedExits; + IStateSender internal _stateSender; + ICheckpointManager internal _checkpointManager; + address public childChainManagerAddress; +} diff --git a/contracts/Libraries/matic/root/RootToken/DummyERC1155.sol b/contracts/Libraries/matic/root/RootToken/DummyERC1155.sol new file mode 100644 index 0000000..7cc13fb --- /dev/null +++ b/contracts/Libraries/matic/root/RootToken/DummyERC1155.sol @@ -0,0 +1,31 @@ +pragma solidity 0.6.6; + +import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; +import {NativeMetaTransaction} from "../../common/NativeMetaTransaction.sol"; +import {ContextMixin} from "../../common/ContextMixin.sol"; + +contract DummyERC1155 is + ERC1155, + NativeMetaTransaction, + ContextMixin +{ + constructor(string memory uri_) + public + ERC1155(uri_) + { + _initializeEIP712(uri_); + } + + function mint(address account, uint256 id, uint256 amount) public { + _mint(account, id, amount, bytes("")); + } + + function _msgSender() + internal + override + view + returns (address payable sender) + { + return ContextMixin.msgSender(); + } +} diff --git a/contracts/Libraries/matic/root/RootToken/DummyERC20.sol b/contracts/Libraries/matic/root/RootToken/DummyERC20.sol new file mode 100644 index 0000000..24b47f5 --- /dev/null +++ b/contracts/Libraries/matic/root/RootToken/DummyERC20.sol @@ -0,0 +1,33 @@ +pragma solidity 0.6.6; + +import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; +import {NativeMetaTransaction} from "../../common/NativeMetaTransaction.sol"; +import {ContextMixin} from "../../common/ContextMixin.sol"; + +contract DummyERC20 is + ERC20, + NativeMetaTransaction, + ContextMixin +{ + constructor(string memory name_, string memory symbol_) + public + ERC20(name_, symbol_) + { + uint256 amount = 10**10 * (10**18); + _mint(_msgSender(), amount); + _initializeEIP712(name_); + } + + function mint(uint256 amount) public { + _mint(_msgSender(), amount); + } + + function _msgSender() + internal + override + view + returns (address payable sender) + { + return ContextMixin.msgSender(); + } +} diff --git a/contracts/Libraries/matic/root/RootToken/DummyERC721.sol b/contracts/Libraries/matic/root/RootToken/DummyERC721.sol new file mode 100644 index 0000000..c300498 --- /dev/null +++ b/contracts/Libraries/matic/root/RootToken/DummyERC721.sol @@ -0,0 +1,63 @@ +pragma solidity 0.6.6; + +import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol"; +import {AccessControlMixin} from "../../common/AccessControlMixin.sol"; +import {NativeMetaTransaction} from "../../common/NativeMetaTransaction.sol"; +import {IRootERC721} from "./IRootERC721.sol"; +import {ContextMixin} from "../../common/ContextMixin.sol"; + +contract DummyERC721 is + ERC721, + AccessControlMixin, + NativeMetaTransaction, + IRootERC721, + ContextMixin +{ + bytes32 public constant PREDICATE_ROLE = keccak256("PREDICATE_ROLE"); + constructor(string memory name_, string memory symbol_) + public + ERC721(name_, symbol_) + { + _setupContractId("DummyERC721"); + _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); + _setupRole(PREDICATE_ROLE, _msgSender()); + _initializeEIP712(name_); + } + + function mint(uint256 tokenId) public { + _mint(_msgSender(), tokenId); + } + + /** + * If you're attempting to bring metadata associated with token + * from L2 to L1, you must implement this method + * + * To be invoked when attempting to exit ERC721 with metadata from L2 + * + * `data` is nothing but arbitrary byte array which + * is brought in L1, by event emitted in L2, during withdraw + * + * Make sure this method is always callable by Predicate contract + * who will invoke it when attempting to exit with metadata + */ + function setTokenMetadata(uint256 tokenId, bytes calldata data) external override only(PREDICATE_ROLE) { + // This function should decode metadata obtained from L2 + // and attempt to set it for this `tokenId` + // + // Following is just a default implementation, feel + // free to define your own encoding/ decoding scheme + // for L2 -> L1 token metadata transfer + string memory uri = abi.decode(data, (string)); + + _setTokenURI(tokenId, uri); + } + + function _msgSender() + internal + override + view + returns (address payable sender) + { + return ContextMixin.msgSender(); + } +} diff --git a/contracts/Libraries/matic/root/RootToken/DummyMintableERC1155.sol b/contracts/Libraries/matic/root/RootToken/DummyMintableERC1155.sol new file mode 100644 index 0000000..da4ec9e --- /dev/null +++ b/contracts/Libraries/matic/root/RootToken/DummyMintableERC1155.sol @@ -0,0 +1,52 @@ +pragma solidity 0.6.6; + +import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; +import {IMintableERC1155} from "./IMintableERC1155.sol"; +import {NativeMetaTransaction} from "../../common/NativeMetaTransaction.sol"; +import {ContextMixin} from "../../common/ContextMixin.sol"; +import {AccessControlMixin} from "../../common/AccessControlMixin.sol"; + +contract DummyMintableERC1155 is + ERC1155, + AccessControlMixin, + NativeMetaTransaction, + ContextMixin, + IMintableERC1155 +{ + bytes32 public constant PREDICATE_ROLE = keccak256("PREDICATE_ROLE"); + + constructor(string memory uri_) public ERC1155(uri_) { + _setupContractId("DummyMintableERC1155"); + _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); + _setupRole(PREDICATE_ROLE, _msgSender()); + + _initializeEIP712(uri_); + } + + function mint( + address account, + uint256 id, + uint256 amount, + bytes calldata data + ) external override only(PREDICATE_ROLE) { + _mint(account, id, amount, data); + } + + function mintBatch( + address to, + uint256[] calldata ids, + uint256[] calldata amounts, + bytes calldata data + ) external override only(PREDICATE_ROLE) { + _mintBatch(to, ids, amounts, data); + } + + function _msgSender() + internal + override + view + returns (address payable sender) + { + return ContextMixin.msgSender(); + } +} diff --git a/contracts/Libraries/matic/root/RootToken/DummyMintableERC20.sol b/contracts/Libraries/matic/root/RootToken/DummyMintableERC20.sol new file mode 100644 index 0000000..9963bd7 --- /dev/null +++ b/contracts/Libraries/matic/root/RootToken/DummyMintableERC20.sol @@ -0,0 +1,45 @@ +pragma solidity 0.6.6; + +import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; +import {IMintableERC20} from "./IMintableERC20.sol"; +import {NativeMetaTransaction} from "../../common/NativeMetaTransaction.sol"; +import {ContextMixin} from "../../common/ContextMixin.sol"; +import {AccessControlMixin} from "../../common/AccessControlMixin.sol"; + +contract DummyMintableERC20 is + ERC20, + AccessControlMixin, + NativeMetaTransaction, + ContextMixin, + IMintableERC20 +{ + bytes32 public constant PREDICATE_ROLE = keccak256("PREDICATE_ROLE"); + + constructor(string memory name_, string memory symbol_) + public + ERC20(name_, symbol_) + { + _setupContractId("DummyMintableERC20"); + _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); + _setupRole(PREDICATE_ROLE, _msgSender()); + + _mint(_msgSender(), 10**10 * (10**18)); + _initializeEIP712(name_); + } + + /** + * @dev See {IMintableERC20-mint}. + */ + function mint(address user, uint256 amount) external override only(PREDICATE_ROLE) { + _mint(user, amount); + } + + function _msgSender() + internal + override + view + returns (address payable sender) + { + return ContextMixin.msgSender(); + } +} diff --git a/contracts/Libraries/matic/root/RootToken/DummyMintableERC721.sol b/contracts/Libraries/matic/root/RootToken/DummyMintableERC721.sol new file mode 100644 index 0000000..19d1abb --- /dev/null +++ b/contracts/Libraries/matic/root/RootToken/DummyMintableERC721.sol @@ -0,0 +1,79 @@ +pragma solidity 0.6.6; + +import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol"; +import {AccessControlMixin} from "../../common/AccessControlMixin.sol"; +import {NativeMetaTransaction} from "../../common/NativeMetaTransaction.sol"; +import {IMintableERC721} from "./IMintableERC721.sol"; +import {ContextMixin} from "../../common/ContextMixin.sol"; + +contract DummyMintableERC721 is + ERC721, + AccessControlMixin, + NativeMetaTransaction, + IMintableERC721, + ContextMixin +{ + bytes32 public constant PREDICATE_ROLE = keccak256("PREDICATE_ROLE"); + constructor(string memory name_, string memory symbol_) + public + ERC721(name_, symbol_) + { + _setupContractId("DummyMintableERC721"); + _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); + _setupRole(PREDICATE_ROLE, _msgSender()); + _initializeEIP712(name_); + } + + function _msgSender() + internal + override + view + returns (address payable sender) + { + return ContextMixin.msgSender(); + } + + /** + * @dev See {IMintableERC721-mint}. + */ + function mint(address user, uint256 tokenId) external override only(PREDICATE_ROLE) { + _mint(user, tokenId); + } + + /** + * If you're attempting to bring metadata associated with token + * from L2 to L1, you must implement this method, to be invoked + * when minting token back on L1, during exit + */ + function setTokenMetadata(uint256 tokenId, bytes memory data) internal virtual { + // This function should decode metadata obtained from L2 + // and attempt to set it for this `tokenId` + // + // Following is just a default implementation, feel + // free to define your own encoding/ decoding scheme + // for L2 -> L1 token metadata transfer + string memory uri = abi.decode(data, (string)); + + _setTokenURI(tokenId, uri); + } + + /** + * @dev See {IMintableERC721-mint}. + * + * If you're attempting to bring metadata associated with token + * from L2 to L1, you must implement this method + */ + function mint(address user, uint256 tokenId, bytes calldata metaData) external override only(PREDICATE_ROLE) { + _mint(user, tokenId); + + setTokenMetadata(tokenId, metaData); + } + + + /** + * @dev See {IMintableERC721-exists}. + */ + function exists(uint256 tokenId) external view override returns (bool) { + return _exists(tokenId); + } +} diff --git a/contracts/Libraries/matic/root/RootToken/IMintableERC1155.sol b/contracts/Libraries/matic/root/RootToken/IMintableERC1155.sol new file mode 100644 index 0000000..7cf8b1d --- /dev/null +++ b/contracts/Libraries/matic/root/RootToken/IMintableERC1155.sol @@ -0,0 +1,29 @@ +import {IERC1155} from "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; + +pragma solidity 0.6.6; + +interface IMintableERC1155 is IERC1155 { + /** + * @notice Creates `amount` tokens of token type `id`, and assigns them to `account`. + * @dev Should be callable only by MintableERC1155Predicate + * Make sure minting is done only by this function + * @param account user address for whom token is being minted + * @param id token which is being minted + * @param amount amount of token being minted + * @param data extra byte data to be accompanied with minted tokens + */ + function mint(address account, uint256 id, uint256 amount, bytes calldata data) external; + + /** + * @notice Batched version of singular token minting, where + * for each token in `ids` respective amount to be minted from `amounts` + * array, for address `to`. + * @dev Should be callable only by MintableERC1155Predicate + * Make sure minting is done only by this function + * @param to user address for whom token is being minted + * @param ids tokens which are being minted + * @param amounts amount of each token being minted + * @param data extra byte data to be accompanied with minted tokens + */ + function mintBatch(address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data) external; +} diff --git a/contracts/Libraries/matic/root/RootToken/IMintableERC20.sol b/contracts/Libraries/matic/root/RootToken/IMintableERC20.sol new file mode 100644 index 0000000..bcae361 --- /dev/null +++ b/contracts/Libraries/matic/root/RootToken/IMintableERC20.sol @@ -0,0 +1,14 @@ +import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; + +pragma solidity 0.6.6; + +interface IMintableERC20 is IERC20 { + /** + * @notice called by predicate contract to mint tokens while withdrawing + * @dev Should be callable only by MintableERC20Predicate + * Make sure minting is done only by this function + * @param user user address for whom token is being minted + * @param amount amount of token being minted + */ + function mint(address user, uint256 amount) external; +} diff --git a/contracts/Libraries/matic/root/RootToken/IMintableERC721.sol b/contracts/Libraries/matic/root/RootToken/IMintableERC721.sol new file mode 100644 index 0000000..b150d71 --- /dev/null +++ b/contracts/Libraries/matic/root/RootToken/IMintableERC721.sol @@ -0,0 +1,34 @@ +import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol"; + +pragma solidity 0.6.6; + +interface IMintableERC721 is IERC721 { + /** + * @notice called by predicate contract to mint tokens while withdrawing + * @dev Should be callable only by MintableERC721Predicate + * Make sure minting is done only by this function + * @param user user address for whom token is being minted + * @param tokenId tokenId being minted + */ + function mint(address user, uint256 tokenId) external; + + /** + * @notice called by predicate contract to mint tokens while withdrawing with metadata from L2 + * @dev Should be callable only by MintableERC721Predicate + * Make sure minting is only done either by this function/ 👆 + * @param user user address for whom token is being minted + * @param tokenId tokenId being minted + * @param metaData Associated token metadata, to be decoded & set using `setTokenMetadata` + * + * Note : If you're interested in taking token metadata from L2 to L1 during exit, you must + * implement this method + */ + function mint(address user, uint256 tokenId, bytes calldata metaData) external; + + /** + * @notice check if token already exists, return true if it does exist + * @dev this check will be used by the predicate to determine if the token needs to be minted or transfered + * @param tokenId tokenId being checked + */ + function exists(uint256 tokenId) external view returns (bool); +} diff --git a/contracts/Libraries/matic/root/RootToken/IRootERC721.sol b/contracts/Libraries/matic/root/RootToken/IRootERC721.sol new file mode 100644 index 0000000..99f275f --- /dev/null +++ b/contracts/Libraries/matic/root/RootToken/IRootERC721.sol @@ -0,0 +1,12 @@ +import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol"; + +pragma solidity 0.6.6; + +interface IRootERC721 is IERC721 { + + // Make sure you implement this method is root ERC721 + // contract when you're interested in transferring + // metadata from L2 to L1 + function setTokenMetadata(uint256 tokenId, bytes calldata data) external; + +} diff --git a/contracts/Libraries/matic/root/StateSender/DummyStateSender.sol b/contracts/Libraries/matic/root/StateSender/DummyStateSender.sol new file mode 100644 index 0000000..9f758cb --- /dev/null +++ b/contracts/Libraries/matic/root/StateSender/DummyStateSender.sol @@ -0,0 +1,31 @@ +pragma solidity 0.6.6; + +import {IStateSender} from "../StateSender/IStateSender.sol"; + +/** +* @notice Dummy State Sender contract to simulate plasma state sender while testing +*/ +contract DummyStateSender is IStateSender { + /** + * @notice Event emitted when when syncState is called + * @dev Heimdall bridge listens to this event and sends the data to receiver contract on child chain + * @param id Id of the sync, increamented for each event in case of actual state sender contract + * @param contractAddress the contract receiving data on child chain + * @param data bytes data to be sent + */ + event StateSynced( + uint256 indexed id, + address indexed contractAddress, + bytes data + ); + + /** + * @notice called to send data to child chain + * @dev sender and receiver contracts need to be registered in case of actual state sender contract + * @param receiver the contract receiving data on child chain + * @param data bytes data to be sent + */ + function syncState(address receiver, bytes calldata data) external override { + emit StateSynced(1, receiver, data); + } +} diff --git a/contracts/Libraries/matic/root/StateSender/IStateSender.sol b/contracts/Libraries/matic/root/StateSender/IStateSender.sol new file mode 100644 index 0000000..11acc34 --- /dev/null +++ b/contracts/Libraries/matic/root/StateSender/IStateSender.sol @@ -0,0 +1,5 @@ +pragma solidity 0.6.6; + +interface IStateSender { + function syncState(address receiver, bytes calldata data) external; +} diff --git a/contracts/Libraries/matic/root/TokenPredicates/ERC1155Predicate.sol b/contracts/Libraries/matic/root/TokenPredicates/ERC1155Predicate.sol new file mode 100644 index 0000000..33691b2 --- /dev/null +++ b/contracts/Libraries/matic/root/TokenPredicates/ERC1155Predicate.sol @@ -0,0 +1,158 @@ +pragma solidity 0.6.6; + +import {IERC1155} from "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; +import {ERC1155Receiver} from "@openzeppelin/contracts/token/ERC1155/ERC1155Receiver.sol"; +import {AccessControlMixin} from "../../common/AccessControlMixin.sol"; +import {RLPReader} from "../../lib/RLPReader.sol"; +import {ITokenPredicate} from "./ITokenPredicate.sol"; +import {Initializable} from "../../common/Initializable.sol"; + +contract ERC1155Predicate is ITokenPredicate, ERC1155Receiver, AccessControlMixin, Initializable { + using RLPReader for bytes; + using RLPReader for RLPReader.RLPItem; + + bytes32 public constant MANAGER_ROLE = keccak256("MANAGER_ROLE"); + bytes32 public constant TOKEN_TYPE = keccak256("ERC1155"); + + // keccak256("TransferSingle(address,address,address,uint256,uint256)") + bytes32 public constant TRANSFER_SINGLE_EVENT_SIG = 0xc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62; + // keccak256("TransferBatch(address,address,address,uint256[],uint256[])") + bytes32 public constant TRANSFER_BATCH_EVENT_SIG = 0x4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb; + + event LockedBatchERC1155( + address indexed depositor, + address indexed depositReceiver, + address indexed rootToken, + uint256[] ids, + uint256[] amounts + ); + + constructor() public {} + + function initialize(address _owner) external initializer { + _setupContractId("ERC1155Predicate"); + _setupRole(DEFAULT_ADMIN_ROLE, _owner); + _setupRole(MANAGER_ROLE, _owner); + } + + /** + * @notice rejects single transfer + */ + function onERC1155Received( + address, + address, + uint256, + uint256, + bytes calldata + ) external override returns (bytes4) { + return 0; + } + + /** + * @notice accepts batch transfer + */ + function onERC1155BatchReceived( + address, + address, + uint256[] calldata, + uint256[] calldata, + bytes calldata + ) external override returns (bytes4) { + return ERC1155Receiver(0).onERC1155BatchReceived.selector; + } + + /** + * @notice Lock ERC1155 tokens for deposit, callable only by manager + * @param depositor Address who wants to deposit tokens + * @param depositReceiver Address (address) who wants to receive tokens on child chain + * @param rootToken Token which gets deposited + * @param depositData ABI encoded id array and amount array + */ + function lockTokens( + address depositor, + address depositReceiver, + address rootToken, + bytes calldata depositData + ) + external + override + only(MANAGER_ROLE) + { + // forcing batch deposit since supporting both single and batch deposit introduces too much complexity + ( + uint256[] memory ids, + uint256[] memory amounts, + bytes memory data + ) = abi.decode(depositData, (uint256[], uint256[], bytes)); + emit LockedBatchERC1155( + depositor, + depositReceiver, + rootToken, + ids, + amounts + ); + IERC1155(rootToken).safeBatchTransferFrom( + depositor, + address(this), + ids, + amounts, + data + ); + } + + /** + * @notice Validates log signature, from and to address + * then sends the correct tokenId, amount to withdrawer + * callable only by manager + * @param rootToken Token which gets withdrawn + * @param log Valid ERC1155 TransferSingle burn or TransferBatch burn log from child chain + */ + function exitTokens( + address, + address rootToken, + bytes memory log + ) + public + override + only(MANAGER_ROLE) + { + RLPReader.RLPItem[] memory logRLPList = log.toRlpItem().toList(); + RLPReader.RLPItem[] memory logTopicRLPList = logRLPList[1].toList(); // topics + bytes memory logData = logRLPList[2].toBytes(); + + address withdrawer = address(logTopicRLPList[2].toUint()); // topic2 is from address + + require( + address(logTopicRLPList[3].toUint()) == address(0), // topic3 is to address + "ERC1155Predicate: INVALID_RECEIVER" + ); + + if (bytes32(logTopicRLPList[0].toUint()) == TRANSFER_SINGLE_EVENT_SIG) { // topic0 is event sig + (uint256 id, uint256 amount) = abi.decode( + logData, + (uint256, uint256) + ); + IERC1155(rootToken).safeTransferFrom( + address(this), + withdrawer, + id, + amount, + bytes("") + ); + } else if (bytes32(logTopicRLPList[0].toUint()) == TRANSFER_BATCH_EVENT_SIG) { + (uint256[] memory ids, uint256[] memory amounts) = abi.decode( + logData, + (uint256[], uint256[]) + ); + IERC1155(rootToken).safeBatchTransferFrom( + address(this), + withdrawer, + ids, + amounts, + bytes("") + ); + } else { + revert("ERC1155Predicate: INVALID_WITHDRAW_SIG"); + } + } +} diff --git a/contracts/Libraries/matic/root/TokenPredicates/ERC1155PredicateProxy.sol b/contracts/Libraries/matic/root/TokenPredicates/ERC1155PredicateProxy.sol new file mode 100644 index 0000000..2afdbc8 --- /dev/null +++ b/contracts/Libraries/matic/root/TokenPredicates/ERC1155PredicateProxy.sol @@ -0,0 +1,10 @@ +pragma solidity 0.6.6; + +import {UpgradableProxy} from "../../common/Proxy/UpgradableProxy.sol"; + +contract ERC1155PredicateProxy is UpgradableProxy { + constructor(address _proxyTo) + public + UpgradableProxy(_proxyTo) + {} +} diff --git a/contracts/Libraries/matic/root/TokenPredicates/ERC20Predicate.sol b/contracts/Libraries/matic/root/TokenPredicates/ERC20Predicate.sol new file mode 100644 index 0000000..e6c2ac8 --- /dev/null +++ b/contracts/Libraries/matic/root/TokenPredicates/ERC20Predicate.sol @@ -0,0 +1,92 @@ +pragma solidity 0.6.6; + +import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; +import {AccessControlMixin} from "../../common/AccessControlMixin.sol"; +import {RLPReader} from "../../lib/RLPReader.sol"; +import {ITokenPredicate} from "./ITokenPredicate.sol"; +import {Initializable} from "../../common/Initializable.sol"; + +contract ERC20Predicate is ITokenPredicate, AccessControlMixin, Initializable { + using RLPReader for bytes; + using RLPReader for RLPReader.RLPItem; + using SafeERC20 for IERC20; + + bytes32 public constant MANAGER_ROLE = keccak256("MANAGER_ROLE"); + bytes32 public constant TOKEN_TYPE = keccak256("ERC20"); + bytes32 public constant TRANSFER_EVENT_SIG = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef; + + event LockedERC20( + address indexed depositor, + address indexed depositReceiver, + address indexed rootToken, + uint256 amount + ); + + constructor() public {} + + function initialize(address _owner) external initializer { + _setupContractId("ERC20Predicate"); + _setupRole(DEFAULT_ADMIN_ROLE, _owner); + _setupRole(MANAGER_ROLE, _owner); + } + + /** + * @notice Lock ERC20 tokens for deposit, callable only by manager + * @param depositor Address who wants to deposit tokens + * @param depositReceiver Address (address) who wants to receive tokens on child chain + * @param rootToken Token which gets deposited + * @param depositData ABI encoded amount + */ + function lockTokens( + address depositor, + address depositReceiver, + address rootToken, + bytes calldata depositData + ) + external + override + only(MANAGER_ROLE) + { + uint256 amount = abi.decode(depositData, (uint256)); + emit LockedERC20(depositor, depositReceiver, rootToken, amount); + IERC20(rootToken).safeTransferFrom(depositor, address(this), amount); + } + + /** + * @notice Validates log signature, from and to address + * then sends the correct amount to withdrawer + * callable only by manager + * @param rootToken Token which gets withdrawn + * @param log Valid ERC20 burn log from child chain + */ + function exitTokens( + address, + address rootToken, + bytes memory log + ) + public + override + only(MANAGER_ROLE) + { + RLPReader.RLPItem[] memory logRLPList = log.toRlpItem().toList(); + RLPReader.RLPItem[] memory logTopicRLPList = logRLPList[1].toList(); // topics + + require( + bytes32(logTopicRLPList[0].toUint()) == TRANSFER_EVENT_SIG, // topic0 is event sig + "ERC20Predicate: INVALID_SIGNATURE" + ); + + address withdrawer = address(logTopicRLPList[1].toUint()); // topic1 is from address + + require( + address(logTopicRLPList[2].toUint()) == address(0), // topic2 is to address + "ERC20Predicate: INVALID_RECEIVER" + ); + + IERC20(rootToken).safeTransfer( + withdrawer, + logRLPList[2].toUint() // log data field + ); + } +} diff --git a/contracts/Libraries/matic/root/TokenPredicates/ERC20PredicateProxy.sol b/contracts/Libraries/matic/root/TokenPredicates/ERC20PredicateProxy.sol new file mode 100644 index 0000000..5575f60 --- /dev/null +++ b/contracts/Libraries/matic/root/TokenPredicates/ERC20PredicateProxy.sol @@ -0,0 +1,10 @@ +pragma solidity 0.6.6; + +import {UpgradableProxy} from "../../common/Proxy/UpgradableProxy.sol"; + +contract ERC20PredicateProxy is UpgradableProxy { + constructor(address _proxyTo) + public + UpgradableProxy(_proxyTo) + {} +} diff --git a/contracts/Libraries/matic/root/TokenPredicates/ERC721Predicate.sol b/contracts/Libraries/matic/root/TokenPredicates/ERC721Predicate.sol new file mode 100644 index 0000000..97082e6 --- /dev/null +++ b/contracts/Libraries/matic/root/TokenPredicates/ERC721Predicate.sol @@ -0,0 +1,165 @@ +pragma solidity 0.6.6; + +import {IRootERC721} from "../RootToken/IRootERC721.sol"; +import {IERC721Receiver} from "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; +import {RLPReader} from "../../lib/RLPReader.sol"; +import {ITokenPredicate} from "./ITokenPredicate.sol"; +import {Initializable} from "../../common/Initializable.sol"; +import {AccessControlMixin} from "../../common/AccessControlMixin.sol"; + +contract ERC721Predicate is ITokenPredicate, AccessControlMixin, Initializable, IERC721Receiver { + using RLPReader for bytes; + using RLPReader for RLPReader.RLPItem; + + bytes32 public constant MANAGER_ROLE = keccak256("MANAGER_ROLE"); + bytes32 public constant TOKEN_TYPE = keccak256("ERC721"); + // keccak256("Transfer(address,address,uint256)") + bytes32 public constant TRANSFER_EVENT_SIG = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef; + // keccak256("WithdrawnBatch(address,uint256[])") + bytes32 public constant WITHDRAW_BATCH_EVENT_SIG = 0xf871896b17e9cb7a64941c62c188a4f5c621b86800e3d15452ece01ce56073df; + // keccak256("TransferWithMetadata(address,address,uint256,bytes)") + bytes32 public constant TRANSFER_WITH_METADATA_EVENT_SIG = 0xf94915c6d1fd521cee85359239227480c7e8776d7caf1fc3bacad5c269b66a14; + + // limit batching of tokens due to gas limit restrictions + uint256 public constant BATCH_LIMIT = 20; + + event LockedERC721( + address indexed depositor, + address indexed depositReceiver, + address indexed rootToken, + uint256 tokenId + ); + event LockedERC721Batch( + address indexed depositor, + address indexed depositReceiver, + address indexed rootToken, + uint256[] tokenIds + ); + + constructor() public {} + + function initialize(address _owner) external initializer { + _setupContractId("ERC721Predicate"); + _setupRole(DEFAULT_ADMIN_ROLE, _owner); + _setupRole(MANAGER_ROLE, _owner); + } + + /** + * @notice accepts safe ERC721 transfer + */ + function onERC721Received( + address, + address, + uint256, + bytes calldata + ) + external + override + returns (bytes4) + { + return IERC721Receiver.onERC721Received.selector; + } + + /** + * @notice Lock ERC721 tokens for deposit, callable only by manager + * @param depositor Address who wants to deposit token + * @param depositReceiver Address (address) who wants to receive token on child chain + * @param rootToken Token which gets deposited + * @param depositData ABI encoded tokenId + */ + function lockTokens( + address depositor, + address depositReceiver, + address rootToken, + bytes calldata depositData + ) + external + override + only(MANAGER_ROLE) + { + // deposit single + if (depositData.length == 32) { + uint256 tokenId = abi.decode(depositData, (uint256)); + emit LockedERC721(depositor, depositReceiver, rootToken, tokenId); + IRootERC721(rootToken).safeTransferFrom(depositor, address(this), tokenId); + + // deposit batch + } else { + uint256[] memory tokenIds = abi.decode(depositData, (uint256[])); + emit LockedERC721Batch(depositor, depositReceiver, rootToken, tokenIds); + uint256 length = tokenIds.length; + require(length <= BATCH_LIMIT, "ERC721Predicate: EXCEEDS_BATCH_LIMIT"); + for (uint256 i; i < length; i++) { + IRootERC721(rootToken).safeTransferFrom(depositor, address(this), tokenIds[i]); + } + } + } + + /** + * @notice Validates log signature, from and to address + * then sends the correct tokenId to withdrawer + * callable only by manager + * @param rootToken Token which gets withdrawn + * @param log Valid ERC721 burn log from child chain + */ + function exitTokens( + address, + address rootToken, + bytes memory log + ) + public + override + only(MANAGER_ROLE) + { + RLPReader.RLPItem[] memory logRLPList = log.toRlpItem().toList(); + RLPReader.RLPItem[] memory logTopicRLPList = logRLPList[1].toList(); // topics + address withdrawer = address(logTopicRLPList[1].toUint()); // topic1 is from address + + if (bytes32(logTopicRLPList[0].toUint()) == TRANSFER_EVENT_SIG) { // topic0 is event sig + require( + address(logTopicRLPList[2].toUint()) == address(0), // topic2 is to address + "ERC721Predicate: INVALID_RECEIVER" + ); + + IRootERC721(rootToken).safeTransferFrom( + address(this), + withdrawer, + logTopicRLPList[3].toUint() // topic3 is tokenId field + ); + + } else if (bytes32(logTopicRLPList[0].toUint()) == WITHDRAW_BATCH_EVENT_SIG) { // topic0 is event sig + bytes memory logData = logRLPList[2].toBytes(); + (uint256[] memory tokenIds) = abi.decode(logData, (uint256[])); // data is tokenId list + uint256 length = tokenIds.length; + for (uint256 i; i < length; i++) { + IRootERC721(rootToken).safeTransferFrom(address(this), withdrawer, tokenIds[i]); + } + + } else if (bytes32(logTopicRLPList[0].toUint()) == TRANSFER_WITH_METADATA_EVENT_SIG) { + // If this is when NFT exit is done with arbitrary metadata on L2 + + require( + address(logTopicRLPList[2].toUint()) == address(0), // topic2 is to address + "ERC721Predicate: INVALID_RECEIVER" + ); + + IRootERC721 token = IRootERC721(rootToken); + uint256 tokenId = logTopicRLPList[3].toUint(); // topic3 is tokenId field + + token.safeTransferFrom(address(this), withdrawer, tokenId); + // This function will be invoked for passing arbitrary + // metadata, obtained from event emitted in L2, to + // L1 ERC721, so that it can decode & do further processing + // + // @note Make sure you've implemented this method + // if you're interested in exiting with metadata + bytes memory logData = logRLPList[2].toBytes(); + bytes memory metaData = abi.decode(logData, (bytes)); + + token.setTokenMetadata(tokenId, metaData); + + } else { + revert("ERC721Predicate: INVALID_SIGNATURE"); + } + } +} diff --git a/contracts/Libraries/matic/root/TokenPredicates/ERC721PredicateProxy.sol b/contracts/Libraries/matic/root/TokenPredicates/ERC721PredicateProxy.sol new file mode 100644 index 0000000..cbb88de --- /dev/null +++ b/contracts/Libraries/matic/root/TokenPredicates/ERC721PredicateProxy.sol @@ -0,0 +1,10 @@ +pragma solidity 0.6.6; + +import {UpgradableProxy} from "../../common/Proxy/UpgradableProxy.sol"; + +contract ERC721PredicateProxy is UpgradableProxy { + constructor(address _proxyTo) + public + UpgradableProxy(_proxyTo) + {} +} diff --git a/contracts/Libraries/matic/root/TokenPredicates/EtherPredicate.sol b/contracts/Libraries/matic/root/TokenPredicates/EtherPredicate.sol new file mode 100644 index 0000000..63c7e7c --- /dev/null +++ b/contracts/Libraries/matic/root/TokenPredicates/EtherPredicate.sol @@ -0,0 +1,94 @@ +pragma solidity 0.6.6; + +import {AccessControlMixin} from "../../common/AccessControlMixin.sol"; +import {RLPReader} from "../../lib/RLPReader.sol"; +import {ITokenPredicate} from "./ITokenPredicate.sol"; +import {Initializable} from "../../common/Initializable.sol"; + +contract EtherPredicate is ITokenPredicate, AccessControlMixin, Initializable { + using RLPReader for bytes; + using RLPReader for RLPReader.RLPItem; + + bytes32 public constant MANAGER_ROLE = keccak256("MANAGER_ROLE"); + bytes32 public constant TOKEN_TYPE = keccak256("Ether"); + bytes32 public constant TRANSFER_EVENT_SIG = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef; + + event LockedEther( + address indexed depositor, + address indexed depositReceiver, + uint256 amount + ); + + event ExitedEther( + address indexed exitor, + uint256 amount + ); + + constructor() public {} + + function initialize(address _owner) external initializer { + _setupContractId("EtherPredicate"); + _setupRole(DEFAULT_ADMIN_ROLE, _owner); + _setupRole(MANAGER_ROLE, _owner); + } + + /** + * @notice Receive Ether to lock for deposit, callable only by manager + */ + receive() external payable only(MANAGER_ROLE) {} + + /** + * @notice handle ether lock, callable only by manager + * @param depositor Address who wants to deposit tokens + * @param depositReceiver Address (address) who wants to receive tokens on child chain + * @param depositData ABI encoded amount + */ + function lockTokens( + address depositor, + address depositReceiver, + address, + bytes calldata depositData + ) + external + override + only(MANAGER_ROLE) + { + uint256 amount = abi.decode(depositData, (uint256)); + emit LockedEther(depositor, depositReceiver, amount); + } + + /** + * @notice Validates log signature, from and to address + * then sends the correct amount to withdrawer + * callable only by manager + * @param log Valid ERC20 burn log from child chain + */ + function exitTokens( + address, + address, + bytes memory log + ) + public + override + only(MANAGER_ROLE) + { + RLPReader.RLPItem[] memory logRLPList = log.toRlpItem().toList(); + RLPReader.RLPItem[] memory logTopicRLPList = logRLPList[1].toList(); // topics + + require( + bytes32(logTopicRLPList[0].toUint()) == TRANSFER_EVENT_SIG, // topic0 is event sig + "EtherPredicate: INVALID_SIGNATURE" + ); + + address withdrawer = address(logTopicRLPList[1].toUint()); // topic1 is from address + + require( + address(logTopicRLPList[2].toUint()) == address(0), // topic2 is to address + "EtherPredicate: INVALID_RECEIVER" + ); + + emit ExitedEther(withdrawer, logRLPList[2].toUint()); + + payable(withdrawer).transfer(logRLPList[2].toUint()); + } +} diff --git a/contracts/Libraries/matic/root/TokenPredicates/EtherPredicateProxy.sol b/contracts/Libraries/matic/root/TokenPredicates/EtherPredicateProxy.sol new file mode 100644 index 0000000..be26fd8 --- /dev/null +++ b/contracts/Libraries/matic/root/TokenPredicates/EtherPredicateProxy.sol @@ -0,0 +1,10 @@ +pragma solidity 0.6.6; + +import {UpgradableProxy} from "../../common/Proxy/UpgradableProxy.sol"; + +contract EtherPredicateProxy is UpgradableProxy { + constructor(address _proxyTo) + public + UpgradableProxy(_proxyTo) + {} +} diff --git a/contracts/Libraries/matic/root/TokenPredicates/ITokenPredicate.sol b/contracts/Libraries/matic/root/TokenPredicates/ITokenPredicate.sol new file mode 100644 index 0000000..bce6a10 --- /dev/null +++ b/contracts/Libraries/matic/root/TokenPredicates/ITokenPredicate.sol @@ -0,0 +1,37 @@ +pragma solidity 0.6.6; + +import {RLPReader} from "../../lib/RLPReader.sol"; + +/// @title Token predicate interface for all pos portal predicates +/// @notice Abstract interface that defines methods for custom predicates +interface ITokenPredicate { + + /** + * @notice Deposit tokens into pos portal + * @dev When `depositor` deposits tokens into pos portal, tokens get locked into predicate contract. + * @param depositor Address who wants to deposit tokens + * @param depositReceiver Address (address) who wants to receive tokens on side chain + * @param rootToken Token which gets deposited + * @param depositData Extra data for deposit (amount for ERC20, token id for ERC721 etc.) [ABI encoded] + */ + function lockTokens( + address depositor, + address depositReceiver, + address rootToken, + bytes calldata depositData + ) external; + + /** + * @notice Validates and processes exit while withdraw process + * @dev Validates exit log emitted on sidechain. Reverts if validation fails. + * @dev Processes withdraw based on custom logic. Example: transfer ERC20/ERC721, mint ERC721 if mintable withdraw + * @param sender Address + * @param rootToken Token which gets withdrawn + * @param logRLPList Valid sidechain log for data like amount, token id etc. + */ + function exitTokens( + address sender, + address rootToken, + bytes calldata logRLPList + ) external; +} diff --git a/contracts/Libraries/matic/root/TokenPredicates/MintableERC1155Predicate.sol b/contracts/Libraries/matic/root/TokenPredicates/MintableERC1155Predicate.sol new file mode 100644 index 0000000..b67e599 --- /dev/null +++ b/contracts/Libraries/matic/root/TokenPredicates/MintableERC1155Predicate.sol @@ -0,0 +1,279 @@ +pragma solidity 0.6.6; + +import {IMintableERC1155} from "../RootToken/IMintableERC1155.sol"; +import { + ERC1155Receiver +} from "@openzeppelin/contracts/token/ERC1155/ERC1155Receiver.sol"; +import {AccessControlMixin} from "../../common/AccessControlMixin.sol"; +import {RLPReader} from "../../lib/RLPReader.sol"; +import {ITokenPredicate} from "./ITokenPredicate.sol"; +import {Initializable} from "../../common/Initializable.sol"; + +contract MintableERC1155Predicate is + ITokenPredicate, + ERC1155Receiver, + AccessControlMixin, + Initializable +{ + using RLPReader for bytes; + using RLPReader for RLPReader.RLPItem; + + bytes32 public constant MANAGER_ROLE = keccak256("MANAGER_ROLE"); + bytes32 public constant TOKEN_TYPE = keccak256("MintableERC1155"); + + bytes32 public constant TRANSFER_SINGLE_EVENT_SIG = keccak256( + "TransferSingle(address,address,address,uint256,uint256)" + ); + bytes32 public constant TRANSFER_BATCH_EVENT_SIG = keccak256( + "TransferBatch(address,address,address,uint256[],uint256[])" + ); + + event LockedBatchMintableERC1155( + address indexed depositor, + address indexed depositReceiver, + address indexed rootToken, + uint256[] ids, + uint256[] amounts + ); + + constructor() public {} + + function initialize(address _owner) external initializer { + _setupContractId("MintableERC1155Predicate"); + _setupRole(DEFAULT_ADMIN_ROLE, _owner); + _setupRole(MANAGER_ROLE, _owner); + } + + /** + * @notice rejects single transfer + */ + function onERC1155Received( + address, + address, + uint256, + uint256, + bytes calldata + ) external override returns (bytes4) { + return 0; + } + + /** + * @notice accepts batch transfer + */ + function onERC1155BatchReceived( + address, + address, + uint256[] calldata, + uint256[] calldata, + bytes calldata + ) external override returns (bytes4) { + return ERC1155Receiver(0).onERC1155BatchReceived.selector; + } + + /** + * @notice Lock ERC1155 tokens for deposit, callable only by manager + * @param depositor Address who wants to deposit tokens + * @param depositReceiver Address (address) who wants to receive tokens on child chain + * @param rootToken Token which gets deposited + * @param depositData ABI encoded id array and amount array + */ + function lockTokens( + address depositor, + address depositReceiver, + address rootToken, + bytes calldata depositData + ) external override only(MANAGER_ROLE) { + // forcing batch deposit since supporting both single and batch deposit introduces too much complexity + ( + uint256[] memory ids, + uint256[] memory amounts, + bytes memory data + ) = abi.decode(depositData, (uint256[], uint256[], bytes)); + + emit LockedBatchMintableERC1155( + depositor, + depositReceiver, + rootToken, + ids, + amounts + ); + IMintableERC1155(rootToken).safeBatchTransferFrom( + depositor, + address(this), + ids, + amounts, + data + ); + } + + // Used when attempting to exit with single token, single amount/ id is converted into + // slice of amounts/ ids + // Generally size is going to be `1` i.e. single element array, but it's kept generic + function makeArrayWithValue(uint256 val, uint size) internal pure returns(uint256[] memory) { + require( + size > 0, + "MintableERC1155Predicate: Invalid resulting array length" + ); + + uint256[] memory vals = new uint256[](size); + + for (uint256 i = 0; i < size; i++) { + vals[i] = val; + } + + return vals; + } + + /** + * @notice Creates an array of `size` by repeating provided address, + * to be required for passing to batch balance checking function of ERC1155 tokens. + * @param addr Address to be repeated `size` times in resulting array + * @param size Size of resulting array + */ + function makeArrayWithAddress(address addr, uint256 size) + internal + pure + returns (address[] memory) + { + require( + addr != address(0), + "MintableERC1155Predicate: Invalid address" + ); + require( + size > 0, + "MintableERC1155Predicate: Invalid resulting array length" + ); + + address[] memory addresses = new address[](size); + + for (uint256 i = 0; i < size; i++) { + addresses[i] = addr; + } + + return addresses; + } + + /** + * @notice Calculates amount of tokens to be minted, by subtracting available + * token balances from amount of tokens to be exited + * @param tokenBalances Token balances this contract holds for some ordered token ids + * @param amountsToBeExited Amount of tokens being exited + */ + function calculateAmountsToBeMinted( + uint256[] memory tokenBalances, + uint256[] memory amountsToBeExited + ) internal pure returns (uint256[] memory) { + require( + tokenBalances.length == amountsToBeExited.length, + "MintableERC1155Predicate: Array length mismatch found" + ); + + uint256[] memory toBeMintedAmounts = new uint256[]( + tokenBalances.length + ); + + // Iteratively calculating amounts of token to be minted + // + // Please note, in some cases it can be 0, but that will not + // be a problem, due to implementation of mint logic for ERC1155 + for (uint256 i = 0; i < tokenBalances.length; i++) { + if (tokenBalances[i] < amountsToBeExited[i]) { + toBeMintedAmounts[i] = amountsToBeExited[i] - tokenBalances[i]; + } + } + + return toBeMintedAmounts; + } + + /** + * @notice Validates log signature, from and to address + * then sends the correct tokenId, amount to withdrawer + * callable only by manager + * @param rootToken Token which gets withdrawn + * @param log Valid ERC1155 TransferSingle burn or TransferBatch burn log from child chain + */ + function exitTokens( + address, + address rootToken, + bytes memory log + ) public override only(MANAGER_ROLE) { + RLPReader.RLPItem[] memory logRLPList = log.toRlpItem().toList(); + RLPReader.RLPItem[] memory logTopicRLPList = logRLPList[1].toList(); // topics + bytes memory logData = logRLPList[2].toBytes(); + + address withdrawer = address(logTopicRLPList[2].toUint()); // topic2 is from address + + require( + address(logTopicRLPList[3].toUint()) == address(0), // topic3 is to address + "MintableERC1155Predicate: INVALID_RECEIVER" + ); + + if (bytes32(logTopicRLPList[0].toUint()) == TRANSFER_SINGLE_EVENT_SIG) { + // topic0 is event sig + (uint256 id, uint256 amount) = abi.decode( + logData, + (uint256, uint256) + ); + + IMintableERC1155 token = IMintableERC1155(rootToken); + // Currently locked tokens for `id` in this contract + uint256 tokenBalance = token.balanceOf(address(this), id); + + // Checking whether MintableERC1155 contract has enough + // tokens locked in to transfer to withdrawer, if not + // it'll mint those tokens for this contract and return + // safely transfer those to withdrawer + if (tokenBalance < amount) { + // @notice We could have done `mint`, but that would require + // us implementing `onERC1155Received`, which we avoid intentionally + // for sake of only supporting batch deposit. + // + // Which is why this transfer is wrapped as single element batch minting + token.mintBatch(address(this), + makeArrayWithValue(id, 1), + makeArrayWithValue(amount - tokenBalance, 1), + bytes("")); + } + + token.safeTransferFrom( + address(this), + withdrawer, + id, + amount, + bytes("") + ); + } else if ( + bytes32(logTopicRLPList[0].toUint()) == TRANSFER_BATCH_EVENT_SIG + ) { + (uint256[] memory ids, uint256[] memory amounts) = abi.decode( + logData, + (uint256[], uint256[]) + ); + + IMintableERC1155 token = IMintableERC1155(rootToken); + + token.mintBatch( + address(this), + ids, + calculateAmountsToBeMinted( + token.balanceOfBatch( + makeArrayWithAddress(address(this), ids.length), + ids + ), + amounts + ), + bytes("") + ); + + IMintableERC1155(rootToken).safeBatchTransferFrom( + address(this), + withdrawer, + ids, + amounts, + bytes("") + ); + } else { + revert("MintableERC1155Predicate: INVALID_WITHDRAW_SIG"); + } + } +} diff --git a/contracts/Libraries/matic/root/TokenPredicates/MintableERC1155PredicateProxy.sol b/contracts/Libraries/matic/root/TokenPredicates/MintableERC1155PredicateProxy.sol new file mode 100644 index 0000000..1bbfb35 --- /dev/null +++ b/contracts/Libraries/matic/root/TokenPredicates/MintableERC1155PredicateProxy.sol @@ -0,0 +1,10 @@ +pragma solidity 0.6.6; + +import {UpgradableProxy} from "../../common/Proxy/UpgradableProxy.sol"; + +contract MintableERC1155PredicateProxy is UpgradableProxy { + constructor(address _proxyTo) + public + UpgradableProxy(_proxyTo) + {} +} diff --git a/contracts/Libraries/matic/root/TokenPredicates/MintableERC20Predicate.sol b/contracts/Libraries/matic/root/TokenPredicates/MintableERC20Predicate.sol new file mode 100644 index 0000000..c0f5aa0 --- /dev/null +++ b/contracts/Libraries/matic/root/TokenPredicates/MintableERC20Predicate.sol @@ -0,0 +1,104 @@ +pragma solidity 0.6.6; + +import {IMintableERC20} from "../RootToken/IMintableERC20.sol"; +import {AccessControlMixin} from "../../common/AccessControlMixin.sol"; +import {RLPReader} from "../../lib/RLPReader.sol"; +import {ITokenPredicate} from "./ITokenPredicate.sol"; +import {Initializable} from "../../common/Initializable.sol"; + +contract MintableERC20Predicate is + ITokenPredicate, + AccessControlMixin, + Initializable +{ + using RLPReader for bytes; + using RLPReader for RLPReader.RLPItem; + + bytes32 public constant MANAGER_ROLE = keccak256("MANAGER_ROLE"); + bytes32 public constant TOKEN_TYPE = keccak256("MintableERC20"); + bytes32 public constant TRANSFER_EVENT_SIG = keccak256( + "Transfer(address,address,uint256)" + ); + + event LockedMintableERC20( + address indexed depositor, + address indexed depositReceiver, + address indexed rootToken, + uint256 amount + ); + + constructor() public {} + + function initialize(address _owner) external initializer { + _setupContractId("MintableERC20Predicate"); + _setupRole(DEFAULT_ADMIN_ROLE, _owner); + _setupRole(MANAGER_ROLE, _owner); + } + + /** + * @notice Lock ERC20 tokens for deposit, callable only by manager + * @param depositor Address who wants to deposit tokens + * @param depositReceiver Address (address) who wants to receive tokens on child chain + * @param rootToken Token which gets deposited + * @param depositData ABI encoded amount + */ + function lockTokens( + address depositor, + address depositReceiver, + address rootToken, + bytes calldata depositData + ) external override only(MANAGER_ROLE) { + uint256 amount = abi.decode(depositData, (uint256)); + + emit LockedMintableERC20(depositor, depositReceiver, rootToken, amount); + IMintableERC20(rootToken).transferFrom( + depositor, + address(this), + amount + ); + } + + /** + * @notice Validates log signature, from and to address + * then sends the correct amount to withdrawer + * callable only by manager + * @param rootToken Token which gets withdrawn + * @param log Valid ERC20 burn log from child chain + */ + function exitTokens( + address, + address rootToken, + bytes memory log + ) public override only(MANAGER_ROLE) { + RLPReader.RLPItem[] memory logRLPList = log.toRlpItem().toList(); + RLPReader.RLPItem[] memory logTopicRLPList = logRLPList[1].toList(); // topics + + require( + bytes32(logTopicRLPList[0].toUint()) == TRANSFER_EVENT_SIG, // topic0 is `Transfer` event sig + "MintableERC20Predicate: INVALID_SIGNATURE" + ); + + address withdrawer = address(logTopicRLPList[1].toUint()); // topic1 is `from` address + + require( + address(logTopicRLPList[2].toUint()) == address(0), // topic2 is `to` address + "MintableERC20Predicate: INVALID_RECEIVER" + ); + + IMintableERC20 token = IMintableERC20(rootToken); + + uint256 tokenBalance = token.balanceOf(address(this)); + uint256 amount = logRLPList[2].toUint(); + + // Checking whether MintableERC20Predicate has enough balance + // to transfer `amount` to withdrawer or not + // + // If no, it'll mint those extra tokens & transfer `amount` + // to withdrawer + if (tokenBalance < amount) { + token.mint(address(this), amount - tokenBalance); + } + + token.transfer(withdrawer, amount); + } +} diff --git a/contracts/Libraries/matic/root/TokenPredicates/MintableERC20PredicateProxy.sol b/contracts/Libraries/matic/root/TokenPredicates/MintableERC20PredicateProxy.sol new file mode 100644 index 0000000..af0adeb --- /dev/null +++ b/contracts/Libraries/matic/root/TokenPredicates/MintableERC20PredicateProxy.sol @@ -0,0 +1,10 @@ +pragma solidity 0.6.6; + +import {UpgradableProxy} from "../../common/Proxy/UpgradableProxy.sol"; + +contract MintableERC20PredicateProxy is UpgradableProxy { + constructor(address _proxyTo) + public + UpgradableProxy(_proxyTo) + {} +} diff --git a/contracts/Libraries/matic/root/TokenPredicates/MintableERC721Predicate.sol b/contracts/Libraries/matic/root/TokenPredicates/MintableERC721Predicate.sol new file mode 100644 index 0000000..99a798e --- /dev/null +++ b/contracts/Libraries/matic/root/TokenPredicates/MintableERC721Predicate.sol @@ -0,0 +1,251 @@ +pragma solidity 0.6.6; + +import {IERC721Receiver} from "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; +import {AccessControlMixin} from "../../common/AccessControlMixin.sol"; +import {RLPReader} from "../../lib/RLPReader.sol"; +import {IMintableERC721} from "../RootToken/IMintableERC721.sol"; +import {ITokenPredicate} from "./ITokenPredicate.sol"; +import {Initializable} from "../../common/Initializable.sol"; + +contract MintableERC721Predicate is ITokenPredicate, AccessControlMixin, Initializable, IERC721Receiver { + using RLPReader for bytes; + using RLPReader for RLPReader.RLPItem; + + // keccak256("MANAGER_ROLE") + bytes32 public constant MANAGER_ROLE = 0x241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b08; + // keccak256("MintableERC721") + bytes32 public constant TOKEN_TYPE = 0xd4392723c111fcb98b073fe55873efb447bcd23cd3e49ec9ea2581930cd01ddc; + // keccak256("Transfer(address,address,uint256)") + bytes32 public constant TRANSFER_EVENT_SIG = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef; + // keccak256("WithdrawnBatch(address,uint256[])") + bytes32 public constant WITHDRAW_BATCH_EVENT_SIG = 0xf871896b17e9cb7a64941c62c188a4f5c621b86800e3d15452ece01ce56073df; + // keccak256("TransferWithMetadata(address,address,uint256,bytes)") + bytes32 public constant TRANSFER_WITH_METADATA_EVENT_SIG = 0xf94915c6d1fd521cee85359239227480c7e8776d7caf1fc3bacad5c269b66a14; + + // limit batching of tokens due to gas limit restrictions + uint256 public constant BATCH_LIMIT = 20; + + event LockedMintableERC721( + address indexed depositor, + address indexed depositReceiver, + address indexed rootToken, + uint256 tokenId + ); + + event LockedMintableERC721Batch( + address indexed depositor, + address indexed depositReceiver, + address indexed rootToken, + uint256[] tokenIds + ); + + constructor() public {} + + function initialize(address _owner) external initializer { + _setupContractId("MintableERC721Predicate"); + _setupRole(DEFAULT_ADMIN_ROLE, _owner); + _setupRole(MANAGER_ROLE, _owner); + } + + /** + * @notice accepts safe ERC721 transfer + */ + function onERC721Received( + address, + address, + uint256, + bytes calldata + ) + external + override + returns (bytes4) + { + return IERC721Receiver.onERC721Received.selector; + } + + /** + * @notice Lock ERC721 token(s) for deposit, callable only by manager + * @param depositor Address who wants to deposit token + * @param depositReceiver Address (address) who wants to receive token on child chain + * @param rootToken Token which gets deposited + * @param depositData ABI encoded tokenId(s). It's possible to deposit batch of tokens. + */ + function lockTokens( + address depositor, + address depositReceiver, + address rootToken, + bytes calldata depositData + ) + external + override + only(MANAGER_ROLE) + { + + // Locking single ERC721 token + if (depositData.length == 32) { + + uint256 tokenId = abi.decode(depositData, (uint256)); + + // Emitting event that single token is getting locked in predicate + emit LockedMintableERC721(depositor, depositReceiver, rootToken, tokenId); + + // Transferring token to this address, which will be + // released when attempted to be unlocked + IMintableERC721(rootToken).safeTransferFrom(depositor, address(this), tokenId); + + } else { + // Locking a set a ERC721 token(s) + + uint256[] memory tokenIds = abi.decode(depositData, (uint256[])); + + // Emitting event that a set of ERC721 tokens are getting lockec + // in this predicate contract + emit LockedMintableERC721Batch(depositor, depositReceiver, rootToken, tokenIds); + + // These many tokens are attempted to be deposited + // by user + uint256 length = tokenIds.length; + require(length <= BATCH_LIMIT, "MintableERC721Predicate: EXCEEDS_BATCH_LIMIT"); + + // Iteratively trying to transfer ERC721 token + // to this predicate address + for (uint256 i; i < length; i++) { + + IMintableERC721(rootToken).safeTransferFrom(depositor, address(this), tokenIds[i]); + + } + + } + + } + + /** + * @notice Validates log signature, from and to address + * then checks if token already exists on root chain + * if token exits then transfers it to withdrawer + * if token doesn't exit then it is minted + * callable only by manager + * @param rootToken Token which gets withdrawn + * @param log Valid ERC721 burn log from child chain + */ + function exitTokens( + address, + address rootToken, + bytes memory log + ) + public + override + only(MANAGER_ROLE) + { + RLPReader.RLPItem[] memory logRLPList = log.toRlpItem().toList(); + RLPReader.RLPItem[] memory logTopicRLPList = logRLPList[1].toList(); // topics + + // If it's a simple exit ( with out metadata coming from L2 to L1 ) + if(bytes32(logTopicRLPList[0].toUint()) == TRANSFER_EVENT_SIG) { + + address withdrawer = address(logTopicRLPList[1].toUint()); // topic1 is from address + + require( + address(logTopicRLPList[2].toUint()) == address(0), // topic2 is to address + "MintableERC721Predicate: INVALID_RECEIVER" + ); + + IMintableERC721 token = IMintableERC721(rootToken); + + uint256 tokenId = logTopicRLPList[3].toUint(); // topic3 is tokenId field + if (token.exists(tokenId)) { + token.safeTransferFrom( + address(this), + withdrawer, + tokenId + ); + } else { + token.mint(withdrawer, tokenId); + } + + } else if (bytes32(logTopicRLPList[0].toUint()) == WITHDRAW_BATCH_EVENT_SIG) { // topic0 is event sig + // If it's a simple batch exit, where a set of + // ERC721s were burnt in child chain with event signature + // looking like `WithdrawnBatch(address indexed user, uint256[] tokenIds);` + // + // @note This doesn't allow transfer of metadata cross chain + // For that check below `else if` block + + address withdrawer = address(logTopicRLPList[1].toUint()); // topic1 is from address + + // RLP encoded tokenId list + bytes memory logData = logRLPList[2].toBytes(); + + (uint256[] memory tokenIds) = abi.decode(logData, (uint256[])); + uint256 length = tokenIds.length; + + IMintableERC721 token = IMintableERC721(rootToken); + + for (uint256 i; i < length; i++) { + + uint256 tokenId = tokenIds[i]; + + // Check if token exists or not + // + // If does, transfer token to withdrawer + if (token.exists(tokenId)) { + token.safeTransferFrom( + address(this), + withdrawer, + tokenId + ); + } else { + // If token was minted on L2 + // we'll mint it here, on L1, during + // exiting from L2 + token.mint(withdrawer, tokenId); + } + + } + + } else if (bytes32(logTopicRLPList[0].toUint()) == TRANSFER_WITH_METADATA_EVENT_SIG) { + // If this is NFT exit with metadata i.e. URI 👆 + // + // Note: If your token is only minted in L2, you can exit + // it with metadata. But if it was minted on L1, it'll be + // simply transferred to withdrawer address. And in that case, + // it's lot better to exit with `Transfer(address,address,uint256)` + // i.e. calling `withdraw` method on L2 contract + // event signature proof, which is defined under first `if` clause + // + // If you've called `withdrawWithMetadata`, you should submit + // proof of event signature `TransferWithMetadata(address,address,uint256,bytes)` + + address withdrawer = address(logTopicRLPList[1].toUint()); // topic1 is from address + + require( + address(logTopicRLPList[2].toUint()) == address(0), // topic2 is to address + "MintableERC721Predicate: INVALID_RECEIVER" + ); + + IMintableERC721 token = IMintableERC721(rootToken); + + uint256 tokenId = logTopicRLPList[3].toUint(); // topic3 is tokenId field + if (token.exists(tokenId)) { + token.safeTransferFrom( + address(this), + withdrawer, + tokenId + ); + } else { + // Minting with metadata received from L2 i.e. emitted + // by event `TransferWithMetadata` during burning + bytes memory logData = logRLPList[2].toBytes(); + bytes memory metaData = abi.decode(logData, (bytes)); + + token.mint(withdrawer, tokenId, metaData); + } + + } else { + // Attempting to exit with some event signature from L2, which is + // not ( yet ) supported by L1 exit manager + revert("MintableERC721Predicate: INVALID_SIGNATURE"); + } + + } +} diff --git a/contracts/Libraries/matic/root/TokenPredicates/MintableERC721PredicateProxy.sol b/contracts/Libraries/matic/root/TokenPredicates/MintableERC721PredicateProxy.sol new file mode 100644 index 0000000..a8bf6f7 --- /dev/null +++ b/contracts/Libraries/matic/root/TokenPredicates/MintableERC721PredicateProxy.sol @@ -0,0 +1,10 @@ +pragma solidity 0.6.6; + +import {UpgradableProxy} from "../../common/Proxy/UpgradableProxy.sol"; + +contract MintableERC721PredicateProxy is UpgradableProxy { + constructor(address _proxyTo) + public + UpgradableProxy(_proxyTo) + {} +} diff --git a/contracts/Libraries/matic/test/MerklePatriciaTest.sol b/contracts/Libraries/matic/test/MerklePatriciaTest.sol new file mode 100644 index 0000000..611d225 --- /dev/null +++ b/contracts/Libraries/matic/test/MerklePatriciaTest.sol @@ -0,0 +1,19 @@ +pragma solidity 0.6.6; + +import {MerklePatriciaProof} from "../lib/MerklePatriciaProof.sol"; +import {RLPReader} from "../lib/RLPReader.sol"; + +contract MerklePatriciaTest { + using RLPReader for bytes; + using RLPReader for RLPReader.RLPItem; + + function verify(uint receiptRoot, bytes calldata receipt, bytes calldata receiptProof, bytes calldata branchMask) external pure returns(bool) { + + return MerklePatriciaProof.verify( + receipt, // receipt + branchMask, // branchMask + receiptProof, // receiptProof + bytes32(receiptRoot) // receiptRoot + ); + } +} diff --git a/contracts/Libraries/matic/test/PotatoMigration/ChildPotatoFarm.sol b/contracts/Libraries/matic/test/PotatoMigration/ChildPotatoFarm.sol new file mode 100644 index 0000000..1a029a8 --- /dev/null +++ b/contracts/Libraries/matic/test/PotatoMigration/ChildPotatoFarm.sol @@ -0,0 +1,18 @@ +pragma solidity 0.6.6; + +import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; + +// This is where potatoes are planted to earn harvest +contract ChildPotatoFarm { + IERC20 potato; + mapping(address => uint) public plantedAmount; + + constructor(address potato_) public { + potato = IERC20(potato_); + } + + function plantFor(address user, uint amount) external { + plantedAmount[user] += amount; + potato.transferFrom(msg.sender, address(this), amount); + } +} diff --git a/contracts/Libraries/matic/test/PotatoMigration/ChildPotatoMigrator.sol b/contracts/Libraries/matic/test/PotatoMigration/ChildPotatoMigrator.sol new file mode 100644 index 0000000..4d6243b --- /dev/null +++ b/contracts/Libraries/matic/test/PotatoMigration/ChildPotatoMigrator.sol @@ -0,0 +1,22 @@ +pragma solidity 0.6.6; + +import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import "../../child/IStateReceiver.sol"; +import "./ChildPotatoFarm.sol"; + +// This contract receives the deposit of potatoes from pos bridge +// then plants the potatoes for user using custom state sync +contract ChildPotatoMigrator is IStateReceiver { + IERC20 potato; + ChildPotatoFarm farm; + constructor(address potato_, address farm_) public { + potato = IERC20(potato_); + farm = ChildPotatoFarm(farm_); + } + + function onStateReceive(uint, bytes calldata data) external override { + (address user, uint amount) = abi.decode(data, (address, uint)); + potato.approve(address(farm), amount); + farm.plantFor(user, amount); + } +} diff --git a/contracts/Libraries/matic/test/PotatoMigration/ChildPotatoToken.sol b/contracts/Libraries/matic/test/PotatoMigration/ChildPotatoToken.sol new file mode 100644 index 0000000..8ebabf8 --- /dev/null +++ b/contracts/Libraries/matic/test/PotatoMigration/ChildPotatoToken.sol @@ -0,0 +1,8 @@ +pragma solidity 0.6.6; + +import "../../child/ChildToken/ChildERC20.sol"; + +// These are the potatoes on Matic chain +contract ChildPotatoToken is ChildERC20 { + constructor(address childChainManager) public ChildERC20("Potato", "PTT", 18, childChainManager) {} +} diff --git a/contracts/Libraries/matic/test/PotatoMigration/RootPotatoMigrator.sol b/contracts/Libraries/matic/test/PotatoMigration/RootPotatoMigrator.sol new file mode 100644 index 0000000..85a1e80 --- /dev/null +++ b/contracts/Libraries/matic/test/PotatoMigration/RootPotatoMigrator.sol @@ -0,0 +1,52 @@ +pragma solidity 0.6.6; + +import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import "../../root/StateSender/IStateSender.sol"; +import "../../root/RootChainManager/IRootChainManager.sol"; + +// This contract enables deposit and plant deom single tx on ethereum chain +// First potatoes are transferred to this contract +// Then they are deposited to ChildPotatoMigrator contract +// Then a custom state sync is sent to ChildPotatoMigrator, using this the potatoes will be planted on matic chain +contract RootPotatoMigrator { + IStateSender stateSender; + IERC20 potato; + IRootChainManager rootChainManager; + address erc20Predicate; + address childPotatoMigrator; + + constructor( + address stateSender_, + address potato_, + address rootChainManager_, + address erc20Predicate_, + address childPotatoMigrator_ + ) public { + stateSender = IStateSender(stateSender_); + potato = IERC20(potato_); + rootChainManager = IRootChainManager(rootChainManager_); + erc20Predicate = erc20Predicate_; + childPotatoMigrator = childPotatoMigrator_; + } + + function plantOnChildFarm(uint amount) external { + potato.transferFrom( + msg.sender, + address(this), + amount + ); + + potato.approve(erc20Predicate, amount); + + rootChainManager.depositFor( + childPotatoMigrator, + address(potato), + abi.encode(amount) + ); + + stateSender.syncState( + childPotatoMigrator, + abi.encode(msg.sender, amount) + ); + } +} diff --git a/contracts/Libraries/matic/test/PotatoMigration/RootPotatoToken.sol b/contracts/Libraries/matic/test/PotatoMigration/RootPotatoToken.sol new file mode 100644 index 0000000..125f5d2 --- /dev/null +++ b/contracts/Libraries/matic/test/PotatoMigration/RootPotatoToken.sol @@ -0,0 +1,12 @@ +pragma solidity 0.6.6; + +import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; + +// These are the potatoes on Ethereum chain +contract RootPotatoToken is ERC20 { + constructor() public ERC20("Potato", "PTT") {} + + function mint(uint256 amount) public { + _mint(msg.sender, amount); + } +} diff --git a/contracts/Libraries/matic/test/ProxyTestImpl.sol b/contracts/Libraries/matic/test/ProxyTestImpl.sol new file mode 100644 index 0000000..e8f7ad9 --- /dev/null +++ b/contracts/Libraries/matic/test/ProxyTestImpl.sol @@ -0,0 +1,18 @@ +pragma solidity 0.6.6; + +import {Initializable} from "../common/Initializable.sol"; + +contract ProxyTestImpl is Initializable { + uint256 public a = 1; + uint256 public b = 2; + uint256 public ctorInit; + + constructor() public { + ctorInit = 3; + } + + function init() public initializer { + a = 1; + b = 2; + } +} diff --git a/contracts/Libraries/matic/test/ProxyTestImplStorageLayoutChange.sol b/contracts/Libraries/matic/test/ProxyTestImplStorageLayoutChange.sol new file mode 100644 index 0000000..e7d5847 --- /dev/null +++ b/contracts/Libraries/matic/test/ProxyTestImplStorageLayoutChange.sol @@ -0,0 +1,8 @@ +pragma solidity 0.6.6; + +import {Initializable} from "../common/Initializable.sol"; + +contract ProxyTestImplStorageLayoutChange is Initializable { + uint256 public b; + uint256 public a; +} diff --git a/contracts/Libraries/matic/test/TestChildTunnel.sol b/contracts/Libraries/matic/test/TestChildTunnel.sol new file mode 100644 index 0000000..5f0a283 --- /dev/null +++ b/contracts/Libraries/matic/test/TestChildTunnel.sol @@ -0,0 +1,27 @@ +pragma solidity 0.6.6; + +import {BaseChildTunnel} from "../tunnel/BaseChildTunnel.sol"; + +contract TestChildTunnel is BaseChildTunnel { + uint256 public number; + + bytes32 public constant TYPE1 = keccak256("TYPE1"); + bytes32 public constant TYPE2 = keccak256("TYPE2"); + + function _processMessageFromRoot(bytes memory message) internal override { + (bytes32 syncType, uint256 n) = abi.decode( + message, + (bytes32, uint256) + ); + + if (TYPE1 == syncType) { + number = number + n; // add + } else if (TYPE2 == syncType) { + number = number - n; // sub + } + } + + function sendMessage(bytes calldata message) external { + _sendMessageToRoot(message); + } +} diff --git a/contracts/Libraries/matic/test/TestRootTunnel.sol b/contracts/Libraries/matic/test/TestRootTunnel.sol new file mode 100644 index 0000000..d4c4dc1 --- /dev/null +++ b/contracts/Libraries/matic/test/TestRootTunnel.sol @@ -0,0 +1,15 @@ +pragma solidity 0.6.6; + +import {BaseRootTunnel} from "../tunnel/BaseRootTunnel.sol"; + +contract TestRootTunnel is BaseRootTunnel { + uint256 public receivedNumber; + + event MessageReceivedFromChild(uint256); + + function _processMessageFromChild(bytes memory message) internal override { + (uint256 n) = abi.decode(message, (uint256)); + emit MessageReceivedFromChild(n); + receivedNumber = n; + } +} diff --git a/contracts/Libraries/matic/test/TestUChildERC20.sol b/contracts/Libraries/matic/test/TestUChildERC20.sol new file mode 100644 index 0000000..8dc4242 --- /dev/null +++ b/contracts/Libraries/matic/test/TestUChildERC20.sol @@ -0,0 +1,9 @@ +pragma solidity 0.6.6; + +import {UChildERC20} from "../child/ChildToken/UpgradeableChildERC20/UChildERC20.sol"; + +contract TestUChildERC20 is UChildERC20 { + function magic() external pure returns (string memory) { + return "magic"; + } +} diff --git a/contracts/Libraries/matic/tunnel/BaseChildTunnel.sol b/contracts/Libraries/matic/tunnel/BaseChildTunnel.sol new file mode 100644 index 0000000..d8c3e38 --- /dev/null +++ b/contracts/Libraries/matic/tunnel/BaseChildTunnel.sol @@ -0,0 +1,51 @@ +pragma solidity 0.6.6; + + +import {AccessControlMixin} from "../common/AccessControlMixin.sol"; + +/** +* @notice Mock child tunnel contract to receive and send message from L2 +*/ +abstract contract BaseChildTunnel is AccessControlMixin { + bytes32 public constant STATE_SYNCER_ROLE = keccak256("STATE_SYNCER_ROLE"); + + // MessageTunnel on L1 will get data from this event + event MessageSent(bytes message); + + constructor() internal { + _setupRole(DEFAULT_ADMIN_ROLE, msg.sender); + _setupRole(STATE_SYNCER_ROLE, 0x0000000000000000000000000000000000001001); + _setupContractId("ChildTunnel"); + } + + /** + * @notice Receive state sync from matic contracts + * @dev This method will be called by Matic chain internally. + * This is executed without transaction using a system call. + */ + function onStateReceive(uint256, bytes memory message) public only(STATE_SYNCER_ROLE) { + _processMessageFromRoot(message); + } + + /** + * @notice Emit message that can be received on Root Tunnel + * @dev Call the internal function when need to emit message + * @param message bytes message that will be sent to Root Tunnel + * some message examples - + * abi.encode(tokenId); + * abi.encode(tokenId, tokenMetadata); + * abi.encode(messageType, messageData); + */ + function _sendMessageToRoot(bytes memory message) internal { + emit MessageSent(message); + } + + /** + * @notice Process message received from Root Tunnel + * @dev function needs to be implemented to handle message as per requirement + * This is called by onStateReceive function. + * Since it is called via a system call, any event will not be emitted during its execution. + * @param message bytes message that was sent from Root Tunnel + */ + function _processMessageFromRoot(bytes memory message) virtual internal; +} diff --git a/contracts/Libraries/matic/tunnel/BaseRootTunnel.sol b/contracts/Libraries/matic/tunnel/BaseRootTunnel.sol new file mode 100644 index 0000000..503020f --- /dev/null +++ b/contracts/Libraries/matic/tunnel/BaseRootTunnel.sol @@ -0,0 +1,217 @@ +pragma solidity ^0.6.6; + + +import {SafeMath} from "@openzeppelin/contracts/math/SafeMath.sol"; + +import {AccessControlMixin} from "../common/AccessControlMixin.sol"; +import {IStateSender} from "../root/StateSender/IStateSender.sol"; +import {RLPReader} from "../lib/RLPReader.sol"; +import {MerklePatriciaProof} from "../lib/MerklePatriciaProof.sol"; +import {ICheckpointManager} from "../root/ICheckpointManager.sol"; +import {RLPReader} from "../lib/RLPReader.sol"; +import {Merkle} from "../lib/Merkle.sol"; + +abstract contract BaseRootTunnel is AccessControlMixin { + using RLPReader for bytes; + using RLPReader for RLPReader.RLPItem; + using Merkle for bytes32; + using SafeMath for uint256; + + // keccak256(MessageSent(bytes)) + bytes32 public constant SEND_MESSAGE_EVENT_SIG = 0x8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036; + + // state sender contract + IStateSender public stateSender; + // root chain manager + ICheckpointManager public checkpointManager; + // child tunnel contract which receives and sends messages + address public childTunnel; + // storage to avoid duplicate exits + mapping(bytes32 => bool) public processedExits; + + constructor() internal { + _setupRole(DEFAULT_ADMIN_ROLE, msg.sender); + _setupContractId("RootTunnel"); + } + + /** + * @notice Set the state sender, callable only by admins + * @dev This should be the state sender from plasma contracts + * It is used to send bytes from root to child chain + * @param newStateSender address of state sender contract + */ + function setStateSender(address newStateSender) + external + only(DEFAULT_ADMIN_ROLE) + { + stateSender = IStateSender(newStateSender); + } + + /** + * @notice Set the checkpoint manager, callable only by admins + * @dev This should be the plasma contract responsible for keeping track of checkpoints + * @param newCheckpointManager address of checkpoint manager contract + */ + function setCheckpointManager(address newCheckpointManager) + external + only(DEFAULT_ADMIN_ROLE) + { + checkpointManager = ICheckpointManager(newCheckpointManager); + } + + /** + * @notice Set the child chain tunnel, callable only by admins + * @dev This should be the contract responsible to receive data bytes on child chain + * @param newChildTunnel address of child tunnel contract + */ + function setChildTunnel(address newChildTunnel) + external + only(DEFAULT_ADMIN_ROLE) + { + require(newChildTunnel != address(0x0), "RootTunnel: INVALID_CHILD_TUNNEL_ADDRESS"); + childTunnel = newChildTunnel; + } + + /** + * @notice Send bytes message to Child Tunnel + * @param message bytes message that will be sent to Child Tunnel + * some message examples - + * abi.encode(tokenId); + * abi.encode(tokenId, tokenMetadata); + * abi.encode(messageType, messageData); + */ + function _sendMessageToChild(bytes memory message) internal { + stateSender.syncState(childTunnel, message); + } + + function _validateAndExtractMessage(bytes memory inputData) internal returns (bytes memory) { + RLPReader.RLPItem[] memory inputDataRLPList = inputData + .toRlpItem() + .toList(); + + // checking if exit has already been processed + // unique exit is identified using hash of (blockNumber, branchMask, receiptLogIndex) + bytes32 exitHash = keccak256( + abi.encodePacked( + inputDataRLPList[2].toUint(), // blockNumber + // first 2 nibbles are dropped while generating nibble array + // this allows branch masks that are valid but bypass exitHash check (changing first 2 nibbles only) + // so converting to nibble array and then hashing it + MerklePatriciaProof._getNibbleArray(inputDataRLPList[8].toBytes()), // branchMask + inputDataRLPList[9].toUint() // receiptLogIndex + ) + ); + require( + processedExits[exitHash] == false, + "RootTunnel: EXIT_ALREADY_PROCESSED" + ); + processedExits[exitHash] = true; + + RLPReader.RLPItem[] memory receiptRLPList = inputDataRLPList[6] + .toBytes() + .toRlpItem() + .toList(); + RLPReader.RLPItem memory logRLP = receiptRLPList[3] + .toList()[ + inputDataRLPList[9].toUint() // receiptLogIndex + ]; + + RLPReader.RLPItem[] memory logRLPList = logRLP.toList(); + + // check child tunnel + require(childTunnel == RLPReader.toAddress(logRLPList[0]), "RootTunnel: INVALID_CHILD_TUNNEL"); + + // verify receipt inclusion + require( + MerklePatriciaProof.verify( + inputDataRLPList[6].toBytes(), // receipt + inputDataRLPList[8].toBytes(), // branchMask + inputDataRLPList[7].toBytes(), // receiptProof + bytes32(inputDataRLPList[5].toUint()) // receiptRoot + ), + "RootTunnel: INVALID_RECEIPT_PROOF" + ); + + // verify checkpoint inclusion + _checkBlockMembershipInCheckpoint( + inputDataRLPList[2].toUint(), // blockNumber + inputDataRLPList[3].toUint(), // blockTime + bytes32(inputDataRLPList[4].toUint()), // txRoot + bytes32(inputDataRLPList[5].toUint()), // receiptRoot + inputDataRLPList[0].toUint(), // headerNumber + inputDataRLPList[1].toBytes() // blockProof + ); + + RLPReader.RLPItem[] memory logTopicRLPList = logRLPList[1].toList(); // topics + + require( + bytes32(logTopicRLPList[0].toUint()) == SEND_MESSAGE_EVENT_SIG, // topic0 is event sig + "RootTunnel: INVALID_SIGNATURE" + ); + + // received message data + bytes memory receivedData = logRLPList[2].toBytes(); + (bytes memory message) = abi.decode(receivedData, (bytes)); // event decodes params again, so decoding bytes to get message + return message; + } + + function _checkBlockMembershipInCheckpoint( + uint256 blockNumber, + uint256 blockTime, + bytes32 txRoot, + bytes32 receiptRoot, + uint256 headerNumber, + bytes memory blockProof + ) private view returns (uint256) { + ( + bytes32 headerRoot, + uint256 startBlock, + , + uint256 createdAt, + + ) = checkpointManager.headerBlocks(headerNumber); + + require( + keccak256( + abi.encodePacked(blockNumber, blockTime, txRoot, receiptRoot) + ) + .checkMembership( + blockNumber.sub(startBlock), + headerRoot, + blockProof + ), + "RootTunnel: INVALID_HEADER" + ); + return createdAt; + } + + /** + * @notice receive message from L2 to L1, validated by proof + * @dev This function verifies if the transaction actually happened on child chain + * + * @param inputData RLP encoded data of the reference tx containing following list of fields + * 0 - headerNumber - Checkpoint header block number containing the reference tx + * 1 - blockProof - Proof that the block header (in the child chain) is a leaf in the submitted merkle root + * 2 - blockNumber - Block number containing the reference tx on child chain + * 3 - blockTime - Reference tx block time + * 4 - txRoot - Transactions root of block + * 5 - receiptRoot - Receipts root of block + * 6 - receipt - Receipt of the reference transaction + * 7 - receiptProof - Merkle proof of the reference receipt + * 8 - branchMask - 32 bits denoting the path of receipt in merkle tree + * 9 - receiptLogIndex - Log Index to read from the receipt + */ + function receiveMessage(bytes memory inputData) public virtual { + bytes memory message = _validateAndExtractMessage(inputData); + _processMessageFromChild(message); + } + + /** + * @notice Process message received from Child Tunnel + * @dev function needs to be implemented to handle message as per requirement + * This is called by onStateReceive function. + * Since it is called via a system call, any event will not be emitted during its execution. + * @param message bytes message that was sent from Child Tunnel + */ + function _processMessageFromChild(bytes memory message) virtual internal; +} diff --git a/contracts/Libraries/matic/tunnel/ChildTunnel.sol b/contracts/Libraries/matic/tunnel/ChildTunnel.sol new file mode 100644 index 0000000..ca5e106 --- /dev/null +++ b/contracts/Libraries/matic/tunnel/ChildTunnel.sol @@ -0,0 +1,10 @@ +pragma solidity ^0.6.6; + +import {BaseChildTunnel} from "./BaseChildTunnel.sol"; + + +contract ChildTunnel is BaseChildTunnel { + function _processMessageFromRoot(bytes memory message) internal override { + // implement your core logic here + } +} diff --git a/contracts/Libraries/matic/tunnel/RootTunnel.sol b/contracts/Libraries/matic/tunnel/RootTunnel.sol new file mode 100644 index 0000000..66e40d5 --- /dev/null +++ b/contracts/Libraries/matic/tunnel/RootTunnel.sol @@ -0,0 +1,10 @@ +pragma solidity ^0.6.6; + +import {BaseRootTunnel} from "./BaseRootTunnel.sol"; + + +contract RootTunnel is BaseRootTunnel { + function _processMessageFromChild(bytes memory message) internal override { + // implement your core logic here + } +} diff --git a/contracts/Libraries/tunnel/FxBaseChildTunnel.sol b/contracts/Libraries/tunnel/FxBaseChildTunnel.sol new file mode 100644 index 0000000..418f78a --- /dev/null +++ b/contracts/Libraries/tunnel/FxBaseChildTunnel.sol @@ -0,0 +1,78 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.6.6 <0.9.0; + +// IFxMessageProcessor represents interface to process message +interface IFxMessageProcessor { + function processMessageFromRoot( + uint256 stateId, + address rootMessageSender, + bytes calldata data + ) external; +} + +/** + * @notice Mock child tunnel contract to receive and send message from L2 + */ +abstract contract FxBaseChildTunnel is IFxMessageProcessor { + // MessageTunnel on L1 will get data from this event + event MessageSent(bytes message); + + // fx child + address public fxChild; + + // fx root tunnel + address public fxRootTunnel; + + constructor(address _fxChild) internal { + fxChild = _fxChild; + } + + // Sender must be fxRootTunnel in case of ERC20 tunnel + modifier validateSender(address sender) { + require(sender == fxRootTunnel, "FxBaseChildTunnel: INVALID_SENDER_FROM_ROOT"); + _; + } + + // set fxRootTunnel if not set already + function setFxRootTunnel(address _fxRootTunnel) public { + require(fxRootTunnel == address(0x0), "FxBaseChildTunnel: ROOT_TUNNEL_ALREADY_SET"); + fxRootTunnel = _fxRootTunnel; + } + + function processMessageFromRoot( + uint256 stateId, + address rootMessageSender, + bytes memory data + ) public override { + require(msg.sender == fxChild, "FxBaseChildTunnel: INVALID_SENDER"); + _processMessageFromRoot(stateId, rootMessageSender, data); + } + + /** + * @notice Emit message that can be received on Root Tunnel + * @dev Call the internal function when need to emit message + * @param message bytes message that will be sent to Root Tunnel + * some message examples - + * abi.encode(tokenId); + * abi.encode(tokenId, tokenMetadata); + * abi.encode(messageType, messageData); + */ + function _sendMessageToRoot(bytes memory message) internal { + emit MessageSent(message); + } + + /** + * @notice Process message received from Root Tunnel + * @dev function needs to be implemented to handle message as per requirement + * This is called by onStateReceive function. + * Since it is called via a system call, any event will not be emitted during its execution. + * @param stateId unique state id + * @param sender root message sender + * @param message bytes message that was sent from Root Tunnel + */ + function _processMessageFromRoot( + uint256 stateId, + address sender, + bytes memory message + ) internal virtual; +} diff --git a/contracts/Libraries/tunnel/FxBaseRootTunnel.sol b/contracts/Libraries/tunnel/FxBaseRootTunnel.sol new file mode 100644 index 0000000..ed218a1 --- /dev/null +++ b/contracts/Libraries/tunnel/FxBaseRootTunnel.sol @@ -0,0 +1,179 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.6.6 <0.9.0; + +import {RLPReader} from "./RLPReader.sol"; +import {MerklePatriciaProof} from "./MerklePatriciaProof.sol"; +import {Merkle} from "./Merkle.sol"; + +interface IFxStateSender { + function sendMessageToChild(address _receiver, bytes calldata _data) external; +} + +contract ICheckpointManager { + struct HeaderBlock { + bytes32 root; + uint256 start; + uint256 end; + uint256 createdAt; + address proposer; + } + + /** + * @notice mapping of checkpoint header numbers to block details + * @dev These checkpoints are submited by plasma contracts + */ + mapping(uint256 => HeaderBlock) public headerBlocks; +} + +abstract contract FxBaseRootTunnel { + using RLPReader for bytes; + using RLPReader for RLPReader.RLPItem; + using Merkle for bytes32; + + // keccak256(MessageSent(bytes)) + bytes32 public constant SEND_MESSAGE_EVENT_SIG = 0x8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036; + + // state sender contract + IFxStateSender public fxRoot; + // root chain manager + ICheckpointManager public checkpointManager; + // child tunnel contract which receives and sends messages + address public fxChildTunnel; + + // storage to avoid duplicate exits + mapping(bytes32 => bool) public processedExits; + + constructor(address _checkpointManager, address _fxRoot) internal { + checkpointManager = ICheckpointManager(_checkpointManager); + fxRoot = IFxStateSender(_fxRoot); + } + + // set fxChildTunnel if not set already + function setFxChildTunnel(address _fxChildTunnel) public { + require(fxChildTunnel == address(0x0), "FxBaseRootTunnel: CHILD_TUNNEL_ALREADY_SET"); + fxChildTunnel = _fxChildTunnel; + } + + /** + * @notice Send bytes message to Child Tunnel + * @param message bytes message that will be sent to Child Tunnel + * some message examples - + * abi.encode(tokenId); + * abi.encode(tokenId, tokenMetadata); + * abi.encode(messageType, messageData); + */ + function _sendMessageToChild(bytes memory message) internal { + fxRoot.sendMessageToChild(fxChildTunnel, message); + } + + function _validateAndExtractMessage(bytes memory inputData) internal returns (bytes memory) { + RLPReader.RLPItem[] memory inputDataRLPList = inputData.toRlpItem().toList(); + + // checking if exit has already been processed + // unique exit is identified using hash of (blockNumber, branchMask, receiptLogIndex) + bytes32 exitHash = keccak256( + abi.encodePacked( + inputDataRLPList[2].toUint(), // blockNumber + // first 2 nibbles are dropped while generating nibble array + // this allows branch masks that are valid but bypass exitHash check (changing first 2 nibbles only) + // so converting to nibble array and then hashing it + MerklePatriciaProof._getNibbleArray(inputDataRLPList[8].toBytes()), // branchMask + inputDataRLPList[9].toUint() // receiptLogIndex + ) + ); + require(processedExits[exitHash] == false, "FxRootTunnel: EXIT_ALREADY_PROCESSED"); + processedExits[exitHash] = true; + + RLPReader.RLPItem[] memory receiptRLPList = inputDataRLPList[6].toBytes().toRlpItem().toList(); + RLPReader.RLPItem memory logRLP = receiptRLPList[3].toList()[inputDataRLPList[9].toUint()]; // receiptLogIndex + + RLPReader.RLPItem[] memory logRLPList = logRLP.toList(); + + // check child tunnel + require(fxChildTunnel == RLPReader.toAddress(logRLPList[0]), "FxRootTunnel: INVALID_FX_CHILD_TUNNEL"); + + // verify receipt inclusion + require( + MerklePatriciaProof.verify( + inputDataRLPList[6].toBytes(), // receipt + inputDataRLPList[8].toBytes(), // branchMask + inputDataRLPList[7].toBytes(), // receiptProof + bytes32(inputDataRLPList[5].toUint()) // receiptRoot + ), + "FxRootTunnel: INVALID_RECEIPT_PROOF" + ); + + // verify checkpoint inclusion + _checkBlockMembershipInCheckpoint( + inputDataRLPList[2].toUint(), // blockNumber + inputDataRLPList[3].toUint(), // blockTime + bytes32(inputDataRLPList[4].toUint()), // txRoot + bytes32(inputDataRLPList[5].toUint()), // receiptRoot + inputDataRLPList[0].toUint(), // headerNumber + inputDataRLPList[1].toBytes() // blockProof + ); + + RLPReader.RLPItem[] memory logTopicRLPList = logRLPList[1].toList(); // topics + + require( + bytes32(logTopicRLPList[0].toUint()) == SEND_MESSAGE_EVENT_SIG, // topic0 is event sig + "FxRootTunnel: INVALID_SIGNATURE" + ); + + // received message data + bytes memory receivedData = logRLPList[2].toBytes(); + bytes memory message = abi.decode(receivedData, (bytes)); // event decodes params again, so decoding bytes to get message + return message; + } + + function _checkBlockMembershipInCheckpoint( + uint256 blockNumber, + uint256 blockTime, + bytes32 txRoot, + bytes32 receiptRoot, + uint256 headerNumber, + bytes memory blockProof + ) private view returns (uint256) { + (bytes32 headerRoot, uint256 startBlock, , uint256 createdAt, ) = checkpointManager.headerBlocks(headerNumber); + + require( + keccak256(abi.encodePacked(blockNumber, blockTime, txRoot, receiptRoot)).checkMembership( + blockNumber - startBlock, + headerRoot, + blockProof + ), + "FxRootTunnel: INVALID_HEADER" + ); + return createdAt; + } + + /** + * @notice receive message from L2 to L1, validated by proof + * @dev This function verifies if the transaction actually happened on child chain + * + * @param inputData RLP encoded data of the reference tx containing following list of fields + * 0 - headerNumber - Checkpoint header block number containing the reference tx + * 1 - blockProof - Proof that the block header (in the child chain) is a leaf in the submitted merkle root + * 2 - blockNumber - Block number containing the reference tx on child chain + * 3 - blockTime - Reference tx block time + * 4 - txRoot - Transactions root of block + * 5 - receiptRoot - Receipts root of block + * 6 - receipt - Receipt of the reference transaction + * 7 - receiptProof - Merkle proof of the reference receipt + * 8 - branchMask - 32 bits denoting the path of receipt in merkle tree + * 9 - receiptLogIndex - Log Index to read from the receipt + */ + function receiveMessage(bytes memory inputData) public virtual { + bytes memory message = _validateAndExtractMessage(inputData); + _processMessageFromChild(message); + } + + /** + * @notice Process message received from Child Tunnel + * @dev function needs to be implemented to handle message as per requirement + * This is called by onStateReceive function. + * Since it is called via a system call, any event will not be emitted during its execution. + * @param message bytes message that was sent from Child Tunnel + */ + function _processMessageFromChild(bytes memory message) internal virtual; +} diff --git a/contracts/Libraries/tunnel/Merkle.sol b/contracts/Libraries/tunnel/Merkle.sol new file mode 100755 index 0000000..c7cf786 --- /dev/null +++ b/contracts/Libraries/tunnel/Merkle.sol @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.6.6 <0.9.0; + +library Merkle { + function checkMembership( + bytes32 leaf, + uint256 index, + bytes32 rootHash, + bytes memory proof + ) internal pure returns (bool) { + require(proof.length % 32 == 0, "Invalid proof length"); + uint256 proofHeight = proof.length / 32; + // Proof of size n means, height of the tree is n+1. + // In a tree of height n+1, max #leafs possible is 2 ^ n + require(index < 2**proofHeight, "Leaf index is too big"); + + bytes32 proofElement; + bytes32 computedHash = leaf; + for (uint256 i = 32; i <= proof.length; i += 32) { + assembly { + proofElement := mload(add(proof, i)) + } + + if (index % 2 == 0) { + computedHash = keccak256(abi.encodePacked(computedHash, proofElement)); + } else { + computedHash = keccak256(abi.encodePacked(proofElement, computedHash)); + } + + index = index / 2; + } + return computedHash == rootHash; + } +} diff --git a/contracts/Libraries/tunnel/MerklePatriciaProof.sol b/contracts/Libraries/tunnel/MerklePatriciaProof.sol new file mode 100644 index 0000000..d5d8ba1 --- /dev/null +++ b/contracts/Libraries/tunnel/MerklePatriciaProof.sol @@ -0,0 +1,137 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.6.6 <0.9.0; + +import {RLPReader} from "./RLPReader.sol"; + +library MerklePatriciaProof { + /* + * @dev Verifies a merkle patricia proof. + * @param value The terminating value in the trie. + * @param encodedPath The path in the trie leading to value. + * @param rlpParentNodes The rlp encoded stack of nodes. + * @param root The root hash of the trie. + * @return The boolean validity of the proof. + */ + function verify( + bytes memory value, + bytes memory encodedPath, + bytes memory rlpParentNodes, + bytes32 root + ) internal pure returns (bool) { + RLPReader.RLPItem memory item = RLPReader.toRlpItem(rlpParentNodes); + RLPReader.RLPItem[] memory parentNodes = RLPReader.toList(item); + + bytes memory currentNode; + RLPReader.RLPItem[] memory currentNodeList; + + bytes32 nodeKey = root; + uint256 pathPtr = 0; + + bytes memory path = _getNibbleArray(encodedPath); + if (path.length == 0) { + return false; + } + + for (uint256 i = 0; i < parentNodes.length; i++) { + if (pathPtr > path.length) { + return false; + } + + currentNode = RLPReader.toRlpBytes(parentNodes[i]); + if (nodeKey != keccak256(currentNode)) { + return false; + } + currentNodeList = RLPReader.toList(parentNodes[i]); + + if (currentNodeList.length == 17) { + if (pathPtr == path.length) { + if (keccak256(RLPReader.toBytes(currentNodeList[16])) == keccak256(value)) { + return true; + } else { + return false; + } + } + + uint8 nextPathNibble = uint8(path[pathPtr]); + if (nextPathNibble > 16) { + return false; + } + nodeKey = bytes32(RLPReader.toUintStrict(currentNodeList[nextPathNibble])); + pathPtr += 1; + } else if (currentNodeList.length == 2) { + uint256 traversed = _nibblesToTraverse(RLPReader.toBytes(currentNodeList[0]), path, pathPtr); + if (pathPtr + traversed == path.length) { + //leaf node + if (keccak256(RLPReader.toBytes(currentNodeList[1])) == keccak256(value)) { + return true; + } else { + return false; + } + } + + //extension node + if (traversed == 0) { + return false; + } + + pathPtr += traversed; + nodeKey = bytes32(RLPReader.toUintStrict(currentNodeList[1])); + } else { + return false; + } + } + } + + function _nibblesToTraverse( + bytes memory encodedPartialPath, + bytes memory path, + uint256 pathPtr + ) private pure returns (uint256) { + uint256 len = 0; + // encodedPartialPath has elements that are each two hex characters (1 byte), but partialPath + // and slicedPath have elements that are each one hex character (1 nibble) + bytes memory partialPath = _getNibbleArray(encodedPartialPath); + bytes memory slicedPath = new bytes(partialPath.length); + + // pathPtr counts nibbles in path + // partialPath.length is a number of nibbles + for (uint256 i = pathPtr; i < pathPtr + partialPath.length; i++) { + bytes1 pathNibble = path[i]; + slicedPath[i - pathPtr] = pathNibble; + } + + if (keccak256(partialPath) == keccak256(slicedPath)) { + len = partialPath.length; + } else { + len = 0; + } + return len; + } + + // bytes b must be hp encoded + function _getNibbleArray(bytes memory b) internal pure returns (bytes memory) { + bytes memory nibbles = ""; + if (b.length > 0) { + uint8 offset; + uint8 hpNibble = uint8(_getNthNibbleOfBytes(0, b)); + if (hpNibble == 1 || hpNibble == 3) { + nibbles = new bytes(b.length * 2 - 1); + bytes1 oddNibble = _getNthNibbleOfBytes(1, b); + nibbles[0] = oddNibble; + offset = 1; + } else { + nibbles = new bytes(b.length * 2 - 2); + offset = 0; + } + + for (uint256 i = offset; i < nibbles.length; i++) { + nibbles[i] = _getNthNibbleOfBytes(i - offset + 2, b); + } + } + return nibbles; + } + + function _getNthNibbleOfBytes(uint256 n, bytes memory str) private pure returns (bytes1) { + return bytes1(n % 2 == 0 ? uint8(str[n / 2]) / 0x10 : uint8(str[n / 2]) % 0x10); + } +} diff --git a/contracts/Libraries/tunnel/RLPReader.sol b/contracts/Libraries/tunnel/RLPReader.sol new file mode 100644 index 0000000..0e56637 --- /dev/null +++ b/contracts/Libraries/tunnel/RLPReader.sol @@ -0,0 +1,242 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.6.6 <0.9.0; + +library RLPReader { + uint8 constant STRING_SHORT_START = 0x80; + uint8 constant STRING_LONG_START = 0xb8; + uint8 constant LIST_SHORT_START = 0xc0; + uint8 constant LIST_LONG_START = 0xf8; + uint8 constant WORD_SIZE = 32; + + struct RLPItem { + uint256 len; + uint256 memPtr; + } + + /* + * @param item RLP encoded bytes + */ + function toRlpItem(bytes memory item) internal pure returns (RLPItem memory) { + require(item.length > 0, "RLPReader: INVALID_BYTES_LENGTH"); + uint256 memPtr; + assembly { + memPtr := add(item, 0x20) + } + + return RLPItem(item.length, memPtr); + } + + /* + * @param item RLP encoded list in bytes + */ + function toList(RLPItem memory item) internal pure returns (RLPItem[] memory) { + require(isList(item), "RLPReader: ITEM_NOT_LIST"); + + uint256 items = numItems(item); + RLPItem[] memory result = new RLPItem[](items); + uint256 listLength = _itemLength(item.memPtr); + require(listLength == item.len, "RLPReader: LIST_DECODED_LENGTH_MISMATCH"); + + uint256 memPtr = item.memPtr + _payloadOffset(item.memPtr); + uint256 dataLen; + for (uint256 i = 0; i < items; i++) { + dataLen = _itemLength(memPtr); + result[i] = RLPItem(dataLen, memPtr); + memPtr = memPtr + dataLen; + } + + return result; + } + + // @return indicator whether encoded payload is a list. negate this function call for isData. + function isList(RLPItem memory item) internal pure returns (bool) { + uint8 byte0; + uint256 memPtr = item.memPtr; + assembly { + byte0 := byte(0, mload(memPtr)) + } + + if (byte0 < LIST_SHORT_START) return false; + return true; + } + + /** RLPItem conversions into data types **/ + + // @returns raw rlp encoding in bytes + function toRlpBytes(RLPItem memory item) internal pure returns (bytes memory) { + bytes memory result = new bytes(item.len); + + uint256 ptr; + assembly { + ptr := add(0x20, result) + } + + copy(item.memPtr, ptr, item.len); + return result; + } + + function toAddress(RLPItem memory item) internal pure returns (address) { + require(!isList(item), "RLPReader: DECODING_LIST_AS_ADDRESS"); + // 1 byte for the length prefix + require(item.len == 21, "RLPReader: INVALID_ADDRESS_LENGTH"); + + return address(toUint(item)); + } + + function toUint(RLPItem memory item) internal pure returns (uint256) { + require(!isList(item), "RLPReader: DECODING_LIST_AS_UINT"); + require(item.len <= 33, "RLPReader: INVALID_UINT_LENGTH"); + + uint256 itemLength = _itemLength(item.memPtr); + require(itemLength == item.len, "RLPReader: UINT_DECODED_LENGTH_MISMATCH"); + + uint256 offset = _payloadOffset(item.memPtr); + uint256 len = item.len - offset; + uint256 result; + uint256 memPtr = item.memPtr + offset; + assembly { + result := mload(memPtr) + + // shfit to the correct location if neccesary + if lt(len, 32) { + result := div(result, exp(256, sub(32, len))) + } + } + + return result; + } + + // enforces 32 byte length + function toUintStrict(RLPItem memory item) internal pure returns (uint256) { + uint256 itemLength = _itemLength(item.memPtr); + require(itemLength == item.len, "RLPReader: UINT_STRICT_DECODED_LENGTH_MISMATCH"); + // one byte prefix + require(item.len == 33, "RLPReader: INVALID_UINT_STRICT_LENGTH"); + + uint256 result; + uint256 memPtr = item.memPtr + 1; + assembly { + result := mload(memPtr) + } + + return result; + } + + function toBytes(RLPItem memory item) internal pure returns (bytes memory) { + uint256 listLength = _itemLength(item.memPtr); + require(listLength == item.len, "RLPReader: BYTES_DECODED_LENGTH_MISMATCH"); + uint256 offset = _payloadOffset(item.memPtr); + + uint256 len = item.len - offset; // data length + bytes memory result = new bytes(len); + + uint256 destPtr; + assembly { + destPtr := add(0x20, result) + } + + copy(item.memPtr + offset, destPtr, len); + return result; + } + + /* + * Private Helpers + */ + + // @return number of payload items inside an encoded list. + function numItems(RLPItem memory item) private pure returns (uint256) { + // add `isList` check if `item` is expected to be passsed without a check from calling function + // require(isList(item), "RLPReader: NUM_ITEMS_NOT_LIST"); + + uint256 count = 0; + uint256 currPtr = item.memPtr + _payloadOffset(item.memPtr); + uint256 endPtr = item.memPtr + item.len; + while (currPtr < endPtr) { + currPtr = currPtr + _itemLength(currPtr); // skip over an item + require(currPtr <= endPtr, "RLPReader: NUM_ITEMS_DECODED_LENGTH_MISMATCH"); + count++; + } + + return count; + } + + // @return entire rlp item byte length + function _itemLength(uint256 memPtr) private pure returns (uint256) { + uint256 itemLen; + uint256 byte0; + assembly { + byte0 := byte(0, mload(memPtr)) + } + + if (byte0 < STRING_SHORT_START) itemLen = 1; + else if (byte0 < STRING_LONG_START) itemLen = byte0 - STRING_SHORT_START + 1; + else if (byte0 < LIST_SHORT_START) { + assembly { + let byteLen := sub(byte0, 0xb7) // # of bytes the actual length is + memPtr := add(memPtr, 1) // skip over the first byte + + /* 32 byte word size */ + let dataLen := div(mload(memPtr), exp(256, sub(32, byteLen))) // right shifting to get the len + itemLen := add(dataLen, add(byteLen, 1)) + } + } else if (byte0 < LIST_LONG_START) { + itemLen = byte0 - LIST_SHORT_START + 1; + } else { + assembly { + let byteLen := sub(byte0, 0xf7) + memPtr := add(memPtr, 1) + + let dataLen := div(mload(memPtr), exp(256, sub(32, byteLen))) // right shifting to the correct length + itemLen := add(dataLen, add(byteLen, 1)) + } + } + + return itemLen; + } + + // @return number of bytes until the data + function _payloadOffset(uint256 memPtr) private pure returns (uint256) { + uint256 byte0; + assembly { + byte0 := byte(0, mload(memPtr)) + } + + if (byte0 < STRING_SHORT_START) return 0; + else if (byte0 < STRING_LONG_START || (byte0 >= LIST_SHORT_START && byte0 < LIST_LONG_START)) return 1; + else if (byte0 < LIST_SHORT_START) + // being explicit + return byte0 - (STRING_LONG_START - 1) + 1; + else return byte0 - (LIST_LONG_START - 1) + 1; + } + + /* + * @param src Pointer to source + * @param dest Pointer to destination + * @param len Amount of memory to copy from the source + */ + function copy( + uint256 src, + uint256 dest, + uint256 len + ) private pure { + if (len == 0) return; + + // copy as many word sizes as possible + for (; len >= WORD_SIZE; len -= WORD_SIZE) { + assembly { + mstore(dest, mload(src)) + } + + src += WORD_SIZE; + dest += WORD_SIZE; + } + + // left over bytes. Mask is used to remove unwanted bytes from the word + uint256 mask = 256**(WORD_SIZE - len) - 1; + assembly { + let srcpart := and(mload(src), not(mask)) // zero out src + let destpart := and(mload(dest), mask) // retrieve the bytes + mstore(dest, or(destpart, srcpart)) + } + } +} diff --git a/deploy/001_deploy_crypt_orchid_erc721.ts b/deploy/001_deploy_crypt_orchid_erc721.ts index 4e5ed46..3537666 100644 --- a/deploy/001_deploy_crypt_orchid_erc721.ts +++ b/deploy/001_deploy_crypt_orchid_erc721.ts @@ -10,10 +10,12 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { ({ 42: 'kovan', 4: 'rinkeby', - 1: 'mainnet', + // 1: 'mainnet', }[id]) ); + if (!networkName) return; // no goerli + const chainLink = chainlinkEnv(networkName); const {deployer} = await getNamedAccounts(); diff --git a/deploy/002_deploy_crypt_orchid_goerli.ts b/deploy/002_deploy_crypt_orchid_goerli.ts new file mode 100644 index 0000000..8b32a40 --- /dev/null +++ b/deploy/002_deploy_crypt_orchid_goerli.ts @@ -0,0 +1,27 @@ +import {HardhatRuntimeEnvironment} from 'hardhat/types'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {chainlinkEnv} from '../utils/network'; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const {deployments, getNamedAccounts, getChainId} = hre; + const {deploy} = deployments; + const networkName = await getChainId().then( + (id) => + ({ + 5: 'goerli', + }[id]) + ); + + if (!networkName) return; // ONLY goerli + + const {deployer} = await getNamedAccounts(); + console.warn(deployer); + + await deploy('CryptOrchidGoerli', { + from: deployer, + args: [], + log: true, + }); +}; +export default func; +func.tags = ['CryptOrchidGoerli']; diff --git a/deploy/002_deploy_coupon.ts b/deploy/003_deploy_coupon.ts similarity index 94% rename from deploy/002_deploy_coupon.ts rename to deploy/003_deploy_coupon.ts index 2dc0ea5..7c624b7 100644 --- a/deploy/002_deploy_coupon.ts +++ b/deploy/003_deploy_coupon.ts @@ -10,11 +10,14 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { (id) => ({ 42: 'kovan', + 5: 'goerli', 4: 'rinkeby', 1: 'mainnet', }[id]) ); + if (!networkName) return; + const {address} = deploymentForEnv(networkName); const chainLink = chainlinkEnv(networkName); diff --git a/deploy/004_deploy_crypt_orchid_child.ts b/deploy/004_deploy_crypt_orchid_child.ts new file mode 100644 index 0000000..5d0c7c6 --- /dev/null +++ b/deploy/004_deploy_crypt_orchid_child.ts @@ -0,0 +1,33 @@ +import {HardhatRuntimeEnvironment} from 'hardhat/types'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {chainlinkEnv} from '../utils/network'; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const {deployments, getNamedAccounts, getChainId} = hre; + const {deploy} = deployments; + const networkName = await getChainId().then( + (id) => + ({ + 137: 'matic', + 80001: 'mumbai', + }[id]) + ); + + console.warn(networkName); + + if (!networkName) return; // ONLY goerli + + const {deployer} = await getNamedAccounts(); + console.warn(deployer); + + await deploy('CryptOrchidERC721Child', { + from: deployer, + args: [ + '0xb5505a6d998549090530911180f38aC5130101c6', + '0xCf73231F28B7331BBe3124B907840A94851f9f11', + ], + log: true, + }); +}; +export default func; +func.tags = ['CryptOrchidERC721Child']; diff --git a/deploy/005_deploy_crypt_orchid_tunnel.ts b/deploy/005_deploy_crypt_orchid_tunnel.ts new file mode 100644 index 0000000..b89423f --- /dev/null +++ b/deploy/005_deploy_crypt_orchid_tunnel.ts @@ -0,0 +1,55 @@ +import {HardhatRuntimeEnvironment} from 'hardhat/types'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {chainlinkEnv, deploymentForEnv} from '../utils/network'; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const {deployments, getNamedAccounts, getChainId} = hre; + const {deploy} = deployments; + const networkName = await getChainId().then( + (id) => + ({ + 5: 'goerli', + 1: 'mainnet', + }[id]) + ); + + if (!networkName) return; + + const {deployer} = await getNamedAccounts(); + console.warn(deployer); + let args; + + if (networkName == 'goerli') { + const { + address, + // eslint-disable-next-line @typescript-eslint/no-var-requires + } = require(`../deployments/${networkName}/CryptOrchidGoerli.json`); + + args = [ + '0x2890bA17EfE978480615e330ecB65333b880928e', + '0x3d1d3E34f7fB6D26245E6640E1c50710eFFf15bA', + address, + ]; + } + + if (networkName == 'mainnet') { + const { + address, + // eslint-disable-next-line @typescript-eslint/no-var-requires + } = require(`../deployments/${networkName}/CryptOrchidERC721.json`); + + args = [ + '0x86e4dc95c7fbdbf52e33d563bbdb00823894c287', + '0x941ee2e831d278DB802A541d3855A8de749ef635', + address, + ]; + } + + await deploy('CryptOrchidRootTunnel', { + from: deployer, + args, + log: true, + }); +}; +export default func; +func.tags = ['CryptOrchidRootTunnel']; diff --git a/deployments/goerli/.chainId b/deployments/goerli/.chainId new file mode 100644 index 0000000..7813681 --- /dev/null +++ b/deployments/goerli/.chainId @@ -0,0 +1 @@ +5 \ No newline at end of file diff --git a/deployments/goerli/.pendingTransactions b/deployments/goerli/.pendingTransactions new file mode 100644 index 0000000..c2ecc09 --- /dev/null +++ b/deployments/goerli/.pendingTransactions @@ -0,0 +1,1830 @@ +{ + "0x672ca51797c5781ac3c933f16b056bb1b500d77b0d0e08d4946f4cb88c480a09": { + "name": "CryptOrchidGoerli", + "deployment": { + "_format": "hh-sol-artifact-1", + "contractName": "CryptOrchidGoerli", + "sourceName": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol", + "abi": [ + { + "inputs": [], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": 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": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "GROWTH_CYCLE", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_CRYPTORCHIDS", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MINTER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PAUSER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "WATERING_WINDOW", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "alive", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "baseURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "cryptorchids", + "outputs": [ + { + "internalType": "string", + "name": "species", + "type": "string" + }, + { + "internalType": "uint256", + "name": "plantedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "waterLevel", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "currentPrice", + "outputs": [ + { + "internalType": "uint256", + "name": "price", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "flowering", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "userProvidedSeed", + "type": "uint256" + } + ], + "name": "germinate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "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": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getTokenMetadata", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "enum CryptOrchidGoerli.Stage", + "name": "", + "type": "uint8" + } + ], + "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": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "growthStage", + "outputs": [ + { + "internalType": "enum CryptOrchidGoerli.Stage", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "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": [], + "name": "renounceOwnership", + "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": "", + "type": "bytes32" + } + ], + "name": "requestToToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "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": "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": [], + "name": "startGrowing", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "startSale", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "tokenByIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "tokenOfOwnerByIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "water", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "units", + "type": "uint256" + } + ], + "name": "webMint", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x600f805461ffff191690556101c060405260006080908152610c0260a0526117ba60c052611f8a60e0526123726101005261256661012052612660610140526126c4610160526126f66101805261270f6101a0526200006390601090600a62000b0c565b506040805161018081018252601761014082019081527f7368656e7a68656e696361206f72636869646163656165000000000000000000610160830152815281518083018352601881527f7068616c61656e6f70736973206d6963686f6c69747a69690000000000000000602082810191909152808301919091528251808401845260158082527f6775617269616e74686520617572616e74696163610000000000000000000000828401528385019190915283518085018552600e81526d76616e646120636f6572756c656160901b818401526060840152835180850185528181527f637970726970656469756d2063616c63656f6c7573000000000000000000000081840152608084015283518085018552601981527f70617068696f706564696c756d20766965746e616d656e7365000000000000008184015260a08401528351808501855260128152716d696c746f6e6961206b61796173696d616560701b8184015260c084015283518085018552601381527f706c6174616e746865726120617a6f72696361000000000000000000000000008184015260e0840152835180850185529081527f64656e64726f7068796c6178206c696e64656e69690000000000000000000000818301526101008301528251808401909352601d83527f70617068696f706564696c756d20726f7468736368696c6469616e756d000000908301526101208101919091526200028390601190600a62000ba9565b50604080516101c08101909152604b610140820181815282916200505f61016084013981526020016040518060800160405280604c815260200162004ef5604c9139815260200160405180608001604052806049815260200162005183604991398152602001604051806080016040528060428152602001620050f060429139815260200160405180608001604052806049815260200162004eac6049913981526020016040518060800160405280604d815260200162004fc9604d91398152602001604051806080016040528060468152602001620050aa604691398152602001604051806080016040528060478152602001620052f96047913981526020016040518060800160405280604981526020016200521960499139815260200160405180608001604052806051815260200162004e14605191399052620003cf90601b90600a62000ba9565b50604080516101c08101909152604b61014082018181528291620052ae61016084013981526020016040518060800160405280604c815260200162005262604c913981526020016040518060800160405280604981526020016200501660499139815260200160405180608001604052806042815260200162004f4160429139815260200160405180608001604052806049815260200162004d826049913981526020016040518060800160405280604d8152602001620051cc604d9139815260200160405180608001604052806046815260200162004f8360469139815260200160405180608001604052806047815260200162004e6560479139815260200160405180608001604052806049815260200162004dcb604991398152602001604051806080016040528060518152602001620051326051913990526200051b90602590600a62000ba9565b506040518060400160405280600c81526020016b43727970744f72636869647360a01b8152506040518060400160405280600581526020016413d490d21160da1b81525060405180604001604052806007815260200166697066733a2f2f60c81b8152508282620005996301ffc9a760e01b6200093660201b60201c565b8151620005ae90600790602085019062000bfc565b508051620005c490600890602084019062000bfc565b50620005e06380ac58cd60e01b6001600160e01b036200093616565b620005fb635b5e139f60e01b6001600160e01b036200093616565b6200061663780e9d6360e01b6001600160e01b036200093616565b5050600b805460ff191690556200064a60006200063b6001600160e01b03620009be16565b6001600160e01b03620009c316565b604080516a4d494e5445525f524f4c4560a81b8152905190819003600b01902062000682906200063b6001600160e01b03620009be16565b604080516a5041555345525f524f4c4560a81b8152905190819003600b019020620006ba906200063b6001600160e01b03620009be16565b620006ce816001600160e01b03620009dc16565b5050506000620006e3620009be60201b60201c565b600d80546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35060005b600a8110156200092f57601b81600a81106200074c57fe5b0160316000601184600a81106200075f57fe5b6040805160208082019081529290930180546002600182161561010002600019019091160491840182905292829160609091019084908015620007e65780601f10620007ba57610100808354040283529160200191620007e6565b820191906000526020600020905b815481529060010190602001808311620007c857829003601f168201915b50509250505060405160208183030381529060405280519060200120815260200190815260200160002090805460018160011615610100020316600290046200083192919062000c7d565b50602581600a81106200084057fe5b0160326000601184600a81106200085357fe5b6040805160208082019081529290930180546002600182161561010002600019019091160491840182905292829160609091019084908015620008da5780601f10620008ae57610100808354040283529160200191620008da565b820191906000526020600020905b815481529060010190602001808311620008bc57829003601f168201915b50509250505060405160208183030381529060405280519060200120815260200190815260200160002090805460018160011615610100020316600290046200092592919062000c7d565b5060010162000734565b5062000da9565b6001600160e01b0319808216141562000996576040805162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604482015290519081900360640190fd5b6001600160e01b0319166000908152600160208190526040909120805460ff19169091179055565b335b90565b620009d882826001600160e01b03620009f116565b5050565b8051620009d890600a90602084019062000bfc565b60008281526020818152604090912062000a1691839062002f9962000a73821b17901c565b15620009d85762000a2f6001600160e01b03620009be16565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600062000a93836001600160a01b0384166001600160e01b0362000a9c16565b90505b92915050565b600062000ab383836001600160e01b0362000af416565b62000aeb5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000a96565b50600062000a96565b60009081526001919091016020526040902054151590565b60018301918390821562000b975791602002820160005b8382111562000b6557835183826101000a81548161ffff021916908361ffff160217905550926020019260020160208160010104928301926001030262000b23565b801562000b955782816101000a81549061ffff021916905560020160208160010104928301926001030262000b65565b505b5062000ba592915062000cf7565b5090565b82600a810192821562000bee579160200282015b8281111562000bee578251805162000bdd91849160209091019062000bfc565b509160200191906001019062000bbd565b5062000ba592915062000d19565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1062000c3f57805160ff191683800117855562000c6f565b8280016001018555821562000c6f579182015b8281111562000c6f57825182559160200191906001019062000c52565b5062000ba592915062000d41565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1062000cb8578054855562000c6f565b8280016001018555821562000c6f57600052602060002091601f016020900482015b8281111562000c6f57825482559160010191906001019062000cda565b620009c091905b8082111562000ba557805461ffff1916815560010162000cfe565b620009c091905b8082111562000ba557600062000d37828262000d5e565b5060010162000d20565b620009c091905b8082111562000ba5576000815560010162000d48565b50805460018160011615610100020316600290046000825580601f1062000d86575062000da6565b601f01602090049060005260206000209081019062000da6919062000d41565b50565b613fc98062000db96000396000f3fe6080604052600436106102e85760003560e01c80636c0360eb11610190578063a7eec44b116100dc578063cac21c8f11610095578063e63ab1e91161006f578063e63ab1e914610ca4578063e985e9c514610cb9578063f2fde38b14610cf4578063ffee200c14610d27576102ef565b8063cac21c8f14610ba6578063d539139314610c56578063d547741f14610c6b576102ef565b8063a7eec44b146109f2578063b66a0e5d14610a1c578063b7aaba2014610a31578063b88d4fde14610a7f578063c87b56dd14610b52578063ca15c87314610b7c576102ef565b80639010d07c116101495780639981d4a1116101235780639981d4a1146109705780639d1b464a1461098d578063a217fddf146109a2578063a22cb465146109b7576102ef565b80639010d07c146108f257806391d148541461092257806395d89b411461095b576102ef565b80636c0360eb1461083b57806370a0823114610850578063715018a6146108835780637fd8d953146108985780638456cb59146108c85780638da5cb5b146108dd576102ef565b806336568abe1161024f5780635c975abb116102085780636352211e116101e25780636352211e1461079f5780636573c787146107c95780636a627842146107f35780636b0c004d14610826576102ef565b80635c975abb1461069b57806360316801146106b057806362ff09d614610775576102ef565b806336568abe146105a15780633ccfd60b146105da5780633f4ba83a146105ef57806342842e0e1461060457806342966c68146106475780634f6ccce714610671576102ef565b8063182199cd116102a1578063182199cd1461048357806323b872dd146104ad578063248a9ca3146104f0578063277dec921461051a5780632f2ff15d1461052f5780632f745c5914610568576102ef565b806301ffc9a7146102f457806306fdde031461033c578063081812fc146103c6578063095ea7b31461040c578063179f0b0a1461044757806318160ddd1461046e576102ef565b366102ef57005b600080fd5b34801561030057600080fd5b506103286004803603602081101561031757600080fd5b50356001600160e01b031916610d3c565b604080519115158252519081900360200190f35b34801561034857600080fd5b50610351610d5f565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561038b578181015183820152602001610373565b50505050905090810190601f1680156103b85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156103d257600080fd5b506103f0600480360360208110156103e957600080fd5b5035610df6565b604080516001600160a01b039092168252519081900360200190f35b34801561041857600080fd5b506104456004803603604081101561042f57600080fd5b506001600160a01b038135169060200135610e58565b005b34801561045357600080fd5b5061045c610f33565b60408051918252519081900360200190f35b34801561047a57600080fd5b5061045c610f3a565b34801561048f57600080fd5b50610328600480360360208110156104a657600080fd5b5035610f4b565b3480156104b957600080fd5b50610445600480360360608110156104d057600080fd5b506001600160a01b03813581169160208101359091169060400135610f6a565b3480156104fc57600080fd5b5061045c6004803603602081101561051357600080fd5b5035610fc1565b34801561052657600080fd5b50610445610fd6565b34801561053b57600080fd5b506104456004803603604081101561055257600080fd5b50803590602001356001600160a01b0316611049565b34801561057457600080fd5b5061045c6004803603604081101561058b57600080fd5b506001600160a01b0381351690602001356110b5565b3480156105ad57600080fd5b50610445600480360360408110156105c457600080fd5b50803590602001356001600160a01b03166110e6565b3480156105e657600080fd5b50610445611147565b3480156105fb57600080fd5b506104456111d8565b34801561061057600080fd5b506104456004803603606081101561062757600080fd5b506001600160a01b03813581169160208101359091169060400135611249565b34801561065357600080fd5b506104456004803603602081101561066a57600080fd5b5035611264565b34801561067d57600080fd5b5061045c6004803603602081101561069457600080fd5b50356112b6565b3480156106a757600080fd5b506103286112d2565b3480156106bc57600080fd5b506106da600480360360208110156106d357600080fd5b50356112db565b60405180806020018581526020018481526020018360038111156106fa57fe5b60ff168152602001828103825286818151815260200191508051906020019080838360005b8381101561073757818101518382015260200161071f565b50505050905090810190601f1680156107645780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b34801561078157600080fd5b5061045c6004803603602081101561079857600080fd5b50356113a0565b3480156107ab57600080fd5b506103f0600480360360208110156107c257600080fd5b50356113b2565b3480156107d557600080fd5b50610328600480360360208110156107ec57600080fd5b50356113e0565b3480156107ff57600080fd5b506104456004803603602081101561081657600080fd5b50356001600160a01b0316611400565b34801561083257600080fd5b5061045c611484565b34801561084757600080fd5b5061035161148a565b34801561085c57600080fd5b5061045c6004803603602081101561087357600080fd5b50356001600160a01b03166114eb565b34801561088f57600080fd5b50610445611553565b3480156108a457600080fd5b50610445600480360360408110156108bb57600080fd5b50803590602001356115ff565b3480156108d457600080fd5b5061044561169b565b3480156108e957600080fd5b506103f061170a565b3480156108fe57600080fd5b506103f06004803603604081101561091557600080fd5b5080359060200135611719565b34801561092e57600080fd5b506103286004803603604081101561094557600080fd5b50803590602001356001600160a01b0316611737565b34801561096757600080fd5b50610351611755565b6104456004803603602081101561098657600080fd5b50356117b6565b34801561099957600080fd5b5061045c611a5c565b3480156109ae57600080fd5b5061045c611b18565b3480156109c357600080fd5b50610445600480360360408110156109da57600080fd5b506001600160a01b0381351690602001351515611b1d565b3480156109fe57600080fd5b5061044560048036036020811015610a1557600080fd5b5035611c22565b348015610a2857600080fd5b50610445611ce0565b348015610a3d57600080fd5b50610a5b60048036036020811015610a5457600080fd5b5035611d51565b60405180826003811115610a6b57fe5b60ff16815260200191505060405180910390f35b348015610a8b57600080fd5b5061044560048036036080811015610aa257600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135640100000000811115610add57600080fd5b820183602082011115610aef57600080fd5b80359060200191846001830284011164010000000083111715610b1157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611ed1945050505050565b348015610b5e57600080fd5b5061035160048036036020811015610b7557600080fd5b5035611f29565b348015610b8857600080fd5b5061045c60048036036020811015610b9f57600080fd5b5035612327565b348015610bb257600080fd5b50610bd060048036036020811015610bc957600080fd5b503561233e565b6040518080602001848152602001838152602001828103825285818151815260200191508051906020019080838360005b83811015610c19578181015183820152602001610c01565b50505050905090810190601f168015610c465780820380516001836020036101000a031916815260200191505b5094505050505060405180910390f35b348015610c6257600080fd5b5061045c6123eb565b348015610c7757600080fd5b5061044560048036036040811015610c8e57600080fd5b50803590602001356001600160a01b031661240e565b348015610cb057600080fd5b5061045c612467565b348015610cc557600080fd5b5061032860048036036040811015610cdc57600080fd5b506001600160a01b038135811691602001351661248a565b348015610d0057600080fd5b5061044560048036036020811015610d1757600080fd5b50356001600160a01b03166124b8565b348015610d3357600080fd5b5061045c6125bb565b6001600160e01b0319811660009081526001602052604090205460ff165b919050565b60078054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610deb5780601f10610dc057610100808354040283529160200191610deb565b820191906000526020600020905b815481529060010190602001808311610dce57829003601f168201915b505050505090505b90565b6000610e01826125c1565b610e3c5760405162461bcd60e51b815260040180806020018281038252602c815260200180613d6f602c913960400191505060405180910390fd5b506000908152600560205260409020546001600160a01b031690565b6000610e63826113b2565b9050806001600160a01b0316836001600160a01b03161415610eb65760405162461bcd60e51b8152600401808060200182810382526021815260200180613e146021913960400191505060405180910390fd5b806001600160a01b0316610ec86125d4565b6001600160a01b03161480610ee95750610ee981610ee46125d4565b61248a565b610f245760405162461bcd60e51b8152600401808060200182810382526038815260200180613c7e6038913960400191505060405180910390fd5b610f2e83836125d8565b505050565b62093a8081565b6000610f466003612646565b905090565b60006002610f5883611d51565b6003811115610f6357fe5b1492915050565b610f7b610f756125d4565b82612651565b610fb65760405162461bcd60e51b8152600401808060200182810382526031815260200180613e5c6031913960400191505060405180910390fd5b610f2e8383836126f5565b60009081526020819052604090206002015490565b610fde6125d4565b6001600160a01b0316610fef61170a565b6001600160a01b031614611038576040805162461bcd60e51b81526020600482018190526024820152600080516020613d9b833981519152604482015290519081900360640190fd5b600f805461ff001916610100179055565b60008281526020819052604090206002015461106c906110676125d4565b611737565b6110a75760405162461bcd60e51b815260040180806020018281038252602f815260200180613a97602f913960400191505060405180910390fd5b6110b18282612853565b5050565b6001600160a01b03821660009081526002602052604081206110dd908363ffffffff6128c216565b90505b92915050565b6110ee6125d4565b6001600160a01b0316816001600160a01b03161461113d5760405162461bcd60e51b815260040180806020018281038252602f815260200180613f65602f913960400191505060405180910390fd5b6110b182826128ce565b61114f6125d4565b6001600160a01b031661116061170a565b6001600160a01b0316146111a9576040805162461bcd60e51b81526020600482018190526024820152600080516020613d9b833981519152604482015290519081900360640190fd5b6040514790339082156108fc029083906000818181858888f193505050501580156110b1573d6000803e3d6000fd5b604080516a5041555345525f524f4c4560a81b8152905190819003600b019020611204906110676125d4565b61123f5760405162461bcd60e51b8152600401808060200182810382526040815260200180613f256040913960400191505060405180910390fd5b61124761293d565b565b610f2e83838360405180602001604052806000815250611ed1565b61126f610f756125d4565b6112aa5760405162461bcd60e51b8152600401808060200182810382526030815260200180613ef56030913960400191505060405180910390fd5b6112b3816129dd565b50565b6000806112ca60038463ffffffff612ab616565b509392505050565b600b5460ff1690565b6000818152600e6020526040812060018101546002820154606093928392839261130488611d51565b8354604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815291869183018282801561138a5780601f1061135f5761010080835404028352916020019161138a565b820191906000526020600020905b81548152906001019060200180831161136d57829003601f168201915b5050505050935093509350935093509193509193565b60306020526000908152604090205481565b60006110e082604051806060016040528060298152602001613ce0602991396003919063ffffffff612ad216565b600060036113ed83611d51565b60038111156113f857fe5b141592915050565b604080516a4d494e5445525f524f4c4560a81b8152905190819003600b01902061142c906110676125d4565b6114675760405162461bcd60e51b815260040180806020018281038252603d815260200180613eb8603d913960400191505060405180910390fd5b61147a81611475600c612ae9565b612aed565b6112b3600c612c27565b61271081565b600a8054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610deb5780601f10610dc057610100808354040283529160200191610deb565b60006001600160a01b0382166115325760405162461bcd60e51b815260040180806020018281038252602a815260200180613cb6602a913960400191505060405180910390fd5b6001600160a01b03821660009081526002602052604090206110e090612646565b61155b6125d4565b6001600160a01b031661156c61170a565b6001600160a01b0316146115b5576040805162461bcd60e51b81526020600482018190526024820152600080516020613d9b833981519152604482015290519081900360640190fd5b600d546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600d80546001600160a01b0319169055565b600f54610100900460ff166116455760405162461bcd60e51b8152600401808060200182810382526027815260200180613b4c6027913960400191505060405180910390fd5b6116566116506125d4565b83612651565b6116915760405162461bcd60e51b815260040180806020018281038252602b815260200180613e8d602b913960400191505060405180910390fd5b610f2e8282612c30565b604080516a5041555345525f524f4c4560a81b8152905190819003600b0190206116c7906110676125d4565b6117025760405162461bcd60e51b815260040180806020018281038252603e815260200180613b73603e913960400191505060405180910390fd5b611247612c76565b600d546001600160a01b031690565b60008281526020819052604081206110dd908363ffffffff6128c216565b60008281526020819052604081206110dd908363ffffffff612cf916565b60088054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610deb5780601f10610dc057610100808354040283529160200191610deb565b600f5460ff16611805576040805162461bcd60e51b8152602060048201526015602482015274151a1948139d5c9cd95c9e481a5cc818db1bdcd959605a1b604482015290519081900360640190fd5b61180d610f3a565b6127100381111561185d576040805162461bcd60e51b8152602060048201526015602482015274139bdd08195b9bdd59da08189d5b189cc81b19599d605a1b604482015290519081900360640190fd5b612710611868610f3a565b106118b3576040805162461bcd60e51b815260206004820152601660248201527514d85b19481a185cc8185b1c9958591e48195b99195960521b604482015290519081900360640190fd5b6000811180156118c4575060148111155b6118ff5760405162461bcd60e51b8152600401808060200182810382526030815260200180613de46030913960400191505060405180910390fd5b61271061191361190d610f3a565b83612d0e565b1115611966576040805162461bcd60e51b815260206004820152601860248201527f45786365656473204d41585f43525950544f5243484944530000000000000000604482015290519081900360640190fd5b611977611971611a5c565b82612d68565b3410156119b55760405162461bcd60e51b8152600401808060200182810382526023815260200180613d096023913960400191505060405180910390fd5b60005b818110156110b1576119ca602f612c27565b60006119d6602f612ae9565b6040805160a081018252600660608201908152656772616e756d60d01b608083015281526000196020808301919091526000828401819052848152600e8252929092208151805194955091939092611a32928492910190613954565b5060208201516001820155604090910151600290910155611a533382612dc1565b506001016119b8565b600080611a67610f3a565b90506126ac8110611a8357670de0b6b3a7640000915050610df3565b61251c8110611a9d576708e1bc9bf0400000915050610df3565b611d4c8110611ab757670470de4df8200000915050610df3565b610dac8110611ad1576702386f26fc100000915050610df3565b6105dc8110611aeb5767011c37937e080000915050610df3565b6101f48110611b045766d529ae9e860000915050610df3565b668e1bc9bf040000915050610df3565b5090565b600081565b611b256125d4565b6001600160a01b0316826001600160a01b03161415611b8b576040805162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015290519081900360640190fd5b8060066000611b986125d4565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff191692151592909217909155611bdc6125d4565b60408051841515815290516001600160a01b0392909216917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319181900360200190a35050565b611c2d610f756125d4565b611c685760405162461bcd60e51b8152600401808060200182810382526027815260200180613bfb6027913960400191505060405180910390fd5b611c71816113e0565b611c7a576112b3565b6000818152600e602052604081206002810154600182015491929091611c9e612ddb565b0390506000611cb08262093a80612ddf565b905080831115611cc357505050506112b3565b6000611cd0846001612d0e565b6002909501949094555050505050565b611ce86125d4565b6001600160a01b0316611cf961170a565b6001600160a01b031614611d42576040805162461bcd60e51b81526020600482018190526024820152600080516020613d9b833981519152604482015290519081900360640190fd5b600f805460ff19166001179055565b6000611d5b6139ce565b6000838152600e60209081526040918290208251815460026001821615610100026000190190911604601f81018490049093028101608090810190945260608101838152909391928492849190840182828015611df95780601f10611dce57610100808354040283529160200191611df9565b820191906000526020600020905b815481529060010190602001808311611ddc57829003601f168201915b50505050508152602001600182015481526020016002820154815250509050806020015160001415611e2f576000915050610d5a565b60001981602001511415611e47576001915050610d5a565b60408101516020820151600090611e5c612ddb565b0390506000611e6e8262093a80612ddf565b90506000611e7f8362093a80612e46565b905081841415611e9757600295505050505050610d5a565b81611ea3856001612d0e565b148015611eb15750612a3081105b15611ec457600295505050505050610d5a565b5060039695505050505050565b611edc6116506125d4565b611f175760405162461bcd60e51b8152600401808060200182810382526031815260200180613e5c6031913960400191505060405180910390fd5b611f2384848484612ead565b50505050565b606080611f35836112db565b5091925060019150611f449050565b611f4d84611d51565b6003811115611f5857fe5b141561203657611f6661148a565b6040518060600160405280602e8152602001613b1e602e91396040516020018083805190602001908083835b60208310611fb15780518252601f199092019160209182019101611f92565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b60208310611ff95780518252601f199092019160209182019101611fda565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052915050610d5a565b600261204184611d51565b600381111561204c57fe5b14156121bd5761205a61148a565b60316000836040516020018080602001828103825283818151815260200191508051906020019080838360005b8381101561209f578181015183820152602001612087565b50505050905090810190601f1680156120cc5780820380516001836020036101000a031916815260200191505b50925050506040516020818303038152906040528051906020012081526020019081526020016000206040516020018083805190602001908083835b602083106121275780518252601f199092019160209182019101612108565b6001836020036101000a038019825116818451168082178552505050505050905001828054600181600116156101000203166002900480156121a05780601f1061217e5761010080835404028352918201916121a0565b820191906000526020600020905b81548152906001019060200180831161218c575b505092505050604051602081830303815290604052915050610d5a565b6121c561148a565b60326000836040516020018080602001828103825283818151815260200191508051906020019080838360005b8381101561220a5781810151838201526020016121f2565b50505050905090810190601f1680156122375780820380516001836020036101000a031916815260200191505b50925050506040516020818303038152906040528051906020012081526020019081526020016000206040516020018083805190602001908083835b602083106122925780518252601f199092019160209182019101612273565b6001836020036101000a0380198251168184511680821785525050505050509050018280546001816001161561010002031660029004801561230b5780601f106122e957610100808354040283529182019161230b565b820191906000526020600020905b8154815290600101906020018083116122f7575b505060408051601f198184030181529190529695505050505050565b60008181526020819052604081206110e090612646565b600e6020908152600091825260409182902080548351601f600260001961010060018616150201909316929092049182018490048402810184019094528084529092918391908301828280156123d55780601f106123aa576101008083540402835291602001916123d5565b820191906000526020600020905b8154815290600101906020018083116123b857829003601f168201915b5050505050908060010154908060020154905083565b604080516a4d494e5445525f524f4c4560a81b8152905190819003600b01902081565b60008281526020819052604090206002015461242c906110676125d4565b61113d5760405162461bcd60e51b8152600401808060200182810382526030815260200180613c4e6030913960400191505060405180910390fd5b604080516a5041555345525f524f4c4560a81b8152905190819003600b01902081565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b6124c06125d4565b6001600160a01b03166124d161170a565b6001600160a01b03161461251a576040805162461bcd60e51b81526020600482018190526024820152600080516020613d9b833981519152604482015290519081900360640190fd5b6001600160a01b03811661255f5760405162461bcd60e51b8152600401808060200182810382526026815260200180613af86026913960400191505060405180910390fd5b600d546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600d80546001600160a01b0319166001600160a01b0392909216919091179055565b612a3081565b60006110e060038363ffffffff612eff16565b3390565b600081815260056020526040902080546001600160a01b0319166001600160a01b038416908117909155819061260d826113b2565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006110e082612ae9565b600061265c826125c1565b6126975760405162461bcd60e51b815260040180806020018281038252602c815260200180613c22602c913960400191505060405180910390fd5b60006126a2836113b2565b9050806001600160a01b0316846001600160a01b031614806126dd5750836001600160a01b03166126d284610df6565b6001600160a01b0316145b806126ed57506126ed818561248a565b949350505050565b826001600160a01b0316612708826113b2565b6001600160a01b03161461274d5760405162461bcd60e51b8152600401808060200182810382526029815260200180613dbb6029913960400191505060405180910390fd5b6001600160a01b0382166127925760405162461bcd60e51b8152600401808060200182810382526024815260200180613bb16024913960400191505060405180910390fd5b61279d838383612f0b565b6127a86000826125d8565b6001600160a01b03831660009081526002602052604090206127d0908263ffffffff612f6b16565b506001600160a01b03821660009081526002602052604090206127f9908263ffffffff612f7716565b5061280c6003828463ffffffff612f8316565b5080826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6000828152602081905260409020612871908263ffffffff612f9916565b156110b15761287e6125d4565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006110dd8383612fae565b60008281526020819052604090206128ec908263ffffffff61301216565b156110b1576128f96125d4565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b6129456112d2565b61298d576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b600b805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6129c06125d4565b604080516001600160a01b039092168252519081900360200190a1565b60006129e8826113b2565b90506129f681600084612f0b565b612a016000836125d8565b6000828152600960205260409020546002600019610100600184161502019091160415612a3f576000828152600960205260408120612a3f916139ef565b6001600160a01b0381166000908152600260205260409020612a67908363ffffffff612f6b16565b50612a7960038363ffffffff61302716565b5060405182906000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6000808080612ac58686613033565b9097909650945050505050565b6000612adf8484846130ae565b90505b9392505050565b5490565b6001600160a01b038216612b48576040805162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015290519081900360640190fd5b612b51816125c1565b15612ba3576040805162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015290519081900360640190fd5b612baf60008383612f0b565b6001600160a01b0382166000908152600260205260409020612bd7908263ffffffff612f7716565b50612bea6003828463ffffffff612f8316565b5060405181906001600160a01b038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b80546001019055565b6040805142602080830191909152448284015260608083018590528351808403909101815260809092019092528051910120600090612c6f8482613178565b5092915050565b612c7e6112d2565b15612cc3576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b600b805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586129c06125d4565b60006110dd836001600160a01b0384166131d2565b6000828201838110156110dd576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082612d77575060006110e0565b82820282848281612d8457fe5b04146110dd5760405162461bcd60e51b8152600401808060200182810382526021815260200180613d4e6021913960400191505060405180910390fd5b6110b18282604051806020016040528060008152506131ea565b4290565b6000808211612e35576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381612e3e57fe5b049392505050565b6000808211612e9c576040805162461bcd60e51b815260206004820152601860248201527f536166654d6174683a206d6f64756c6f206279207a65726f0000000000000000604482015290519081900360640190fd5b818381612ea557fe5b069392505050565b612eb88484846126f5565b612ec48484848461323c565b611f235760405162461bcd60e51b8152600401808060200182810382526032815260200180613ac66032913960400191505060405180910390fd5b60006110dd83836131d2565b6001600160a01b0382161580612f255750612f25816113e0565b612f605760405162461bcd60e51b8152600401808060200182810382526027815260200180613e356027913960400191505060405180910390fd5b610f2e8383836133bc565b60006110dd83836133c7565b60006110dd838361348d565b6000612adf84846001600160a01b0385166134d7565b60006110dd836001600160a01b03841661348d565b81546000908210612ff05760405162461bcd60e51b8152600401808060200182810382526022815260200180613a4a6022913960400191505060405180910390fd5b826000018281548110612fff57fe5b9060005260206000200154905092915050565b60006110dd836001600160a01b0384166133c7565b60006110dd838361356e565b8154600090819083106130775760405162461bcd60e51b8152600401808060200182810382526022815260200180613d2c6022913960400191505060405180910390fd5b600084600001848154811061308857fe5b906000526020600020906002020190508060000154816001015492509250509250929050565b600082815260018401602052604081205482816131495760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561310e5781810151838201526020016130f6565b50505050905090810190601f16801561313b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5084600001600182038154811061315c57fe5b9060005260206000209060020201600101549150509392505050565b6000828152600e60205260409020606061319c61319784612710612e46565b613642565b80519091506131b19083906020840190613954565b506131ba612ddb565b600183015560006131ca856113b2565b505050505050565b60009081526001919091016020526040902054151590565b6131f48383612aed565b613201600084848461323c565b610f2e5760405162461bcd60e51b8152600401808060200182810382526032815260200180613ac66032913960400191505060405180910390fd5b6000613250846001600160a01b031661372e565b61325c575060016126ed565b6060613382630a85bd0160e11b6132716125d4565b88878760405160240180856001600160a01b03166001600160a01b03168152602001846001600160a01b03166001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156132ea5781810151838201526020016132d2565b50505050905090810190601f1680156133175780820380516001836020036101000a031916815260200191505b5095505050505050604051602081830303815290604052906001600160e01b0319166020820180516001600160e01b038381831617835250505050604051806060016040528060328152602001613ac6603291396001600160a01b038816919063ffffffff61373416565b9050600081806020019051602081101561339b57600080fd5b50516001600160e01b031916630a85bd0160e11b1492505050949350505050565b610f2e838383613743565b6000818152600183016020526040812054801561348357835460001980830191908101906000908790839081106133fa57fe5b906000526020600020015490508087600001848154811061341757fe5b60009182526020808320909101929092558281526001898101909252604090209084019055865487908061344757fe5b600190038181906000526020600020016000905590558660010160008781526020019081526020016000206000905560019450505050506110e0565b60009150506110e0565b600061349983836131d2565b6134cf575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556110e0565b5060006110e0565b60008281526001840160205260408120548061353c575050604080518082018252838152602080820184815286546001818101895560008981528481209551600290930290950191825591519082015586548684528188019092529290912055612ae2565b8285600001600183038154811061354f57fe5b9060005260206000209060020201600101819055506000915050612ae2565b6000818152600183016020526040812054801561348357835460001980830191908101906000908790839081106135a157fe5b90600052602060002090600202019050808760000184815481106135c157fe5b60009182526020808320845460029093020191825560019384015491840191909155835482528983019052604090209084019055865487908061360057fe5b60008281526020808220600260001990940193840201828155600190810183905592909355888152898201909252604082209190915594506110e09350505050565b606060005b600a81101561372857601081600a811061365d57fe5b601091828204019190066002029054906101000a900461ffff1661ffff16831161372057601181600a811061368e57fe5b01805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156137135780601f106136e857610100808354040283529160200191613713565b820191906000526020600020905b8154815290600101906020018083116136f657829003601f168201915b5050505050915050610d5a565b600101613647565b50919050565b3b151590565b6060612adf8484600085613792565b61374e838383610f2e565b6137566112d2565b15610f2e5760405162461bcd60e51b815260040180806020018281038252602b815260200180613a6c602b913960400191505060405180910390fd5b6060824710156137d35760405162461bcd60e51b8152600401808060200182810382526026815260200180613bd56026913960400191505060405180910390fd5b6137dc8561372e565b61382d576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b6020831061386c5780518252601f19909201916020918201910161384d565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146138ce576040519150601f19603f3d011682016040523d82523d6000602084013e6138d3565b606091505b50915091506138e38282866138ee565b979650505050505050565b606083156138fd575081612ae2565b82511561390d5782518084602001fd5b60405162461bcd60e51b815260206004820181815284516024840152845185939192839260440191908501908083836000831561310e5781810151838201526020016130f6565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061399557805160ff19168380011785556139c2565b828001600101855582156139c2579182015b828111156139c25782518255916020019190600101906139a7565b50611b14929150613a2f565b60405180606001604052806060815260200160008152602001600081525090565b50805460018160011615610100020316600290046000825580601f10613a1557506112b3565b601f0160209004906000526020600020908101906112b391905b610df391905b80821115611b145760008155600101613a3556fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e64734552433732315061757361626c653a20746f6b656e207472616e73666572207768696c6520706175736564416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e744552433732313a207472616e7366657220746f206e6f6e20455243373231526563656976657220696d706c656d656e7465724f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373516d5764316d6e374475477978394279664e6571437367645355734a5a316372616769746761796773714476456d4765726d696e6174696f6e2073746172747320323032312d30342d31325431363a30303a30305a4552433732315072657365744d696e7465725061757365724175746f49643a206d75737420686176652070617573657220726f6c6520746f2070617573654552433732313a207472616e7366657220746f20746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c4f6e6c7920746865204f776e65722063616e20776174657220612043727970744f72636869642e4552433732313a206f70657261746f7220717565727920666f72206e6f6e6578697374656e7420746f6b656e416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b654552433732313a20617070726f76652063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f76656420666f7220616c6c4552433732313a2062616c616e636520717565727920666f7220746865207a65726f20616464726573734552433732313a206f776e657220717565727920666f72206e6f6e6578697374656e7420746f6b656e45746865722076616c75652073656e742069732062656c6f7720746865207072696365456e756d657261626c654d61703a20696e646578206f7574206f6620626f756e6473536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774552433732313a20617070726f76656420717565727920666f72206e6f6e6578697374656e7420746f6b656e4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65724552433732313a207472616e73666572206f6620746f6b656e2074686174206973206e6f74206f776e596f752063616e20706c616e74206d696e696d756d20312c206d6178696d756d2032302043727970744f7263686964734552433732313a20617070726f76616c20746f2063757272656e74206f776e6572446561642043727970744f7263686964732063616e6e6f74206265207472616e736665727265644552433732313a207472616e736665722063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f7665644f6e6c7920746865204f776e65722063616e206765726d696e61746520612043727970744f72636869642e4552433732315072657365744d696e7465725061757365724175746f49643a206d7573742068617665206d696e74657220726f6c6520746f206d696e744552433732314275726e61626c653a2063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f7665644552433732315072657365744d696e7465725061757365724175746f49643a206d75737420686176652070617573657220726f6c6520746f20756e7061757365416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220669084c037e9e2730b31d45e8cd7d87fcb21b2d1237df1dee094b97b3922927264736f6c63430006060033516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f637970726970656469756d2d63616c63656f6c75732e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f64656e64726f7068796c61782d6c696e64656e69692e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f70617068696f706564696c756d2d726f7468736368696c6469616e756d2e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f706c6174616e74686572612d617a6f726963612e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f637970726970656469756d2d63616c63656f6c75732e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f7068616c61656e6f707369732d6d6963686f6c69747a69692e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f76616e64612d636f6572756c65612e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f6d696c746f6e69612d6b61796173696d61652e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f70617068696f706564696c756d2d766965746e616d656e73652e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f6775617269616e7468652d617572616e74696163612e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f7368656e7a68656e6963612d6f726368696461636561652e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f6d696c746f6e69612d6b61796173696d61652e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f76616e64612d636f6572756c65612e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f70617068696f706564696c756d2d726f7468736368696c6469616e756d2e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f6775617269616e7468652d617572616e74696163612e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f70617068696f706564696c756d2d766965746e616d656e73652e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f64656e64726f7068796c61782d6c696e64656e69692e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f7068616c61656e6f707369732d6d6963686f6c69747a69692e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f7368656e7a68656e6963612d6f726368696461636561652e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f706c6174616e74686572612d617a6f726963612e6a736f6e", + "deployedBytecode": "0x6080604052600436106102e85760003560e01c80636c0360eb11610190578063a7eec44b116100dc578063cac21c8f11610095578063e63ab1e91161006f578063e63ab1e914610ca4578063e985e9c514610cb9578063f2fde38b14610cf4578063ffee200c14610d27576102ef565b8063cac21c8f14610ba6578063d539139314610c56578063d547741f14610c6b576102ef565b8063a7eec44b146109f2578063b66a0e5d14610a1c578063b7aaba2014610a31578063b88d4fde14610a7f578063c87b56dd14610b52578063ca15c87314610b7c576102ef565b80639010d07c116101495780639981d4a1116101235780639981d4a1146109705780639d1b464a1461098d578063a217fddf146109a2578063a22cb465146109b7576102ef565b80639010d07c146108f257806391d148541461092257806395d89b411461095b576102ef565b80636c0360eb1461083b57806370a0823114610850578063715018a6146108835780637fd8d953146108985780638456cb59146108c85780638da5cb5b146108dd576102ef565b806336568abe1161024f5780635c975abb116102085780636352211e116101e25780636352211e1461079f5780636573c787146107c95780636a627842146107f35780636b0c004d14610826576102ef565b80635c975abb1461069b57806360316801146106b057806362ff09d614610775576102ef565b806336568abe146105a15780633ccfd60b146105da5780633f4ba83a146105ef57806342842e0e1461060457806342966c68146106475780634f6ccce714610671576102ef565b8063182199cd116102a1578063182199cd1461048357806323b872dd146104ad578063248a9ca3146104f0578063277dec921461051a5780632f2ff15d1461052f5780632f745c5914610568576102ef565b806301ffc9a7146102f457806306fdde031461033c578063081812fc146103c6578063095ea7b31461040c578063179f0b0a1461044757806318160ddd1461046e576102ef565b366102ef57005b600080fd5b34801561030057600080fd5b506103286004803603602081101561031757600080fd5b50356001600160e01b031916610d3c565b604080519115158252519081900360200190f35b34801561034857600080fd5b50610351610d5f565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561038b578181015183820152602001610373565b50505050905090810190601f1680156103b85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156103d257600080fd5b506103f0600480360360208110156103e957600080fd5b5035610df6565b604080516001600160a01b039092168252519081900360200190f35b34801561041857600080fd5b506104456004803603604081101561042f57600080fd5b506001600160a01b038135169060200135610e58565b005b34801561045357600080fd5b5061045c610f33565b60408051918252519081900360200190f35b34801561047a57600080fd5b5061045c610f3a565b34801561048f57600080fd5b50610328600480360360208110156104a657600080fd5b5035610f4b565b3480156104b957600080fd5b50610445600480360360608110156104d057600080fd5b506001600160a01b03813581169160208101359091169060400135610f6a565b3480156104fc57600080fd5b5061045c6004803603602081101561051357600080fd5b5035610fc1565b34801561052657600080fd5b50610445610fd6565b34801561053b57600080fd5b506104456004803603604081101561055257600080fd5b50803590602001356001600160a01b0316611049565b34801561057457600080fd5b5061045c6004803603604081101561058b57600080fd5b506001600160a01b0381351690602001356110b5565b3480156105ad57600080fd5b50610445600480360360408110156105c457600080fd5b50803590602001356001600160a01b03166110e6565b3480156105e657600080fd5b50610445611147565b3480156105fb57600080fd5b506104456111d8565b34801561061057600080fd5b506104456004803603606081101561062757600080fd5b506001600160a01b03813581169160208101359091169060400135611249565b34801561065357600080fd5b506104456004803603602081101561066a57600080fd5b5035611264565b34801561067d57600080fd5b5061045c6004803603602081101561069457600080fd5b50356112b6565b3480156106a757600080fd5b506103286112d2565b3480156106bc57600080fd5b506106da600480360360208110156106d357600080fd5b50356112db565b60405180806020018581526020018481526020018360038111156106fa57fe5b60ff168152602001828103825286818151815260200191508051906020019080838360005b8381101561073757818101518382015260200161071f565b50505050905090810190601f1680156107645780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b34801561078157600080fd5b5061045c6004803603602081101561079857600080fd5b50356113a0565b3480156107ab57600080fd5b506103f0600480360360208110156107c257600080fd5b50356113b2565b3480156107d557600080fd5b50610328600480360360208110156107ec57600080fd5b50356113e0565b3480156107ff57600080fd5b506104456004803603602081101561081657600080fd5b50356001600160a01b0316611400565b34801561083257600080fd5b5061045c611484565b34801561084757600080fd5b5061035161148a565b34801561085c57600080fd5b5061045c6004803603602081101561087357600080fd5b50356001600160a01b03166114eb565b34801561088f57600080fd5b50610445611553565b3480156108a457600080fd5b50610445600480360360408110156108bb57600080fd5b50803590602001356115ff565b3480156108d457600080fd5b5061044561169b565b3480156108e957600080fd5b506103f061170a565b3480156108fe57600080fd5b506103f06004803603604081101561091557600080fd5b5080359060200135611719565b34801561092e57600080fd5b506103286004803603604081101561094557600080fd5b50803590602001356001600160a01b0316611737565b34801561096757600080fd5b50610351611755565b6104456004803603602081101561098657600080fd5b50356117b6565b34801561099957600080fd5b5061045c611a5c565b3480156109ae57600080fd5b5061045c611b18565b3480156109c357600080fd5b50610445600480360360408110156109da57600080fd5b506001600160a01b0381351690602001351515611b1d565b3480156109fe57600080fd5b5061044560048036036020811015610a1557600080fd5b5035611c22565b348015610a2857600080fd5b50610445611ce0565b348015610a3d57600080fd5b50610a5b60048036036020811015610a5457600080fd5b5035611d51565b60405180826003811115610a6b57fe5b60ff16815260200191505060405180910390f35b348015610a8b57600080fd5b5061044560048036036080811015610aa257600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135640100000000811115610add57600080fd5b820183602082011115610aef57600080fd5b80359060200191846001830284011164010000000083111715610b1157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611ed1945050505050565b348015610b5e57600080fd5b5061035160048036036020811015610b7557600080fd5b5035611f29565b348015610b8857600080fd5b5061045c60048036036020811015610b9f57600080fd5b5035612327565b348015610bb257600080fd5b50610bd060048036036020811015610bc957600080fd5b503561233e565b6040518080602001848152602001838152602001828103825285818151815260200191508051906020019080838360005b83811015610c19578181015183820152602001610c01565b50505050905090810190601f168015610c465780820380516001836020036101000a031916815260200191505b5094505050505060405180910390f35b348015610c6257600080fd5b5061045c6123eb565b348015610c7757600080fd5b5061044560048036036040811015610c8e57600080fd5b50803590602001356001600160a01b031661240e565b348015610cb057600080fd5b5061045c612467565b348015610cc557600080fd5b5061032860048036036040811015610cdc57600080fd5b506001600160a01b038135811691602001351661248a565b348015610d0057600080fd5b5061044560048036036020811015610d1757600080fd5b50356001600160a01b03166124b8565b348015610d3357600080fd5b5061045c6125bb565b6001600160e01b0319811660009081526001602052604090205460ff165b919050565b60078054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610deb5780601f10610dc057610100808354040283529160200191610deb565b820191906000526020600020905b815481529060010190602001808311610dce57829003601f168201915b505050505090505b90565b6000610e01826125c1565b610e3c5760405162461bcd60e51b815260040180806020018281038252602c815260200180613d6f602c913960400191505060405180910390fd5b506000908152600560205260409020546001600160a01b031690565b6000610e63826113b2565b9050806001600160a01b0316836001600160a01b03161415610eb65760405162461bcd60e51b8152600401808060200182810382526021815260200180613e146021913960400191505060405180910390fd5b806001600160a01b0316610ec86125d4565b6001600160a01b03161480610ee95750610ee981610ee46125d4565b61248a565b610f245760405162461bcd60e51b8152600401808060200182810382526038815260200180613c7e6038913960400191505060405180910390fd5b610f2e83836125d8565b505050565b62093a8081565b6000610f466003612646565b905090565b60006002610f5883611d51565b6003811115610f6357fe5b1492915050565b610f7b610f756125d4565b82612651565b610fb65760405162461bcd60e51b8152600401808060200182810382526031815260200180613e5c6031913960400191505060405180910390fd5b610f2e8383836126f5565b60009081526020819052604090206002015490565b610fde6125d4565b6001600160a01b0316610fef61170a565b6001600160a01b031614611038576040805162461bcd60e51b81526020600482018190526024820152600080516020613d9b833981519152604482015290519081900360640190fd5b600f805461ff001916610100179055565b60008281526020819052604090206002015461106c906110676125d4565b611737565b6110a75760405162461bcd60e51b815260040180806020018281038252602f815260200180613a97602f913960400191505060405180910390fd5b6110b18282612853565b5050565b6001600160a01b03821660009081526002602052604081206110dd908363ffffffff6128c216565b90505b92915050565b6110ee6125d4565b6001600160a01b0316816001600160a01b03161461113d5760405162461bcd60e51b815260040180806020018281038252602f815260200180613f65602f913960400191505060405180910390fd5b6110b182826128ce565b61114f6125d4565b6001600160a01b031661116061170a565b6001600160a01b0316146111a9576040805162461bcd60e51b81526020600482018190526024820152600080516020613d9b833981519152604482015290519081900360640190fd5b6040514790339082156108fc029083906000818181858888f193505050501580156110b1573d6000803e3d6000fd5b604080516a5041555345525f524f4c4560a81b8152905190819003600b019020611204906110676125d4565b61123f5760405162461bcd60e51b8152600401808060200182810382526040815260200180613f256040913960400191505060405180910390fd5b61124761293d565b565b610f2e83838360405180602001604052806000815250611ed1565b61126f610f756125d4565b6112aa5760405162461bcd60e51b8152600401808060200182810382526030815260200180613ef56030913960400191505060405180910390fd5b6112b3816129dd565b50565b6000806112ca60038463ffffffff612ab616565b509392505050565b600b5460ff1690565b6000818152600e6020526040812060018101546002820154606093928392839261130488611d51565b8354604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815291869183018282801561138a5780601f1061135f5761010080835404028352916020019161138a565b820191906000526020600020905b81548152906001019060200180831161136d57829003601f168201915b5050505050935093509350935093509193509193565b60306020526000908152604090205481565b60006110e082604051806060016040528060298152602001613ce0602991396003919063ffffffff612ad216565b600060036113ed83611d51565b60038111156113f857fe5b141592915050565b604080516a4d494e5445525f524f4c4560a81b8152905190819003600b01902061142c906110676125d4565b6114675760405162461bcd60e51b815260040180806020018281038252603d815260200180613eb8603d913960400191505060405180910390fd5b61147a81611475600c612ae9565b612aed565b6112b3600c612c27565b61271081565b600a8054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610deb5780601f10610dc057610100808354040283529160200191610deb565b60006001600160a01b0382166115325760405162461bcd60e51b815260040180806020018281038252602a815260200180613cb6602a913960400191505060405180910390fd5b6001600160a01b03821660009081526002602052604090206110e090612646565b61155b6125d4565b6001600160a01b031661156c61170a565b6001600160a01b0316146115b5576040805162461bcd60e51b81526020600482018190526024820152600080516020613d9b833981519152604482015290519081900360640190fd5b600d546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600d80546001600160a01b0319169055565b600f54610100900460ff166116455760405162461bcd60e51b8152600401808060200182810382526027815260200180613b4c6027913960400191505060405180910390fd5b6116566116506125d4565b83612651565b6116915760405162461bcd60e51b815260040180806020018281038252602b815260200180613e8d602b913960400191505060405180910390fd5b610f2e8282612c30565b604080516a5041555345525f524f4c4560a81b8152905190819003600b0190206116c7906110676125d4565b6117025760405162461bcd60e51b815260040180806020018281038252603e815260200180613b73603e913960400191505060405180910390fd5b611247612c76565b600d546001600160a01b031690565b60008281526020819052604081206110dd908363ffffffff6128c216565b60008281526020819052604081206110dd908363ffffffff612cf916565b60088054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610deb5780601f10610dc057610100808354040283529160200191610deb565b600f5460ff16611805576040805162461bcd60e51b8152602060048201526015602482015274151a1948139d5c9cd95c9e481a5cc818db1bdcd959605a1b604482015290519081900360640190fd5b61180d610f3a565b6127100381111561185d576040805162461bcd60e51b8152602060048201526015602482015274139bdd08195b9bdd59da08189d5b189cc81b19599d605a1b604482015290519081900360640190fd5b612710611868610f3a565b106118b3576040805162461bcd60e51b815260206004820152601660248201527514d85b19481a185cc8185b1c9958591e48195b99195960521b604482015290519081900360640190fd5b6000811180156118c4575060148111155b6118ff5760405162461bcd60e51b8152600401808060200182810382526030815260200180613de46030913960400191505060405180910390fd5b61271061191361190d610f3a565b83612d0e565b1115611966576040805162461bcd60e51b815260206004820152601860248201527f45786365656473204d41585f43525950544f5243484944530000000000000000604482015290519081900360640190fd5b611977611971611a5c565b82612d68565b3410156119b55760405162461bcd60e51b8152600401808060200182810382526023815260200180613d096023913960400191505060405180910390fd5b60005b818110156110b1576119ca602f612c27565b60006119d6602f612ae9565b6040805160a081018252600660608201908152656772616e756d60d01b608083015281526000196020808301919091526000828401819052848152600e8252929092208151805194955091939092611a32928492910190613954565b5060208201516001820155604090910151600290910155611a533382612dc1565b506001016119b8565b600080611a67610f3a565b90506126ac8110611a8357670de0b6b3a7640000915050610df3565b61251c8110611a9d576708e1bc9bf0400000915050610df3565b611d4c8110611ab757670470de4df8200000915050610df3565b610dac8110611ad1576702386f26fc100000915050610df3565b6105dc8110611aeb5767011c37937e080000915050610df3565b6101f48110611b045766d529ae9e860000915050610df3565b668e1bc9bf040000915050610df3565b5090565b600081565b611b256125d4565b6001600160a01b0316826001600160a01b03161415611b8b576040805162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015290519081900360640190fd5b8060066000611b986125d4565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff191692151592909217909155611bdc6125d4565b60408051841515815290516001600160a01b0392909216917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319181900360200190a35050565b611c2d610f756125d4565b611c685760405162461bcd60e51b8152600401808060200182810382526027815260200180613bfb6027913960400191505060405180910390fd5b611c71816113e0565b611c7a576112b3565b6000818152600e602052604081206002810154600182015491929091611c9e612ddb565b0390506000611cb08262093a80612ddf565b905080831115611cc357505050506112b3565b6000611cd0846001612d0e565b6002909501949094555050505050565b611ce86125d4565b6001600160a01b0316611cf961170a565b6001600160a01b031614611d42576040805162461bcd60e51b81526020600482018190526024820152600080516020613d9b833981519152604482015290519081900360640190fd5b600f805460ff19166001179055565b6000611d5b6139ce565b6000838152600e60209081526040918290208251815460026001821615610100026000190190911604601f81018490049093028101608090810190945260608101838152909391928492849190840182828015611df95780601f10611dce57610100808354040283529160200191611df9565b820191906000526020600020905b815481529060010190602001808311611ddc57829003601f168201915b50505050508152602001600182015481526020016002820154815250509050806020015160001415611e2f576000915050610d5a565b60001981602001511415611e47576001915050610d5a565b60408101516020820151600090611e5c612ddb565b0390506000611e6e8262093a80612ddf565b90506000611e7f8362093a80612e46565b905081841415611e9757600295505050505050610d5a565b81611ea3856001612d0e565b148015611eb15750612a3081105b15611ec457600295505050505050610d5a565b5060039695505050505050565b611edc6116506125d4565b611f175760405162461bcd60e51b8152600401808060200182810382526031815260200180613e5c6031913960400191505060405180910390fd5b611f2384848484612ead565b50505050565b606080611f35836112db565b5091925060019150611f449050565b611f4d84611d51565b6003811115611f5857fe5b141561203657611f6661148a565b6040518060600160405280602e8152602001613b1e602e91396040516020018083805190602001908083835b60208310611fb15780518252601f199092019160209182019101611f92565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b60208310611ff95780518252601f199092019160209182019101611fda565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052915050610d5a565b600261204184611d51565b600381111561204c57fe5b14156121bd5761205a61148a565b60316000836040516020018080602001828103825283818151815260200191508051906020019080838360005b8381101561209f578181015183820152602001612087565b50505050905090810190601f1680156120cc5780820380516001836020036101000a031916815260200191505b50925050506040516020818303038152906040528051906020012081526020019081526020016000206040516020018083805190602001908083835b602083106121275780518252601f199092019160209182019101612108565b6001836020036101000a038019825116818451168082178552505050505050905001828054600181600116156101000203166002900480156121a05780601f1061217e5761010080835404028352918201916121a0565b820191906000526020600020905b81548152906001019060200180831161218c575b505092505050604051602081830303815290604052915050610d5a565b6121c561148a565b60326000836040516020018080602001828103825283818151815260200191508051906020019080838360005b8381101561220a5781810151838201526020016121f2565b50505050905090810190601f1680156122375780820380516001836020036101000a031916815260200191505b50925050506040516020818303038152906040528051906020012081526020019081526020016000206040516020018083805190602001908083835b602083106122925780518252601f199092019160209182019101612273565b6001836020036101000a0380198251168184511680821785525050505050509050018280546001816001161561010002031660029004801561230b5780601f106122e957610100808354040283529182019161230b565b820191906000526020600020905b8154815290600101906020018083116122f7575b505060408051601f198184030181529190529695505050505050565b60008181526020819052604081206110e090612646565b600e6020908152600091825260409182902080548351601f600260001961010060018616150201909316929092049182018490048402810184019094528084529092918391908301828280156123d55780601f106123aa576101008083540402835291602001916123d5565b820191906000526020600020905b8154815290600101906020018083116123b857829003601f168201915b5050505050908060010154908060020154905083565b604080516a4d494e5445525f524f4c4560a81b8152905190819003600b01902081565b60008281526020819052604090206002015461242c906110676125d4565b61113d5760405162461bcd60e51b8152600401808060200182810382526030815260200180613c4e6030913960400191505060405180910390fd5b604080516a5041555345525f524f4c4560a81b8152905190819003600b01902081565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b6124c06125d4565b6001600160a01b03166124d161170a565b6001600160a01b03161461251a576040805162461bcd60e51b81526020600482018190526024820152600080516020613d9b833981519152604482015290519081900360640190fd5b6001600160a01b03811661255f5760405162461bcd60e51b8152600401808060200182810382526026815260200180613af86026913960400191505060405180910390fd5b600d546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600d80546001600160a01b0319166001600160a01b0392909216919091179055565b612a3081565b60006110e060038363ffffffff612eff16565b3390565b600081815260056020526040902080546001600160a01b0319166001600160a01b038416908117909155819061260d826113b2565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006110e082612ae9565b600061265c826125c1565b6126975760405162461bcd60e51b815260040180806020018281038252602c815260200180613c22602c913960400191505060405180910390fd5b60006126a2836113b2565b9050806001600160a01b0316846001600160a01b031614806126dd5750836001600160a01b03166126d284610df6565b6001600160a01b0316145b806126ed57506126ed818561248a565b949350505050565b826001600160a01b0316612708826113b2565b6001600160a01b03161461274d5760405162461bcd60e51b8152600401808060200182810382526029815260200180613dbb6029913960400191505060405180910390fd5b6001600160a01b0382166127925760405162461bcd60e51b8152600401808060200182810382526024815260200180613bb16024913960400191505060405180910390fd5b61279d838383612f0b565b6127a86000826125d8565b6001600160a01b03831660009081526002602052604090206127d0908263ffffffff612f6b16565b506001600160a01b03821660009081526002602052604090206127f9908263ffffffff612f7716565b5061280c6003828463ffffffff612f8316565b5080826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6000828152602081905260409020612871908263ffffffff612f9916565b156110b15761287e6125d4565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006110dd8383612fae565b60008281526020819052604090206128ec908263ffffffff61301216565b156110b1576128f96125d4565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b6129456112d2565b61298d576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b600b805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6129c06125d4565b604080516001600160a01b039092168252519081900360200190a1565b60006129e8826113b2565b90506129f681600084612f0b565b612a016000836125d8565b6000828152600960205260409020546002600019610100600184161502019091160415612a3f576000828152600960205260408120612a3f916139ef565b6001600160a01b0381166000908152600260205260409020612a67908363ffffffff612f6b16565b50612a7960038363ffffffff61302716565b5060405182906000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6000808080612ac58686613033565b9097909650945050505050565b6000612adf8484846130ae565b90505b9392505050565b5490565b6001600160a01b038216612b48576040805162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015290519081900360640190fd5b612b51816125c1565b15612ba3576040805162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015290519081900360640190fd5b612baf60008383612f0b565b6001600160a01b0382166000908152600260205260409020612bd7908263ffffffff612f7716565b50612bea6003828463ffffffff612f8316565b5060405181906001600160a01b038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b80546001019055565b6040805142602080830191909152448284015260608083018590528351808403909101815260809092019092528051910120600090612c6f8482613178565b5092915050565b612c7e6112d2565b15612cc3576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b600b805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586129c06125d4565b60006110dd836001600160a01b0384166131d2565b6000828201838110156110dd576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082612d77575060006110e0565b82820282848281612d8457fe5b04146110dd5760405162461bcd60e51b8152600401808060200182810382526021815260200180613d4e6021913960400191505060405180910390fd5b6110b18282604051806020016040528060008152506131ea565b4290565b6000808211612e35576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381612e3e57fe5b049392505050565b6000808211612e9c576040805162461bcd60e51b815260206004820152601860248201527f536166654d6174683a206d6f64756c6f206279207a65726f0000000000000000604482015290519081900360640190fd5b818381612ea557fe5b069392505050565b612eb88484846126f5565b612ec48484848461323c565b611f235760405162461bcd60e51b8152600401808060200182810382526032815260200180613ac66032913960400191505060405180910390fd5b60006110dd83836131d2565b6001600160a01b0382161580612f255750612f25816113e0565b612f605760405162461bcd60e51b8152600401808060200182810382526027815260200180613e356027913960400191505060405180910390fd5b610f2e8383836133bc565b60006110dd83836133c7565b60006110dd838361348d565b6000612adf84846001600160a01b0385166134d7565b60006110dd836001600160a01b03841661348d565b81546000908210612ff05760405162461bcd60e51b8152600401808060200182810382526022815260200180613a4a6022913960400191505060405180910390fd5b826000018281548110612fff57fe5b9060005260206000200154905092915050565b60006110dd836001600160a01b0384166133c7565b60006110dd838361356e565b8154600090819083106130775760405162461bcd60e51b8152600401808060200182810382526022815260200180613d2c6022913960400191505060405180910390fd5b600084600001848154811061308857fe5b906000526020600020906002020190508060000154816001015492509250509250929050565b600082815260018401602052604081205482816131495760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561310e5781810151838201526020016130f6565b50505050905090810190601f16801561313b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5084600001600182038154811061315c57fe5b9060005260206000209060020201600101549150509392505050565b6000828152600e60205260409020606061319c61319784612710612e46565b613642565b80519091506131b19083906020840190613954565b506131ba612ddb565b600183015560006131ca856113b2565b505050505050565b60009081526001919091016020526040902054151590565b6131f48383612aed565b613201600084848461323c565b610f2e5760405162461bcd60e51b8152600401808060200182810382526032815260200180613ac66032913960400191505060405180910390fd5b6000613250846001600160a01b031661372e565b61325c575060016126ed565b6060613382630a85bd0160e11b6132716125d4565b88878760405160240180856001600160a01b03166001600160a01b03168152602001846001600160a01b03166001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156132ea5781810151838201526020016132d2565b50505050905090810190601f1680156133175780820380516001836020036101000a031916815260200191505b5095505050505050604051602081830303815290604052906001600160e01b0319166020820180516001600160e01b038381831617835250505050604051806060016040528060328152602001613ac6603291396001600160a01b038816919063ffffffff61373416565b9050600081806020019051602081101561339b57600080fd5b50516001600160e01b031916630a85bd0160e11b1492505050949350505050565b610f2e838383613743565b6000818152600183016020526040812054801561348357835460001980830191908101906000908790839081106133fa57fe5b906000526020600020015490508087600001848154811061341757fe5b60009182526020808320909101929092558281526001898101909252604090209084019055865487908061344757fe5b600190038181906000526020600020016000905590558660010160008781526020019081526020016000206000905560019450505050506110e0565b60009150506110e0565b600061349983836131d2565b6134cf575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556110e0565b5060006110e0565b60008281526001840160205260408120548061353c575050604080518082018252838152602080820184815286546001818101895560008981528481209551600290930290950191825591519082015586548684528188019092529290912055612ae2565b8285600001600183038154811061354f57fe5b9060005260206000209060020201600101819055506000915050612ae2565b6000818152600183016020526040812054801561348357835460001980830191908101906000908790839081106135a157fe5b90600052602060002090600202019050808760000184815481106135c157fe5b60009182526020808320845460029093020191825560019384015491840191909155835482528983019052604090209084019055865487908061360057fe5b60008281526020808220600260001990940193840201828155600190810183905592909355888152898201909252604082209190915594506110e09350505050565b606060005b600a81101561372857601081600a811061365d57fe5b601091828204019190066002029054906101000a900461ffff1661ffff16831161372057601181600a811061368e57fe5b01805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156137135780601f106136e857610100808354040283529160200191613713565b820191906000526020600020905b8154815290600101906020018083116136f657829003601f168201915b5050505050915050610d5a565b600101613647565b50919050565b3b151590565b6060612adf8484600085613792565b61374e838383610f2e565b6137566112d2565b15610f2e5760405162461bcd60e51b815260040180806020018281038252602b815260200180613a6c602b913960400191505060405180910390fd5b6060824710156137d35760405162461bcd60e51b8152600401808060200182810382526026815260200180613bd56026913960400191505060405180910390fd5b6137dc8561372e565b61382d576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b6020831061386c5780518252601f19909201916020918201910161384d565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146138ce576040519150601f19603f3d011682016040523d82523d6000602084013e6138d3565b606091505b50915091506138e38282866138ee565b979650505050505050565b606083156138fd575081612ae2565b82511561390d5782518084602001fd5b60405162461bcd60e51b815260206004820181815284516024840152845185939192839260440191908501908083836000831561310e5781810151838201526020016130f6565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061399557805160ff19168380011785556139c2565b828001600101855582156139c2579182015b828111156139c25782518255916020019190600101906139a7565b50611b14929150613a2f565b60405180606001604052806060815260200160008152602001600081525090565b50805460018160011615610100020316600290046000825580601f10613a1557506112b3565b601f0160209004906000526020600020908101906112b391905b610df391905b80821115611b145760008155600101613a3556fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e64734552433732315061757361626c653a20746f6b656e207472616e73666572207768696c6520706175736564416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e744552433732313a207472616e7366657220746f206e6f6e20455243373231526563656976657220696d706c656d656e7465724f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373516d5764316d6e374475477978394279664e6571437367645355734a5a316372616769746761796773714476456d4765726d696e6174696f6e2073746172747320323032312d30342d31325431363a30303a30305a4552433732315072657365744d696e7465725061757365724175746f49643a206d75737420686176652070617573657220726f6c6520746f2070617573654552433732313a207472616e7366657220746f20746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c4f6e6c7920746865204f776e65722063616e20776174657220612043727970744f72636869642e4552433732313a206f70657261746f7220717565727920666f72206e6f6e6578697374656e7420746f6b656e416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b654552433732313a20617070726f76652063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f76656420666f7220616c6c4552433732313a2062616c616e636520717565727920666f7220746865207a65726f20616464726573734552433732313a206f776e657220717565727920666f72206e6f6e6578697374656e7420746f6b656e45746865722076616c75652073656e742069732062656c6f7720746865207072696365456e756d657261626c654d61703a20696e646578206f7574206f6620626f756e6473536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774552433732313a20617070726f76656420717565727920666f72206e6f6e6578697374656e7420746f6b656e4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65724552433732313a207472616e73666572206f6620746f6b656e2074686174206973206e6f74206f776e596f752063616e20706c616e74206d696e696d756d20312c206d6178696d756d2032302043727970744f7263686964734552433732313a20617070726f76616c20746f2063757272656e74206f776e6572446561642043727970744f7263686964732063616e6e6f74206265207472616e736665727265644552433732313a207472616e736665722063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f7665644f6e6c7920746865204f776e65722063616e206765726d696e61746520612043727970744f72636869642e4552433732315072657365744d696e7465725061757365724175746f49643a206d7573742068617665206d696e74657220726f6c6520746f206d696e744552433732314275726e61626c653a2063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f7665644552433732315072657365744d696e7465725061757365724175746f49643a206d75737420686176652070617573657220726f6c6520746f20756e7061757365416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220669084c037e9e2730b31d45e8cd7d87fcb21b2d1237df1dee094b97b3922927264736f6c63430006060033", + "linkReferences": {}, + "deployedLinkReferences": {}, + "devdoc": { + "methods": { + "approve(address,uint256)": { + "details": "See {IERC721-approve}." + }, + "balanceOf(address)": { + "details": "See {IERC721-balanceOf}." + }, + "baseURI()": { + "details": "Returns the base URI set via {_setBaseURI}. This will be automatically added as a prefix in {tokenURI} to each token's URI, or to the token ID if no specific URI is set for that token ID." + }, + "burn(uint256)": { + "details": "Burns `tokenId`. See {ERC721-_burn}. * Requirements: * - The caller must own `tokenId` or be an approved operator." + }, + "getApproved(uint256)": { + "details": "See {IERC721-getApproved}." + }, + "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." + }, + "hasRole(bytes32,address)": { + "details": "Returns `true` if `account` has been granted `role`." + }, + "isApprovedForAll(address,address)": { + "details": "See {IERC721-isApprovedForAll}." + }, + "mint(address)": { + "details": "Creates a new token for `to`. Its token ID will be automatically assigned (and available on the emitted {IERC721-Transfer} event), and the token URI autogenerated based on the base URI passed at construction. * See {ERC721-_mint}. * Requirements: * - the caller must have the `MINTER_ROLE`." + }, + "name()": { + "details": "See {IERC721Metadata-name}." + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "ownerOf(uint256)": { + "details": "See {IERC721-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." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. * NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "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 granted `role`, emits a {RoleRevoked} event. * Requirements: * - the caller must be `account`." + }, + "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." + }, + "safeTransferFrom(address,address,uint256)": { + "details": "See {IERC721-safeTransferFrom}." + }, + "safeTransferFrom(address,address,uint256,bytes)": { + "details": "See {IERC721-safeTransferFrom}." + }, + "setApprovalForAll(address,bool)": { + "details": "See {IERC721-setApprovalForAll}." + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}. * Time complexity O(1), guaranteed to always use less than 30 000 gas." + }, + "symbol()": { + "details": "See {IERC721Metadata-symbol}." + }, + "tokenByIndex(uint256)": { + "details": "See {IERC721Enumerable-tokenByIndex}." + }, + "tokenOfOwnerByIndex(address,uint256)": { + "details": "See {IERC721Enumerable-tokenOfOwnerByIndex}." + }, + "totalSupply()": { + "details": "See {IERC721Enumerable-totalSupply}." + }, + "transferFrom(address,address,uint256)": { + "details": "See {IERC721-transferFrom}." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "unpause()": { + "details": "Unpauses all token transfers. * See {ERC721Pausable} and {Pausable-_unpause}. * Requirements: * - the caller must have the `PAUSER_ROLE`." + }, + "withdraw()": { + "details": "Withdraw ether from this contract (Callable by owner only)" + } + } + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "600f805461ffff191690556101c060405260006080908152610c0260a0526117ba60c052611f8a60e0526123726101005261256661012052612660610140526126c4610160526126f66101805261270f6101a0526200006390601090600a62000b0c565b506040805161018081018252601761014082019081527f7368656e7a68656e696361206f72636869646163656165000000000000000000610160830152815281518083018352601881527f7068616c61656e6f70736973206d6963686f6c69747a69690000000000000000602082810191909152808301919091528251808401845260158082527f6775617269616e74686520617572616e74696163610000000000000000000000828401528385019190915283518085018552600e81526d76616e646120636f6572756c656160901b818401526060840152835180850185528181527f637970726970656469756d2063616c63656f6c7573000000000000000000000081840152608084015283518085018552601981527f70617068696f706564696c756d20766965746e616d656e7365000000000000008184015260a08401528351808501855260128152716d696c746f6e6961206b61796173696d616560701b8184015260c084015283518085018552601381527f706c6174616e746865726120617a6f72696361000000000000000000000000008184015260e0840152835180850185529081527f64656e64726f7068796c6178206c696e64656e69690000000000000000000000818301526101008301528251808401909352601d83527f70617068696f706564696c756d20726f7468736368696c6469616e756d000000908301526101208101919091526200028390601190600a62000ba9565b50604080516101c08101909152604b610140820181815282916200505f61016084013981526020016040518060800160405280604c815260200162004ef5604c9139815260200160405180608001604052806049815260200162005183604991398152602001604051806080016040528060428152602001620050f060429139815260200160405180608001604052806049815260200162004eac6049913981526020016040518060800160405280604d815260200162004fc9604d91398152602001604051806080016040528060468152602001620050aa604691398152602001604051806080016040528060478152602001620052f96047913981526020016040518060800160405280604981526020016200521960499139815260200160405180608001604052806051815260200162004e14605191399052620003cf90601b90600a62000ba9565b50604080516101c08101909152604b61014082018181528291620052ae61016084013981526020016040518060800160405280604c815260200162005262604c913981526020016040518060800160405280604981526020016200501660499139815260200160405180608001604052806042815260200162004f4160429139815260200160405180608001604052806049815260200162004d826049913981526020016040518060800160405280604d8152602001620051cc604d9139815260200160405180608001604052806046815260200162004f8360469139815260200160405180608001604052806047815260200162004e6560479139815260200160405180608001604052806049815260200162004dcb604991398152602001604051806080016040528060518152602001620051326051913990526200051b90602590600a62000ba9565b506040518060400160405280600c81526020016b43727970744f72636869647360a01b8152506040518060400160405280600581526020016413d490d21160da1b81525060405180604001604052806007815260200166697066733a2f2f60c81b8152508282620005996301ffc9a760e01b6200093660201b60201c565b8151620005ae90600790602085019062000bfc565b508051620005c490600890602084019062000bfc565b50620005e06380ac58cd60e01b6001600160e01b036200093616565b620005fb635b5e139f60e01b6001600160e01b036200093616565b6200061663780e9d6360e01b6001600160e01b036200093616565b5050600b805460ff191690556200064a60006200063b6001600160e01b03620009be16565b6001600160e01b03620009c316565b604080516a4d494e5445525f524f4c4560a81b8152905190819003600b01902062000682906200063b6001600160e01b03620009be16565b604080516a5041555345525f524f4c4560a81b8152905190819003600b019020620006ba906200063b6001600160e01b03620009be16565b620006ce816001600160e01b03620009dc16565b5050506000620006e3620009be60201b60201c565b600d80546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35060005b600a8110156200092f57601b81600a81106200074c57fe5b0160316000601184600a81106200075f57fe5b6040805160208082019081529290930180546002600182161561010002600019019091160491840182905292829160609091019084908015620007e65780601f10620007ba57610100808354040283529160200191620007e6565b820191906000526020600020905b815481529060010190602001808311620007c857829003601f168201915b50509250505060405160208183030381529060405280519060200120815260200190815260200160002090805460018160011615610100020316600290046200083192919062000c7d565b50602581600a81106200084057fe5b0160326000601184600a81106200085357fe5b6040805160208082019081529290930180546002600182161561010002600019019091160491840182905292829160609091019084908015620008da5780601f10620008ae57610100808354040283529160200191620008da565b820191906000526020600020905b815481529060010190602001808311620008bc57829003601f168201915b50509250505060405160208183030381529060405280519060200120815260200190815260200160002090805460018160011615610100020316600290046200092592919062000c7d565b5060010162000734565b5062000da9565b6001600160e01b0319808216141562000996576040805162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604482015290519081900360640190fd5b6001600160e01b0319166000908152600160208190526040909120805460ff19169091179055565b335b90565b620009d882826001600160e01b03620009f116565b5050565b8051620009d890600a90602084019062000bfc565b60008281526020818152604090912062000a1691839062002f9962000a73821b17901c565b15620009d85762000a2f6001600160e01b03620009be16565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600062000a93836001600160a01b0384166001600160e01b0362000a9c16565b90505b92915050565b600062000ab383836001600160e01b0362000af416565b62000aeb5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000a96565b50600062000a96565b60009081526001919091016020526040902054151590565b60018301918390821562000b975791602002820160005b8382111562000b6557835183826101000a81548161ffff021916908361ffff160217905550926020019260020160208160010104928301926001030262000b23565b801562000b955782816101000a81549061ffff021916905560020160208160010104928301926001030262000b65565b505b5062000ba592915062000cf7565b5090565b82600a810192821562000bee579160200282015b8281111562000bee578251805162000bdd91849160209091019062000bfc565b509160200191906001019062000bbd565b5062000ba592915062000d19565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1062000c3f57805160ff191683800117855562000c6f565b8280016001018555821562000c6f579182015b8281111562000c6f57825182559160200191906001019062000c52565b5062000ba592915062000d41565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1062000cb8578054855562000c6f565b8280016001018555821562000c6f57600052602060002091601f016020900482015b8281111562000c6f57825482559160010191906001019062000cda565b620009c091905b8082111562000ba557805461ffff1916815560010162000cfe565b620009c091905b8082111562000ba557600062000d37828262000d5e565b5060010162000d20565b620009c091905b8082111562000ba5576000815560010162000d48565b50805460018160011615610100020316600290046000825580601f1062000d86575062000da6565b601f01602090049060005260206000209081019062000da6919062000d41565b50565b613fc98062000db96000396000f3fe6080604052600436106102e85760003560e01c80636c0360eb11610190578063a7eec44b116100dc578063cac21c8f11610095578063e63ab1e91161006f578063e63ab1e914610ca4578063e985e9c514610cb9578063f2fde38b14610cf4578063ffee200c14610d27576102ef565b8063cac21c8f14610ba6578063d539139314610c56578063d547741f14610c6b576102ef565b8063a7eec44b146109f2578063b66a0e5d14610a1c578063b7aaba2014610a31578063b88d4fde14610a7f578063c87b56dd14610b52578063ca15c87314610b7c576102ef565b80639010d07c116101495780639981d4a1116101235780639981d4a1146109705780639d1b464a1461098d578063a217fddf146109a2578063a22cb465146109b7576102ef565b80639010d07c146108f257806391d148541461092257806395d89b411461095b576102ef565b80636c0360eb1461083b57806370a0823114610850578063715018a6146108835780637fd8d953146108985780638456cb59146108c85780638da5cb5b146108dd576102ef565b806336568abe1161024f5780635c975abb116102085780636352211e116101e25780636352211e1461079f5780636573c787146107c95780636a627842146107f35780636b0c004d14610826576102ef565b80635c975abb1461069b57806360316801146106b057806362ff09d614610775576102ef565b806336568abe146105a15780633ccfd60b146105da5780633f4ba83a146105ef57806342842e0e1461060457806342966c68146106475780634f6ccce714610671576102ef565b8063182199cd116102a1578063182199cd1461048357806323b872dd146104ad578063248a9ca3146104f0578063277dec921461051a5780632f2ff15d1461052f5780632f745c5914610568576102ef565b806301ffc9a7146102f457806306fdde031461033c578063081812fc146103c6578063095ea7b31461040c578063179f0b0a1461044757806318160ddd1461046e576102ef565b366102ef57005b600080fd5b34801561030057600080fd5b506103286004803603602081101561031757600080fd5b50356001600160e01b031916610d3c565b604080519115158252519081900360200190f35b34801561034857600080fd5b50610351610d5f565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561038b578181015183820152602001610373565b50505050905090810190601f1680156103b85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156103d257600080fd5b506103f0600480360360208110156103e957600080fd5b5035610df6565b604080516001600160a01b039092168252519081900360200190f35b34801561041857600080fd5b506104456004803603604081101561042f57600080fd5b506001600160a01b038135169060200135610e58565b005b34801561045357600080fd5b5061045c610f33565b60408051918252519081900360200190f35b34801561047a57600080fd5b5061045c610f3a565b34801561048f57600080fd5b50610328600480360360208110156104a657600080fd5b5035610f4b565b3480156104b957600080fd5b50610445600480360360608110156104d057600080fd5b506001600160a01b03813581169160208101359091169060400135610f6a565b3480156104fc57600080fd5b5061045c6004803603602081101561051357600080fd5b5035610fc1565b34801561052657600080fd5b50610445610fd6565b34801561053b57600080fd5b506104456004803603604081101561055257600080fd5b50803590602001356001600160a01b0316611049565b34801561057457600080fd5b5061045c6004803603604081101561058b57600080fd5b506001600160a01b0381351690602001356110b5565b3480156105ad57600080fd5b50610445600480360360408110156105c457600080fd5b50803590602001356001600160a01b03166110e6565b3480156105e657600080fd5b50610445611147565b3480156105fb57600080fd5b506104456111d8565b34801561061057600080fd5b506104456004803603606081101561062757600080fd5b506001600160a01b03813581169160208101359091169060400135611249565b34801561065357600080fd5b506104456004803603602081101561066a57600080fd5b5035611264565b34801561067d57600080fd5b5061045c6004803603602081101561069457600080fd5b50356112b6565b3480156106a757600080fd5b506103286112d2565b3480156106bc57600080fd5b506106da600480360360208110156106d357600080fd5b50356112db565b60405180806020018581526020018481526020018360038111156106fa57fe5b60ff168152602001828103825286818151815260200191508051906020019080838360005b8381101561073757818101518382015260200161071f565b50505050905090810190601f1680156107645780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b34801561078157600080fd5b5061045c6004803603602081101561079857600080fd5b50356113a0565b3480156107ab57600080fd5b506103f0600480360360208110156107c257600080fd5b50356113b2565b3480156107d557600080fd5b50610328600480360360208110156107ec57600080fd5b50356113e0565b3480156107ff57600080fd5b506104456004803603602081101561081657600080fd5b50356001600160a01b0316611400565b34801561083257600080fd5b5061045c611484565b34801561084757600080fd5b5061035161148a565b34801561085c57600080fd5b5061045c6004803603602081101561087357600080fd5b50356001600160a01b03166114eb565b34801561088f57600080fd5b50610445611553565b3480156108a457600080fd5b50610445600480360360408110156108bb57600080fd5b50803590602001356115ff565b3480156108d457600080fd5b5061044561169b565b3480156108e957600080fd5b506103f061170a565b3480156108fe57600080fd5b506103f06004803603604081101561091557600080fd5b5080359060200135611719565b34801561092e57600080fd5b506103286004803603604081101561094557600080fd5b50803590602001356001600160a01b0316611737565b34801561096757600080fd5b50610351611755565b6104456004803603602081101561098657600080fd5b50356117b6565b34801561099957600080fd5b5061045c611a5c565b3480156109ae57600080fd5b5061045c611b18565b3480156109c357600080fd5b50610445600480360360408110156109da57600080fd5b506001600160a01b0381351690602001351515611b1d565b3480156109fe57600080fd5b5061044560048036036020811015610a1557600080fd5b5035611c22565b348015610a2857600080fd5b50610445611ce0565b348015610a3d57600080fd5b50610a5b60048036036020811015610a5457600080fd5b5035611d51565b60405180826003811115610a6b57fe5b60ff16815260200191505060405180910390f35b348015610a8b57600080fd5b5061044560048036036080811015610aa257600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135640100000000811115610add57600080fd5b820183602082011115610aef57600080fd5b80359060200191846001830284011164010000000083111715610b1157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611ed1945050505050565b348015610b5e57600080fd5b5061035160048036036020811015610b7557600080fd5b5035611f29565b348015610b8857600080fd5b5061045c60048036036020811015610b9f57600080fd5b5035612327565b348015610bb257600080fd5b50610bd060048036036020811015610bc957600080fd5b503561233e565b6040518080602001848152602001838152602001828103825285818151815260200191508051906020019080838360005b83811015610c19578181015183820152602001610c01565b50505050905090810190601f168015610c465780820380516001836020036101000a031916815260200191505b5094505050505060405180910390f35b348015610c6257600080fd5b5061045c6123eb565b348015610c7757600080fd5b5061044560048036036040811015610c8e57600080fd5b50803590602001356001600160a01b031661240e565b348015610cb057600080fd5b5061045c612467565b348015610cc557600080fd5b5061032860048036036040811015610cdc57600080fd5b506001600160a01b038135811691602001351661248a565b348015610d0057600080fd5b5061044560048036036020811015610d1757600080fd5b50356001600160a01b03166124b8565b348015610d3357600080fd5b5061045c6125bb565b6001600160e01b0319811660009081526001602052604090205460ff165b919050565b60078054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610deb5780601f10610dc057610100808354040283529160200191610deb565b820191906000526020600020905b815481529060010190602001808311610dce57829003601f168201915b505050505090505b90565b6000610e01826125c1565b610e3c5760405162461bcd60e51b815260040180806020018281038252602c815260200180613d6f602c913960400191505060405180910390fd5b506000908152600560205260409020546001600160a01b031690565b6000610e63826113b2565b9050806001600160a01b0316836001600160a01b03161415610eb65760405162461bcd60e51b8152600401808060200182810382526021815260200180613e146021913960400191505060405180910390fd5b806001600160a01b0316610ec86125d4565b6001600160a01b03161480610ee95750610ee981610ee46125d4565b61248a565b610f245760405162461bcd60e51b8152600401808060200182810382526038815260200180613c7e6038913960400191505060405180910390fd5b610f2e83836125d8565b505050565b62093a8081565b6000610f466003612646565b905090565b60006002610f5883611d51565b6003811115610f6357fe5b1492915050565b610f7b610f756125d4565b82612651565b610fb65760405162461bcd60e51b8152600401808060200182810382526031815260200180613e5c6031913960400191505060405180910390fd5b610f2e8383836126f5565b60009081526020819052604090206002015490565b610fde6125d4565b6001600160a01b0316610fef61170a565b6001600160a01b031614611038576040805162461bcd60e51b81526020600482018190526024820152600080516020613d9b833981519152604482015290519081900360640190fd5b600f805461ff001916610100179055565b60008281526020819052604090206002015461106c906110676125d4565b611737565b6110a75760405162461bcd60e51b815260040180806020018281038252602f815260200180613a97602f913960400191505060405180910390fd5b6110b18282612853565b5050565b6001600160a01b03821660009081526002602052604081206110dd908363ffffffff6128c216565b90505b92915050565b6110ee6125d4565b6001600160a01b0316816001600160a01b03161461113d5760405162461bcd60e51b815260040180806020018281038252602f815260200180613f65602f913960400191505060405180910390fd5b6110b182826128ce565b61114f6125d4565b6001600160a01b031661116061170a565b6001600160a01b0316146111a9576040805162461bcd60e51b81526020600482018190526024820152600080516020613d9b833981519152604482015290519081900360640190fd5b6040514790339082156108fc029083906000818181858888f193505050501580156110b1573d6000803e3d6000fd5b604080516a5041555345525f524f4c4560a81b8152905190819003600b019020611204906110676125d4565b61123f5760405162461bcd60e51b8152600401808060200182810382526040815260200180613f256040913960400191505060405180910390fd5b61124761293d565b565b610f2e83838360405180602001604052806000815250611ed1565b61126f610f756125d4565b6112aa5760405162461bcd60e51b8152600401808060200182810382526030815260200180613ef56030913960400191505060405180910390fd5b6112b3816129dd565b50565b6000806112ca60038463ffffffff612ab616565b509392505050565b600b5460ff1690565b6000818152600e6020526040812060018101546002820154606093928392839261130488611d51565b8354604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815291869183018282801561138a5780601f1061135f5761010080835404028352916020019161138a565b820191906000526020600020905b81548152906001019060200180831161136d57829003601f168201915b5050505050935093509350935093509193509193565b60306020526000908152604090205481565b60006110e082604051806060016040528060298152602001613ce0602991396003919063ffffffff612ad216565b600060036113ed83611d51565b60038111156113f857fe5b141592915050565b604080516a4d494e5445525f524f4c4560a81b8152905190819003600b01902061142c906110676125d4565b6114675760405162461bcd60e51b815260040180806020018281038252603d815260200180613eb8603d913960400191505060405180910390fd5b61147a81611475600c612ae9565b612aed565b6112b3600c612c27565b61271081565b600a8054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610deb5780601f10610dc057610100808354040283529160200191610deb565b60006001600160a01b0382166115325760405162461bcd60e51b815260040180806020018281038252602a815260200180613cb6602a913960400191505060405180910390fd5b6001600160a01b03821660009081526002602052604090206110e090612646565b61155b6125d4565b6001600160a01b031661156c61170a565b6001600160a01b0316146115b5576040805162461bcd60e51b81526020600482018190526024820152600080516020613d9b833981519152604482015290519081900360640190fd5b600d546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600d80546001600160a01b0319169055565b600f54610100900460ff166116455760405162461bcd60e51b8152600401808060200182810382526027815260200180613b4c6027913960400191505060405180910390fd5b6116566116506125d4565b83612651565b6116915760405162461bcd60e51b815260040180806020018281038252602b815260200180613e8d602b913960400191505060405180910390fd5b610f2e8282612c30565b604080516a5041555345525f524f4c4560a81b8152905190819003600b0190206116c7906110676125d4565b6117025760405162461bcd60e51b815260040180806020018281038252603e815260200180613b73603e913960400191505060405180910390fd5b611247612c76565b600d546001600160a01b031690565b60008281526020819052604081206110dd908363ffffffff6128c216565b60008281526020819052604081206110dd908363ffffffff612cf916565b60088054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610deb5780601f10610dc057610100808354040283529160200191610deb565b600f5460ff16611805576040805162461bcd60e51b8152602060048201526015602482015274151a1948139d5c9cd95c9e481a5cc818db1bdcd959605a1b604482015290519081900360640190fd5b61180d610f3a565b6127100381111561185d576040805162461bcd60e51b8152602060048201526015602482015274139bdd08195b9bdd59da08189d5b189cc81b19599d605a1b604482015290519081900360640190fd5b612710611868610f3a565b106118b3576040805162461bcd60e51b815260206004820152601660248201527514d85b19481a185cc8185b1c9958591e48195b99195960521b604482015290519081900360640190fd5b6000811180156118c4575060148111155b6118ff5760405162461bcd60e51b8152600401808060200182810382526030815260200180613de46030913960400191505060405180910390fd5b61271061191361190d610f3a565b83612d0e565b1115611966576040805162461bcd60e51b815260206004820152601860248201527f45786365656473204d41585f43525950544f5243484944530000000000000000604482015290519081900360640190fd5b611977611971611a5c565b82612d68565b3410156119b55760405162461bcd60e51b8152600401808060200182810382526023815260200180613d096023913960400191505060405180910390fd5b60005b818110156110b1576119ca602f612c27565b60006119d6602f612ae9565b6040805160a081018252600660608201908152656772616e756d60d01b608083015281526000196020808301919091526000828401819052848152600e8252929092208151805194955091939092611a32928492910190613954565b5060208201516001820155604090910151600290910155611a533382612dc1565b506001016119b8565b600080611a67610f3a565b90506126ac8110611a8357670de0b6b3a7640000915050610df3565b61251c8110611a9d576708e1bc9bf0400000915050610df3565b611d4c8110611ab757670470de4df8200000915050610df3565b610dac8110611ad1576702386f26fc100000915050610df3565b6105dc8110611aeb5767011c37937e080000915050610df3565b6101f48110611b045766d529ae9e860000915050610df3565b668e1bc9bf040000915050610df3565b5090565b600081565b611b256125d4565b6001600160a01b0316826001600160a01b03161415611b8b576040805162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015290519081900360640190fd5b8060066000611b986125d4565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff191692151592909217909155611bdc6125d4565b60408051841515815290516001600160a01b0392909216917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319181900360200190a35050565b611c2d610f756125d4565b611c685760405162461bcd60e51b8152600401808060200182810382526027815260200180613bfb6027913960400191505060405180910390fd5b611c71816113e0565b611c7a576112b3565b6000818152600e602052604081206002810154600182015491929091611c9e612ddb565b0390506000611cb08262093a80612ddf565b905080831115611cc357505050506112b3565b6000611cd0846001612d0e565b6002909501949094555050505050565b611ce86125d4565b6001600160a01b0316611cf961170a565b6001600160a01b031614611d42576040805162461bcd60e51b81526020600482018190526024820152600080516020613d9b833981519152604482015290519081900360640190fd5b600f805460ff19166001179055565b6000611d5b6139ce565b6000838152600e60209081526040918290208251815460026001821615610100026000190190911604601f81018490049093028101608090810190945260608101838152909391928492849190840182828015611df95780601f10611dce57610100808354040283529160200191611df9565b820191906000526020600020905b815481529060010190602001808311611ddc57829003601f168201915b50505050508152602001600182015481526020016002820154815250509050806020015160001415611e2f576000915050610d5a565b60001981602001511415611e47576001915050610d5a565b60408101516020820151600090611e5c612ddb565b0390506000611e6e8262093a80612ddf565b90506000611e7f8362093a80612e46565b905081841415611e9757600295505050505050610d5a565b81611ea3856001612d0e565b148015611eb15750612a3081105b15611ec457600295505050505050610d5a565b5060039695505050505050565b611edc6116506125d4565b611f175760405162461bcd60e51b8152600401808060200182810382526031815260200180613e5c6031913960400191505060405180910390fd5b611f2384848484612ead565b50505050565b606080611f35836112db565b5091925060019150611f449050565b611f4d84611d51565b6003811115611f5857fe5b141561203657611f6661148a565b6040518060600160405280602e8152602001613b1e602e91396040516020018083805190602001908083835b60208310611fb15780518252601f199092019160209182019101611f92565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b60208310611ff95780518252601f199092019160209182019101611fda565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052915050610d5a565b600261204184611d51565b600381111561204c57fe5b14156121bd5761205a61148a565b60316000836040516020018080602001828103825283818151815260200191508051906020019080838360005b8381101561209f578181015183820152602001612087565b50505050905090810190601f1680156120cc5780820380516001836020036101000a031916815260200191505b50925050506040516020818303038152906040528051906020012081526020019081526020016000206040516020018083805190602001908083835b602083106121275780518252601f199092019160209182019101612108565b6001836020036101000a038019825116818451168082178552505050505050905001828054600181600116156101000203166002900480156121a05780601f1061217e5761010080835404028352918201916121a0565b820191906000526020600020905b81548152906001019060200180831161218c575b505092505050604051602081830303815290604052915050610d5a565b6121c561148a565b60326000836040516020018080602001828103825283818151815260200191508051906020019080838360005b8381101561220a5781810151838201526020016121f2565b50505050905090810190601f1680156122375780820380516001836020036101000a031916815260200191505b50925050506040516020818303038152906040528051906020012081526020019081526020016000206040516020018083805190602001908083835b602083106122925780518252601f199092019160209182019101612273565b6001836020036101000a0380198251168184511680821785525050505050509050018280546001816001161561010002031660029004801561230b5780601f106122e957610100808354040283529182019161230b565b820191906000526020600020905b8154815290600101906020018083116122f7575b505060408051601f198184030181529190529695505050505050565b60008181526020819052604081206110e090612646565b600e6020908152600091825260409182902080548351601f600260001961010060018616150201909316929092049182018490048402810184019094528084529092918391908301828280156123d55780601f106123aa576101008083540402835291602001916123d5565b820191906000526020600020905b8154815290600101906020018083116123b857829003601f168201915b5050505050908060010154908060020154905083565b604080516a4d494e5445525f524f4c4560a81b8152905190819003600b01902081565b60008281526020819052604090206002015461242c906110676125d4565b61113d5760405162461bcd60e51b8152600401808060200182810382526030815260200180613c4e6030913960400191505060405180910390fd5b604080516a5041555345525f524f4c4560a81b8152905190819003600b01902081565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b6124c06125d4565b6001600160a01b03166124d161170a565b6001600160a01b03161461251a576040805162461bcd60e51b81526020600482018190526024820152600080516020613d9b833981519152604482015290519081900360640190fd5b6001600160a01b03811661255f5760405162461bcd60e51b8152600401808060200182810382526026815260200180613af86026913960400191505060405180910390fd5b600d546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600d80546001600160a01b0319166001600160a01b0392909216919091179055565b612a3081565b60006110e060038363ffffffff612eff16565b3390565b600081815260056020526040902080546001600160a01b0319166001600160a01b038416908117909155819061260d826113b2565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006110e082612ae9565b600061265c826125c1565b6126975760405162461bcd60e51b815260040180806020018281038252602c815260200180613c22602c913960400191505060405180910390fd5b60006126a2836113b2565b9050806001600160a01b0316846001600160a01b031614806126dd5750836001600160a01b03166126d284610df6565b6001600160a01b0316145b806126ed57506126ed818561248a565b949350505050565b826001600160a01b0316612708826113b2565b6001600160a01b03161461274d5760405162461bcd60e51b8152600401808060200182810382526029815260200180613dbb6029913960400191505060405180910390fd5b6001600160a01b0382166127925760405162461bcd60e51b8152600401808060200182810382526024815260200180613bb16024913960400191505060405180910390fd5b61279d838383612f0b565b6127a86000826125d8565b6001600160a01b03831660009081526002602052604090206127d0908263ffffffff612f6b16565b506001600160a01b03821660009081526002602052604090206127f9908263ffffffff612f7716565b5061280c6003828463ffffffff612f8316565b5080826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6000828152602081905260409020612871908263ffffffff612f9916565b156110b15761287e6125d4565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006110dd8383612fae565b60008281526020819052604090206128ec908263ffffffff61301216565b156110b1576128f96125d4565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b6129456112d2565b61298d576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b600b805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6129c06125d4565b604080516001600160a01b039092168252519081900360200190a1565b60006129e8826113b2565b90506129f681600084612f0b565b612a016000836125d8565b6000828152600960205260409020546002600019610100600184161502019091160415612a3f576000828152600960205260408120612a3f916139ef565b6001600160a01b0381166000908152600260205260409020612a67908363ffffffff612f6b16565b50612a7960038363ffffffff61302716565b5060405182906000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6000808080612ac58686613033565b9097909650945050505050565b6000612adf8484846130ae565b90505b9392505050565b5490565b6001600160a01b038216612b48576040805162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015290519081900360640190fd5b612b51816125c1565b15612ba3576040805162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015290519081900360640190fd5b612baf60008383612f0b565b6001600160a01b0382166000908152600260205260409020612bd7908263ffffffff612f7716565b50612bea6003828463ffffffff612f8316565b5060405181906001600160a01b038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b80546001019055565b6040805142602080830191909152448284015260608083018590528351808403909101815260809092019092528051910120600090612c6f8482613178565b5092915050565b612c7e6112d2565b15612cc3576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b600b805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586129c06125d4565b60006110dd836001600160a01b0384166131d2565b6000828201838110156110dd576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082612d77575060006110e0565b82820282848281612d8457fe5b04146110dd5760405162461bcd60e51b8152600401808060200182810382526021815260200180613d4e6021913960400191505060405180910390fd5b6110b18282604051806020016040528060008152506131ea565b4290565b6000808211612e35576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381612e3e57fe5b049392505050565b6000808211612e9c576040805162461bcd60e51b815260206004820152601860248201527f536166654d6174683a206d6f64756c6f206279207a65726f0000000000000000604482015290519081900360640190fd5b818381612ea557fe5b069392505050565b612eb88484846126f5565b612ec48484848461323c565b611f235760405162461bcd60e51b8152600401808060200182810382526032815260200180613ac66032913960400191505060405180910390fd5b60006110dd83836131d2565b6001600160a01b0382161580612f255750612f25816113e0565b612f605760405162461bcd60e51b8152600401808060200182810382526027815260200180613e356027913960400191505060405180910390fd5b610f2e8383836133bc565b60006110dd83836133c7565b60006110dd838361348d565b6000612adf84846001600160a01b0385166134d7565b60006110dd836001600160a01b03841661348d565b81546000908210612ff05760405162461bcd60e51b8152600401808060200182810382526022815260200180613a4a6022913960400191505060405180910390fd5b826000018281548110612fff57fe5b9060005260206000200154905092915050565b60006110dd836001600160a01b0384166133c7565b60006110dd838361356e565b8154600090819083106130775760405162461bcd60e51b8152600401808060200182810382526022815260200180613d2c6022913960400191505060405180910390fd5b600084600001848154811061308857fe5b906000526020600020906002020190508060000154816001015492509250509250929050565b600082815260018401602052604081205482816131495760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561310e5781810151838201526020016130f6565b50505050905090810190601f16801561313b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5084600001600182038154811061315c57fe5b9060005260206000209060020201600101549150509392505050565b6000828152600e60205260409020606061319c61319784612710612e46565b613642565b80519091506131b19083906020840190613954565b506131ba612ddb565b600183015560006131ca856113b2565b505050505050565b60009081526001919091016020526040902054151590565b6131f48383612aed565b613201600084848461323c565b610f2e5760405162461bcd60e51b8152600401808060200182810382526032815260200180613ac66032913960400191505060405180910390fd5b6000613250846001600160a01b031661372e565b61325c575060016126ed565b6060613382630a85bd0160e11b6132716125d4565b88878760405160240180856001600160a01b03166001600160a01b03168152602001846001600160a01b03166001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156132ea5781810151838201526020016132d2565b50505050905090810190601f1680156133175780820380516001836020036101000a031916815260200191505b5095505050505050604051602081830303815290604052906001600160e01b0319166020820180516001600160e01b038381831617835250505050604051806060016040528060328152602001613ac6603291396001600160a01b038816919063ffffffff61373416565b9050600081806020019051602081101561339b57600080fd5b50516001600160e01b031916630a85bd0160e11b1492505050949350505050565b610f2e838383613743565b6000818152600183016020526040812054801561348357835460001980830191908101906000908790839081106133fa57fe5b906000526020600020015490508087600001848154811061341757fe5b60009182526020808320909101929092558281526001898101909252604090209084019055865487908061344757fe5b600190038181906000526020600020016000905590558660010160008781526020019081526020016000206000905560019450505050506110e0565b60009150506110e0565b600061349983836131d2565b6134cf575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556110e0565b5060006110e0565b60008281526001840160205260408120548061353c575050604080518082018252838152602080820184815286546001818101895560008981528481209551600290930290950191825591519082015586548684528188019092529290912055612ae2565b8285600001600183038154811061354f57fe5b9060005260206000209060020201600101819055506000915050612ae2565b6000818152600183016020526040812054801561348357835460001980830191908101906000908790839081106135a157fe5b90600052602060002090600202019050808760000184815481106135c157fe5b60009182526020808320845460029093020191825560019384015491840191909155835482528983019052604090209084019055865487908061360057fe5b60008281526020808220600260001990940193840201828155600190810183905592909355888152898201909252604082209190915594506110e09350505050565b606060005b600a81101561372857601081600a811061365d57fe5b601091828204019190066002029054906101000a900461ffff1661ffff16831161372057601181600a811061368e57fe5b01805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156137135780601f106136e857610100808354040283529160200191613713565b820191906000526020600020905b8154815290600101906020018083116136f657829003601f168201915b5050505050915050610d5a565b600101613647565b50919050565b3b151590565b6060612adf8484600085613792565b61374e838383610f2e565b6137566112d2565b15610f2e5760405162461bcd60e51b815260040180806020018281038252602b815260200180613a6c602b913960400191505060405180910390fd5b6060824710156137d35760405162461bcd60e51b8152600401808060200182810382526026815260200180613bd56026913960400191505060405180910390fd5b6137dc8561372e565b61382d576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b6020831061386c5780518252601f19909201916020918201910161384d565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146138ce576040519150601f19603f3d011682016040523d82523d6000602084013e6138d3565b606091505b50915091506138e38282866138ee565b979650505050505050565b606083156138fd575081612ae2565b82511561390d5782518084602001fd5b60405162461bcd60e51b815260206004820181815284516024840152845185939192839260440191908501908083836000831561310e5781810151838201526020016130f6565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061399557805160ff19168380011785556139c2565b828001600101855582156139c2579182015b828111156139c25782518255916020019190600101906139a7565b50611b14929150613a2f565b60405180606001604052806060815260200160008152602001600081525090565b50805460018160011615610100020316600290046000825580601f10613a1557506112b3565b601f0160209004906000526020600020908101906112b391905b610df391905b80821115611b145760008155600101613a3556fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e64734552433732315061757361626c653a20746f6b656e207472616e73666572207768696c6520706175736564416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e744552433732313a207472616e7366657220746f206e6f6e20455243373231526563656976657220696d706c656d656e7465724f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373516d5764316d6e374475477978394279664e6571437367645355734a5a316372616769746761796773714476456d4765726d696e6174696f6e2073746172747320323032312d30342d31325431363a30303a30305a4552433732315072657365744d696e7465725061757365724175746f49643a206d75737420686176652070617573657220726f6c6520746f2070617573654552433732313a207472616e7366657220746f20746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c4f6e6c7920746865204f776e65722063616e20776174657220612043727970744f72636869642e4552433732313a206f70657261746f7220717565727920666f72206e6f6e6578697374656e7420746f6b656e416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b654552433732313a20617070726f76652063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f76656420666f7220616c6c4552433732313a2062616c616e636520717565727920666f7220746865207a65726f20616464726573734552433732313a206f776e657220717565727920666f72206e6f6e6578697374656e7420746f6b656e45746865722076616c75652073656e742069732062656c6f7720746865207072696365456e756d657261626c654d61703a20696e646578206f7574206f6620626f756e6473536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774552433732313a20617070726f76656420717565727920666f72206e6f6e6578697374656e7420746f6b656e4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65724552433732313a207472616e73666572206f6620746f6b656e2074686174206973206e6f74206f776e596f752063616e20706c616e74206d696e696d756d20312c206d6178696d756d2032302043727970744f7263686964734552433732313a20617070726f76616c20746f2063757272656e74206f776e6572446561642043727970744f7263686964732063616e6e6f74206265207472616e736665727265644552433732313a207472616e736665722063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f7665644f6e6c7920746865204f776e65722063616e206765726d696e61746520612043727970744f72636869642e4552433732315072657365744d696e7465725061757365724175746f49643a206d7573742068617665206d696e74657220726f6c6520746f206d696e744552433732314275726e61626c653a2063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f7665644552433732315072657365744d696e7465725061757365724175746f49643a206d75737420686176652070617573657220726f6c6520746f20756e7061757365416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220669084c037e9e2730b31d45e8cd7d87fcb21b2d1237df1dee094b97b3922927264736f6c63430006060033516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f637970726970656469756d2d63616c63656f6c75732e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f64656e64726f7068796c61782d6c696e64656e69692e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f70617068696f706564696c756d2d726f7468736368696c6469616e756d2e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f706c6174616e74686572612d617a6f726963612e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f637970726970656469756d2d63616c63656f6c75732e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f7068616c61656e6f707369732d6d6963686f6c69747a69692e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f76616e64612d636f6572756c65612e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f6d696c746f6e69612d6b61796173696d61652e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f70617068696f706564696c756d2d766965746e616d656e73652e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f6775617269616e7468652d617572616e74696163612e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f7368656e7a68656e6963612d6f726368696461636561652e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f6d696c746f6e69612d6b61796173696d61652e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f76616e64612d636f6572756c65612e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f70617068696f706564696c756d2d726f7468736368696c6469616e756d2e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f6775617269616e7468652d617572616e74696163612e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f70617068696f706564696c756d2d766965746e616d656e73652e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f64656e64726f7068796c61782d6c696e64656e69692e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f7068616c61656e6f707369732d6d6963686f6c69747a69692e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f7368656e7a68656e6963612d6f726368696461636561652e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f706c6174616e74686572612d617a6f726963612e6a736f6e", + "opcodes": "PUSH1 0xF DUP1 SLOAD PUSH2 0xFFFF NOT AND SWAP1 SSTORE PUSH2 0x1C0 PUSH1 0x40 MSTORE PUSH1 0x0 PUSH1 0x80 SWAP1 DUP2 MSTORE PUSH2 0xC02 PUSH1 0xA0 MSTORE PUSH2 0x17BA PUSH1 0xC0 MSTORE PUSH2 0x1F8A PUSH1 0xE0 MSTORE PUSH2 0x2372 PUSH2 0x100 MSTORE PUSH2 0x2566 PUSH2 0x120 MSTORE PUSH2 0x2660 PUSH2 0x140 MSTORE PUSH2 0x26C4 PUSH2 0x160 MSTORE PUSH2 0x26F6 PUSH2 0x180 MSTORE PUSH2 0x270F PUSH2 0x1A0 MSTORE PUSH3 0x63 SWAP1 PUSH1 0x10 SWAP1 PUSH1 0xA PUSH3 0xB0C JUMP JUMPDEST POP PUSH1 0x40 DUP1 MLOAD PUSH2 0x180 DUP2 ADD DUP3 MSTORE PUSH1 0x17 PUSH2 0x140 DUP3 ADD SWAP1 DUP2 MSTORE PUSH32 0x7368656E7A68656E696361206F72636869646163656165000000000000000000 PUSH2 0x160 DUP4 ADD MSTORE DUP2 MSTORE DUP2 MLOAD DUP1 DUP4 ADD DUP4 MSTORE PUSH1 0x18 DUP2 MSTORE PUSH32 0x7068616C61656E6F70736973206D6963686F6C69747A69690000000000000000 PUSH1 0x20 DUP3 DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE DUP1 DUP4 ADD SWAP2 SWAP1 SWAP2 MSTORE DUP3 MLOAD DUP1 DUP5 ADD DUP5 MSTORE PUSH1 0x15 DUP1 DUP3 MSTORE PUSH32 0x6775617269616E74686520617572616E74696163610000000000000000000000 DUP3 DUP5 ADD MSTORE DUP4 DUP6 ADD SWAP2 SWAP1 SWAP2 MSTORE DUP4 MLOAD DUP1 DUP6 ADD DUP6 MSTORE PUSH1 0xE DUP2 MSTORE PUSH14 0x76616E646120636F6572756C6561 PUSH1 0x90 SHL DUP2 DUP5 ADD MSTORE PUSH1 0x60 DUP5 ADD MSTORE DUP4 MLOAD DUP1 DUP6 ADD DUP6 MSTORE DUP2 DUP2 MSTORE PUSH32 0x637970726970656469756D2063616C63656F6C75730000000000000000000000 DUP2 DUP5 ADD MSTORE PUSH1 0x80 DUP5 ADD MSTORE DUP4 MLOAD DUP1 DUP6 ADD DUP6 MSTORE PUSH1 0x19 DUP2 MSTORE PUSH32 0x70617068696F706564696C756D20766965746E616D656E736500000000000000 DUP2 DUP5 ADD MSTORE PUSH1 0xA0 DUP5 ADD MSTORE DUP4 MLOAD DUP1 DUP6 ADD DUP6 MSTORE PUSH1 0x12 DUP2 MSTORE PUSH18 0x6D696C746F6E6961206B61796173696D6165 PUSH1 0x70 SHL DUP2 DUP5 ADD MSTORE PUSH1 0xC0 DUP5 ADD MSTORE DUP4 MLOAD DUP1 DUP6 ADD DUP6 MSTORE PUSH1 0x13 DUP2 MSTORE PUSH32 0x706C6174616E746865726120617A6F7269636100000000000000000000000000 DUP2 DUP5 ADD MSTORE PUSH1 0xE0 DUP5 ADD MSTORE DUP4 MLOAD DUP1 DUP6 ADD DUP6 MSTORE SWAP1 DUP2 MSTORE PUSH32 0x64656E64726F7068796C6178206C696E64656E69690000000000000000000000 DUP2 DUP4 ADD MSTORE PUSH2 0x100 DUP4 ADD MSTORE DUP3 MLOAD DUP1 DUP5 ADD SWAP1 SWAP4 MSTORE PUSH1 0x1D DUP4 MSTORE PUSH32 0x70617068696F706564696C756D20726F7468736368696C6469616E756D000000 SWAP1 DUP4 ADD MSTORE PUSH2 0x120 DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH3 0x283 SWAP1 PUSH1 0x11 SWAP1 PUSH1 0xA PUSH3 0xBA9 JUMP JUMPDEST POP PUSH1 0x40 DUP1 MLOAD PUSH2 0x1C0 DUP2 ADD SWAP1 SWAP2 MSTORE PUSH1 0x4B PUSH2 0x140 DUP3 ADD DUP2 DUP2 MSTORE DUP3 SWAP2 PUSH3 0x505F PUSH2 0x160 DUP5 ADD CODECOPY DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x40 MLOAD DUP1 PUSH1 0x80 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x4C DUP2 MSTORE PUSH1 0x20 ADD PUSH3 0x4EF5 PUSH1 0x4C SWAP2 CODECOPY DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x40 MLOAD DUP1 PUSH1 0x80 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x49 DUP2 MSTORE PUSH1 0x20 ADD PUSH3 0x5183 PUSH1 0x49 SWAP2 CODECOPY DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x40 MLOAD DUP1 PUSH1 0x80 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x42 DUP2 MSTORE PUSH1 0x20 ADD PUSH3 0x50F0 PUSH1 0x42 SWAP2 CODECOPY DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x40 MLOAD DUP1 PUSH1 0x80 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x49 DUP2 MSTORE PUSH1 0x20 ADD PUSH3 0x4EAC PUSH1 0x49 SWAP2 CODECOPY DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x40 MLOAD DUP1 PUSH1 0x80 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x4D DUP2 MSTORE PUSH1 0x20 ADD PUSH3 0x4FC9 PUSH1 0x4D SWAP2 CODECOPY DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x40 MLOAD DUP1 PUSH1 0x80 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x46 DUP2 MSTORE PUSH1 0x20 ADD PUSH3 0x50AA PUSH1 0x46 SWAP2 CODECOPY DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x40 MLOAD DUP1 PUSH1 0x80 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x47 DUP2 MSTORE PUSH1 0x20 ADD PUSH3 0x52F9 PUSH1 0x47 SWAP2 CODECOPY DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x40 MLOAD DUP1 PUSH1 0x80 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x49 DUP2 MSTORE PUSH1 0x20 ADD PUSH3 0x5219 PUSH1 0x49 SWAP2 CODECOPY DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x40 MLOAD DUP1 PUSH1 0x80 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x51 DUP2 MSTORE PUSH1 0x20 ADD PUSH3 0x4E14 PUSH1 0x51 SWAP2 CODECOPY SWAP1 MSTORE PUSH3 0x3CF SWAP1 PUSH1 0x1B SWAP1 PUSH1 0xA PUSH3 0xBA9 JUMP JUMPDEST POP PUSH1 0x40 DUP1 MLOAD PUSH2 0x1C0 DUP2 ADD SWAP1 SWAP2 MSTORE PUSH1 0x4B PUSH2 0x140 DUP3 ADD DUP2 DUP2 MSTORE DUP3 SWAP2 PUSH3 0x52AE PUSH2 0x160 DUP5 ADD CODECOPY DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x40 MLOAD DUP1 PUSH1 0x80 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x4C DUP2 MSTORE PUSH1 0x20 ADD PUSH3 0x5262 PUSH1 0x4C SWAP2 CODECOPY DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x40 MLOAD DUP1 PUSH1 0x80 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x49 DUP2 MSTORE PUSH1 0x20 ADD PUSH3 0x5016 PUSH1 0x49 SWAP2 CODECOPY DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x40 MLOAD DUP1 PUSH1 0x80 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x42 DUP2 MSTORE PUSH1 0x20 ADD PUSH3 0x4F41 PUSH1 0x42 SWAP2 CODECOPY DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x40 MLOAD DUP1 PUSH1 0x80 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x49 DUP2 MSTORE PUSH1 0x20 ADD PUSH3 0x4D82 PUSH1 0x49 SWAP2 CODECOPY DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x40 MLOAD DUP1 PUSH1 0x80 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x4D DUP2 MSTORE PUSH1 0x20 ADD PUSH3 0x51CC PUSH1 0x4D SWAP2 CODECOPY DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x40 MLOAD DUP1 PUSH1 0x80 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x46 DUP2 MSTORE PUSH1 0x20 ADD PUSH3 0x4F83 PUSH1 0x46 SWAP2 CODECOPY DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x40 MLOAD DUP1 PUSH1 0x80 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x47 DUP2 MSTORE PUSH1 0x20 ADD PUSH3 0x4E65 PUSH1 0x47 SWAP2 CODECOPY DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x40 MLOAD DUP1 PUSH1 0x80 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x49 DUP2 MSTORE PUSH1 0x20 ADD PUSH3 0x4DCB PUSH1 0x49 SWAP2 CODECOPY DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x40 MLOAD DUP1 PUSH1 0x80 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x51 DUP2 MSTORE PUSH1 0x20 ADD PUSH3 0x5132 PUSH1 0x51 SWAP2 CODECOPY SWAP1 MSTORE PUSH3 0x51B SWAP1 PUSH1 0x25 SWAP1 PUSH1 0xA PUSH3 0xBA9 JUMP JUMPDEST POP PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0xC DUP2 MSTORE PUSH1 0x20 ADD PUSH12 0x43727970744F726368696473 PUSH1 0xA0 SHL DUP2 MSTORE POP PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x5 DUP2 MSTORE PUSH1 0x20 ADD PUSH5 0x13D490D211 PUSH1 0xDA SHL DUP2 MSTORE POP PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x7 DUP2 MSTORE PUSH1 0x20 ADD PUSH7 0x697066733A2F2F PUSH1 0xC8 SHL DUP2 MSTORE POP DUP3 DUP3 PUSH3 0x599 PUSH4 0x1FFC9A7 PUSH1 0xE0 SHL PUSH3 0x936 PUSH1 0x20 SHL PUSH1 0x20 SHR JUMP JUMPDEST DUP2 MLOAD PUSH3 0x5AE SWAP1 PUSH1 0x7 SWAP1 PUSH1 0x20 DUP6 ADD SWAP1 PUSH3 0xBFC JUMP JUMPDEST POP DUP1 MLOAD PUSH3 0x5C4 SWAP1 PUSH1 0x8 SWAP1 PUSH1 0x20 DUP5 ADD SWAP1 PUSH3 0xBFC JUMP JUMPDEST POP PUSH3 0x5E0 PUSH4 0x80AC58CD PUSH1 0xE0 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB PUSH3 0x936 AND JUMP JUMPDEST PUSH3 0x5FB PUSH4 0x5B5E139F PUSH1 0xE0 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB PUSH3 0x936 AND JUMP JUMPDEST PUSH3 0x616 PUSH4 0x780E9D63 PUSH1 0xE0 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB PUSH3 0x936 AND JUMP JUMPDEST POP POP PUSH1 0xB DUP1 SLOAD PUSH1 0xFF NOT AND SWAP1 SSTORE PUSH3 0x64A PUSH1 0x0 PUSH3 0x63B PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB PUSH3 0x9BE AND JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB PUSH3 0x9C3 AND JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH11 0x4D494E5445525F524F4C45 PUSH1 0xA8 SHL DUP2 MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0xB ADD SWAP1 KECCAK256 PUSH3 0x682 SWAP1 PUSH3 0x63B PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB PUSH3 0x9BE AND JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH11 0x5041555345525F524F4C45 PUSH1 0xA8 SHL DUP2 MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0xB ADD SWAP1 KECCAK256 PUSH3 0x6BA SWAP1 PUSH3 0x63B PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB PUSH3 0x9BE AND JUMP JUMPDEST PUSH3 0x6CE DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB PUSH3 0x9DC AND JUMP JUMPDEST POP POP POP PUSH1 0x0 PUSH3 0x6E3 PUSH3 0x9BE PUSH1 0x20 SHL PUSH1 0x20 SHR JUMP JUMPDEST PUSH1 0xD DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND SWAP1 DUP2 OR SWAP1 SWAP2 SSTORE PUSH1 0x40 MLOAD SWAP2 SWAP3 POP SWAP1 PUSH1 0x0 SWAP1 PUSH32 0x8BE0079C531659141344CD1FD0A4F28419497F9722A3DAAFE3B4186F6B6457E0 SWAP1 DUP3 SWAP1 LOG3 POP PUSH1 0x0 JUMPDEST PUSH1 0xA DUP2 LT ISZERO PUSH3 0x92F JUMPI PUSH1 0x1B DUP2 PUSH1 0xA DUP2 LT PUSH3 0x74C JUMPI INVALID JUMPDEST ADD PUSH1 0x31 PUSH1 0x0 PUSH1 0x11 DUP5 PUSH1 0xA DUP2 LT PUSH3 0x75F JUMPI INVALID JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 DUP1 DUP3 ADD SWAP1 DUP2 MSTORE SWAP3 SWAP1 SWAP4 ADD DUP1 SLOAD PUSH1 0x2 PUSH1 0x1 DUP3 AND ISZERO PUSH2 0x100 MUL PUSH1 0x0 NOT ADD SWAP1 SWAP2 AND DIV SWAP2 DUP5 ADD DUP3 SWAP1 MSTORE SWAP3 DUP3 SWAP2 PUSH1 0x60 SWAP1 SWAP2 ADD SWAP1 DUP5 SWAP1 DUP1 ISZERO PUSH3 0x7E6 JUMPI DUP1 PUSH1 0x1F LT PUSH3 0x7BA JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH3 0x7E6 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH3 0x7C8 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP SWAP3 POP POP POP PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 SWAP1 DUP1 SLOAD PUSH1 0x1 DUP2 PUSH1 0x1 AND ISZERO PUSH2 0x100 MUL SUB AND PUSH1 0x2 SWAP1 DIV PUSH3 0x831 SWAP3 SWAP2 SWAP1 PUSH3 0xC7D JUMP JUMPDEST POP PUSH1 0x25 DUP2 PUSH1 0xA DUP2 LT PUSH3 0x840 JUMPI INVALID JUMPDEST ADD PUSH1 0x32 PUSH1 0x0 PUSH1 0x11 DUP5 PUSH1 0xA DUP2 LT PUSH3 0x853 JUMPI INVALID JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 DUP1 DUP3 ADD SWAP1 DUP2 MSTORE SWAP3 SWAP1 SWAP4 ADD DUP1 SLOAD PUSH1 0x2 PUSH1 0x1 DUP3 AND ISZERO PUSH2 0x100 MUL PUSH1 0x0 NOT ADD SWAP1 SWAP2 AND DIV SWAP2 DUP5 ADD DUP3 SWAP1 MSTORE SWAP3 DUP3 SWAP2 PUSH1 0x60 SWAP1 SWAP2 ADD SWAP1 DUP5 SWAP1 DUP1 ISZERO PUSH3 0x8DA JUMPI DUP1 PUSH1 0x1F LT PUSH3 0x8AE JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH3 0x8DA JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH3 0x8BC JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP SWAP3 POP POP POP PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 SWAP1 DUP1 SLOAD PUSH1 0x1 DUP2 PUSH1 0x1 AND ISZERO PUSH2 0x100 MUL SUB AND PUSH1 0x2 SWAP1 DIV PUSH3 0x925 SWAP3 SWAP2 SWAP1 PUSH3 0xC7D JUMP JUMPDEST POP PUSH1 0x1 ADD PUSH3 0x734 JUMP JUMPDEST POP PUSH3 0xDA9 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP1 DUP3 AND EQ ISZERO PUSH3 0x996 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x1C PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x4552433136353A20696E76616C696420696E7465726661636520696400000000 PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 SWAP2 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND SWAP1 SWAP2 OR SWAP1 SSTORE JUMP JUMPDEST CALLER JUMPDEST SWAP1 JUMP JUMPDEST PUSH3 0x9D8 DUP3 DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB PUSH3 0x9F1 AND JUMP JUMPDEST POP POP JUMP JUMPDEST DUP1 MLOAD PUSH3 0x9D8 SWAP1 PUSH1 0xA SWAP1 PUSH1 0x20 DUP5 ADD SWAP1 PUSH3 0xBFC JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 DUP2 DUP2 MSTORE PUSH1 0x40 SWAP1 SWAP2 KECCAK256 PUSH3 0xA16 SWAP2 DUP4 SWAP1 PUSH3 0x2F99 PUSH3 0xA73 DUP3 SHL OR SWAP1 SHR JUMP JUMPDEST ISZERO PUSH3 0x9D8 JUMPI PUSH3 0xA2F PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB PUSH3 0x9BE AND JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP4 PUSH32 0x2F8788117E7EFF1D82E926EC794901D17C78024A50270940304540A733656F0D PUSH1 0x40 MLOAD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG4 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH3 0xA93 DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB PUSH3 0xA9C AND JUMP JUMPDEST SWAP1 POP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH3 0xAB3 DUP4 DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB PUSH3 0xAF4 AND JUMP JUMPDEST PUSH3 0xAEB JUMPI POP DUP2 SLOAD PUSH1 0x1 DUP2 DUP2 ADD DUP5 SSTORE PUSH1 0x0 DUP5 DUP2 MSTORE PUSH1 0x20 DUP1 DUP3 KECCAK256 SWAP1 SWAP4 ADD DUP5 SWAP1 SSTORE DUP5 SLOAD DUP5 DUP3 MSTORE DUP3 DUP7 ADD SWAP1 SWAP4 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SWAP2 SWAP1 SWAP2 SSTORE PUSH3 0xA96 JUMP JUMPDEST POP PUSH1 0x0 PUSH3 0xA96 JUMP JUMPDEST PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 SWAP2 SWAP1 SWAP2 ADD PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD ISZERO ISZERO SWAP1 JUMP JUMPDEST PUSH1 0x1 DUP4 ADD SWAP2 DUP4 SWAP1 DUP3 ISZERO PUSH3 0xB97 JUMPI SWAP2 PUSH1 0x20 MUL DUP3 ADD PUSH1 0x0 JUMPDEST DUP4 DUP3 GT ISZERO PUSH3 0xB65 JUMPI DUP4 MLOAD DUP4 DUP3 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH2 0xFFFF MUL NOT AND SWAP1 DUP4 PUSH2 0xFFFF AND MUL OR SWAP1 SSTORE POP SWAP3 PUSH1 0x20 ADD SWAP3 PUSH1 0x2 ADD PUSH1 0x20 DUP2 PUSH1 0x1 ADD DIV SWAP3 DUP4 ADD SWAP3 PUSH1 0x1 SUB MUL PUSH3 0xB23 JUMP JUMPDEST DUP1 ISZERO PUSH3 0xB95 JUMPI DUP3 DUP2 PUSH2 0x100 EXP DUP2 SLOAD SWAP1 PUSH2 0xFFFF MUL NOT AND SWAP1 SSTORE PUSH1 0x2 ADD PUSH1 0x20 DUP2 PUSH1 0x1 ADD DIV SWAP3 DUP4 ADD SWAP3 PUSH1 0x1 SUB MUL PUSH3 0xB65 JUMP JUMPDEST POP JUMPDEST POP PUSH3 0xBA5 SWAP3 SWAP2 POP PUSH3 0xCF7 JUMP JUMPDEST POP SWAP1 JUMP JUMPDEST DUP3 PUSH1 0xA DUP2 ADD SWAP3 DUP3 ISZERO PUSH3 0xBEE JUMPI SWAP2 PUSH1 0x20 MUL DUP3 ADD JUMPDEST DUP3 DUP2 GT ISZERO PUSH3 0xBEE JUMPI DUP3 MLOAD DUP1 MLOAD PUSH3 0xBDD SWAP2 DUP5 SWAP2 PUSH1 0x20 SWAP1 SWAP2 ADD SWAP1 PUSH3 0xBFC JUMP JUMPDEST POP SWAP2 PUSH1 0x20 ADD SWAP2 SWAP1 PUSH1 0x1 ADD SWAP1 PUSH3 0xBBD JUMP JUMPDEST POP PUSH3 0xBA5 SWAP3 SWAP2 POP PUSH3 0xD19 JUMP JUMPDEST DUP3 DUP1 SLOAD PUSH1 0x1 DUP2 PUSH1 0x1 AND ISZERO PUSH2 0x100 MUL SUB AND PUSH1 0x2 SWAP1 DIV SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x1F ADD PUSH1 0x20 SWAP1 DIV DUP2 ADD SWAP3 DUP3 PUSH1 0x1F LT PUSH3 0xC3F JUMPI DUP1 MLOAD PUSH1 0xFF NOT AND DUP4 DUP1 ADD OR DUP6 SSTORE PUSH3 0xC6F JUMP JUMPDEST DUP3 DUP1 ADD PUSH1 0x1 ADD DUP6 SSTORE DUP3 ISZERO PUSH3 0xC6F JUMPI SWAP2 DUP3 ADD JUMPDEST DUP3 DUP2 GT ISZERO PUSH3 0xC6F JUMPI DUP3 MLOAD DUP3 SSTORE SWAP2 PUSH1 0x20 ADD SWAP2 SWAP1 PUSH1 0x1 ADD SWAP1 PUSH3 0xC52 JUMP JUMPDEST POP PUSH3 0xBA5 SWAP3 SWAP2 POP PUSH3 0xD41 JUMP JUMPDEST DUP3 DUP1 SLOAD PUSH1 0x1 DUP2 PUSH1 0x1 AND ISZERO PUSH2 0x100 MUL SUB AND PUSH1 0x2 SWAP1 DIV SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x1F ADD PUSH1 0x20 SWAP1 DIV DUP2 ADD SWAP3 DUP3 PUSH1 0x1F LT PUSH3 0xCB8 JUMPI DUP1 SLOAD DUP6 SSTORE PUSH3 0xC6F JUMP JUMPDEST DUP3 DUP1 ADD PUSH1 0x1 ADD DUP6 SSTORE DUP3 ISZERO PUSH3 0xC6F JUMPI PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP2 PUSH1 0x1F ADD PUSH1 0x20 SWAP1 DIV DUP3 ADD JUMPDEST DUP3 DUP2 GT ISZERO PUSH3 0xC6F JUMPI DUP3 SLOAD DUP3 SSTORE SWAP2 PUSH1 0x1 ADD SWAP2 SWAP1 PUSH1 0x1 ADD SWAP1 PUSH3 0xCDA JUMP JUMPDEST PUSH3 0x9C0 SWAP2 SWAP1 JUMPDEST DUP1 DUP3 GT ISZERO PUSH3 0xBA5 JUMPI DUP1 SLOAD PUSH2 0xFFFF NOT AND DUP2 SSTORE PUSH1 0x1 ADD PUSH3 0xCFE JUMP JUMPDEST PUSH3 0x9C0 SWAP2 SWAP1 JUMPDEST DUP1 DUP3 GT ISZERO PUSH3 0xBA5 JUMPI PUSH1 0x0 PUSH3 0xD37 DUP3 DUP3 PUSH3 0xD5E JUMP JUMPDEST POP PUSH1 0x1 ADD PUSH3 0xD20 JUMP JUMPDEST PUSH3 0x9C0 SWAP2 SWAP1 JUMPDEST DUP1 DUP3 GT ISZERO PUSH3 0xBA5 JUMPI PUSH1 0x0 DUP2 SSTORE PUSH1 0x1 ADD PUSH3 0xD48 JUMP JUMPDEST POP DUP1 SLOAD PUSH1 0x1 DUP2 PUSH1 0x1 AND ISZERO PUSH2 0x100 MUL SUB AND PUSH1 0x2 SWAP1 DIV PUSH1 0x0 DUP3 SSTORE DUP1 PUSH1 0x1F LT PUSH3 0xD86 JUMPI POP PUSH3 0xDA6 JUMP JUMPDEST PUSH1 0x1F ADD PUSH1 0x20 SWAP1 DIV SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 DUP2 ADD SWAP1 PUSH3 0xDA6 SWAP2 SWAP1 PUSH3 0xD41 JUMP JUMPDEST POP JUMP JUMPDEST PUSH2 0x3FC9 DUP1 PUSH3 0xDB9 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0x2E8 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x6C0360EB GT PUSH2 0x190 JUMPI DUP1 PUSH4 0xA7EEC44B GT PUSH2 0xDC JUMPI DUP1 PUSH4 0xCAC21C8F GT PUSH2 0x95 JUMPI DUP1 PUSH4 0xE63AB1E9 GT PUSH2 0x6F JUMPI DUP1 PUSH4 0xE63AB1E9 EQ PUSH2 0xCA4 JUMPI DUP1 PUSH4 0xE985E9C5 EQ PUSH2 0xCB9 JUMPI DUP1 PUSH4 0xF2FDE38B EQ PUSH2 0xCF4 JUMPI DUP1 PUSH4 0xFFEE200C EQ PUSH2 0xD27 JUMPI PUSH2 0x2EF JUMP JUMPDEST DUP1 PUSH4 0xCAC21C8F EQ PUSH2 0xBA6 JUMPI DUP1 PUSH4 0xD5391393 EQ PUSH2 0xC56 JUMPI DUP1 PUSH4 0xD547741F EQ PUSH2 0xC6B JUMPI PUSH2 0x2EF JUMP JUMPDEST DUP1 PUSH4 0xA7EEC44B EQ PUSH2 0x9F2 JUMPI DUP1 PUSH4 0xB66A0E5D EQ PUSH2 0xA1C JUMPI DUP1 PUSH4 0xB7AABA20 EQ PUSH2 0xA31 JUMPI DUP1 PUSH4 0xB88D4FDE EQ PUSH2 0xA7F JUMPI DUP1 PUSH4 0xC87B56DD EQ PUSH2 0xB52 JUMPI DUP1 PUSH4 0xCA15C873 EQ PUSH2 0xB7C JUMPI PUSH2 0x2EF JUMP JUMPDEST DUP1 PUSH4 0x9010D07C GT PUSH2 0x149 JUMPI DUP1 PUSH4 0x9981D4A1 GT PUSH2 0x123 JUMPI DUP1 PUSH4 0x9981D4A1 EQ PUSH2 0x970 JUMPI DUP1 PUSH4 0x9D1B464A EQ PUSH2 0x98D JUMPI DUP1 PUSH4 0xA217FDDF EQ PUSH2 0x9A2 JUMPI DUP1 PUSH4 0xA22CB465 EQ PUSH2 0x9B7 JUMPI PUSH2 0x2EF JUMP JUMPDEST DUP1 PUSH4 0x9010D07C EQ PUSH2 0x8F2 JUMPI DUP1 PUSH4 0x91D14854 EQ PUSH2 0x922 JUMPI DUP1 PUSH4 0x95D89B41 EQ PUSH2 0x95B JUMPI PUSH2 0x2EF JUMP JUMPDEST DUP1 PUSH4 0x6C0360EB EQ PUSH2 0x83B JUMPI DUP1 PUSH4 0x70A08231 EQ PUSH2 0x850 JUMPI DUP1 PUSH4 0x715018A6 EQ PUSH2 0x883 JUMPI DUP1 PUSH4 0x7FD8D953 EQ PUSH2 0x898 JUMPI DUP1 PUSH4 0x8456CB59 EQ PUSH2 0x8C8 JUMPI DUP1 PUSH4 0x8DA5CB5B EQ PUSH2 0x8DD JUMPI PUSH2 0x2EF JUMP JUMPDEST DUP1 PUSH4 0x36568ABE GT PUSH2 0x24F JUMPI DUP1 PUSH4 0x5C975ABB GT PUSH2 0x208 JUMPI DUP1 PUSH4 0x6352211E GT PUSH2 0x1E2 JUMPI DUP1 PUSH4 0x6352211E EQ PUSH2 0x79F JUMPI DUP1 PUSH4 0x6573C787 EQ PUSH2 0x7C9 JUMPI DUP1 PUSH4 0x6A627842 EQ PUSH2 0x7F3 JUMPI DUP1 PUSH4 0x6B0C004D EQ PUSH2 0x826 JUMPI PUSH2 0x2EF JUMP JUMPDEST DUP1 PUSH4 0x5C975ABB EQ PUSH2 0x69B JUMPI DUP1 PUSH4 0x60316801 EQ PUSH2 0x6B0 JUMPI DUP1 PUSH4 0x62FF09D6 EQ PUSH2 0x775 JUMPI PUSH2 0x2EF JUMP JUMPDEST DUP1 PUSH4 0x36568ABE EQ PUSH2 0x5A1 JUMPI DUP1 PUSH4 0x3CCFD60B EQ PUSH2 0x5DA JUMPI DUP1 PUSH4 0x3F4BA83A EQ PUSH2 0x5EF JUMPI DUP1 PUSH4 0x42842E0E EQ PUSH2 0x604 JUMPI DUP1 PUSH4 0x42966C68 EQ PUSH2 0x647 JUMPI DUP1 PUSH4 0x4F6CCCE7 EQ PUSH2 0x671 JUMPI PUSH2 0x2EF JUMP JUMPDEST DUP1 PUSH4 0x182199CD GT PUSH2 0x2A1 JUMPI DUP1 PUSH4 0x182199CD EQ PUSH2 0x483 JUMPI DUP1 PUSH4 0x23B872DD EQ PUSH2 0x4AD JUMPI DUP1 PUSH4 0x248A9CA3 EQ PUSH2 0x4F0 JUMPI DUP1 PUSH4 0x277DEC92 EQ PUSH2 0x51A JUMPI DUP1 PUSH4 0x2F2FF15D EQ PUSH2 0x52F JUMPI DUP1 PUSH4 0x2F745C59 EQ PUSH2 0x568 JUMPI PUSH2 0x2EF JUMP JUMPDEST DUP1 PUSH4 0x1FFC9A7 EQ PUSH2 0x2F4 JUMPI DUP1 PUSH4 0x6FDDE03 EQ PUSH2 0x33C JUMPI DUP1 PUSH4 0x81812FC EQ PUSH2 0x3C6 JUMPI DUP1 PUSH4 0x95EA7B3 EQ PUSH2 0x40C JUMPI DUP1 PUSH4 0x179F0B0A EQ PUSH2 0x447 JUMPI DUP1 PUSH4 0x18160DDD EQ PUSH2 0x46E JUMPI PUSH2 0x2EF JUMP JUMPDEST CALLDATASIZE PUSH2 0x2EF JUMPI STOP JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x300 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x328 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x317 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH2 0xD3C JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x348 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x351 PUSH2 0xD5F JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 DUP1 DUP3 MSTORE DUP4 MLOAD DUP2 DUP4 ADD MSTORE DUP4 MLOAD SWAP2 SWAP3 DUP4 SWAP3 SWAP1 DUP4 ADD SWAP2 DUP6 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x38B JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x373 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x3B8 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP3 POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x3D2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x3F0 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x3E9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH2 0xDF6 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP3 AND DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x418 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x445 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x42F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 CALLDATALOAD AND SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH2 0xE58 JUMP JUMPDEST STOP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x453 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x45C PUSH2 0xF33 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x47A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x45C PUSH2 0xF3A JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x48F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x328 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x4A6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH2 0xF4B JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x4B9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x445 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x60 DUP2 LT ISZERO PUSH2 0x4D0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 CALLDATALOAD DUP2 AND SWAP2 PUSH1 0x20 DUP2 ADD CALLDATALOAD SWAP1 SWAP2 AND SWAP1 PUSH1 0x40 ADD CALLDATALOAD PUSH2 0xF6A JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x4FC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x45C PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x513 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH2 0xFC1 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x526 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x445 PUSH2 0xFD6 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x53B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x445 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x552 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x1049 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x574 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x45C PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x58B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 CALLDATALOAD AND SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH2 0x10B5 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x5AD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x445 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x5C4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x10E6 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x5E6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x445 PUSH2 0x1147 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x5FB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x445 PUSH2 0x11D8 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x610 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x445 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x60 DUP2 LT ISZERO PUSH2 0x627 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 CALLDATALOAD DUP2 AND SWAP2 PUSH1 0x20 DUP2 ADD CALLDATALOAD SWAP1 SWAP2 AND SWAP1 PUSH1 0x40 ADD CALLDATALOAD PUSH2 0x1249 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x653 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x445 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x66A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH2 0x1264 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x67D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x45C PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x694 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH2 0x12B6 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x6A7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x328 PUSH2 0x12D2 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x6BC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x6DA PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x6D3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH2 0x12DB JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 DUP1 PUSH1 0x20 ADD DUP6 DUP2 MSTORE PUSH1 0x20 ADD DUP5 DUP2 MSTORE PUSH1 0x20 ADD DUP4 PUSH1 0x3 DUP2 GT ISZERO PUSH2 0x6FA JUMPI INVALID JUMPDEST PUSH1 0xFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE DUP7 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x737 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x71F JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x764 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP6 POP POP POP POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x781 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x45C PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x798 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH2 0x13A0 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x7AB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x3F0 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x7C2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH2 0x13B2 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x7D5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x328 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x7EC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH2 0x13E0 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x7FF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x445 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x816 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x1400 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x832 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x45C PUSH2 0x1484 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x847 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x351 PUSH2 0x148A JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x85C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x45C PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x873 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x14EB JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x88F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x445 PUSH2 0x1553 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x8A4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x445 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x8BB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH2 0x15FF JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x8D4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x445 PUSH2 0x169B JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x8E9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x3F0 PUSH2 0x170A JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x8FE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x3F0 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x915 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH2 0x1719 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x92E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x328 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x945 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x1737 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x967 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x351 PUSH2 0x1755 JUMP JUMPDEST PUSH2 0x445 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x986 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH2 0x17B6 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x999 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x45C PUSH2 0x1A5C JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x9AE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x45C PUSH2 0x1B18 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x9C3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x445 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x9DA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 CALLDATALOAD AND SWAP1 PUSH1 0x20 ADD CALLDATALOAD ISZERO ISZERO PUSH2 0x1B1D JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x9FE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x445 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0xA15 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH2 0x1C22 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xA28 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x445 PUSH2 0x1CE0 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xA3D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xA5B PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0xA54 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH2 0x1D51 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 DUP3 PUSH1 0x3 DUP2 GT ISZERO PUSH2 0xA6B JUMPI INVALID JUMPDEST PUSH1 0xFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xA8B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x445 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x80 DUP2 LT ISZERO PUSH2 0xAA2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 CALLDATALOAD DUP2 AND SWAP3 PUSH1 0x20 DUP2 ADD CALLDATALOAD SWAP1 SWAP2 AND SWAP2 PUSH1 0x40 DUP3 ADD CALLDATALOAD SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH1 0x80 DUP2 ADD PUSH1 0x60 DUP3 ADD CALLDATALOAD PUSH5 0x100000000 DUP2 GT ISZERO PUSH2 0xADD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 ADD DUP4 PUSH1 0x20 DUP3 ADD GT ISZERO PUSH2 0xAEF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP2 DUP5 PUSH1 0x1 DUP4 MUL DUP5 ADD GT PUSH5 0x100000000 DUP4 GT OR ISZERO PUSH2 0xB11 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP2 SWAP1 DUP1 DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP3 SWAP6 POP PUSH2 0x1ED1 SWAP5 POP POP POP POP POP JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xB5E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x351 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0xB75 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH2 0x1F29 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xB88 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x45C PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0xB9F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH2 0x2327 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xBB2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xBD0 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0xBC9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH2 0x233E JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 DUP1 PUSH1 0x20 ADD DUP5 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE DUP6 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0xC19 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0xC01 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0xC46 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP5 POP POP POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xC62 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x45C PUSH2 0x23EB JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xC77 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x445 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0xC8E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x240E JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xCB0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x45C PUSH2 0x2467 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xCC5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x328 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0xCDC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 CALLDATALOAD DUP2 AND SWAP2 PUSH1 0x20 ADD CALLDATALOAD AND PUSH2 0x248A JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xD00 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x445 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0xD17 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x24B8 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xD33 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x45C PUSH2 0x25BB JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP2 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND JUMPDEST SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x7 DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x1F PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP9 AND ISZERO MUL ADD SWAP1 SWAP6 AND SWAP5 SWAP1 SWAP5 DIV SWAP4 DUP5 ADD DUP2 SWAP1 DIV DUP2 MUL DUP3 ADD DUP2 ADD SWAP1 SWAP3 MSTORE DUP3 DUP2 MSTORE PUSH1 0x60 SWAP4 SWAP1 SWAP3 SWAP1 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0xDEB JUMPI DUP1 PUSH1 0x1F LT PUSH2 0xDC0 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0xDEB JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0xDCE JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP SWAP1 POP JUMPDEST SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0xE01 DUP3 PUSH2 0x25C1 JUMP JUMPDEST PUSH2 0xE3C JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x2C DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3D6F PUSH1 0x2C SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST POP PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0xE63 DUP3 PUSH2 0x13B2 JUMP JUMPDEST SWAP1 POP DUP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0xEB6 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x21 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3E14 PUSH1 0x21 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST DUP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0xEC8 PUSH2 0x25D4 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ DUP1 PUSH2 0xEE9 JUMPI POP PUSH2 0xEE9 DUP2 PUSH2 0xEE4 PUSH2 0x25D4 JUMP JUMPDEST PUSH2 0x248A JUMP JUMPDEST PUSH2 0xF24 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x38 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3C7E PUSH1 0x38 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0xF2E DUP4 DUP4 PUSH2 0x25D8 JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH3 0x93A80 DUP2 JUMP JUMPDEST PUSH1 0x0 PUSH2 0xF46 PUSH1 0x3 PUSH2 0x2646 JUMP JUMPDEST SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x2 PUSH2 0xF58 DUP4 PUSH2 0x1D51 JUMP JUMPDEST PUSH1 0x3 DUP2 GT ISZERO PUSH2 0xF63 JUMPI INVALID JUMPDEST EQ SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0xF7B PUSH2 0xF75 PUSH2 0x25D4 JUMP JUMPDEST DUP3 PUSH2 0x2651 JUMP JUMPDEST PUSH2 0xFB6 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x31 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3E5C PUSH1 0x31 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0xF2E DUP4 DUP4 DUP4 PUSH2 0x26F5 JUMP JUMPDEST PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x2 ADD SLOAD SWAP1 JUMP JUMPDEST PUSH2 0xFDE PUSH2 0x25D4 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0xFEF PUSH2 0x170A JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ PUSH2 0x1038 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x24 DUP3 ADD MSTORE PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x3D9B DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH1 0xF DUP1 SLOAD PUSH2 0xFF00 NOT AND PUSH2 0x100 OR SWAP1 SSTORE JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x2 ADD SLOAD PUSH2 0x106C SWAP1 PUSH2 0x1067 PUSH2 0x25D4 JUMP JUMPDEST PUSH2 0x1737 JUMP JUMPDEST PUSH2 0x10A7 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x2F DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3A97 PUSH1 0x2F SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x10B1 DUP3 DUP3 PUSH2 0x2853 JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH2 0x10DD SWAP1 DUP4 PUSH4 0xFFFFFFFF PUSH2 0x28C2 AND JUMP JUMPDEST SWAP1 POP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x10EE PUSH2 0x25D4 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ PUSH2 0x113D JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x2F DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3F65 PUSH1 0x2F SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x10B1 DUP3 DUP3 PUSH2 0x28CE JUMP JUMPDEST PUSH2 0x114F PUSH2 0x25D4 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x1160 PUSH2 0x170A JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ PUSH2 0x11A9 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x24 DUP3 ADD MSTORE PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x3D9B DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH1 0x40 MLOAD SELFBALANCE SWAP1 CALLER SWAP1 DUP3 ISZERO PUSH2 0x8FC MUL SWAP1 DUP4 SWAP1 PUSH1 0x0 DUP2 DUP2 DUP2 DUP6 DUP9 DUP9 CALL SWAP4 POP POP POP POP ISZERO DUP1 ISZERO PUSH2 0x10B1 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH11 0x5041555345525F524F4C45 PUSH1 0xA8 SHL DUP2 MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0xB ADD SWAP1 KECCAK256 PUSH2 0x1204 SWAP1 PUSH2 0x1067 PUSH2 0x25D4 JUMP JUMPDEST PUSH2 0x123F JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x40 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3F25 PUSH1 0x40 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x1247 PUSH2 0x293D JUMP JUMPDEST JUMP JUMPDEST PUSH2 0xF2E DUP4 DUP4 DUP4 PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE POP PUSH2 0x1ED1 JUMP JUMPDEST PUSH2 0x126F PUSH2 0xF75 PUSH2 0x25D4 JUMP JUMPDEST PUSH2 0x12AA JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x30 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3EF5 PUSH1 0x30 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x12B3 DUP2 PUSH2 0x29DD JUMP JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x12CA PUSH1 0x3 DUP5 PUSH4 0xFFFFFFFF PUSH2 0x2AB6 AND JUMP JUMPDEST POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0xB SLOAD PUSH1 0xFF AND SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0xE PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH1 0x1 DUP2 ADD SLOAD PUSH1 0x2 DUP3 ADD SLOAD PUSH1 0x60 SWAP4 SWAP3 DUP4 SWAP3 DUP4 SWAP3 PUSH2 0x1304 DUP9 PUSH2 0x1D51 JUMP JUMPDEST DUP4 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x1F PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP9 AND ISZERO MUL ADD SWAP1 SWAP6 AND SWAP5 SWAP1 SWAP5 DIV SWAP4 DUP5 ADD DUP2 SWAP1 DIV DUP2 MUL DUP3 ADD DUP2 ADD SWAP1 SWAP3 MSTORE DUP3 DUP2 MSTORE SWAP2 DUP7 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x138A JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x135F JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x138A JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x136D JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP SWAP4 POP SWAP4 POP SWAP4 POP SWAP4 POP SWAP4 POP SWAP2 SWAP4 POP SWAP2 SWAP4 JUMP JUMPDEST PUSH1 0x30 PUSH1 0x20 MSTORE PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD DUP2 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x10E0 DUP3 PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x29 DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x3CE0 PUSH1 0x29 SWAP2 CODECOPY PUSH1 0x3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF PUSH2 0x2AD2 AND JUMP JUMPDEST PUSH1 0x0 PUSH1 0x3 PUSH2 0x13ED DUP4 PUSH2 0x1D51 JUMP JUMPDEST PUSH1 0x3 DUP2 GT ISZERO PUSH2 0x13F8 JUMPI INVALID JUMPDEST EQ ISZERO SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH11 0x4D494E5445525F524F4C45 PUSH1 0xA8 SHL DUP2 MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0xB ADD SWAP1 KECCAK256 PUSH2 0x142C SWAP1 PUSH2 0x1067 PUSH2 0x25D4 JUMP JUMPDEST PUSH2 0x1467 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x3D DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3EB8 PUSH1 0x3D SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x147A DUP2 PUSH2 0x1475 PUSH1 0xC PUSH2 0x2AE9 JUMP JUMPDEST PUSH2 0x2AED JUMP JUMPDEST PUSH2 0x12B3 PUSH1 0xC PUSH2 0x2C27 JUMP JUMPDEST PUSH2 0x2710 DUP2 JUMP JUMPDEST PUSH1 0xA DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x1F PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP9 AND ISZERO MUL ADD SWAP1 SWAP6 AND SWAP5 SWAP1 SWAP5 DIV SWAP4 DUP5 ADD DUP2 SWAP1 DIV DUP2 MUL DUP3 ADD DUP2 ADD SWAP1 SWAP3 MSTORE DUP3 DUP2 MSTORE PUSH1 0x60 SWAP4 SWAP1 SWAP3 SWAP1 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0xDEB JUMPI DUP1 PUSH1 0x1F LT PUSH2 0xDC0 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0xDEB JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH2 0x1532 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x2A DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3CB6 PUSH1 0x2A SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH2 0x10E0 SWAP1 PUSH2 0x2646 JUMP JUMPDEST PUSH2 0x155B PUSH2 0x25D4 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x156C PUSH2 0x170A JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ PUSH2 0x15B5 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x24 DUP3 ADD MSTORE PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x3D9B DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH1 0xD SLOAD PUSH1 0x40 MLOAD PUSH1 0x0 SWAP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 PUSH32 0x8BE0079C531659141344CD1FD0A4F28419497F9722A3DAAFE3B4186F6B6457E0 SWAP1 DUP4 SWAP1 LOG3 PUSH1 0xD DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND SWAP1 SSTORE JUMP JUMPDEST PUSH1 0xF SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0xFF AND PUSH2 0x1645 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x27 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3B4C PUSH1 0x27 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x1656 PUSH2 0x1650 PUSH2 0x25D4 JUMP JUMPDEST DUP4 PUSH2 0x2651 JUMP JUMPDEST PUSH2 0x1691 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x2B DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3E8D PUSH1 0x2B SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0xF2E DUP3 DUP3 PUSH2 0x2C30 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH11 0x5041555345525F524F4C45 PUSH1 0xA8 SHL DUP2 MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0xB ADD SWAP1 KECCAK256 PUSH2 0x16C7 SWAP1 PUSH2 0x1067 PUSH2 0x25D4 JUMP JUMPDEST PUSH2 0x1702 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x3E DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3B73 PUSH1 0x3E SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x1247 PUSH2 0x2C76 JUMP JUMPDEST PUSH1 0xD SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH2 0x10DD SWAP1 DUP4 PUSH4 0xFFFFFFFF PUSH2 0x28C2 AND JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH2 0x10DD SWAP1 DUP4 PUSH4 0xFFFFFFFF PUSH2 0x2CF9 AND JUMP JUMPDEST PUSH1 0x8 DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x1F PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP9 AND ISZERO MUL ADD SWAP1 SWAP6 AND SWAP5 SWAP1 SWAP5 DIV SWAP4 DUP5 ADD DUP2 SWAP1 DIV DUP2 MUL DUP3 ADD DUP2 ADD SWAP1 SWAP3 MSTORE DUP3 DUP2 MSTORE PUSH1 0x60 SWAP4 SWAP1 SWAP3 SWAP1 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0xDEB JUMPI DUP1 PUSH1 0x1F LT PUSH2 0xDC0 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0xDEB JUMP JUMPDEST PUSH1 0xF SLOAD PUSH1 0xFF AND PUSH2 0x1805 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x15 PUSH1 0x24 DUP3 ADD MSTORE PUSH21 0x151A1948139D5C9CD95C9E481A5CC818DB1BDCD959 PUSH1 0x5A SHL PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH2 0x180D PUSH2 0xF3A JUMP JUMPDEST PUSH2 0x2710 SUB DUP2 GT ISZERO PUSH2 0x185D JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x15 PUSH1 0x24 DUP3 ADD MSTORE PUSH21 0x139BDD08195B9BDD59DA08189D5B189CC81B19599D PUSH1 0x5A SHL PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH2 0x2710 PUSH2 0x1868 PUSH2 0xF3A JUMP JUMPDEST LT PUSH2 0x18B3 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x16 PUSH1 0x24 DUP3 ADD MSTORE PUSH22 0x14D85B19481A185CC8185B1C9958591E48195B991959 PUSH1 0x52 SHL PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH1 0x0 DUP2 GT DUP1 ISZERO PUSH2 0x18C4 JUMPI POP PUSH1 0x14 DUP2 GT ISZERO JUMPDEST PUSH2 0x18FF JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x30 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3DE4 PUSH1 0x30 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x2710 PUSH2 0x1913 PUSH2 0x190D PUSH2 0xF3A JUMP JUMPDEST DUP4 PUSH2 0x2D0E JUMP JUMPDEST GT ISZERO PUSH2 0x1966 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x18 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x45786365656473204D41585F43525950544F5243484944530000000000000000 PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH2 0x1977 PUSH2 0x1971 PUSH2 0x1A5C JUMP JUMPDEST DUP3 PUSH2 0x2D68 JUMP JUMPDEST CALLVALUE LT ISZERO PUSH2 0x19B5 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x23 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3D09 PUSH1 0x23 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x10B1 JUMPI PUSH2 0x19CA PUSH1 0x2F PUSH2 0x2C27 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x19D6 PUSH1 0x2F PUSH2 0x2AE9 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0xA0 DUP2 ADD DUP3 MSTORE PUSH1 0x6 PUSH1 0x60 DUP3 ADD SWAP1 DUP2 MSTORE PUSH6 0x6772616E756D PUSH1 0xD0 SHL PUSH1 0x80 DUP4 ADD MSTORE DUP2 MSTORE PUSH1 0x0 NOT PUSH1 0x20 DUP1 DUP4 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x0 DUP3 DUP5 ADD DUP2 SWAP1 MSTORE DUP5 DUP2 MSTORE PUSH1 0xE DUP3 MSTORE SWAP3 SWAP1 SWAP3 KECCAK256 DUP2 MLOAD DUP1 MLOAD SWAP5 SWAP6 POP SWAP2 SWAP4 SWAP1 SWAP3 PUSH2 0x1A32 SWAP3 DUP5 SWAP3 SWAP2 ADD SWAP1 PUSH2 0x3954 JUMP JUMPDEST POP PUSH1 0x20 DUP3 ADD MLOAD PUSH1 0x1 DUP3 ADD SSTORE PUSH1 0x40 SWAP1 SWAP2 ADD MLOAD PUSH1 0x2 SWAP1 SWAP2 ADD SSTORE PUSH2 0x1A53 CALLER DUP3 PUSH2 0x2DC1 JUMP JUMPDEST POP PUSH1 0x1 ADD PUSH2 0x19B8 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x1A67 PUSH2 0xF3A JUMP JUMPDEST SWAP1 POP PUSH2 0x26AC DUP2 LT PUSH2 0x1A83 JUMPI PUSH8 0xDE0B6B3A7640000 SWAP2 POP POP PUSH2 0xDF3 JUMP JUMPDEST PUSH2 0x251C DUP2 LT PUSH2 0x1A9D JUMPI PUSH8 0x8E1BC9BF0400000 SWAP2 POP POP PUSH2 0xDF3 JUMP JUMPDEST PUSH2 0x1D4C DUP2 LT PUSH2 0x1AB7 JUMPI PUSH8 0x470DE4DF8200000 SWAP2 POP POP PUSH2 0xDF3 JUMP JUMPDEST PUSH2 0xDAC DUP2 LT PUSH2 0x1AD1 JUMPI PUSH8 0x2386F26FC100000 SWAP2 POP POP PUSH2 0xDF3 JUMP JUMPDEST PUSH2 0x5DC DUP2 LT PUSH2 0x1AEB JUMPI PUSH8 0x11C37937E080000 SWAP2 POP POP PUSH2 0xDF3 JUMP JUMPDEST PUSH2 0x1F4 DUP2 LT PUSH2 0x1B04 JUMPI PUSH7 0xD529AE9E860000 SWAP2 POP POP PUSH2 0xDF3 JUMP JUMPDEST PUSH7 0x8E1BC9BF040000 SWAP2 POP POP PUSH2 0xDF3 JUMP JUMPDEST POP SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP2 JUMP JUMPDEST PUSH2 0x1B25 PUSH2 0x25D4 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x1B8B JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x19 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x4552433732313A20617070726F766520746F2063616C6C657200000000000000 PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST DUP1 PUSH1 0x6 PUSH1 0x0 PUSH2 0x1B98 PUSH2 0x25D4 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 DUP2 AND DUP3 MSTORE PUSH1 0x20 DUP1 DUP4 ADD SWAP4 SWAP1 SWAP4 MSTORE PUSH1 0x40 SWAP2 DUP3 ADD PUSH1 0x0 SWAP1 DUP2 KECCAK256 SWAP2 DUP8 AND DUP1 DUP3 MSTORE SWAP2 SWAP1 SWAP4 MSTORE SWAP2 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND SWAP3 ISZERO ISZERO SWAP3 SWAP1 SWAP3 OR SWAP1 SWAP2 SSTORE PUSH2 0x1BDC PUSH2 0x25D4 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP5 ISZERO ISZERO DUP2 MSTORE SWAP1 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP3 SWAP1 SWAP3 AND SWAP2 PUSH32 0x17307EAB39AB6107E8899845AD3D59BD9653F200F220920489CA2B5937696C31 SWAP2 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 LOG3 POP POP JUMP JUMPDEST PUSH2 0x1C2D PUSH2 0xF75 PUSH2 0x25D4 JUMP JUMPDEST PUSH2 0x1C68 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x27 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3BFB PUSH1 0x27 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x1C71 DUP2 PUSH2 0x13E0 JUMP JUMPDEST PUSH2 0x1C7A JUMPI PUSH2 0x12B3 JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0xE PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH1 0x2 DUP2 ADD SLOAD PUSH1 0x1 DUP3 ADD SLOAD SWAP2 SWAP3 SWAP1 SWAP2 PUSH2 0x1C9E PUSH2 0x2DDB JUMP JUMPDEST SUB SWAP1 POP PUSH1 0x0 PUSH2 0x1CB0 DUP3 PUSH3 0x93A80 PUSH2 0x2DDF JUMP JUMPDEST SWAP1 POP DUP1 DUP4 GT ISZERO PUSH2 0x1CC3 JUMPI POP POP POP POP PUSH2 0x12B3 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1CD0 DUP5 PUSH1 0x1 PUSH2 0x2D0E JUMP JUMPDEST PUSH1 0x2 SWAP1 SWAP6 ADD SWAP5 SWAP1 SWAP5 SSTORE POP POP POP POP POP JUMP JUMPDEST PUSH2 0x1CE8 PUSH2 0x25D4 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x1CF9 PUSH2 0x170A JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ PUSH2 0x1D42 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x24 DUP3 ADD MSTORE PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x3D9B DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH1 0xF DUP1 SLOAD PUSH1 0xFF NOT AND PUSH1 0x1 OR SWAP1 SSTORE JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1D5B PUSH2 0x39CE JUMP JUMPDEST PUSH1 0x0 DUP4 DUP2 MSTORE PUSH1 0xE PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 SWAP2 DUP3 SWAP1 KECCAK256 DUP3 MLOAD DUP2 SLOAD PUSH1 0x2 PUSH1 0x1 DUP3 AND ISZERO PUSH2 0x100 MUL PUSH1 0x0 NOT ADD SWAP1 SWAP2 AND DIV PUSH1 0x1F DUP2 ADD DUP5 SWAP1 DIV SWAP1 SWAP4 MUL DUP2 ADD PUSH1 0x80 SWAP1 DUP2 ADD SWAP1 SWAP5 MSTORE PUSH1 0x60 DUP2 ADD DUP4 DUP2 MSTORE SWAP1 SWAP4 SWAP2 SWAP3 DUP5 SWAP3 DUP5 SWAP2 SWAP1 DUP5 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x1DF9 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x1DCE JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x1DF9 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x1DDC JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x1 DUP3 ADD SLOAD DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x2 DUP3 ADD SLOAD DUP2 MSTORE POP POP SWAP1 POP DUP1 PUSH1 0x20 ADD MLOAD PUSH1 0x0 EQ ISZERO PUSH2 0x1E2F JUMPI PUSH1 0x0 SWAP2 POP POP PUSH2 0xD5A JUMP JUMPDEST PUSH1 0x0 NOT DUP2 PUSH1 0x20 ADD MLOAD EQ ISZERO PUSH2 0x1E47 JUMPI PUSH1 0x1 SWAP2 POP POP PUSH2 0xD5A JUMP JUMPDEST PUSH1 0x40 DUP2 ADD MLOAD PUSH1 0x20 DUP3 ADD MLOAD PUSH1 0x0 SWAP1 PUSH2 0x1E5C PUSH2 0x2DDB JUMP JUMPDEST SUB SWAP1 POP PUSH1 0x0 PUSH2 0x1E6E DUP3 PUSH3 0x93A80 PUSH2 0x2DDF JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x1E7F DUP4 PUSH3 0x93A80 PUSH2 0x2E46 JUMP JUMPDEST SWAP1 POP DUP2 DUP5 EQ ISZERO PUSH2 0x1E97 JUMPI PUSH1 0x2 SWAP6 POP POP POP POP POP POP PUSH2 0xD5A JUMP JUMPDEST DUP2 PUSH2 0x1EA3 DUP6 PUSH1 0x1 PUSH2 0x2D0E JUMP JUMPDEST EQ DUP1 ISZERO PUSH2 0x1EB1 JUMPI POP PUSH2 0x2A30 DUP2 LT JUMPDEST ISZERO PUSH2 0x1EC4 JUMPI PUSH1 0x2 SWAP6 POP POP POP POP POP POP PUSH2 0xD5A JUMP JUMPDEST POP PUSH1 0x3 SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH2 0x1EDC PUSH2 0x1650 PUSH2 0x25D4 JUMP JUMPDEST PUSH2 0x1F17 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x31 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3E5C PUSH1 0x31 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x1F23 DUP5 DUP5 DUP5 DUP5 PUSH2 0x2EAD JUMP JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH1 0x60 DUP1 PUSH2 0x1F35 DUP4 PUSH2 0x12DB JUMP JUMPDEST POP SWAP2 SWAP3 POP PUSH1 0x1 SWAP2 POP PUSH2 0x1F44 SWAP1 POP JUMP JUMPDEST PUSH2 0x1F4D DUP5 PUSH2 0x1D51 JUMP JUMPDEST PUSH1 0x3 DUP2 GT ISZERO PUSH2 0x1F58 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x2036 JUMPI PUSH2 0x1F66 PUSH2 0x148A JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x2E DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x3B1E PUSH1 0x2E SWAP2 CODECOPY PUSH1 0x40 MLOAD PUSH1 0x20 ADD DUP1 DUP4 DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 JUMPDEST PUSH1 0x20 DUP4 LT PUSH2 0x1FB1 JUMPI DUP1 MLOAD DUP3 MSTORE PUSH1 0x1F NOT SWAP1 SWAP3 ADD SWAP2 PUSH1 0x20 SWAP2 DUP3 ADD SWAP2 ADD PUSH2 0x1F92 JUMP JUMPDEST MLOAD DUP2 MLOAD PUSH1 0x20 SWAP4 DUP5 SUB PUSH2 0x100 EXP PUSH1 0x0 NOT ADD DUP1 NOT SWAP1 SWAP3 AND SWAP2 AND OR SWAP1 MSTORE DUP6 MLOAD SWAP2 SWAP1 SWAP4 ADD SWAP3 DUP6 ADD SWAP2 POP DUP1 DUP4 DUP4 JUMPDEST PUSH1 0x20 DUP4 LT PUSH2 0x1FF9 JUMPI DUP1 MLOAD DUP3 MSTORE PUSH1 0x1F NOT SWAP1 SWAP3 ADD SWAP2 PUSH1 0x20 SWAP2 DUP3 ADD SWAP2 ADD PUSH2 0x1FDA JUMP JUMPDEST PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB DUP1 NOT DUP3 MLOAD AND DUP2 DUP5 MLOAD AND DUP1 DUP3 OR DUP6 MSTORE POP POP POP POP POP POP SWAP1 POP ADD SWAP3 POP POP POP PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE SWAP2 POP POP PUSH2 0xD5A JUMP JUMPDEST PUSH1 0x2 PUSH2 0x2041 DUP5 PUSH2 0x1D51 JUMP JUMPDEST PUSH1 0x3 DUP2 GT ISZERO PUSH2 0x204C JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x21BD JUMPI PUSH2 0x205A PUSH2 0x148A JUMP JUMPDEST PUSH1 0x31 PUSH1 0x0 DUP4 PUSH1 0x40 MLOAD PUSH1 0x20 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE DUP4 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x209F JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x2087 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x20CC JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP3 POP POP POP PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x40 MLOAD PUSH1 0x20 ADD DUP1 DUP4 DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 JUMPDEST PUSH1 0x20 DUP4 LT PUSH2 0x2127 JUMPI DUP1 MLOAD DUP3 MSTORE PUSH1 0x1F NOT SWAP1 SWAP3 ADD SWAP2 PUSH1 0x20 SWAP2 DUP3 ADD SWAP2 ADD PUSH2 0x2108 JUMP JUMPDEST PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB DUP1 NOT DUP3 MLOAD AND DUP2 DUP5 MLOAD AND DUP1 DUP3 OR DUP6 MSTORE POP POP POP POP POP POP SWAP1 POP ADD DUP3 DUP1 SLOAD PUSH1 0x1 DUP2 PUSH1 0x1 AND ISZERO PUSH2 0x100 MUL SUB AND PUSH1 0x2 SWAP1 DIV DUP1 ISZERO PUSH2 0x21A0 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x217E JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 DUP3 ADD SWAP2 PUSH2 0x21A0 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x218C JUMPI JUMPDEST POP POP SWAP3 POP POP POP PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE SWAP2 POP POP PUSH2 0xD5A JUMP JUMPDEST PUSH2 0x21C5 PUSH2 0x148A JUMP JUMPDEST PUSH1 0x32 PUSH1 0x0 DUP4 PUSH1 0x40 MLOAD PUSH1 0x20 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE DUP4 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x220A JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x21F2 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x2237 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP3 POP POP POP PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x40 MLOAD PUSH1 0x20 ADD DUP1 DUP4 DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 JUMPDEST PUSH1 0x20 DUP4 LT PUSH2 0x2292 JUMPI DUP1 MLOAD DUP3 MSTORE PUSH1 0x1F NOT SWAP1 SWAP3 ADD SWAP2 PUSH1 0x20 SWAP2 DUP3 ADD SWAP2 ADD PUSH2 0x2273 JUMP JUMPDEST PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB DUP1 NOT DUP3 MLOAD AND DUP2 DUP5 MLOAD AND DUP1 DUP3 OR DUP6 MSTORE POP POP POP POP POP POP SWAP1 POP ADD DUP3 DUP1 SLOAD PUSH1 0x1 DUP2 PUSH1 0x1 AND ISZERO PUSH2 0x100 MUL SUB AND PUSH1 0x2 SWAP1 DIV DUP1 ISZERO PUSH2 0x230B JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x22E9 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 DUP3 ADD SWAP2 PUSH2 0x230B JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x22F7 JUMPI JUMPDEST POP POP PUSH1 0x40 DUP1 MLOAD PUSH1 0x1F NOT DUP2 DUP5 SUB ADD DUP2 MSTORE SWAP2 SWAP1 MSTORE SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH2 0x10E0 SWAP1 PUSH2 0x2646 JUMP JUMPDEST PUSH1 0xE PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x40 SWAP2 DUP3 SWAP1 KECCAK256 DUP1 SLOAD DUP4 MLOAD PUSH1 0x1F PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP7 AND ISZERO MUL ADD SWAP1 SWAP4 AND SWAP3 SWAP1 SWAP3 DIV SWAP2 DUP3 ADD DUP5 SWAP1 DIV DUP5 MUL DUP2 ADD DUP5 ADD SWAP1 SWAP5 MSTORE DUP1 DUP5 MSTORE SWAP1 SWAP3 SWAP2 DUP4 SWAP2 SWAP1 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x23D5 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x23AA JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x23D5 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x23B8 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP SWAP1 DUP1 PUSH1 0x1 ADD SLOAD SWAP1 DUP1 PUSH1 0x2 ADD SLOAD SWAP1 POP DUP4 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH11 0x4D494E5445525F524F4C45 PUSH1 0xA8 SHL DUP2 MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0xB ADD SWAP1 KECCAK256 DUP2 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x2 ADD SLOAD PUSH2 0x242C SWAP1 PUSH2 0x1067 PUSH2 0x25D4 JUMP JUMPDEST PUSH2 0x113D JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x30 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3C4E PUSH1 0x30 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH11 0x5041555345525F524F4C45 PUSH1 0xA8 SHL DUP2 MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0xB ADD SWAP1 KECCAK256 DUP2 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x6 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SWAP4 SWAP1 SWAP5 AND DUP3 MSTORE SWAP2 SWAP1 SWAP2 MSTORE KECCAK256 SLOAD PUSH1 0xFF AND SWAP1 JUMP JUMPDEST PUSH2 0x24C0 PUSH2 0x25D4 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x24D1 PUSH2 0x170A JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ PUSH2 0x251A JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x24 DUP3 ADD MSTORE PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x3D9B DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND PUSH2 0x255F JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x26 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3AF8 PUSH1 0x26 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0xD SLOAD PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP5 AND SWAP3 AND SWAP1 PUSH32 0x8BE0079C531659141344CD1FD0A4F28419497F9722A3DAAFE3B4186F6B6457E0 SWAP1 PUSH1 0x0 SWAP1 LOG3 PUSH1 0xD DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP3 SWAP1 SWAP3 AND SWAP2 SWAP1 SWAP2 OR SWAP1 SSTORE JUMP JUMPDEST PUSH2 0x2A30 DUP2 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x10E0 PUSH1 0x3 DUP4 PUSH4 0xFFFFFFFF PUSH2 0x2EFF AND JUMP JUMPDEST CALLER SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND SWAP1 DUP2 OR SWAP1 SWAP2 SSTORE DUP2 SWAP1 PUSH2 0x260D DUP3 PUSH2 0x13B2 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH32 0x8C5BE1E5EBEC7D5BD14F71427D1E84F3DD0314C0F7B2291E5B200AC8C7C3B925 PUSH1 0x40 MLOAD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG4 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x10E0 DUP3 PUSH2 0x2AE9 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x265C DUP3 PUSH2 0x25C1 JUMP JUMPDEST PUSH2 0x2697 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x2C DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3C22 PUSH1 0x2C SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x0 PUSH2 0x26A2 DUP4 PUSH2 0x13B2 JUMP JUMPDEST SWAP1 POP DUP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ DUP1 PUSH2 0x26DD JUMPI POP DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x26D2 DUP5 PUSH2 0xDF6 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ JUMPDEST DUP1 PUSH2 0x26ED JUMPI POP PUSH2 0x26ED DUP2 DUP6 PUSH2 0x248A JUMP JUMPDEST SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x2708 DUP3 PUSH2 0x13B2 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ PUSH2 0x274D JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x29 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3DBB PUSH1 0x29 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH2 0x2792 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x24 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3BB1 PUSH1 0x24 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x279D DUP4 DUP4 DUP4 PUSH2 0x2F0B JUMP JUMPDEST PUSH2 0x27A8 PUSH1 0x0 DUP3 PUSH2 0x25D8 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH2 0x27D0 SWAP1 DUP3 PUSH4 0xFFFFFFFF PUSH2 0x2F6B AND JUMP JUMPDEST POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH2 0x27F9 SWAP1 DUP3 PUSH4 0xFFFFFFFF PUSH2 0x2F77 AND JUMP JUMPDEST POP PUSH2 0x280C PUSH1 0x3 DUP3 DUP5 PUSH4 0xFFFFFFFF PUSH2 0x2F83 AND JUMP JUMPDEST POP DUP1 DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF PUSH1 0x40 MLOAD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG4 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH2 0x2871 SWAP1 DUP3 PUSH4 0xFFFFFFFF PUSH2 0x2F99 AND JUMP JUMPDEST ISZERO PUSH2 0x10B1 JUMPI PUSH2 0x287E PUSH2 0x25D4 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP4 PUSH32 0x2F8788117E7EFF1D82E926EC794901D17C78024A50270940304540A733656F0D PUSH1 0x40 MLOAD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG4 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x10DD DUP4 DUP4 PUSH2 0x2FAE JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH2 0x28EC SWAP1 DUP3 PUSH4 0xFFFFFFFF PUSH2 0x3012 AND JUMP JUMPDEST ISZERO PUSH2 0x10B1 JUMPI PUSH2 0x28F9 PUSH2 0x25D4 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP4 PUSH32 0xF6391F5C32D9C69D2A47EA670B442974B53935D1EDC7FD64EB21E047A839171B PUSH1 0x40 MLOAD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG4 POP POP JUMP JUMPDEST PUSH2 0x2945 PUSH2 0x12D2 JUMP JUMPDEST PUSH2 0x298D JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x14 PUSH1 0x24 DUP3 ADD MSTORE PUSH20 0x14185D5CD8589B194E881B9BDD081C185D5CD959 PUSH1 0x62 SHL PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH1 0xB DUP1 SLOAD PUSH1 0xFF NOT AND SWAP1 SSTORE PUSH32 0x5DB9EE0A495BF2E6FF9C91A7834C1BA4FDD244A5E8AA4E537BD38AEAE4B073AA PUSH2 0x29C0 PUSH2 0x25D4 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP3 AND DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 LOG1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x29E8 DUP3 PUSH2 0x13B2 JUMP JUMPDEST SWAP1 POP PUSH2 0x29F6 DUP2 PUSH1 0x0 DUP5 PUSH2 0x2F0B JUMP JUMPDEST PUSH2 0x2A01 PUSH1 0x0 DUP4 PUSH2 0x25D8 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x9 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP5 AND ISZERO MUL ADD SWAP1 SWAP2 AND DIV ISZERO PUSH2 0x2A3F JUMPI PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x9 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH2 0x2A3F SWAP2 PUSH2 0x39EF JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH2 0x2A67 SWAP1 DUP4 PUSH4 0xFFFFFFFF PUSH2 0x2F6B AND JUMP JUMPDEST POP PUSH2 0x2A79 PUSH1 0x3 DUP4 PUSH4 0xFFFFFFFF PUSH2 0x3027 AND JUMP JUMPDEST POP PUSH1 0x40 MLOAD DUP3 SWAP1 PUSH1 0x0 SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND SWAP1 PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF SWAP1 DUP4 SWAP1 LOG4 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP1 DUP1 PUSH2 0x2AC5 DUP7 DUP7 PUSH2 0x3033 JUMP JUMPDEST SWAP1 SWAP8 SWAP1 SWAP7 POP SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2ADF DUP5 DUP5 DUP5 PUSH2 0x30AE JUMP JUMPDEST SWAP1 POP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH2 0x2B48 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x4552433732313A206D696E7420746F20746865207A65726F2061646472657373 PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH2 0x2B51 DUP2 PUSH2 0x25C1 JUMP JUMPDEST ISZERO PUSH2 0x2BA3 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x1C PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x4552433732313A20746F6B656E20616C7265616479206D696E74656400000000 PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH2 0x2BAF PUSH1 0x0 DUP4 DUP4 PUSH2 0x2F0B JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH2 0x2BD7 SWAP1 DUP3 PUSH4 0xFFFFFFFF PUSH2 0x2F77 AND JUMP JUMPDEST POP PUSH2 0x2BEA PUSH1 0x3 DUP3 DUP5 PUSH4 0xFFFFFFFF PUSH2 0x2F83 AND JUMP JUMPDEST POP PUSH1 0x40 MLOAD DUP2 SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND SWAP1 PUSH1 0x0 SWAP1 PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF SWAP1 DUP3 SWAP1 LOG4 POP POP JUMP JUMPDEST DUP1 SLOAD PUSH1 0x1 ADD SWAP1 SSTORE JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD TIMESTAMP PUSH1 0x20 DUP1 DUP4 ADD SWAP2 SWAP1 SWAP2 MSTORE DIFFICULTY DUP3 DUP5 ADD MSTORE PUSH1 0x60 DUP1 DUP4 ADD DUP6 SWAP1 MSTORE DUP4 MLOAD DUP1 DUP5 SUB SWAP1 SWAP2 ADD DUP2 MSTORE PUSH1 0x80 SWAP1 SWAP3 ADD SWAP1 SWAP3 MSTORE DUP1 MLOAD SWAP2 ADD KECCAK256 PUSH1 0x0 SWAP1 PUSH2 0x2C6F DUP5 DUP3 PUSH2 0x3178 JUMP JUMPDEST POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x2C7E PUSH2 0x12D2 JUMP JUMPDEST ISZERO PUSH2 0x2CC3 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x10 PUSH1 0x24 DUP3 ADD MSTORE PUSH16 0x14185D5CD8589B194E881C185D5CD959 PUSH1 0x82 SHL PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH1 0xB DUP1 SLOAD PUSH1 0xFF NOT AND PUSH1 0x1 OR SWAP1 SSTORE PUSH32 0x62E78CEA01BEE320CD4E420270B5EA74000D11B0C9F74754EBDBFC544B05A258 PUSH2 0x29C0 PUSH2 0x25D4 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x10DD DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND PUSH2 0x31D2 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 ADD DUP4 DUP2 LT ISZERO PUSH2 0x10DD JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x1B PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x536166654D6174683A206164646974696F6E206F766572666C6F770000000000 PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH1 0x0 DUP3 PUSH2 0x2D77 JUMPI POP PUSH1 0x0 PUSH2 0x10E0 JUMP JUMPDEST DUP3 DUP3 MUL DUP3 DUP5 DUP3 DUP2 PUSH2 0x2D84 JUMPI INVALID JUMPDEST DIV EQ PUSH2 0x10DD JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x21 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3D4E PUSH1 0x21 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x10B1 DUP3 DUP3 PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE POP PUSH2 0x31EA JUMP JUMPDEST TIMESTAMP SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 DUP3 GT PUSH2 0x2E35 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x1A PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x536166654D6174683A206469766973696F6E206279207A65726F000000000000 PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST DUP2 DUP4 DUP2 PUSH2 0x2E3E JUMPI INVALID JUMPDEST DIV SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP3 GT PUSH2 0x2E9C JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x18 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x536166654D6174683A206D6F64756C6F206279207A65726F0000000000000000 PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST DUP2 DUP4 DUP2 PUSH2 0x2EA5 JUMPI INVALID JUMPDEST MOD SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH2 0x2EB8 DUP5 DUP5 DUP5 PUSH2 0x26F5 JUMP JUMPDEST PUSH2 0x2EC4 DUP5 DUP5 DUP5 DUP5 PUSH2 0x323C JUMP JUMPDEST PUSH2 0x1F23 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x32 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3AC6 PUSH1 0x32 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x0 PUSH2 0x10DD DUP4 DUP4 PUSH2 0x31D2 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND ISZERO DUP1 PUSH2 0x2F25 JUMPI POP PUSH2 0x2F25 DUP2 PUSH2 0x13E0 JUMP JUMPDEST PUSH2 0x2F60 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x27 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3E35 PUSH1 0x27 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0xF2E DUP4 DUP4 DUP4 PUSH2 0x33BC JUMP JUMPDEST PUSH1 0x0 PUSH2 0x10DD DUP4 DUP4 PUSH2 0x33C7 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x10DD DUP4 DUP4 PUSH2 0x348D JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2ADF DUP5 DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 AND PUSH2 0x34D7 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x10DD DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND PUSH2 0x348D JUMP JUMPDEST DUP2 SLOAD PUSH1 0x0 SWAP1 DUP3 LT PUSH2 0x2FF0 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x22 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3A4A PUSH1 0x22 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST DUP3 PUSH1 0x0 ADD DUP3 DUP2 SLOAD DUP2 LT PUSH2 0x2FFF JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 ADD SLOAD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x10DD DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND PUSH2 0x33C7 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x10DD DUP4 DUP4 PUSH2 0x356E JUMP JUMPDEST DUP2 SLOAD PUSH1 0x0 SWAP1 DUP2 SWAP1 DUP4 LT PUSH2 0x3077 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x22 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3D2C PUSH1 0x22 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x0 DUP5 PUSH1 0x0 ADD DUP5 DUP2 SLOAD DUP2 LT PUSH2 0x3088 JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x2 MUL ADD SWAP1 POP DUP1 PUSH1 0x0 ADD SLOAD DUP2 PUSH1 0x1 ADD SLOAD SWAP3 POP SWAP3 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x1 DUP5 ADD PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 SLOAD DUP3 DUP2 PUSH2 0x3149 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE DUP4 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x310E JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x30F6 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x313B JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP3 POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST POP DUP5 PUSH1 0x0 ADD PUSH1 0x1 DUP3 SUB DUP2 SLOAD DUP2 LT PUSH2 0x315C JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x2 MUL ADD PUSH1 0x1 ADD SLOAD SWAP2 POP POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0xE PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x60 PUSH2 0x319C PUSH2 0x3197 DUP5 PUSH2 0x2710 PUSH2 0x2E46 JUMP JUMPDEST PUSH2 0x3642 JUMP JUMPDEST DUP1 MLOAD SWAP1 SWAP2 POP PUSH2 0x31B1 SWAP1 DUP4 SWAP1 PUSH1 0x20 DUP5 ADD SWAP1 PUSH2 0x3954 JUMP JUMPDEST POP PUSH2 0x31BA PUSH2 0x2DDB JUMP JUMPDEST PUSH1 0x1 DUP4 ADD SSTORE PUSH1 0x0 PUSH2 0x31CA DUP6 PUSH2 0x13B2 JUMP JUMPDEST POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 SWAP2 SWAP1 SWAP2 ADD PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD ISZERO ISZERO SWAP1 JUMP JUMPDEST PUSH2 0x31F4 DUP4 DUP4 PUSH2 0x2AED JUMP JUMPDEST PUSH2 0x3201 PUSH1 0x0 DUP5 DUP5 DUP5 PUSH2 0x323C JUMP JUMPDEST PUSH2 0xF2E JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x32 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3AC6 PUSH1 0x32 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x0 PUSH2 0x3250 DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x372E JUMP JUMPDEST PUSH2 0x325C JUMPI POP PUSH1 0x1 PUSH2 0x26ED JUMP JUMPDEST PUSH1 0x60 PUSH2 0x3382 PUSH4 0xA85BD01 PUSH1 0xE1 SHL PUSH2 0x3271 PUSH2 0x25D4 JUMP JUMPDEST DUP9 DUP8 DUP8 PUSH1 0x40 MLOAD PUSH1 0x24 ADD DUP1 DUP6 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 MSTORE PUSH1 0x20 ADD DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE DUP4 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x32EA JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x32D2 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x3317 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP6 POP POP POP POP POP POP PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH1 0x20 DUP3 ADD DUP1 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB DUP4 DUP2 DUP4 AND OR DUP4 MSTORE POP POP POP POP PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x32 DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x3AC6 PUSH1 0x32 SWAP2 CODECOPY PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP9 AND SWAP2 SWAP1 PUSH4 0xFFFFFFFF PUSH2 0x3734 AND JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP2 DUP1 PUSH1 0x20 ADD SWAP1 MLOAD PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x339B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH4 0xA85BD01 PUSH1 0xE1 SHL EQ SWAP3 POP POP POP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH2 0xF2E DUP4 DUP4 DUP4 PUSH2 0x3743 JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 DUP4 ADD PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 SLOAD DUP1 ISZERO PUSH2 0x3483 JUMPI DUP4 SLOAD PUSH1 0x0 NOT DUP1 DUP4 ADD SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH1 0x0 SWAP1 DUP8 SWAP1 DUP4 SWAP1 DUP2 LT PUSH2 0x33FA JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 ADD SLOAD SWAP1 POP DUP1 DUP8 PUSH1 0x0 ADD DUP5 DUP2 SLOAD DUP2 LT PUSH2 0x3417 JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 DUP1 DUP4 KECCAK256 SWAP1 SWAP2 ADD SWAP3 SWAP1 SWAP3 SSTORE DUP3 DUP2 MSTORE PUSH1 0x1 DUP10 DUP2 ADD SWAP1 SWAP3 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SWAP1 DUP5 ADD SWAP1 SSTORE DUP7 SLOAD DUP8 SWAP1 DUP1 PUSH2 0x3447 JUMPI INVALID JUMPDEST PUSH1 0x1 SWAP1 SUB DUP2 DUP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 ADD PUSH1 0x0 SWAP1 SSTORE SWAP1 SSTORE DUP7 PUSH1 0x1 ADD PUSH1 0x0 DUP8 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 SWAP1 SSTORE PUSH1 0x1 SWAP5 POP POP POP POP POP PUSH2 0x10E0 JUMP JUMPDEST PUSH1 0x0 SWAP2 POP POP PUSH2 0x10E0 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x3499 DUP4 DUP4 PUSH2 0x31D2 JUMP JUMPDEST PUSH2 0x34CF JUMPI POP DUP2 SLOAD PUSH1 0x1 DUP2 DUP2 ADD DUP5 SSTORE PUSH1 0x0 DUP5 DUP2 MSTORE PUSH1 0x20 DUP1 DUP3 KECCAK256 SWAP1 SWAP4 ADD DUP5 SWAP1 SSTORE DUP5 SLOAD DUP5 DUP3 MSTORE DUP3 DUP7 ADD SWAP1 SWAP4 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SWAP2 SWAP1 SWAP2 SSTORE PUSH2 0x10E0 JUMP JUMPDEST POP PUSH1 0x0 PUSH2 0x10E0 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x1 DUP5 ADD PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 SLOAD DUP1 PUSH2 0x353C JUMPI POP POP PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD DUP3 MSTORE DUP4 DUP2 MSTORE PUSH1 0x20 DUP1 DUP3 ADD DUP5 DUP2 MSTORE DUP7 SLOAD PUSH1 0x1 DUP2 DUP2 ADD DUP10 SSTORE PUSH1 0x0 DUP10 DUP2 MSTORE DUP5 DUP2 KECCAK256 SWAP6 MLOAD PUSH1 0x2 SWAP1 SWAP4 MUL SWAP1 SWAP6 ADD SWAP2 DUP3 SSTORE SWAP2 MLOAD SWAP1 DUP3 ADD SSTORE DUP7 SLOAD DUP7 DUP5 MSTORE DUP2 DUP9 ADD SWAP1 SWAP3 MSTORE SWAP3 SWAP1 SWAP2 KECCAK256 SSTORE PUSH2 0x2AE2 JUMP JUMPDEST DUP3 DUP6 PUSH1 0x0 ADD PUSH1 0x1 DUP4 SUB DUP2 SLOAD DUP2 LT PUSH2 0x354F JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x2 MUL ADD PUSH1 0x1 ADD DUP2 SWAP1 SSTORE POP PUSH1 0x0 SWAP2 POP POP PUSH2 0x2AE2 JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 DUP4 ADD PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 SLOAD DUP1 ISZERO PUSH2 0x3483 JUMPI DUP4 SLOAD PUSH1 0x0 NOT DUP1 DUP4 ADD SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH1 0x0 SWAP1 DUP8 SWAP1 DUP4 SWAP1 DUP2 LT PUSH2 0x35A1 JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x2 MUL ADD SWAP1 POP DUP1 DUP8 PUSH1 0x0 ADD DUP5 DUP2 SLOAD DUP2 LT PUSH2 0x35C1 JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 DUP1 DUP4 KECCAK256 DUP5 SLOAD PUSH1 0x2 SWAP1 SWAP4 MUL ADD SWAP2 DUP3 SSTORE PUSH1 0x1 SWAP4 DUP5 ADD SLOAD SWAP2 DUP5 ADD SWAP2 SWAP1 SWAP2 SSTORE DUP4 SLOAD DUP3 MSTORE DUP10 DUP4 ADD SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SWAP1 DUP5 ADD SWAP1 SSTORE DUP7 SLOAD DUP8 SWAP1 DUP1 PUSH2 0x3600 JUMPI INVALID JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 DUP1 DUP3 KECCAK256 PUSH1 0x2 PUSH1 0x0 NOT SWAP1 SWAP5 ADD SWAP4 DUP5 MUL ADD DUP3 DUP2 SSTORE PUSH1 0x1 SWAP1 DUP2 ADD DUP4 SWAP1 SSTORE SWAP3 SWAP1 SWAP4 SSTORE DUP9 DUP2 MSTORE DUP10 DUP3 ADD SWAP1 SWAP3 MSTORE PUSH1 0x40 DUP3 KECCAK256 SWAP2 SWAP1 SWAP2 SSTORE SWAP5 POP PUSH2 0x10E0 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 JUMPDEST PUSH1 0xA DUP2 LT ISZERO PUSH2 0x3728 JUMPI PUSH1 0x10 DUP2 PUSH1 0xA DUP2 LT PUSH2 0x365D JUMPI INVALID JUMPDEST PUSH1 0x10 SWAP2 DUP3 DUP3 DIV ADD SWAP2 SWAP1 MOD PUSH1 0x2 MUL SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH2 0xFFFF AND PUSH2 0xFFFF AND DUP4 GT PUSH2 0x3720 JUMPI PUSH1 0x11 DUP2 PUSH1 0xA DUP2 LT PUSH2 0x368E JUMPI INVALID JUMPDEST ADD DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x2 PUSH1 0x1 DUP6 AND ISZERO PUSH2 0x100 MUL PUSH1 0x0 NOT ADD SWAP1 SWAP5 AND SWAP4 SWAP1 SWAP4 DIV PUSH1 0x1F DUP2 ADD DUP5 SWAP1 DIV DUP5 MUL DUP3 ADD DUP5 ADD SWAP1 SWAP3 MSTORE DUP2 DUP2 MSTORE SWAP3 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x3713 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x36E8 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x3713 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x36F6 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP SWAP2 POP POP PUSH2 0xD5A JUMP JUMPDEST PUSH1 0x1 ADD PUSH2 0x3647 JUMP JUMPDEST POP SWAP2 SWAP1 POP JUMP JUMPDEST EXTCODESIZE ISZERO ISZERO SWAP1 JUMP JUMPDEST PUSH1 0x60 PUSH2 0x2ADF DUP5 DUP5 PUSH1 0x0 DUP6 PUSH2 0x3792 JUMP JUMPDEST PUSH2 0x374E DUP4 DUP4 DUP4 PUSH2 0xF2E JUMP JUMPDEST PUSH2 0x3756 PUSH2 0x12D2 JUMP JUMPDEST ISZERO PUSH2 0xF2E JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x2B DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3A6C PUSH1 0x2B SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x60 DUP3 SELFBALANCE LT ISZERO PUSH2 0x37D3 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x26 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3BD5 PUSH1 0x26 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x37DC DUP6 PUSH2 0x372E JUMP JUMPDEST PUSH2 0x382D JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x1D PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x416464726573733A2063616C6C20746F206E6F6E2D636F6E7472616374000000 PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP7 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP6 DUP8 PUSH1 0x40 MLOAD DUP1 DUP3 DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 JUMPDEST PUSH1 0x20 DUP4 LT PUSH2 0x386C JUMPI DUP1 MLOAD DUP3 MSTORE PUSH1 0x1F NOT SWAP1 SWAP3 ADD SWAP2 PUSH1 0x20 SWAP2 DUP3 ADD SWAP2 ADD PUSH2 0x384D JUMP JUMPDEST PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB DUP1 NOT DUP3 MLOAD AND DUP2 DUP5 MLOAD AND DUP1 DUP3 OR DUP6 MSTORE POP POP POP POP POP POP SWAP1 POP ADD SWAP2 POP POP PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 DUP8 GAS CALL SWAP3 POP POP POP RETURNDATASIZE DUP1 PUSH1 0x0 DUP2 EQ PUSH2 0x38CE JUMPI PUSH1 0x40 MLOAD SWAP2 POP PUSH1 0x1F NOT PUSH1 0x3F RETURNDATASIZE ADD AND DUP3 ADD PUSH1 0x40 MSTORE RETURNDATASIZE DUP3 MSTORE RETURNDATASIZE PUSH1 0x0 PUSH1 0x20 DUP5 ADD RETURNDATACOPY PUSH2 0x38D3 JUMP JUMPDEST PUSH1 0x60 SWAP2 POP JUMPDEST POP SWAP2 POP SWAP2 POP PUSH2 0x38E3 DUP3 DUP3 DUP7 PUSH2 0x38EE JUMP JUMPDEST SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x60 DUP4 ISZERO PUSH2 0x38FD JUMPI POP DUP2 PUSH2 0x2AE2 JUMP JUMPDEST DUP3 MLOAD ISZERO PUSH2 0x390D JUMPI DUP3 MLOAD DUP1 DUP5 PUSH1 0x20 ADD REVERT JUMPDEST PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD DUP2 DUP2 MSTORE DUP5 MLOAD PUSH1 0x24 DUP5 ADD MSTORE DUP5 MLOAD DUP6 SWAP4 SWAP2 SWAP3 DUP4 SWAP3 PUSH1 0x44 ADD SWAP2 SWAP1 DUP6 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 DUP4 ISZERO PUSH2 0x310E JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x30F6 JUMP JUMPDEST DUP3 DUP1 SLOAD PUSH1 0x1 DUP2 PUSH1 0x1 AND ISZERO PUSH2 0x100 MUL SUB AND PUSH1 0x2 SWAP1 DIV SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x1F ADD PUSH1 0x20 SWAP1 DIV DUP2 ADD SWAP3 DUP3 PUSH1 0x1F LT PUSH2 0x3995 JUMPI DUP1 MLOAD PUSH1 0xFF NOT AND DUP4 DUP1 ADD OR DUP6 SSTORE PUSH2 0x39C2 JUMP JUMPDEST DUP3 DUP1 ADD PUSH1 0x1 ADD DUP6 SSTORE DUP3 ISZERO PUSH2 0x39C2 JUMPI SWAP2 DUP3 ADD JUMPDEST DUP3 DUP2 GT ISZERO PUSH2 0x39C2 JUMPI DUP3 MLOAD DUP3 SSTORE SWAP2 PUSH1 0x20 ADD SWAP2 SWAP1 PUSH1 0x1 ADD SWAP1 PUSH2 0x39A7 JUMP JUMPDEST POP PUSH2 0x1B14 SWAP3 SWAP2 POP PUSH2 0x3A2F JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST POP DUP1 SLOAD PUSH1 0x1 DUP2 PUSH1 0x1 AND ISZERO PUSH2 0x100 MUL SUB AND PUSH1 0x2 SWAP1 DIV PUSH1 0x0 DUP3 SSTORE DUP1 PUSH1 0x1F LT PUSH2 0x3A15 JUMPI POP PUSH2 0x12B3 JUMP JUMPDEST PUSH1 0x1F ADD PUSH1 0x20 SWAP1 DIV SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 DUP2 ADD SWAP1 PUSH2 0x12B3 SWAP2 SWAP1 JUMPDEST PUSH2 0xDF3 SWAP2 SWAP1 JUMPDEST DUP1 DUP3 GT ISZERO PUSH2 0x1B14 JUMPI PUSH1 0x0 DUP2 SSTORE PUSH1 0x1 ADD PUSH2 0x3A35 JUMP INVALID GASLIMIT PUSH15 0x756D657261626C655365743A20696E PUSH5 0x6578206F75 PUSH21 0x206F6620626F756E64734552433732315061757361 PUSH3 0x6C653A KECCAK256 PUSH21 0x6F6B656E207472616E73666572207768696C652070 PUSH2 0x7573 PUSH6 0x644163636573 PUSH20 0x436F6E74726F6C3A2073656E646572206D757374 KECCAK256 PUSH3 0x652061 PUSH15 0x2061646D696E20746F206772616E74 GASLIMIT MSTORE NUMBER CALLDATACOPY ORIGIN BALANCE GASPRICE KECCAK256 PUSH21 0x72616E7366657220746F206E6F6E20455243373231 MSTORE PUSH6 0x636569766572 KECCAK256 PUSH10 0x6D706C656D656E746572 0x4F PUSH24 0x6E61626C653A206E6577206F776E65722069732074686520 PUSH27 0x65726F2061646472657373516D5764316D6E374475477978394279 PUSH7 0x4E657143736764 MSTORE8 SSTORE PUSH20 0x4A5A316372616769746761796773714476456D47 PUSH6 0x726D696E6174 PUSH10 0x6F6E2073746172747320 ORIGIN ADDRESS ORIGIN BALANCE 0x2D ADDRESS CALLVALUE 0x2D BALANCE ORIGIN SLOAD BALANCE CALLDATASIZE GASPRICE ADDRESS ADDRESS GASPRICE ADDRESS ADDRESS GAS GASLIMIT MSTORE NUMBER CALLDATACOPY ORIGIN BALANCE POP PUSH19 0x657365744D696E746572506175736572417574 PUSH16 0x49643A206D7573742068617665207061 PUSH22 0x73657220726F6C6520746F2070617573654552433732 BALANCE GASPRICE KECCAK256 PUSH21 0x72616E7366657220746F20746865207A65726F2061 PUSH5 0x6472657373 COINBASE PUSH5 0x6472657373 GASPRICE KECCAK256 PUSH10 0x6E73756666696369656E PUSH21 0x2062616C616E636520666F722063616C6C4F6E6C79 KECCAK256 PUSH21 0x6865204F776E65722063616E207761746572206120 NUMBER PUSH19 0x7970744F72636869642E4552433732313A206F PUSH17 0x657261746F7220717565727920666F7220 PUSH15 0x6F6E6578697374656E7420746F6B65 PUSH15 0x416363657373436F6E74726F6C3A20 PUSH20 0x656E646572206D75737420626520616E2061646D PUSH10 0x6E20746F207265766F6B PUSH6 0x455243373231 GASPRICE KECCAK256 PUSH2 0x7070 PUSH19 0x6F76652063616C6C6572206973206E6F74206F PUSH24 0x6E6572206E6F7220617070726F76656420666F7220616C6C GASLIMIT MSTORE NUMBER CALLDATACOPY ORIGIN BALANCE GASPRICE KECCAK256 PUSH3 0x616C61 PUSH15 0x636520717565727920666F72207468 PUSH6 0x207A65726F20 PUSH2 0x6464 PUSH19 0x6573734552433732313A206F776E6572207175 PUSH6 0x727920666F72 KECCAK256 PUSH15 0x6F6E6578697374656E7420746F6B65 PUSH15 0x45746865722076616C75652073656E PUSH21 0x2069732062656C6F7720746865207072696365456E PUSH22 0x6D657261626C654D61703A20696E646578206F757420 PUSH16 0x6620626F756E6473536166654D617468 GASPRICE KECCAK256 PUSH14 0x756C7469706C69636174696F6E20 PUSH16 0x766572666C6F774552433732313A2061 PUSH17 0x70726F76656420717565727920666F7220 PUSH15 0x6F6E6578697374656E7420746F6B65 PUSH15 0x4F776E61626C653A2063616C6C6572 KECCAK256 PUSH10 0x73206E6F742074686520 PUSH16 0x776E65724552433732313A207472616E PUSH20 0x666572206F6620746F6B656E2074686174206973 KECCAK256 PUSH15 0x6F74206F776E596F752063616E2070 PUSH13 0x616E74206D696E696D756D2031 0x2C KECCAK256 PUSH14 0x6178696D756D2032302043727970 PUSH21 0x4F7263686964734552433732313A20617070726F76 PUSH2 0x6C20 PUSH21 0x6F2063757272656E74206F776E6572446561642043 PUSH19 0x7970744F7263686964732063616E6E6F742062 PUSH6 0x207472616E73 PUSH7 0x65727265644552 NUMBER CALLDATACOPY ORIGIN BALANCE GASPRICE KECCAK256 PUSH21 0x72616E736665722063616C6C6572206973206E6F74 KECCAK256 PUSH16 0x776E6572206E6F7220617070726F7665 PUSH5 0x4F6E6C7920 PUSH21 0x6865204F776E65722063616E206765726D696E6174 PUSH6 0x206120437279 PUSH17 0x744F72636869642E455243373231507265 PUSH20 0x65744D696E7465725061757365724175746F4964 GASPRICE KECCAK256 PUSH14 0x7573742068617665206D696E7465 PUSH19 0x20726F6C6520746F206D696E74455243373231 TIMESTAMP PUSH22 0x726E61626C653A2063616C6C6572206973206E6F7420 PUSH16 0x776E6572206E6F7220617070726F7665 PUSH5 0x4552433732 BALANCE POP PUSH19 0x657365744D696E746572506175736572417574 PUSH16 0x49643A206D7573742068617665207061 PUSH22 0x73657220726F6C6520746F20756E7061757365416363 PUSH6 0x7373436F6E74 PUSH19 0x6F6C3A2063616E206F6E6C792072656E6F756E PUSH4 0x6520726F PUSH13 0x657320666F722073656C66A264 PUSH10 0x70667358221220669084 0xC0 CALLDATACOPY 0xE9 0xE2 PUSH20 0xB31D45E8CD7D87FCB21B2D1237DF1DEE094B97B CODECOPY 0x22 SWAP3 PUSH19 0x64736F6C63430006060033516D55384D4E7A6E SLOAD CALLDATASIZE CHAINID DIFFICULTY BALANCE PUSH23 0x3558646E536541366345597178706A374D676B4543706F PUSH21 0x33614345526572582F637970726970656469756D2D PUSH4 0x616C6365 PUSH16 0x6C75732E6A736F6E516D55384D4E7A6E SLOAD CALLDATASIZE CHAINID DIFFICULTY BALANCE PUSH23 0x3558646E536541366345597178706A374D676B4543706F PUSH21 0x33614345526572582F64656E64726F7068796C6178 0x2D PUSH13 0x696E64656E69692E6A736F6E51 PUSH14 0x56376E735167484E767779527862 PUSH3 0x685035 CODECOPY PUSH10 0x48336772715366713367 CALLDATACOPY PUSH11 0x6F53506153314A47526D4A PUSH2 0x2F70 PUSH2 0x7068 PUSH10 0x6F706564696C756D2D72 PUSH16 0x7468736368696C6469616E756D2E6A73 PUSH16 0x6E516D55384D4E7A6E54364644317635 PC PUSH5 0x6E53654136 PUSH4 0x45597178 PUSH17 0x6A374D676B4543706F7433614345526572 PC 0x2F PUSH17 0x6C6174616E74686572612D617A6F726963 PUSH2 0x2E6A PUSH20 0x6F6E516D56376E735167484E7677795278626268 POP CALLDATALOAD CODECOPY PUSH10 0x48336772715366713367 CALLDATACOPY PUSH11 0x6F53506153314A47526D4A PUSH2 0x2F63 PUSH26 0x70726970656469756D2D63616C63656F6C75732E6A736F6E516D JUMP CALLDATACOPY PUSH15 0x735167484E76777952786262685035 CODECOPY PUSH10 0x48336772715366713367 CALLDATACOPY PUSH11 0x6F53506153314A47526D4A PUSH2 0x2F70 PUSH9 0x616C61656E6F707369 PUSH20 0x2D6D6963686F6C69747A69692E6A736F6E516D55 CODESIZE 0x4D 0x4E PUSH27 0x6E5436464431763558646E536541366345597178706A374D676B45 NUMBER PUSH17 0x6F7433614345526572582F76616E64612D PUSH4 0x6F657275 PUSH13 0x65612E6A736F6E516D55384D4E PUSH27 0x6E5436464431763558646E536541366345597178706A374D676B45 NUMBER PUSH17 0x6F7433614345526572582F6D696C746F6E PUSH10 0x612D6B61796173696D61 PUSH6 0x2E6A736F6E51 PUSH14 0x56376E735167484E767779527862 PUSH3 0x685035 CODECOPY PUSH10 0x48336772715366713367 CALLDATACOPY PUSH11 0x6F53506153314A47526D4A PUSH2 0x2F70 PUSH2 0x7068 PUSH10 0x6F706564696C756D2D76 PUSH10 0x65746E616D656E73652E PUSH11 0x736F6E516D55384D4E7A6E SLOAD CALLDATASIZE CHAINID DIFFICULTY BALANCE PUSH23 0x3558646E536541366345597178706A374D676B4543706F PUSH21 0x33614345526572582F6775617269616E7468652D61 PUSH22 0x72616E74696163612E6A736F6E516D56376E73516748 0x4E PUSH23 0x777952786262685035396948336772715366713367376A PUSH16 0x53506153314A47526D4A612F7368656E PUSH27 0x68656E6963612D6F726368696461636561652E6A736F6E516D5637 PUSH15 0x735167484E76777952786262685035 CODECOPY PUSH10 0x48336772715366713367 CALLDATACOPY PUSH11 0x6F53506153314A47526D4A PUSH2 0x2F6D PUSH10 0x6C746F6E69612D6B6179 PUSH2 0x7369 PUSH14 0x61652E6A736F6E516D56376E7351 PUSH8 0x484E767779527862 PUSH3 0x685035 CODECOPY PUSH10 0x48336772715366713367 CALLDATACOPY PUSH11 0x6F53506153314A47526D4A PUSH2 0x2F76 PUSH2 0x6E64 PUSH2 0x2D63 PUSH16 0x6572756C65612E6A736F6E516D55384D 0x4E PUSH27 0x6E5436464431763558646E536541366345597178706A374D676B45 NUMBER PUSH17 0x6F7433614345526572582F70617068696F PUSH17 0x6564696C756D2D726F7468736368696C64 PUSH10 0x616E756D2E6A736F6E51 PUSH14 0x56376E735167484E767779527862 PUSH3 0x685035 CODECOPY PUSH10 0x48336772715366713367 CALLDATACOPY PUSH11 0x6F53506153314A47526D4A PUSH2 0x2F67 PUSH22 0x617269616E7468652D617572616E74696163612E6A73 PUSH16 0x6E516D55384D4E7A6E54364644317635 PC PUSH5 0x6E53654136 PUSH4 0x45597178 PUSH17 0x6A374D676B4543706F7433614345526572 PC 0x2F PUSH17 0x617068696F706564696C756D2D76696574 PUSH15 0x616D656E73652E6A736F6E516D5637 PUSH15 0x735167484E76777952786262685035 CODECOPY PUSH10 0x48336772715366713367 CALLDATACOPY PUSH11 0x6F53506153314A47526D4A PUSH2 0x2F64 PUSH6 0x6E64726F7068 PUSH26 0x6C61782D6C696E64656E69692E6A736F6E516D55384D4E7A6E54 CALLDATASIZE CHAINID DIFFICULTY BALANCE PUSH23 0x3558646E536541366345597178706A374D676B4543706F PUSH21 0x33614345526572582F7068616C61656E6F70736973 0x2D PUSH14 0x6963686F6C69747A69692E6A736F PUSH15 0x516D55384D4E7A6E54364644317635 PC PUSH5 0x6E53654136 PUSH4 0x45597178 PUSH17 0x6A374D676B4543706F7433614345526572 PC 0x2F PUSH20 0x68656E7A68656E6963612D6F7263686964616365 PUSH2 0x652E PUSH11 0x736F6E516D56376E735167 0x48 0x4E PUSH23 0x777952786262685035396948336772715366713367376A PUSH16 0x53506153314A47526D4A612F706C6174 PUSH2 0x6E74 PUSH9 0x6572612D617A6F7269 PUSH4 0x612E6A73 PUSH16 0x6E000000000000000000000000000000 ", + "sourceMap": "1028:33:37:-:0;;;-1:-1:-1;;1067:36:37;;;1441:85;622:10061;1441:85;1056:5;622:10061;1441:85;;;1473:4;1441:85;;1479:4;1441:85;;1485:4;1441:85;;1491:4;1028:33;1441:85;1497:4;1441:85;;1503:4;1441:85;;1509:4;1441:85;;1515:4;1441:85;;1521:4;1441:85;;;;;;;;:::i;:::-;-1:-1:-1;1532:368:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1532:368:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1532:368:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1532:368:37;;;;;;;;;;;;;;;;;-1:-1:-1;;;1532:368:37;;;;;;;;;;:::i;:::-;-1:-1:-1;1907:902:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;2816:906:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;1486:292:11;;;;;;;;;;;;;-1:-1:-1;;;1486:292:11;;;;;;;;;;;;;;;;-1:-1:-1;;;1486:292:11;;;;;;;;;;;;;;;;-1:-1:-1;;;1486:292:11;;;1577:4;1583:6;768:40:8;435:10;787:20;;768:18;;;:40;;:::i;:::-;3651:13:20;;;;:5;;:13;;;;;:::i;:::-;-1:-1:-1;3674:17:20;;;;:7;;:17;;;;;:::i;:::-;-1:-1:-1;3779:40:20;-1:-1:-1;;;;;;;;3779:18:20;:40;:::i;:::-;3829:49;-1:-1:-1;;;;;;;;3829:18:20;:49;:::i;:::-;3888:51;-1:-1:-1;;;;;;;;3888:18:20;:51;:::i;:::-;-1:-1:-1;;935:7:32;:15;;-1:-1:-1;;935:15:32;;;1601:44:11::1;945:5:32::0;1632:12:11::1;-1:-1:-1::0;;;;;1632:10:11::1;:12:::0;:::i:1;:::-;-1:-1:-1::0;;;;;1601:10:11::1;:44:::0;:::i:1;:::-;1085:24;::::0;;-1:-1:-1;;;1085:24:11;;;;;;;;::::1;::::0;;;1656:37:::1;::::0;1680:12:::1;-1:-1:-1::0;;;;;1680:10:11::1;:12:::0;:::i:1;1656:37::-;1153:24;::::0;;-1:-1:-1;;;1153:24:11;;;;;;;;::::1;::::0;;;1703:37:::1;::::0;1727:12:::1;-1:-1:-1::0;;;;;1727:10:11::1;:12:::0;:::i:1;1703:37::-;1751:20;1763:7:::0;-1:-1:-1;;;;;1751:11:11::1;:20:::0;:::i:1;:::-;1486:292:::0;;;884:17:7;904:12;:10;;;:12;;:::i;:::-;926:6;:18;;-1:-1:-1;;;;;;926:18:7;-1:-1:-1;;;;;926:18:7;;;;;;;;959:43;;926:18;;-1:-1:-1;926:18:7;-1:-1:-1;;959:43:7;;-1:-1:-1;;959:43:7;-1:-1:-1;4045:13:37::1;4040:256;4072:12;4064:5;:20;4040:256;;;4160:19;4180:5;4160:26;;;;;;;;4109:11;:48;4142:5;4148;4142:12;;;;;;;4131:24;::::0;;::::1;::::0;;::::1;::::0;;;4142:12;;;::::1;4131:24:::0;;::::1;;::::0;::::1;;;;-1:-1:-1::0;;4131:24:37;;;::::1;;::::0;;;;;;4142:12;4131:24;;;;;;;4142:12;;4131:24;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;4131:24:37;;;4121:35;;;;;;4109:48;;;;;;;;;;;:77;;;;;;;;;;;;;;;;;;;;:::i;:::-;;4255:23;4279:5;4255:30;;;;;;;;4200:15;:52;4237:5;4243;4237:12;;;;;;;4226:24;::::0;;::::1;::::0;;::::1;::::0;;;4237:12;;;::::1;4226:24:::0;;::::1;;::::0;::::1;;;;-1:-1:-1::0;;4226:24:37;;;::::1;;::::0;;;;;;4237:12;4226:24;;;;;;;4237:12;;4226:24;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;4226:24:37;;;4216:35;;;;;;4200:52;;;;;;;;;;;:85;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;4086:7:37::1;;4040:256;;;;622:10061:::0;;1507:198:8;-1:-1:-1;;;;;;1590:25:8;;;;;1582:66;;;;;-1:-1:-1;;;1582:66:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;1658:33:8;;;;;1694:4;1658:33;;;;;;;;:40;;-1:-1:-1;;1658:40:8;;;;;;1507:198::o;598:104:28:-;685:10;598:104;;:::o;6588:110:6:-;6666:25;6677:4;6683:7;-1:-1:-1;;;;;6666:10:6;:25;:::i;:::-;6588:110;;:::o;14873:98:20:-;14945:19;;;;:8;;:19;;;;;:::i;7025:184:6:-;7098:6;:12;;;;;;;;;;;:33;;7123:7;;7098:24;;;;;:33;;:::i;:::-;7094:109;;;7179:12;-1:-1:-1;;;;;7179:10:6;:12;:::i;:::-;-1:-1:-1;;;;;7152:40:6;7170:7;-1:-1:-1;;;;;7152:40:6;7164:4;7152:40;;;;;;;;;;7025:184;;:::o;6429:150:31:-;6499:4;6522:50;6527:3;-1:-1:-1;;;;;6547:23:31;;-1:-1:-1;;;;;6522:4:31;:50;:::i;:::-;6515:57;;6429:150;;;;;:::o;1640:404::-;1703:4;1724:21;1734:3;1739:5;-1:-1:-1;;;;;1724:9:31;:21;:::i;:::-;1719:319;;-1:-1:-1;27:10;;39:1;23:18;;;45:23;;1761:11:31;:23;;;;;;;;;;;;;1941:18;;1919:19;;;:12;;;:19;;;;;;:40;;;;1973:11;;1719:319;-1:-1:-1;2022:5:31;2015:12;;3805:127;3878:4;3901:19;;;:12;;;;;:19;;;;;;:24;;;3805:127::o;622:10061:37:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;622:10061:37;;;-1:-1:-1;622:10061:37;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;-1:-1:-1;622:10061:37;;;-1:-1:-1;622:10061:37;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;622:10061:37;;;-1:-1:-1;622:10061:37;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;622:10061:37;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::o;:::-;;;;;;;" + }, + "deployedBytecode": { + "immutableReferences": {}, + "linkReferences": {}, + "object": "6080604052600436106102e85760003560e01c80636c0360eb11610190578063a7eec44b116100dc578063cac21c8f11610095578063e63ab1e91161006f578063e63ab1e914610ca4578063e985e9c514610cb9578063f2fde38b14610cf4578063ffee200c14610d27576102ef565b8063cac21c8f14610ba6578063d539139314610c56578063d547741f14610c6b576102ef565b8063a7eec44b146109f2578063b66a0e5d14610a1c578063b7aaba2014610a31578063b88d4fde14610a7f578063c87b56dd14610b52578063ca15c87314610b7c576102ef565b80639010d07c116101495780639981d4a1116101235780639981d4a1146109705780639d1b464a1461098d578063a217fddf146109a2578063a22cb465146109b7576102ef565b80639010d07c146108f257806391d148541461092257806395d89b411461095b576102ef565b80636c0360eb1461083b57806370a0823114610850578063715018a6146108835780637fd8d953146108985780638456cb59146108c85780638da5cb5b146108dd576102ef565b806336568abe1161024f5780635c975abb116102085780636352211e116101e25780636352211e1461079f5780636573c787146107c95780636a627842146107f35780636b0c004d14610826576102ef565b80635c975abb1461069b57806360316801146106b057806362ff09d614610775576102ef565b806336568abe146105a15780633ccfd60b146105da5780633f4ba83a146105ef57806342842e0e1461060457806342966c68146106475780634f6ccce714610671576102ef565b8063182199cd116102a1578063182199cd1461048357806323b872dd146104ad578063248a9ca3146104f0578063277dec921461051a5780632f2ff15d1461052f5780632f745c5914610568576102ef565b806301ffc9a7146102f457806306fdde031461033c578063081812fc146103c6578063095ea7b31461040c578063179f0b0a1461044757806318160ddd1461046e576102ef565b366102ef57005b600080fd5b34801561030057600080fd5b506103286004803603602081101561031757600080fd5b50356001600160e01b031916610d3c565b604080519115158252519081900360200190f35b34801561034857600080fd5b50610351610d5f565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561038b578181015183820152602001610373565b50505050905090810190601f1680156103b85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156103d257600080fd5b506103f0600480360360208110156103e957600080fd5b5035610df6565b604080516001600160a01b039092168252519081900360200190f35b34801561041857600080fd5b506104456004803603604081101561042f57600080fd5b506001600160a01b038135169060200135610e58565b005b34801561045357600080fd5b5061045c610f33565b60408051918252519081900360200190f35b34801561047a57600080fd5b5061045c610f3a565b34801561048f57600080fd5b50610328600480360360208110156104a657600080fd5b5035610f4b565b3480156104b957600080fd5b50610445600480360360608110156104d057600080fd5b506001600160a01b03813581169160208101359091169060400135610f6a565b3480156104fc57600080fd5b5061045c6004803603602081101561051357600080fd5b5035610fc1565b34801561052657600080fd5b50610445610fd6565b34801561053b57600080fd5b506104456004803603604081101561055257600080fd5b50803590602001356001600160a01b0316611049565b34801561057457600080fd5b5061045c6004803603604081101561058b57600080fd5b506001600160a01b0381351690602001356110b5565b3480156105ad57600080fd5b50610445600480360360408110156105c457600080fd5b50803590602001356001600160a01b03166110e6565b3480156105e657600080fd5b50610445611147565b3480156105fb57600080fd5b506104456111d8565b34801561061057600080fd5b506104456004803603606081101561062757600080fd5b506001600160a01b03813581169160208101359091169060400135611249565b34801561065357600080fd5b506104456004803603602081101561066a57600080fd5b5035611264565b34801561067d57600080fd5b5061045c6004803603602081101561069457600080fd5b50356112b6565b3480156106a757600080fd5b506103286112d2565b3480156106bc57600080fd5b506106da600480360360208110156106d357600080fd5b50356112db565b60405180806020018581526020018481526020018360038111156106fa57fe5b60ff168152602001828103825286818151815260200191508051906020019080838360005b8381101561073757818101518382015260200161071f565b50505050905090810190601f1680156107645780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b34801561078157600080fd5b5061045c6004803603602081101561079857600080fd5b50356113a0565b3480156107ab57600080fd5b506103f0600480360360208110156107c257600080fd5b50356113b2565b3480156107d557600080fd5b50610328600480360360208110156107ec57600080fd5b50356113e0565b3480156107ff57600080fd5b506104456004803603602081101561081657600080fd5b50356001600160a01b0316611400565b34801561083257600080fd5b5061045c611484565b34801561084757600080fd5b5061035161148a565b34801561085c57600080fd5b5061045c6004803603602081101561087357600080fd5b50356001600160a01b03166114eb565b34801561088f57600080fd5b50610445611553565b3480156108a457600080fd5b50610445600480360360408110156108bb57600080fd5b50803590602001356115ff565b3480156108d457600080fd5b5061044561169b565b3480156108e957600080fd5b506103f061170a565b3480156108fe57600080fd5b506103f06004803603604081101561091557600080fd5b5080359060200135611719565b34801561092e57600080fd5b506103286004803603604081101561094557600080fd5b50803590602001356001600160a01b0316611737565b34801561096757600080fd5b50610351611755565b6104456004803603602081101561098657600080fd5b50356117b6565b34801561099957600080fd5b5061045c611a5c565b3480156109ae57600080fd5b5061045c611b18565b3480156109c357600080fd5b50610445600480360360408110156109da57600080fd5b506001600160a01b0381351690602001351515611b1d565b3480156109fe57600080fd5b5061044560048036036020811015610a1557600080fd5b5035611c22565b348015610a2857600080fd5b50610445611ce0565b348015610a3d57600080fd5b50610a5b60048036036020811015610a5457600080fd5b5035611d51565b60405180826003811115610a6b57fe5b60ff16815260200191505060405180910390f35b348015610a8b57600080fd5b5061044560048036036080811015610aa257600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135640100000000811115610add57600080fd5b820183602082011115610aef57600080fd5b80359060200191846001830284011164010000000083111715610b1157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611ed1945050505050565b348015610b5e57600080fd5b5061035160048036036020811015610b7557600080fd5b5035611f29565b348015610b8857600080fd5b5061045c60048036036020811015610b9f57600080fd5b5035612327565b348015610bb257600080fd5b50610bd060048036036020811015610bc957600080fd5b503561233e565b6040518080602001848152602001838152602001828103825285818151815260200191508051906020019080838360005b83811015610c19578181015183820152602001610c01565b50505050905090810190601f168015610c465780820380516001836020036101000a031916815260200191505b5094505050505060405180910390f35b348015610c6257600080fd5b5061045c6123eb565b348015610c7757600080fd5b5061044560048036036040811015610c8e57600080fd5b50803590602001356001600160a01b031661240e565b348015610cb057600080fd5b5061045c612467565b348015610cc557600080fd5b5061032860048036036040811015610cdc57600080fd5b506001600160a01b038135811691602001351661248a565b348015610d0057600080fd5b5061044560048036036020811015610d1757600080fd5b50356001600160a01b03166124b8565b348015610d3357600080fd5b5061045c6125bb565b6001600160e01b0319811660009081526001602052604090205460ff165b919050565b60078054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610deb5780601f10610dc057610100808354040283529160200191610deb565b820191906000526020600020905b815481529060010190602001808311610dce57829003601f168201915b505050505090505b90565b6000610e01826125c1565b610e3c5760405162461bcd60e51b815260040180806020018281038252602c815260200180613d6f602c913960400191505060405180910390fd5b506000908152600560205260409020546001600160a01b031690565b6000610e63826113b2565b9050806001600160a01b0316836001600160a01b03161415610eb65760405162461bcd60e51b8152600401808060200182810382526021815260200180613e146021913960400191505060405180910390fd5b806001600160a01b0316610ec86125d4565b6001600160a01b03161480610ee95750610ee981610ee46125d4565b61248a565b610f245760405162461bcd60e51b8152600401808060200182810382526038815260200180613c7e6038913960400191505060405180910390fd5b610f2e83836125d8565b505050565b62093a8081565b6000610f466003612646565b905090565b60006002610f5883611d51565b6003811115610f6357fe5b1492915050565b610f7b610f756125d4565b82612651565b610fb65760405162461bcd60e51b8152600401808060200182810382526031815260200180613e5c6031913960400191505060405180910390fd5b610f2e8383836126f5565b60009081526020819052604090206002015490565b610fde6125d4565b6001600160a01b0316610fef61170a565b6001600160a01b031614611038576040805162461bcd60e51b81526020600482018190526024820152600080516020613d9b833981519152604482015290519081900360640190fd5b600f805461ff001916610100179055565b60008281526020819052604090206002015461106c906110676125d4565b611737565b6110a75760405162461bcd60e51b815260040180806020018281038252602f815260200180613a97602f913960400191505060405180910390fd5b6110b18282612853565b5050565b6001600160a01b03821660009081526002602052604081206110dd908363ffffffff6128c216565b90505b92915050565b6110ee6125d4565b6001600160a01b0316816001600160a01b03161461113d5760405162461bcd60e51b815260040180806020018281038252602f815260200180613f65602f913960400191505060405180910390fd5b6110b182826128ce565b61114f6125d4565b6001600160a01b031661116061170a565b6001600160a01b0316146111a9576040805162461bcd60e51b81526020600482018190526024820152600080516020613d9b833981519152604482015290519081900360640190fd5b6040514790339082156108fc029083906000818181858888f193505050501580156110b1573d6000803e3d6000fd5b604080516a5041555345525f524f4c4560a81b8152905190819003600b019020611204906110676125d4565b61123f5760405162461bcd60e51b8152600401808060200182810382526040815260200180613f256040913960400191505060405180910390fd5b61124761293d565b565b610f2e83838360405180602001604052806000815250611ed1565b61126f610f756125d4565b6112aa5760405162461bcd60e51b8152600401808060200182810382526030815260200180613ef56030913960400191505060405180910390fd5b6112b3816129dd565b50565b6000806112ca60038463ffffffff612ab616565b509392505050565b600b5460ff1690565b6000818152600e6020526040812060018101546002820154606093928392839261130488611d51565b8354604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815291869183018282801561138a5780601f1061135f5761010080835404028352916020019161138a565b820191906000526020600020905b81548152906001019060200180831161136d57829003601f168201915b5050505050935093509350935093509193509193565b60306020526000908152604090205481565b60006110e082604051806060016040528060298152602001613ce0602991396003919063ffffffff612ad216565b600060036113ed83611d51565b60038111156113f857fe5b141592915050565b604080516a4d494e5445525f524f4c4560a81b8152905190819003600b01902061142c906110676125d4565b6114675760405162461bcd60e51b815260040180806020018281038252603d815260200180613eb8603d913960400191505060405180910390fd5b61147a81611475600c612ae9565b612aed565b6112b3600c612c27565b61271081565b600a8054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610deb5780601f10610dc057610100808354040283529160200191610deb565b60006001600160a01b0382166115325760405162461bcd60e51b815260040180806020018281038252602a815260200180613cb6602a913960400191505060405180910390fd5b6001600160a01b03821660009081526002602052604090206110e090612646565b61155b6125d4565b6001600160a01b031661156c61170a565b6001600160a01b0316146115b5576040805162461bcd60e51b81526020600482018190526024820152600080516020613d9b833981519152604482015290519081900360640190fd5b600d546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600d80546001600160a01b0319169055565b600f54610100900460ff166116455760405162461bcd60e51b8152600401808060200182810382526027815260200180613b4c6027913960400191505060405180910390fd5b6116566116506125d4565b83612651565b6116915760405162461bcd60e51b815260040180806020018281038252602b815260200180613e8d602b913960400191505060405180910390fd5b610f2e8282612c30565b604080516a5041555345525f524f4c4560a81b8152905190819003600b0190206116c7906110676125d4565b6117025760405162461bcd60e51b815260040180806020018281038252603e815260200180613b73603e913960400191505060405180910390fd5b611247612c76565b600d546001600160a01b031690565b60008281526020819052604081206110dd908363ffffffff6128c216565b60008281526020819052604081206110dd908363ffffffff612cf916565b60088054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610deb5780601f10610dc057610100808354040283529160200191610deb565b600f5460ff16611805576040805162461bcd60e51b8152602060048201526015602482015274151a1948139d5c9cd95c9e481a5cc818db1bdcd959605a1b604482015290519081900360640190fd5b61180d610f3a565b6127100381111561185d576040805162461bcd60e51b8152602060048201526015602482015274139bdd08195b9bdd59da08189d5b189cc81b19599d605a1b604482015290519081900360640190fd5b612710611868610f3a565b106118b3576040805162461bcd60e51b815260206004820152601660248201527514d85b19481a185cc8185b1c9958591e48195b99195960521b604482015290519081900360640190fd5b6000811180156118c4575060148111155b6118ff5760405162461bcd60e51b8152600401808060200182810382526030815260200180613de46030913960400191505060405180910390fd5b61271061191361190d610f3a565b83612d0e565b1115611966576040805162461bcd60e51b815260206004820152601860248201527f45786365656473204d41585f43525950544f5243484944530000000000000000604482015290519081900360640190fd5b611977611971611a5c565b82612d68565b3410156119b55760405162461bcd60e51b8152600401808060200182810382526023815260200180613d096023913960400191505060405180910390fd5b60005b818110156110b1576119ca602f612c27565b60006119d6602f612ae9565b6040805160a081018252600660608201908152656772616e756d60d01b608083015281526000196020808301919091526000828401819052848152600e8252929092208151805194955091939092611a32928492910190613954565b5060208201516001820155604090910151600290910155611a533382612dc1565b506001016119b8565b600080611a67610f3a565b90506126ac8110611a8357670de0b6b3a7640000915050610df3565b61251c8110611a9d576708e1bc9bf0400000915050610df3565b611d4c8110611ab757670470de4df8200000915050610df3565b610dac8110611ad1576702386f26fc100000915050610df3565b6105dc8110611aeb5767011c37937e080000915050610df3565b6101f48110611b045766d529ae9e860000915050610df3565b668e1bc9bf040000915050610df3565b5090565b600081565b611b256125d4565b6001600160a01b0316826001600160a01b03161415611b8b576040805162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015290519081900360640190fd5b8060066000611b986125d4565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff191692151592909217909155611bdc6125d4565b60408051841515815290516001600160a01b0392909216917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319181900360200190a35050565b611c2d610f756125d4565b611c685760405162461bcd60e51b8152600401808060200182810382526027815260200180613bfb6027913960400191505060405180910390fd5b611c71816113e0565b611c7a576112b3565b6000818152600e602052604081206002810154600182015491929091611c9e612ddb565b0390506000611cb08262093a80612ddf565b905080831115611cc357505050506112b3565b6000611cd0846001612d0e565b6002909501949094555050505050565b611ce86125d4565b6001600160a01b0316611cf961170a565b6001600160a01b031614611d42576040805162461bcd60e51b81526020600482018190526024820152600080516020613d9b833981519152604482015290519081900360640190fd5b600f805460ff19166001179055565b6000611d5b6139ce565b6000838152600e60209081526040918290208251815460026001821615610100026000190190911604601f81018490049093028101608090810190945260608101838152909391928492849190840182828015611df95780601f10611dce57610100808354040283529160200191611df9565b820191906000526020600020905b815481529060010190602001808311611ddc57829003601f168201915b50505050508152602001600182015481526020016002820154815250509050806020015160001415611e2f576000915050610d5a565b60001981602001511415611e47576001915050610d5a565b60408101516020820151600090611e5c612ddb565b0390506000611e6e8262093a80612ddf565b90506000611e7f8362093a80612e46565b905081841415611e9757600295505050505050610d5a565b81611ea3856001612d0e565b148015611eb15750612a3081105b15611ec457600295505050505050610d5a565b5060039695505050505050565b611edc6116506125d4565b611f175760405162461bcd60e51b8152600401808060200182810382526031815260200180613e5c6031913960400191505060405180910390fd5b611f2384848484612ead565b50505050565b606080611f35836112db565b5091925060019150611f449050565b611f4d84611d51565b6003811115611f5857fe5b141561203657611f6661148a565b6040518060600160405280602e8152602001613b1e602e91396040516020018083805190602001908083835b60208310611fb15780518252601f199092019160209182019101611f92565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b60208310611ff95780518252601f199092019160209182019101611fda565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052915050610d5a565b600261204184611d51565b600381111561204c57fe5b14156121bd5761205a61148a565b60316000836040516020018080602001828103825283818151815260200191508051906020019080838360005b8381101561209f578181015183820152602001612087565b50505050905090810190601f1680156120cc5780820380516001836020036101000a031916815260200191505b50925050506040516020818303038152906040528051906020012081526020019081526020016000206040516020018083805190602001908083835b602083106121275780518252601f199092019160209182019101612108565b6001836020036101000a038019825116818451168082178552505050505050905001828054600181600116156101000203166002900480156121a05780601f1061217e5761010080835404028352918201916121a0565b820191906000526020600020905b81548152906001019060200180831161218c575b505092505050604051602081830303815290604052915050610d5a565b6121c561148a565b60326000836040516020018080602001828103825283818151815260200191508051906020019080838360005b8381101561220a5781810151838201526020016121f2565b50505050905090810190601f1680156122375780820380516001836020036101000a031916815260200191505b50925050506040516020818303038152906040528051906020012081526020019081526020016000206040516020018083805190602001908083835b602083106122925780518252601f199092019160209182019101612273565b6001836020036101000a0380198251168184511680821785525050505050509050018280546001816001161561010002031660029004801561230b5780601f106122e957610100808354040283529182019161230b565b820191906000526020600020905b8154815290600101906020018083116122f7575b505060408051601f198184030181529190529695505050505050565b60008181526020819052604081206110e090612646565b600e6020908152600091825260409182902080548351601f600260001961010060018616150201909316929092049182018490048402810184019094528084529092918391908301828280156123d55780601f106123aa576101008083540402835291602001916123d5565b820191906000526020600020905b8154815290600101906020018083116123b857829003601f168201915b5050505050908060010154908060020154905083565b604080516a4d494e5445525f524f4c4560a81b8152905190819003600b01902081565b60008281526020819052604090206002015461242c906110676125d4565b61113d5760405162461bcd60e51b8152600401808060200182810382526030815260200180613c4e6030913960400191505060405180910390fd5b604080516a5041555345525f524f4c4560a81b8152905190819003600b01902081565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b6124c06125d4565b6001600160a01b03166124d161170a565b6001600160a01b03161461251a576040805162461bcd60e51b81526020600482018190526024820152600080516020613d9b833981519152604482015290519081900360640190fd5b6001600160a01b03811661255f5760405162461bcd60e51b8152600401808060200182810382526026815260200180613af86026913960400191505060405180910390fd5b600d546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600d80546001600160a01b0319166001600160a01b0392909216919091179055565b612a3081565b60006110e060038363ffffffff612eff16565b3390565b600081815260056020526040902080546001600160a01b0319166001600160a01b038416908117909155819061260d826113b2565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006110e082612ae9565b600061265c826125c1565b6126975760405162461bcd60e51b815260040180806020018281038252602c815260200180613c22602c913960400191505060405180910390fd5b60006126a2836113b2565b9050806001600160a01b0316846001600160a01b031614806126dd5750836001600160a01b03166126d284610df6565b6001600160a01b0316145b806126ed57506126ed818561248a565b949350505050565b826001600160a01b0316612708826113b2565b6001600160a01b03161461274d5760405162461bcd60e51b8152600401808060200182810382526029815260200180613dbb6029913960400191505060405180910390fd5b6001600160a01b0382166127925760405162461bcd60e51b8152600401808060200182810382526024815260200180613bb16024913960400191505060405180910390fd5b61279d838383612f0b565b6127a86000826125d8565b6001600160a01b03831660009081526002602052604090206127d0908263ffffffff612f6b16565b506001600160a01b03821660009081526002602052604090206127f9908263ffffffff612f7716565b5061280c6003828463ffffffff612f8316565b5080826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6000828152602081905260409020612871908263ffffffff612f9916565b156110b15761287e6125d4565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006110dd8383612fae565b60008281526020819052604090206128ec908263ffffffff61301216565b156110b1576128f96125d4565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b6129456112d2565b61298d576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b600b805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6129c06125d4565b604080516001600160a01b039092168252519081900360200190a1565b60006129e8826113b2565b90506129f681600084612f0b565b612a016000836125d8565b6000828152600960205260409020546002600019610100600184161502019091160415612a3f576000828152600960205260408120612a3f916139ef565b6001600160a01b0381166000908152600260205260409020612a67908363ffffffff612f6b16565b50612a7960038363ffffffff61302716565b5060405182906000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6000808080612ac58686613033565b9097909650945050505050565b6000612adf8484846130ae565b90505b9392505050565b5490565b6001600160a01b038216612b48576040805162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015290519081900360640190fd5b612b51816125c1565b15612ba3576040805162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015290519081900360640190fd5b612baf60008383612f0b565b6001600160a01b0382166000908152600260205260409020612bd7908263ffffffff612f7716565b50612bea6003828463ffffffff612f8316565b5060405181906001600160a01b038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b80546001019055565b6040805142602080830191909152448284015260608083018590528351808403909101815260809092019092528051910120600090612c6f8482613178565b5092915050565b612c7e6112d2565b15612cc3576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b600b805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586129c06125d4565b60006110dd836001600160a01b0384166131d2565b6000828201838110156110dd576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082612d77575060006110e0565b82820282848281612d8457fe5b04146110dd5760405162461bcd60e51b8152600401808060200182810382526021815260200180613d4e6021913960400191505060405180910390fd5b6110b18282604051806020016040528060008152506131ea565b4290565b6000808211612e35576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381612e3e57fe5b049392505050565b6000808211612e9c576040805162461bcd60e51b815260206004820152601860248201527f536166654d6174683a206d6f64756c6f206279207a65726f0000000000000000604482015290519081900360640190fd5b818381612ea557fe5b069392505050565b612eb88484846126f5565b612ec48484848461323c565b611f235760405162461bcd60e51b8152600401808060200182810382526032815260200180613ac66032913960400191505060405180910390fd5b60006110dd83836131d2565b6001600160a01b0382161580612f255750612f25816113e0565b612f605760405162461bcd60e51b8152600401808060200182810382526027815260200180613e356027913960400191505060405180910390fd5b610f2e8383836133bc565b60006110dd83836133c7565b60006110dd838361348d565b6000612adf84846001600160a01b0385166134d7565b60006110dd836001600160a01b03841661348d565b81546000908210612ff05760405162461bcd60e51b8152600401808060200182810382526022815260200180613a4a6022913960400191505060405180910390fd5b826000018281548110612fff57fe5b9060005260206000200154905092915050565b60006110dd836001600160a01b0384166133c7565b60006110dd838361356e565b8154600090819083106130775760405162461bcd60e51b8152600401808060200182810382526022815260200180613d2c6022913960400191505060405180910390fd5b600084600001848154811061308857fe5b906000526020600020906002020190508060000154816001015492509250509250929050565b600082815260018401602052604081205482816131495760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561310e5781810151838201526020016130f6565b50505050905090810190601f16801561313b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5084600001600182038154811061315c57fe5b9060005260206000209060020201600101549150509392505050565b6000828152600e60205260409020606061319c61319784612710612e46565b613642565b80519091506131b19083906020840190613954565b506131ba612ddb565b600183015560006131ca856113b2565b505050505050565b60009081526001919091016020526040902054151590565b6131f48383612aed565b613201600084848461323c565b610f2e5760405162461bcd60e51b8152600401808060200182810382526032815260200180613ac66032913960400191505060405180910390fd5b6000613250846001600160a01b031661372e565b61325c575060016126ed565b6060613382630a85bd0160e11b6132716125d4565b88878760405160240180856001600160a01b03166001600160a01b03168152602001846001600160a01b03166001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156132ea5781810151838201526020016132d2565b50505050905090810190601f1680156133175780820380516001836020036101000a031916815260200191505b5095505050505050604051602081830303815290604052906001600160e01b0319166020820180516001600160e01b038381831617835250505050604051806060016040528060328152602001613ac6603291396001600160a01b038816919063ffffffff61373416565b9050600081806020019051602081101561339b57600080fd5b50516001600160e01b031916630a85bd0160e11b1492505050949350505050565b610f2e838383613743565b6000818152600183016020526040812054801561348357835460001980830191908101906000908790839081106133fa57fe5b906000526020600020015490508087600001848154811061341757fe5b60009182526020808320909101929092558281526001898101909252604090209084019055865487908061344757fe5b600190038181906000526020600020016000905590558660010160008781526020019081526020016000206000905560019450505050506110e0565b60009150506110e0565b600061349983836131d2565b6134cf575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556110e0565b5060006110e0565b60008281526001840160205260408120548061353c575050604080518082018252838152602080820184815286546001818101895560008981528481209551600290930290950191825591519082015586548684528188019092529290912055612ae2565b8285600001600183038154811061354f57fe5b9060005260206000209060020201600101819055506000915050612ae2565b6000818152600183016020526040812054801561348357835460001980830191908101906000908790839081106135a157fe5b90600052602060002090600202019050808760000184815481106135c157fe5b60009182526020808320845460029093020191825560019384015491840191909155835482528983019052604090209084019055865487908061360057fe5b60008281526020808220600260001990940193840201828155600190810183905592909355888152898201909252604082209190915594506110e09350505050565b606060005b600a81101561372857601081600a811061365d57fe5b601091828204019190066002029054906101000a900461ffff1661ffff16831161372057601181600a811061368e57fe5b01805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156137135780601f106136e857610100808354040283529160200191613713565b820191906000526020600020905b8154815290600101906020018083116136f657829003601f168201915b5050505050915050610d5a565b600101613647565b50919050565b3b151590565b6060612adf8484600085613792565b61374e838383610f2e565b6137566112d2565b15610f2e5760405162461bcd60e51b815260040180806020018281038252602b815260200180613a6c602b913960400191505060405180910390fd5b6060824710156137d35760405162461bcd60e51b8152600401808060200182810382526026815260200180613bd56026913960400191505060405180910390fd5b6137dc8561372e565b61382d576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b6020831061386c5780518252601f19909201916020918201910161384d565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146138ce576040519150601f19603f3d011682016040523d82523d6000602084013e6138d3565b606091505b50915091506138e38282866138ee565b979650505050505050565b606083156138fd575081612ae2565b82511561390d5782518084602001fd5b60405162461bcd60e51b815260206004820181815284516024840152845185939192839260440191908501908083836000831561310e5781810151838201526020016130f6565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061399557805160ff19168380011785556139c2565b828001600101855582156139c2579182015b828111156139c25782518255916020019190600101906139a7565b50611b14929150613a2f565b60405180606001604052806060815260200160008152602001600081525090565b50805460018160011615610100020316600290046000825580601f10613a1557506112b3565b601f0160209004906000526020600020908101906112b391905b610df391905b80821115611b145760008155600101613a3556fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e64734552433732315061757361626c653a20746f6b656e207472616e73666572207768696c6520706175736564416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e744552433732313a207472616e7366657220746f206e6f6e20455243373231526563656976657220696d706c656d656e7465724f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373516d5764316d6e374475477978394279664e6571437367645355734a5a316372616769746761796773714476456d4765726d696e6174696f6e2073746172747320323032312d30342d31325431363a30303a30305a4552433732315072657365744d696e7465725061757365724175746f49643a206d75737420686176652070617573657220726f6c6520746f2070617573654552433732313a207472616e7366657220746f20746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c4f6e6c7920746865204f776e65722063616e20776174657220612043727970744f72636869642e4552433732313a206f70657261746f7220717565727920666f72206e6f6e6578697374656e7420746f6b656e416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b654552433732313a20617070726f76652063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f76656420666f7220616c6c4552433732313a2062616c616e636520717565727920666f7220746865207a65726f20616464726573734552433732313a206f776e657220717565727920666f72206e6f6e6578697374656e7420746f6b656e45746865722076616c75652073656e742069732062656c6f7720746865207072696365456e756d657261626c654d61703a20696e646578206f7574206f6620626f756e6473536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774552433732313a20617070726f76656420717565727920666f72206e6f6e6578697374656e7420746f6b656e4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65724552433732313a207472616e73666572206f6620746f6b656e2074686174206973206e6f74206f776e596f752063616e20706c616e74206d696e696d756d20312c206d6178696d756d2032302043727970744f7263686964734552433732313a20617070726f76616c20746f2063757272656e74206f776e6572446561642043727970744f7263686964732063616e6e6f74206265207472616e736665727265644552433732313a207472616e736665722063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f7665644f6e6c7920746865204f776e65722063616e206765726d696e61746520612043727970744f72636869642e4552433732315072657365744d696e7465725061757365724175746f49643a206d7573742068617665206d696e74657220726f6c6520746f206d696e744552433732314275726e61626c653a2063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f7665644552433732315072657365744d696e7465725061757365724175746f49643a206d75737420686176652070617573657220726f6c6520746f20756e7061757365416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220669084c037e9e2730b31d45e8cd7d87fcb21b2d1237df1dee094b97b3922927264736f6c63430006060033", + "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0x2E8 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x6C0360EB GT PUSH2 0x190 JUMPI DUP1 PUSH4 0xA7EEC44B GT PUSH2 0xDC JUMPI DUP1 PUSH4 0xCAC21C8F GT PUSH2 0x95 JUMPI DUP1 PUSH4 0xE63AB1E9 GT PUSH2 0x6F JUMPI DUP1 PUSH4 0xE63AB1E9 EQ PUSH2 0xCA4 JUMPI DUP1 PUSH4 0xE985E9C5 EQ PUSH2 0xCB9 JUMPI DUP1 PUSH4 0xF2FDE38B EQ PUSH2 0xCF4 JUMPI DUP1 PUSH4 0xFFEE200C EQ PUSH2 0xD27 JUMPI PUSH2 0x2EF JUMP JUMPDEST DUP1 PUSH4 0xCAC21C8F EQ PUSH2 0xBA6 JUMPI DUP1 PUSH4 0xD5391393 EQ PUSH2 0xC56 JUMPI DUP1 PUSH4 0xD547741F EQ PUSH2 0xC6B JUMPI PUSH2 0x2EF JUMP JUMPDEST DUP1 PUSH4 0xA7EEC44B EQ PUSH2 0x9F2 JUMPI DUP1 PUSH4 0xB66A0E5D EQ PUSH2 0xA1C JUMPI DUP1 PUSH4 0xB7AABA20 EQ PUSH2 0xA31 JUMPI DUP1 PUSH4 0xB88D4FDE EQ PUSH2 0xA7F JUMPI DUP1 PUSH4 0xC87B56DD EQ PUSH2 0xB52 JUMPI DUP1 PUSH4 0xCA15C873 EQ PUSH2 0xB7C JUMPI PUSH2 0x2EF JUMP JUMPDEST DUP1 PUSH4 0x9010D07C GT PUSH2 0x149 JUMPI DUP1 PUSH4 0x9981D4A1 GT PUSH2 0x123 JUMPI DUP1 PUSH4 0x9981D4A1 EQ PUSH2 0x970 JUMPI DUP1 PUSH4 0x9D1B464A EQ PUSH2 0x98D JUMPI DUP1 PUSH4 0xA217FDDF EQ PUSH2 0x9A2 JUMPI DUP1 PUSH4 0xA22CB465 EQ PUSH2 0x9B7 JUMPI PUSH2 0x2EF JUMP JUMPDEST DUP1 PUSH4 0x9010D07C EQ PUSH2 0x8F2 JUMPI DUP1 PUSH4 0x91D14854 EQ PUSH2 0x922 JUMPI DUP1 PUSH4 0x95D89B41 EQ PUSH2 0x95B JUMPI PUSH2 0x2EF JUMP JUMPDEST DUP1 PUSH4 0x6C0360EB EQ PUSH2 0x83B JUMPI DUP1 PUSH4 0x70A08231 EQ PUSH2 0x850 JUMPI DUP1 PUSH4 0x715018A6 EQ PUSH2 0x883 JUMPI DUP1 PUSH4 0x7FD8D953 EQ PUSH2 0x898 JUMPI DUP1 PUSH4 0x8456CB59 EQ PUSH2 0x8C8 JUMPI DUP1 PUSH4 0x8DA5CB5B EQ PUSH2 0x8DD JUMPI PUSH2 0x2EF JUMP JUMPDEST DUP1 PUSH4 0x36568ABE GT PUSH2 0x24F JUMPI DUP1 PUSH4 0x5C975ABB GT PUSH2 0x208 JUMPI DUP1 PUSH4 0x6352211E GT PUSH2 0x1E2 JUMPI DUP1 PUSH4 0x6352211E EQ PUSH2 0x79F JUMPI DUP1 PUSH4 0x6573C787 EQ PUSH2 0x7C9 JUMPI DUP1 PUSH4 0x6A627842 EQ PUSH2 0x7F3 JUMPI DUP1 PUSH4 0x6B0C004D EQ PUSH2 0x826 JUMPI PUSH2 0x2EF JUMP JUMPDEST DUP1 PUSH4 0x5C975ABB EQ PUSH2 0x69B JUMPI DUP1 PUSH4 0x60316801 EQ PUSH2 0x6B0 JUMPI DUP1 PUSH4 0x62FF09D6 EQ PUSH2 0x775 JUMPI PUSH2 0x2EF JUMP JUMPDEST DUP1 PUSH4 0x36568ABE EQ PUSH2 0x5A1 JUMPI DUP1 PUSH4 0x3CCFD60B EQ PUSH2 0x5DA JUMPI DUP1 PUSH4 0x3F4BA83A EQ PUSH2 0x5EF JUMPI DUP1 PUSH4 0x42842E0E EQ PUSH2 0x604 JUMPI DUP1 PUSH4 0x42966C68 EQ PUSH2 0x647 JUMPI DUP1 PUSH4 0x4F6CCCE7 EQ PUSH2 0x671 JUMPI PUSH2 0x2EF JUMP JUMPDEST DUP1 PUSH4 0x182199CD GT PUSH2 0x2A1 JUMPI DUP1 PUSH4 0x182199CD EQ PUSH2 0x483 JUMPI DUP1 PUSH4 0x23B872DD EQ PUSH2 0x4AD JUMPI DUP1 PUSH4 0x248A9CA3 EQ PUSH2 0x4F0 JUMPI DUP1 PUSH4 0x277DEC92 EQ PUSH2 0x51A JUMPI DUP1 PUSH4 0x2F2FF15D EQ PUSH2 0x52F JUMPI DUP1 PUSH4 0x2F745C59 EQ PUSH2 0x568 JUMPI PUSH2 0x2EF JUMP JUMPDEST DUP1 PUSH4 0x1FFC9A7 EQ PUSH2 0x2F4 JUMPI DUP1 PUSH4 0x6FDDE03 EQ PUSH2 0x33C JUMPI DUP1 PUSH4 0x81812FC EQ PUSH2 0x3C6 JUMPI DUP1 PUSH4 0x95EA7B3 EQ PUSH2 0x40C JUMPI DUP1 PUSH4 0x179F0B0A EQ PUSH2 0x447 JUMPI DUP1 PUSH4 0x18160DDD EQ PUSH2 0x46E JUMPI PUSH2 0x2EF JUMP JUMPDEST CALLDATASIZE PUSH2 0x2EF JUMPI STOP JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x300 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x328 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x317 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH2 0xD3C JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x348 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x351 PUSH2 0xD5F JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 DUP1 DUP3 MSTORE DUP4 MLOAD DUP2 DUP4 ADD MSTORE DUP4 MLOAD SWAP2 SWAP3 DUP4 SWAP3 SWAP1 DUP4 ADD SWAP2 DUP6 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x38B JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x373 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x3B8 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP3 POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x3D2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x3F0 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x3E9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH2 0xDF6 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP3 AND DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x418 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x445 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x42F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 CALLDATALOAD AND SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH2 0xE58 JUMP JUMPDEST STOP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x453 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x45C PUSH2 0xF33 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x47A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x45C PUSH2 0xF3A JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x48F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x328 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x4A6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH2 0xF4B JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x4B9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x445 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x60 DUP2 LT ISZERO PUSH2 0x4D0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 CALLDATALOAD DUP2 AND SWAP2 PUSH1 0x20 DUP2 ADD CALLDATALOAD SWAP1 SWAP2 AND SWAP1 PUSH1 0x40 ADD CALLDATALOAD PUSH2 0xF6A JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x4FC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x45C PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x513 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH2 0xFC1 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x526 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x445 PUSH2 0xFD6 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x53B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x445 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x552 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x1049 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x574 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x45C PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x58B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 CALLDATALOAD AND SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH2 0x10B5 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x5AD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x445 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x5C4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x10E6 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x5E6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x445 PUSH2 0x1147 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x5FB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x445 PUSH2 0x11D8 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x610 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x445 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x60 DUP2 LT ISZERO PUSH2 0x627 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 CALLDATALOAD DUP2 AND SWAP2 PUSH1 0x20 DUP2 ADD CALLDATALOAD SWAP1 SWAP2 AND SWAP1 PUSH1 0x40 ADD CALLDATALOAD PUSH2 0x1249 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x653 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x445 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x66A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH2 0x1264 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x67D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x45C PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x694 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH2 0x12B6 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x6A7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x328 PUSH2 0x12D2 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x6BC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x6DA PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x6D3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH2 0x12DB JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 DUP1 PUSH1 0x20 ADD DUP6 DUP2 MSTORE PUSH1 0x20 ADD DUP5 DUP2 MSTORE PUSH1 0x20 ADD DUP4 PUSH1 0x3 DUP2 GT ISZERO PUSH2 0x6FA JUMPI INVALID JUMPDEST PUSH1 0xFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE DUP7 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x737 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x71F JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x764 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP6 POP POP POP POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x781 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x45C PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x798 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH2 0x13A0 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x7AB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x3F0 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x7C2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH2 0x13B2 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x7D5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x328 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x7EC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH2 0x13E0 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x7FF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x445 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x816 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x1400 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x832 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x45C PUSH2 0x1484 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x847 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x351 PUSH2 0x148A JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x85C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x45C PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x873 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x14EB JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x88F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x445 PUSH2 0x1553 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x8A4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x445 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x8BB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH2 0x15FF JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x8D4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x445 PUSH2 0x169B JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x8E9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x3F0 PUSH2 0x170A JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x8FE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x3F0 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x915 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH2 0x1719 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x92E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x328 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x945 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x1737 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x967 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x351 PUSH2 0x1755 JUMP JUMPDEST PUSH2 0x445 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x986 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH2 0x17B6 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x999 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x45C PUSH2 0x1A5C JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x9AE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x45C PUSH2 0x1B18 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x9C3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x445 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x9DA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 CALLDATALOAD AND SWAP1 PUSH1 0x20 ADD CALLDATALOAD ISZERO ISZERO PUSH2 0x1B1D JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x9FE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x445 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0xA15 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH2 0x1C22 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xA28 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x445 PUSH2 0x1CE0 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xA3D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xA5B PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0xA54 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH2 0x1D51 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 DUP3 PUSH1 0x3 DUP2 GT ISZERO PUSH2 0xA6B JUMPI INVALID JUMPDEST PUSH1 0xFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xA8B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x445 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x80 DUP2 LT ISZERO PUSH2 0xAA2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 CALLDATALOAD DUP2 AND SWAP3 PUSH1 0x20 DUP2 ADD CALLDATALOAD SWAP1 SWAP2 AND SWAP2 PUSH1 0x40 DUP3 ADD CALLDATALOAD SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH1 0x80 DUP2 ADD PUSH1 0x60 DUP3 ADD CALLDATALOAD PUSH5 0x100000000 DUP2 GT ISZERO PUSH2 0xADD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 ADD DUP4 PUSH1 0x20 DUP3 ADD GT ISZERO PUSH2 0xAEF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP2 DUP5 PUSH1 0x1 DUP4 MUL DUP5 ADD GT PUSH5 0x100000000 DUP4 GT OR ISZERO PUSH2 0xB11 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP2 SWAP1 DUP1 DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP3 SWAP6 POP PUSH2 0x1ED1 SWAP5 POP POP POP POP POP JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xB5E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x351 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0xB75 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH2 0x1F29 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xB88 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x45C PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0xB9F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH2 0x2327 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xBB2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xBD0 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0xBC9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH2 0x233E JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 DUP1 PUSH1 0x20 ADD DUP5 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE DUP6 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0xC19 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0xC01 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0xC46 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP5 POP POP POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xC62 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x45C PUSH2 0x23EB JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xC77 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x445 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0xC8E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x240E JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xCB0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x45C PUSH2 0x2467 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xCC5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x328 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0xCDC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 CALLDATALOAD DUP2 AND SWAP2 PUSH1 0x20 ADD CALLDATALOAD AND PUSH2 0x248A JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xD00 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x445 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0xD17 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x24B8 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xD33 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x45C PUSH2 0x25BB JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP2 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND JUMPDEST SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x7 DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x1F PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP9 AND ISZERO MUL ADD SWAP1 SWAP6 AND SWAP5 SWAP1 SWAP5 DIV SWAP4 DUP5 ADD DUP2 SWAP1 DIV DUP2 MUL DUP3 ADD DUP2 ADD SWAP1 SWAP3 MSTORE DUP3 DUP2 MSTORE PUSH1 0x60 SWAP4 SWAP1 SWAP3 SWAP1 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0xDEB JUMPI DUP1 PUSH1 0x1F LT PUSH2 0xDC0 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0xDEB JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0xDCE JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP SWAP1 POP JUMPDEST SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0xE01 DUP3 PUSH2 0x25C1 JUMP JUMPDEST PUSH2 0xE3C JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x2C DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3D6F PUSH1 0x2C SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST POP PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0xE63 DUP3 PUSH2 0x13B2 JUMP JUMPDEST SWAP1 POP DUP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0xEB6 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x21 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3E14 PUSH1 0x21 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST DUP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0xEC8 PUSH2 0x25D4 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ DUP1 PUSH2 0xEE9 JUMPI POP PUSH2 0xEE9 DUP2 PUSH2 0xEE4 PUSH2 0x25D4 JUMP JUMPDEST PUSH2 0x248A JUMP JUMPDEST PUSH2 0xF24 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x38 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3C7E PUSH1 0x38 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0xF2E DUP4 DUP4 PUSH2 0x25D8 JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH3 0x93A80 DUP2 JUMP JUMPDEST PUSH1 0x0 PUSH2 0xF46 PUSH1 0x3 PUSH2 0x2646 JUMP JUMPDEST SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x2 PUSH2 0xF58 DUP4 PUSH2 0x1D51 JUMP JUMPDEST PUSH1 0x3 DUP2 GT ISZERO PUSH2 0xF63 JUMPI INVALID JUMPDEST EQ SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0xF7B PUSH2 0xF75 PUSH2 0x25D4 JUMP JUMPDEST DUP3 PUSH2 0x2651 JUMP JUMPDEST PUSH2 0xFB6 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x31 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3E5C PUSH1 0x31 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0xF2E DUP4 DUP4 DUP4 PUSH2 0x26F5 JUMP JUMPDEST PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x2 ADD SLOAD SWAP1 JUMP JUMPDEST PUSH2 0xFDE PUSH2 0x25D4 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0xFEF PUSH2 0x170A JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ PUSH2 0x1038 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x24 DUP3 ADD MSTORE PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x3D9B DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH1 0xF DUP1 SLOAD PUSH2 0xFF00 NOT AND PUSH2 0x100 OR SWAP1 SSTORE JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x2 ADD SLOAD PUSH2 0x106C SWAP1 PUSH2 0x1067 PUSH2 0x25D4 JUMP JUMPDEST PUSH2 0x1737 JUMP JUMPDEST PUSH2 0x10A7 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x2F DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3A97 PUSH1 0x2F SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x10B1 DUP3 DUP3 PUSH2 0x2853 JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH2 0x10DD SWAP1 DUP4 PUSH4 0xFFFFFFFF PUSH2 0x28C2 AND JUMP JUMPDEST SWAP1 POP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x10EE PUSH2 0x25D4 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ PUSH2 0x113D JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x2F DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3F65 PUSH1 0x2F SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x10B1 DUP3 DUP3 PUSH2 0x28CE JUMP JUMPDEST PUSH2 0x114F PUSH2 0x25D4 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x1160 PUSH2 0x170A JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ PUSH2 0x11A9 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x24 DUP3 ADD MSTORE PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x3D9B DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH1 0x40 MLOAD SELFBALANCE SWAP1 CALLER SWAP1 DUP3 ISZERO PUSH2 0x8FC MUL SWAP1 DUP4 SWAP1 PUSH1 0x0 DUP2 DUP2 DUP2 DUP6 DUP9 DUP9 CALL SWAP4 POP POP POP POP ISZERO DUP1 ISZERO PUSH2 0x10B1 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH11 0x5041555345525F524F4C45 PUSH1 0xA8 SHL DUP2 MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0xB ADD SWAP1 KECCAK256 PUSH2 0x1204 SWAP1 PUSH2 0x1067 PUSH2 0x25D4 JUMP JUMPDEST PUSH2 0x123F JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x40 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3F25 PUSH1 0x40 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x1247 PUSH2 0x293D JUMP JUMPDEST JUMP JUMPDEST PUSH2 0xF2E DUP4 DUP4 DUP4 PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE POP PUSH2 0x1ED1 JUMP JUMPDEST PUSH2 0x126F PUSH2 0xF75 PUSH2 0x25D4 JUMP JUMPDEST PUSH2 0x12AA JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x30 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3EF5 PUSH1 0x30 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x12B3 DUP2 PUSH2 0x29DD JUMP JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x12CA PUSH1 0x3 DUP5 PUSH4 0xFFFFFFFF PUSH2 0x2AB6 AND JUMP JUMPDEST POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0xB SLOAD PUSH1 0xFF AND SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0xE PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH1 0x1 DUP2 ADD SLOAD PUSH1 0x2 DUP3 ADD SLOAD PUSH1 0x60 SWAP4 SWAP3 DUP4 SWAP3 DUP4 SWAP3 PUSH2 0x1304 DUP9 PUSH2 0x1D51 JUMP JUMPDEST DUP4 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x1F PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP9 AND ISZERO MUL ADD SWAP1 SWAP6 AND SWAP5 SWAP1 SWAP5 DIV SWAP4 DUP5 ADD DUP2 SWAP1 DIV DUP2 MUL DUP3 ADD DUP2 ADD SWAP1 SWAP3 MSTORE DUP3 DUP2 MSTORE SWAP2 DUP7 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x138A JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x135F JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x138A JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x136D JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP SWAP4 POP SWAP4 POP SWAP4 POP SWAP4 POP SWAP4 POP SWAP2 SWAP4 POP SWAP2 SWAP4 JUMP JUMPDEST PUSH1 0x30 PUSH1 0x20 MSTORE PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD DUP2 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x10E0 DUP3 PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x29 DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x3CE0 PUSH1 0x29 SWAP2 CODECOPY PUSH1 0x3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF PUSH2 0x2AD2 AND JUMP JUMPDEST PUSH1 0x0 PUSH1 0x3 PUSH2 0x13ED DUP4 PUSH2 0x1D51 JUMP JUMPDEST PUSH1 0x3 DUP2 GT ISZERO PUSH2 0x13F8 JUMPI INVALID JUMPDEST EQ ISZERO SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH11 0x4D494E5445525F524F4C45 PUSH1 0xA8 SHL DUP2 MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0xB ADD SWAP1 KECCAK256 PUSH2 0x142C SWAP1 PUSH2 0x1067 PUSH2 0x25D4 JUMP JUMPDEST PUSH2 0x1467 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x3D DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3EB8 PUSH1 0x3D SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x147A DUP2 PUSH2 0x1475 PUSH1 0xC PUSH2 0x2AE9 JUMP JUMPDEST PUSH2 0x2AED JUMP JUMPDEST PUSH2 0x12B3 PUSH1 0xC PUSH2 0x2C27 JUMP JUMPDEST PUSH2 0x2710 DUP2 JUMP JUMPDEST PUSH1 0xA DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x1F PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP9 AND ISZERO MUL ADD SWAP1 SWAP6 AND SWAP5 SWAP1 SWAP5 DIV SWAP4 DUP5 ADD DUP2 SWAP1 DIV DUP2 MUL DUP3 ADD DUP2 ADD SWAP1 SWAP3 MSTORE DUP3 DUP2 MSTORE PUSH1 0x60 SWAP4 SWAP1 SWAP3 SWAP1 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0xDEB JUMPI DUP1 PUSH1 0x1F LT PUSH2 0xDC0 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0xDEB JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH2 0x1532 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x2A DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3CB6 PUSH1 0x2A SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH2 0x10E0 SWAP1 PUSH2 0x2646 JUMP JUMPDEST PUSH2 0x155B PUSH2 0x25D4 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x156C PUSH2 0x170A JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ PUSH2 0x15B5 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x24 DUP3 ADD MSTORE PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x3D9B DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH1 0xD SLOAD PUSH1 0x40 MLOAD PUSH1 0x0 SWAP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 PUSH32 0x8BE0079C531659141344CD1FD0A4F28419497F9722A3DAAFE3B4186F6B6457E0 SWAP1 DUP4 SWAP1 LOG3 PUSH1 0xD DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND SWAP1 SSTORE JUMP JUMPDEST PUSH1 0xF SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0xFF AND PUSH2 0x1645 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x27 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3B4C PUSH1 0x27 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x1656 PUSH2 0x1650 PUSH2 0x25D4 JUMP JUMPDEST DUP4 PUSH2 0x2651 JUMP JUMPDEST PUSH2 0x1691 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x2B DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3E8D PUSH1 0x2B SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0xF2E DUP3 DUP3 PUSH2 0x2C30 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH11 0x5041555345525F524F4C45 PUSH1 0xA8 SHL DUP2 MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0xB ADD SWAP1 KECCAK256 PUSH2 0x16C7 SWAP1 PUSH2 0x1067 PUSH2 0x25D4 JUMP JUMPDEST PUSH2 0x1702 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x3E DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3B73 PUSH1 0x3E SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x1247 PUSH2 0x2C76 JUMP JUMPDEST PUSH1 0xD SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH2 0x10DD SWAP1 DUP4 PUSH4 0xFFFFFFFF PUSH2 0x28C2 AND JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH2 0x10DD SWAP1 DUP4 PUSH4 0xFFFFFFFF PUSH2 0x2CF9 AND JUMP JUMPDEST PUSH1 0x8 DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x1F PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP9 AND ISZERO MUL ADD SWAP1 SWAP6 AND SWAP5 SWAP1 SWAP5 DIV SWAP4 DUP5 ADD DUP2 SWAP1 DIV DUP2 MUL DUP3 ADD DUP2 ADD SWAP1 SWAP3 MSTORE DUP3 DUP2 MSTORE PUSH1 0x60 SWAP4 SWAP1 SWAP3 SWAP1 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0xDEB JUMPI DUP1 PUSH1 0x1F LT PUSH2 0xDC0 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0xDEB JUMP JUMPDEST PUSH1 0xF SLOAD PUSH1 0xFF AND PUSH2 0x1805 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x15 PUSH1 0x24 DUP3 ADD MSTORE PUSH21 0x151A1948139D5C9CD95C9E481A5CC818DB1BDCD959 PUSH1 0x5A SHL PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH2 0x180D PUSH2 0xF3A JUMP JUMPDEST PUSH2 0x2710 SUB DUP2 GT ISZERO PUSH2 0x185D JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x15 PUSH1 0x24 DUP3 ADD MSTORE PUSH21 0x139BDD08195B9BDD59DA08189D5B189CC81B19599D PUSH1 0x5A SHL PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH2 0x2710 PUSH2 0x1868 PUSH2 0xF3A JUMP JUMPDEST LT PUSH2 0x18B3 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x16 PUSH1 0x24 DUP3 ADD MSTORE PUSH22 0x14D85B19481A185CC8185B1C9958591E48195B991959 PUSH1 0x52 SHL PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH1 0x0 DUP2 GT DUP1 ISZERO PUSH2 0x18C4 JUMPI POP PUSH1 0x14 DUP2 GT ISZERO JUMPDEST PUSH2 0x18FF JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x30 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3DE4 PUSH1 0x30 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x2710 PUSH2 0x1913 PUSH2 0x190D PUSH2 0xF3A JUMP JUMPDEST DUP4 PUSH2 0x2D0E JUMP JUMPDEST GT ISZERO PUSH2 0x1966 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x18 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x45786365656473204D41585F43525950544F5243484944530000000000000000 PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH2 0x1977 PUSH2 0x1971 PUSH2 0x1A5C JUMP JUMPDEST DUP3 PUSH2 0x2D68 JUMP JUMPDEST CALLVALUE LT ISZERO PUSH2 0x19B5 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x23 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3D09 PUSH1 0x23 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x10B1 JUMPI PUSH2 0x19CA PUSH1 0x2F PUSH2 0x2C27 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x19D6 PUSH1 0x2F PUSH2 0x2AE9 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0xA0 DUP2 ADD DUP3 MSTORE PUSH1 0x6 PUSH1 0x60 DUP3 ADD SWAP1 DUP2 MSTORE PUSH6 0x6772616E756D PUSH1 0xD0 SHL PUSH1 0x80 DUP4 ADD MSTORE DUP2 MSTORE PUSH1 0x0 NOT PUSH1 0x20 DUP1 DUP4 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x0 DUP3 DUP5 ADD DUP2 SWAP1 MSTORE DUP5 DUP2 MSTORE PUSH1 0xE DUP3 MSTORE SWAP3 SWAP1 SWAP3 KECCAK256 DUP2 MLOAD DUP1 MLOAD SWAP5 SWAP6 POP SWAP2 SWAP4 SWAP1 SWAP3 PUSH2 0x1A32 SWAP3 DUP5 SWAP3 SWAP2 ADD SWAP1 PUSH2 0x3954 JUMP JUMPDEST POP PUSH1 0x20 DUP3 ADD MLOAD PUSH1 0x1 DUP3 ADD SSTORE PUSH1 0x40 SWAP1 SWAP2 ADD MLOAD PUSH1 0x2 SWAP1 SWAP2 ADD SSTORE PUSH2 0x1A53 CALLER DUP3 PUSH2 0x2DC1 JUMP JUMPDEST POP PUSH1 0x1 ADD PUSH2 0x19B8 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x1A67 PUSH2 0xF3A JUMP JUMPDEST SWAP1 POP PUSH2 0x26AC DUP2 LT PUSH2 0x1A83 JUMPI PUSH8 0xDE0B6B3A7640000 SWAP2 POP POP PUSH2 0xDF3 JUMP JUMPDEST PUSH2 0x251C DUP2 LT PUSH2 0x1A9D JUMPI PUSH8 0x8E1BC9BF0400000 SWAP2 POP POP PUSH2 0xDF3 JUMP JUMPDEST PUSH2 0x1D4C DUP2 LT PUSH2 0x1AB7 JUMPI PUSH8 0x470DE4DF8200000 SWAP2 POP POP PUSH2 0xDF3 JUMP JUMPDEST PUSH2 0xDAC DUP2 LT PUSH2 0x1AD1 JUMPI PUSH8 0x2386F26FC100000 SWAP2 POP POP PUSH2 0xDF3 JUMP JUMPDEST PUSH2 0x5DC DUP2 LT PUSH2 0x1AEB JUMPI PUSH8 0x11C37937E080000 SWAP2 POP POP PUSH2 0xDF3 JUMP JUMPDEST PUSH2 0x1F4 DUP2 LT PUSH2 0x1B04 JUMPI PUSH7 0xD529AE9E860000 SWAP2 POP POP PUSH2 0xDF3 JUMP JUMPDEST PUSH7 0x8E1BC9BF040000 SWAP2 POP POP PUSH2 0xDF3 JUMP JUMPDEST POP SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP2 JUMP JUMPDEST PUSH2 0x1B25 PUSH2 0x25D4 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x1B8B JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x19 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x4552433732313A20617070726F766520746F2063616C6C657200000000000000 PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST DUP1 PUSH1 0x6 PUSH1 0x0 PUSH2 0x1B98 PUSH2 0x25D4 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 DUP2 AND DUP3 MSTORE PUSH1 0x20 DUP1 DUP4 ADD SWAP4 SWAP1 SWAP4 MSTORE PUSH1 0x40 SWAP2 DUP3 ADD PUSH1 0x0 SWAP1 DUP2 KECCAK256 SWAP2 DUP8 AND DUP1 DUP3 MSTORE SWAP2 SWAP1 SWAP4 MSTORE SWAP2 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND SWAP3 ISZERO ISZERO SWAP3 SWAP1 SWAP3 OR SWAP1 SWAP2 SSTORE PUSH2 0x1BDC PUSH2 0x25D4 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP5 ISZERO ISZERO DUP2 MSTORE SWAP1 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP3 SWAP1 SWAP3 AND SWAP2 PUSH32 0x17307EAB39AB6107E8899845AD3D59BD9653F200F220920489CA2B5937696C31 SWAP2 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 LOG3 POP POP JUMP JUMPDEST PUSH2 0x1C2D PUSH2 0xF75 PUSH2 0x25D4 JUMP JUMPDEST PUSH2 0x1C68 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x27 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3BFB PUSH1 0x27 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x1C71 DUP2 PUSH2 0x13E0 JUMP JUMPDEST PUSH2 0x1C7A JUMPI PUSH2 0x12B3 JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0xE PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH1 0x2 DUP2 ADD SLOAD PUSH1 0x1 DUP3 ADD SLOAD SWAP2 SWAP3 SWAP1 SWAP2 PUSH2 0x1C9E PUSH2 0x2DDB JUMP JUMPDEST SUB SWAP1 POP PUSH1 0x0 PUSH2 0x1CB0 DUP3 PUSH3 0x93A80 PUSH2 0x2DDF JUMP JUMPDEST SWAP1 POP DUP1 DUP4 GT ISZERO PUSH2 0x1CC3 JUMPI POP POP POP POP PUSH2 0x12B3 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1CD0 DUP5 PUSH1 0x1 PUSH2 0x2D0E JUMP JUMPDEST PUSH1 0x2 SWAP1 SWAP6 ADD SWAP5 SWAP1 SWAP5 SSTORE POP POP POP POP POP JUMP JUMPDEST PUSH2 0x1CE8 PUSH2 0x25D4 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x1CF9 PUSH2 0x170A JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ PUSH2 0x1D42 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x24 DUP3 ADD MSTORE PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x3D9B DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH1 0xF DUP1 SLOAD PUSH1 0xFF NOT AND PUSH1 0x1 OR SWAP1 SSTORE JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1D5B PUSH2 0x39CE JUMP JUMPDEST PUSH1 0x0 DUP4 DUP2 MSTORE PUSH1 0xE PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 SWAP2 DUP3 SWAP1 KECCAK256 DUP3 MLOAD DUP2 SLOAD PUSH1 0x2 PUSH1 0x1 DUP3 AND ISZERO PUSH2 0x100 MUL PUSH1 0x0 NOT ADD SWAP1 SWAP2 AND DIV PUSH1 0x1F DUP2 ADD DUP5 SWAP1 DIV SWAP1 SWAP4 MUL DUP2 ADD PUSH1 0x80 SWAP1 DUP2 ADD SWAP1 SWAP5 MSTORE PUSH1 0x60 DUP2 ADD DUP4 DUP2 MSTORE SWAP1 SWAP4 SWAP2 SWAP3 DUP5 SWAP3 DUP5 SWAP2 SWAP1 DUP5 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x1DF9 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x1DCE JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x1DF9 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x1DDC JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x1 DUP3 ADD SLOAD DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x2 DUP3 ADD SLOAD DUP2 MSTORE POP POP SWAP1 POP DUP1 PUSH1 0x20 ADD MLOAD PUSH1 0x0 EQ ISZERO PUSH2 0x1E2F JUMPI PUSH1 0x0 SWAP2 POP POP PUSH2 0xD5A JUMP JUMPDEST PUSH1 0x0 NOT DUP2 PUSH1 0x20 ADD MLOAD EQ ISZERO PUSH2 0x1E47 JUMPI PUSH1 0x1 SWAP2 POP POP PUSH2 0xD5A JUMP JUMPDEST PUSH1 0x40 DUP2 ADD MLOAD PUSH1 0x20 DUP3 ADD MLOAD PUSH1 0x0 SWAP1 PUSH2 0x1E5C PUSH2 0x2DDB JUMP JUMPDEST SUB SWAP1 POP PUSH1 0x0 PUSH2 0x1E6E DUP3 PUSH3 0x93A80 PUSH2 0x2DDF JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x1E7F DUP4 PUSH3 0x93A80 PUSH2 0x2E46 JUMP JUMPDEST SWAP1 POP DUP2 DUP5 EQ ISZERO PUSH2 0x1E97 JUMPI PUSH1 0x2 SWAP6 POP POP POP POP POP POP PUSH2 0xD5A JUMP JUMPDEST DUP2 PUSH2 0x1EA3 DUP6 PUSH1 0x1 PUSH2 0x2D0E JUMP JUMPDEST EQ DUP1 ISZERO PUSH2 0x1EB1 JUMPI POP PUSH2 0x2A30 DUP2 LT JUMPDEST ISZERO PUSH2 0x1EC4 JUMPI PUSH1 0x2 SWAP6 POP POP POP POP POP POP PUSH2 0xD5A JUMP JUMPDEST POP PUSH1 0x3 SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH2 0x1EDC PUSH2 0x1650 PUSH2 0x25D4 JUMP JUMPDEST PUSH2 0x1F17 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x31 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3E5C PUSH1 0x31 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x1F23 DUP5 DUP5 DUP5 DUP5 PUSH2 0x2EAD JUMP JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH1 0x60 DUP1 PUSH2 0x1F35 DUP4 PUSH2 0x12DB JUMP JUMPDEST POP SWAP2 SWAP3 POP PUSH1 0x1 SWAP2 POP PUSH2 0x1F44 SWAP1 POP JUMP JUMPDEST PUSH2 0x1F4D DUP5 PUSH2 0x1D51 JUMP JUMPDEST PUSH1 0x3 DUP2 GT ISZERO PUSH2 0x1F58 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x2036 JUMPI PUSH2 0x1F66 PUSH2 0x148A JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x2E DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x3B1E PUSH1 0x2E SWAP2 CODECOPY PUSH1 0x40 MLOAD PUSH1 0x20 ADD DUP1 DUP4 DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 JUMPDEST PUSH1 0x20 DUP4 LT PUSH2 0x1FB1 JUMPI DUP1 MLOAD DUP3 MSTORE PUSH1 0x1F NOT SWAP1 SWAP3 ADD SWAP2 PUSH1 0x20 SWAP2 DUP3 ADD SWAP2 ADD PUSH2 0x1F92 JUMP JUMPDEST MLOAD DUP2 MLOAD PUSH1 0x20 SWAP4 DUP5 SUB PUSH2 0x100 EXP PUSH1 0x0 NOT ADD DUP1 NOT SWAP1 SWAP3 AND SWAP2 AND OR SWAP1 MSTORE DUP6 MLOAD SWAP2 SWAP1 SWAP4 ADD SWAP3 DUP6 ADD SWAP2 POP DUP1 DUP4 DUP4 JUMPDEST PUSH1 0x20 DUP4 LT PUSH2 0x1FF9 JUMPI DUP1 MLOAD DUP3 MSTORE PUSH1 0x1F NOT SWAP1 SWAP3 ADD SWAP2 PUSH1 0x20 SWAP2 DUP3 ADD SWAP2 ADD PUSH2 0x1FDA JUMP JUMPDEST PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB DUP1 NOT DUP3 MLOAD AND DUP2 DUP5 MLOAD AND DUP1 DUP3 OR DUP6 MSTORE POP POP POP POP POP POP SWAP1 POP ADD SWAP3 POP POP POP PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE SWAP2 POP POP PUSH2 0xD5A JUMP JUMPDEST PUSH1 0x2 PUSH2 0x2041 DUP5 PUSH2 0x1D51 JUMP JUMPDEST PUSH1 0x3 DUP2 GT ISZERO PUSH2 0x204C JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x21BD JUMPI PUSH2 0x205A PUSH2 0x148A JUMP JUMPDEST PUSH1 0x31 PUSH1 0x0 DUP4 PUSH1 0x40 MLOAD PUSH1 0x20 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE DUP4 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x209F JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x2087 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x20CC JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP3 POP POP POP PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x40 MLOAD PUSH1 0x20 ADD DUP1 DUP4 DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 JUMPDEST PUSH1 0x20 DUP4 LT PUSH2 0x2127 JUMPI DUP1 MLOAD DUP3 MSTORE PUSH1 0x1F NOT SWAP1 SWAP3 ADD SWAP2 PUSH1 0x20 SWAP2 DUP3 ADD SWAP2 ADD PUSH2 0x2108 JUMP JUMPDEST PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB DUP1 NOT DUP3 MLOAD AND DUP2 DUP5 MLOAD AND DUP1 DUP3 OR DUP6 MSTORE POP POP POP POP POP POP SWAP1 POP ADD DUP3 DUP1 SLOAD PUSH1 0x1 DUP2 PUSH1 0x1 AND ISZERO PUSH2 0x100 MUL SUB AND PUSH1 0x2 SWAP1 DIV DUP1 ISZERO PUSH2 0x21A0 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x217E JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 DUP3 ADD SWAP2 PUSH2 0x21A0 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x218C JUMPI JUMPDEST POP POP SWAP3 POP POP POP PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE SWAP2 POP POP PUSH2 0xD5A JUMP JUMPDEST PUSH2 0x21C5 PUSH2 0x148A JUMP JUMPDEST PUSH1 0x32 PUSH1 0x0 DUP4 PUSH1 0x40 MLOAD PUSH1 0x20 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE DUP4 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x220A JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x21F2 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x2237 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP3 POP POP POP PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x40 MLOAD PUSH1 0x20 ADD DUP1 DUP4 DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 JUMPDEST PUSH1 0x20 DUP4 LT PUSH2 0x2292 JUMPI DUP1 MLOAD DUP3 MSTORE PUSH1 0x1F NOT SWAP1 SWAP3 ADD SWAP2 PUSH1 0x20 SWAP2 DUP3 ADD SWAP2 ADD PUSH2 0x2273 JUMP JUMPDEST PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB DUP1 NOT DUP3 MLOAD AND DUP2 DUP5 MLOAD AND DUP1 DUP3 OR DUP6 MSTORE POP POP POP POP POP POP SWAP1 POP ADD DUP3 DUP1 SLOAD PUSH1 0x1 DUP2 PUSH1 0x1 AND ISZERO PUSH2 0x100 MUL SUB AND PUSH1 0x2 SWAP1 DIV DUP1 ISZERO PUSH2 0x230B JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x22E9 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 DUP3 ADD SWAP2 PUSH2 0x230B JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x22F7 JUMPI JUMPDEST POP POP PUSH1 0x40 DUP1 MLOAD PUSH1 0x1F NOT DUP2 DUP5 SUB ADD DUP2 MSTORE SWAP2 SWAP1 MSTORE SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH2 0x10E0 SWAP1 PUSH2 0x2646 JUMP JUMPDEST PUSH1 0xE PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x40 SWAP2 DUP3 SWAP1 KECCAK256 DUP1 SLOAD DUP4 MLOAD PUSH1 0x1F PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP7 AND ISZERO MUL ADD SWAP1 SWAP4 AND SWAP3 SWAP1 SWAP3 DIV SWAP2 DUP3 ADD DUP5 SWAP1 DIV DUP5 MUL DUP2 ADD DUP5 ADD SWAP1 SWAP5 MSTORE DUP1 DUP5 MSTORE SWAP1 SWAP3 SWAP2 DUP4 SWAP2 SWAP1 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x23D5 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x23AA JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x23D5 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x23B8 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP SWAP1 DUP1 PUSH1 0x1 ADD SLOAD SWAP1 DUP1 PUSH1 0x2 ADD SLOAD SWAP1 POP DUP4 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH11 0x4D494E5445525F524F4C45 PUSH1 0xA8 SHL DUP2 MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0xB ADD SWAP1 KECCAK256 DUP2 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x2 ADD SLOAD PUSH2 0x242C SWAP1 PUSH2 0x1067 PUSH2 0x25D4 JUMP JUMPDEST PUSH2 0x113D JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x30 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3C4E PUSH1 0x30 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH11 0x5041555345525F524F4C45 PUSH1 0xA8 SHL DUP2 MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0xB ADD SWAP1 KECCAK256 DUP2 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x6 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SWAP4 SWAP1 SWAP5 AND DUP3 MSTORE SWAP2 SWAP1 SWAP2 MSTORE KECCAK256 SLOAD PUSH1 0xFF AND SWAP1 JUMP JUMPDEST PUSH2 0x24C0 PUSH2 0x25D4 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x24D1 PUSH2 0x170A JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ PUSH2 0x251A JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x24 DUP3 ADD MSTORE PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x3D9B DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND PUSH2 0x255F JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x26 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3AF8 PUSH1 0x26 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0xD SLOAD PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP5 AND SWAP3 AND SWAP1 PUSH32 0x8BE0079C531659141344CD1FD0A4F28419497F9722A3DAAFE3B4186F6B6457E0 SWAP1 PUSH1 0x0 SWAP1 LOG3 PUSH1 0xD DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP3 SWAP1 SWAP3 AND SWAP2 SWAP1 SWAP2 OR SWAP1 SSTORE JUMP JUMPDEST PUSH2 0x2A30 DUP2 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x10E0 PUSH1 0x3 DUP4 PUSH4 0xFFFFFFFF PUSH2 0x2EFF AND JUMP JUMPDEST CALLER SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND SWAP1 DUP2 OR SWAP1 SWAP2 SSTORE DUP2 SWAP1 PUSH2 0x260D DUP3 PUSH2 0x13B2 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH32 0x8C5BE1E5EBEC7D5BD14F71427D1E84F3DD0314C0F7B2291E5B200AC8C7C3B925 PUSH1 0x40 MLOAD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG4 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x10E0 DUP3 PUSH2 0x2AE9 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x265C DUP3 PUSH2 0x25C1 JUMP JUMPDEST PUSH2 0x2697 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x2C DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3C22 PUSH1 0x2C SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x0 PUSH2 0x26A2 DUP4 PUSH2 0x13B2 JUMP JUMPDEST SWAP1 POP DUP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ DUP1 PUSH2 0x26DD JUMPI POP DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x26D2 DUP5 PUSH2 0xDF6 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ JUMPDEST DUP1 PUSH2 0x26ED JUMPI POP PUSH2 0x26ED DUP2 DUP6 PUSH2 0x248A JUMP JUMPDEST SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x2708 DUP3 PUSH2 0x13B2 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ PUSH2 0x274D JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x29 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3DBB PUSH1 0x29 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH2 0x2792 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x24 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3BB1 PUSH1 0x24 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x279D DUP4 DUP4 DUP4 PUSH2 0x2F0B JUMP JUMPDEST PUSH2 0x27A8 PUSH1 0x0 DUP3 PUSH2 0x25D8 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH2 0x27D0 SWAP1 DUP3 PUSH4 0xFFFFFFFF PUSH2 0x2F6B AND JUMP JUMPDEST POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH2 0x27F9 SWAP1 DUP3 PUSH4 0xFFFFFFFF PUSH2 0x2F77 AND JUMP JUMPDEST POP PUSH2 0x280C PUSH1 0x3 DUP3 DUP5 PUSH4 0xFFFFFFFF PUSH2 0x2F83 AND JUMP JUMPDEST POP DUP1 DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF PUSH1 0x40 MLOAD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG4 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH2 0x2871 SWAP1 DUP3 PUSH4 0xFFFFFFFF PUSH2 0x2F99 AND JUMP JUMPDEST ISZERO PUSH2 0x10B1 JUMPI PUSH2 0x287E PUSH2 0x25D4 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP4 PUSH32 0x2F8788117E7EFF1D82E926EC794901D17C78024A50270940304540A733656F0D PUSH1 0x40 MLOAD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG4 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x10DD DUP4 DUP4 PUSH2 0x2FAE JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH2 0x28EC SWAP1 DUP3 PUSH4 0xFFFFFFFF PUSH2 0x3012 AND JUMP JUMPDEST ISZERO PUSH2 0x10B1 JUMPI PUSH2 0x28F9 PUSH2 0x25D4 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP4 PUSH32 0xF6391F5C32D9C69D2A47EA670B442974B53935D1EDC7FD64EB21E047A839171B PUSH1 0x40 MLOAD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG4 POP POP JUMP JUMPDEST PUSH2 0x2945 PUSH2 0x12D2 JUMP JUMPDEST PUSH2 0x298D JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x14 PUSH1 0x24 DUP3 ADD MSTORE PUSH20 0x14185D5CD8589B194E881B9BDD081C185D5CD959 PUSH1 0x62 SHL PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH1 0xB DUP1 SLOAD PUSH1 0xFF NOT AND SWAP1 SSTORE PUSH32 0x5DB9EE0A495BF2E6FF9C91A7834C1BA4FDD244A5E8AA4E537BD38AEAE4B073AA PUSH2 0x29C0 PUSH2 0x25D4 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP3 AND DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 LOG1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x29E8 DUP3 PUSH2 0x13B2 JUMP JUMPDEST SWAP1 POP PUSH2 0x29F6 DUP2 PUSH1 0x0 DUP5 PUSH2 0x2F0B JUMP JUMPDEST PUSH2 0x2A01 PUSH1 0x0 DUP4 PUSH2 0x25D8 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x9 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP5 AND ISZERO MUL ADD SWAP1 SWAP2 AND DIV ISZERO PUSH2 0x2A3F JUMPI PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x9 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH2 0x2A3F SWAP2 PUSH2 0x39EF JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH2 0x2A67 SWAP1 DUP4 PUSH4 0xFFFFFFFF PUSH2 0x2F6B AND JUMP JUMPDEST POP PUSH2 0x2A79 PUSH1 0x3 DUP4 PUSH4 0xFFFFFFFF PUSH2 0x3027 AND JUMP JUMPDEST POP PUSH1 0x40 MLOAD DUP3 SWAP1 PUSH1 0x0 SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND SWAP1 PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF SWAP1 DUP4 SWAP1 LOG4 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP1 DUP1 PUSH2 0x2AC5 DUP7 DUP7 PUSH2 0x3033 JUMP JUMPDEST SWAP1 SWAP8 SWAP1 SWAP7 POP SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2ADF DUP5 DUP5 DUP5 PUSH2 0x30AE JUMP JUMPDEST SWAP1 POP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH2 0x2B48 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x4552433732313A206D696E7420746F20746865207A65726F2061646472657373 PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH2 0x2B51 DUP2 PUSH2 0x25C1 JUMP JUMPDEST ISZERO PUSH2 0x2BA3 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x1C PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x4552433732313A20746F6B656E20616C7265616479206D696E74656400000000 PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH2 0x2BAF PUSH1 0x0 DUP4 DUP4 PUSH2 0x2F0B JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH2 0x2BD7 SWAP1 DUP3 PUSH4 0xFFFFFFFF PUSH2 0x2F77 AND JUMP JUMPDEST POP PUSH2 0x2BEA PUSH1 0x3 DUP3 DUP5 PUSH4 0xFFFFFFFF PUSH2 0x2F83 AND JUMP JUMPDEST POP PUSH1 0x40 MLOAD DUP2 SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND SWAP1 PUSH1 0x0 SWAP1 PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF SWAP1 DUP3 SWAP1 LOG4 POP POP JUMP JUMPDEST DUP1 SLOAD PUSH1 0x1 ADD SWAP1 SSTORE JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD TIMESTAMP PUSH1 0x20 DUP1 DUP4 ADD SWAP2 SWAP1 SWAP2 MSTORE DIFFICULTY DUP3 DUP5 ADD MSTORE PUSH1 0x60 DUP1 DUP4 ADD DUP6 SWAP1 MSTORE DUP4 MLOAD DUP1 DUP5 SUB SWAP1 SWAP2 ADD DUP2 MSTORE PUSH1 0x80 SWAP1 SWAP3 ADD SWAP1 SWAP3 MSTORE DUP1 MLOAD SWAP2 ADD KECCAK256 PUSH1 0x0 SWAP1 PUSH2 0x2C6F DUP5 DUP3 PUSH2 0x3178 JUMP JUMPDEST POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x2C7E PUSH2 0x12D2 JUMP JUMPDEST ISZERO PUSH2 0x2CC3 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x10 PUSH1 0x24 DUP3 ADD MSTORE PUSH16 0x14185D5CD8589B194E881C185D5CD959 PUSH1 0x82 SHL PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH1 0xB DUP1 SLOAD PUSH1 0xFF NOT AND PUSH1 0x1 OR SWAP1 SSTORE PUSH32 0x62E78CEA01BEE320CD4E420270B5EA74000D11B0C9F74754EBDBFC544B05A258 PUSH2 0x29C0 PUSH2 0x25D4 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x10DD DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND PUSH2 0x31D2 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 ADD DUP4 DUP2 LT ISZERO PUSH2 0x10DD JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x1B PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x536166654D6174683A206164646974696F6E206F766572666C6F770000000000 PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH1 0x0 DUP3 PUSH2 0x2D77 JUMPI POP PUSH1 0x0 PUSH2 0x10E0 JUMP JUMPDEST DUP3 DUP3 MUL DUP3 DUP5 DUP3 DUP2 PUSH2 0x2D84 JUMPI INVALID JUMPDEST DIV EQ PUSH2 0x10DD JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x21 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3D4E PUSH1 0x21 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x10B1 DUP3 DUP3 PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE POP PUSH2 0x31EA JUMP JUMPDEST TIMESTAMP SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 DUP3 GT PUSH2 0x2E35 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x1A PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x536166654D6174683A206469766973696F6E206279207A65726F000000000000 PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST DUP2 DUP4 DUP2 PUSH2 0x2E3E JUMPI INVALID JUMPDEST DIV SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP3 GT PUSH2 0x2E9C JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x18 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x536166654D6174683A206D6F64756C6F206279207A65726F0000000000000000 PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST DUP2 DUP4 DUP2 PUSH2 0x2EA5 JUMPI INVALID JUMPDEST MOD SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH2 0x2EB8 DUP5 DUP5 DUP5 PUSH2 0x26F5 JUMP JUMPDEST PUSH2 0x2EC4 DUP5 DUP5 DUP5 DUP5 PUSH2 0x323C JUMP JUMPDEST PUSH2 0x1F23 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x32 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3AC6 PUSH1 0x32 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x0 PUSH2 0x10DD DUP4 DUP4 PUSH2 0x31D2 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND ISZERO DUP1 PUSH2 0x2F25 JUMPI POP PUSH2 0x2F25 DUP2 PUSH2 0x13E0 JUMP JUMPDEST PUSH2 0x2F60 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x27 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3E35 PUSH1 0x27 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0xF2E DUP4 DUP4 DUP4 PUSH2 0x33BC JUMP JUMPDEST PUSH1 0x0 PUSH2 0x10DD DUP4 DUP4 PUSH2 0x33C7 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x10DD DUP4 DUP4 PUSH2 0x348D JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2ADF DUP5 DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 AND PUSH2 0x34D7 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x10DD DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND PUSH2 0x348D JUMP JUMPDEST DUP2 SLOAD PUSH1 0x0 SWAP1 DUP3 LT PUSH2 0x2FF0 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x22 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3A4A PUSH1 0x22 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST DUP3 PUSH1 0x0 ADD DUP3 DUP2 SLOAD DUP2 LT PUSH2 0x2FFF JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 ADD SLOAD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x10DD DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND PUSH2 0x33C7 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x10DD DUP4 DUP4 PUSH2 0x356E JUMP JUMPDEST DUP2 SLOAD PUSH1 0x0 SWAP1 DUP2 SWAP1 DUP4 LT PUSH2 0x3077 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x22 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3D2C PUSH1 0x22 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x0 DUP5 PUSH1 0x0 ADD DUP5 DUP2 SLOAD DUP2 LT PUSH2 0x3088 JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x2 MUL ADD SWAP1 POP DUP1 PUSH1 0x0 ADD SLOAD DUP2 PUSH1 0x1 ADD SLOAD SWAP3 POP SWAP3 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x1 DUP5 ADD PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 SLOAD DUP3 DUP2 PUSH2 0x3149 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE DUP4 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x310E JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x30F6 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x313B JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP3 POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST POP DUP5 PUSH1 0x0 ADD PUSH1 0x1 DUP3 SUB DUP2 SLOAD DUP2 LT PUSH2 0x315C JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x2 MUL ADD PUSH1 0x1 ADD SLOAD SWAP2 POP POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0xE PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x60 PUSH2 0x319C PUSH2 0x3197 DUP5 PUSH2 0x2710 PUSH2 0x2E46 JUMP JUMPDEST PUSH2 0x3642 JUMP JUMPDEST DUP1 MLOAD SWAP1 SWAP2 POP PUSH2 0x31B1 SWAP1 DUP4 SWAP1 PUSH1 0x20 DUP5 ADD SWAP1 PUSH2 0x3954 JUMP JUMPDEST POP PUSH2 0x31BA PUSH2 0x2DDB JUMP JUMPDEST PUSH1 0x1 DUP4 ADD SSTORE PUSH1 0x0 PUSH2 0x31CA DUP6 PUSH2 0x13B2 JUMP JUMPDEST POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 SWAP2 SWAP1 SWAP2 ADD PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD ISZERO ISZERO SWAP1 JUMP JUMPDEST PUSH2 0x31F4 DUP4 DUP4 PUSH2 0x2AED JUMP JUMPDEST PUSH2 0x3201 PUSH1 0x0 DUP5 DUP5 DUP5 PUSH2 0x323C JUMP JUMPDEST PUSH2 0xF2E JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x32 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3AC6 PUSH1 0x32 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x0 PUSH2 0x3250 DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x372E JUMP JUMPDEST PUSH2 0x325C JUMPI POP PUSH1 0x1 PUSH2 0x26ED JUMP JUMPDEST PUSH1 0x60 PUSH2 0x3382 PUSH4 0xA85BD01 PUSH1 0xE1 SHL PUSH2 0x3271 PUSH2 0x25D4 JUMP JUMPDEST DUP9 DUP8 DUP8 PUSH1 0x40 MLOAD PUSH1 0x24 ADD DUP1 DUP6 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 MSTORE PUSH1 0x20 ADD DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE DUP4 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x32EA JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x32D2 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x3317 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP6 POP POP POP POP POP POP PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH1 0x20 DUP3 ADD DUP1 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB DUP4 DUP2 DUP4 AND OR DUP4 MSTORE POP POP POP POP PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x32 DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x3AC6 PUSH1 0x32 SWAP2 CODECOPY PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP9 AND SWAP2 SWAP1 PUSH4 0xFFFFFFFF PUSH2 0x3734 AND JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP2 DUP1 PUSH1 0x20 ADD SWAP1 MLOAD PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x339B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH4 0xA85BD01 PUSH1 0xE1 SHL EQ SWAP3 POP POP POP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH2 0xF2E DUP4 DUP4 DUP4 PUSH2 0x3743 JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 DUP4 ADD PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 SLOAD DUP1 ISZERO PUSH2 0x3483 JUMPI DUP4 SLOAD PUSH1 0x0 NOT DUP1 DUP4 ADD SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH1 0x0 SWAP1 DUP8 SWAP1 DUP4 SWAP1 DUP2 LT PUSH2 0x33FA JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 ADD SLOAD SWAP1 POP DUP1 DUP8 PUSH1 0x0 ADD DUP5 DUP2 SLOAD DUP2 LT PUSH2 0x3417 JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 DUP1 DUP4 KECCAK256 SWAP1 SWAP2 ADD SWAP3 SWAP1 SWAP3 SSTORE DUP3 DUP2 MSTORE PUSH1 0x1 DUP10 DUP2 ADD SWAP1 SWAP3 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SWAP1 DUP5 ADD SWAP1 SSTORE DUP7 SLOAD DUP8 SWAP1 DUP1 PUSH2 0x3447 JUMPI INVALID JUMPDEST PUSH1 0x1 SWAP1 SUB DUP2 DUP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 ADD PUSH1 0x0 SWAP1 SSTORE SWAP1 SSTORE DUP7 PUSH1 0x1 ADD PUSH1 0x0 DUP8 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 SWAP1 SSTORE PUSH1 0x1 SWAP5 POP POP POP POP POP PUSH2 0x10E0 JUMP JUMPDEST PUSH1 0x0 SWAP2 POP POP PUSH2 0x10E0 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x3499 DUP4 DUP4 PUSH2 0x31D2 JUMP JUMPDEST PUSH2 0x34CF JUMPI POP DUP2 SLOAD PUSH1 0x1 DUP2 DUP2 ADD DUP5 SSTORE PUSH1 0x0 DUP5 DUP2 MSTORE PUSH1 0x20 DUP1 DUP3 KECCAK256 SWAP1 SWAP4 ADD DUP5 SWAP1 SSTORE DUP5 SLOAD DUP5 DUP3 MSTORE DUP3 DUP7 ADD SWAP1 SWAP4 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SWAP2 SWAP1 SWAP2 SSTORE PUSH2 0x10E0 JUMP JUMPDEST POP PUSH1 0x0 PUSH2 0x10E0 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x1 DUP5 ADD PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 SLOAD DUP1 PUSH2 0x353C JUMPI POP POP PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD DUP3 MSTORE DUP4 DUP2 MSTORE PUSH1 0x20 DUP1 DUP3 ADD DUP5 DUP2 MSTORE DUP7 SLOAD PUSH1 0x1 DUP2 DUP2 ADD DUP10 SSTORE PUSH1 0x0 DUP10 DUP2 MSTORE DUP5 DUP2 KECCAK256 SWAP6 MLOAD PUSH1 0x2 SWAP1 SWAP4 MUL SWAP1 SWAP6 ADD SWAP2 DUP3 SSTORE SWAP2 MLOAD SWAP1 DUP3 ADD SSTORE DUP7 SLOAD DUP7 DUP5 MSTORE DUP2 DUP9 ADD SWAP1 SWAP3 MSTORE SWAP3 SWAP1 SWAP2 KECCAK256 SSTORE PUSH2 0x2AE2 JUMP JUMPDEST DUP3 DUP6 PUSH1 0x0 ADD PUSH1 0x1 DUP4 SUB DUP2 SLOAD DUP2 LT PUSH2 0x354F JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x2 MUL ADD PUSH1 0x1 ADD DUP2 SWAP1 SSTORE POP PUSH1 0x0 SWAP2 POP POP PUSH2 0x2AE2 JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 DUP4 ADD PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 SLOAD DUP1 ISZERO PUSH2 0x3483 JUMPI DUP4 SLOAD PUSH1 0x0 NOT DUP1 DUP4 ADD SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH1 0x0 SWAP1 DUP8 SWAP1 DUP4 SWAP1 DUP2 LT PUSH2 0x35A1 JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x2 MUL ADD SWAP1 POP DUP1 DUP8 PUSH1 0x0 ADD DUP5 DUP2 SLOAD DUP2 LT PUSH2 0x35C1 JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 DUP1 DUP4 KECCAK256 DUP5 SLOAD PUSH1 0x2 SWAP1 SWAP4 MUL ADD SWAP2 DUP3 SSTORE PUSH1 0x1 SWAP4 DUP5 ADD SLOAD SWAP2 DUP5 ADD SWAP2 SWAP1 SWAP2 SSTORE DUP4 SLOAD DUP3 MSTORE DUP10 DUP4 ADD SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SWAP1 DUP5 ADD SWAP1 SSTORE DUP7 SLOAD DUP8 SWAP1 DUP1 PUSH2 0x3600 JUMPI INVALID JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 DUP1 DUP3 KECCAK256 PUSH1 0x2 PUSH1 0x0 NOT SWAP1 SWAP5 ADD SWAP4 DUP5 MUL ADD DUP3 DUP2 SSTORE PUSH1 0x1 SWAP1 DUP2 ADD DUP4 SWAP1 SSTORE SWAP3 SWAP1 SWAP4 SSTORE DUP9 DUP2 MSTORE DUP10 DUP3 ADD SWAP1 SWAP3 MSTORE PUSH1 0x40 DUP3 KECCAK256 SWAP2 SWAP1 SWAP2 SSTORE SWAP5 POP PUSH2 0x10E0 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 JUMPDEST PUSH1 0xA DUP2 LT ISZERO PUSH2 0x3728 JUMPI PUSH1 0x10 DUP2 PUSH1 0xA DUP2 LT PUSH2 0x365D JUMPI INVALID JUMPDEST PUSH1 0x10 SWAP2 DUP3 DUP3 DIV ADD SWAP2 SWAP1 MOD PUSH1 0x2 MUL SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH2 0xFFFF AND PUSH2 0xFFFF AND DUP4 GT PUSH2 0x3720 JUMPI PUSH1 0x11 DUP2 PUSH1 0xA DUP2 LT PUSH2 0x368E JUMPI INVALID JUMPDEST ADD DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x2 PUSH1 0x1 DUP6 AND ISZERO PUSH2 0x100 MUL PUSH1 0x0 NOT ADD SWAP1 SWAP5 AND SWAP4 SWAP1 SWAP4 DIV PUSH1 0x1F DUP2 ADD DUP5 SWAP1 DIV DUP5 MUL DUP3 ADD DUP5 ADD SWAP1 SWAP3 MSTORE DUP2 DUP2 MSTORE SWAP3 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x3713 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x36E8 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x3713 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x36F6 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP SWAP2 POP POP PUSH2 0xD5A JUMP JUMPDEST PUSH1 0x1 ADD PUSH2 0x3647 JUMP JUMPDEST POP SWAP2 SWAP1 POP JUMP JUMPDEST EXTCODESIZE ISZERO ISZERO SWAP1 JUMP JUMPDEST PUSH1 0x60 PUSH2 0x2ADF DUP5 DUP5 PUSH1 0x0 DUP6 PUSH2 0x3792 JUMP JUMPDEST PUSH2 0x374E DUP4 DUP4 DUP4 PUSH2 0xF2E JUMP JUMPDEST PUSH2 0x3756 PUSH2 0x12D2 JUMP JUMPDEST ISZERO PUSH2 0xF2E JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x2B DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3A6C PUSH1 0x2B SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x60 DUP3 SELFBALANCE LT ISZERO PUSH2 0x37D3 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x26 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x3BD5 PUSH1 0x26 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x37DC DUP6 PUSH2 0x372E JUMP JUMPDEST PUSH2 0x382D JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x1D PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x416464726573733A2063616C6C20746F206E6F6E2D636F6E7472616374000000 PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP7 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP6 DUP8 PUSH1 0x40 MLOAD DUP1 DUP3 DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 JUMPDEST PUSH1 0x20 DUP4 LT PUSH2 0x386C JUMPI DUP1 MLOAD DUP3 MSTORE PUSH1 0x1F NOT SWAP1 SWAP3 ADD SWAP2 PUSH1 0x20 SWAP2 DUP3 ADD SWAP2 ADD PUSH2 0x384D JUMP JUMPDEST PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB DUP1 NOT DUP3 MLOAD AND DUP2 DUP5 MLOAD AND DUP1 DUP3 OR DUP6 MSTORE POP POP POP POP POP POP SWAP1 POP ADD SWAP2 POP POP PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 DUP8 GAS CALL SWAP3 POP POP POP RETURNDATASIZE DUP1 PUSH1 0x0 DUP2 EQ PUSH2 0x38CE JUMPI PUSH1 0x40 MLOAD SWAP2 POP PUSH1 0x1F NOT PUSH1 0x3F RETURNDATASIZE ADD AND DUP3 ADD PUSH1 0x40 MSTORE RETURNDATASIZE DUP3 MSTORE RETURNDATASIZE PUSH1 0x0 PUSH1 0x20 DUP5 ADD RETURNDATACOPY PUSH2 0x38D3 JUMP JUMPDEST PUSH1 0x60 SWAP2 POP JUMPDEST POP SWAP2 POP SWAP2 POP PUSH2 0x38E3 DUP3 DUP3 DUP7 PUSH2 0x38EE JUMP JUMPDEST SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x60 DUP4 ISZERO PUSH2 0x38FD JUMPI POP DUP2 PUSH2 0x2AE2 JUMP JUMPDEST DUP3 MLOAD ISZERO PUSH2 0x390D JUMPI DUP3 MLOAD DUP1 DUP5 PUSH1 0x20 ADD REVERT JUMPDEST PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD DUP2 DUP2 MSTORE DUP5 MLOAD PUSH1 0x24 DUP5 ADD MSTORE DUP5 MLOAD DUP6 SWAP4 SWAP2 SWAP3 DUP4 SWAP3 PUSH1 0x44 ADD SWAP2 SWAP1 DUP6 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 DUP4 ISZERO PUSH2 0x310E JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x30F6 JUMP JUMPDEST DUP3 DUP1 SLOAD PUSH1 0x1 DUP2 PUSH1 0x1 AND ISZERO PUSH2 0x100 MUL SUB AND PUSH1 0x2 SWAP1 DIV SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x1F ADD PUSH1 0x20 SWAP1 DIV DUP2 ADD SWAP3 DUP3 PUSH1 0x1F LT PUSH2 0x3995 JUMPI DUP1 MLOAD PUSH1 0xFF NOT AND DUP4 DUP1 ADD OR DUP6 SSTORE PUSH2 0x39C2 JUMP JUMPDEST DUP3 DUP1 ADD PUSH1 0x1 ADD DUP6 SSTORE DUP3 ISZERO PUSH2 0x39C2 JUMPI SWAP2 DUP3 ADD JUMPDEST DUP3 DUP2 GT ISZERO PUSH2 0x39C2 JUMPI DUP3 MLOAD DUP3 SSTORE SWAP2 PUSH1 0x20 ADD SWAP2 SWAP1 PUSH1 0x1 ADD SWAP1 PUSH2 0x39A7 JUMP JUMPDEST POP PUSH2 0x1B14 SWAP3 SWAP2 POP PUSH2 0x3A2F JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST POP DUP1 SLOAD PUSH1 0x1 DUP2 PUSH1 0x1 AND ISZERO PUSH2 0x100 MUL SUB AND PUSH1 0x2 SWAP1 DIV PUSH1 0x0 DUP3 SSTORE DUP1 PUSH1 0x1F LT PUSH2 0x3A15 JUMPI POP PUSH2 0x12B3 JUMP JUMPDEST PUSH1 0x1F ADD PUSH1 0x20 SWAP1 DIV SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 DUP2 ADD SWAP1 PUSH2 0x12B3 SWAP2 SWAP1 JUMPDEST PUSH2 0xDF3 SWAP2 SWAP1 JUMPDEST DUP1 DUP3 GT ISZERO PUSH2 0x1B14 JUMPI PUSH1 0x0 DUP2 SSTORE PUSH1 0x1 ADD PUSH2 0x3A35 JUMP INVALID GASLIMIT PUSH15 0x756D657261626C655365743A20696E PUSH5 0x6578206F75 PUSH21 0x206F6620626F756E64734552433732315061757361 PUSH3 0x6C653A KECCAK256 PUSH21 0x6F6B656E207472616E73666572207768696C652070 PUSH2 0x7573 PUSH6 0x644163636573 PUSH20 0x436F6E74726F6C3A2073656E646572206D757374 KECCAK256 PUSH3 0x652061 PUSH15 0x2061646D696E20746F206772616E74 GASLIMIT MSTORE NUMBER CALLDATACOPY ORIGIN BALANCE GASPRICE KECCAK256 PUSH21 0x72616E7366657220746F206E6F6E20455243373231 MSTORE PUSH6 0x636569766572 KECCAK256 PUSH10 0x6D706C656D656E746572 0x4F PUSH24 0x6E61626C653A206E6577206F776E65722069732074686520 PUSH27 0x65726F2061646472657373516D5764316D6E374475477978394279 PUSH7 0x4E657143736764 MSTORE8 SSTORE PUSH20 0x4A5A316372616769746761796773714476456D47 PUSH6 0x726D696E6174 PUSH10 0x6F6E2073746172747320 ORIGIN ADDRESS ORIGIN BALANCE 0x2D ADDRESS CALLVALUE 0x2D BALANCE ORIGIN SLOAD BALANCE CALLDATASIZE GASPRICE ADDRESS ADDRESS GASPRICE ADDRESS ADDRESS GAS GASLIMIT MSTORE NUMBER CALLDATACOPY ORIGIN BALANCE POP PUSH19 0x657365744D696E746572506175736572417574 PUSH16 0x49643A206D7573742068617665207061 PUSH22 0x73657220726F6C6520746F2070617573654552433732 BALANCE GASPRICE KECCAK256 PUSH21 0x72616E7366657220746F20746865207A65726F2061 PUSH5 0x6472657373 COINBASE PUSH5 0x6472657373 GASPRICE KECCAK256 PUSH10 0x6E73756666696369656E PUSH21 0x2062616C616E636520666F722063616C6C4F6E6C79 KECCAK256 PUSH21 0x6865204F776E65722063616E207761746572206120 NUMBER PUSH19 0x7970744F72636869642E4552433732313A206F PUSH17 0x657261746F7220717565727920666F7220 PUSH15 0x6F6E6578697374656E7420746F6B65 PUSH15 0x416363657373436F6E74726F6C3A20 PUSH20 0x656E646572206D75737420626520616E2061646D PUSH10 0x6E20746F207265766F6B PUSH6 0x455243373231 GASPRICE KECCAK256 PUSH2 0x7070 PUSH19 0x6F76652063616C6C6572206973206E6F74206F PUSH24 0x6E6572206E6F7220617070726F76656420666F7220616C6C GASLIMIT MSTORE NUMBER CALLDATACOPY ORIGIN BALANCE GASPRICE KECCAK256 PUSH3 0x616C61 PUSH15 0x636520717565727920666F72207468 PUSH6 0x207A65726F20 PUSH2 0x6464 PUSH19 0x6573734552433732313A206F776E6572207175 PUSH6 0x727920666F72 KECCAK256 PUSH15 0x6F6E6578697374656E7420746F6B65 PUSH15 0x45746865722076616C75652073656E PUSH21 0x2069732062656C6F7720746865207072696365456E PUSH22 0x6D657261626C654D61703A20696E646578206F757420 PUSH16 0x6620626F756E6473536166654D617468 GASPRICE KECCAK256 PUSH14 0x756C7469706C69636174696F6E20 PUSH16 0x766572666C6F774552433732313A2061 PUSH17 0x70726F76656420717565727920666F7220 PUSH15 0x6F6E6578697374656E7420746F6B65 PUSH15 0x4F776E61626C653A2063616C6C6572 KECCAK256 PUSH10 0x73206E6F742074686520 PUSH16 0x776E65724552433732313A207472616E PUSH20 0x666572206F6620746F6B656E2074686174206973 KECCAK256 PUSH15 0x6F74206F776E596F752063616E2070 PUSH13 0x616E74206D696E696D756D2031 0x2C KECCAK256 PUSH14 0x6178696D756D2032302043727970 PUSH21 0x4F7263686964734552433732313A20617070726F76 PUSH2 0x6C20 PUSH21 0x6F2063757272656E74206F776E6572446561642043 PUSH19 0x7970744F7263686964732063616E6E6F742062 PUSH6 0x207472616E73 PUSH7 0x65727265644552 NUMBER CALLDATACOPY ORIGIN BALANCE GASPRICE KECCAK256 PUSH21 0x72616E736665722063616C6C6572206973206E6F74 KECCAK256 PUSH16 0x776E6572206E6F7220617070726F7665 PUSH5 0x4F6E6C7920 PUSH21 0x6865204F776E65722063616E206765726D696E6174 PUSH6 0x206120437279 PUSH17 0x744F72636869642E455243373231507265 PUSH20 0x65744D696E7465725061757365724175746F4964 GASPRICE KECCAK256 PUSH14 0x7573742068617665206D696E7465 PUSH19 0x20726F6C6520746F206D696E74455243373231 TIMESTAMP PUSH22 0x726E61626C653A2063616C6C6572206973206E6F7420 PUSH16 0x776E6572206E6F7220617070726F7665 PUSH5 0x4552433732 BALANCE POP PUSH19 0x657365744D696E746572506175736572417574 PUSH16 0x49643A206D7573742068617665207061 PUSH22 0x73657220726F6C6520746F20756E7061757365416363 PUSH6 0x7373436F6E74 PUSH19 0x6F6C3A2063616E206F6E6C792072656E6F756E PUSH4 0x6520726F PUSH13 0x657320666F722073656C66A264 PUSH10 0x70667358221220669084 0xC0 CALLDATACOPY 0xE9 0xE2 PUSH20 0xB31D45E8CD7D87FCB21B2D1237DF1DEE094B97B CODECOPY 0x22 SWAP3 PUSH19 0x64736F6C634300060600330000000000000000 ", + "sourceMap": "622:10061:37:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12:1:-1;9;2:12;965:148:8;;5:9:-1;2:2;;;27:1;24;17:12;2:2;965:148:8;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;965:148:8;-1:-1:-1;;;;;;965:148:8;;:::i;:::-;;;;;;;;;;;;;;;;;;4517:98:20;;5:9:-1;2:2;;;27:1;24;17:12;2:2;4517:98:20;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;4517:98:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7222:217;;5:9:-1;2:2;;;27:1;24;17:12;2:2;7222:217:20;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;7222:217:20;;:::i;:::-;;;;-1:-1:-1;;;;;7222:217:20;;;;;;;;;;;;;;6766:395;;5:9:-1;2:2;;;27:1;24;17:12;2:2;6766:395:20;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;;;;;;6766:395:20;;;;;;;;:::i;:::-;;1164:45:37;;5:9:-1;2:2;;;27:1;24;17:12;2:2;1164:45:37;;;:::i;:::-;;;;;;;;;;;;;;;;6260:208:20;;5:9:-1;2:2;;;27:1;24;17:12;2:2;6260:208:20;;;:::i;8379:123:37:-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;8379:123:37;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;8379:123:37;;:::i;8086:300:20:-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;8086:300:20;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;;;;;;8086:300:20;;;;;;;;;;;;;;;;;:::i;4282:112:6:-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;4282:112:6;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;4282:112:6;;:::i;6081:79:37:-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;6081:79:37;;;:::i;4644:223:6:-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;4644:223:6;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;4644:223:6;;;;;;-1:-1:-1;;;;;4644:223:6;;:::i;6029:160:20:-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;6029:160:20;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;;;;;;6029:160:20;;;;;;;;:::i;5818:205:6:-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;5818:205:6;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;5818:205:6;;;;;;-1:-1:-1;;;;;5818:205:6;;:::i;6253:131:37:-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;6253:131:37;;;:::i;3141:182:11:-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;3141:182:11;;;:::i;8452:149:20:-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;8452:149:20;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;;;;;;8452:149:20;;;;;;;;;;;;;;;;;:::i;455:241:21:-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;455:241:21;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;455:241:21;;:::i;6540:169:20:-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;6540:169:20;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;6540:169:20;;:::i;1052:84:32:-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;1052:84:32;;;:::i;9921:392:37:-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;9921:392:37;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;9921:392:37;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;9921:392:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3770:49;;5:9:-1;2:2;;;27:1;24;17:12;2:2;3770:49:37;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;3770:49:37;;:::i;4280:175:20:-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;4280:175:20;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;4280:175:20;;:::i;8256:117:37:-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;8256:117:37;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;8256:117:37;;:::i;2153:400:11:-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;2153:400:11;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;2153:400:11;-1:-1:-1;;;;;2153:400:11;;:::i;1110:48:37:-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;1110:48:37;;;:::i;5855:95:20:-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;5855:95:20;;;:::i;4005:218::-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;4005:218:20;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;4005:218:20;-1:-1:-1;;;;;4005:218:20;;:::i;1717:145:7:-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;1717:145:7;;;:::i;7308:310:37:-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;7308:310:37;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;7308:310:37;;;;;;;:::i;2757:176:11:-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;2757:176:11;;;:::i;1085:85:7:-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;1085:85:7;;;:::i;3965:136:6:-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;3965:136:6;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;3965:136:6;;;;;;;:::i;2950:137::-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;2950:137:6;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;2950:137:6;;;;;;-1:-1:-1;;;;;2950:137:6;;:::i;4679:102:20:-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;4679:102:20;;;:::i;6425:877:37:-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;6425:877:37;;:::i;5165:831::-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;5165:831:37;;;:::i;1727:49:6:-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;1727:49:6;;;:::i;7506:290:20:-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;7506:290:20;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;;;;;;7506:290:20;;;;;;;;;;:::i;9275:640:37:-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;9275:640:37;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;9275:640:37;;:::i;6002:73::-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;6002:73:37;;;:::i;8508:761::-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;8508:761:37;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;8508:761:37;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8667:282:20;;5:9:-1;2:2;;;27:1;24;17:12;2:2;8667:282:20;;;;;;15:3:-1;10;7:12;4:2;;;32:1;29;22:12;4:2;-1:-1;;;;;8667:282:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27:11:-1;11:28;;8:2;;;52:1;49;42:12;8:2;8667:282:20;;41:9:-1;34:4;18:14;14:25;11:40;8:2;;;64:1;61;54:12;8:2;8667:282:20;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;8667:282:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;8667:282:20;;-1:-1:-1;8667:282:20;;-1:-1:-1;;;;;8667:282:20:i;4308:558:37:-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;4308:558:37;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;4308:558:37;;:::i;3255:125:6:-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;3255:125:6;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;3255:125:6;;:::i;925:51:37:-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;925:51:37;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;925:51:37;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;925:51:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1047:62:11;;5:9:-1;2:2;;;27:1;24;17:12;2:2;1047:62:11;;;:::i;5101:226:6:-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;5101:226:6;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;5101:226:6;;;;;;-1:-1:-1;;;;;5101:226:6;;:::i;1115:62:11:-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;1115:62:11;;;:::i;7862:162:20:-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;7862:162:20;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;;;;;;7862:162:20;;;;;;;;;;:::i;2011:240:7:-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;2011:240:7;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;2011:240:7;-1:-1:-1;;;;;2011:240:7;;:::i;1225:47:37:-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;1225:47:37;;;:::i;965:148:8:-;-1:-1:-1;;;;;;1073:33:8;;1050:4;1073:33;;;:20;:33;;;;;;;;965:148;;;;:::o;4517:98:20:-;4603:5;4596:12;;;;;;;;-1:-1:-1;;4596:12:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4571:13;;4596:12;;4603:5;;4596:12;;4603:5;4596:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4517:98;;:::o;7222:217::-;7298:7;7325:16;7333:7;7325;:16::i;:::-;7317:73;;;;-1:-1:-1;;;7317:73:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7408:24:20;;;;:15;:24;;;;;;-1:-1:-1;;;;;7408:24:20;;7222:217::o;6766:395::-;6846:13;6862:23;6877:7;6862:14;:23::i;:::-;6846:39;;6909:5;-1:-1:-1;;;;;6903:11:20;:2;-1:-1:-1;;;;;6903:11:20;;;6895:57;;;;-1:-1:-1;;;6895:57:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6987:5;-1:-1:-1;;;;;6971:21:20;:12;:10;:12::i;:::-;-1:-1:-1;;;;;6971:21:20;;:69;;;;6996:44;7020:5;7027:12;:10;:12::i;:::-;6996:23;:44::i;:::-;6963:159;;;;-1:-1:-1;;;6963:159:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7133:21;7142:2;7146:7;7133:8;:21::i;:::-;6766:395;;;:::o;1164:45:37:-;1203:6;1164:45;:::o;6260:208:20:-;6321:7;6440:21;:12;:19;:21::i;:::-;6433:28;;6260:208;:::o;8379:123:37:-;8436:4;8483:12;8459:20;8471:7;8459:11;:20::i;:::-;:36;;;;;;;;;;8379:123;-1:-1:-1;;8379:123:37:o;8086:300:20:-;8245:41;8264:12;:10;:12::i;:::-;8278:7;8245:18;:41::i;:::-;8237:103;;;;-1:-1:-1;;;8237:103:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8351:28;8361:4;8367:2;8371:7;8351:9;:28::i;4282:112:6:-;4339:7;4365:12;;;;;;;;;;:22;;;;4282:112::o;6081:79:37:-;1308:12:7;:10;:12::i;:::-;-1:-1:-1;;;;;1297:23:7;:7;:5;:7::i;:::-;-1:-1:-1;;;;;1297:23:7;;1289:68;;;;;-1:-1:-1;;;1289:68:7;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1289:68:7;;;;;;;;;;;;;;;6132:14:37::1;:21:::0;;-1:-1:-1;;6132:21:37::1;;;::::0;;6081:79::o;4644:223:6:-;4735:6;:12;;;;;;;;;;:22;;;4727:45;;4759:12;:10;:12::i;:::-;4727:7;:45::i;:::-;4719:105;;;;-1:-1:-1;;;4719:105:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4835:25;4846:4;4852:7;4835:10;:25::i;:::-;4644:223;;:::o;6029:160:20:-;-1:-1:-1;;;;;6152:20:20;;6126:7;6152:20;;;:13;:20;;;;;:30;;6176:5;6152:30;:23;:30;:::i;:::-;6145:37;;6029:160;;;;;:::o;5818:205:6:-;5915:12;:10;:12::i;:::-;-1:-1:-1;;;;;5904:23:6;:7;-1:-1:-1;;;;;5904:23:6;;5896:83;;;;-1:-1:-1;;;5896:83:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5990:26;6002:4;6008:7;5990:11;:26::i;6253:131:37:-;1308:12:7;:10;:12::i;:::-;-1:-1:-1;;;;;1297:23:7;:7;:5;:7::i;:::-;-1:-1:-1;;;;;1297:23:7;;1289:68;;;;;-1:-1:-1;;;1289:68:7;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1289:68:7;;;;;;;;;;;;;;;6349:28:37::1;::::0;6318:21:::1;::::0;6349:10:::1;::::0;:28;::::1;;;::::0;6318:21;;6300:15:::1;6349:28:::0;6300:15;6349:28;6318:21;6349:10;:28;::::1;;;;;;;8:9:-1;5:2;;;45:16;42:1;39::::0;24:38:::1;77:16;74:1;67:27;3141:182:11::0;1153:24;;;-1:-1:-1;;;1153:24:11;;;;;;;;;;;;3193:34;;3214:12;:10;:12::i;3193:34::-;3185:111;;;;-1:-1:-1;;;3185:111:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3306:10;:8;:10::i;:::-;3141:182::o;8452:149:20:-;8555:39;8572:4;8578:2;8582:7;8555:39;;;;;;;;;;;;:16;:39::i;455:241:21:-;571:41;590:12;:10;:12::i;571:41::-;563:102;;;;-1:-1:-1;;;563:102:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;675:14;681:7;675:5;:14::i;:::-;455:241;:::o;6540:169:20:-;6615:7;;6656:22;:12;6672:5;6656:22;:15;:22;:::i;:::-;-1:-1:-1;6634:44:20;6540:169;-1:-1:-1;;;6540:169:20:o;1052:84:32:-;1122:7;;;;1052:84;:::o;9921:392:37:-;10049:7;10142:21;;;:12;:21;;;;;10185:31;;;;10230:32;;;;10022:13;;10049:7;;;;;10276:20;10155:7;10276:11;:20::i;:::-;10121:185;;;;;;;;-1:-1:-1;;10121:185:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9921:392;;;;;:::o;3770:49::-;;;;;;;;;;;;;:::o;4280:175:20:-;4352:7;4378:70;4395:7;4378:70;;;;;;;;;;;;;;;;;:12;;:70;;:16;:70;:::i;8256:117:37:-;8309:4;8356:10;8332:20;8344:7;8332:11;:20::i;:::-;:34;;;;;;;;;;;8256:117;-1:-1:-1;;8256:117:37:o;2153:400:11:-;1085:24;;;-1:-1:-1;;;1085:24:11;;;;;;;;;;;;2212:34;;2233:12;:10;:12::i;2212:34::-;2204:108;;;;-1:-1:-1;;;2204:108:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2473:36;2479:2;2483:25;:15;:23;:25::i;:::-;2473:5;:36::i;:::-;2519:27;:15;:25;:27::i;1110:48:37:-;1153:5;1110:48;:::o;5855:95:20:-;5935:8;5928:15;;;;;;;;-1:-1:-1;;5928:15:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5903:13;;5928:15;;5935:8;;5928:15;;5935:8;5928:15;;;;;;;;;;;;;;;;;;;;;;;;4005:218;4077:7;-1:-1:-1;;;;;4104:19:20;;4096:74;;;;-1:-1:-1;;;4096:74:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;4187:20:20;;;;;;:13;:20;;;;;:29;;:27;:29::i;1717:145:7:-;1308:12;:10;:12::i;:::-;-1:-1:-1;;;;;1297:23:7;:7;:5;:7::i;:::-;-1:-1:-1;;;;;1297:23:7;;1289:68;;;;;-1:-1:-1;;;1289:68:7;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1289:68:7;;;;;;;;;;;;;;;1807:6:::1;::::0;1786:40:::1;::::0;1823:1:::1;::::0;-1:-1:-1;;;;;1807:6:7::1;::::0;1786:40:::1;::::0;1823:1;;1786:40:::1;1836:6;:19:::0;;-1:-1:-1;;;;;;1836:19:7::1;::::0;;1717:145::o;7308:310:37:-;7395:14;;;;;;;7387:66;;;;-1:-1:-1;;;7387:66:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7471:41;7490:12;:10;:12::i;:::-;7504:7;7471:18;:41::i;:::-;7463:97;;;;-1:-1:-1;;;7463:97:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7570:41;7585:7;7594:16;7570:14;:41::i;2757:176:11:-;1153:24;;;-1:-1:-1;;;1153:24:11;;;;;;;;;;;;2807:34;;2828:12;:10;:12::i;2807:34::-;2799:109;;;;-1:-1:-1;;;2799:109:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2918:8;:6;:8::i;1085:85:7:-;1157:6;;-1:-1:-1;;;;;1157:6:7;1085:85;:::o;3965:136:6:-;4038:7;4064:12;;;;;;;;;;:30;;4088:5;4064:30;:23;:30;:::i;2950:137::-;3019:4;3042:12;;;;;;;;;;:38;;3072:7;3042:38;:29;:38;:::i;4679:102:20:-;4767:7;4760:14;;;;;;;;-1:-1:-1;;4760:14:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4735:13;;4760:14;;4767:7;;4760:14;;4767:7;4760:14;;;;;;;;;;;;;;;;;;;;;;;;6425:877:37;6490:11;;;;6482:45;;;;;-1:-1:-1;;;6482:45:37;;;;;;;;;;;;-1:-1:-1;;;6482:45:37;;;;;;;;;;;;;;;6573:13;:11;:13::i;:::-;1153:5;6554:32;6545:5;:41;;6537:75;;;;;-1:-1:-1;;;6537:75:37;;;;;;;;;;;;-1:-1:-1;;;6537:75:37;;;;;;;;;;;;;;;1153:5;6630:13;:11;:13::i;:::-;:32;6622:67;;;;;-1:-1:-1;;;6622:67:37;;;;;;;;;;;;-1:-1:-1;;;6622:67:37;;;;;;;;;;;;;;;6715:1;6707:5;:9;:24;;;;;6729:2;6720:5;:11;;6707:24;6699:85;;;;-1:-1:-1;;;6699:85:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1153:5;6802:34;6815:13;:11;:13::i;:::-;6830:5;6802:12;:34::i;:::-;:54;;6794:91;;;;;-1:-1:-1;;;6794:91:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;6916:35;6929:14;:12;:14::i;:::-;6945:5;6916:12;:35::i;:::-;6903:9;:48;;6895:96;;;;-1:-1:-1;;;6895:96:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7007:9;7002:294;7026:5;7022:1;:9;7002:294;;;7052:21;:9;:19;:21::i;:::-;7087:17;7107:19;:9;:17;:19::i;:::-;7166:73;;;;;;;;;;;;;;;-1:-1:-1;;;7166:73:37;;;;;;-1:-1:-1;;7166:73:37;;;;;;;;-1:-1:-1;7166:73:37;;;;;;7140:23;;;:12;:23;;;;;;:99;;;;7087:39;;-1:-1:-1;7166:73:37;;7140:23;;:99;;:23;;:99;;;;:::i;:::-;-1:-1:-1;7140:99:37;;;;;;;;;;;;;;;;;;7253:32;7263:10;7275:9;7253;:32::i;:::-;-1:-1:-1;7033:3:37;;7002:294;;5165:831;5210:13;5235:21;5259:13;:11;:13::i;:::-;5235:37;;5303:4;5286:13;:21;5282:708;;5330:19;5323:26;;;;;5282:708;5406:4;5389:13;:21;5385:605;;5433:18;5426:25;;;;;5385:605;5513:4;5496:13;:21;5492:498;;5540:18;5533:25;;;;;5492:498;5620:4;5603:13;:21;5599:391;;5647:18;5640:25;;;;;5599:391;5727:4;5710:13;:21;5706:284;;5754:17;5747:24;;;;;5706:284;5833:3;5816:13;:20;5812:178;;5859:17;5852:24;;;;;5812:178;5938:17;5931:24;;;;;5812:178;5165:831;;:::o;1727:49:6:-;1772:4;1727:49;:::o;7506:290:20:-;7620:12;:10;:12::i;:::-;-1:-1:-1;;;;;7608:24:20;:8;-1:-1:-1;;;;;7608:24:20;;;7600:62;;;;;-1:-1:-1;;;7600:62:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;7718:8;7673:18;:32;7692:12;:10;:12::i;:::-;-1:-1:-1;;;;;7673:32:20;;;;;;;;;;;;;;;;;-1:-1:-1;7673:32:20;;;:42;;;;;;;;;;;;:53;;-1:-1:-1;;7673:53:20;;;;;;;;;;;7756:12;:10;:12::i;:::-;7741:48;;;;;;;;;;-1:-1:-1;;;;;7741:48:20;;;;;;;;;;;;;;7506:290;;:::o;9275:640:37:-;9332:41;9351:12;:10;:12::i;9332:41::-;9324:93;;;;-1:-1:-1;;;9324:93:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9433:14;9439:7;9433:5;:14::i;:::-;9428:52;;9463:7;;9428:52;9490:26;9519:21;;;:12;:21;;;;;9575:17;;;;9636:16;;;;9519:21;;9575:17;;9620:13;:11;:13::i;:::-;:32;9602:50;;9662:18;9683:44;9704:7;1203:6;9683:12;:44::i;:::-;9662:65;;9758:10;9742:13;:26;9738:63;;;9784:7;;;;;;9738:63;9811:21;9835:30;9848:13;9863:1;9835:12;:30::i;:::-;9875:17;;;;:33;;;;-1:-1:-1;;;;9275:640:37;:::o;6002:73::-;1308:12:7;:10;:12::i;:::-;-1:-1:-1;;;;;1297:23:7;:7;:5;:7::i;:::-;-1:-1:-1;;;;;1297:23:7;;1289:68;;;;;-1:-1:-1;;;1289:68:7;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1289:68:7;;;;;;;;;;;;;;;6050:11:37::1;:18:::0;;-1:-1:-1;;6050:18:37::1;6064:4;6050:18;::::0;;6002:73::o;8508:761::-;8567:5;8584:25;;:::i;:::-;8612:21;;;;:12;:21;;;;;;;;;8584:49;;;;;;;;;;;-1:-1:-1;;8584:49:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8612:21;;8584:49;;8612:21;;8584:49;;;8612:21;8584:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8647:6;:16;;;8667:1;8647:21;8643:46;;;8677:12;8670:19;;;;;8643:46;-1:-1:-1;;8703:6:37;:16;;;:33;8699:56;;;8745:10;8738:17;;;;;8699:56;8793:17;;;;8854:16;;;;8765:25;;8838:13;:11;:13::i;:::-;:32;8820:50;;8880:18;8901:44;8922:7;1203:6;8901:12;:44::i;:::-;8880:65;;8955:14;8972:35;8985:7;1203:6;8972:12;:35::i;:::-;8955:52;;9043:10;9022:17;:31;9018:81;;;9076:12;9069:19;;;;;;;;;9018:81;9151:10;9113:34;9126:17;9145:1;9113:12;:34::i;:::-;:48;:76;;;;;1267:5;9165:6;:24;9113:76;9109:126;;;9212:12;9205:19;;;;;;;;;9109:126;-1:-1:-1;9252:10:37;;8508:761;-1:-1:-1;;;;;;8508:761:37:o;8667:282:20:-;8798:41;8817:12;:10;:12::i;8798:41::-;8790:103;;;;-1:-1:-1;;;8790:103:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8903:39;8917:4;8923:2;8927:7;8936:5;8903:13;:39::i;:::-;8667:282;;;;:::o;4308:558:37:-;4381:13;4407:21;4438:25;4455:7;4438:16;:25::i;:::-;-1:-1:-1;4406:57:37;;-1:-1:-1;4502:10:37;;-1:-1:-1;4478:34:37;;-1:-1:-1;4478:34:37;;:20;4490:7;4478:11;:20::i;:::-;:34;;;;;;;;;4474:120;;;4559:9;:7;:9::i;:::-;4570:11;;;;;;;;;;;;;;;;;4542:40;;;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;4542:40:37;;;;;;;;;;-1:-1:-1;4542:40:37;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;4542:40:37;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;4542:40:37;;;4528:55;;;;;4474:120;4632:12;4608:20;4620:7;4608:11;:20::i;:::-;:36;;;;;;;;;4604:154;;;4691:9;:7;:9::i;:::-;4702:11;:43;4735:7;4724:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;4724:19:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;4724:19:37;;;4714:30;;;;;;4702:43;;;;;;;;;;;4674:72;;;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;4674:72:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;4674:72:37;;;4660:87;;;;;4604:154;4799:9;:7;:9::i;:::-;4810:15;:47;4847:7;4836:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;4836:19:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;4836:19:37;;;4826:30;;;;;;4810:47;;;;;;;;;;;4782:76;;;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;4782:76:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;4782:76:37;;;-1:-1:-1;;26:21;;;22:32;6:49;;4782:76:37;;;;4308:558;-1:-1:-1;;;;;;4308:558:37:o;3255:125:6:-;3318:7;3344:12;;;;;;;;;;:29;;:27;:29::i;925:51:37:-;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;925:51:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;1047:62:11:-;1085:24;;;-1:-1:-1;;;1085:24:11;;;;;;;;;;;;1047:62;:::o;5101:226:6:-;5193:6;:12;;;;;;;;;;:22;;;5185:45;;5217:12;:10;:12::i;5185:45::-;5177:106;;;;-1:-1:-1;;;5177:106:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1115:62:11;1153:24;;;-1:-1:-1;;;1153:24:11;;;;;;;;;;;;1115:62;:::o;7862:162:20:-;-1:-1:-1;;;;;7982:25:20;;;7959:4;7982:25;;;:18;:25;;;;;;;;:35;;;;;;;;;;;;;;;7862:162::o;2011:240:7:-;1308:12;:10;:12::i;:::-;-1:-1:-1;;;;;1297:23:7;:7;:5;:7::i;:::-;-1:-1:-1;;;;;1297:23:7;;1289:68;;;;;-1:-1:-1;;;1289:68:7;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1289:68:7;;;;;;;;;;;;;;;-1:-1:-1;;;;;2099:22:7;::::1;2091:73;;;;-1:-1:-1::0;;;2091:73:7::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2200:6;::::0;2179:38:::1;::::0;-1:-1:-1;;;;;2179:38:7;;::::1;::::0;2200:6:::1;::::0;2179:38:::1;::::0;2200:6:::1;::::0;2179:38:::1;2227:6;:17:::0;;-1:-1:-1;;;;;;2227:17:7::1;-1:-1:-1::0;;;;;2227:17:7;;;::::1;::::0;;;::::1;::::0;;2011:240::o;1225:47:37:-;1267:5;1225:47;:::o;10383:125:20:-;10448:4;10471:30;:12;10493:7;10471:30;:21;:30;:::i;598:104:28:-;685:10;598:104;:::o;16225:189:20:-;16299:24;;;;:15;:24;;;;;:29;;-1:-1:-1;;;;;;16299:29:20;-1:-1:-1;;;;;16299:29:20;;;;;;;;:24;;16352:23;16299:24;16352:14;:23::i;:::-;-1:-1:-1;;;;;16343:46:20;;;;;;;;;;;16225:189;;:::o;7820:121:30:-;7889:7;7915:19;7923:3;7915:7;:19::i;10666:351:20:-;10759:4;10783:16;10791:7;10783;:16::i;:::-;10775:73;;;;-1:-1:-1;;;10775:73:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10858:13;10874:23;10889:7;10874:14;:23::i;:::-;10858:39;;10926:5;-1:-1:-1;;;;;10915:16:20;:7;-1:-1:-1;;;;;10915:16:20;;:51;;;;10959:7;-1:-1:-1;;;;;10935:31:20;:20;10947:7;10935:11;:20::i;:::-;-1:-1:-1;;;;;10935:31:20;;10915:51;:94;;;;10970:39;10994:5;11001:7;10970:23;:39::i;:::-;10907:103;10666:351;-1:-1:-1;;;;10666:351:20:o;13707:584::-;13831:4;-1:-1:-1;;;;;13804:31:20;:23;13819:7;13804:14;:23::i;:::-;-1:-1:-1;;;;;13804:31:20;;13796:85;;;;-1:-1:-1;;;13796:85:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;13917:16:20;;13909:65;;;;-1:-1:-1;;;13909:65:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13985:39;14006:4;14012:2;14016:7;13985:20;:39::i;:::-;14086:29;14103:1;14107:7;14086:8;:29::i;:::-;-1:-1:-1;;;;;14126:19:20;;;;;;:13;:19;;;;;:35;;14153:7;14126:35;:26;:35;:::i;:::-;-1:-1:-1;;;;;;14171:17:20;;;;;;:13;:17;;;;;:30;;14193:7;14171:30;:21;:30;:::i;:::-;-1:-1:-1;14212:29:20;:12;14229:7;14238:2;14212:29;:16;:29;:::i;:::-;;14276:7;14272:2;-1:-1:-1;;;;;14257:27:20;14266:4;-1:-1:-1;;;;;14257:27:20;;;;;;;;;;;13707:584;;;:::o;7025:184:6:-;7098:6;:12;;;;;;;;;;:33;;7123:7;7098:33;:24;:33;:::i;:::-;7094:109;;;7179:12;:10;:12::i;:::-;-1:-1:-1;;;;;7152:40:6;7170:7;-1:-1:-1;;;;;7152:40:6;7164:4;7152:40;;;;;;;;;;7025:184;;:::o;9250:135:31:-;9321:7;9355:22;9359:3;9371:5;9355:3;:22::i;7215:188:6:-;7289:6;:12;;;;;;;;;;:36;;7317:7;7289:36;:27;:36;:::i;:::-;7285:112;;;7373:12;:10;:12::i;:::-;-1:-1:-1;;;;;7346:40:6;7364:7;-1:-1:-1;;;;;7346:40:6;7358:4;7346:40;;;;;;;;;;7215:188;;:::o;2064:117:32:-;1631:8;:6;:8::i;:::-;1623:41;;;;;-1:-1:-1;;;1623:41:32;;;;;;;;;;;;-1:-1:-1;;;1623:41:32;;;;;;;;;;;;;;;2122:7:::1;:15:::0;;-1:-1:-1;;2122:15:32::1;::::0;;2152:22:::1;2161:12;:10;:12::i;:::-;2152:22;::::0;;-1:-1:-1;;;;;2152:22:32;;::::1;::::0;;;;;;;::::1;::::0;;::::1;2064:117::o:0;12856:527:20:-;12915:13;12931:23;12946:7;12931:14;:23::i;:::-;12915:39;;12983:48;13004:5;13019:1;13023:7;12983:20;:48::i;:::-;13069:29;13086:1;13090:7;13069:8;:29::i;:::-;13154:19;;;;:10;:19;;;;;13148:33;;-1:-1:-1;;13148:33:20;;;;;;;;;;;:38;13144:95;;13209:19;;;;:10;:19;;;;;13202:26;;;:::i;:::-;-1:-1:-1;;;;;13249:20:20;;;;;;:13;:20;;;;;:36;;13277:7;13249:36;:27;:36;:::i;:::-;-1:-1:-1;13296:28:20;:12;13316:7;13296:28;:19;:28;:::i;:::-;-1:-1:-1;13340:36:20;;13368:7;;13364:1;;-1:-1:-1;;;;;13340:36:20;;;;;13364:1;;13340:36;12856:527;;:::o;8269:233:30:-;8349:7;;;;8408:22;8412:3;8424:5;8408:3;:22::i;:::-;8377:53;;;;-1:-1:-1;8269:233:30;-1:-1:-1;;;;;8269:233:30:o;9522:211::-;9629:7;9679:44;9684:3;9704;9710:12;9679:4;:44::i;:::-;9671:53;-1:-1:-1;9522:211:30;;;;;;:::o;1106:112:29:-;1197:14;;1106:112::o;12246:393:20:-;-1:-1:-1;;;;;12325:16:20;;12317:61;;;;;-1:-1:-1;;;12317:61:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12397:16;12405:7;12397;:16::i;:::-;12396:17;12388:58;;;;;-1:-1:-1;;;12388:58:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;12457:45;12486:1;12490:2;12494:7;12457:20;:45::i;:::-;-1:-1:-1;;;;;12513:17:20;;;;;;:13;:17;;;;;:30;;12535:7;12513:30;:21;:30;:::i;:::-;-1:-1:-1;12554:29:20;:12;12571:7;12580:2;12554:29;:16;:29;:::i;:::-;-1:-1:-1;12599:33:20;;12624:7;;-1:-1:-1;;;;;12599:33:20;;;12616:1;;12599:33;;12616:1;;12599:33;12246:393;;:::o;1224:178:29:-;1376:19;;1394:1;1376:19;;;1224:178::o;7624:279:37:-;7777:69;;;7794:15;7777:69;;;;;;;;7811:16;7777:69;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;7777:69:37;;;;;;;7767:80;;;;;7709:17;;7858:38;7876:7;7767:80;7858:17;:38::i;:::-;7624:279;;;;;:::o;1817:115:32:-;1366:8;:6;:8::i;:::-;1365:9;1357:38;;;;;-1:-1:-1;;;1357:38:32;;;;;;;;;;;;-1:-1:-1;;;1357:38:32;;;;;;;;;;;;;;;1876:7:::1;:14:::0;;-1:-1:-1;;1876:14:32::1;1886:4;1876:14;::::0;;1905:20:::1;1912:12;:10;:12::i;6984:165:31:-:0;7064:4;7087:55;7097:3;-1:-1:-1;;;;;7117:23:31;;7087:9;:55::i;2690:175:10:-;2748:7;2779:5;;;2802:6;;;;2794:46;;;;;-1:-1:-1;;;2794:46:10;;;;;;;;;;;;;;;;;;;;;;;;;;;3538:215;3596:7;3619:6;3615:20;;-1:-1:-1;3634:1:10;3627:8;;3615:20;3657:5;;;3661:1;3657;:5;:1;3680:5;;;;;:10;3672:56;;;;-1:-1:-1;;;3672:56:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11348:108:20;11423:26;11433:2;11437:7;11423:26;;;;;;;;;;;;:9;:26::i;93:102:39:-;173:15;93:102;:::o;4217:150:10:-;4275:7;4306:1;4302;:5;4294:44;;;;;-1:-1:-1;;;4294:44:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;4359:1;4355;:5;;;;;;;4217:150;-1:-1:-1;;;4217:150:10:o;4820:148::-;4878:7;4909:1;4905;:5;4897:42;;;;;-1:-1:-1;;;4897:42:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;4960:1;4956;:5;;;;;;;4820:148;-1:-1:-1;;;4820:148:10:o;9811:269:20:-;9924:28;9934:4;9940:2;9944:7;9924:9;:28::i;:::-;9970:48;9993:4;9999:2;10003:7;10012:5;9970:22;:48::i;:::-;9962:111;;;;-1:-1:-1;;;9962:111:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7588:149:30;7672:4;7695:35;7705:3;7725;7695:9;:35::i;4872:287:37:-;-1:-1:-1;;;;;5019:16:37;;;;:34;;;5039:14;5045:7;5039:5;:14::i;:::-;5011:86;;;;-1:-1:-1;;;5011:86:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5107:45;5134:4;5140:2;5144:7;5107:26;:45::i;8365:135:31:-;8435:4;8458:35;8466:3;8486:5;8458:7;:35::i;8068:129::-;8135:4;8158:32;8163:3;8183:5;8158:4;:32::i;7027:183:30:-;7116:4;7139:64;7144:3;7164;-1:-1:-1;;;;;7178:23:30;;7139:4;:64::i;6429:150:31:-;6499:4;6522:50;6527:3;-1:-1:-1;;;;;6547:23:31;;6522:4;:50::i;4452:201::-;4546:18;;4519:7;;4546:26;-1:-1:-1;4538:73:31;;;;-1:-1:-1;;;4538:73:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4628:3;:11;;4640:5;4628:18;;;;;;;;;;;;;;;;4621:25;;4452:201;;;;:::o;6747:156::-;6820:4;6843:53;6851:3;-1:-1:-1;;;;;6871:23:31;;6843:7;:53::i;7369:140:30:-;7446:4;7469:33;7477:3;7497;7469:7;:33::i;4942:274::-;5045:19;;5009:7;;;;5045:27;-1:-1:-1;5037:74:30;;;;-1:-1:-1;;;5037:74:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5122:22;5147:3;:12;;5160:5;5147:19;;;;;;;;;;;;;;;;;;5122:44;;5184:5;:10;;;5196:5;:12;;;5176:33;;;;;4942:274;;;;;:::o;6403:315::-;6497:7;6535:17;;;:12;;;:17;;;;;;6585:12;6570:13;6562:36;;;;-1:-1:-1;;;6562:36:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;6562:36:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6651:3;:12;;6675:1;6664:8;:12;6651:26;;;;;;;;;;;;;;;;;;:33;;;6644:40;;;6403:315;;;;;:::o;7909:341:37:-;7992:26;8021:21;;;:12;:21;;;;;8052;8076:44;8088:31;8101:10;8113:5;8088:12;:31::i;:::-;8076:11;:44::i;:::-;8130:24;;8052:68;;-1:-1:-1;8130:24:37;;:6;;:24;;;;;:::i;:::-;;8183:13;:11;:13::i;:::-;8164:16;;;:32;8206:18;8227:16;8235:7;8227;:16::i;:::-;-1:-1:-1;;;;;;7909:341:37:o;3805:127:31:-;3878:4;3901:19;;;:12;;;;;:19;;;;;;:24;;;3805:127::o;11677:247:20:-;11772:18;11778:2;11782:7;11772:5;:18::i;:::-;11808:54;11839:1;11843:2;11847:7;11856:5;11808:22;:54::i;:::-;11800:117;;;;-1:-1:-1;;;11800:117:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15524:589;15644:4;15669:15;:2;-1:-1:-1;;;;;15669:13:20;;:15::i;:::-;15664:58;;-1:-1:-1;15707:4:20;15700:11;;15664:58;15731:23;15757:246;-1:-1:-1;;;15868:12:20;:10;:12::i;:::-;15894:4;15912:7;15933:5;15773:175;;;;;;-1:-1:-1;;;;;15773:175:20;-1:-1:-1;;;;;15773:175:20;;;;;;-1:-1:-1;;;;;15773:175:20;-1:-1:-1;;;;;15773:175:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;15773:175:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;15773:175:20;;;;-1:-1:-1;;;;;15773:175:20;;38:4:-1;29:7;25:18;67:10;61:17;-1:-1;;;;;199:8;192:4;186;182:15;179:29;167:10;160:49;0:215;;;15773:175:20;15757:246;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;15757:15:20;;;:246;;:15;:246;:::i;:::-;15731:272;;16013:13;16040:10;16029:32;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;16029:32:20;-1:-1:-1;;;;;;16079:26:20;-1:-1:-1;;;16079:26:20;;-1:-1:-1;;;15524:589:20;;;;;;:::o;3329:185:11:-;3462:45;3489:4;3495:2;3499:7;3462:26;:45::i;2212:1512:31:-;2278:4;2415:19;;;:12;;;:19;;;;;;2449:15;;2445:1273;;2878:18;;-1:-1:-1;;2830:14:31;;;;2878:22;;;;2806:21;;2878:3;;:22;;3160;;;;;;;;;;;;;;3140:42;;3303:9;3274:3;:11;;3286:13;3274:26;;;;;;;;;;;;;;;;;;;:38;;;;3378:23;;;3420:1;3378:12;;;:23;;;;;;3404:17;;;3378:43;;3527:17;;3378:3;;3527:17;;;;;;;;;;;;;;;;;;;;;;3619:3;:12;;:19;3632:5;3619:19;;;;;;;;;;;3612:26;;;3660:4;3653:11;;;;;;;;2445:1273;3702:5;3695:12;;;;;1640:404;1703:4;1724:21;1734:3;1739:5;1724:9;:21::i;:::-;1719:319;;-1:-1:-1;27:10;;39:1;23:18;;;45:23;;1761:11:31;:23;;;;;;;;;;;;;1941:18;;1919:19;;;:12;;;:19;;;;;;:40;;;;1973:11;;1719:319;-1:-1:-1;2022:5:31;2015:12;;1836:678:30;1912:4;2045:17;;;:12;;;:17;;;;;;2077:13;2073:435;;-1:-1:-1;;2161:38:30;;;;;;;;;;;;;;;;;;27:10:-1;;39:1;23:18;;;45:23;;2143:12:30;:57;;;;;;;;;;;;;;;;;;;;;;;;2355:19;;2335:17;;;:12;;;:17;;;;;;;:39;2388:11;;2073:435;2466:5;2430:3;:12;;2454:1;2443:8;:12;2430:26;;;;;;;;;;;;;;;;;;:33;;:41;;;;2492:5;2485:12;;;;;2682:1517;2746:4;2879:17;;;:12;;;:17;;;;;;2911:13;;2907:1286;;3337:19;;-1:-1:-1;;3291:12:30;;;;3337:23;;;;3267:21;;3337:3;;:23;;3629;;;;;;;;;;;;;;;;3600:52;;3774:9;3744:3;:12;;3757:13;3744:27;;;;;;;;;;;;;;;;:39;;:27;;;;;:39;;;;;;;;;;;;;;;3862:14;;3849:28;;:12;;;:28;;;;;3880:17;;;3849:48;;4003:18;;3849:3;;4003:18;;;;;;;;;;;;;;-1:-1:-1;;4003:18:30;;;;;;;;;;;;;;;;;;;;;4096:17;;;:12;;;:17;;;;;;4089:24;;;;4003:18;-1:-1:-1;4128:11:30;;-1:-1:-1;;;;4128:11:30;10451:230:37;10515:13;10545:9;10540:135;10564:2;10560:1;:6;10540:135;;;10606:6;10613:1;10606:9;;;;;;;;;;;;;;;;;;;;;;;;;;;10591:24;;:11;:24;10587:78;;10642:5;10648:1;10642:8;;;;;;;;10635:15;;;;;;;;;;;;;-1:-1:-1;;10635:15:37;;;;;;;;;;;;;;;;;;;;;;;;;;;10642:8;10635:15;;10642:8;10635:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10587:78;10568:3;;10540:135;;;;10451:230;;;:::o;726:413:27:-;1086:20;1124:8;;;726:413::o;3581:193::-;3684:12;3715:52;3737:6;3745:4;3751:1;3754:12;3715:21;:52::i;595:237:22:-;704:45;731:4;737:2;741:7;704:26;:45::i;:::-;769:8;:6;:8::i;:::-;768:9;760:65;;;;-1:-1:-1;;;760:65:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4608:523:27;4735:12;4792:5;4767:21;:30;;4759:81;;;;-1:-1:-1;;;4759:81:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4858:18;4869:6;4858:10;:18::i;:::-;4850:60;;;;;-1:-1:-1;;;4850:60:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;4981:12;4995:23;5022:6;-1:-1:-1;;;;;5022:11:27;5042:5;5050:4;5022:33;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;5022:33:27;;;;;;;;;;;;;;;;;;;;;;;;;12:1:-1;19;14:27;;;;67:4;61:11;56:16;;134:4;130:9;123:4;105:16;101:27;97:43;94:1;90:51;84:4;77:65;157:16;154:1;147:27;211:16;208:1;201:4;198:1;194:12;179:49;5:228;;14:27;32:4;27:9;;5:228;;4980:75:27;;;;5072:52;5090:7;5099:10;5111:12;5072:17;:52::i;:::-;5065:59;4608:523;-1:-1:-1;;;;;;;4608:523:27:o;7091:725::-;7206:12;7234:7;7230:580;;;-1:-1:-1;7264:10:27;7257:17;;7230:580;7375:17;;:21;7371:429;;7633:10;7627:17;7693:15;7680:10;7676:2;7672:19;7665:44;7582:145;7765:20;;-1:-1:-1;;;7765:20:27;;;;;;;;;;;;;;;;;7772:12;;7765:20;;;;;;;;;;;;;;;27:10:-1;;8:100;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;622:10061:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;622:10061:37;;;-1:-1:-1;622:10061:37;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;" + }, + "gasEstimates": { + "creation": { + "codeDepositCost": "3265800", + "executionCost": "infinite", + "totalCost": "infinite" + }, + "external": { + "DEFAULT_ADMIN_ROLE()": "309", + "GROWTH_CYCLE()": "333", + "MAX_CRYPTORCHIDS()": "331", + "MINTER_ROLE()": "371", + "PAUSER_ROLE()": "348", + "WATERING_WINDOW()": "330", + "alive(uint256)": "infinite", + "approve(address,uint256)": "infinite", + "balanceOf(address)": "infinite", + "baseURI()": "infinite", + "burn(uint256)": "infinite", + "cryptorchids(uint256)": "infinite", + "currentPrice()": "1360", + "flowering(uint256)": "infinite", + "germinate(uint256,uint256)": "infinite", + "getApproved(uint256)": "infinite", + "getRoleAdmin(bytes32)": "1205", + "getRoleMember(bytes32,uint256)": "infinite", + "getRoleMemberCount(bytes32)": "infinite", + "getTokenMetadata(uint256)": "infinite", + "grantRole(bytes32,address)": "infinite", + "growthStage(uint256)": "infinite", + "hasRole(bytes32,address)": "infinite", + "isApprovedForAll(address,address)": "1350", + "mint(address)": "infinite", + "name()": "infinite", + "owner()": "1193", + "ownerOf(uint256)": "infinite", + "pause()": "infinite", + "paused()": "1078", + "renounceOwnership()": "infinite", + "renounceRole(bytes32,address)": "infinite", + "requestToToken(bytes32)": "1218", + "revokeRole(bytes32,address)": "infinite", + "safeTransferFrom(address,address,uint256)": "infinite", + "safeTransferFrom(address,address,uint256,bytes)": "infinite", + "setApprovalForAll(address,bool)": "infinite", + "startGrowing()": "infinite", + "startSale()": "infinite", + "supportsInterface(bytes4)": "1216", + "symbol()": "infinite", + "tokenByIndex(uint256)": "infinite", + "tokenOfOwnerByIndex(address,uint256)": "infinite", + "tokenURI(uint256)": "infinite", + "totalSupply()": "1230", + "transferFrom(address,address,uint256)": "infinite", + "transferOwnership(address)": "infinite", + "unpause()": "infinite", + "water(uint256)": "infinite", + "webMint(uint256)": "infinite", + "withdraw()": "infinite" + }, + "internal": { + "_beforeTokenTransfer(address,address,uint256)": "infinite", + "_requestRandom(uint256,uint256)": "infinite", + "fulfillRandomness(uint256,uint256)": "infinite", + "pickSpecies(uint256)": "infinite" + } + }, + "methodIdentifiers": { + "DEFAULT_ADMIN_ROLE()": "a217fddf", + "GROWTH_CYCLE()": "179f0b0a", + "MAX_CRYPTORCHIDS()": "6b0c004d", + "MINTER_ROLE()": "d5391393", + "PAUSER_ROLE()": "e63ab1e9", + "WATERING_WINDOW()": "ffee200c", + "alive(uint256)": "6573c787", + "approve(address,uint256)": "095ea7b3", + "balanceOf(address)": "70a08231", + "baseURI()": "6c0360eb", + "burn(uint256)": "42966c68", + "cryptorchids(uint256)": "cac21c8f", + "currentPrice()": "9d1b464a", + "flowering(uint256)": "182199cd", + "germinate(uint256,uint256)": "7fd8d953", + "getApproved(uint256)": "081812fc", + "getRoleAdmin(bytes32)": "248a9ca3", + "getRoleMember(bytes32,uint256)": "9010d07c", + "getRoleMemberCount(bytes32)": "ca15c873", + "getTokenMetadata(uint256)": "60316801", + "grantRole(bytes32,address)": "2f2ff15d", + "growthStage(uint256)": "b7aaba20", + "hasRole(bytes32,address)": "91d14854", + "isApprovedForAll(address,address)": "e985e9c5", + "mint(address)": "6a627842", + "name()": "06fdde03", + "owner()": "8da5cb5b", + "ownerOf(uint256)": "6352211e", + "pause()": "8456cb59", + "paused()": "5c975abb", + "renounceOwnership()": "715018a6", + "renounceRole(bytes32,address)": "36568abe", + "requestToToken(bytes32)": "62ff09d6", + "revokeRole(bytes32,address)": "d547741f", + "safeTransferFrom(address,address,uint256)": "42842e0e", + "safeTransferFrom(address,address,uint256,bytes)": "b88d4fde", + "setApprovalForAll(address,bool)": "a22cb465", + "startGrowing()": "277dec92", + "startSale()": "b66a0e5d", + "supportsInterface(bytes4)": "01ffc9a7", + "symbol()": "95d89b41", + "tokenByIndex(uint256)": "4f6ccce7", + "tokenOfOwnerByIndex(address,uint256)": "2f745c59", + "tokenURI(uint256)": "c87b56dd", + "totalSupply()": "18160ddd", + "transferFrom(address,address,uint256)": "23b872dd", + "transferOwnership(address)": "f2fde38b", + "unpause()": "3f4ba83a", + "water(uint256)": "a7eec44b", + "webMint(uint256)": "9981d4a1", + "withdraw()": "3ccfd60b" + } + }, + "metadata": "{\"compiler\":{\"version\":\"0.6.6+commit.6c089d02\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"approved\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":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\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GROWTH_CYCLE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_CRYPTORCHIDS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINTER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PAUSER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WATERING_WINDOW\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"alive\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"baseURI\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"cryptorchids\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"species\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"plantedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"waterLevel\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"price\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"flowering\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"userProvidedSeed\",\"type\":\"uint256\"}],\"name\":\"germinate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getApproved\",\"outputs\":[{\"internalType\":\"address\",\"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\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getTokenMetadata\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"enum CryptOrchidGoerli.Stage\",\"name\":\"\",\"type\":\"uint8\"}],\"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\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"growthStage\",\"outputs\":[{\"internalType\":\"enum CryptOrchidGoerli.Stage\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"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\":[],\"name\":\"renounceOwnership\",\"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\":\"\",\"type\":\"bytes32\"}],\"name\":\"requestToToken\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"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\":\"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\":[],\"name\":\"startGrowing\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startSale\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"tokenByIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"tokenOfOwnerByIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"tokenURI\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"water\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"units\",\"type\":\"uint256\"}],\"name\":\"webMint\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"methods\":{\"approve(address,uint256)\":{\"details\":\"See {IERC721-approve}.\"},\"balanceOf(address)\":{\"details\":\"See {IERC721-balanceOf}.\"},\"baseURI()\":{\"details\":\"Returns the base URI set via {_setBaseURI}. This will be automatically added as a prefix in {tokenURI} to each token's URI, or to the token ID if no specific URI is set for that token ID.\"},\"burn(uint256)\":{\"details\":\"Burns `tokenId`. See {ERC721-_burn}. * Requirements: * - The caller must own `tokenId` or be an approved operator.\"},\"getApproved(uint256)\":{\"details\":\"See {IERC721-getApproved}.\"},\"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.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"isApprovedForAll(address,address)\":{\"details\":\"See {IERC721-isApprovedForAll}.\"},\"mint(address)\":{\"details\":\"Creates a new token for `to`. Its token ID will be automatically assigned (and available on the emitted {IERC721-Transfer} event), and the token URI autogenerated based on the base URI passed at construction. * See {ERC721-_mint}. * Requirements: * - the caller must have the `MINTER_ROLE`.\"},\"name()\":{\"details\":\"See {IERC721Metadata-name}.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"ownerOf(uint256)\":{\"details\":\"See {IERC721-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.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. * NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"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 granted `role`, emits a {RoleRevoked} event. * Requirements: * - the caller must be `account`.\"},\"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.\"},\"safeTransferFrom(address,address,uint256)\":{\"details\":\"See {IERC721-safeTransferFrom}.\"},\"safeTransferFrom(address,address,uint256,bytes)\":{\"details\":\"See {IERC721-safeTransferFrom}.\"},\"setApprovalForAll(address,bool)\":{\"details\":\"See {IERC721-setApprovalForAll}.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}. * Time complexity O(1), guaranteed to always use less than 30 000 gas.\"},\"symbol()\":{\"details\":\"See {IERC721Metadata-symbol}.\"},\"tokenByIndex(uint256)\":{\"details\":\"See {IERC721Enumerable-tokenByIndex}.\"},\"tokenOfOwnerByIndex(address,uint256)\":{\"details\":\"See {IERC721Enumerable-tokenOfOwnerByIndex}.\"},\"totalSupply()\":{\"details\":\"See {IERC721Enumerable-totalSupply}.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC721-transferFrom}.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"unpause()\":{\"details\":\"Unpauses all token transfers. * See {ERC721Pausable} and {Pausable-_unpause}. * Requirements: * - the caller must have the `PAUSER_ROLE`.\"},\"withdraw()\":{\"details\":\"Withdraw ether from this contract (Callable by owner only)\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol\":\"CryptOrchidGoerli\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/AccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../utils/EnumerableSet.sol\\\";\\nimport \\\"../utils/Address.sol\\\";\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms.\\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 * ```\\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 * ```\\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.\\n */\\nabstract contract AccessControl is Context {\\n using EnumerableSet for EnumerableSet.AddressSet;\\n using Address for address;\\n\\n struct RoleData {\\n EnumerableSet.AddressSet 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 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 {_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) public view returns (bool) {\\n return _roles[role].members.contains(account);\\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 returns (uint256) {\\n return _roles[role].members.length();\\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 returns (address) {\\n return _roles[role].members.at(index);\\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 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 function grantRole(bytes32 role, address account) public virtual {\\n require(hasRole(_roles[role].adminRole, _msgSender()), \\\"AccessControl: sender must be an admin to grant\\\");\\n\\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 function revokeRole(bytes32 role, address account) public virtual {\\n require(hasRole(_roles[role].adminRole, _msgSender()), \\\"AccessControl: sender must be an admin to revoke\\\");\\n\\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 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) public virtual {\\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 * [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 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 emit RoleAdminChanged(role, _roles[role].adminRole, adminRole);\\n _roles[role].adminRole = adminRole;\\n }\\n\\n function _grantRole(bytes32 role, address account) private {\\n if (_roles[role].members.add(account)) {\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (_roles[role].members.remove(account)) {\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n}\\n\",\"keccak256\":\"0x4fc155a2f7837603d69a13cfa481eb5e7f5e02cb77e2ec9edbac30986db37988\"},\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor () internal {\\n address msgSender = _msgSender();\\n _owner = msgSender;\\n emit OwnershipTransferred(address(0), msgSender);\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n emit OwnershipTransferred(_owner, address(0));\\n _owner = address(0);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n emit OwnershipTransferred(_owner, newOwner);\\n _owner = newOwner;\\n }\\n}\\n\",\"keccak256\":\"0x15e2d5bd4c28a88548074c54d220e8086f638a71ed07e6b3ba5a70066fcf458d\"},\"@openzeppelin/contracts/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts may inherit from this and call {_registerInterface} to declare\\n * their support of an interface.\\n */\\nabstract contract ERC165 is IERC165 {\\n /*\\n * bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7\\n */\\n bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7;\\n\\n /**\\n * @dev Mapping of interface ids to whether or not it's supported.\\n */\\n mapping(bytes4 => bool) private _supportedInterfaces;\\n\\n constructor () internal {\\n // Derived contracts need only register support for their own interfaces,\\n // we register support for ERC165 itself here\\n _registerInterface(_INTERFACE_ID_ERC165);\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n *\\n * Time complexity O(1), guaranteed to always use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return _supportedInterfaces[interfaceId];\\n }\\n\\n /**\\n * @dev Registers the contract as an implementer of the interface defined by\\n * `interfaceId`. Support of the actual ERC165 interface is automatic and\\n * registering its interface id is not required.\\n *\\n * See {IERC165-supportsInterface}.\\n *\\n * Requirements:\\n *\\n * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`).\\n */\\n function _registerInterface(bytes4 interfaceId) internal virtual {\\n require(interfaceId != 0xffffffff, \\\"ERC165: invalid interface id\\\");\\n _supportedInterfaces[interfaceId] = true;\\n }\\n}\\n\",\"keccak256\":\"0x24141d2f6b98d4cb77a8936eae8cbaad2e261d9062bdc08036096f4550092501\"},\"@openzeppelin/contracts/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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\":\"0xf70bc25d981e4ec9673a995ad2995d5d493ea188d3d8f388bba9c227ce09fb82\"},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\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 uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction 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 if (b > a) return (false, 0);\\n return (true, a - b);\\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 // 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 * @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 if (b == 0) return (false, 0);\\n return (true, a / b);\\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 if (b == 0) return (false, 0);\\n return (true, a % b);\\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 uint256 c = a + b;\\n require(c >= a, \\\"SafeMath: addition overflow\\\");\\n return c;\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\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 if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\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. 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) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\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 require(b > 0, \\\"SafeMath: modulo by zero\\\");\\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 require(b <= a, errorMessage);\\n return a - b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\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 require(b > 0, errorMessage);\\n return a / b;\\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 require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\"},\"@openzeppelin/contracts/presets/ERC721PresetMinterPauserAutoId.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../access/AccessControl.sol\\\";\\nimport \\\"../utils/Context.sol\\\";\\nimport \\\"../utils/Counters.sol\\\";\\nimport \\\"../token/ERC721/ERC721.sol\\\";\\nimport \\\"../token/ERC721/ERC721Burnable.sol\\\";\\nimport \\\"../token/ERC721/ERC721Pausable.sol\\\";\\n\\n/**\\n * @dev {ERC721} token, including:\\n *\\n * - ability for holders to burn (destroy) their tokens\\n * - a minter role that allows for token minting (creation)\\n * - a pauser role that allows to stop all token transfers\\n * - token ID and URI autogeneration\\n *\\n * This contract uses {AccessControl} to lock permissioned functions using the\\n * different roles - head to its documentation for details.\\n *\\n * The account that deploys the contract will be granted the minter and pauser\\n * roles, as well as the default admin role, which will let it grant both minter\\n * and pauser roles to other accounts.\\n */\\ncontract ERC721PresetMinterPauserAutoId is Context, AccessControl, ERC721Burnable, ERC721Pausable {\\n using Counters for Counters.Counter;\\n\\n bytes32 public constant MINTER_ROLE = keccak256(\\\"MINTER_ROLE\\\");\\n bytes32 public constant PAUSER_ROLE = keccak256(\\\"PAUSER_ROLE\\\");\\n\\n Counters.Counter private _tokenIdTracker;\\n\\n /**\\n * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE` and `PAUSER_ROLE` to the\\n * account that deploys the contract.\\n *\\n * Token URIs will be autogenerated based on `baseURI` and their token IDs.\\n * See {ERC721-tokenURI}.\\n */\\n constructor(string memory name, string memory symbol, string memory baseURI) public ERC721(name, symbol) {\\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\\n\\n _setupRole(MINTER_ROLE, _msgSender());\\n _setupRole(PAUSER_ROLE, _msgSender());\\n\\n _setBaseURI(baseURI);\\n }\\n\\n /**\\n * @dev Creates a new token for `to`. Its token ID will be automatically\\n * assigned (and available on the emitted {IERC721-Transfer} event), and the token\\n * URI autogenerated based on the base URI passed at construction.\\n *\\n * See {ERC721-_mint}.\\n *\\n * Requirements:\\n *\\n * - the caller must have the `MINTER_ROLE`.\\n */\\n function mint(address to) public virtual {\\n require(hasRole(MINTER_ROLE, _msgSender()), \\\"ERC721PresetMinterPauserAutoId: must have minter role to mint\\\");\\n\\n // We cannot just use balanceOf to create the new tokenId because tokens\\n // can be burned (destroyed), so we need a separate counter.\\n _mint(to, _tokenIdTracker.current());\\n _tokenIdTracker.increment();\\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() public virtual {\\n require(hasRole(PAUSER_ROLE, _msgSender()), \\\"ERC721PresetMinterPauserAutoId: must have pauser role to pause\\\");\\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() public virtual {\\n require(hasRole(PAUSER_ROLE, _msgSender()), \\\"ERC721PresetMinterPauserAutoId: must have pauser role to unpause\\\");\\n _unpause();\\n }\\n\\n function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override(ERC721, ERC721Pausable) {\\n super._beforeTokenTransfer(from, to, tokenId);\\n }\\n}\\n\",\"keccak256\":\"0x4b87b14833eeb61239208c31ea10bd73fdcd49a693c87f038b9429871f82a412\"},\"@openzeppelin/contracts/token/ERC721/ERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC721.sol\\\";\\nimport \\\"./IERC721Metadata.sol\\\";\\nimport \\\"./IERC721Enumerable.sol\\\";\\nimport \\\"./IERC721Receiver.sol\\\";\\nimport \\\"../../introspection/ERC165.sol\\\";\\nimport \\\"../../math/SafeMath.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/EnumerableSet.sol\\\";\\nimport \\\"../../utils/EnumerableMap.sol\\\";\\nimport \\\"../../utils/Strings.sol\\\";\\n\\n/**\\n * @title ERC721 Non-Fungible Token Standard basic implementation\\n * @dev see https://eips.ethereum.org/EIPS/eip-721\\n */\\ncontract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {\\n using SafeMath for uint256;\\n using Address for address;\\n using EnumerableSet for EnumerableSet.UintSet;\\n using EnumerableMap for EnumerableMap.UintToAddressMap;\\n using Strings for uint256;\\n\\n // Equals to `bytes4(keccak256(\\\"onERC721Received(address,address,uint256,bytes)\\\"))`\\n // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector`\\n bytes4 private constant _ERC721_RECEIVED = 0x150b7a02;\\n\\n // Mapping from holder address to their (enumerable) set of owned tokens\\n mapping (address => EnumerableSet.UintSet) private _holderTokens;\\n\\n // Enumerable mapping from token ids to their owners\\n EnumerableMap.UintToAddressMap private _tokenOwners;\\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 // Token name\\n string private _name;\\n\\n // Token symbol\\n string private _symbol;\\n\\n // Optional mapping for token URIs\\n mapping (uint256 => string) private _tokenURIs;\\n\\n // Base URI\\n string private _baseURI;\\n\\n /*\\n * bytes4(keccak256('balanceOf(address)')) == 0x70a08231\\n * bytes4(keccak256('ownerOf(uint256)')) == 0x6352211e\\n * bytes4(keccak256('approve(address,uint256)')) == 0x095ea7b3\\n * bytes4(keccak256('getApproved(uint256)')) == 0x081812fc\\n * bytes4(keccak256('setApprovalForAll(address,bool)')) == 0xa22cb465\\n * bytes4(keccak256('isApprovedForAll(address,address)')) == 0xe985e9c5\\n * bytes4(keccak256('transferFrom(address,address,uint256)')) == 0x23b872dd\\n * bytes4(keccak256('safeTransferFrom(address,address,uint256)')) == 0x42842e0e\\n * bytes4(keccak256('safeTransferFrom(address,address,uint256,bytes)')) == 0xb88d4fde\\n *\\n * => 0x70a08231 ^ 0x6352211e ^ 0x095ea7b3 ^ 0x081812fc ^\\n * 0xa22cb465 ^ 0xe985e9c5 ^ 0x23b872dd ^ 0x42842e0e ^ 0xb88d4fde == 0x80ac58cd\\n */\\n bytes4 private constant _INTERFACE_ID_ERC721 = 0x80ac58cd;\\n\\n /*\\n * bytes4(keccak256('name()')) == 0x06fdde03\\n * bytes4(keccak256('symbol()')) == 0x95d89b41\\n * bytes4(keccak256('tokenURI(uint256)')) == 0xc87b56dd\\n *\\n * => 0x06fdde03 ^ 0x95d89b41 ^ 0xc87b56dd == 0x5b5e139f\\n */\\n bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x5b5e139f;\\n\\n /*\\n * bytes4(keccak256('totalSupply()')) == 0x18160ddd\\n * bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) == 0x2f745c59\\n * bytes4(keccak256('tokenByIndex(uint256)')) == 0x4f6ccce7\\n *\\n * => 0x18160ddd ^ 0x2f745c59 ^ 0x4f6ccce7 == 0x780e9d63\\n */\\n bytes4 private constant _INTERFACE_ID_ERC721_ENUMERABLE = 0x780e9d63;\\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_) public {\\n _name = name_;\\n _symbol = symbol_;\\n\\n // register the supported interfaces to conform to ERC721 via ERC165\\n _registerInterface(_INTERFACE_ID_ERC721);\\n _registerInterface(_INTERFACE_ID_ERC721_METADATA);\\n _registerInterface(_INTERFACE_ID_ERC721_ENUMERABLE);\\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: balance query for the zero address\\\");\\n return _holderTokens[owner].length();\\n }\\n\\n /**\\n * @dev See {IERC721-ownerOf}.\\n */\\n function ownerOf(uint256 tokenId) public view virtual override returns (address) {\\n return _tokenOwners.get(tokenId, \\\"ERC721: owner query for nonexistent token\\\");\\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 require(_exists(tokenId), \\\"ERC721Metadata: URI query for nonexistent token\\\");\\n\\n string memory _tokenURI = _tokenURIs[tokenId];\\n string memory base = baseURI();\\n\\n // If there is no base URI, return the token URI.\\n if (bytes(base).length == 0) {\\n return _tokenURI;\\n }\\n // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked).\\n if (bytes(_tokenURI).length > 0) {\\n return string(abi.encodePacked(base, _tokenURI));\\n }\\n // If there is a baseURI but no tokenURI, concatenate the tokenID to the baseURI.\\n return string(abi.encodePacked(base, tokenId.toString()));\\n }\\n\\n /**\\n * @dev Returns the base URI set via {_setBaseURI}. This will be\\n * automatically added as a prefix in {tokenURI} to each token's URI, or\\n * to the token ID if no specific URI is set for that token ID.\\n */\\n function baseURI() public view virtual returns (string memory) {\\n return _baseURI;\\n }\\n\\n /**\\n * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.\\n */\\n function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {\\n return _holderTokens[owner].at(index);\\n }\\n\\n /**\\n * @dev See {IERC721Enumerable-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n // _tokenOwners are indexed by tokenIds, so .length() returns the number of tokenIds\\n return _tokenOwners.length();\\n }\\n\\n /**\\n * @dev See {IERC721Enumerable-tokenByIndex}.\\n */\\n function tokenByIndex(uint256 index) public view virtual override returns (uint256) {\\n (uint256 tokenId, ) = _tokenOwners.at(index);\\n return tokenId;\\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(_msgSender() == owner || ERC721.isApprovedForAll(owner, _msgSender()),\\n \\\"ERC721: approve caller is not owner nor 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 require(_exists(tokenId), \\\"ERC721: approved query for nonexistent token\\\");\\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 require(operator != _msgSender(), \\\"ERC721: approve to caller\\\");\\n\\n _operatorApprovals[_msgSender()][operator] = approved;\\n emit ApprovalForAll(_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: transfer caller is not owner nor 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: transfer caller is not owner nor 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 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 _tokenOwners.contains(tokenId);\\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 require(_exists(tokenId), \\\"ERC721: operator query for nonexistent token\\\");\\n address owner = ERC721.ownerOf(tokenId);\\n return (spender == owner || getApproved(tokenId) == spender || ERC721.isApprovedForAll(owner, spender));\\n }\\n\\n /**\\n * @dev Safely mints `tokenId` and transfers it to `to`.\\n *\\n * Requirements:\\n d*\\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(_checkOnERC721Received(address(0), to, tokenId, _data), \\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\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);\\n\\n _holderTokens[to].add(tokenId);\\n\\n _tokenOwners.set(tokenId, to);\\n\\n emit Transfer(address(0), to, tokenId);\\n }\\n\\n /**\\n * @dev Destroys `tokenId`.\\n * The approval is cleared when the token is burned.\\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); // internal owner\\n\\n _beforeTokenTransfer(owner, address(0), tokenId);\\n\\n // Clear approvals\\n _approve(address(0), tokenId);\\n\\n // Clear metadata (if any)\\n if (bytes(_tokenURIs[tokenId]).length != 0) {\\n delete _tokenURIs[tokenId];\\n }\\n\\n _holderTokens[owner].remove(tokenId);\\n\\n _tokenOwners.remove(tokenId);\\n\\n emit Transfer(owner, address(0), tokenId);\\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 of token that is not own\\\"); // internal owner\\n require(to != address(0), \\\"ERC721: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, tokenId);\\n\\n // Clear approvals from the previous owner\\n _approve(address(0), tokenId);\\n\\n _holderTokens[from].remove(tokenId);\\n _holderTokens[to].add(tokenId);\\n\\n _tokenOwners.set(tokenId, to);\\n\\n emit Transfer(from, to, tokenId);\\n }\\n\\n /**\\n * @dev Sets `_tokenURI` as the tokenURI of `tokenId`.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual {\\n require(_exists(tokenId), \\\"ERC721Metadata: URI set of nonexistent token\\\");\\n _tokenURIs[tokenId] = _tokenURI;\\n }\\n\\n /**\\n * @dev Internal function to set the base URI for all token IDs. It is\\n * automatically added as a prefix to the value returned in {tokenURI},\\n * or to the token ID if {tokenURI} is empty.\\n */\\n function _setBaseURI(string memory baseURI_) internal virtual {\\n _baseURI = baseURI_;\\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(address from, address to, uint256 tokenId, bytes memory _data)\\n private returns (bool)\\n {\\n if (!to.isContract()) {\\n return true;\\n }\\n bytes memory returndata = to.functionCall(abi.encodeWithSelector(\\n IERC721Receiver(to).onERC721Received.selector,\\n _msgSender(),\\n from,\\n tokenId,\\n _data\\n ), \\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n bytes4 retval = abi.decode(returndata, (bytes4));\\n return (retval == _ERC721_RECEIVED);\\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); // internal owner\\n }\\n\\n /**\\n * @dev Hook that is called before any token transfer. This includes minting\\n * and burning.\\n *\\n * Calling conditions:\\n *\\n * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be\\n * transferred to `to`.\\n * - When `from` is zero, `tokenId` will be minted for `to`.\\n * - When `to` is zero, ``from``'s `tokenId` will be burned.\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\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 tokenId) internal virtual { }\\n}\\n\",\"keccak256\":\"0x118ed7540f56b21ff92e21ebaa73584048e98d2ac04ca67571329bb8dbd9032f\"},\"@openzeppelin/contracts/token/ERC721/ERC721Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./ERC721.sol\\\";\\n\\n/**\\n * @title ERC721 Burnable Token\\n * @dev ERC721 Token that can be irreversibly 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), \\\"ERC721Burnable: caller is not owner nor approved\\\");\\n _burn(tokenId);\\n }\\n}\\n\",\"keccak256\":\"0x060925a04766df64ac29f56aaa3a38aafd71424ba4d996ca0f14363828b97056\"},\"@openzeppelin/contracts/token/ERC721/ERC721Pausable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./ERC721.sol\\\";\\nimport \\\"../../utils/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 */\\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(address from, address to, uint256 tokenId) internal virtual override {\\n super._beforeTokenTransfer(from, to, tokenId);\\n\\n require(!paused(), \\\"ERC721Pausable: token transfer while paused\\\");\\n }\\n}\\n\",\"keccak256\":\"0x1c31a4c2ad1af9e25cd8f4ea941ebd6a6a932426183ab39c160cb8e51cfc704f\"},\"@openzeppelin/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\nimport \\\"../../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`, 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 be 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: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\\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 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 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 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 /**\\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\",\"keccak256\":\"0x2d99a0deb6648c34fbc66d6ac4a2d64798d7a5321b45624f6736fadc63da1962\"},\"@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <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 /**\\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 tokenId);\\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\":\"0xe6bd1b1218338b6f9fe17776f48623b4ac3d8a40405f74a44bc23c00abe2ca13\"},\"@openzeppelin/contracts/token/ERC721/IERC721Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <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 /**\\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\":\"0xccb917776f826ac6b68bd5a15a5f711e3967848a52ba11e6104d9a4f593314a7\"},\"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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 `IERC721.onERC721Received.selector`.\\n */\\n function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0x52146049d6709c870e8ddcd988b5155cb6c5d640cfcd8978aee52bc1ba2ec4eb\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\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 */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n // solhint-disable-next-line no-inline-assembly\\n assembly { size := extcodesize(account) }\\n return size > 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://diligence.consensys.net/posts/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.5.11/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 // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\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 functionCall(target, data, \\\"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(address target, bytes memory data, string memory errorMessage) 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(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.call{ value: value }(data);\\n return _verifyCallResult(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(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(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(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\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\\n // solhint-disable-next-line no-inline-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}\\n\",\"keccak256\":\"0x28911e614500ae7c607a432a709d35da25f3bc5ddc8bd12b278b66358070c0ea\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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 GSN 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 payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\"},\"@openzeppelin/contracts/utils/Counters.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../math/SafeMath.sol\\\";\\n\\n/**\\n * @title Counters\\n * @author Matt Condon (@shrugs)\\n * @dev Provides counters that can only be incremented or decremented by one. This can be used e.g. to track the number\\n * of elements in a mapping, issuing ERC721 ids, or counting request ids.\\n *\\n * Include with `using Counters for Counters.Counter;`\\n * Since it is not possible to overflow a 256 bit integer with increments of one, `increment` can skip the {SafeMath}\\n * overflow check, thereby saving gas. This does assume however correct usage, in that the underlying `_value` is never\\n * directly accessed.\\n */\\nlibrary Counters {\\n using SafeMath for uint256;\\n\\n struct Counter {\\n // This variable should never be directly accessed by users of the library: interactions must be restricted to\\n // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\\n // this feature: see https://github.com/ethereum/solidity/issues/4637\\n uint256 _value; // default: 0\\n }\\n\\n function current(Counter storage counter) internal view returns (uint256) {\\n return counter._value;\\n }\\n\\n function increment(Counter storage counter) internal {\\n // The {SafeMath} overflow check can be skipped here, see the comment at the top\\n counter._value += 1;\\n }\\n\\n function decrement(Counter storage counter) internal {\\n counter._value = counter._value.sub(1);\\n }\\n}\\n\",\"keccak256\":\"0x21662e4254ce4ac8570b30cc7ab31435966b3cb778a56ba4d09276881cfb2437\"},\"@openzeppelin/contracts/utils/EnumerableMap.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Library for managing an enumerable variant of Solidity's\\n * https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]\\n * type.\\n *\\n * Maps have the following properties:\\n *\\n * - Entries are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Entries are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableMap for EnumerableMap.UintToAddressMap;\\n *\\n * // Declare a set state variable\\n * EnumerableMap.UintToAddressMap private myMap;\\n * }\\n * ```\\n *\\n * As of v3.0.0, only maps of type `uint256 -> address` (`UintToAddressMap`) are\\n * supported.\\n */\\nlibrary EnumerableMap {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Map type with\\n // bytes32 keys and values.\\n // The Map implementation uses private functions, and user-facing\\n // implementations (such as Uint256ToAddressMap) are just wrappers around\\n // the underlying Map.\\n // This means that we can only create new EnumerableMaps for types that fit\\n // in bytes32.\\n\\n struct MapEntry {\\n bytes32 _key;\\n bytes32 _value;\\n }\\n\\n struct Map {\\n // Storage of map keys and values\\n MapEntry[] _entries;\\n\\n // Position of the entry defined by a key in the `entries` array, plus 1\\n // because index 0 means a key is not in the map.\\n mapping (bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Adds a key-value pair to a map, or updates the value for an existing\\n * key. O(1).\\n *\\n * Returns true if the key was added to the map, that is if it was not\\n * already present.\\n */\\n function _set(Map storage map, bytes32 key, bytes32 value) private returns (bool) {\\n // We read and store the key's index to prevent multiple reads from the same storage slot\\n uint256 keyIndex = map._indexes[key];\\n\\n if (keyIndex == 0) { // Equivalent to !contains(map, key)\\n map._entries.push(MapEntry({ _key: key, _value: value }));\\n // The entry is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n map._indexes[key] = map._entries.length;\\n return true;\\n } else {\\n map._entries[keyIndex - 1]._value = value;\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a key-value pair from a map. O(1).\\n *\\n * Returns true if the key was removed from the map, that is if it was present.\\n */\\n function _remove(Map storage map, bytes32 key) private returns (bool) {\\n // We read and store the key's index to prevent multiple reads from the same storage slot\\n uint256 keyIndex = map._indexes[key];\\n\\n if (keyIndex != 0) { // Equivalent to contains(map, key)\\n // To delete a key-value pair from the _entries array in O(1), we swap the entry to delete with the last one\\n // in the array, and then remove the last entry (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = keyIndex - 1;\\n uint256 lastIndex = map._entries.length - 1;\\n\\n // When the entry to delete is the last one, the swap operation is unnecessary. However, since this occurs\\n // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\\n\\n MapEntry storage lastEntry = map._entries[lastIndex];\\n\\n // Move the last entry to the index where the entry to delete is\\n map._entries[toDeleteIndex] = lastEntry;\\n // Update the index for the moved entry\\n map._indexes[lastEntry._key] = toDeleteIndex + 1; // All indexes are 1-based\\n\\n // Delete the slot where the moved entry was stored\\n map._entries.pop();\\n\\n // Delete the index for the deleted slot\\n delete map._indexes[key];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the key is in the map. O(1).\\n */\\n function _contains(Map storage map, bytes32 key) private view returns (bool) {\\n return map._indexes[key] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of key-value pairs in the map. O(1).\\n */\\n function _length(Map storage map) private view returns (uint256) {\\n return map._entries.length;\\n }\\n\\n /**\\n * @dev Returns the key-value pair stored at position `index` in the map. O(1).\\n *\\n * Note that there are no guarantees on the ordering of entries inside the\\n * array, and it may change when more entries are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Map storage map, uint256 index) private view returns (bytes32, bytes32) {\\n require(map._entries.length > index, \\\"EnumerableMap: index out of bounds\\\");\\n\\n MapEntry storage entry = map._entries[index];\\n return (entry._key, entry._value);\\n }\\n\\n /**\\n * @dev Tries to returns the value associated with `key`. O(1).\\n * Does not revert if `key` is not in the map.\\n */\\n function _tryGet(Map storage map, bytes32 key) private view returns (bool, bytes32) {\\n uint256 keyIndex = map._indexes[key];\\n if (keyIndex == 0) return (false, 0); // Equivalent to contains(map, key)\\n return (true, map._entries[keyIndex - 1]._value); // All indexes are 1-based\\n }\\n\\n /**\\n * @dev Returns the value associated with `key`. O(1).\\n *\\n * Requirements:\\n *\\n * - `key` must be in the map.\\n */\\n function _get(Map storage map, bytes32 key) private view returns (bytes32) {\\n uint256 keyIndex = map._indexes[key];\\n require(keyIndex != 0, \\\"EnumerableMap: nonexistent key\\\"); // Equivalent to contains(map, key)\\n return map._entries[keyIndex - 1]._value; // All indexes are 1-based\\n }\\n\\n /**\\n * @dev Same as {_get}, with a custom error message when `key` is not in the map.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {_tryGet}.\\n */\\n function _get(Map storage map, bytes32 key, string memory errorMessage) private view returns (bytes32) {\\n uint256 keyIndex = map._indexes[key];\\n require(keyIndex != 0, errorMessage); // Equivalent to contains(map, key)\\n return map._entries[keyIndex - 1]._value; // All indexes are 1-based\\n }\\n\\n // UintToAddressMap\\n\\n struct UintToAddressMap {\\n Map _inner;\\n }\\n\\n /**\\n * @dev Adds a key-value pair to a map, or updates the value for an existing\\n * key. O(1).\\n *\\n * Returns true if the key was added to the map, that is if it was not\\n * already present.\\n */\\n function set(UintToAddressMap storage map, uint256 key, address value) internal returns (bool) {\\n return _set(map._inner, bytes32(key), bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the key was removed from the map, that is if it was present.\\n */\\n function remove(UintToAddressMap storage map, uint256 key) internal returns (bool) {\\n return _remove(map._inner, bytes32(key));\\n }\\n\\n /**\\n * @dev Returns true if the key is in the map. O(1).\\n */\\n function contains(UintToAddressMap storage map, uint256 key) internal view returns (bool) {\\n return _contains(map._inner, bytes32(key));\\n }\\n\\n /**\\n * @dev Returns the number of elements in the map. O(1).\\n */\\n function length(UintToAddressMap storage map) internal view returns (uint256) {\\n return _length(map._inner);\\n }\\n\\n /**\\n * @dev Returns the element stored at position `index` in the set. O(1).\\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(UintToAddressMap storage map, uint256 index) internal view returns (uint256, address) {\\n (bytes32 key, bytes32 value) = _at(map._inner, index);\\n return (uint256(key), address(uint160(uint256(value))));\\n }\\n\\n /**\\n * @dev Tries to returns the value associated with `key`. O(1).\\n * Does not revert if `key` is not in the map.\\n *\\n * _Available since v3.4._\\n */\\n function tryGet(UintToAddressMap storage map, uint256 key) internal view returns (bool, address) {\\n (bool success, bytes32 value) = _tryGet(map._inner, bytes32(key));\\n return (success, address(uint160(uint256(value))));\\n }\\n\\n /**\\n * @dev Returns the value associated with `key`. O(1).\\n *\\n * Requirements:\\n *\\n * - `key` must be in the map.\\n */\\n function get(UintToAddressMap storage map, uint256 key) internal view returns (address) {\\n return address(uint160(uint256(_get(map._inner, bytes32(key)))));\\n }\\n\\n /**\\n * @dev Same as {get}, with a custom error message when `key` is not in the map.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryGet}.\\n */\\n function get(UintToAddressMap storage map, uint256 key, string memory errorMessage) internal view returns (address) {\\n return address(uint160(uint256(_get(map._inner, bytes32(key), errorMessage))));\\n }\\n}\\n\",\"keccak256\":\"0x4b087f06b6670a131a5a14e53b1d2a5ef19c034cc5ec42eeebcf9554325744ad\"},\"@openzeppelin/contracts/utils/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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 * ```\\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 */\\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\\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) { // 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 // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs\\n // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\\n\\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] = toDeleteIndex + 1; // All indexes are 1-based\\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 require(set._values.length > index, \\\"EnumerableSet: index out of bounds\\\");\\n return set._values[index];\\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 // 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 // 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 on 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\",\"keccak256\":\"0x1562cd9922fbf739edfb979f506809e2743789cbde3177515542161c3d04b164\"},\"@openzeppelin/contracts/utils/Pausable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./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 () internal {\\n _paused = false;\\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 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 require(!paused(), \\\"Pausable: paused\\\");\\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 require(paused(), \\\"Pausable: not paused\\\");\\n _;\\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\":\"0x212fb1b1d4beaf74354dad9bc329f44ee3c5375ef1c32acff76b4ecefc10f1d8\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n uint256 index = digits - 1;\\n temp = value;\\n while (temp != 0) {\\n buffer[index--] = bytes1(uint8(48 + temp % 10));\\n temp /= 10;\\n }\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0xa1e12f97981f1d0964b1c048978606a57127c56c438bab61cdfe269cad859a74\"},\"contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n// NB: this is only meant to deploy to goerli, where chainlink VRF is unavailable.\\n// goerli connects to polygon mumbai, which is what we need to test PoS bridging.\\n// Deploy scripts prevent other contracts from goerli deploy, and this contract from\\n// anything other than goerlui\\npragma solidity >=0.6.6 <0.9.0;\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"@openzeppelin/contracts/math/SafeMath.sol\\\";\\nimport \\\"@openzeppelin/contracts/presets/ERC721PresetMinterPauserAutoId.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/Counters.sol\\\";\\nimport \\\"../Libraries/CurrentTime.sol\\\";\\n\\ncontract CryptOrchidGoerli is ERC721PresetMinterPauserAutoId, Ownable, CurrentTime {\\n using SafeMath for uint256;\\n using Strings for string;\\n using Counters for Counters.Counter;\\n\\n struct CryptOrchid {\\n string species;\\n uint256 plantedAt;\\n uint256 waterLevel;\\n }\\n mapping(uint256 => CryptOrchid) public cryptorchids;\\n\\n enum Stage {Unsold, Seed, Flower, Dead}\\n\\n bool internal saleStarted = false;\\n bool internal growingStarted = false;\\n\\n uint256 public constant MAX_CRYPTORCHIDS = 10000;\\n uint256 public constant GROWTH_CYCLE = 604800; // 7 days\\n uint256 public constant WATERING_WINDOW = 10800; // 3 hours\\n uint256 internal constant MAX_TIMESTAMP = 2**256 - 1;\\n string internal constant GRANUM_IPFS = \\\"QmWd1mn7DuGyx9ByfNeqCsgdSUsJZ1cragitgaygsqDvEm\\\";\\n\\n uint16[10] private limits = [0, 3074, 6074, 8074, 9074, 9574, 9824, 9924, 9974, 9999];\\n string[10] private genum = [\\n \\\"shenzhenica orchidaceae\\\",\\n \\\"phalaenopsis micholitzii\\\",\\n \\\"guarianthe aurantiaca\\\",\\n \\\"vanda coerulea\\\",\\n \\\"cypripedium calceolus\\\",\\n \\\"paphiopedilum vietnamense\\\",\\n \\\"miltonia kayasimae\\\",\\n \\\"platanthera azorica\\\",\\n \\\"dendrophylax lindenii\\\",\\n \\\"paphiopedilum rothschildianum\\\"\\n ];\\n\\n string[10] private speciesIPFSConstant = [\\n \\\"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/shenzhenica-orchidaceae.json\\\",\\n \\\"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/phalaenopsis-micholitzii.json\\\",\\n \\\"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/guarianthe-aurantiaca.json\\\",\\n \\\"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/vanda-coerulea.json\\\",\\n \\\"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/cypripedium-calceolus.json\\\",\\n \\\"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/paphiopedilum-vietnamense.json\\\",\\n \\\"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/miltonia-kayasimae.json\\\",\\n \\\"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/platanthera-azorica.json\\\",\\n \\\"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/dendrophylax-lindenii.json\\\",\\n \\\"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/paphiopedilum-rothschildianum.json\\\"\\n ];\\n\\n string[10] private deadSpeciesIPFSConstant = [\\n \\\"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/shenzhenica-orchidaceae.json\\\",\\n \\\"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/phalaenopsis-micholitzii.json\\\",\\n \\\"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/guarianthe-aurantiaca.json\\\",\\n \\\"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/vanda-coerulea.json\\\",\\n \\\"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/cypripedium-calceolus.json\\\",\\n \\\"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/paphiopedilum-vietnamense.json\\\",\\n \\\"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/miltonia-kayasimae.json\\\",\\n \\\"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/platanthera-azorica.json\\\",\\n \\\"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/dendrophylax-lindenii.json\\\",\\n \\\"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/paphiopedilum-rothschildianum.json\\\"\\n ];\\n\\n Counters.Counter private _tokenIds;\\n\\n mapping(bytes32 => uint256) public requestToToken;\\n mapping(bytes32 => string) private speciesIPFS;\\n mapping(bytes32 => string) private deadSpeciesIPFS;\\n\\n constructor() public payable ERC721PresetMinterPauserAutoId(\\\"CryptOrchids\\\", \\\"ORCHD\\\", \\\"ipfs://\\\") {\\n for (uint256 index = 0; index < genum.length; index++) {\\n speciesIPFS[keccak256(abi.encode(genum[index]))] = speciesIPFSConstant[index];\\n deadSpeciesIPFS[keccak256(abi.encode(genum[index]))] = deadSpeciesIPFSConstant[index];\\n }\\n }\\n\\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\\n (string memory species, , , ) = getTokenMetadata(tokenId);\\n\\n if (growthStage(tokenId) == Stage.Seed) {\\n return string(abi.encodePacked(baseURI(), GRANUM_IPFS));\\n }\\n\\n if (growthStage(tokenId) == Stage.Flower) {\\n return string(abi.encodePacked(baseURI(), speciesIPFS[keccak256(abi.encode(species))]));\\n }\\n\\n return string(abi.encodePacked(baseURI(), deadSpeciesIPFS[keccak256(abi.encode(species))]));\\n }\\n\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 tokenId\\n ) internal virtual override {\\n require(address(0) == to || alive(tokenId), \\\"Dead CryptOrchids cannot be transferred\\\");\\n super._beforeTokenTransfer(from, to, tokenId);\\n }\\n\\n function currentPrice() public view returns (uint256 price) {\\n uint256 currentSupply = totalSupply();\\n if (currentSupply >= 9900) {\\n return 1000000000000000000; // 9900+: 1.00 ETH\\n } else if (currentSupply >= 9500) {\\n return 640000000000000000; // 9500-9500: 0.64 ETH\\n } else if (currentSupply >= 7500) {\\n return 320000000000000000; // 7500-9500: 0.32 ETH\\n } else if (currentSupply >= 3500) {\\n return 160000000000000000; // 3500-7500: 0.16 ETH\\n } else if (currentSupply >= 1500) {\\n return 80000000000000000; // 1500-3500: 0.08 ETH\\n } else if (currentSupply >= 500) {\\n return 60000000000000000; // 500-1500: 0.06 ETH\\n } else {\\n return 40000000000000000; // 0 - 500 0.04 ETH\\n }\\n }\\n\\n function startSale() public onlyOwner {\\n saleStarted = true;\\n }\\n\\n function startGrowing() public onlyOwner {\\n growingStarted = true;\\n }\\n\\n /**\\n * @dev Withdraw ether from this contract (Callable by owner only)\\n */\\n function withdraw() public onlyOwner {\\n uint256 balance = address(this).balance;\\n msg.sender.transfer(balance);\\n }\\n\\n receive() external payable {}\\n\\n function webMint(uint256 units) public payable {\\n require(saleStarted, \\\"The Nursery is closed\\\");\\n require(units <= MAX_CRYPTORCHIDS - totalSupply(), \\\"Not enough bulbs left\\\");\\n require(totalSupply() < MAX_CRYPTORCHIDS, \\\"Sale has already ended\\\");\\n require(units > 0 && units <= 20, \\\"You can plant minimum 1, maximum 20 CryptOrchids\\\");\\n require(SafeMath.add(totalSupply(), units) <= MAX_CRYPTORCHIDS, \\\"Exceeds MAX_CRYPTORCHIDS\\\");\\n require(msg.value >= SafeMath.mul(currentPrice(), units), \\\"Ether value sent is below the price\\\");\\n\\n for (uint256 i = 0; i < units; i++) {\\n _tokenIds.increment();\\n uint256 newItemId = _tokenIds.current();\\n cryptorchids[newItemId] = CryptOrchid({species: \\\"granum\\\", plantedAt: MAX_TIMESTAMP, waterLevel: 0});\\n _safeMint(msg.sender, newItemId);\\n }\\n }\\n\\n function germinate(uint256 tokenId, uint256 userProvidedSeed) public {\\n require(growingStarted, \\\"Germination starts 2021-04-12T16:00:00Z\\\");\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"Only the Owner can germinate a CryptOrchid.\\\");\\n _requestRandom(tokenId, userProvidedSeed);\\n }\\n\\n function _requestRandom(uint256 tokenId, uint256 userProvidedSeed) internal returns (bytes32 requestId) {\\n uint256 pseudoRand = uint256(keccak256(abi.encodePacked(block.timestamp, block.difficulty, userProvidedSeed)));\\n fulfillRandomness(tokenId, pseudoRand);\\n }\\n\\n function fulfillRandomness(uint256 tokenId, uint256 randomness) internal {\\n CryptOrchid storage orchid = cryptorchids[tokenId];\\n string memory species = pickSpecies(SafeMath.mod(randomness, 10000));\\n orchid.species = species;\\n orchid.plantedAt = currentTime();\\n address tokenOwner = ownerOf(tokenId);\\n }\\n\\n function alive(uint256 tokenId) public view returns (bool) {\\n return growthStage(tokenId) != Stage.Dead;\\n }\\n\\n function flowering(uint256 tokenId) public view returns (bool) {\\n return growthStage(tokenId) == Stage.Flower;\\n }\\n\\n function growthStage(uint256 tokenId) public view returns (Stage) {\\n CryptOrchid memory orchid = cryptorchids[tokenId];\\n if (orchid.plantedAt == 0) return Stage.Unsold;\\n if (orchid.plantedAt == MAX_TIMESTAMP) return Stage.Seed;\\n uint256 currentWaterLevel = orchid.waterLevel;\\n uint256 elapsed = currentTime() - orchid.plantedAt;\\n uint256 fullCycles = SafeMath.div(uint256(elapsed), GROWTH_CYCLE);\\n uint256 modulo = SafeMath.mod(elapsed, GROWTH_CYCLE);\\n\\n if (currentWaterLevel == fullCycles) {\\n return Stage.Flower;\\n }\\n\\n if (SafeMath.add(currentWaterLevel, 1) == fullCycles && modulo < WATERING_WINDOW) {\\n return Stage.Flower;\\n }\\n\\n return Stage.Dead;\\n }\\n\\n function water(uint256 tokenId) public {\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"Only the Owner can water a CryptOrchid.\\\");\\n\\n if (!alive(tokenId)) {\\n return;\\n }\\n\\n CryptOrchid storage orchid = cryptorchids[tokenId];\\n\\n uint256 wateringLevel = orchid.waterLevel;\\n uint256 elapsed = currentTime() - orchid.plantedAt;\\n uint256 fullCycles = SafeMath.div(uint256(elapsed), GROWTH_CYCLE);\\n\\n if (wateringLevel > fullCycles) {\\n return;\\n }\\n\\n uint256 newWaterLevel = SafeMath.add(wateringLevel, 1);\\n orchid.waterLevel = newWaterLevel;\\n }\\n\\n function getTokenMetadata(uint256 tokenId)\\n public\\n view\\n returns (\\n string memory,\\n uint256,\\n uint256,\\n Stage\\n )\\n {\\n return (\\n cryptorchids[tokenId].species,\\n cryptorchids[tokenId].plantedAt,\\n cryptorchids[tokenId].waterLevel,\\n growthStage(tokenId)\\n );\\n }\\n\\n /**\\n * @notice Pick species for random number index\\n * @param randomIndex uint256\\n * @return species string\\n */\\n function pickSpecies(uint256 randomIndex) private view returns (string memory) {\\n for (uint256 i = 0; i < 10; i++) {\\n if (randomIndex <= limits[i]) {\\n return genum[i];\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x51b1f3e914311c7a69ad3795e877e316b1740b2f4da01bf1bb3a1100f83af446\"},\"contracts/Libraries/CurrentTime.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.6 <0.9.0;\\n\\ncontract CurrentTime {\\n function currentTime() internal view virtual returns (uint256) {\\n return block.timestamp;\\n }\\n}\\n\",\"keccak256\":\"0xa9a311d0f67d3d7aabd318210bed7051401151fa5f45e75071d7a52c50214cee\"}},\"version\":1}", + "storageLayout": { + "storage": [ + { + "astId": 549, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "_roles", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_struct(RoleData)545_storage)" + }, + { + "astId": 932, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "_supportedInterfaces", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes4,t_bool)" + }, + { + "astId": 3555, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "_holderTokens", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_struct(UintSet)6038_storage)" + }, + { + "astId": 3557, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "_tokenOwners", + "offset": 0, + "slot": "3", + "type": "t_struct(UintToAddressMap)5415_storage" + }, + { + "astId": 3561, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "_tokenApprovals", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_uint256,t_address)" + }, + { + "astId": 3567, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "_operatorApprovals", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_address,t_mapping(t_address,t_bool))" + }, + { + "astId": 3569, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "_name", + "offset": 0, + "slot": "7", + "type": "t_string_storage" + }, + { + "astId": 3571, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "_symbol", + "offset": 0, + "slot": "8", + "type": "t_string_storage" + }, + { + "astId": 3575, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "_tokenURIs", + "offset": 0, + "slot": "9", + "type": "t_mapping(t_uint256,t_string_storage)" + }, + { + "astId": 3577, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "_baseURI", + "offset": 0, + "slot": "10", + "type": "t_string_storage" + }, + { + "astId": 6151, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "_paused", + "offset": 0, + "slot": "11", + "type": "t_bool" + }, + { + "astId": 1374, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "_tokenIdTracker", + "offset": 0, + "slot": "12", + "type": "t_struct(Counter)5041_storage" + }, + { + "astId": 817, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "_owner", + "offset": 0, + "slot": "13", + "type": "t_address" + }, + { + "astId": 8299, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "cryptorchids", + "offset": 0, + "slot": "14", + "type": "t_mapping(t_uint256,t_struct(CryptOrchid)8295_storage)" + }, + { + "astId": 8307, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "saleStarted", + "offset": 0, + "slot": "15", + "type": "t_bool" + }, + { + "astId": 8310, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "growingStarted", + "offset": 1, + "slot": "15", + "type": "t_bool" + }, + { + "astId": 8344, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "limits", + "offset": 0, + "slot": "16", + "type": "t_array(t_uint16)10_storage" + }, + { + "astId": 8359, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "genum", + "offset": 0, + "slot": "17", + "type": "t_array(t_string_storage)10_storage" + }, + { + "astId": 8374, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "speciesIPFSConstant", + "offset": 0, + "slot": "27", + "type": "t_array(t_string_storage)10_storage" + }, + { + "astId": 8389, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "deadSpeciesIPFSConstant", + "offset": 0, + "slot": "37", + "type": "t_array(t_string_storage)10_storage" + }, + { + "astId": 8391, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "_tokenIds", + "offset": 0, + "slot": "47", + "type": "t_struct(Counter)5041_storage" + }, + { + "astId": 8395, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "requestToToken", + "offset": 0, + "slot": "48", + "type": "t_mapping(t_bytes32,t_uint256)" + }, + { + "astId": 8399, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "speciesIPFS", + "offset": 0, + "slot": "49", + "type": "t_mapping(t_bytes32,t_string_storage)" + }, + { + "astId": 8403, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "deadSpeciesIPFS", + "offset": 0, + "slot": "50", + "type": "t_mapping(t_bytes32,t_string_storage)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_array(t_string_storage)10_storage": { + "base": "t_string_storage", + "encoding": "inplace", + "label": "string[10]", + "numberOfBytes": "320" + }, + "t_array(t_struct(MapEntry)5089_storage)dyn_storage": { + "base": "t_struct(MapEntry)5089_storage", + "encoding": "dynamic_array", + "label": "struct EnumerableMap.MapEntry[]", + "numberOfBytes": "32" + }, + "t_array(t_uint16)10_storage": { + "base": "t_uint16", + "encoding": "inplace", + "label": "uint16[10]", + "numberOfBytes": "32" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_bytes4": { + "encoding": "inplace", + "label": "bytes4", + "numberOfBytes": "4" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_mapping(t_address,t_bool))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => bool))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_bool)" + }, + "t_mapping(t_address,t_struct(UintSet)6038_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct EnumerableSet.UintSet)", + "numberOfBytes": "32", + "value": "t_struct(UintSet)6038_storage" + }, + "t_mapping(t_bytes32,t_string_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => string)", + "numberOfBytes": "32", + "value": "t_string_storage" + }, + "t_mapping(t_bytes32,t_struct(RoleData)545_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct AccessControl.RoleData)", + "numberOfBytes": "32", + "value": "t_struct(RoleData)545_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_bytes4,t_bool)": { + "encoding": "mapping", + "key": "t_bytes4", + "label": "mapping(bytes4 => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_uint256,t_address)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_uint256,t_string_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => string)", + "numberOfBytes": "32", + "value": "t_string_storage" + }, + "t_mapping(t_uint256,t_struct(CryptOrchid)8295_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => struct CryptOrchidGoerli.CryptOrchid)", + "numberOfBytes": "32", + "value": "t_struct(CryptOrchid)8295_storage" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(AddressSet)5917_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.AddressSet", + "members": [ + { + "astId": 5916, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)5652_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Counter)5041_storage": { + "encoding": "inplace", + "label": "struct Counters.Counter", + "members": [ + { + "astId": 5040, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "_value", + "offset": 0, + "slot": "0", + "type": "t_uint256" + } + ], + "numberOfBytes": "32" + }, + "t_struct(CryptOrchid)8295_storage": { + "encoding": "inplace", + "label": "struct CryptOrchidGoerli.CryptOrchid", + "members": [ + { + "astId": 8290, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "species", + "offset": 0, + "slot": "0", + "type": "t_string_storage" + }, + { + "astId": 8292, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "plantedAt", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 8294, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "waterLevel", + "offset": 0, + "slot": "2", + "type": "t_uint256" + } + ], + "numberOfBytes": "96" + }, + "t_struct(Map)5097_storage": { + "encoding": "inplace", + "label": "struct EnumerableMap.Map", + "members": [ + { + "astId": 5092, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "_entries", + "offset": 0, + "slot": "0", + "type": "t_array(t_struct(MapEntry)5089_storage)dyn_storage" + }, + { + "astId": 5096, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(MapEntry)5089_storage": { + "encoding": "inplace", + "label": "struct EnumerableMap.MapEntry", + "members": [ + { + "astId": 5086, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "_key", + "offset": 0, + "slot": "0", + "type": "t_bytes32" + }, + { + "astId": 5088, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "_value", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ], + "numberOfBytes": "64" + }, + "t_struct(RoleData)545_storage": { + "encoding": "inplace", + "label": "struct AccessControl.RoleData", + "members": [ + { + "astId": 542, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "members", + "offset": 0, + "slot": "0", + "type": "t_struct(AddressSet)5917_storage" + }, + { + "astId": 544, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "adminRole", + "offset": 0, + "slot": "2", + "type": "t_bytes32" + } + ], + "numberOfBytes": "96" + }, + "t_struct(Set)5652_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 5647, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 5651, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(UintSet)6038_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.UintSet", + "members": [ + { + "astId": 6037, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)5652_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(UintToAddressMap)5415_storage": { + "encoding": "inplace", + "label": "struct EnumerableMap.UintToAddressMap", + "members": [ + { + "astId": 5414, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Map)5097_storage" + } + ], + "numberOfBytes": "64" + }, + "t_uint16": { + "encoding": "inplace", + "label": "uint16", + "numberOfBytes": "2" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + }, + "userdoc": { + "methods": {} + }, + "solcInput": "{\n \"language\": \"Solidity\",\n \"sources\": {\n \"contracts/Coupon/Coupon.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.6 <0.9.0;\\n\\nimport \\\"@openzeppelin/contracts/math/SafeMath.sol\\\";\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"@chainlink/contracts/src/v0.6/VRFConsumerBase.sol\\\";\\nimport \\\"../Interfaces/ERC721.sol\\\";\\nimport \\\"../Libraries/CurrentTime.sol\\\";\\n\\ncontract Coupon is Ownable, VRFConsumerBase, CurrentTime {\\n using SafeMath for uint256;\\n mapping(uint256 => bool) internal redemptions;\\n mapping(address => uint256) public addressEntriesCount;\\n\\n uint256 public constant PROMOTION_END = 1622520000;\\n uint256 internal constant REBATE_AMOUNT = 20000000000000000;\\n uint256 internal constant MINT_FLOOR = 40000000000000000;\\n\\n uint256 public promotionStart;\\n address public cryptorchidsERC721;\\n\\n uint256 public drawingEntriesCount;\\n uint256 public pot;\\n address[] internal drawingEntries;\\n bytes32 internal randomWinnerRequestId;\\n bool public winnerRequested;\\n address public winner;\\n\\n bytes32 internal keyHash;\\n uint256 internal vrfFee;\\n address public VRFCoordinator;\\n address public LinkToken;\\n\\n constructor(\\n address cryptorchidsAddress,\\n address _VRFCoordinator,\\n address _LinkToken,\\n bytes32 _keyhash\\n ) public payable VRFConsumerBase(_VRFCoordinator, _LinkToken) {\\n VRFCoordinator = _VRFCoordinator;\\n LinkToken = _LinkToken;\\n keyHash = _keyhash;\\n vrfFee = 2000000000000000000; // 2 LINK\\n cryptorchidsERC721 = cryptorchidsAddress;\\n promotionStart = block.timestamp;\\n }\\n\\n /** Public function for whether the promotion is open. The promotion is only\\n * open if the contract balance is greater than the currentRebate. Displayed\\n * on CryptOrchids nursery for transparency.\\n * @dev\\n * @return bool Whether promotion is open for entries.\\n */\\n function promotionOpen() public view returns (bool) {\\n if (currentTime() > PROMOTION_END) return false;\\n if (pot > address(this).balance + currentRebate()) return false;\\n if (currentRebate() > address(this).balance) return false;\\n\\n return true;\\n }\\n\\n /** Check rebate value and eligible tokens. Tokens are valid if they are planted\\n * after this contract is deployed, alive, and not yet redeemed.\\n * @dev calls public functions on the CryptOrchids contract to build\\n * an array of eligible token IDs and a rebate amount.\\n * @return eligibleTokens uint256[] Uncompacted array of 0s and eligible token IDs\\n * @return rebateAmount uint256 Eligible tokens * currentRebate\\n */\\n function checkEligibility()\\n public\\n view\\n returns (\\n uint256[] memory eligibleTokens,\\n uint256 rebateAmount,\\n uint256 count\\n )\\n {\\n require(promotionOpen(), \\\"Promotion over\\\");\\n\\n uint256 _rebateAmount = 0;\\n uint256 tokenCount = ERC721(cryptorchidsERC721).balanceOf(msg.sender);\\n uint256[] memory _eligibleTokens = new uint256[](tokenCount);\\n\\n for (uint256 index = 0; index < tokenCount; index++) {\\n uint256 tokenId = ERC721(cryptorchidsERC721).tokenOfOwnerByIndex(msg.sender, index);\\n bool flowering = ERC721(cryptorchidsERC721).flowering(tokenId);\\n (, uint256 plantedAt, , ) = ERC721(cryptorchidsERC721).getTokenMetadata(tokenId);\\n\\n if (redemptions[tokenId] != true && flowering && plantedAt > promotionStart) {\\n _eligibleTokens[index] = tokenId;\\n _rebateAmount += tokenRebate(tokenId);\\n count += 1;\\n }\\n }\\n\\n if (_rebateAmount > safeBalance()) {\\n uint256[] memory empty = new uint256[](0);\\n return (empty, _rebateAmount, uint256(0));\\n }\\n return (_eligibleTokens, _rebateAmount, count);\\n }\\n\\n /** Claim ETH for valid tokens. Check for valid tokens before claming.\\n * @dev calls checkEligibility and sets all eligibleTokens as redeemed.\\n * Then transfers caller rebateAmount.\\n */\\n function redeem() public virtual returns (uint256) {\\n require(currentTime() < PROMOTION_END, \\\"Promotion over\\\");\\n (uint256[] memory redeeming, uint256 rebateAmount, ) = checkEligibility();\\n require(safeBalance() >= rebateAmount, \\\"COC:rdm:paused\\\");\\n\\n for (uint256 index = 0; index < redeeming.length - 1; index++) {\\n uint256 tokenId = redeeming[index];\\n if (tokenId > 0) redemptions[tokenId] = true;\\n }\\n\\n payable(msg.sender).transfer(rebateAmount);\\n\\n return rebateAmount;\\n }\\n\\n /** Redeem tokens for entries in drawing.\\n * @dev Adds address to drawingEntries, increments entriesCount, and\\n * increases pot for each eligible token, while marking each token redeemed.\\n */\\n function enter() public virtual {\\n require(currentTime() < PROMOTION_END, \\\"Promotion over\\\");\\n (uint256[] memory redeeming, uint256 rebateAmount, uint256 count) = checkEligibility();\\n\\n require(safeBalance() >= rebateAmount, \\\"COC:enr:paused\\\");\\n\\n for (uint256 index = 0; index < redeeming.length; index++) {\\n uint256 tokenId = redeeming[index];\\n if (tokenId > 0) {\\n redemptions[tokenId] = true;\\n drawingEntriesCount += 1;\\n addressEntriesCount[msg.sender] += 1;\\n drawingEntries.push(address(msg.sender));\\n pot += tokenRebate(tokenId);\\n }\\n }\\n }\\n\\n /** Current rebate amount for new, mintable token. Based on CryptOrchids current price,\\n * the ramping rebate is intended to address the regrettable FOMO ramp pricing.\\n * Starts at 0.02ETH, and increases with inverse correlation to price ramp to\\n * offer effectively straight 0.04 ETH for seeds.\\n * @dev calls CryptOrchids.currentPrice and finds difference with MINT_FLOOR to return rebate.\\n */\\n function currentRebate() public view returns (uint256) {\\n uint256 currentPrice = ERC721(cryptorchidsERC721).currentPrice();\\n\\n if (currentPrice == MINT_FLOOR) return REBATE_AMOUNT;\\n\\n return currentPrice - MINT_FLOOR;\\n }\\n\\n /** Redeemable rebate amount for existing token. Based on the price the token was sold at,\\n * this prevents a seed holder from redeeming a seed for more than it was purchased for.\\n * @dev Copies currentPrice and returns rebate amount for tokenId\\n */\\n function tokenRebate(uint256 tokenId) public view returns (uint256) {\\n if (tokenId > 9900) {\\n return 1000000000000000000 - MINT_FLOOR; // 9900+: 0.960 ETH\\n } else if (tokenId > 9500) {\\n return 640000000000000000 - MINT_FLOOR; // 9500-9500: 0.60 ETH\\n } else if (tokenId > 7500) {\\n return 320000000000000000 - MINT_FLOOR; // 7500-9500: 0.28 ETH\\n } else if (tokenId > 3500) {\\n return 160000000000000000 - MINT_FLOOR; // 3500-7500: 0.12 ETH\\n } else if (tokenId > 1500) {\\n return 80000000000000000 - MINT_FLOOR; // 1500-3500: 0.04 ETH\\n } else if (tokenId > 500) {\\n return 60000000000000000 - MINT_FLOOR; // 500-1500: 0.02 ETH\\n } else {\\n return REBATE_AMOUNT; // 0 - 500 0.02 ETH\\n }\\n }\\n\\n /** Current count of rebates available as determined by safeBalance and currentRebate\\n */\\n function rebatesAvailable() public view returns (uint256) {\\n return SafeMath.div(safeBalance(), currentRebate());\\n }\\n\\n /** Current rebate amount for eligible token. Based on CryptOrchids current price,\\n * the ramping rebate is intended to address the regrettable FOMO ramp pricing.\\n * Starts at 0.02ETH,\\n * @dev calls CryptOrchids.currentPrice and finds difference to .\\n * Then transfers caller rebateAmount.\\n */\\n function safeBalance() internal view returns (uint256) {\\n return address(this).balance - pot;\\n }\\n\\n function selectWinner(uint256 userProvidedSeed) public virtual {\\n require(currentTime() > PROMOTION_END, \\\"COC:wW:promotion running\\\");\\n require(randomWinnerRequestId[0] == 0, \\\"COC:wW:winner requested\\\");\\n require(LINK.balanceOf(address(this)) >= vrfFee, \\\"COC:sW:no LINK\\\");\\n\\n randomWinnerRequestId = requestRandomness(keyHash, vrfFee, userProvidedSeed);\\n }\\n\\n function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override {\\n require(requestId == randomWinnerRequestId, \\\"COC:fR:invalid request ID\\\");\\n uint256 winnerIndex = SafeMath.mod(randomness, drawingEntriesCount);\\n winner = drawingEntries[winnerIndex];\\n }\\n\\n /** Winner may withdraw ether from the contract once the promotion is over.\\n *\\n */\\n function withdrawWinner() public {\\n require(currentTime() > PROMOTION_END, \\\"COC:wW:promotion running\\\");\\n require(msg.sender == winner, \\\"COC:wW:not winner\\\");\\n uint256 txAmount = pot;\\n pot = 0;\\n payable(msg.sender).transfer(txAmount);\\n }\\n\\n /** Withdraw ether from this contract once the promotion is over.\\n * @dev Transfer remaining balance to owner if after PROMOTION_END.\\n *\\n */\\n function withdrawUnclaimed() public onlyOwner {\\n require(currentTime() > PROMOTION_END, \\\"COC:wU:promotion running\\\");\\n require(pot == 0, \\\"COC:wU:winnings unclaimed\\\");\\n\\n uint256 balance = address(this).balance;\\n payable(msg.sender).transfer(balance);\\n }\\n\\n receive() external payable {}\\n}\\n\"\n },\n \"@openzeppelin/contracts/math/SafeMath.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\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 uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction 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 if (b > a) return (false, 0);\\n return (true, a - b);\\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 // 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 * @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 if (b == 0) return (false, 0);\\n return (true, a / b);\\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 if (b == 0) return (false, 0);\\n return (true, a % b);\\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 uint256 c = a + b;\\n require(c >= a, \\\"SafeMath: addition overflow\\\");\\n return c;\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\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 if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\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. 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) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\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 require(b > 0, \\\"SafeMath: modulo by zero\\\");\\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 require(b <= a, errorMessage);\\n return a - b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\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 require(b > 0, errorMessage);\\n return a / b;\\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 require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\"\n },\n \"@openzeppelin/contracts/access/Ownable.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor () internal {\\n address msgSender = _msgSender();\\n _owner = msgSender;\\n emit OwnershipTransferred(address(0), msgSender);\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n emit OwnershipTransferred(_owner, address(0));\\n _owner = address(0);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n emit OwnershipTransferred(_owner, newOwner);\\n _owner = newOwner;\\n }\\n}\\n\"\n },\n \"@chainlink/contracts/src/v0.6/VRFConsumerBase.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.0;\\n\\nimport \\\"./vendor/SafeMathChainlink.sol\\\";\\n\\nimport \\\"./interfaces/LinkTokenInterface.sol\\\";\\n\\nimport \\\"./VRFRequestIDBase.sol\\\";\\n\\n/** ****************************************************************************\\n * @notice Interface for contracts using VRF randomness\\n * *****************************************************************************\\n * @dev PURPOSE\\n *\\n * @dev Reggie the Random Oracle (not his real job) wants to provide randomness\\n * @dev to Vera the verifier in such a way that Vera can be sure he's not\\n * @dev making his output up to suit himself. Reggie provides Vera a public key\\n * @dev to which he knows the secret key. Each time Vera provides a seed to\\n * @dev Reggie, he gives back a value which is computed completely\\n * @dev deterministically from the seed and the secret key.\\n *\\n * @dev Reggie provides a proof by which Vera can verify that the output was\\n * @dev correctly computed once Reggie tells it to her, but without that proof,\\n * @dev the output is indistinguishable to her from a uniform random sample\\n * @dev from the output space.\\n *\\n * @dev The purpose of this contract is to make it easy for unrelated contracts\\n * @dev to talk to Vera the verifier about the work Reggie is doing, to provide\\n * @dev simple access to a verifiable source of randomness.\\n * *****************************************************************************\\n * @dev USAGE\\n *\\n * @dev Calling contracts must inherit from VRFConsumerBase, and can\\n * @dev initialize VRFConsumerBase's attributes in their constructor as\\n * @dev shown:\\n *\\n * @dev contract VRFConsumer {\\n * @dev constuctor(, address _vrfCoordinator, address _link)\\n * @dev VRFConsumerBase(_vrfCoordinator, _link) public {\\n * @dev \\n * @dev }\\n * @dev }\\n *\\n * @dev The oracle will have given you an ID for the VRF keypair they have\\n * @dev committed to (let's call it keyHash), and have told you the minimum LINK\\n * @dev price for VRF service. Make sure your contract has sufficient LINK, and\\n * @dev call requestRandomness(keyHash, fee, seed), where seed is the input you\\n * @dev want to generate randomness from.\\n *\\n * @dev Once the VRFCoordinator has received and validated the oracle's response\\n * @dev to your request, it will call your contract's fulfillRandomness method.\\n *\\n * @dev The randomness argument to fulfillRandomness is the actual random value\\n * @dev generated from your seed.\\n *\\n * @dev The requestId argument is generated from the keyHash and the seed by\\n * @dev makeRequestId(keyHash, seed). If your contract could have concurrent\\n * @dev requests open, you can use the requestId to track which seed is\\n * @dev associated with which randomness. See VRFRequestIDBase.sol for more\\n * @dev details. (See \\\"SECURITY CONSIDERATIONS\\\" for principles to keep in mind,\\n * @dev if your contract could have multiple requests in flight simultaneously.)\\n *\\n * @dev Colliding `requestId`s are cryptographically impossible as long as seeds\\n * @dev differ. (Which is critical to making unpredictable randomness! See the\\n * @dev next section.)\\n *\\n * *****************************************************************************\\n * @dev SECURITY CONSIDERATIONS\\n *\\n * @dev A method with the ability to call your fulfillRandomness method directly\\n * @dev could spoof a VRF response with any random value, so it's critical that\\n * @dev it cannot be directly called by anything other than this base contract\\n * @dev (specifically, by the VRFConsumerBase.rawFulfillRandomness method).\\n *\\n * @dev For your users to trust that your contract's random behavior is free\\n * @dev from malicious interference, it's best if you can write it so that all\\n * @dev behaviors implied by a VRF response are executed *during* your\\n * @dev fulfillRandomness method. If your contract must store the response (or\\n * @dev anything derived from it) and use it later, you must ensure that any\\n * @dev user-significant behavior which depends on that stored value cannot be\\n * @dev manipulated by a subsequent VRF request.\\n *\\n * @dev Similarly, both miners and the VRF oracle itself have some influence\\n * @dev over the order in which VRF responses appear on the blockchain, so if\\n * @dev your contract could have multiple VRF requests in flight simultaneously,\\n * @dev you must ensure that the order in which the VRF responses arrive cannot\\n * @dev be used to manipulate your contract's user-significant behavior.\\n *\\n * @dev Since the ultimate input to the VRF is mixed with the block hash of the\\n * @dev block in which the request is made, user-provided seeds have no impact\\n * @dev on its economic security properties. They are only included for API\\n * @dev compatability with previous versions of this contract.\\n *\\n * @dev Since the block hash of the block which contains the requestRandomness\\n * @dev call is mixed into the input to the VRF *last*, a sufficiently powerful\\n * @dev miner could, in principle, fork the blockchain to evict the block\\n * @dev containing the request, forcing the request to be included in a\\n * @dev different block with a different hash, and therefore a different input\\n * @dev to the VRF. However, such an attack would incur a substantial economic\\n * @dev cost. This cost scales with the number of blocks the VRF oracle waits\\n * @dev until it calls responds to a request.\\n */\\nabstract contract VRFConsumerBase is VRFRequestIDBase {\\n\\n using SafeMathChainlink for uint256;\\n\\n /**\\n * @notice fulfillRandomness handles the VRF response. Your contract must\\n * @notice implement it. See \\\"SECURITY CONSIDERATIONS\\\" above for important\\n * @notice principles to keep in mind when implementing your fulfillRandomness\\n * @notice method.\\n *\\n * @dev VRFConsumerBase expects its subcontracts to have a method with this\\n * @dev signature, and will call it once it has verified the proof\\n * @dev associated with the randomness. (It is triggered via a call to\\n * @dev rawFulfillRandomness, below.)\\n *\\n * @param requestId The Id initially returned by requestRandomness\\n * @param randomness the VRF output\\n */\\n function fulfillRandomness(bytes32 requestId, uint256 randomness)\\n internal virtual;\\n\\n /**\\n * @notice requestRandomness initiates a request for VRF output given _seed\\n *\\n * @dev The fulfillRandomness method receives the output, once it's provided\\n * @dev by the Oracle, and verified by the vrfCoordinator.\\n *\\n * @dev The _keyHash must already be registered with the VRFCoordinator, and\\n * @dev the _fee must exceed the fee specified during registration of the\\n * @dev _keyHash.\\n *\\n * @dev The _seed parameter is vestigial, and is kept only for API\\n * @dev compatibility with older versions. It can't *hurt* to mix in some of\\n * @dev your own randomness, here, but it's not necessary because the VRF\\n * @dev oracle will mix the hash of the block containing your request into the\\n * @dev VRF seed it ultimately uses.\\n *\\n * @param _keyHash ID of public key against which randomness is generated\\n * @param _fee The amount of LINK to send with the request\\n * @param _seed seed mixed into the input of the VRF.\\n *\\n * @return requestId unique ID for this request\\n *\\n * @dev The returned requestId can be used to distinguish responses to\\n * @dev concurrent requests. It is passed as the first argument to\\n * @dev fulfillRandomness.\\n */\\n function requestRandomness(bytes32 _keyHash, uint256 _fee, uint256 _seed)\\n internal returns (bytes32 requestId)\\n {\\n LINK.transferAndCall(vrfCoordinator, _fee, abi.encode(_keyHash, _seed));\\n // This is the seed passed to VRFCoordinator. The oracle will mix this with\\n // the hash of the block containing this request to obtain the seed/input\\n // which is finally passed to the VRF cryptographic machinery.\\n uint256 vRFSeed = makeVRFInputSeed(_keyHash, _seed, address(this), nonces[_keyHash]);\\n // nonces[_keyHash] must stay in sync with\\n // VRFCoordinator.nonces[_keyHash][this], which was incremented by the above\\n // successful LINK.transferAndCall (in VRFCoordinator.randomnessRequest).\\n // This provides protection against the user repeating their input seed,\\n // which would result in a predictable/duplicate output, if multiple such\\n // requests appeared in the same block.\\n nonces[_keyHash] = nonces[_keyHash].add(1);\\n return makeRequestId(_keyHash, vRFSeed);\\n }\\n\\n LinkTokenInterface immutable internal LINK;\\n address immutable private vrfCoordinator;\\n\\n // Nonces for each VRF key from which randomness has been requested.\\n //\\n // Must stay in sync with VRFCoordinator[_keyHash][this]\\n mapping(bytes32 /* keyHash */ => uint256 /* nonce */) private nonces;\\n\\n /**\\n * @param _vrfCoordinator address of VRFCoordinator contract\\n * @param _link address of LINK token contract\\n *\\n * @dev https://docs.chain.link/docs/link-token-contracts\\n */\\n constructor(address _vrfCoordinator, address _link) public {\\n vrfCoordinator = _vrfCoordinator;\\n LINK = LinkTokenInterface(_link);\\n }\\n\\n // rawFulfillRandomness is called by VRFCoordinator when it receives a valid VRF\\n // proof. rawFulfillRandomness then calls fulfillRandomness, after validating\\n // the origin of the call\\n function rawFulfillRandomness(bytes32 requestId, uint256 randomness) external {\\n require(msg.sender == vrfCoordinator, \\\"Only VRFCoordinator can fulfill\\\");\\n fulfillRandomness(requestId, randomness);\\n }\\n}\\n\"\n },\n \"contracts/Interfaces/ERC721.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity >=0.6.6 <0.9.0;\\n\\ninterface ERC721 {\\n enum Stage {Unsold, Seed, Flower, Dead}\\n\\n struct CryptOrchid {\\n string species;\\n uint256 plantedAt;\\n uint256 waterLevel;\\n }\\n\\n /// @dev This emits when ownership of any NFT changes by any mechanism.\\n /// This event emits when NFTs are created (`from` == 0) and destroyed\\n /// (`to` == 0). Exception: during contract creation, any number of NFTs\\n /// may be created and assigned without emitting Transfer. At the time of\\n /// any transfer, the approved address for that NFT (if any) is reset to none.\\n event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId);\\n\\n /// @dev This emits when the approved address for an NFT is changed or\\n /// reaffirmed. The zero address indicates there is no approved address.\\n /// When a Transfer event emits, this also indicates that the approved\\n /// address for that NFT (if any) is reset to none.\\n event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId);\\n\\n /// @dev This emits when an operator is enabled or disabled for an owner.\\n /// The operator can manage all NFTs of the owner.\\n event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved);\\n\\n /// @notice Count all NFTs assigned to an owner\\n /// @dev NFTs assigned to the zero address are considered invalid, and this\\n /// function throws for queries about the zero address.\\n /// @param _owner An address for whom to query the balance\\n /// @return The number of NFTs owned by `_owner`, possibly zero\\n function balanceOf(address _owner) external view returns (uint256);\\n\\n /// @notice Find the owner of an NFT\\n /// @dev NFTs assigned to zero address are considered invalid, and queries\\n /// about them do throw.\\n /// @param _tokenId The identifier for an NFT\\n /// @return The address of the owner of the NFT\\n function ownerOf(uint256 _tokenId) external view returns (address);\\n\\n /// @notice Transfers the ownership of an NFT from one address to another address\\n /// @dev Throws unless `msg.sender` is the current owner, an authorized\\n /// operator, or the approved address for this NFT. Throws if `_from` is\\n /// not the current owner. Throws if `_to` is the zero address. Throws if\\n /// `_tokenId` is not a valid NFT. When transfer is complete, this function\\n /// checks if `_to` is a smart contract (code size > 0). If so, it calls\\n /// `onERC721Received` on `_to` and throws if the return value is not\\n /// `bytes4(keccak256(\\\"onERC721Received(address,address,uint256,bytes)\\\"))`.\\n /// @param _from The current owner of the NFT\\n /// @param _to The new owner\\n /// @param _tokenId The NFT to transfer\\n /// @param data Additional data with no specified format, sent in call to `_to`\\n function safeTransferFrom(\\n address _from,\\n address _to,\\n uint256 _tokenId,\\n bytes calldata data\\n ) external payable;\\n\\n /// @notice Transfers the ownership of an NFT from one address to another address\\n /// @dev This works identically to the other function with an extra data parameter,\\n /// except this function just sets data to \\\"\\\".\\n /// @param _from The current owner of the NFT\\n /// @param _to The new owner\\n /// @param _tokenId The NFT to transfer\\n function safeTransferFrom(\\n address _from,\\n address _to,\\n uint256 _tokenId\\n ) external payable;\\n\\n /// @notice Transfer ownership of an NFT -- THE CALLER IS RESPONSIBLE\\n /// TO CONFIRM THAT `_to` IS CAPABLE OF RECEIVING NFTS OR ELSE\\n /// THEY MAY BE PERMANENTLY LOST\\n /// @dev Throws unless `msg.sender` is the current owner, an authorized\\n /// operator, or the approved address for this NFT. Throws if `_from` is\\n /// not the current owner. Throws if `_to` is the zero address. Throws if\\n /// `_tokenId` is not a valid NFT.\\n /// @param _from The current owner of the NFT\\n /// @param _to The new owner\\n /// @param _tokenId The NFT to transfer\\n function transferFrom(\\n address _from,\\n address _to,\\n uint256 _tokenId\\n ) external payable;\\n\\n /// @notice Change or reaffirm the approved address for an NFT\\n /// @dev The zero address indicates there is no approved address.\\n /// Throws unless `msg.sender` is the current NFT owner, or an authorized\\n /// operator of the current owner.\\n /// @param _approved The new approved NFT controller\\n /// @param _tokenId The NFT to approve\\n function approve(address _approved, uint256 _tokenId) external payable;\\n\\n /// @notice Enable or disable approval for a third party (\\\"operator\\\") to manage\\n /// all of `msg.sender`'s assets\\n /// @dev Emits the ApprovalForAll event. The contract MUST allow\\n /// multiple operators per owner.\\n /// @param _operator Address to add to the set of authorized operators\\n /// @param _approved True if the operator is approved, false to revoke approval\\n function setApprovalForAll(address _operator, bool _approved) external;\\n\\n /// @notice Get the approved address for a single NFT\\n /// @dev Throws if `_tokenId` is not a valid NFT.\\n /// @param _tokenId The NFT to find the approved address for\\n /// @return The approved address for this NFT, or the zero address if there is none\\n function getApproved(uint256 _tokenId) external view returns (address);\\n\\n /// @notice Query if an address is an authorized operator for another address\\n /// @param _owner The address that owns the NFTs\\n /// @param _operator The address that acts on behalf of the owner\\n /// @return True if `_operator` is an approved operator for `_owner`, false otherwise\\n function isApprovedForAll(address _owner, address _operator) external view returns (bool);\\n\\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 tokenId);\\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 function flowering(uint256 tokenId) external view returns (bool);\\n\\n function currentPrice() external view returns (uint256 price);\\n\\n function getTokenMetadata(uint256 tokenId)\\n external\\n view\\n returns (\\n string memory,\\n uint256,\\n uint256,\\n Stage\\n );\\n}\\n\"\n },\n \"contracts/Libraries/CurrentTime.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.6 <0.9.0;\\n\\ncontract CurrentTime {\\n function currentTime() internal view virtual returns (uint256) {\\n return block.timestamp;\\n }\\n}\\n\"\n },\n \"@openzeppelin/contracts/utils/Context.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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 GSN 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 payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\"\n },\n \"@chainlink/contracts/src/v0.6/vendor/SafeMathChainlink.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.0;\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeMathChainlink {\\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 * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 c = a + b;\\n require(c >= a, \\\"SafeMath: addition overflow\\\");\\n\\n return c;\\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 * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n uint256 c = a - b;\\n\\n return c;\\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 * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\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-solidity/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers. Reverts 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 * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n // Solidity only automatically asserts when dividing by 0\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n uint256 c = a / b;\\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * Reverts 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 * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b != 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\n }\\n}\\n\"\n },\n \"@chainlink/contracts/src/v0.6/interfaces/LinkTokenInterface.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.0;\\n\\ninterface LinkTokenInterface {\\n function allowance(address owner, address spender) external view returns (uint256 remaining);\\n function approve(address spender, uint256 value) external returns (bool success);\\n function balanceOf(address owner) external view returns (uint256 balance);\\n function decimals() external view returns (uint8 decimalPlaces);\\n function decreaseApproval(address spender, uint256 addedValue) external returns (bool success);\\n function increaseApproval(address spender, uint256 subtractedValue) external;\\n function name() external view returns (string memory tokenName);\\n function symbol() external view returns (string memory tokenSymbol);\\n function totalSupply() external view returns (uint256 totalTokensIssued);\\n function transfer(address to, uint256 value) external returns (bool success);\\n function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool success);\\n function transferFrom(address from, address to, uint256 value) external returns (bool success);\\n}\\n\"\n },\n \"@chainlink/contracts/src/v0.6/VRFRequestIDBase.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.0;\\n\\ncontract VRFRequestIDBase {\\n\\n /**\\n * @notice returns the seed which is actually input to the VRF coordinator\\n *\\n * @dev To prevent repetition of VRF output due to repetition of the\\n * @dev user-supplied seed, that seed is combined in a hash with the\\n * @dev user-specific nonce, and the address of the consuming contract. The\\n * @dev risk of repetition is mostly mitigated by inclusion of a blockhash in\\n * @dev the final seed, but the nonce does protect against repetition in\\n * @dev requests which are included in a single block.\\n *\\n * @param _userSeed VRF seed input provided by user\\n * @param _requester Address of the requesting contract\\n * @param _nonce User-specific nonce at the time of the request\\n */\\n function makeVRFInputSeed(bytes32 _keyHash, uint256 _userSeed,\\n address _requester, uint256 _nonce)\\n internal pure returns (uint256)\\n {\\n return uint256(keccak256(abi.encode(_keyHash, _userSeed, _requester, _nonce)));\\n }\\n\\n /**\\n * @notice Returns the id for this request\\n * @param _keyHash The serviceAgreement ID to be used for this request\\n * @param _vRFInputSeed The seed to be passed directly to the VRF\\n * @return The id for this request\\n *\\n * @dev Note that _vRFInputSeed is not the seed passed by the consuming\\n * @dev contract, but the one generated by makeVRFInputSeed\\n */\\n function makeRequestId(\\n bytes32 _keyHash, uint256 _vRFInputSeed) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(_keyHash, _vRFInputSeed));\\n }\\n}\\n\"\n },\n \"contracts/test/CouponMock.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.6 <0.9.0;\\n\\nimport \\\"../Coupon/Coupon.sol\\\";\\n\\n// DEBUG\\n\\nimport \\\"hardhat/console.sol\\\";\\n\\ncontract CouponMock is Coupon {\\n event Redemption(address account, uint256 rebate);\\n event RequestedRandomness(bytes32 requestId);\\n\\n uint256 internal secondsToAdd = 0;\\n\\n constructor(\\n address cryptorchidsAddress,\\n address _VRFCoordinator,\\n address _LinkToken,\\n bytes32 _keyhash\\n ) public payable Coupon(cryptorchidsAddress, _VRFCoordinator, _LinkToken, _keyhash) {}\\n\\n /**\\n * @dev calls checkEligibility and sets all eligibleTokens as redeemed.\\n * Then transfers caller rebateAmount.\\n */\\n function redeem() public virtual override returns (uint256) {\\n uint256 rebateAmount = super.redeem();\\n emit Redemption(msg.sender, rebateAmount);\\n return rebateAmount;\\n }\\n\\n function selectWinner(uint256 userProvidedSeed) public override {\\n super.selectWinner(userProvidedSeed);\\n emit RequestedRandomness(randomWinnerRequestId);\\n }\\n\\n function timeTravel(uint256 s) public {\\n secondsToAdd = s;\\n }\\n\\n function currentTime() internal view virtual override returns (uint256) {\\n return block.timestamp + secondsToAdd;\\n }\\n}\\n\"\n },\n \"hardhat/console.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity >= 0.4.22 <0.9.0;\\n\\nlibrary console {\\n\\taddress constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\\n\\n\\tfunction _sendLogPayload(bytes memory payload) private view {\\n\\t\\tuint256 payloadLength = payload.length;\\n\\t\\taddress consoleAddress = CONSOLE_ADDRESS;\\n\\t\\tassembly {\\n\\t\\t\\tlet payloadStart := add(payload, 32)\\n\\t\\t\\tlet r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\\n\\t\\t}\\n\\t}\\n\\n\\tfunction log() internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log()\\\"));\\n\\t}\\n\\n\\tfunction logInt(int p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(int)\\\", p0));\\n\\t}\\n\\n\\tfunction logUint(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction logString(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction logBool(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction logAddress(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes(bytes memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes1(bytes1 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes1)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes2(bytes2 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes2)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes3(bytes3 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes3)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes4(bytes4 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes4)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes5(bytes5 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes5)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes6(bytes6 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes6)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes7(bytes7 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes7)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes8(bytes8 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes8)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes9(bytes9 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes9)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes10(bytes10 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes10)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes11(bytes11 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes11)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes12(bytes12 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes12)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes13(bytes13 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes13)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes14(bytes14 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes14)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes15(bytes15 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes15)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes16(bytes16 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes16)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes17(bytes17 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes17)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes18(bytes18 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes18)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes19(bytes19 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes19)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes20(bytes20 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes20)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes21(bytes21 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes21)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes22(bytes22 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes22)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes23(bytes23 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes23)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes24(bytes24 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes24)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes25(bytes25 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes25)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes26(bytes26 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes26)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes27(bytes27 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes27)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes28(bytes28 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes28)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes29(bytes29 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes29)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes30(bytes30 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes30)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes31(bytes31 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes31)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes32(bytes32 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes32)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction log(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction log(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction log(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n}\\n\"\n },\n \"contracts/test/CurrentTimeMock.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.6 <0.9.0;\\n\\nimport \\\"../Libraries/CurrentTime.sol\\\";\\n\\ncontract CurrentTimeMock is CurrentTime {\\n uint256 internal secondsToAdd = 0;\\n}\\n\"\n },\n \"contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\n\\n// NB: this is only meant to deploy to goerli, where chainlink VRF is unavailable.\\n// goerli connects to polygon mumbai, which is what we need to test PoS bridging.\\n// Deploy scripts prevent other contracts from goerli deploy, and this contract from\\n// anything other than goerlui\\npragma solidity >=0.6.6 <0.9.0;\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"@openzeppelin/contracts/math/SafeMath.sol\\\";\\nimport \\\"@openzeppelin/contracts/presets/ERC721PresetMinterPauserAutoId.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/Counters.sol\\\";\\nimport \\\"../Libraries/CurrentTime.sol\\\";\\n\\ncontract CryptOrchidGoerli is ERC721PresetMinterPauserAutoId, Ownable, CurrentTime {\\n using SafeMath for uint256;\\n using Strings for string;\\n using Counters for Counters.Counter;\\n\\n struct CryptOrchid {\\n string species;\\n uint256 plantedAt;\\n uint256 waterLevel;\\n }\\n mapping(uint256 => CryptOrchid) public cryptorchids;\\n\\n enum Stage {Unsold, Seed, Flower, Dead}\\n\\n bool internal saleStarted = false;\\n bool internal growingStarted = false;\\n\\n uint256 public constant MAX_CRYPTORCHIDS = 10000;\\n uint256 public constant GROWTH_CYCLE = 604800; // 7 days\\n uint256 public constant WATERING_WINDOW = 10800; // 3 hours\\n uint256 internal constant MAX_TIMESTAMP = 2**256 - 1;\\n string internal constant GRANUM_IPFS = \\\"QmWd1mn7DuGyx9ByfNeqCsgdSUsJZ1cragitgaygsqDvEm\\\";\\n\\n uint16[10] private limits = [0, 3074, 6074, 8074, 9074, 9574, 9824, 9924, 9974, 9999];\\n string[10] private genum = [\\n \\\"shenzhenica orchidaceae\\\",\\n \\\"phalaenopsis micholitzii\\\",\\n \\\"guarianthe aurantiaca\\\",\\n \\\"vanda coerulea\\\",\\n \\\"cypripedium calceolus\\\",\\n \\\"paphiopedilum vietnamense\\\",\\n \\\"miltonia kayasimae\\\",\\n \\\"platanthera azorica\\\",\\n \\\"dendrophylax lindenii\\\",\\n \\\"paphiopedilum rothschildianum\\\"\\n ];\\n\\n string[10] private speciesIPFSConstant = [\\n \\\"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/shenzhenica-orchidaceae.json\\\",\\n \\\"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/phalaenopsis-micholitzii.json\\\",\\n \\\"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/guarianthe-aurantiaca.json\\\",\\n \\\"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/vanda-coerulea.json\\\",\\n \\\"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/cypripedium-calceolus.json\\\",\\n \\\"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/paphiopedilum-vietnamense.json\\\",\\n \\\"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/miltonia-kayasimae.json\\\",\\n \\\"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/platanthera-azorica.json\\\",\\n \\\"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/dendrophylax-lindenii.json\\\",\\n \\\"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/paphiopedilum-rothschildianum.json\\\"\\n ];\\n\\n string[10] private deadSpeciesIPFSConstant = [\\n \\\"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/shenzhenica-orchidaceae.json\\\",\\n \\\"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/phalaenopsis-micholitzii.json\\\",\\n \\\"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/guarianthe-aurantiaca.json\\\",\\n \\\"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/vanda-coerulea.json\\\",\\n \\\"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/cypripedium-calceolus.json\\\",\\n \\\"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/paphiopedilum-vietnamense.json\\\",\\n \\\"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/miltonia-kayasimae.json\\\",\\n \\\"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/platanthera-azorica.json\\\",\\n \\\"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/dendrophylax-lindenii.json\\\",\\n \\\"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/paphiopedilum-rothschildianum.json\\\"\\n ];\\n\\n Counters.Counter private _tokenIds;\\n\\n mapping(bytes32 => uint256) public requestToToken;\\n mapping(bytes32 => string) private speciesIPFS;\\n mapping(bytes32 => string) private deadSpeciesIPFS;\\n\\n constructor() public payable ERC721PresetMinterPauserAutoId(\\\"CryptOrchids\\\", \\\"ORCHD\\\", \\\"ipfs://\\\") {\\n for (uint256 index = 0; index < genum.length; index++) {\\n speciesIPFS[keccak256(abi.encode(genum[index]))] = speciesIPFSConstant[index];\\n deadSpeciesIPFS[keccak256(abi.encode(genum[index]))] = deadSpeciesIPFSConstant[index];\\n }\\n }\\n\\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\\n (string memory species, , , ) = getTokenMetadata(tokenId);\\n\\n if (growthStage(tokenId) == Stage.Seed) {\\n return string(abi.encodePacked(baseURI(), GRANUM_IPFS));\\n }\\n\\n if (growthStage(tokenId) == Stage.Flower) {\\n return string(abi.encodePacked(baseURI(), speciesIPFS[keccak256(abi.encode(species))]));\\n }\\n\\n return string(abi.encodePacked(baseURI(), deadSpeciesIPFS[keccak256(abi.encode(species))]));\\n }\\n\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 tokenId\\n ) internal virtual override {\\n require(address(0) == to || alive(tokenId), \\\"Dead CryptOrchids cannot be transferred\\\");\\n super._beforeTokenTransfer(from, to, tokenId);\\n }\\n\\n function currentPrice() public view returns (uint256 price) {\\n uint256 currentSupply = totalSupply();\\n if (currentSupply >= 9900) {\\n return 1000000000000000000; // 9900+: 1.00 ETH\\n } else if (currentSupply >= 9500) {\\n return 640000000000000000; // 9500-9500: 0.64 ETH\\n } else if (currentSupply >= 7500) {\\n return 320000000000000000; // 7500-9500: 0.32 ETH\\n } else if (currentSupply >= 3500) {\\n return 160000000000000000; // 3500-7500: 0.16 ETH\\n } else if (currentSupply >= 1500) {\\n return 80000000000000000; // 1500-3500: 0.08 ETH\\n } else if (currentSupply >= 500) {\\n return 60000000000000000; // 500-1500: 0.06 ETH\\n } else {\\n return 40000000000000000; // 0 - 500 0.04 ETH\\n }\\n }\\n\\n function startSale() public onlyOwner {\\n saleStarted = true;\\n }\\n\\n function startGrowing() public onlyOwner {\\n growingStarted = true;\\n }\\n\\n /**\\n * @dev Withdraw ether from this contract (Callable by owner only)\\n */\\n function withdraw() public onlyOwner {\\n uint256 balance = address(this).balance;\\n msg.sender.transfer(balance);\\n }\\n\\n receive() external payable {}\\n\\n function webMint(uint256 units) public payable {\\n require(saleStarted, \\\"The Nursery is closed\\\");\\n require(units <= MAX_CRYPTORCHIDS - totalSupply(), \\\"Not enough bulbs left\\\");\\n require(totalSupply() < MAX_CRYPTORCHIDS, \\\"Sale has already ended\\\");\\n require(units > 0 && units <= 20, \\\"You can plant minimum 1, maximum 20 CryptOrchids\\\");\\n require(SafeMath.add(totalSupply(), units) <= MAX_CRYPTORCHIDS, \\\"Exceeds MAX_CRYPTORCHIDS\\\");\\n require(msg.value >= SafeMath.mul(currentPrice(), units), \\\"Ether value sent is below the price\\\");\\n\\n for (uint256 i = 0; i < units; i++) {\\n _tokenIds.increment();\\n uint256 newItemId = _tokenIds.current();\\n cryptorchids[newItemId] = CryptOrchid({species: \\\"granum\\\", plantedAt: MAX_TIMESTAMP, waterLevel: 0});\\n _safeMint(msg.sender, newItemId);\\n }\\n }\\n\\n function germinate(uint256 tokenId, uint256 userProvidedSeed) public {\\n require(growingStarted, \\\"Germination starts 2021-04-12T16:00:00Z\\\");\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"Only the Owner can germinate a CryptOrchid.\\\");\\n _requestRandom(tokenId, userProvidedSeed);\\n }\\n\\n function _requestRandom(uint256 tokenId, uint256 userProvidedSeed) internal returns (bytes32 requestId) {\\n uint256 pseudoRand = uint256(keccak256(abi.encodePacked(block.timestamp, block.difficulty, userProvidedSeed)));\\n fulfillRandomness(tokenId, pseudoRand);\\n }\\n\\n function fulfillRandomness(uint256 tokenId, uint256 randomness) internal {\\n CryptOrchid storage orchid = cryptorchids[tokenId];\\n string memory species = pickSpecies(SafeMath.mod(randomness, 10000));\\n orchid.species = species;\\n orchid.plantedAt = currentTime();\\n address tokenOwner = ownerOf(tokenId);\\n }\\n\\n function alive(uint256 tokenId) public view returns (bool) {\\n return growthStage(tokenId) != Stage.Dead;\\n }\\n\\n function flowering(uint256 tokenId) public view returns (bool) {\\n return growthStage(tokenId) == Stage.Flower;\\n }\\n\\n function growthStage(uint256 tokenId) public view returns (Stage) {\\n CryptOrchid memory orchid = cryptorchids[tokenId];\\n if (orchid.plantedAt == 0) return Stage.Unsold;\\n if (orchid.plantedAt == MAX_TIMESTAMP) return Stage.Seed;\\n uint256 currentWaterLevel = orchid.waterLevel;\\n uint256 elapsed = currentTime() - orchid.plantedAt;\\n uint256 fullCycles = SafeMath.div(uint256(elapsed), GROWTH_CYCLE);\\n uint256 modulo = SafeMath.mod(elapsed, GROWTH_CYCLE);\\n\\n if (currentWaterLevel == fullCycles) {\\n return Stage.Flower;\\n }\\n\\n if (SafeMath.add(currentWaterLevel, 1) == fullCycles && modulo < WATERING_WINDOW) {\\n return Stage.Flower;\\n }\\n\\n return Stage.Dead;\\n }\\n\\n function water(uint256 tokenId) public {\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"Only the Owner can water a CryptOrchid.\\\");\\n\\n if (!alive(tokenId)) {\\n return;\\n }\\n\\n CryptOrchid storage orchid = cryptorchids[tokenId];\\n\\n uint256 wateringLevel = orchid.waterLevel;\\n uint256 elapsed = currentTime() - orchid.plantedAt;\\n uint256 fullCycles = SafeMath.div(uint256(elapsed), GROWTH_CYCLE);\\n\\n if (wateringLevel > fullCycles) {\\n return;\\n }\\n\\n uint256 newWaterLevel = SafeMath.add(wateringLevel, 1);\\n orchid.waterLevel = newWaterLevel;\\n }\\n\\n function getTokenMetadata(uint256 tokenId)\\n public\\n view\\n returns (\\n string memory,\\n uint256,\\n uint256,\\n Stage\\n )\\n {\\n return (\\n cryptorchids[tokenId].species,\\n cryptorchids[tokenId].plantedAt,\\n cryptorchids[tokenId].waterLevel,\\n growthStage(tokenId)\\n );\\n }\\n\\n /**\\n * @notice Pick species for random number index\\n * @param randomIndex uint256\\n * @return species string\\n */\\n function pickSpecies(uint256 randomIndex) private view returns (string memory) {\\n for (uint256 i = 0; i < 10; i++) {\\n if (randomIndex <= limits[i]) {\\n return genum[i];\\n }\\n }\\n }\\n}\\n\"\n },\n \"@openzeppelin/contracts/presets/ERC721PresetMinterPauserAutoId.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../access/AccessControl.sol\\\";\\nimport \\\"../utils/Context.sol\\\";\\nimport \\\"../utils/Counters.sol\\\";\\nimport \\\"../token/ERC721/ERC721.sol\\\";\\nimport \\\"../token/ERC721/ERC721Burnable.sol\\\";\\nimport \\\"../token/ERC721/ERC721Pausable.sol\\\";\\n\\n/**\\n * @dev {ERC721} token, including:\\n *\\n * - ability for holders to burn (destroy) their tokens\\n * - a minter role that allows for token minting (creation)\\n * - a pauser role that allows to stop all token transfers\\n * - token ID and URI autogeneration\\n *\\n * This contract uses {AccessControl} to lock permissioned functions using the\\n * different roles - head to its documentation for details.\\n *\\n * The account that deploys the contract will be granted the minter and pauser\\n * roles, as well as the default admin role, which will let it grant both minter\\n * and pauser roles to other accounts.\\n */\\ncontract ERC721PresetMinterPauserAutoId is Context, AccessControl, ERC721Burnable, ERC721Pausable {\\n using Counters for Counters.Counter;\\n\\n bytes32 public constant MINTER_ROLE = keccak256(\\\"MINTER_ROLE\\\");\\n bytes32 public constant PAUSER_ROLE = keccak256(\\\"PAUSER_ROLE\\\");\\n\\n Counters.Counter private _tokenIdTracker;\\n\\n /**\\n * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE` and `PAUSER_ROLE` to the\\n * account that deploys the contract.\\n *\\n * Token URIs will be autogenerated based on `baseURI` and their token IDs.\\n * See {ERC721-tokenURI}.\\n */\\n constructor(string memory name, string memory symbol, string memory baseURI) public ERC721(name, symbol) {\\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\\n\\n _setupRole(MINTER_ROLE, _msgSender());\\n _setupRole(PAUSER_ROLE, _msgSender());\\n\\n _setBaseURI(baseURI);\\n }\\n\\n /**\\n * @dev Creates a new token for `to`. Its token ID will be automatically\\n * assigned (and available on the emitted {IERC721-Transfer} event), and the token\\n * URI autogenerated based on the base URI passed at construction.\\n *\\n * See {ERC721-_mint}.\\n *\\n * Requirements:\\n *\\n * - the caller must have the `MINTER_ROLE`.\\n */\\n function mint(address to) public virtual {\\n require(hasRole(MINTER_ROLE, _msgSender()), \\\"ERC721PresetMinterPauserAutoId: must have minter role to mint\\\");\\n\\n // We cannot just use balanceOf to create the new tokenId because tokens\\n // can be burned (destroyed), so we need a separate counter.\\n _mint(to, _tokenIdTracker.current());\\n _tokenIdTracker.increment();\\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() public virtual {\\n require(hasRole(PAUSER_ROLE, _msgSender()), \\\"ERC721PresetMinterPauserAutoId: must have pauser role to pause\\\");\\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() public virtual {\\n require(hasRole(PAUSER_ROLE, _msgSender()), \\\"ERC721PresetMinterPauserAutoId: must have pauser role to unpause\\\");\\n _unpause();\\n }\\n\\n function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override(ERC721, ERC721Pausable) {\\n super._beforeTokenTransfer(from, to, tokenId);\\n }\\n}\\n\"\n },\n \"@openzeppelin/contracts/utils/Counters.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../math/SafeMath.sol\\\";\\n\\n/**\\n * @title Counters\\n * @author Matt Condon (@shrugs)\\n * @dev Provides counters that can only be incremented or decremented by one. This can be used e.g. to track the number\\n * of elements in a mapping, issuing ERC721 ids, or counting request ids.\\n *\\n * Include with `using Counters for Counters.Counter;`\\n * Since it is not possible to overflow a 256 bit integer with increments of one, `increment` can skip the {SafeMath}\\n * overflow check, thereby saving gas. This does assume however correct usage, in that the underlying `_value` is never\\n * directly accessed.\\n */\\nlibrary Counters {\\n using SafeMath for uint256;\\n\\n struct Counter {\\n // This variable should never be directly accessed by users of the library: interactions must be restricted to\\n // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\\n // this feature: see https://github.com/ethereum/solidity/issues/4637\\n uint256 _value; // default: 0\\n }\\n\\n function current(Counter storage counter) internal view returns (uint256) {\\n return counter._value;\\n }\\n\\n function increment(Counter storage counter) internal {\\n // The {SafeMath} overflow check can be skipped here, see the comment at the top\\n counter._value += 1;\\n }\\n\\n function decrement(Counter storage counter) internal {\\n counter._value = counter._value.sub(1);\\n }\\n}\\n\"\n },\n \"@openzeppelin/contracts/access/AccessControl.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../utils/EnumerableSet.sol\\\";\\nimport \\\"../utils/Address.sol\\\";\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms.\\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 * ```\\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 * ```\\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.\\n */\\nabstract contract AccessControl is Context {\\n using EnumerableSet for EnumerableSet.AddressSet;\\n using Address for address;\\n\\n struct RoleData {\\n EnumerableSet.AddressSet 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 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 {_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) public view returns (bool) {\\n return _roles[role].members.contains(account);\\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 returns (uint256) {\\n return _roles[role].members.length();\\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 returns (address) {\\n return _roles[role].members.at(index);\\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 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 function grantRole(bytes32 role, address account) public virtual {\\n require(hasRole(_roles[role].adminRole, _msgSender()), \\\"AccessControl: sender must be an admin to grant\\\");\\n\\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 function revokeRole(bytes32 role, address account) public virtual {\\n require(hasRole(_roles[role].adminRole, _msgSender()), \\\"AccessControl: sender must be an admin to revoke\\\");\\n\\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 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) public virtual {\\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 * [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 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 emit RoleAdminChanged(role, _roles[role].adminRole, adminRole);\\n _roles[role].adminRole = adminRole;\\n }\\n\\n function _grantRole(bytes32 role, address account) private {\\n if (_roles[role].members.add(account)) {\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (_roles[role].members.remove(account)) {\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n}\\n\"\n },\n \"@openzeppelin/contracts/token/ERC721/ERC721.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC721.sol\\\";\\nimport \\\"./IERC721Metadata.sol\\\";\\nimport \\\"./IERC721Enumerable.sol\\\";\\nimport \\\"./IERC721Receiver.sol\\\";\\nimport \\\"../../introspection/ERC165.sol\\\";\\nimport \\\"../../math/SafeMath.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/EnumerableSet.sol\\\";\\nimport \\\"../../utils/EnumerableMap.sol\\\";\\nimport \\\"../../utils/Strings.sol\\\";\\n\\n/**\\n * @title ERC721 Non-Fungible Token Standard basic implementation\\n * @dev see https://eips.ethereum.org/EIPS/eip-721\\n */\\ncontract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {\\n using SafeMath for uint256;\\n using Address for address;\\n using EnumerableSet for EnumerableSet.UintSet;\\n using EnumerableMap for EnumerableMap.UintToAddressMap;\\n using Strings for uint256;\\n\\n // Equals to `bytes4(keccak256(\\\"onERC721Received(address,address,uint256,bytes)\\\"))`\\n // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector`\\n bytes4 private constant _ERC721_RECEIVED = 0x150b7a02;\\n\\n // Mapping from holder address to their (enumerable) set of owned tokens\\n mapping (address => EnumerableSet.UintSet) private _holderTokens;\\n\\n // Enumerable mapping from token ids to their owners\\n EnumerableMap.UintToAddressMap private _tokenOwners;\\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 // Token name\\n string private _name;\\n\\n // Token symbol\\n string private _symbol;\\n\\n // Optional mapping for token URIs\\n mapping (uint256 => string) private _tokenURIs;\\n\\n // Base URI\\n string private _baseURI;\\n\\n /*\\n * bytes4(keccak256('balanceOf(address)')) == 0x70a08231\\n * bytes4(keccak256('ownerOf(uint256)')) == 0x6352211e\\n * bytes4(keccak256('approve(address,uint256)')) == 0x095ea7b3\\n * bytes4(keccak256('getApproved(uint256)')) == 0x081812fc\\n * bytes4(keccak256('setApprovalForAll(address,bool)')) == 0xa22cb465\\n * bytes4(keccak256('isApprovedForAll(address,address)')) == 0xe985e9c5\\n * bytes4(keccak256('transferFrom(address,address,uint256)')) == 0x23b872dd\\n * bytes4(keccak256('safeTransferFrom(address,address,uint256)')) == 0x42842e0e\\n * bytes4(keccak256('safeTransferFrom(address,address,uint256,bytes)')) == 0xb88d4fde\\n *\\n * => 0x70a08231 ^ 0x6352211e ^ 0x095ea7b3 ^ 0x081812fc ^\\n * 0xa22cb465 ^ 0xe985e9c5 ^ 0x23b872dd ^ 0x42842e0e ^ 0xb88d4fde == 0x80ac58cd\\n */\\n bytes4 private constant _INTERFACE_ID_ERC721 = 0x80ac58cd;\\n\\n /*\\n * bytes4(keccak256('name()')) == 0x06fdde03\\n * bytes4(keccak256('symbol()')) == 0x95d89b41\\n * bytes4(keccak256('tokenURI(uint256)')) == 0xc87b56dd\\n *\\n * => 0x06fdde03 ^ 0x95d89b41 ^ 0xc87b56dd == 0x5b5e139f\\n */\\n bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x5b5e139f;\\n\\n /*\\n * bytes4(keccak256('totalSupply()')) == 0x18160ddd\\n * bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) == 0x2f745c59\\n * bytes4(keccak256('tokenByIndex(uint256)')) == 0x4f6ccce7\\n *\\n * => 0x18160ddd ^ 0x2f745c59 ^ 0x4f6ccce7 == 0x780e9d63\\n */\\n bytes4 private constant _INTERFACE_ID_ERC721_ENUMERABLE = 0x780e9d63;\\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_) public {\\n _name = name_;\\n _symbol = symbol_;\\n\\n // register the supported interfaces to conform to ERC721 via ERC165\\n _registerInterface(_INTERFACE_ID_ERC721);\\n _registerInterface(_INTERFACE_ID_ERC721_METADATA);\\n _registerInterface(_INTERFACE_ID_ERC721_ENUMERABLE);\\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: balance query for the zero address\\\");\\n return _holderTokens[owner].length();\\n }\\n\\n /**\\n * @dev See {IERC721-ownerOf}.\\n */\\n function ownerOf(uint256 tokenId) public view virtual override returns (address) {\\n return _tokenOwners.get(tokenId, \\\"ERC721: owner query for nonexistent token\\\");\\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 require(_exists(tokenId), \\\"ERC721Metadata: URI query for nonexistent token\\\");\\n\\n string memory _tokenURI = _tokenURIs[tokenId];\\n string memory base = baseURI();\\n\\n // If there is no base URI, return the token URI.\\n if (bytes(base).length == 0) {\\n return _tokenURI;\\n }\\n // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked).\\n if (bytes(_tokenURI).length > 0) {\\n return string(abi.encodePacked(base, _tokenURI));\\n }\\n // If there is a baseURI but no tokenURI, concatenate the tokenID to the baseURI.\\n return string(abi.encodePacked(base, tokenId.toString()));\\n }\\n\\n /**\\n * @dev Returns the base URI set via {_setBaseURI}. This will be\\n * automatically added as a prefix in {tokenURI} to each token's URI, or\\n * to the token ID if no specific URI is set for that token ID.\\n */\\n function baseURI() public view virtual returns (string memory) {\\n return _baseURI;\\n }\\n\\n /**\\n * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.\\n */\\n function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {\\n return _holderTokens[owner].at(index);\\n }\\n\\n /**\\n * @dev See {IERC721Enumerable-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n // _tokenOwners are indexed by tokenIds, so .length() returns the number of tokenIds\\n return _tokenOwners.length();\\n }\\n\\n /**\\n * @dev See {IERC721Enumerable-tokenByIndex}.\\n */\\n function tokenByIndex(uint256 index) public view virtual override returns (uint256) {\\n (uint256 tokenId, ) = _tokenOwners.at(index);\\n return tokenId;\\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(_msgSender() == owner || ERC721.isApprovedForAll(owner, _msgSender()),\\n \\\"ERC721: approve caller is not owner nor 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 require(_exists(tokenId), \\\"ERC721: approved query for nonexistent token\\\");\\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 require(operator != _msgSender(), \\\"ERC721: approve to caller\\\");\\n\\n _operatorApprovals[_msgSender()][operator] = approved;\\n emit ApprovalForAll(_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: transfer caller is not owner nor 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: transfer caller is not owner nor 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 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 _tokenOwners.contains(tokenId);\\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 require(_exists(tokenId), \\\"ERC721: operator query for nonexistent token\\\");\\n address owner = ERC721.ownerOf(tokenId);\\n return (spender == owner || getApproved(tokenId) == spender || ERC721.isApprovedForAll(owner, spender));\\n }\\n\\n /**\\n * @dev Safely mints `tokenId` and transfers it to `to`.\\n *\\n * Requirements:\\n d*\\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(_checkOnERC721Received(address(0), to, tokenId, _data), \\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\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);\\n\\n _holderTokens[to].add(tokenId);\\n\\n _tokenOwners.set(tokenId, to);\\n\\n emit Transfer(address(0), to, tokenId);\\n }\\n\\n /**\\n * @dev Destroys `tokenId`.\\n * The approval is cleared when the token is burned.\\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); // internal owner\\n\\n _beforeTokenTransfer(owner, address(0), tokenId);\\n\\n // Clear approvals\\n _approve(address(0), tokenId);\\n\\n // Clear metadata (if any)\\n if (bytes(_tokenURIs[tokenId]).length != 0) {\\n delete _tokenURIs[tokenId];\\n }\\n\\n _holderTokens[owner].remove(tokenId);\\n\\n _tokenOwners.remove(tokenId);\\n\\n emit Transfer(owner, address(0), tokenId);\\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 of token that is not own\\\"); // internal owner\\n require(to != address(0), \\\"ERC721: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, tokenId);\\n\\n // Clear approvals from the previous owner\\n _approve(address(0), tokenId);\\n\\n _holderTokens[from].remove(tokenId);\\n _holderTokens[to].add(tokenId);\\n\\n _tokenOwners.set(tokenId, to);\\n\\n emit Transfer(from, to, tokenId);\\n }\\n\\n /**\\n * @dev Sets `_tokenURI` as the tokenURI of `tokenId`.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual {\\n require(_exists(tokenId), \\\"ERC721Metadata: URI set of nonexistent token\\\");\\n _tokenURIs[tokenId] = _tokenURI;\\n }\\n\\n /**\\n * @dev Internal function to set the base URI for all token IDs. It is\\n * automatically added as a prefix to the value returned in {tokenURI},\\n * or to the token ID if {tokenURI} is empty.\\n */\\n function _setBaseURI(string memory baseURI_) internal virtual {\\n _baseURI = baseURI_;\\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(address from, address to, uint256 tokenId, bytes memory _data)\\n private returns (bool)\\n {\\n if (!to.isContract()) {\\n return true;\\n }\\n bytes memory returndata = to.functionCall(abi.encodeWithSelector(\\n IERC721Receiver(to).onERC721Received.selector,\\n _msgSender(),\\n from,\\n tokenId,\\n _data\\n ), \\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n bytes4 retval = abi.decode(returndata, (bytes4));\\n return (retval == _ERC721_RECEIVED);\\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); // internal owner\\n }\\n\\n /**\\n * @dev Hook that is called before any token transfer. This includes minting\\n * and burning.\\n *\\n * Calling conditions:\\n *\\n * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be\\n * transferred to `to`.\\n * - When `from` is zero, `tokenId` will be minted for `to`.\\n * - When `to` is zero, ``from``'s `tokenId` will be burned.\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\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 tokenId) internal virtual { }\\n}\\n\"\n },\n \"@openzeppelin/contracts/token/ERC721/ERC721Burnable.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./ERC721.sol\\\";\\n\\n/**\\n * @title ERC721 Burnable Token\\n * @dev ERC721 Token that can be irreversibly 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), \\\"ERC721Burnable: caller is not owner nor approved\\\");\\n _burn(tokenId);\\n }\\n}\\n\"\n },\n \"@openzeppelin/contracts/token/ERC721/ERC721Pausable.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./ERC721.sol\\\";\\nimport \\\"../../utils/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 */\\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(address from, address to, uint256 tokenId) internal virtual override {\\n super._beforeTokenTransfer(from, to, tokenId);\\n\\n require(!paused(), \\\"ERC721Pausable: token transfer while paused\\\");\\n }\\n}\\n\"\n },\n \"@openzeppelin/contracts/utils/EnumerableSet.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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 * ```\\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 */\\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\\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) { // 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 // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs\\n // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\\n\\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] = toDeleteIndex + 1; // All indexes are 1-based\\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 require(set._values.length > index, \\\"EnumerableSet: index out of bounds\\\");\\n return set._values[index];\\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 // 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 // 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 on 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 },\n \"@openzeppelin/contracts/utils/Address.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\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 */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n // solhint-disable-next-line no-inline-assembly\\n assembly { size := extcodesize(account) }\\n return size > 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://diligence.consensys.net/posts/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.5.11/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 // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\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 functionCall(target, data, \\\"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(address target, bytes memory data, string memory errorMessage) 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(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.call{ value: value }(data);\\n return _verifyCallResult(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(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(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(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\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\\n // solhint-disable-next-line no-inline-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}\\n\"\n },\n \"@openzeppelin/contracts/token/ERC721/IERC721.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\nimport \\\"../../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`, 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 be 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: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\\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 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 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 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 /**\\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 },\n \"@openzeppelin/contracts/token/ERC721/IERC721Metadata.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <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 /**\\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\"\n },\n \"@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <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 /**\\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 tokenId);\\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\"\n },\n \"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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 `IERC721.onERC721Received.selector`.\\n */\\n function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) external returns (bytes4);\\n}\\n\"\n },\n \"@openzeppelin/contracts/introspection/ERC165.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts may inherit from this and call {_registerInterface} to declare\\n * their support of an interface.\\n */\\nabstract contract ERC165 is IERC165 {\\n /*\\n * bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7\\n */\\n bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7;\\n\\n /**\\n * @dev Mapping of interface ids to whether or not it's supported.\\n */\\n mapping(bytes4 => bool) private _supportedInterfaces;\\n\\n constructor () internal {\\n // Derived contracts need only register support for their own interfaces,\\n // we register support for ERC165 itself here\\n _registerInterface(_INTERFACE_ID_ERC165);\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n *\\n * Time complexity O(1), guaranteed to always use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return _supportedInterfaces[interfaceId];\\n }\\n\\n /**\\n * @dev Registers the contract as an implementer of the interface defined by\\n * `interfaceId`. Support of the actual ERC165 interface is automatic and\\n * registering its interface id is not required.\\n *\\n * See {IERC165-supportsInterface}.\\n *\\n * Requirements:\\n *\\n * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`).\\n */\\n function _registerInterface(bytes4 interfaceId) internal virtual {\\n require(interfaceId != 0xffffffff, \\\"ERC165: invalid interface id\\\");\\n _supportedInterfaces[interfaceId] = true;\\n }\\n}\\n\"\n },\n \"@openzeppelin/contracts/utils/EnumerableMap.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Library for managing an enumerable variant of Solidity's\\n * https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]\\n * type.\\n *\\n * Maps have the following properties:\\n *\\n * - Entries are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Entries are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableMap for EnumerableMap.UintToAddressMap;\\n *\\n * // Declare a set state variable\\n * EnumerableMap.UintToAddressMap private myMap;\\n * }\\n * ```\\n *\\n * As of v3.0.0, only maps of type `uint256 -> address` (`UintToAddressMap`) are\\n * supported.\\n */\\nlibrary EnumerableMap {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Map type with\\n // bytes32 keys and values.\\n // The Map implementation uses private functions, and user-facing\\n // implementations (such as Uint256ToAddressMap) are just wrappers around\\n // the underlying Map.\\n // This means that we can only create new EnumerableMaps for types that fit\\n // in bytes32.\\n\\n struct MapEntry {\\n bytes32 _key;\\n bytes32 _value;\\n }\\n\\n struct Map {\\n // Storage of map keys and values\\n MapEntry[] _entries;\\n\\n // Position of the entry defined by a key in the `entries` array, plus 1\\n // because index 0 means a key is not in the map.\\n mapping (bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Adds a key-value pair to a map, or updates the value for an existing\\n * key. O(1).\\n *\\n * Returns true if the key was added to the map, that is if it was not\\n * already present.\\n */\\n function _set(Map storage map, bytes32 key, bytes32 value) private returns (bool) {\\n // We read and store the key's index to prevent multiple reads from the same storage slot\\n uint256 keyIndex = map._indexes[key];\\n\\n if (keyIndex == 0) { // Equivalent to !contains(map, key)\\n map._entries.push(MapEntry({ _key: key, _value: value }));\\n // The entry is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n map._indexes[key] = map._entries.length;\\n return true;\\n } else {\\n map._entries[keyIndex - 1]._value = value;\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a key-value pair from a map. O(1).\\n *\\n * Returns true if the key was removed from the map, that is if it was present.\\n */\\n function _remove(Map storage map, bytes32 key) private returns (bool) {\\n // We read and store the key's index to prevent multiple reads from the same storage slot\\n uint256 keyIndex = map._indexes[key];\\n\\n if (keyIndex != 0) { // Equivalent to contains(map, key)\\n // To delete a key-value pair from the _entries array in O(1), we swap the entry to delete with the last one\\n // in the array, and then remove the last entry (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = keyIndex - 1;\\n uint256 lastIndex = map._entries.length - 1;\\n\\n // When the entry to delete is the last one, the swap operation is unnecessary. However, since this occurs\\n // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\\n\\n MapEntry storage lastEntry = map._entries[lastIndex];\\n\\n // Move the last entry to the index where the entry to delete is\\n map._entries[toDeleteIndex] = lastEntry;\\n // Update the index for the moved entry\\n map._indexes[lastEntry._key] = toDeleteIndex + 1; // All indexes are 1-based\\n\\n // Delete the slot where the moved entry was stored\\n map._entries.pop();\\n\\n // Delete the index for the deleted slot\\n delete map._indexes[key];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the key is in the map. O(1).\\n */\\n function _contains(Map storage map, bytes32 key) private view returns (bool) {\\n return map._indexes[key] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of key-value pairs in the map. O(1).\\n */\\n function _length(Map storage map) private view returns (uint256) {\\n return map._entries.length;\\n }\\n\\n /**\\n * @dev Returns the key-value pair stored at position `index` in the map. O(1).\\n *\\n * Note that there are no guarantees on the ordering of entries inside the\\n * array, and it may change when more entries are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Map storage map, uint256 index) private view returns (bytes32, bytes32) {\\n require(map._entries.length > index, \\\"EnumerableMap: index out of bounds\\\");\\n\\n MapEntry storage entry = map._entries[index];\\n return (entry._key, entry._value);\\n }\\n\\n /**\\n * @dev Tries to returns the value associated with `key`. O(1).\\n * Does not revert if `key` is not in the map.\\n */\\n function _tryGet(Map storage map, bytes32 key) private view returns (bool, bytes32) {\\n uint256 keyIndex = map._indexes[key];\\n if (keyIndex == 0) return (false, 0); // Equivalent to contains(map, key)\\n return (true, map._entries[keyIndex - 1]._value); // All indexes are 1-based\\n }\\n\\n /**\\n * @dev Returns the value associated with `key`. O(1).\\n *\\n * Requirements:\\n *\\n * - `key` must be in the map.\\n */\\n function _get(Map storage map, bytes32 key) private view returns (bytes32) {\\n uint256 keyIndex = map._indexes[key];\\n require(keyIndex != 0, \\\"EnumerableMap: nonexistent key\\\"); // Equivalent to contains(map, key)\\n return map._entries[keyIndex - 1]._value; // All indexes are 1-based\\n }\\n\\n /**\\n * @dev Same as {_get}, with a custom error message when `key` is not in the map.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {_tryGet}.\\n */\\n function _get(Map storage map, bytes32 key, string memory errorMessage) private view returns (bytes32) {\\n uint256 keyIndex = map._indexes[key];\\n require(keyIndex != 0, errorMessage); // Equivalent to contains(map, key)\\n return map._entries[keyIndex - 1]._value; // All indexes are 1-based\\n }\\n\\n // UintToAddressMap\\n\\n struct UintToAddressMap {\\n Map _inner;\\n }\\n\\n /**\\n * @dev Adds a key-value pair to a map, or updates the value for an existing\\n * key. O(1).\\n *\\n * Returns true if the key was added to the map, that is if it was not\\n * already present.\\n */\\n function set(UintToAddressMap storage map, uint256 key, address value) internal returns (bool) {\\n return _set(map._inner, bytes32(key), bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the key was removed from the map, that is if it was present.\\n */\\n function remove(UintToAddressMap storage map, uint256 key) internal returns (bool) {\\n return _remove(map._inner, bytes32(key));\\n }\\n\\n /**\\n * @dev Returns true if the key is in the map. O(1).\\n */\\n function contains(UintToAddressMap storage map, uint256 key) internal view returns (bool) {\\n return _contains(map._inner, bytes32(key));\\n }\\n\\n /**\\n * @dev Returns the number of elements in the map. O(1).\\n */\\n function length(UintToAddressMap storage map) internal view returns (uint256) {\\n return _length(map._inner);\\n }\\n\\n /**\\n * @dev Returns the element stored at position `index` in the set. O(1).\\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(UintToAddressMap storage map, uint256 index) internal view returns (uint256, address) {\\n (bytes32 key, bytes32 value) = _at(map._inner, index);\\n return (uint256(key), address(uint160(uint256(value))));\\n }\\n\\n /**\\n * @dev Tries to returns the value associated with `key`. O(1).\\n * Does not revert if `key` is not in the map.\\n *\\n * _Available since v3.4._\\n */\\n function tryGet(UintToAddressMap storage map, uint256 key) internal view returns (bool, address) {\\n (bool success, bytes32 value) = _tryGet(map._inner, bytes32(key));\\n return (success, address(uint160(uint256(value))));\\n }\\n\\n /**\\n * @dev Returns the value associated with `key`. O(1).\\n *\\n * Requirements:\\n *\\n * - `key` must be in the map.\\n */\\n function get(UintToAddressMap storage map, uint256 key) internal view returns (address) {\\n return address(uint160(uint256(_get(map._inner, bytes32(key)))));\\n }\\n\\n /**\\n * @dev Same as {get}, with a custom error message when `key` is not in the map.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryGet}.\\n */\\n function get(UintToAddressMap storage map, uint256 key, string memory errorMessage) internal view returns (address) {\\n return address(uint160(uint256(_get(map._inner, bytes32(key), errorMessage))));\\n }\\n}\\n\"\n },\n \"@openzeppelin/contracts/utils/Strings.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n uint256 index = digits - 1;\\n temp = value;\\n while (temp != 0) {\\n buffer[index--] = bytes1(uint8(48 + temp % 10));\\n temp /= 10;\\n }\\n return string(buffer);\\n }\\n}\\n\"\n },\n \"@openzeppelin/contracts/introspection/IERC165.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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\"\n },\n \"@openzeppelin/contracts/utils/Pausable.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./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 () internal {\\n _paused = false;\\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 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 require(!paused(), \\\"Pausable: paused\\\");\\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 require(paused(), \\\"Pausable: not paused\\\");\\n _;\\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\"\n },\n \"contracts/Libraries/matic/tunnel/BaseRootTunnel.sol\": {\n \"content\": \"pragma solidity ^0.6.6;\\n\\n\\nimport {SafeMath} from \\\"@openzeppelin/contracts/math/SafeMath.sol\\\";\\n\\nimport {AccessControlMixin} from \\\"../common/AccessControlMixin.sol\\\";\\nimport {IStateSender} from \\\"../root/StateSender/IStateSender.sol\\\";\\nimport {RLPReader} from \\\"../lib/RLPReader.sol\\\";\\nimport {MerklePatriciaProof} from \\\"../lib/MerklePatriciaProof.sol\\\";\\nimport {ICheckpointManager} from \\\"../root/ICheckpointManager.sol\\\";\\nimport {RLPReader} from \\\"../lib/RLPReader.sol\\\";\\nimport {Merkle} from \\\"../lib/Merkle.sol\\\";\\n\\nabstract contract BaseRootTunnel is AccessControlMixin {\\n using RLPReader for bytes;\\n using RLPReader for RLPReader.RLPItem;\\n using Merkle for bytes32;\\n using SafeMath for uint256;\\n\\n // keccak256(MessageSent(bytes))\\n bytes32 public constant SEND_MESSAGE_EVENT_SIG = 0x8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036;\\n\\n // state sender contract\\n IStateSender public stateSender;\\n // root chain manager\\n ICheckpointManager public checkpointManager;\\n // child tunnel contract which receives and sends messages \\n address public childTunnel;\\n // storage to avoid duplicate exits\\n mapping(bytes32 => bool) public processedExits;\\n\\n constructor() internal {\\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n _setupContractId(\\\"RootTunnel\\\");\\n }\\n\\n /**\\n * @notice Set the state sender, callable only by admins\\n * @dev This should be the state sender from plasma contracts\\n * It is used to send bytes from root to child chain\\n * @param newStateSender address of state sender contract\\n */\\n function setStateSender(address newStateSender)\\n external\\n only(DEFAULT_ADMIN_ROLE)\\n {\\n stateSender = IStateSender(newStateSender);\\n }\\n\\n /**\\n * @notice Set the checkpoint manager, callable only by admins\\n * @dev This should be the plasma contract responsible for keeping track of checkpoints\\n * @param newCheckpointManager address of checkpoint manager contract\\n */\\n function setCheckpointManager(address newCheckpointManager)\\n external\\n only(DEFAULT_ADMIN_ROLE)\\n {\\n checkpointManager = ICheckpointManager(newCheckpointManager);\\n }\\n\\n /**\\n * @notice Set the child chain tunnel, callable only by admins\\n * @dev This should be the contract responsible to receive data bytes on child chain\\n * @param newChildTunnel address of child tunnel contract\\n */\\n function setChildTunnel(address newChildTunnel)\\n external\\n only(DEFAULT_ADMIN_ROLE)\\n {\\n require(newChildTunnel != address(0x0), \\\"RootTunnel: INVALID_CHILD_TUNNEL_ADDRESS\\\");\\n childTunnel = newChildTunnel;\\n }\\n\\n /**\\n * @notice Send bytes message to Child Tunnel\\n * @param message bytes message that will be sent to Child Tunnel\\n * some message examples -\\n * abi.encode(tokenId);\\n * abi.encode(tokenId, tokenMetadata);\\n * abi.encode(messageType, messageData);\\n */\\n function _sendMessageToChild(bytes memory message) internal {\\n stateSender.syncState(childTunnel, message);\\n }\\n\\n function _validateAndExtractMessage(bytes memory inputData) internal returns (bytes memory) {\\n RLPReader.RLPItem[] memory inputDataRLPList = inputData\\n .toRlpItem()\\n .toList();\\n\\n // checking if exit has already been processed\\n // unique exit is identified using hash of (blockNumber, branchMask, receiptLogIndex)\\n bytes32 exitHash = keccak256(\\n abi.encodePacked(\\n inputDataRLPList[2].toUint(), // blockNumber\\n // first 2 nibbles are dropped while generating nibble array\\n // this allows branch masks that are valid but bypass exitHash check (changing first 2 nibbles only)\\n // so converting to nibble array and then hashing it\\n MerklePatriciaProof._getNibbleArray(inputDataRLPList[8].toBytes()), // branchMask\\n inputDataRLPList[9].toUint() // receiptLogIndex\\n )\\n );\\n require(\\n processedExits[exitHash] == false,\\n \\\"RootTunnel: EXIT_ALREADY_PROCESSED\\\"\\n );\\n processedExits[exitHash] = true;\\n\\n RLPReader.RLPItem[] memory receiptRLPList = inputDataRLPList[6]\\n .toBytes()\\n .toRlpItem()\\n .toList();\\n RLPReader.RLPItem memory logRLP = receiptRLPList[3]\\n .toList()[\\n inputDataRLPList[9].toUint() // receiptLogIndex\\n ];\\n\\n RLPReader.RLPItem[] memory logRLPList = logRLP.toList();\\n \\n // check child tunnel\\n require(childTunnel == RLPReader.toAddress(logRLPList[0]), \\\"RootTunnel: INVALID_CHILD_TUNNEL\\\");\\n\\n // verify receipt inclusion\\n require(\\n MerklePatriciaProof.verify(\\n inputDataRLPList[6].toBytes(), // receipt\\n inputDataRLPList[8].toBytes(), // branchMask\\n inputDataRLPList[7].toBytes(), // receiptProof\\n bytes32(inputDataRLPList[5].toUint()) // receiptRoot\\n ),\\n \\\"RootTunnel: INVALID_RECEIPT_PROOF\\\"\\n );\\n\\n // verify checkpoint inclusion\\n _checkBlockMembershipInCheckpoint(\\n inputDataRLPList[2].toUint(), // blockNumber\\n inputDataRLPList[3].toUint(), // blockTime\\n bytes32(inputDataRLPList[4].toUint()), // txRoot\\n bytes32(inputDataRLPList[5].toUint()), // receiptRoot\\n inputDataRLPList[0].toUint(), // headerNumber\\n inputDataRLPList[1].toBytes() // blockProof\\n );\\n\\n RLPReader.RLPItem[] memory logTopicRLPList = logRLPList[1].toList(); // topics\\n\\n require(\\n bytes32(logTopicRLPList[0].toUint()) == SEND_MESSAGE_EVENT_SIG, // topic0 is event sig\\n \\\"RootTunnel: INVALID_SIGNATURE\\\"\\n );\\n\\n // received message data\\n bytes memory receivedData = logRLPList[2].toBytes();\\n (bytes memory message) = abi.decode(receivedData, (bytes)); // event decodes params again, so decoding bytes to get message\\n return message;\\n }\\n\\n function _checkBlockMembershipInCheckpoint(\\n uint256 blockNumber,\\n uint256 blockTime,\\n bytes32 txRoot,\\n bytes32 receiptRoot,\\n uint256 headerNumber,\\n bytes memory blockProof\\n ) private view returns (uint256) {\\n (\\n bytes32 headerRoot,\\n uint256 startBlock,\\n ,\\n uint256 createdAt,\\n\\n ) = checkpointManager.headerBlocks(headerNumber);\\n\\n require(\\n keccak256(\\n abi.encodePacked(blockNumber, blockTime, txRoot, receiptRoot)\\n )\\n .checkMembership(\\n blockNumber.sub(startBlock),\\n headerRoot,\\n blockProof\\n ),\\n \\\"RootTunnel: INVALID_HEADER\\\"\\n );\\n return createdAt;\\n }\\n\\n /**\\n * @notice receive message from L2 to L1, validated by proof\\n * @dev This function verifies if the transaction actually happened on child chain\\n *\\n * @param inputData RLP encoded data of the reference tx containing following list of fields\\n * 0 - headerNumber - Checkpoint header block number containing the reference tx\\n * 1 - blockProof - Proof that the block header (in the child chain) is a leaf in the submitted merkle root\\n * 2 - blockNumber - Block number containing the reference tx on child chain\\n * 3 - blockTime - Reference tx block time\\n * 4 - txRoot - Transactions root of block\\n * 5 - receiptRoot - Receipts root of block\\n * 6 - receipt - Receipt of the reference transaction\\n * 7 - receiptProof - Merkle proof of the reference receipt\\n * 8 - branchMask - 32 bits denoting the path of receipt in merkle tree\\n * 9 - receiptLogIndex - Log Index to read from the receipt\\n */\\n function receiveMessage(bytes memory inputData) public virtual {\\n bytes memory message = _validateAndExtractMessage(inputData);\\n _processMessageFromChild(message);\\n }\\n\\n /**\\n * @notice Process message received from Child Tunnel\\n * @dev function needs to be implemented to handle message as per requirement\\n * This is called by onStateReceive function.\\n * Since it is called via a system call, any event will not be emitted during its execution.\\n * @param message bytes message that was sent from Child Tunnel\\n */\\n function _processMessageFromChild(bytes memory message) virtual internal;\\n}\\n\"\n },\n \"contracts/Libraries/matic/common/AccessControlMixin.sol\": {\n \"content\": \"pragma solidity 0.6.6;\\n\\nimport {AccessControl} from \\\"@openzeppelin/contracts/access/AccessControl.sol\\\";\\n\\ncontract AccessControlMixin is AccessControl {\\n string private _revertMsg;\\n function _setupContractId(string memory contractId) internal {\\n _revertMsg = string(abi.encodePacked(contractId, \\\": INSUFFICIENT_PERMISSIONS\\\"));\\n }\\n\\n modifier only(bytes32 role) {\\n require(\\n hasRole(role, _msgSender()),\\n _revertMsg\\n );\\n _;\\n }\\n}\\n\"\n },\n \"contracts/Libraries/matic/root/StateSender/IStateSender.sol\": {\n \"content\": \"pragma solidity 0.6.6;\\n\\ninterface IStateSender {\\n function syncState(address receiver, bytes calldata data) external;\\n}\\n\"\n },\n \"contracts/Libraries/matic/lib/RLPReader.sol\": {\n \"content\": \"/*\\n * @author Hamdi Allam hamdi.allam97@gmail.com\\n * Please reach out with any questions or concerns\\n * https://github.com/hamdiallam/Solidity-RLP/blob/e681e25a376dbd5426b509380bc03446f05d0f97/contracts/RLPReader.sol\\n */\\npragma solidity 0.6.6;\\n\\nlibrary RLPReader {\\n uint8 constant STRING_SHORT_START = 0x80;\\n uint8 constant STRING_LONG_START = 0xb8;\\n uint8 constant LIST_SHORT_START = 0xc0;\\n uint8 constant LIST_LONG_START = 0xf8;\\n uint8 constant WORD_SIZE = 32;\\n\\n struct RLPItem {\\n uint256 len;\\n uint256 memPtr;\\n }\\n\\n /*\\n * @param item RLP encoded bytes\\n */\\n function toRlpItem(bytes memory item)\\n internal\\n pure\\n returns (RLPItem memory)\\n {\\n require(item.length > 0, \\\"RLPReader: INVALID_BYTES_LENGTH\\\");\\n uint256 memPtr;\\n assembly {\\n memPtr := add(item, 0x20)\\n }\\n\\n return RLPItem(item.length, memPtr);\\n }\\n\\n /*\\n * @param item RLP encoded list in bytes\\n */\\n function toList(RLPItem memory item)\\n internal\\n pure\\n returns (RLPItem[] memory)\\n {\\n require(isList(item), \\\"RLPReader: ITEM_NOT_LIST\\\");\\n\\n uint256 items = numItems(item);\\n RLPItem[] memory result = new RLPItem[](items);\\n uint256 listLength = _itemLength(item.memPtr);\\n require(listLength == item.len, \\\"RLPReader: LIST_DECODED_LENGTH_MISMATCH\\\");\\n\\n uint256 memPtr = item.memPtr + _payloadOffset(item.memPtr);\\n uint256 dataLen;\\n for (uint256 i = 0; i < items; i++) {\\n dataLen = _itemLength(memPtr);\\n result[i] = RLPItem(dataLen, memPtr);\\n memPtr = memPtr + dataLen;\\n }\\n\\n return result;\\n }\\n\\n // @return indicator whether encoded payload is a list. negate this function call for isData.\\n function isList(RLPItem memory item) internal pure returns (bool) {\\n uint8 byte0;\\n uint256 memPtr = item.memPtr;\\n assembly {\\n byte0 := byte(0, mload(memPtr))\\n }\\n\\n if (byte0 < LIST_SHORT_START) return false;\\n return true;\\n }\\n\\n /** RLPItem conversions into data types **/\\n\\n // @returns raw rlp encoding in bytes\\n function toRlpBytes(RLPItem memory item)\\n internal\\n pure\\n returns (bytes memory)\\n {\\n bytes memory result = new bytes(item.len);\\n\\n uint256 ptr;\\n assembly {\\n ptr := add(0x20, result)\\n }\\n\\n copy(item.memPtr, ptr, item.len);\\n return result;\\n }\\n\\n function toAddress(RLPItem memory item) internal pure returns (address) {\\n require(!isList(item), \\\"RLPReader: DECODING_LIST_AS_ADDRESS\\\");\\n // 1 byte for the length prefix\\n require(item.len == 21, \\\"RLPReader: INVALID_ADDRESS_LENGTH\\\");\\n\\n return address(toUint(item));\\n }\\n\\n function toUint(RLPItem memory item) internal pure returns (uint256) {\\n require(!isList(item), \\\"RLPReader: DECODING_LIST_AS_UINT\\\");\\n require(item.len <= 33, \\\"RLPReader: INVALID_UINT_LENGTH\\\");\\n\\n uint256 itemLength = _itemLength(item.memPtr);\\n require(itemLength == item.len, \\\"RLPReader: UINT_DECODED_LENGTH_MISMATCH\\\");\\n\\n uint256 offset = _payloadOffset(item.memPtr);\\n uint256 len = item.len - offset;\\n uint256 result;\\n uint256 memPtr = item.memPtr + offset;\\n assembly {\\n result := mload(memPtr)\\n\\n // shfit to the correct location if neccesary\\n if lt(len, 32) {\\n result := div(result, exp(256, sub(32, len)))\\n }\\n }\\n\\n return result;\\n }\\n\\n // enforces 32 byte length\\n function toUintStrict(RLPItem memory item) internal pure returns (uint256) {\\n uint256 itemLength = _itemLength(item.memPtr);\\n require(itemLength == item.len, \\\"RLPReader: UINT_STRICT_DECODED_LENGTH_MISMATCH\\\");\\n // one byte prefix\\n require(item.len == 33, \\\"RLPReader: INVALID_UINT_STRICT_LENGTH\\\");\\n\\n uint256 result;\\n uint256 memPtr = item.memPtr + 1;\\n assembly {\\n result := mload(memPtr)\\n }\\n\\n return result;\\n }\\n\\n function toBytes(RLPItem memory item) internal pure returns (bytes memory) {\\n uint256 listLength = _itemLength(item.memPtr);\\n require(listLength == item.len, \\\"RLPReader: BYTES_DECODED_LENGTH_MISMATCH\\\");\\n uint256 offset = _payloadOffset(item.memPtr);\\n\\n uint256 len = item.len - offset; // data length\\n bytes memory result = new bytes(len);\\n\\n uint256 destPtr;\\n assembly {\\n destPtr := add(0x20, result)\\n }\\n\\n copy(item.memPtr + offset, destPtr, len);\\n return result;\\n }\\n\\n /*\\n * Private Helpers\\n */\\n\\n // @return number of payload items inside an encoded list.\\n function numItems(RLPItem memory item) private pure returns (uint256) {\\n // add `isList` check if `item` is expected to be passsed without a check from calling function\\n // require(isList(item), \\\"RLPReader: NUM_ITEMS_NOT_LIST\\\");\\n\\n uint256 count = 0;\\n uint256 currPtr = item.memPtr + _payloadOffset(item.memPtr);\\n uint256 endPtr = item.memPtr + item.len;\\n while (currPtr < endPtr) {\\n currPtr = currPtr + _itemLength(currPtr); // skip over an item\\n require(currPtr <= endPtr, \\\"RLPReader: NUM_ITEMS_DECODED_LENGTH_MISMATCH\\\");\\n count++;\\n }\\n\\n return count;\\n }\\n\\n // @return entire rlp item byte length\\n function _itemLength(uint256 memPtr) private pure returns (uint256) {\\n uint256 itemLen;\\n uint256 byte0;\\n assembly {\\n byte0 := byte(0, mload(memPtr))\\n }\\n\\n if (byte0 < STRING_SHORT_START) itemLen = 1;\\n else if (byte0 < STRING_LONG_START)\\n itemLen = byte0 - STRING_SHORT_START + 1;\\n else if (byte0 < LIST_SHORT_START) {\\n assembly {\\n let byteLen := sub(byte0, 0xb7) // # of bytes the actual length is\\n memPtr := add(memPtr, 1) // skip over the first byte\\n\\n /* 32 byte word size */\\n let dataLen := div(mload(memPtr), exp(256, sub(32, byteLen))) // right shifting to get the len\\n itemLen := add(dataLen, add(byteLen, 1))\\n }\\n } else if (byte0 < LIST_LONG_START) {\\n itemLen = byte0 - LIST_SHORT_START + 1;\\n } else {\\n assembly {\\n let byteLen := sub(byte0, 0xf7)\\n memPtr := add(memPtr, 1)\\n\\n let dataLen := div(mload(memPtr), exp(256, sub(32, byteLen))) // right shifting to the correct length\\n itemLen := add(dataLen, add(byteLen, 1))\\n }\\n }\\n\\n return itemLen;\\n }\\n\\n // @return number of bytes until the data\\n function _payloadOffset(uint256 memPtr) private pure returns (uint256) {\\n uint256 byte0;\\n assembly {\\n byte0 := byte(0, mload(memPtr))\\n }\\n\\n if (byte0 < STRING_SHORT_START) return 0;\\n else if (\\n byte0 < STRING_LONG_START ||\\n (byte0 >= LIST_SHORT_START && byte0 < LIST_LONG_START)\\n ) return 1;\\n else if (byte0 < LIST_SHORT_START)\\n // being explicit\\n return byte0 - (STRING_LONG_START - 1) + 1;\\n else return byte0 - (LIST_LONG_START - 1) + 1;\\n }\\n\\n /*\\n * @param src Pointer to source\\n * @param dest Pointer to destination\\n * @param len Amount of memory to copy from the source\\n */\\n function copy(\\n uint256 src,\\n uint256 dest,\\n uint256 len\\n ) private pure {\\n if (len == 0) return;\\n\\n // copy as many word sizes as possible\\n for (; len >= WORD_SIZE; len -= WORD_SIZE) {\\n assembly {\\n mstore(dest, mload(src))\\n }\\n\\n src += WORD_SIZE;\\n dest += WORD_SIZE;\\n }\\n\\n // left over bytes. Mask is used to remove unwanted bytes from the word\\n uint256 mask = 256**(WORD_SIZE - len) - 1;\\n assembly {\\n let srcpart := and(mload(src), not(mask)) // zero out src\\n let destpart := and(mload(dest), mask) // retrieve the bytes\\n mstore(dest, or(destpart, srcpart))\\n }\\n }\\n}\\n\"\n },\n \"contracts/Libraries/matic/lib/MerklePatriciaProof.sol\": {\n \"content\": \"/*\\n * @title MerklePatriciaVerifier\\n * @author Sam Mayo (sammayo888@gmail.com)\\n *\\n * @dev Library for verifing merkle patricia proofs.\\n */\\npragma solidity 0.6.6;\\n\\nimport {RLPReader} from \\\"./RLPReader.sol\\\";\\n\\nlibrary MerklePatriciaProof {\\n /*\\n * @dev Verifies a merkle patricia proof.\\n * @param value The terminating value in the trie.\\n * @param encodedPath The path in the trie leading to value.\\n * @param rlpParentNodes The rlp encoded stack of nodes.\\n * @param root The root hash of the trie.\\n * @return The boolean validity of the proof.\\n */\\n function verify(\\n bytes memory value,\\n bytes memory encodedPath,\\n bytes memory rlpParentNodes,\\n bytes32 root\\n ) internal pure returns (bool) {\\n RLPReader.RLPItem memory item = RLPReader.toRlpItem(rlpParentNodes);\\n RLPReader.RLPItem[] memory parentNodes = RLPReader.toList(item);\\n\\n bytes memory currentNode;\\n RLPReader.RLPItem[] memory currentNodeList;\\n\\n bytes32 nodeKey = root;\\n uint256 pathPtr = 0;\\n\\n bytes memory path = _getNibbleArray(encodedPath);\\n if (path.length == 0) {\\n return false;\\n }\\n\\n for (uint256 i = 0; i < parentNodes.length; i++) {\\n if (pathPtr > path.length) {\\n return false;\\n }\\n\\n currentNode = RLPReader.toRlpBytes(parentNodes[i]);\\n if (nodeKey != keccak256(currentNode)) {\\n return false;\\n }\\n currentNodeList = RLPReader.toList(parentNodes[i]);\\n\\n if (currentNodeList.length == 17) {\\n if (pathPtr == path.length) {\\n if (\\n keccak256(RLPReader.toBytes(currentNodeList[16])) ==\\n keccak256(value)\\n ) {\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n uint8 nextPathNibble = uint8(path[pathPtr]);\\n if (nextPathNibble > 16) {\\n return false;\\n }\\n nodeKey = bytes32(\\n RLPReader.toUintStrict(currentNodeList[nextPathNibble])\\n );\\n pathPtr += 1;\\n } else if (currentNodeList.length == 2) {\\n uint256 traversed = _nibblesToTraverse(\\n RLPReader.toBytes(currentNodeList[0]),\\n path,\\n pathPtr\\n );\\n if (pathPtr + traversed == path.length) {\\n //leaf node\\n if (\\n keccak256(RLPReader.toBytes(currentNodeList[1])) ==\\n keccak256(value)\\n ) {\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n //extension node\\n if (traversed == 0) {\\n return false;\\n }\\n\\n pathPtr += traversed;\\n nodeKey = bytes32(RLPReader.toUintStrict(currentNodeList[1]));\\n } else {\\n return false;\\n }\\n }\\n }\\n\\n function _nibblesToTraverse(\\n bytes memory encodedPartialPath,\\n bytes memory path,\\n uint256 pathPtr\\n ) private pure returns (uint256) {\\n uint256 len = 0;\\n // encodedPartialPath has elements that are each two hex characters (1 byte), but partialPath\\n // and slicedPath have elements that are each one hex character (1 nibble)\\n bytes memory partialPath = _getNibbleArray(encodedPartialPath);\\n bytes memory slicedPath = new bytes(partialPath.length);\\n\\n // pathPtr counts nibbles in path\\n // partialPath.length is a number of nibbles\\n for (uint256 i = pathPtr; i < pathPtr + partialPath.length; i++) {\\n bytes1 pathNibble = path[i];\\n slicedPath[i - pathPtr] = pathNibble;\\n }\\n\\n if (keccak256(partialPath) == keccak256(slicedPath)) {\\n len = partialPath.length;\\n } else {\\n len = 0;\\n }\\n return len;\\n }\\n\\n // bytes b must be hp encoded\\n function _getNibbleArray(bytes memory b)\\n internal\\n pure\\n returns (bytes memory)\\n {\\n bytes memory nibbles = \\\"\\\";\\n if (b.length > 0) {\\n uint8 offset;\\n uint8 hpNibble = uint8(_getNthNibbleOfBytes(0, b));\\n if (hpNibble == 1 || hpNibble == 3) {\\n nibbles = new bytes(b.length * 2 - 1);\\n bytes1 oddNibble = _getNthNibbleOfBytes(1, b);\\n nibbles[0] = oddNibble;\\n offset = 1;\\n } else {\\n nibbles = new bytes(b.length * 2 - 2);\\n offset = 0;\\n }\\n\\n for (uint256 i = offset; i < nibbles.length; i++) {\\n nibbles[i] = _getNthNibbleOfBytes(i - offset + 2, b);\\n }\\n }\\n return nibbles;\\n }\\n\\n function _getNthNibbleOfBytes(uint256 n, bytes memory str)\\n private\\n pure\\n returns (bytes1)\\n {\\n return\\n bytes1(\\n n % 2 == 0 ? uint8(str[n / 2]) / 0x10 : uint8(str[n / 2]) % 0x10\\n );\\n }\\n}\\n\"\n },\n \"contracts/Libraries/matic/root/ICheckpointManager.sol\": {\n \"content\": \"pragma solidity 0.6.6;\\n\\ncontract ICheckpointManager {\\n struct HeaderBlock {\\n bytes32 root;\\n uint256 start;\\n uint256 end;\\n uint256 createdAt;\\n address proposer;\\n }\\n\\n /**\\n * @notice mapping of checkpoint header numbers to block details\\n * @dev These checkpoints are submited by plasma contracts\\n */\\n mapping(uint256 => HeaderBlock) public headerBlocks;\\n}\\n\"\n },\n \"contracts/Libraries/matic/lib/Merkle.sol\": {\n \"content\": \"pragma solidity 0.6.6;\\n\\nlibrary Merkle {\\n function checkMembership(\\n bytes32 leaf,\\n uint256 index,\\n bytes32 rootHash,\\n bytes memory proof\\n ) internal pure returns (bool) {\\n require(proof.length % 32 == 0, \\\"Invalid proof length\\\");\\n uint256 proofHeight = proof.length / 32;\\n // Proof of size n means, height of the tree is n+1.\\n // In a tree of height n+1, max #leafs possible is 2 ^ n\\n require(index < 2 ** proofHeight, \\\"Leaf index is too big\\\");\\n\\n bytes32 proofElement;\\n bytes32 computedHash = leaf;\\n for (uint256 i = 32; i <= proof.length; i += 32) {\\n assembly {\\n proofElement := mload(add(proof, i))\\n }\\n\\n if (index % 2 == 0) {\\n computedHash = keccak256(\\n abi.encodePacked(computedHash, proofElement)\\n );\\n } else {\\n computedHash = keccak256(\\n abi.encodePacked(proofElement, computedHash)\\n );\\n }\\n\\n index = index / 2;\\n }\\n return computedHash == rootHash;\\n }\\n}\\n\"\n },\n \"contracts/Libraries/matic/tunnel/RootTunnel.sol\": {\n \"content\": \"pragma solidity ^0.6.6;\\n\\nimport {BaseRootTunnel} from \\\"./BaseRootTunnel.sol\\\";\\n\\n\\ncontract RootTunnel is BaseRootTunnel {\\n function _processMessageFromChild(bytes memory message) internal override {\\n // implement your core logic here\\n }\\n}\\n\"\n },\n \"contracts/Libraries/matic/root/RootChainManager/RootChainManager.sol\": {\n \"content\": \"pragma solidity 0.6.6;\\n\\nimport {SafeMath} from \\\"@openzeppelin/contracts/math/SafeMath.sol\\\";\\nimport {IRootChainManager} from \\\"./IRootChainManager.sol\\\";\\nimport {RootChainManagerStorage} from \\\"./RootChainManagerStorage.sol\\\";\\nimport {IStateSender} from \\\"../StateSender/IStateSender.sol\\\";\\nimport {ICheckpointManager} from \\\"../ICheckpointManager.sol\\\";\\nimport {RLPReader} from \\\"../../lib/RLPReader.sol\\\";\\nimport {MerklePatriciaProof} from \\\"../../lib/MerklePatriciaProof.sol\\\";\\nimport {Merkle} from \\\"../../lib/Merkle.sol\\\";\\nimport {ITokenPredicate} from \\\"../TokenPredicates/ITokenPredicate.sol\\\";\\nimport {Initializable} from \\\"../../common/Initializable.sol\\\";\\nimport {NativeMetaTransaction} from \\\"../../common/NativeMetaTransaction.sol\\\";\\nimport {AccessControl} from \\\"@openzeppelin/contracts/access/AccessControl.sol\\\";\\nimport {AccessControlMixin} from \\\"../../common/AccessControlMixin.sol\\\";\\nimport {ContextMixin} from \\\"../../common/ContextMixin.sol\\\";\\n\\ncontract RootChainManager is\\n IRootChainManager,\\n Initializable,\\n AccessControl, // included to match old storage layout while upgrading\\n RootChainManagerStorage, // created to match old storage layout while upgrading\\n AccessControlMixin,\\n NativeMetaTransaction,\\n ContextMixin\\n{\\n using RLPReader for bytes;\\n using RLPReader for RLPReader.RLPItem;\\n using Merkle for bytes32;\\n using SafeMath for uint256;\\n\\n // maybe DEPOSIT and MAP_TOKEN can be reduced to bytes4\\n bytes32 public constant DEPOSIT = keccak256(\\\"DEPOSIT\\\");\\n bytes32 public constant MAP_TOKEN = keccak256(\\\"MAP_TOKEN\\\");\\n address public constant ETHER_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\\n bytes32 public constant MAPPER_ROLE = keccak256(\\\"MAPPER_ROLE\\\");\\n\\n function _msgSender()\\n internal\\n override\\n view\\n returns (address payable sender)\\n {\\n return ContextMixin.msgSender();\\n }\\n\\n /**\\n * @notice Deposit ether by directly sending to the contract\\n * The account sending ether receives WETH on child chain\\n */\\n receive() external payable {\\n _depositEtherFor(_msgSender());\\n }\\n\\n /**\\n * @notice Initialize the contract after it has been proxified\\n * @dev meant to be called once immediately after deployment\\n * @param _owner the account that should be granted admin role\\n */\\n function initialize(\\n address _owner\\n )\\n external\\n initializer\\n {\\n _initializeEIP712(\\\"RootChainManager\\\");\\n _setupContractId(\\\"RootChainManager\\\");\\n _setupRole(DEFAULT_ADMIN_ROLE, _owner);\\n _setupRole(MAPPER_ROLE, _owner);\\n }\\n\\n // adding seperate function setupContractId since initialize is already called with old implementation\\n function setupContractId()\\n external\\n only(DEFAULT_ADMIN_ROLE)\\n {\\n _setupContractId(\\\"RootChainManager\\\");\\n }\\n\\n // adding seperate function initializeEIP712 since initialize is already called with old implementation\\n function initializeEIP712()\\n external\\n only(DEFAULT_ADMIN_ROLE)\\n {\\n _setDomainSeperator(\\\"RootChainManager\\\");\\n }\\n\\n /**\\n * @notice Set the state sender, callable only by admins\\n * @dev This should be the state sender from plasma contracts\\n * It is used to send bytes from root to child chain\\n * @param newStateSender address of state sender contract\\n */\\n function setStateSender(address newStateSender)\\n external\\n only(DEFAULT_ADMIN_ROLE)\\n {\\n _stateSender = IStateSender(newStateSender);\\n }\\n\\n /**\\n * @notice Get the address of contract set as state sender\\n * @return The address of state sender contract\\n */\\n function stateSenderAddress() external view returns (address) {\\n return address(_stateSender);\\n }\\n\\n /**\\n * @notice Set the checkpoint manager, callable only by admins\\n * @dev This should be the plasma contract responsible for keeping track of checkpoints\\n * @param newCheckpointManager address of checkpoint manager contract\\n */\\n function setCheckpointManager(address newCheckpointManager)\\n external\\n only(DEFAULT_ADMIN_ROLE)\\n {\\n _checkpointManager = ICheckpointManager(newCheckpointManager);\\n }\\n\\n /**\\n * @notice Get the address of contract set as checkpoint manager\\n * @return The address of checkpoint manager contract\\n */\\n function checkpointManagerAddress() external view returns (address) {\\n return address(_checkpointManager);\\n }\\n\\n /**\\n * @notice Set the child chain manager, callable only by admins\\n * @dev This should be the contract responsible to receive deposit bytes on child chain\\n * @param newChildChainManager address of child chain manager contract\\n */\\n function setChildChainManagerAddress(address newChildChainManager)\\n external\\n only(DEFAULT_ADMIN_ROLE)\\n {\\n require(newChildChainManager != address(0x0), \\\"RootChainManager: INVALID_CHILD_CHAIN_ADDRESS\\\");\\n childChainManagerAddress = newChildChainManager;\\n }\\n\\n /**\\n * @notice Register a token predicate address against its type, callable only by mappers\\n * @dev A predicate is a contract responsible to process the token specific logic while locking or exiting tokens\\n * @param tokenType bytes32 unique identifier for the token type\\n * @param predicateAddress address of token predicate address\\n */\\n function registerPredicate(bytes32 tokenType, address predicateAddress)\\n external\\n override\\n only(DEFAULT_ADMIN_ROLE)\\n {\\n typeToPredicate[tokenType] = predicateAddress;\\n emit PredicateRegistered(tokenType, predicateAddress);\\n }\\n\\n /**\\n * @notice Map a token to enable its movement via the PoS Portal, callable only by mappers\\n * @param rootToken address of token on root chain\\n * @param childToken address of token on child chain\\n * @param tokenType bytes32 unique identifier for the token type\\n */\\n function mapToken(\\n address rootToken,\\n address childToken,\\n bytes32 tokenType\\n ) external override only(MAPPER_ROLE) {\\n // explicit check if token is already mapped to avoid accidental remaps\\n require(\\n rootToChildToken[rootToken] == address(0) &&\\n childToRootToken[childToken] == address(0),\\n \\\"RootChainManager: ALREADY_MAPPED\\\"\\n );\\n _mapToken(rootToken, childToken, tokenType);\\n }\\n\\n /**\\n * @notice Clean polluted token mapping\\n * @param rootToken address of token on root chain. Since rename token was introduced later stage, \\n * clean method is used to clean pollulated mapping\\n */\\n function cleanMapToken(\\n address rootToken,\\n address childToken\\n ) external override only(DEFAULT_ADMIN_ROLE) {\\n rootToChildToken[rootToken] = address(0);\\n childToRootToken[childToken] = address(0);\\n tokenToType[rootToken] = bytes32(0);\\n\\n emit TokenMapped(rootToken, childToken, tokenToType[rootToken]);\\n }\\n\\n /**\\n * @notice Remap a token that has already been mapped, properly cleans up old mapping\\n * Callable only by mappers\\n * @param rootToken address of token on root chain\\n * @param childToken address of token on child chain\\n * @param tokenType bytes32 unique identifier for the token type\\n */\\n function remapToken(\\n address rootToken,\\n address childToken,\\n bytes32 tokenType\\n ) external override only(DEFAULT_ADMIN_ROLE) {\\n // cleanup old mapping\\n address oldChildToken = rootToChildToken[rootToken];\\n address oldRootToken = childToRootToken[childToken];\\n\\n if (rootToChildToken[oldRootToken] != address(0)) {\\n rootToChildToken[oldRootToken] = address(0);\\n tokenToType[oldRootToken] = bytes32(0);\\n }\\n\\n if (childToRootToken[oldChildToken] != address(0)) {\\n childToRootToken[oldChildToken] = address(0);\\n }\\n\\n _mapToken(rootToken, childToken, tokenType);\\n }\\n\\n function _mapToken(\\n address rootToken,\\n address childToken,\\n bytes32 tokenType\\n ) private {\\n require(\\n typeToPredicate[tokenType] != address(0x0),\\n \\\"RootChainManager: TOKEN_TYPE_NOT_SUPPORTED\\\"\\n );\\n\\n rootToChildToken[rootToken] = childToken;\\n childToRootToken[childToken] = rootToken;\\n tokenToType[rootToken] = tokenType;\\n\\n emit TokenMapped(rootToken, childToken, tokenType);\\n\\n bytes memory syncData = abi.encode(rootToken, childToken, tokenType);\\n _stateSender.syncState(\\n childChainManagerAddress,\\n abi.encode(MAP_TOKEN, syncData)\\n );\\n }\\n\\n /**\\n * @notice Move ether from root to child chain, accepts ether transfer\\n * Keep in mind this ether cannot be used to pay gas on child chain\\n * Use Matic tokens deposited using plasma mechanism for that\\n * @param user address of account that should receive WETH on child chain\\n */\\n function depositEtherFor(address user) external override payable {\\n _depositEtherFor(user);\\n }\\n\\n /**\\n * @notice Move tokens from root to child chain\\n * @dev This mechanism supports arbitrary tokens as long as its predicate has been registered and the token is mapped\\n * @param user address of account that should receive this deposit on child chain\\n * @param rootToken address of token that is being deposited\\n * @param depositData bytes data that is sent to predicate and child token contracts to handle deposit\\n */\\n function depositFor(\\n address user,\\n address rootToken,\\n bytes calldata depositData\\n ) external override {\\n require(\\n rootToken != ETHER_ADDRESS,\\n \\\"RootChainManager: INVALID_ROOT_TOKEN\\\"\\n );\\n _depositFor(user, rootToken, depositData);\\n }\\n\\n function _depositEtherFor(address user) private {\\n bytes memory depositData = abi.encode(msg.value);\\n _depositFor(user, ETHER_ADDRESS, depositData);\\n\\n // payable(typeToPredicate[tokenToType[ETHER_ADDRESS]]).transfer(msg.value);\\n // transfer doesn't work as expected when receiving contract is proxified so using call\\n (bool success, /* bytes memory data */) = typeToPredicate[tokenToType[ETHER_ADDRESS]].call{value: msg.value}(\\\"\\\");\\n if (!success) {\\n revert(\\\"RootChainManager: ETHER_TRANSFER_FAILED\\\");\\n }\\n }\\n\\n function _depositFor(\\n address user,\\n address rootToken,\\n bytes memory depositData\\n ) private {\\n bytes32 tokenType = tokenToType[rootToken];\\n require(\\n rootToChildToken[rootToken] != address(0x0) &&\\n tokenType != 0,\\n \\\"RootChainManager: TOKEN_NOT_MAPPED\\\"\\n );\\n address predicateAddress = typeToPredicate[tokenType];\\n require(\\n predicateAddress != address(0),\\n \\\"RootChainManager: INVALID_TOKEN_TYPE\\\"\\n );\\n require(\\n user != address(0),\\n \\\"RootChainManager: INVALID_USER\\\"\\n );\\n\\n ITokenPredicate(predicateAddress).lockTokens(\\n _msgSender(),\\n user,\\n rootToken,\\n depositData\\n );\\n bytes memory syncData = abi.encode(user, rootToken, depositData);\\n _stateSender.syncState(\\n childChainManagerAddress,\\n abi.encode(DEPOSIT, syncData)\\n );\\n }\\n\\n /**\\n * @notice exit tokens by providing proof\\n * @dev This function verifies if the transaction actually happened on child chain\\n * the transaction log is then sent to token predicate to handle it accordingly\\n *\\n * @param inputData RLP encoded data of the reference tx containing following list of fields\\n * 0 - headerNumber - Checkpoint header block number containing the reference tx\\n * 1 - blockProof - Proof that the block header (in the child chain) is a leaf in the submitted merkle root\\n * 2 - blockNumber - Block number containing the reference tx on child chain\\n * 3 - blockTime - Reference tx block time\\n * 4 - txRoot - Transactions root of block\\n * 5 - receiptRoot - Receipts root of block\\n * 6 - receipt - Receipt of the reference transaction\\n * 7 - receiptProof - Merkle proof of the reference receipt\\n * 8 - branchMask - 32 bits denoting the path of receipt in merkle tree\\n * 9 - receiptLogIndex - Log Index to read from the receipt\\n */\\n function exit(bytes calldata inputData) external override {\\n RLPReader.RLPItem[] memory inputDataRLPList = inputData\\n .toRlpItem()\\n .toList();\\n\\n // checking if exit has already been processed\\n // unique exit is identified using hash of (blockNumber, branchMask, receiptLogIndex)\\n bytes32 exitHash = keccak256(\\n abi.encodePacked(\\n inputDataRLPList[2].toUint(), // blockNumber\\n // first 2 nibbles are dropped while generating nibble array\\n // this allows branch masks that are valid but bypass exitHash check (changing first 2 nibbles only)\\n // so converting to nibble array and then hashing it\\n MerklePatriciaProof._getNibbleArray(inputDataRLPList[8].toBytes()), // branchMask\\n inputDataRLPList[9].toUint() // receiptLogIndex\\n )\\n );\\n require(\\n processedExits[exitHash] == false,\\n \\\"RootChainManager: EXIT_ALREADY_PROCESSED\\\"\\n );\\n processedExits[exitHash] = true;\\n\\n RLPReader.RLPItem[] memory receiptRLPList = inputDataRLPList[6]\\n .toBytes()\\n .toRlpItem()\\n .toList();\\n RLPReader.RLPItem memory logRLP = receiptRLPList[3]\\n .toList()[\\n inputDataRLPList[9].toUint() // receiptLogIndex\\n ];\\n\\n address childToken = RLPReader.toAddress(logRLP.toList()[0]); // log emitter address field\\n // log should be emmited only by the child token\\n address rootToken = childToRootToken[childToken];\\n require(\\n rootToken != address(0),\\n \\\"RootChainManager: TOKEN_NOT_MAPPED\\\"\\n );\\n\\n address predicateAddress = typeToPredicate[\\n tokenToType[rootToken]\\n ];\\n\\n // branch mask can be maximum 32 bits\\n require(\\n inputDataRLPList[8].toUint() &\\n 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000 ==\\n 0,\\n \\\"RootChainManager: INVALID_BRANCH_MASK\\\"\\n );\\n\\n // verify receipt inclusion\\n require(\\n MerklePatriciaProof.verify(\\n inputDataRLPList[6].toBytes(), // receipt\\n inputDataRLPList[8].toBytes(), // branchMask\\n inputDataRLPList[7].toBytes(), // receiptProof\\n bytes32(inputDataRLPList[5].toUint()) // receiptRoot\\n ),\\n \\\"RootChainManager: INVALID_PROOF\\\"\\n );\\n\\n // verify checkpoint inclusion\\n _checkBlockMembershipInCheckpoint(\\n inputDataRLPList[2].toUint(), // blockNumber\\n inputDataRLPList[3].toUint(), // blockTime\\n bytes32(inputDataRLPList[4].toUint()), // txRoot\\n bytes32(inputDataRLPList[5].toUint()), // receiptRoot\\n inputDataRLPList[0].toUint(), // headerNumber\\n inputDataRLPList[1].toBytes() // blockProof\\n );\\n\\n ITokenPredicate(predicateAddress).exitTokens(\\n _msgSender(),\\n rootToken,\\n logRLP.toRlpBytes()\\n );\\n }\\n\\n function _checkBlockMembershipInCheckpoint(\\n uint256 blockNumber,\\n uint256 blockTime,\\n bytes32 txRoot,\\n bytes32 receiptRoot,\\n uint256 headerNumber,\\n bytes memory blockProof\\n ) private view returns (uint256) {\\n (\\n bytes32 headerRoot,\\n uint256 startBlock,\\n ,\\n uint256 createdAt,\\n\\n ) = _checkpointManager.headerBlocks(headerNumber);\\n\\n require(\\n keccak256(\\n abi.encodePacked(blockNumber, blockTime, txRoot, receiptRoot)\\n )\\n .checkMembership(\\n blockNumber.sub(startBlock),\\n headerRoot,\\n blockProof\\n ),\\n \\\"RootChainManager: INVALID_HEADER\\\"\\n );\\n return createdAt;\\n }\\n}\\n\"\n },\n \"contracts/Libraries/matic/root/RootChainManager/IRootChainManager.sol\": {\n \"content\": \"pragma solidity 0.6.6;\\n\\ninterface IRootChainManager {\\n event TokenMapped(\\n address indexed rootToken,\\n address indexed childToken,\\n bytes32 indexed tokenType\\n );\\n\\n event PredicateRegistered(\\n bytes32 indexed tokenType,\\n address indexed predicateAddress\\n );\\n\\n function registerPredicate(bytes32 tokenType, address predicateAddress)\\n external;\\n\\n function mapToken(\\n address rootToken,\\n address childToken,\\n bytes32 tokenType\\n ) external;\\n\\n function cleanMapToken(\\n address rootToken,\\n address childToken\\n ) external;\\n\\n function remapToken(\\n address rootToken,\\n address childToken,\\n bytes32 tokenType\\n ) external;\\n\\n function depositEtherFor(address user) external payable;\\n\\n function depositFor(\\n address user,\\n address rootToken,\\n bytes calldata depositData\\n ) external;\\n\\n function exit(bytes calldata inputData) external;\\n}\\n\"\n },\n \"contracts/Libraries/matic/root/RootChainManager/RootChainManagerStorage.sol\": {\n \"content\": \"pragma solidity 0.6.6;\\n\\nimport {IStateSender} from \\\"../StateSender/IStateSender.sol\\\";\\nimport {ICheckpointManager} from \\\"../ICheckpointManager.sol\\\";\\n\\nabstract contract RootChainManagerStorage {\\n mapping(bytes32 => address) public typeToPredicate;\\n mapping(address => address) public rootToChildToken;\\n mapping(address => address) public childToRootToken;\\n mapping(address => bytes32) public tokenToType;\\n mapping(bytes32 => bool) public processedExits;\\n IStateSender internal _stateSender;\\n ICheckpointManager internal _checkpointManager;\\n address public childChainManagerAddress;\\n}\\n\"\n },\n \"contracts/Libraries/matic/root/TokenPredicates/ITokenPredicate.sol\": {\n \"content\": \"pragma solidity 0.6.6;\\n\\nimport {RLPReader} from \\\"../../lib/RLPReader.sol\\\";\\n\\n/// @title Token predicate interface for all pos portal predicates\\n/// @notice Abstract interface that defines methods for custom predicates\\ninterface ITokenPredicate {\\n\\n /**\\n * @notice Deposit tokens into pos portal\\n * @dev When `depositor` deposits tokens into pos portal, tokens get locked into predicate contract.\\n * @param depositor Address who wants to deposit tokens\\n * @param depositReceiver Address (address) who wants to receive tokens on side chain\\n * @param rootToken Token which gets deposited\\n * @param depositData Extra data for deposit (amount for ERC20, token id for ERC721 etc.) [ABI encoded]\\n */\\n function lockTokens(\\n address depositor,\\n address depositReceiver,\\n address rootToken,\\n bytes calldata depositData\\n ) external;\\n\\n /**\\n * @notice Validates and processes exit while withdraw process\\n * @dev Validates exit log emitted on sidechain. Reverts if validation fails.\\n * @dev Processes withdraw based on custom logic. Example: transfer ERC20/ERC721, mint ERC721 if mintable withdraw\\n * @param sender Address\\n * @param rootToken Token which gets withdrawn\\n * @param logRLPList Valid sidechain log for data like amount, token id etc.\\n */\\n function exitTokens(\\n address sender,\\n address rootToken,\\n bytes calldata logRLPList\\n ) external;\\n}\\n\"\n },\n \"contracts/Libraries/matic/common/Initializable.sol\": {\n \"content\": \"pragma solidity 0.6.6;\\n\\ncontract Initializable {\\n bool inited = false;\\n\\n modifier initializer() {\\n require(!inited, \\\"already inited\\\");\\n _;\\n inited = true;\\n }\\n}\\n\"\n },\n \"contracts/Libraries/matic/common/NativeMetaTransaction.sol\": {\n \"content\": \"pragma solidity 0.6.6;\\n\\nimport {SafeMath} from \\\"@openzeppelin/contracts/math/SafeMath.sol\\\";\\nimport {EIP712Base} from \\\"./EIP712Base.sol\\\";\\n\\ncontract NativeMetaTransaction is EIP712Base {\\n using SafeMath for uint256;\\n bytes32 private constant META_TRANSACTION_TYPEHASH = keccak256(\\n bytes(\\n \\\"MetaTransaction(uint256 nonce,address from,bytes functionSignature)\\\"\\n )\\n );\\n event MetaTransactionExecuted(\\n address userAddress,\\n address payable relayerAddress,\\n bytes functionSignature\\n );\\n mapping(address => uint256) nonces;\\n\\n /*\\n * Meta transaction structure.\\n * No point of including value field here as if user is doing value transfer then he has the funds to pay for gas\\n * He should call the desired function directly in that case.\\n */\\n struct MetaTransaction {\\n uint256 nonce;\\n address from;\\n bytes functionSignature;\\n }\\n\\n function executeMetaTransaction(\\n address userAddress,\\n bytes memory functionSignature,\\n bytes32 sigR,\\n bytes32 sigS,\\n uint8 sigV\\n ) public payable returns (bytes memory) {\\n MetaTransaction memory metaTx = MetaTransaction({\\n nonce: nonces[userAddress],\\n from: userAddress,\\n functionSignature: functionSignature\\n });\\n\\n require(\\n verify(userAddress, metaTx, sigR, sigS, sigV),\\n \\\"Signer and signature do not match\\\"\\n );\\n\\n // increase nonce for user (to avoid re-use)\\n nonces[userAddress] = nonces[userAddress].add(1);\\n\\n emit MetaTransactionExecuted(\\n userAddress,\\n msg.sender,\\n functionSignature\\n );\\n\\n // Append userAddress and relayer address at the end to extract it from calling context\\n (bool success, bytes memory returnData) = address(this).call(\\n abi.encodePacked(functionSignature, userAddress)\\n );\\n require(success, \\\"Function call not successful\\\");\\n\\n return returnData;\\n }\\n\\n function hashMetaTransaction(MetaTransaction memory metaTx)\\n internal\\n pure\\n returns (bytes32)\\n {\\n return\\n keccak256(\\n abi.encode(\\n META_TRANSACTION_TYPEHASH,\\n metaTx.nonce,\\n metaTx.from,\\n keccak256(metaTx.functionSignature)\\n )\\n );\\n }\\n\\n function getNonce(address user) public view returns (uint256 nonce) {\\n nonce = nonces[user];\\n }\\n\\n function verify(\\n address signer,\\n MetaTransaction memory metaTx,\\n bytes32 sigR,\\n bytes32 sigS,\\n uint8 sigV\\n ) internal view returns (bool) {\\n require(signer != address(0), \\\"NativeMetaTransaction: INVALID_SIGNER\\\");\\n return\\n signer ==\\n ecrecover(\\n toTypedMessageHash(hashMetaTransaction(metaTx)),\\n sigV,\\n sigR,\\n sigS\\n );\\n }\\n}\\n\"\n },\n \"contracts/Libraries/matic/common/ContextMixin.sol\": {\n \"content\": \"pragma solidity 0.6.6;\\n\\nabstract contract ContextMixin {\\n function msgSender()\\n internal\\n view\\n returns (address payable sender)\\n {\\n if (msg.sender == address(this)) {\\n bytes memory array = msg.data;\\n uint256 index = msg.data.length;\\n assembly {\\n // Load the 32 bytes word from memory with the address on the lower 20 bytes, and mask those.\\n sender := and(\\n mload(add(array, index)),\\n 0xffffffffffffffffffffffffffffffffffffffff\\n )\\n }\\n } else {\\n sender = msg.sender;\\n }\\n return sender;\\n }\\n}\\n\"\n },\n \"contracts/Libraries/matic/common/EIP712Base.sol\": {\n \"content\": \"pragma solidity 0.6.6;\\n\\nimport {Initializable} from \\\"./Initializable.sol\\\";\\n\\ncontract EIP712Base is Initializable {\\n struct EIP712Domain {\\n string name;\\n string version;\\n address verifyingContract;\\n bytes32 salt;\\n }\\n\\n string constant public ERC712_VERSION = \\\"1\\\";\\n\\n bytes32 internal constant EIP712_DOMAIN_TYPEHASH = keccak256(\\n bytes(\\n \\\"EIP712Domain(string name,string version,address verifyingContract,bytes32 salt)\\\"\\n )\\n );\\n bytes32 internal domainSeperator;\\n\\n // supposed to be called once while initializing.\\n // one of the contractsa that inherits this contract follows proxy pattern\\n // so it is not possible to do this in a constructor\\n function _initializeEIP712(\\n string memory name\\n )\\n internal\\n initializer\\n {\\n _setDomainSeperator(name);\\n }\\n\\n function _setDomainSeperator(string memory name) internal {\\n domainSeperator = keccak256(\\n abi.encode(\\n EIP712_DOMAIN_TYPEHASH,\\n keccak256(bytes(name)),\\n keccak256(bytes(ERC712_VERSION)),\\n address(this),\\n bytes32(getChainId())\\n )\\n );\\n }\\n\\n function getDomainSeperator() public view returns (bytes32) {\\n return domainSeperator;\\n }\\n\\n function getChainId() public pure returns (uint256) {\\n uint256 id;\\n assembly {\\n id := chainid()\\n }\\n return id;\\n }\\n\\n /**\\n * Accept message hash and returns hash message in EIP712 compatible form\\n * So that it can be used to recover signer from signature signed using EIP712 formatted data\\n * https://eips.ethereum.org/EIPS/eip-712\\n * \\\"\\\\\\\\x19\\\" makes the encoding deterministic\\n * \\\"\\\\\\\\x01\\\" is the version byte to make it compatible to EIP-191\\n */\\n function toTypedMessageHash(bytes32 messageHash)\\n internal\\n view\\n returns (bytes32)\\n {\\n return\\n keccak256(\\n abi.encodePacked(\\\"\\\\x19\\\\x01\\\", getDomainSeperator(), messageHash)\\n );\\n }\\n}\\n\"\n },\n \"contracts/Libraries/matic/root/RootToken/DummyMintableERC721.sol\": {\n \"content\": \"pragma solidity 0.6.6;\\n\\nimport {ERC721} from \\\"@openzeppelin/contracts/token/ERC721/ERC721.sol\\\";\\nimport {AccessControlMixin} from \\\"../../common/AccessControlMixin.sol\\\";\\nimport {NativeMetaTransaction} from \\\"../../common/NativeMetaTransaction.sol\\\";\\nimport {IMintableERC721} from \\\"./IMintableERC721.sol\\\";\\nimport {ContextMixin} from \\\"../../common/ContextMixin.sol\\\";\\n\\ncontract DummyMintableERC721 is\\n ERC721,\\n AccessControlMixin,\\n NativeMetaTransaction,\\n IMintableERC721,\\n ContextMixin\\n{\\n bytes32 public constant PREDICATE_ROLE = keccak256(\\\"PREDICATE_ROLE\\\");\\n constructor(string memory name_, string memory symbol_)\\n public\\n ERC721(name_, symbol_)\\n {\\n _setupContractId(\\\"DummyMintableERC721\\\");\\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\\n _setupRole(PREDICATE_ROLE, _msgSender());\\n _initializeEIP712(name_);\\n }\\n\\n function _msgSender()\\n internal\\n override\\n view\\n returns (address payable sender)\\n {\\n return ContextMixin.msgSender();\\n }\\n\\n /**\\n * @dev See {IMintableERC721-mint}.\\n */\\n function mint(address user, uint256 tokenId) external override only(PREDICATE_ROLE) {\\n _mint(user, tokenId);\\n }\\n\\n /**\\n * If you're attempting to bring metadata associated with token\\n * from L2 to L1, you must implement this method, to be invoked\\n * when minting token back on L1, during exit\\n */\\n function setTokenMetadata(uint256 tokenId, bytes memory data) internal virtual {\\n // This function should decode metadata obtained from L2\\n // and attempt to set it for this `tokenId`\\n //\\n // Following is just a default implementation, feel\\n // free to define your own encoding/ decoding scheme\\n // for L2 -> L1 token metadata transfer\\n string memory uri = abi.decode(data, (string));\\n\\n _setTokenURI(tokenId, uri);\\n }\\n\\n /**\\n * @dev See {IMintableERC721-mint}.\\n * \\n * If you're attempting to bring metadata associated with token\\n * from L2 to L1, you must implement this method\\n */\\n function mint(address user, uint256 tokenId, bytes calldata metaData) external override only(PREDICATE_ROLE) {\\n _mint(user, tokenId);\\n\\n setTokenMetadata(tokenId, metaData);\\n }\\n\\n\\n /**\\n * @dev See {IMintableERC721-exists}.\\n */\\n function exists(uint256 tokenId) external view override returns (bool) {\\n return _exists(tokenId);\\n }\\n}\\n\"\n },\n \"contracts/Libraries/matic/root/RootToken/IMintableERC721.sol\": {\n \"content\": \"import {IERC721} from \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\n\\npragma solidity 0.6.6;\\n\\ninterface IMintableERC721 is IERC721 {\\n /**\\n * @notice called by predicate contract to mint tokens while withdrawing\\n * @dev Should be callable only by MintableERC721Predicate\\n * Make sure minting is done only by this function\\n * @param user user address for whom token is being minted\\n * @param tokenId tokenId being minted\\n */\\n function mint(address user, uint256 tokenId) external;\\n\\n /**\\n * @notice called by predicate contract to mint tokens while withdrawing with metadata from L2\\n * @dev Should be callable only by MintableERC721Predicate\\n * Make sure minting is only done either by this function/ 👆\\n * @param user user address for whom token is being minted\\n * @param tokenId tokenId being minted\\n * @param metaData Associated token metadata, to be decoded & set using `setTokenMetadata`\\n *\\n * Note : If you're interested in taking token metadata from L2 to L1 during exit, you must\\n * implement this method\\n */\\n function mint(address user, uint256 tokenId, bytes calldata metaData) external;\\n\\n /**\\n * @notice check if token already exists, return true if it does exist\\n * @dev this check will be used by the predicate to determine if the token needs to be minted or transfered\\n * @param tokenId tokenId being checked\\n */\\n function exists(uint256 tokenId) external view returns (bool);\\n}\\n\"\n },\n \"contracts/Libraries/matic/root/TokenPredicates/MintableERC721Predicate.sol\": {\n \"content\": \"pragma solidity 0.6.6;\\n\\nimport {IERC721Receiver} from \\\"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\\\";\\nimport {AccessControlMixin} from \\\"../../common/AccessControlMixin.sol\\\";\\nimport {RLPReader} from \\\"../../lib/RLPReader.sol\\\";\\nimport {IMintableERC721} from \\\"../RootToken/IMintableERC721.sol\\\";\\nimport {ITokenPredicate} from \\\"./ITokenPredicate.sol\\\";\\nimport {Initializable} from \\\"../../common/Initializable.sol\\\";\\n\\ncontract MintableERC721Predicate is ITokenPredicate, AccessControlMixin, Initializable, IERC721Receiver {\\n using RLPReader for bytes;\\n using RLPReader for RLPReader.RLPItem;\\n\\n // keccak256(\\\"MANAGER_ROLE\\\")\\n bytes32 public constant MANAGER_ROLE = 0x241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b08;\\n // keccak256(\\\"MintableERC721\\\")\\n bytes32 public constant TOKEN_TYPE = 0xd4392723c111fcb98b073fe55873efb447bcd23cd3e49ec9ea2581930cd01ddc;\\n // keccak256(\\\"Transfer(address,address,uint256)\\\")\\n bytes32 public constant TRANSFER_EVENT_SIG = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef;\\n // keccak256(\\\"WithdrawnBatch(address,uint256[])\\\")\\n bytes32 public constant WITHDRAW_BATCH_EVENT_SIG = 0xf871896b17e9cb7a64941c62c188a4f5c621b86800e3d15452ece01ce56073df;\\n // keccak256(\\\"TransferWithMetadata(address,address,uint256,bytes)\\\")\\n bytes32 public constant TRANSFER_WITH_METADATA_EVENT_SIG = 0xf94915c6d1fd521cee85359239227480c7e8776d7caf1fc3bacad5c269b66a14;\\n\\n // limit batching of tokens due to gas limit restrictions\\n uint256 public constant BATCH_LIMIT = 20;\\n\\n event LockedMintableERC721(\\n address indexed depositor,\\n address indexed depositReceiver,\\n address indexed rootToken,\\n uint256 tokenId\\n );\\n\\n event LockedMintableERC721Batch(\\n address indexed depositor,\\n address indexed depositReceiver,\\n address indexed rootToken,\\n uint256[] tokenIds\\n );\\n\\n constructor() public {}\\n\\n function initialize(address _owner) external initializer {\\n _setupContractId(\\\"MintableERC721Predicate\\\");\\n _setupRole(DEFAULT_ADMIN_ROLE, _owner);\\n _setupRole(MANAGER_ROLE, _owner);\\n }\\n\\n /**\\n * @notice accepts safe ERC721 transfer\\n */\\n function onERC721Received(\\n address,\\n address,\\n uint256,\\n bytes calldata\\n )\\n external\\n override\\n returns (bytes4)\\n {\\n return IERC721Receiver.onERC721Received.selector;\\n }\\n\\n /**\\n * @notice Lock ERC721 token(s) for deposit, callable only by manager\\n * @param depositor Address who wants to deposit token\\n * @param depositReceiver Address (address) who wants to receive token on child chain\\n * @param rootToken Token which gets deposited\\n * @param depositData ABI encoded tokenId(s). It's possible to deposit batch of tokens.\\n */\\n function lockTokens(\\n address depositor,\\n address depositReceiver,\\n address rootToken,\\n bytes calldata depositData\\n )\\n external\\n override\\n only(MANAGER_ROLE)\\n {\\n\\n // Locking single ERC721 token\\n if (depositData.length == 32) {\\n\\n uint256 tokenId = abi.decode(depositData, (uint256));\\n\\n // Emitting event that single token is getting locked in predicate\\n emit LockedMintableERC721(depositor, depositReceiver, rootToken, tokenId);\\n\\n // Transferring token to this address, which will be\\n // released when attempted to be unlocked\\n IMintableERC721(rootToken).safeTransferFrom(depositor, address(this), tokenId);\\n\\n } else {\\n // Locking a set a ERC721 token(s)\\n\\n uint256[] memory tokenIds = abi.decode(depositData, (uint256[]));\\n\\n // Emitting event that a set of ERC721 tokens are getting lockec\\n // in this predicate contract\\n emit LockedMintableERC721Batch(depositor, depositReceiver, rootToken, tokenIds);\\n\\n // These many tokens are attempted to be deposited\\n // by user\\n uint256 length = tokenIds.length;\\n require(length <= BATCH_LIMIT, \\\"MintableERC721Predicate: EXCEEDS_BATCH_LIMIT\\\");\\n\\n // Iteratively trying to transfer ERC721 token\\n // to this predicate address\\n for (uint256 i; i < length; i++) {\\n\\n IMintableERC721(rootToken).safeTransferFrom(depositor, address(this), tokenIds[i]);\\n\\n }\\n\\n }\\n\\n }\\n\\n /**\\n * @notice Validates log signature, from and to address\\n * then checks if token already exists on root chain\\n * if token exits then transfers it to withdrawer\\n * if token doesn't exit then it is minted\\n * callable only by manager\\n * @param rootToken Token which gets withdrawn\\n * @param log Valid ERC721 burn log from child chain\\n */\\n function exitTokens(\\n address,\\n address rootToken,\\n bytes memory log\\n )\\n public\\n override\\n only(MANAGER_ROLE)\\n {\\n RLPReader.RLPItem[] memory logRLPList = log.toRlpItem().toList();\\n RLPReader.RLPItem[] memory logTopicRLPList = logRLPList[1].toList(); // topics\\n\\n // If it's a simple exit ( with out metadata coming from L2 to L1 )\\n if(bytes32(logTopicRLPList[0].toUint()) == TRANSFER_EVENT_SIG) {\\n\\n address withdrawer = address(logTopicRLPList[1].toUint()); // topic1 is from address\\n\\n require(\\n address(logTopicRLPList[2].toUint()) == address(0), // topic2 is to address\\n \\\"MintableERC721Predicate: INVALID_RECEIVER\\\"\\n );\\n\\n IMintableERC721 token = IMintableERC721(rootToken);\\n\\n uint256 tokenId = logTopicRLPList[3].toUint(); // topic3 is tokenId field\\n if (token.exists(tokenId)) {\\n token.safeTransferFrom(\\n address(this),\\n withdrawer,\\n tokenId\\n );\\n } else {\\n token.mint(withdrawer, tokenId);\\n }\\n\\n } else if (bytes32(logTopicRLPList[0].toUint()) == WITHDRAW_BATCH_EVENT_SIG) { // topic0 is event sig\\n // If it's a simple batch exit, where a set of\\n // ERC721s were burnt in child chain with event signature\\n // looking like `WithdrawnBatch(address indexed user, uint256[] tokenIds);`\\n //\\n // @note This doesn't allow transfer of metadata cross chain\\n // For that check below `else if` block\\n\\n address withdrawer = address(logTopicRLPList[1].toUint()); // topic1 is from address\\n\\n // RLP encoded tokenId list\\n bytes memory logData = logRLPList[2].toBytes();\\n\\n (uint256[] memory tokenIds) = abi.decode(logData, (uint256[]));\\n uint256 length = tokenIds.length;\\n\\n IMintableERC721 token = IMintableERC721(rootToken);\\n\\n for (uint256 i; i < length; i++) {\\n\\n uint256 tokenId = tokenIds[i];\\n\\n // Check if token exists or not\\n //\\n // If does, transfer token to withdrawer\\n if (token.exists(tokenId)) {\\n token.safeTransferFrom(\\n address(this),\\n withdrawer,\\n tokenId\\n );\\n } else {\\n // If token was minted on L2\\n // we'll mint it here, on L1, during\\n // exiting from L2\\n token.mint(withdrawer, tokenId);\\n }\\n\\n }\\n\\n } else if (bytes32(logTopicRLPList[0].toUint()) == TRANSFER_WITH_METADATA_EVENT_SIG) { \\n // If this is NFT exit with metadata i.e. URI 👆\\n //\\n // Note: If your token is only minted in L2, you can exit\\n // it with metadata. But if it was minted on L1, it'll be\\n // simply transferred to withdrawer address. And in that case,\\n // it's lot better to exit with `Transfer(address,address,uint256)`\\n // i.e. calling `withdraw` method on L2 contract\\n // event signature proof, which is defined under first `if` clause\\n //\\n // If you've called `withdrawWithMetadata`, you should submit\\n // proof of event signature `TransferWithMetadata(address,address,uint256,bytes)`\\n\\n address withdrawer = address(logTopicRLPList[1].toUint()); // topic1 is from address\\n\\n require(\\n address(logTopicRLPList[2].toUint()) == address(0), // topic2 is to address\\n \\\"MintableERC721Predicate: INVALID_RECEIVER\\\"\\n );\\n\\n IMintableERC721 token = IMintableERC721(rootToken);\\n\\n uint256 tokenId = logTopicRLPList[3].toUint(); // topic3 is tokenId field\\n if (token.exists(tokenId)) {\\n token.safeTransferFrom(\\n address(this),\\n withdrawer,\\n tokenId\\n );\\n } else {\\n // Minting with metadata received from L2 i.e. emitted\\n // by event `TransferWithMetadata` during burning\\n bytes memory logData = logRLPList[2].toBytes();\\n bytes memory metaData = abi.decode(logData, (bytes));\\n \\n token.mint(withdrawer, tokenId, metaData);\\n }\\n\\n } else {\\n // Attempting to exit with some event signature from L2, which is\\n // not ( yet ) supported by L1 exit manager\\n revert(\\\"MintableERC721Predicate: INVALID_SIGNATURE\\\");\\n }\\n \\n }\\n}\\n\"\n },\n \"contracts/Libraries/matic/test/ProxyTestImplStorageLayoutChange.sol\": {\n \"content\": \"pragma solidity 0.6.6;\\n\\nimport {Initializable} from \\\"../common/Initializable.sol\\\";\\n\\ncontract ProxyTestImplStorageLayoutChange is Initializable {\\n uint256 public b;\\n uint256 public a;\\n}\\n\"\n },\n \"contracts/Libraries/matic/test/ProxyTestImpl.sol\": {\n \"content\": \"pragma solidity 0.6.6;\\n\\nimport {Initializable} from \\\"../common/Initializable.sol\\\";\\n\\ncontract ProxyTestImpl is Initializable {\\n uint256 public a = 1;\\n uint256 public b = 2;\\n uint256 public ctorInit;\\n\\n constructor() public {\\n ctorInit = 3;\\n }\\n\\n function init() public initializer {\\n a = 1;\\n b = 2;\\n }\\n}\\n\"\n },\n \"contracts/Libraries/matic/root/TokenPredicates/MintableERC20Predicate.sol\": {\n \"content\": \"pragma solidity 0.6.6;\\n\\nimport {IMintableERC20} from \\\"../RootToken/IMintableERC20.sol\\\";\\nimport {AccessControlMixin} from \\\"../../common/AccessControlMixin.sol\\\";\\nimport {RLPReader} from \\\"../../lib/RLPReader.sol\\\";\\nimport {ITokenPredicate} from \\\"./ITokenPredicate.sol\\\";\\nimport {Initializable} from \\\"../../common/Initializable.sol\\\";\\n\\ncontract MintableERC20Predicate is\\n ITokenPredicate,\\n AccessControlMixin,\\n Initializable\\n{\\n using RLPReader for bytes;\\n using RLPReader for RLPReader.RLPItem;\\n\\n bytes32 public constant MANAGER_ROLE = keccak256(\\\"MANAGER_ROLE\\\");\\n bytes32 public constant TOKEN_TYPE = keccak256(\\\"MintableERC20\\\");\\n bytes32 public constant TRANSFER_EVENT_SIG = keccak256(\\n \\\"Transfer(address,address,uint256)\\\"\\n );\\n\\n event LockedMintableERC20(\\n address indexed depositor,\\n address indexed depositReceiver,\\n address indexed rootToken,\\n uint256 amount\\n );\\n\\n constructor() public {}\\n\\n function initialize(address _owner) external initializer {\\n _setupContractId(\\\"MintableERC20Predicate\\\");\\n _setupRole(DEFAULT_ADMIN_ROLE, _owner);\\n _setupRole(MANAGER_ROLE, _owner);\\n }\\n\\n /**\\n * @notice Lock ERC20 tokens for deposit, callable only by manager\\n * @param depositor Address who wants to deposit tokens\\n * @param depositReceiver Address (address) who wants to receive tokens on child chain\\n * @param rootToken Token which gets deposited\\n * @param depositData ABI encoded amount\\n */\\n function lockTokens(\\n address depositor,\\n address depositReceiver,\\n address rootToken,\\n bytes calldata depositData\\n ) external override only(MANAGER_ROLE) {\\n uint256 amount = abi.decode(depositData, (uint256));\\n\\n emit LockedMintableERC20(depositor, depositReceiver, rootToken, amount);\\n IMintableERC20(rootToken).transferFrom(\\n depositor,\\n address(this),\\n amount\\n );\\n }\\n\\n /**\\n * @notice Validates log signature, from and to address\\n * then sends the correct amount to withdrawer\\n * callable only by manager\\n * @param rootToken Token which gets withdrawn\\n * @param log Valid ERC20 burn log from child chain\\n */\\n function exitTokens(\\n address,\\n address rootToken,\\n bytes memory log\\n ) public override only(MANAGER_ROLE) {\\n RLPReader.RLPItem[] memory logRLPList = log.toRlpItem().toList();\\n RLPReader.RLPItem[] memory logTopicRLPList = logRLPList[1].toList(); // topics\\n\\n require(\\n bytes32(logTopicRLPList[0].toUint()) == TRANSFER_EVENT_SIG, // topic0 is `Transfer` event sig\\n \\\"MintableERC20Predicate: INVALID_SIGNATURE\\\"\\n );\\n\\n address withdrawer = address(logTopicRLPList[1].toUint()); // topic1 is `from` address\\n\\n require(\\n address(logTopicRLPList[2].toUint()) == address(0), // topic2 is `to` address\\n \\\"MintableERC20Predicate: INVALID_RECEIVER\\\"\\n );\\n\\n IMintableERC20 token = IMintableERC20(rootToken);\\n\\n uint256 tokenBalance = token.balanceOf(address(this));\\n uint256 amount = logRLPList[2].toUint();\\n\\n // Checking whether MintableERC20Predicate has enough balance\\n // to transfer `amount` to withdrawer or not\\n //\\n // If no, it'll mint those extra tokens & transfer `amount`\\n // to withdrawer\\n if (tokenBalance < amount) {\\n token.mint(address(this), amount - tokenBalance);\\n }\\n\\n token.transfer(withdrawer, amount);\\n }\\n}\\n\"\n },\n \"contracts/Libraries/matic/root/RootToken/IMintableERC20.sol\": {\n \"content\": \"import {IERC20} from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\npragma solidity 0.6.6;\\n\\ninterface IMintableERC20 is IERC20 {\\n /**\\n * @notice called by predicate contract to mint tokens while withdrawing\\n * @dev Should be callable only by MintableERC20Predicate\\n * Make sure minting is done only by this function\\n * @param user user address for whom token is being minted\\n * @param amount amount of token being minted\\n */\\n function mint(address user, uint256 amount) external;\\n}\\n\"\n },\n \"@openzeppelin/contracts/token/ERC20/IERC20.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\"\n },\n \"contracts/Libraries/matic/root/TokenPredicates/MintableERC1155Predicate.sol\": {\n \"content\": \"pragma solidity 0.6.6;\\n\\nimport {IMintableERC1155} from \\\"../RootToken/IMintableERC1155.sol\\\";\\nimport {\\n ERC1155Receiver\\n} from \\\"@openzeppelin/contracts/token/ERC1155/ERC1155Receiver.sol\\\";\\nimport {AccessControlMixin} from \\\"../../common/AccessControlMixin.sol\\\";\\nimport {RLPReader} from \\\"../../lib/RLPReader.sol\\\";\\nimport {ITokenPredicate} from \\\"./ITokenPredicate.sol\\\";\\nimport {Initializable} from \\\"../../common/Initializable.sol\\\";\\n\\ncontract MintableERC1155Predicate is\\n ITokenPredicate,\\n ERC1155Receiver,\\n AccessControlMixin,\\n Initializable\\n{\\n using RLPReader for bytes;\\n using RLPReader for RLPReader.RLPItem;\\n\\n bytes32 public constant MANAGER_ROLE = keccak256(\\\"MANAGER_ROLE\\\");\\n bytes32 public constant TOKEN_TYPE = keccak256(\\\"MintableERC1155\\\");\\n\\n bytes32 public constant TRANSFER_SINGLE_EVENT_SIG = keccak256(\\n \\\"TransferSingle(address,address,address,uint256,uint256)\\\"\\n );\\n bytes32 public constant TRANSFER_BATCH_EVENT_SIG = keccak256(\\n \\\"TransferBatch(address,address,address,uint256[],uint256[])\\\"\\n );\\n\\n event LockedBatchMintableERC1155(\\n address indexed depositor,\\n address indexed depositReceiver,\\n address indexed rootToken,\\n uint256[] ids,\\n uint256[] amounts\\n );\\n\\n constructor() public {}\\n\\n function initialize(address _owner) external initializer {\\n _setupContractId(\\\"MintableERC1155Predicate\\\");\\n _setupRole(DEFAULT_ADMIN_ROLE, _owner);\\n _setupRole(MANAGER_ROLE, _owner);\\n }\\n\\n /**\\n * @notice rejects single transfer\\n */\\n function onERC1155Received(\\n address,\\n address,\\n uint256,\\n uint256,\\n bytes calldata\\n ) external override returns (bytes4) {\\n return 0;\\n }\\n\\n /**\\n * @notice accepts batch transfer\\n */\\n function onERC1155BatchReceived(\\n address,\\n address,\\n uint256[] calldata,\\n uint256[] calldata,\\n bytes calldata\\n ) external override returns (bytes4) {\\n return ERC1155Receiver(0).onERC1155BatchReceived.selector;\\n }\\n\\n /**\\n * @notice Lock ERC1155 tokens for deposit, callable only by manager\\n * @param depositor Address who wants to deposit tokens\\n * @param depositReceiver Address (address) who wants to receive tokens on child chain\\n * @param rootToken Token which gets deposited\\n * @param depositData ABI encoded id array and amount array\\n */\\n function lockTokens(\\n address depositor,\\n address depositReceiver,\\n address rootToken,\\n bytes calldata depositData\\n ) external override only(MANAGER_ROLE) {\\n // forcing batch deposit since supporting both single and batch deposit introduces too much complexity\\n (\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) = abi.decode(depositData, (uint256[], uint256[], bytes));\\n\\n emit LockedBatchMintableERC1155(\\n depositor,\\n depositReceiver,\\n rootToken,\\n ids,\\n amounts\\n );\\n IMintableERC1155(rootToken).safeBatchTransferFrom(\\n depositor,\\n address(this),\\n ids,\\n amounts,\\n data\\n );\\n }\\n \\n // Used when attempting to exit with single token, single amount/ id is converted into\\n // slice of amounts/ ids\\n // Generally size is going to be `1` i.e. single element array, but it's kept generic\\n function makeArrayWithValue(uint256 val, uint size) internal pure returns(uint256[] memory) {\\n require(\\n size > 0,\\n \\\"MintableERC1155Predicate: Invalid resulting array length\\\"\\n );\\n\\n uint256[] memory vals = new uint256[](size);\\n\\n for (uint256 i = 0; i < size; i++) {\\n vals[i] = val;\\n }\\n\\n return vals;\\n }\\n\\n /**\\n * @notice Creates an array of `size` by repeating provided address,\\n * to be required for passing to batch balance checking function of ERC1155 tokens.\\n * @param addr Address to be repeated `size` times in resulting array\\n * @param size Size of resulting array\\n */\\n function makeArrayWithAddress(address addr, uint256 size)\\n internal\\n pure\\n returns (address[] memory)\\n {\\n require(\\n addr != address(0),\\n \\\"MintableERC1155Predicate: Invalid address\\\"\\n );\\n require(\\n size > 0,\\n \\\"MintableERC1155Predicate: Invalid resulting array length\\\"\\n );\\n\\n address[] memory addresses = new address[](size);\\n\\n for (uint256 i = 0; i < size; i++) {\\n addresses[i] = addr;\\n }\\n\\n return addresses;\\n }\\n\\n /**\\n * @notice Calculates amount of tokens to be minted, by subtracting available\\n * token balances from amount of tokens to be exited\\n * @param tokenBalances Token balances this contract holds for some ordered token ids\\n * @param amountsToBeExited Amount of tokens being exited\\n */\\n function calculateAmountsToBeMinted(\\n uint256[] memory tokenBalances,\\n uint256[] memory amountsToBeExited\\n ) internal pure returns (uint256[] memory) {\\n require(\\n tokenBalances.length == amountsToBeExited.length,\\n \\\"MintableERC1155Predicate: Array length mismatch found\\\"\\n );\\n\\n uint256[] memory toBeMintedAmounts = new uint256[](\\n tokenBalances.length\\n );\\n\\n // Iteratively calculating amounts of token to be minted\\n //\\n // Please note, in some cases it can be 0, but that will not\\n // be a problem, due to implementation of mint logic for ERC1155\\n for (uint256 i = 0; i < tokenBalances.length; i++) {\\n if (tokenBalances[i] < amountsToBeExited[i]) {\\n toBeMintedAmounts[i] = amountsToBeExited[i] - tokenBalances[i];\\n }\\n }\\n\\n return toBeMintedAmounts;\\n }\\n\\n /**\\n * @notice Validates log signature, from and to address\\n * then sends the correct tokenId, amount to withdrawer\\n * callable only by manager\\n * @param rootToken Token which gets withdrawn\\n * @param log Valid ERC1155 TransferSingle burn or TransferBatch burn log from child chain\\n */\\n function exitTokens(\\n address,\\n address rootToken,\\n bytes memory log\\n ) public override only(MANAGER_ROLE) {\\n RLPReader.RLPItem[] memory logRLPList = log.toRlpItem().toList();\\n RLPReader.RLPItem[] memory logTopicRLPList = logRLPList[1].toList(); // topics\\n bytes memory logData = logRLPList[2].toBytes();\\n\\n address withdrawer = address(logTopicRLPList[2].toUint()); // topic2 is from address\\n\\n require(\\n address(logTopicRLPList[3].toUint()) == address(0), // topic3 is to address\\n \\\"MintableERC1155Predicate: INVALID_RECEIVER\\\"\\n );\\n\\n if (bytes32(logTopicRLPList[0].toUint()) == TRANSFER_SINGLE_EVENT_SIG) {\\n // topic0 is event sig\\n (uint256 id, uint256 amount) = abi.decode(\\n logData,\\n (uint256, uint256)\\n );\\n\\n IMintableERC1155 token = IMintableERC1155(rootToken);\\n // Currently locked tokens for `id` in this contract\\n uint256 tokenBalance = token.balanceOf(address(this), id);\\n\\n // Checking whether MintableERC1155 contract has enough\\n // tokens locked in to transfer to withdrawer, if not\\n // it'll mint those tokens for this contract and return\\n // safely transfer those to withdrawer\\n if (tokenBalance < amount) {\\n // @notice We could have done `mint`, but that would require\\n // us implementing `onERC1155Received`, which we avoid intentionally\\n // for sake of only supporting batch deposit.\\n //\\n // Which is why this transfer is wrapped as single element batch minting\\n token.mintBatch(address(this), \\n makeArrayWithValue(id, 1), \\n makeArrayWithValue(amount - tokenBalance, 1), \\n bytes(\\\"\\\"));\\n }\\n\\n token.safeTransferFrom(\\n address(this),\\n withdrawer,\\n id,\\n amount,\\n bytes(\\\"\\\")\\n );\\n } else if (\\n bytes32(logTopicRLPList[0].toUint()) == TRANSFER_BATCH_EVENT_SIG\\n ) {\\n (uint256[] memory ids, uint256[] memory amounts) = abi.decode(\\n logData,\\n (uint256[], uint256[])\\n );\\n\\n IMintableERC1155 token = IMintableERC1155(rootToken);\\n\\n token.mintBatch(\\n address(this),\\n ids,\\n calculateAmountsToBeMinted(\\n token.balanceOfBatch(\\n makeArrayWithAddress(address(this), ids.length),\\n ids\\n ),\\n amounts\\n ),\\n bytes(\\\"\\\")\\n );\\n\\n IMintableERC1155(rootToken).safeBatchTransferFrom(\\n address(this),\\n withdrawer,\\n ids,\\n amounts,\\n bytes(\\\"\\\")\\n );\\n } else {\\n revert(\\\"MintableERC1155Predicate: INVALID_WITHDRAW_SIG\\\");\\n }\\n }\\n}\\n\"\n },\n \"contracts/Libraries/matic/root/RootToken/IMintableERC1155.sol\": {\n \"content\": \"import {IERC1155} from \\\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\\\";\\n\\npragma solidity 0.6.6;\\n\\ninterface IMintableERC1155 is IERC1155 {\\n /**\\n * @notice Creates `amount` tokens of token type `id`, and assigns them to `account`.\\n * @dev Should be callable only by MintableERC1155Predicate\\n * Make sure minting is done only by this function\\n * @param account user address for whom token is being minted\\n * @param id token which is being minted\\n * @param amount amount of token being minted\\n * @param data extra byte data to be accompanied with minted tokens\\n */\\n function mint(address account, uint256 id, uint256 amount, bytes calldata data) external;\\n\\n /**\\n * @notice Batched version of singular token minting, where\\n * for each token in `ids` respective amount to be minted from `amounts`\\n * array, for address `to`.\\n * @dev Should be callable only by MintableERC1155Predicate\\n * Make sure minting is done only by this function\\n * @param to user address for whom token is being minted\\n * @param ids tokens which are being minted\\n * @param amounts amount of each token being minted\\n * @param data extra byte data to be accompanied with minted tokens\\n */\\n function mintBatch(address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data) external;\\n}\\n\"\n },\n \"@openzeppelin/contracts/token/ERC1155/ERC1155Receiver.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./IERC1155Receiver.sol\\\";\\nimport \\\"../../introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev _Available since v3.1._\\n */\\nabstract contract ERC1155Receiver is ERC165, IERC1155Receiver {\\n constructor() internal {\\n _registerInterface(\\n ERC1155Receiver(address(0)).onERC1155Received.selector ^\\n ERC1155Receiver(address(0)).onERC1155BatchReceived.selector\\n );\\n }\\n}\\n\"\n },\n \"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\nimport \\\"../../introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155 is IERC165 {\\n /**\\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\\n */\\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\\n\\n /**\\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\\n * transfers.\\n */\\n event TransferBatch(address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values);\\n\\n /**\\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\\n * `approved`.\\n */\\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\\n\\n /**\\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\\n *\\n * If an {URI} event was emitted for `id`, the standard\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\\n * returned by {IERC1155MetadataURI-uri}.\\n */\\n event URI(string value, uint256 indexed id);\\n\\n /**\\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) external view returns (uint256);\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory);\\n\\n /**\\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\\n *\\n * Emits an {ApprovalForAll} event.\\n *\\n * Requirements:\\n *\\n * - `operator` cannot be the caller.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\\n *\\n * See {setApprovalForAll}.\\n */\\n function isApprovedForAll(address account, address operator) external view returns (bool);\\n\\n /**\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}.\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function safeBatchTransferFrom(address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data) external;\\n}\\n\"\n },\n \"@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../introspection/IERC165.sol\\\";\\n\\n/**\\n * _Available since v3.1._\\n */\\ninterface IERC1155Receiver is IERC165 {\\n\\n /**\\n @dev Handles the receipt of a single ERC1155 token type. This function is\\n called at the end of a `safeTransferFrom` after the balance has been updated.\\n To accept the transfer, this must return\\n `bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))`\\n (i.e. 0xf23a6e61, or its own function selector).\\n @param operator The address which initiated the transfer (i.e. msg.sender)\\n @param from The address which previously owned the token\\n @param id The ID of the token being transferred\\n @param value The amount of tokens being transferred\\n @param data Additional data with no specified format\\n @return `bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))` if transfer is allowed\\n */\\n function onERC1155Received(\\n address operator,\\n address from,\\n uint256 id,\\n uint256 value,\\n bytes calldata data\\n )\\n external\\n returns(bytes4);\\n\\n /**\\n @dev Handles the receipt of a multiple ERC1155 token types. This function\\n is called at the end of a `safeBatchTransferFrom` after the balances have\\n been updated. To accept the transfer(s), this must return\\n `bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))`\\n (i.e. 0xbc197c81, or its own function selector).\\n @param operator The address which initiated the batch transfer (i.e. msg.sender)\\n @param from The address which previously owned the token\\n @param ids An array containing ids of each token being transferred (order and length must match values array)\\n @param values An array containing amounts of each token being transferred (order and length must match ids array)\\n @param data Additional data with no specified format\\n @return `bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))` if transfer is allowed\\n */\\n function onERC1155BatchReceived(\\n address operator,\\n address from,\\n uint256[] calldata ids,\\n uint256[] calldata values,\\n bytes calldata data\\n )\\n external\\n returns(bytes4);\\n}\\n\"\n },\n \"contracts/Libraries/matic/test/MerklePatriciaTest.sol\": {\n \"content\": \"pragma solidity 0.6.6;\\n\\nimport {MerklePatriciaProof} from \\\"../lib/MerklePatriciaProof.sol\\\";\\nimport {RLPReader} from \\\"../lib/RLPReader.sol\\\";\\n\\ncontract MerklePatriciaTest {\\n using RLPReader for bytes;\\n using RLPReader for RLPReader.RLPItem;\\n\\n function verify(uint receiptRoot, bytes calldata receipt, bytes calldata receiptProof, bytes calldata branchMask) external pure returns(bool) {\\n\\n return MerklePatriciaProof.verify(\\n receipt, // receipt\\n branchMask, // branchMask\\n receiptProof, // receiptProof\\n bytes32(receiptRoot) // receiptRoot\\n );\\n }\\n}\\n\"\n },\n \"contracts/Libraries/matic/root/TokenPredicates/EtherPredicate.sol\": {\n \"content\": \"pragma solidity 0.6.6;\\n\\nimport {AccessControlMixin} from \\\"../../common/AccessControlMixin.sol\\\";\\nimport {RLPReader} from \\\"../../lib/RLPReader.sol\\\";\\nimport {ITokenPredicate} from \\\"./ITokenPredicate.sol\\\";\\nimport {Initializable} from \\\"../../common/Initializable.sol\\\";\\n\\ncontract EtherPredicate is ITokenPredicate, AccessControlMixin, Initializable {\\n using RLPReader for bytes;\\n using RLPReader for RLPReader.RLPItem;\\n\\n bytes32 public constant MANAGER_ROLE = keccak256(\\\"MANAGER_ROLE\\\");\\n bytes32 public constant TOKEN_TYPE = keccak256(\\\"Ether\\\");\\n bytes32 public constant TRANSFER_EVENT_SIG = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef;\\n\\n event LockedEther(\\n address indexed depositor,\\n address indexed depositReceiver,\\n uint256 amount\\n );\\n\\n event ExitedEther(\\n address indexed exitor,\\n uint256 amount\\n );\\n\\n constructor() public {}\\n\\n function initialize(address _owner) external initializer {\\n _setupContractId(\\\"EtherPredicate\\\");\\n _setupRole(DEFAULT_ADMIN_ROLE, _owner);\\n _setupRole(MANAGER_ROLE, _owner);\\n }\\n\\n /**\\n * @notice Receive Ether to lock for deposit, callable only by manager\\n */\\n receive() external payable only(MANAGER_ROLE) {}\\n\\n /**\\n * @notice handle ether lock, callable only by manager\\n * @param depositor Address who wants to deposit tokens\\n * @param depositReceiver Address (address) who wants to receive tokens on child chain\\n * @param depositData ABI encoded amount\\n */\\n function lockTokens(\\n address depositor,\\n address depositReceiver,\\n address,\\n bytes calldata depositData\\n )\\n external\\n override\\n only(MANAGER_ROLE)\\n {\\n uint256 amount = abi.decode(depositData, (uint256));\\n emit LockedEther(depositor, depositReceiver, amount);\\n }\\n\\n /**\\n * @notice Validates log signature, from and to address\\n * then sends the correct amount to withdrawer\\n * callable only by manager\\n * @param log Valid ERC20 burn log from child chain\\n */\\n function exitTokens(\\n address,\\n address,\\n bytes memory log\\n )\\n public\\n override\\n only(MANAGER_ROLE)\\n {\\n RLPReader.RLPItem[] memory logRLPList = log.toRlpItem().toList();\\n RLPReader.RLPItem[] memory logTopicRLPList = logRLPList[1].toList(); // topics\\n\\n require(\\n bytes32(logTopicRLPList[0].toUint()) == TRANSFER_EVENT_SIG, // topic0 is event sig\\n \\\"EtherPredicate: INVALID_SIGNATURE\\\"\\n );\\n\\n address withdrawer = address(logTopicRLPList[1].toUint()); // topic1 is from address\\n\\n require(\\n address(logTopicRLPList[2].toUint()) == address(0), // topic2 is to address\\n \\\"EtherPredicate: INVALID_RECEIVER\\\"\\n );\\n\\n emit ExitedEther(withdrawer, logRLPList[2].toUint());\\n\\n payable(withdrawer).transfer(logRLPList[2].toUint());\\n }\\n}\\n\"\n },\n \"contracts/Libraries/matic/tunnel/BaseChildTunnel.sol\": {\n \"content\": \"pragma solidity 0.6.6;\\n\\n\\nimport {AccessControlMixin} from \\\"../common/AccessControlMixin.sol\\\";\\n\\n/**\\n* @notice Mock child tunnel contract to receive and send message from L2\\n*/\\nabstract contract BaseChildTunnel is AccessControlMixin {\\n bytes32 public constant STATE_SYNCER_ROLE = keccak256(\\\"STATE_SYNCER_ROLE\\\");\\n\\n // MessageTunnel on L1 will get data from this event\\n event MessageSent(bytes message);\\n\\n constructor() internal {\\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n _setupRole(STATE_SYNCER_ROLE, 0x0000000000000000000000000000000000001001);\\n _setupContractId(\\\"ChildTunnel\\\");\\n }\\n\\n /**\\n * @notice Receive state sync from matic contracts\\n * @dev This method will be called by Matic chain internally.\\n * This is executed without transaction using a system call.\\n */\\n function onStateReceive(uint256, bytes memory message) public only(STATE_SYNCER_ROLE) {\\n _processMessageFromRoot(message);\\n }\\n\\n /**\\n * @notice Emit message that can be received on Root Tunnel\\n * @dev Call the internal function when need to emit message\\n * @param message bytes message that will be sent to Root Tunnel\\n * some message examples -\\n * abi.encode(tokenId);\\n * abi.encode(tokenId, tokenMetadata);\\n * abi.encode(messageType, messageData);\\n */\\n function _sendMessageToRoot(bytes memory message) internal {\\n emit MessageSent(message);\\n }\\n\\n /**\\n * @notice Process message received from Root Tunnel\\n * @dev function needs to be implemented to handle message as per requirement\\n * This is called by onStateReceive function.\\n * Since it is called via a system call, any event will not be emitted during its execution.\\n * @param message bytes message that was sent from Root Tunnel\\n */\\n function _processMessageFromRoot(bytes memory message) virtual internal;\\n}\\n\"\n },\n \"contracts/Libraries/matic/tunnel/ChildTunnel.sol\": {\n \"content\": \"pragma solidity ^0.6.6;\\n\\nimport {BaseChildTunnel} from \\\"./BaseChildTunnel.sol\\\";\\n\\n\\ncontract ChildTunnel is BaseChildTunnel {\\n function _processMessageFromRoot(bytes memory message) internal override {\\n // implement your core logic here\\n }\\n}\\n\"\n },\n \"contracts/Libraries/matic/test/TestChildTunnel.sol\": {\n \"content\": \"pragma solidity 0.6.6;\\n\\nimport {BaseChildTunnel} from \\\"../tunnel/BaseChildTunnel.sol\\\";\\n\\ncontract TestChildTunnel is BaseChildTunnel {\\n uint256 public number;\\n\\n bytes32 public constant TYPE1 = keccak256(\\\"TYPE1\\\");\\n bytes32 public constant TYPE2 = keccak256(\\\"TYPE2\\\");\\n\\n function _processMessageFromRoot(bytes memory message) internal override {\\n (bytes32 syncType, uint256 n) = abi.decode(\\n message,\\n (bytes32, uint256)\\n );\\n\\n if (TYPE1 == syncType) {\\n number = number + n; // add\\n } else if (TYPE2 == syncType) {\\n number = number - n; // sub\\n }\\n }\\n\\n function sendMessage(bytes calldata message) external {\\n _sendMessageToRoot(message);\\n }\\n}\\n\"\n },\n \"contracts/Libraries/matic/root/TokenPredicates/ERC721Predicate.sol\": {\n \"content\": \"pragma solidity 0.6.6;\\n\\nimport {IRootERC721} from \\\"../RootToken/IRootERC721.sol\\\";\\nimport {IERC721Receiver} from \\\"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\\\";\\nimport {RLPReader} from \\\"../../lib/RLPReader.sol\\\";\\nimport {ITokenPredicate} from \\\"./ITokenPredicate.sol\\\";\\nimport {Initializable} from \\\"../../common/Initializable.sol\\\";\\nimport {AccessControlMixin} from \\\"../../common/AccessControlMixin.sol\\\";\\n\\ncontract ERC721Predicate is ITokenPredicate, AccessControlMixin, Initializable, IERC721Receiver {\\n using RLPReader for bytes;\\n using RLPReader for RLPReader.RLPItem;\\n\\n bytes32 public constant MANAGER_ROLE = keccak256(\\\"MANAGER_ROLE\\\");\\n bytes32 public constant TOKEN_TYPE = keccak256(\\\"ERC721\\\");\\n // keccak256(\\\"Transfer(address,address,uint256)\\\")\\n bytes32 public constant TRANSFER_EVENT_SIG = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef;\\n // keccak256(\\\"WithdrawnBatch(address,uint256[])\\\")\\n bytes32 public constant WITHDRAW_BATCH_EVENT_SIG = 0xf871896b17e9cb7a64941c62c188a4f5c621b86800e3d15452ece01ce56073df;\\n // keccak256(\\\"TransferWithMetadata(address,address,uint256,bytes)\\\")\\n bytes32 public constant TRANSFER_WITH_METADATA_EVENT_SIG = 0xf94915c6d1fd521cee85359239227480c7e8776d7caf1fc3bacad5c269b66a14;\\n\\n // limit batching of tokens due to gas limit restrictions\\n uint256 public constant BATCH_LIMIT = 20;\\n\\n event LockedERC721(\\n address indexed depositor,\\n address indexed depositReceiver,\\n address indexed rootToken,\\n uint256 tokenId\\n );\\n event LockedERC721Batch(\\n address indexed depositor,\\n address indexed depositReceiver,\\n address indexed rootToken,\\n uint256[] tokenIds\\n );\\n\\n constructor() public {}\\n\\n function initialize(address _owner) external initializer {\\n _setupContractId(\\\"ERC721Predicate\\\");\\n _setupRole(DEFAULT_ADMIN_ROLE, _owner);\\n _setupRole(MANAGER_ROLE, _owner);\\n }\\n\\n /**\\n * @notice accepts safe ERC721 transfer\\n */\\n function onERC721Received(\\n address,\\n address,\\n uint256,\\n bytes calldata\\n )\\n external\\n override\\n returns (bytes4)\\n {\\n return IERC721Receiver.onERC721Received.selector;\\n }\\n\\n /**\\n * @notice Lock ERC721 tokens for deposit, callable only by manager\\n * @param depositor Address who wants to deposit token\\n * @param depositReceiver Address (address) who wants to receive token on child chain\\n * @param rootToken Token which gets deposited\\n * @param depositData ABI encoded tokenId\\n */\\n function lockTokens(\\n address depositor,\\n address depositReceiver,\\n address rootToken,\\n bytes calldata depositData\\n )\\n external\\n override\\n only(MANAGER_ROLE)\\n {\\n // deposit single\\n if (depositData.length == 32) {\\n uint256 tokenId = abi.decode(depositData, (uint256));\\n emit LockedERC721(depositor, depositReceiver, rootToken, tokenId);\\n IRootERC721(rootToken).safeTransferFrom(depositor, address(this), tokenId);\\n\\n // deposit batch\\n } else {\\n uint256[] memory tokenIds = abi.decode(depositData, (uint256[]));\\n emit LockedERC721Batch(depositor, depositReceiver, rootToken, tokenIds);\\n uint256 length = tokenIds.length;\\n require(length <= BATCH_LIMIT, \\\"ERC721Predicate: EXCEEDS_BATCH_LIMIT\\\");\\n for (uint256 i; i < length; i++) {\\n IRootERC721(rootToken).safeTransferFrom(depositor, address(this), tokenIds[i]);\\n }\\n }\\n }\\n\\n /**\\n * @notice Validates log signature, from and to address\\n * then sends the correct tokenId to withdrawer\\n * callable only by manager\\n * @param rootToken Token which gets withdrawn\\n * @param log Valid ERC721 burn log from child chain\\n */\\n function exitTokens(\\n address,\\n address rootToken,\\n bytes memory log\\n )\\n public\\n override\\n only(MANAGER_ROLE)\\n {\\n RLPReader.RLPItem[] memory logRLPList = log.toRlpItem().toList();\\n RLPReader.RLPItem[] memory logTopicRLPList = logRLPList[1].toList(); // topics\\n address withdrawer = address(logTopicRLPList[1].toUint()); // topic1 is from address\\n\\n if (bytes32(logTopicRLPList[0].toUint()) == TRANSFER_EVENT_SIG) { // topic0 is event sig\\n require(\\n address(logTopicRLPList[2].toUint()) == address(0), // topic2 is to address\\n \\\"ERC721Predicate: INVALID_RECEIVER\\\"\\n );\\n\\n IRootERC721(rootToken).safeTransferFrom(\\n address(this),\\n withdrawer,\\n logTopicRLPList[3].toUint() // topic3 is tokenId field\\n );\\n\\n } else if (bytes32(logTopicRLPList[0].toUint()) == WITHDRAW_BATCH_EVENT_SIG) { // topic0 is event sig\\n bytes memory logData = logRLPList[2].toBytes();\\n (uint256[] memory tokenIds) = abi.decode(logData, (uint256[])); // data is tokenId list\\n uint256 length = tokenIds.length;\\n for (uint256 i; i < length; i++) {\\n IRootERC721(rootToken).safeTransferFrom(address(this), withdrawer, tokenIds[i]);\\n }\\n\\n } else if (bytes32(logTopicRLPList[0].toUint()) == TRANSFER_WITH_METADATA_EVENT_SIG) { \\n // If this is when NFT exit is done with arbitrary metadata on L2\\n\\n require(\\n address(logTopicRLPList[2].toUint()) == address(0), // topic2 is to address\\n \\\"ERC721Predicate: INVALID_RECEIVER\\\"\\n );\\n\\n IRootERC721 token = IRootERC721(rootToken);\\n uint256 tokenId = logTopicRLPList[3].toUint(); // topic3 is tokenId field\\n\\n token.safeTransferFrom(address(this), withdrawer, tokenId);\\n // This function will be invoked for passing arbitrary\\n // metadata, obtained from event emitted in L2, to\\n // L1 ERC721, so that it can decode & do further processing\\n //\\n // @note Make sure you've implemented this method\\n // if you're interested in exiting with metadata\\n bytes memory logData = logRLPList[2].toBytes();\\n bytes memory metaData = abi.decode(logData, (bytes));\\n\\n token.setTokenMetadata(tokenId, metaData);\\n\\n } else {\\n revert(\\\"ERC721Predicate: INVALID_SIGNATURE\\\");\\n }\\n }\\n}\\n\"\n },\n \"contracts/Libraries/matic/root/RootToken/IRootERC721.sol\": {\n \"content\": \"import {IERC721} from \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\n\\npragma solidity 0.6.6;\\n\\ninterface IRootERC721 is IERC721 {\\n\\n // Make sure you implement this method is root ERC721\\n // contract when you're interested in transferring\\n // metadata from L2 to L1\\n function setTokenMetadata(uint256 tokenId, bytes calldata data) external;\\n\\n}\\n\"\n },\n \"contracts/Libraries/matic/root/RootToken/DummyERC721.sol\": {\n \"content\": \"pragma solidity 0.6.6;\\n\\nimport {ERC721} from \\\"@openzeppelin/contracts/token/ERC721/ERC721.sol\\\";\\nimport {AccessControlMixin} from \\\"../../common/AccessControlMixin.sol\\\";\\nimport {NativeMetaTransaction} from \\\"../../common/NativeMetaTransaction.sol\\\";\\nimport {IRootERC721} from \\\"./IRootERC721.sol\\\";\\nimport {ContextMixin} from \\\"../../common/ContextMixin.sol\\\";\\n\\ncontract DummyERC721 is\\n ERC721,\\n AccessControlMixin,\\n NativeMetaTransaction,\\n IRootERC721,\\n ContextMixin\\n{\\n bytes32 public constant PREDICATE_ROLE = keccak256(\\\"PREDICATE_ROLE\\\");\\n constructor(string memory name_, string memory symbol_)\\n public\\n ERC721(name_, symbol_)\\n {\\n _setupContractId(\\\"DummyERC721\\\");\\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\\n _setupRole(PREDICATE_ROLE, _msgSender());\\n _initializeEIP712(name_);\\n }\\n\\n function mint(uint256 tokenId) public {\\n _mint(_msgSender(), tokenId);\\n }\\n\\n /**\\n * If you're attempting to bring metadata associated with token\\n * from L2 to L1, you must implement this method\\n *\\n * To be invoked when attempting to exit ERC721 with metadata from L2\\n *\\n * `data` is nothing but arbitrary byte array which\\n * is brought in L1, by event emitted in L2, during withdraw\\n *\\n * Make sure this method is always callable by Predicate contract\\n * who will invoke it when attempting to exit with metadata\\n */\\n function setTokenMetadata(uint256 tokenId, bytes calldata data) external override only(PREDICATE_ROLE) {\\n // This function should decode metadata obtained from L2\\n // and attempt to set it for this `tokenId`\\n //\\n // Following is just a default implementation, feel\\n // free to define your own encoding/ decoding scheme\\n // for L2 -> L1 token metadata transfer\\n string memory uri = abi.decode(data, (string));\\n\\n _setTokenURI(tokenId, uri);\\n }\\n\\n function _msgSender()\\n internal\\n override\\n view\\n returns (address payable sender)\\n {\\n return ContextMixin.msgSender();\\n }\\n}\\n\"\n },\n \"@openzeppelin/contracts/token/ERC1155/ERC1155.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./IERC1155.sol\\\";\\nimport \\\"./IERC1155MetadataURI.sol\\\";\\nimport \\\"./IERC1155Receiver.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"../../introspection/ERC165.sol\\\";\\nimport \\\"../../math/SafeMath.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\n\\n/**\\n *\\n * @dev Implementation of the basic standard multi-token.\\n * See https://eips.ethereum.org/EIPS/eip-1155\\n * Originally based on code by Enjin: https://github.com/enjin/erc-1155\\n *\\n * _Available since v3.1._\\n */\\ncontract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {\\n using SafeMath for uint256;\\n using Address for address;\\n\\n // Mapping from token ID to account balances\\n mapping (uint256 => mapping(address => uint256)) private _balances;\\n\\n // Mapping from account to operator approvals\\n mapping (address => mapping(address => bool)) private _operatorApprovals;\\n\\n // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json\\n string private _uri;\\n\\n /*\\n * bytes4(keccak256('balanceOf(address,uint256)')) == 0x00fdd58e\\n * bytes4(keccak256('balanceOfBatch(address[],uint256[])')) == 0x4e1273f4\\n * bytes4(keccak256('setApprovalForAll(address,bool)')) == 0xa22cb465\\n * bytes4(keccak256('isApprovedForAll(address,address)')) == 0xe985e9c5\\n * bytes4(keccak256('safeTransferFrom(address,address,uint256,uint256,bytes)')) == 0xf242432a\\n * bytes4(keccak256('safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)')) == 0x2eb2c2d6\\n *\\n * => 0x00fdd58e ^ 0x4e1273f4 ^ 0xa22cb465 ^\\n * 0xe985e9c5 ^ 0xf242432a ^ 0x2eb2c2d6 == 0xd9b67a26\\n */\\n bytes4 private constant _INTERFACE_ID_ERC1155 = 0xd9b67a26;\\n\\n /*\\n * bytes4(keccak256('uri(uint256)')) == 0x0e89341c\\n */\\n bytes4 private constant _INTERFACE_ID_ERC1155_METADATA_URI = 0x0e89341c;\\n\\n /**\\n * @dev See {_setURI}.\\n */\\n constructor (string memory uri_) public {\\n _setURI(uri_);\\n\\n // register the supported interfaces to conform to ERC1155 via ERC165\\n _registerInterface(_INTERFACE_ID_ERC1155);\\n\\n // register the supported interfaces to conform to ERC1155MetadataURI via ERC165\\n _registerInterface(_INTERFACE_ID_ERC1155_METADATA_URI);\\n }\\n\\n /**\\n * @dev See {IERC1155MetadataURI-uri}.\\n *\\n * This implementation returns the same URI for *all* token types. It relies\\n * on the token type ID substitution mechanism\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\n *\\n * Clients calling this function must replace the `\\\\{id\\\\}` substring with the\\n * actual token type ID.\\n */\\n function uri(uint256) external view virtual override returns (string memory) {\\n return _uri;\\n }\\n\\n /**\\n * @dev See {IERC1155-balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {\\n require(account != address(0), \\\"ERC1155: balance query for the zero address\\\");\\n return _balances[id][account];\\n }\\n\\n /**\\n * @dev See {IERC1155-balanceOfBatch}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(\\n address[] memory accounts,\\n uint256[] memory ids\\n )\\n public\\n view\\n virtual\\n override\\n returns (uint256[] memory)\\n {\\n require(accounts.length == ids.length, \\\"ERC1155: accounts and ids length mismatch\\\");\\n\\n uint256[] memory batchBalances = new uint256[](accounts.length);\\n\\n for (uint256 i = 0; i < accounts.length; ++i) {\\n batchBalances[i] = balanceOf(accounts[i], ids[i]);\\n }\\n\\n return batchBalances;\\n }\\n\\n /**\\n * @dev See {IERC1155-setApprovalForAll}.\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\n require(_msgSender() != operator, \\\"ERC1155: setting approval status for self\\\");\\n\\n _operatorApprovals[_msgSender()][operator] = approved;\\n emit ApprovalForAll(_msgSender(), operator, approved);\\n }\\n\\n /**\\n * @dev See {IERC1155-isApprovedForAll}.\\n */\\n function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {\\n return _operatorApprovals[account][operator];\\n }\\n\\n /**\\n * @dev See {IERC1155-safeTransferFrom}.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n )\\n public\\n virtual\\n override\\n {\\n require(to != address(0), \\\"ERC1155: transfer to the zero address\\\");\\n require(\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\n \\\"ERC1155: caller is not owner nor approved\\\"\\n );\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, from, to, _asSingletonArray(id), _asSingletonArray(amount), data);\\n\\n _balances[id][from] = _balances[id][from].sub(amount, \\\"ERC1155: insufficient balance for transfer\\\");\\n _balances[id][to] = _balances[id][to].add(amount);\\n\\n emit TransferSingle(operator, from, to, id, amount);\\n\\n _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);\\n }\\n\\n /**\\n * @dev See {IERC1155-safeBatchTransferFrom}.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n )\\n public\\n virtual\\n override\\n {\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n require(to != address(0), \\\"ERC1155: transfer to the zero address\\\");\\n require(\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\n \\\"ERC1155: transfer caller is not owner nor approved\\\"\\n );\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n for (uint256 i = 0; i < ids.length; ++i) {\\n uint256 id = ids[i];\\n uint256 amount = amounts[i];\\n\\n _balances[id][from] = _balances[id][from].sub(\\n amount,\\n \\\"ERC1155: insufficient balance for transfer\\\"\\n );\\n _balances[id][to] = _balances[id][to].add(amount);\\n }\\n\\n emit TransferBatch(operator, from, to, ids, amounts);\\n\\n _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Sets a new URI for all token types, by relying on the token type ID\\n * substitution mechanism\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\n *\\n * By this mechanism, any occurrence of the `\\\\{id\\\\}` substring in either the\\n * URI or any of the amounts in the JSON file at said URI will be replaced by\\n * clients with the token type ID.\\n *\\n * For example, the `https://token-cdn-domain/\\\\{id\\\\}.json` URI would be\\n * interpreted by clients as\\n * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`\\n * for token type ID 0x4cce0.\\n *\\n * See {uri}.\\n *\\n * Because these URIs cannot be meaningfully represented by the {URI} event,\\n * this function emits no events.\\n */\\n function _setURI(string memory newuri) internal virtual {\\n _uri = newuri;\\n }\\n\\n /**\\n * @dev Creates `amount` tokens of token type `id`, and assigns them to `account`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function _mint(address account, uint256 id, uint256 amount, bytes memory data) internal virtual {\\n require(account != address(0), \\\"ERC1155: mint to the zero address\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, address(0), account, _asSingletonArray(id), _asSingletonArray(amount), data);\\n\\n _balances[id][account] = _balances[id][account].add(amount);\\n emit TransferSingle(operator, address(0), account, id, amount);\\n\\n _doSafeTransferAcceptanceCheck(operator, address(0), account, id, amount, data);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function _mintBatch(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) internal virtual {\\n require(to != address(0), \\\"ERC1155: mint to the zero address\\\");\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n for (uint i = 0; i < ids.length; i++) {\\n _balances[ids[i]][to] = amounts[i].add(_balances[ids[i]][to]);\\n }\\n\\n emit TransferBatch(operator, address(0), to, ids, amounts);\\n\\n _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens of token type `id` from `account`\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens of token type `id`.\\n */\\n function _burn(address account, uint256 id, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC1155: burn from the zero address\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, account, address(0), _asSingletonArray(id), _asSingletonArray(amount), \\\"\\\");\\n\\n _balances[id][account] = _balances[id][account].sub(\\n amount,\\n \\\"ERC1155: burn amount exceeds balance\\\"\\n );\\n\\n emit TransferSingle(operator, account, address(0), id, amount);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n */\\n function _burnBatch(address account, uint256[] memory ids, uint256[] memory amounts) internal virtual {\\n require(account != address(0), \\\"ERC1155: burn from the zero address\\\");\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, account, address(0), ids, amounts, \\\"\\\");\\n\\n for (uint i = 0; i < ids.length; i++) {\\n _balances[ids[i]][account] = _balances[ids[i]][account].sub(\\n amounts[i],\\n \\\"ERC1155: burn amount exceeds balance\\\"\\n );\\n }\\n\\n emit TransferBatch(operator, account, address(0), ids, amounts);\\n }\\n\\n /**\\n * @dev Hook that is called before any token transfer. This includes minting\\n * and burning, as well as batched variants.\\n *\\n * The same hook is called on both single and batched variants. For single\\n * transfers, the length of the `id` and `amount` arrays will be 1.\\n *\\n * Calling conditions (for each `id` and `amount` pair):\\n *\\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * of token type `id` will be transferred to `to`.\\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\\n * for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\n * will be burned.\\n * - `from` and `to` are never both zero.\\n * - `ids` and `amounts` have the same, non-zero length.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n )\\n internal\\n virtual\\n { }\\n\\n function _doSafeTransferAcceptanceCheck(\\n address operator,\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n )\\n private\\n {\\n if (to.isContract()) {\\n try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {\\n if (response != IERC1155Receiver(to).onERC1155Received.selector) {\\n revert(\\\"ERC1155: ERC1155Receiver rejected tokens\\\");\\n }\\n } catch Error(string memory reason) {\\n revert(reason);\\n } catch {\\n revert(\\\"ERC1155: transfer to non ERC1155Receiver implementer\\\");\\n }\\n }\\n }\\n\\n function _doSafeBatchTransferAcceptanceCheck(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n )\\n private\\n {\\n if (to.isContract()) {\\n try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (bytes4 response) {\\n if (response != IERC1155Receiver(to).onERC1155BatchReceived.selector) {\\n revert(\\\"ERC1155: ERC1155Receiver rejected tokens\\\");\\n }\\n } catch Error(string memory reason) {\\n revert(reason);\\n } catch {\\n revert(\\\"ERC1155: transfer to non ERC1155Receiver implementer\\\");\\n }\\n }\\n }\\n\\n function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {\\n uint256[] memory array = new uint256[](1);\\n array[0] = element;\\n\\n return array;\\n }\\n}\\n\"\n },\n \"@openzeppelin/contracts/token/ERC1155/IERC1155MetadataURI.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\nimport \\\"./IERC1155.sol\\\";\\n\\n/**\\n * @dev Interface of the optional ERC1155MetadataExtension interface, as defined\\n * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155MetadataURI is IERC1155 {\\n /**\\n * @dev Returns the URI for token type `id`.\\n *\\n * If the `\\\\{id\\\\}` substring is present in the URI, it must be replaced by\\n * clients with the actual token type ID.\\n */\\n function uri(uint256 id) external view returns (string memory);\\n}\\n\"\n },\n \"contracts/Libraries/matic/root/RootToken/DummyMintableERC1155.sol\": {\n \"content\": \"pragma solidity 0.6.6;\\n\\nimport {ERC1155} from \\\"@openzeppelin/contracts/token/ERC1155/ERC1155.sol\\\";\\nimport {IMintableERC1155} from \\\"./IMintableERC1155.sol\\\";\\nimport {NativeMetaTransaction} from \\\"../../common/NativeMetaTransaction.sol\\\";\\nimport {ContextMixin} from \\\"../../common/ContextMixin.sol\\\";\\nimport {AccessControlMixin} from \\\"../../common/AccessControlMixin.sol\\\";\\n\\ncontract DummyMintableERC1155 is\\n ERC1155,\\n AccessControlMixin,\\n NativeMetaTransaction,\\n ContextMixin,\\n IMintableERC1155\\n{\\n bytes32 public constant PREDICATE_ROLE = keccak256(\\\"PREDICATE_ROLE\\\");\\n\\n constructor(string memory uri_) public ERC1155(uri_) {\\n _setupContractId(\\\"DummyMintableERC1155\\\");\\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\\n _setupRole(PREDICATE_ROLE, _msgSender());\\n\\n _initializeEIP712(uri_);\\n }\\n\\n function mint(\\n address account,\\n uint256 id,\\n uint256 amount,\\n bytes calldata data\\n ) external override only(PREDICATE_ROLE) {\\n _mint(account, id, amount, data);\\n }\\n\\n function mintBatch(\\n address to,\\n uint256[] calldata ids,\\n uint256[] calldata amounts,\\n bytes calldata data\\n ) external override only(PREDICATE_ROLE) {\\n _mintBatch(to, ids, amounts, data);\\n }\\n\\n function _msgSender()\\n internal\\n override\\n view\\n returns (address payable sender)\\n {\\n return ContextMixin.msgSender();\\n }\\n}\\n\"\n },\n \"contracts/Libraries/matic/root/RootToken/DummyMintableERC20.sol\": {\n \"content\": \"pragma solidity 0.6.6;\\n\\nimport {ERC20} from \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport {IMintableERC20} from \\\"./IMintableERC20.sol\\\";\\nimport {NativeMetaTransaction} from \\\"../../common/NativeMetaTransaction.sol\\\";\\nimport {ContextMixin} from \\\"../../common/ContextMixin.sol\\\";\\nimport {AccessControlMixin} from \\\"../../common/AccessControlMixin.sol\\\";\\n\\ncontract DummyMintableERC20 is\\n ERC20,\\n AccessControlMixin,\\n NativeMetaTransaction,\\n ContextMixin,\\n IMintableERC20\\n{\\n bytes32 public constant PREDICATE_ROLE = keccak256(\\\"PREDICATE_ROLE\\\");\\n\\n constructor(string memory name_, string memory symbol_)\\n public\\n ERC20(name_, symbol_)\\n {\\n _setupContractId(\\\"DummyMintableERC20\\\");\\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\\n _setupRole(PREDICATE_ROLE, _msgSender());\\n\\n _mint(_msgSender(), 10**10 * (10**18));\\n _initializeEIP712(name_);\\n }\\n\\n /**\\n * @dev See {IMintableERC20-mint}.\\n */\\n function mint(address user, uint256 amount) external override only(PREDICATE_ROLE) {\\n _mint(user, amount);\\n }\\n\\n function _msgSender()\\n internal\\n override\\n view\\n returns (address payable sender)\\n {\\n return ContextMixin.msgSender();\\n }\\n}\\n\"\n },\n \"@openzeppelin/contracts/token/ERC20/ERC20.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin guidelines: functions revert instead\\n * of returning `false` on failure. This behavior is nonetheless conventional\\n * and does not conflict with the expectations of ERC20 applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20 {\\n using SafeMath for uint256;\\n\\n mapping (address => uint256) private _balances;\\n\\n mapping (address => mapping (address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n uint8 private _decimals;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}, initializes {decimals} with\\n * a default value of 18.\\n *\\n * To select a different value for {decimals}, use {_setupDecimals}.\\n *\\n * All three of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor (string memory name_, string memory symbol_) public {\\n _name = name_;\\n _symbol = symbol_;\\n _decimals = 18;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5,05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\\n * called.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\n return true;\\n }\\n\\n /**\\n * @dev Moves tokens `amount` from `sender` to `recipient`.\\n *\\n * This is internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n _balances[recipient] = _balances[recipient].add(amount);\\n emit Transfer(sender, recipient, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply = _totalSupply.add(amount);\\n _balances[account] = _balances[account].add(amount);\\n emit Transfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\n _totalSupply = _totalSupply.sub(amount);\\n emit Transfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Sets {decimals} to a value other than the default one of 18.\\n *\\n * WARNING: This function should only be called from the constructor. Most\\n * applications that interact with token contracts will not expect\\n * {decimals} to ever change, and may work incorrectly if it does.\\n */\\n function _setupDecimals(uint8 decimals_) internal virtual {\\n _decimals = decimals_;\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be to transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both 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 amount) internal virtual { }\\n}\\n\"\n },\n \"contracts/Libraries/matic/test/PotatoMigration/RootPotatoMigrator.sol\": {\n \"content\": \"pragma solidity 0.6.6;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"../../root/StateSender/IStateSender.sol\\\";\\nimport \\\"../../root/RootChainManager/IRootChainManager.sol\\\";\\n\\n// This contract enables deposit and plant deom single tx on ethereum chain\\n// First potatoes are transferred to this contract\\n// Then they are deposited to ChildPotatoMigrator contract\\n// Then a custom state sync is sent to ChildPotatoMigrator, using this the potatoes will be planted on matic chain\\ncontract RootPotatoMigrator {\\n IStateSender stateSender;\\n IERC20 potato;\\n IRootChainManager rootChainManager;\\n address erc20Predicate;\\n address childPotatoMigrator;\\n\\n constructor(\\n address stateSender_,\\n address potato_,\\n address rootChainManager_,\\n address erc20Predicate_,\\n address childPotatoMigrator_\\n ) public {\\n stateSender = IStateSender(stateSender_);\\n potato = IERC20(potato_);\\n rootChainManager = IRootChainManager(rootChainManager_);\\n erc20Predicate = erc20Predicate_;\\n childPotatoMigrator = childPotatoMigrator_;\\n }\\n\\n function plantOnChildFarm(uint amount) external {\\n potato.transferFrom(\\n msg.sender,\\n address(this),\\n amount\\n );\\n\\n potato.approve(erc20Predicate, amount);\\n\\n rootChainManager.depositFor(\\n childPotatoMigrator,\\n address(potato),\\n abi.encode(amount)\\n );\\n\\n stateSender.syncState(\\n childPotatoMigrator,\\n abi.encode(msg.sender, amount)\\n );\\n }\\n}\\n\"\n },\n \"contracts/Libraries/matic/root/StateSender/DummyStateSender.sol\": {\n \"content\": \"pragma solidity 0.6.6;\\n\\nimport {IStateSender} from \\\"../StateSender/IStateSender.sol\\\";\\n\\n/**\\n* @notice Dummy State Sender contract to simulate plasma state sender while testing\\n*/\\ncontract DummyStateSender is IStateSender {\\n /**\\n * @notice Event emitted when when syncState is called\\n * @dev Heimdall bridge listens to this event and sends the data to receiver contract on child chain\\n * @param id Id of the sync, increamented for each event in case of actual state sender contract\\n * @param contractAddress the contract receiving data on child chain\\n * @param data bytes data to be sent\\n */\\n event StateSynced(\\n uint256 indexed id,\\n address indexed contractAddress,\\n bytes data\\n );\\n\\n /**\\n * @notice called to send data to child chain\\n * @dev sender and receiver contracts need to be registered in case of actual state sender contract\\n * @param receiver the contract receiving data on child chain\\n * @param data bytes data to be sent\\n */\\n function syncState(address receiver, bytes calldata data) external override {\\n emit StateSynced(1, receiver, data);\\n }\\n}\\n\"\n },\n \"contracts/Libraries/matic/root/MockCheckpointManager.sol\": {\n \"content\": \"pragma solidity 0.6.6;\\n\\nimport {SafeMath} from \\\"@openzeppelin/contracts/math/SafeMath.sol\\\";\\nimport {ICheckpointManager} from \\\"./ICheckpointManager.sol\\\";\\n\\n/**\\n* @notice Mock Checkpoint Manager contract to simulate plasma checkpoints while testing\\n*/\\ncontract MockCheckpointManager is ICheckpointManager {\\n using SafeMath for uint256;\\n\\n uint256 public currentCheckpointNumber = 0;\\n\\n function setCheckpoint(bytes32 rootHash, uint256 start, uint256 end) public {\\n HeaderBlock memory headerBlock = HeaderBlock({\\n root: rootHash,\\n start: start,\\n end: end,\\n createdAt: now,\\n proposer: msg.sender\\n });\\n\\n currentCheckpointNumber = currentCheckpointNumber.add(1);\\n headerBlocks[currentCheckpointNumber] = headerBlock;\\n }\\n}\\n\"\n },\n \"contracts/Libraries/matic/test/PotatoMigration/ChildPotatoMigrator.sol\": {\n \"content\": \"pragma solidity 0.6.6;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"../../child/IStateReceiver.sol\\\";\\nimport \\\"./ChildPotatoFarm.sol\\\";\\n\\n// This contract receives the deposit of potatoes from pos bridge\\n// then plants the potatoes for user using custom state sync\\ncontract ChildPotatoMigrator is IStateReceiver {\\n IERC20 potato;\\n ChildPotatoFarm farm;\\n constructor(address potato_, address farm_) public {\\n potato = IERC20(potato_);\\n farm = ChildPotatoFarm(farm_);\\n }\\n\\n function onStateReceive(uint, bytes calldata data) external override {\\n (address user, uint amount) = abi.decode(data, (address, uint));\\n potato.approve(address(farm), amount);\\n farm.plantFor(user, amount);\\n }\\n}\\n\"\n },\n \"contracts/Libraries/matic/child/IStateReceiver.sol\": {\n \"content\": \"pragma solidity 0.6.6;\\n\\ninterface IStateReceiver {\\n function onStateReceive(uint256 id, bytes calldata data) external;\\n}\\n\"\n },\n \"contracts/Libraries/matic/test/PotatoMigration/ChildPotatoFarm.sol\": {\n \"content\": \"pragma solidity 0.6.6;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n// This is where potatoes are planted to earn harvest\\ncontract ChildPotatoFarm {\\n IERC20 potato;\\n mapping(address => uint) public plantedAmount;\\n\\n constructor(address potato_) public {\\n potato = IERC20(potato_);\\n }\\n\\n function plantFor(address user, uint amount) external {\\n plantedAmount[user] += amount;\\n potato.transferFrom(msg.sender, address(this), amount);\\n }\\n}\\n\"\n },\n \"contracts/Libraries/matic/child/ChildChainManager/ChildChainManager.sol\": {\n \"content\": \"pragma solidity 0.6.6;\\n\\nimport {IERC20} from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport {IChildChainManager} from \\\"./IChildChainManager.sol\\\";\\nimport {IChildToken} from \\\"../ChildToken/IChildToken.sol\\\";\\nimport {Initializable} from \\\"../../common/Initializable.sol\\\";\\nimport {AccessControlMixin} from \\\"../../common/AccessControlMixin.sol\\\";\\nimport {IStateReceiver} from \\\"../IStateReceiver.sol\\\";\\n\\n\\ncontract ChildChainManager is\\n IChildChainManager,\\n Initializable,\\n AccessControlMixin,\\n IStateReceiver\\n{\\n bytes32 public constant DEPOSIT = keccak256(\\\"DEPOSIT\\\");\\n bytes32 public constant MAP_TOKEN = keccak256(\\\"MAP_TOKEN\\\");\\n bytes32 public constant MAPPER_ROLE = keccak256(\\\"MAPPER_ROLE\\\");\\n bytes32 public constant STATE_SYNCER_ROLE = keccak256(\\\"STATE_SYNCER_ROLE\\\");\\n\\n mapping(address => address) public rootToChildToken;\\n mapping(address => address) public childToRootToken;\\n\\n function initialize(address _owner) external initializer {\\n _setupContractId(\\\"ChildChainManager\\\");\\n _setupRole(DEFAULT_ADMIN_ROLE, _owner);\\n _setupRole(MAPPER_ROLE, _owner);\\n _setupRole(STATE_SYNCER_ROLE, _owner);\\n }\\n\\n /**\\n * @notice Map a token to enable its movement via the PoS Portal, callable only by mappers\\n * Normally mapping should happen automatically using state sync\\n * This function should be used only while initial deployment when state sync is not registrered or if it fails\\n * @param rootToken address of token on root chain\\n * @param childToken address of token on child chain\\n */\\n function mapToken(address rootToken, address childToken)\\n external\\n override\\n only(MAPPER_ROLE)\\n {\\n _mapToken(rootToken, childToken);\\n }\\n\\n /**\\n * @notice Receive state sync data from root chain, only callable by state syncer\\n * @dev state syncing mechanism is used for both depositing tokens and mapping them\\n * @param data bytes data from RootChainManager contract\\n * `data` is made up of bytes32 `syncType` and bytes `syncData`\\n * `syncType` determines if it is deposit or token mapping\\n * in case of token mapping, `syncData` is encoded address `rootToken`, address `childToken` and bytes32 `tokenType`\\n * in case of deposit, `syncData` is encoded address `user`, address `rootToken` and bytes `depositData`\\n * `depositData` is token specific data (amount in case of ERC20). It is passed as is to child token\\n */\\n function onStateReceive(uint256, bytes calldata data)\\n external\\n override\\n only(STATE_SYNCER_ROLE)\\n {\\n (bytes32 syncType, bytes memory syncData) = abi.decode(\\n data,\\n (bytes32, bytes)\\n );\\n\\n if (syncType == DEPOSIT) {\\n _syncDeposit(syncData);\\n } else if (syncType == MAP_TOKEN) {\\n (address rootToken, address childToken, ) = abi.decode(\\n syncData,\\n (address, address, bytes32)\\n );\\n _mapToken(rootToken, childToken);\\n } else {\\n revert(\\\"ChildChainManager: INVALID_SYNC_TYPE\\\");\\n }\\n }\\n\\n /**\\n * @notice Clean polluted token mapping\\n * @param rootToken address of token on root chain. Since rename token was introduced later stage,\\n * clean method is used to clean pollulated mapping\\n */\\n function cleanMapToken(\\n address rootToken,\\n address childToken\\n ) external override only(MAPPER_ROLE) {\\n rootToChildToken[rootToken] = address(0);\\n childToRootToken[childToken] = address(0);\\n\\n emit TokenMapped(rootToken, childToken);\\n }\\n\\n function _mapToken(address rootToken, address childToken) private {\\n address oldChildToken = rootToChildToken[rootToken];\\n address oldRootToken = childToRootToken[childToken];\\n\\n if (rootToChildToken[oldRootToken] != address(0)) {\\n rootToChildToken[oldRootToken] = address(0);\\n }\\n\\n if (childToRootToken[oldChildToken] != address(0)) {\\n childToRootToken[oldChildToken] = address(0);\\n }\\n\\n rootToChildToken[rootToken] = childToken;\\n childToRootToken[childToken] = rootToken;\\n\\n emit TokenMapped(rootToken, childToken);\\n }\\n\\n function _syncDeposit(bytes memory syncData) private {\\n (address user, address rootToken, bytes memory depositData) = abi\\n .decode(syncData, (address, address, bytes));\\n address childTokenAddress = rootToChildToken[rootToken];\\n require(\\n childTokenAddress != address(0x0),\\n \\\"ChildChainManager: TOKEN_NOT_MAPPED\\\"\\n );\\n IChildToken childTokenContract = IChildToken(childTokenAddress);\\n childTokenContract.deposit(user, depositData);\\n }\\n}\\n\"\n },\n \"contracts/Libraries/matic/child/ChildChainManager/IChildChainManager.sol\": {\n \"content\": \"pragma solidity 0.6.6;\\n\\ninterface IChildChainManager {\\n event TokenMapped(address indexed rootToken, address indexed childToken);\\n\\n function mapToken(address rootToken, address childToken) external;\\n function cleanMapToken(address rootToken, address childToken) external;\\n}\\n\"\n },\n \"contracts/Libraries/matic/child/ChildToken/IChildToken.sol\": {\n \"content\": \"pragma solidity 0.6.6;\\n\\ninterface IChildToken {\\n function deposit(address user, bytes calldata depositData) external;\\n}\\n\"\n },\n \"contracts/Libraries/matic/child/ChildToken/UpgradeableChildERC20/UChildERC20.sol\": {\n \"content\": \"pragma solidity 0.6.6;\\n\\nimport {ERC20} from \\\"./ERC20.sol\\\";\\nimport {AccessControlMixin} from \\\"../../../common/AccessControlMixin.sol\\\";\\nimport {IChildToken} from \\\"../IChildToken.sol\\\";\\nimport {NativeMetaTransaction} from \\\"../../../common/NativeMetaTransaction.sol\\\";\\nimport {ContextMixin} from \\\"../../../common/ContextMixin.sol\\\";\\n\\n\\ncontract UChildERC20 is\\n ERC20,\\n IChildToken,\\n AccessControlMixin,\\n NativeMetaTransaction,\\n ContextMixin\\n{\\n bytes32 public constant DEPOSITOR_ROLE = keccak256(\\\"DEPOSITOR_ROLE\\\");\\n\\n constructor() public ERC20(\\\"\\\", \\\"\\\") {}\\n\\n /**\\n * @notice Initialize the contract after it has been proxified\\n * @dev meant to be called once immediately after deployment\\n */\\n function initialize(\\n string calldata name_,\\n string calldata symbol_,\\n uint8 decimals_,\\n address childChainManager\\n )\\n external\\n initializer\\n {\\n setName(name_);\\n setSymbol(symbol_);\\n setDecimals(decimals_);\\n _setupContractId(string(abi.encodePacked(\\\"Child\\\", symbol_)));\\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\\n _setupRole(DEPOSITOR_ROLE, childChainManager);\\n _initializeEIP712(name_);\\n }\\n\\n // This is to support Native meta transactions\\n // never use msg.sender directly, use _msgSender() instead\\n function _msgSender()\\n internal\\n override\\n view\\n returns (address payable sender)\\n {\\n return ContextMixin.msgSender();\\n }\\n\\n function changeName(string calldata name_) external only(DEFAULT_ADMIN_ROLE) {\\n setName(name_);\\n _setDomainSeperator(name_);\\n }\\n\\n /**\\n * @notice called when token is deposited on root chain\\n * @dev Should be callable only by ChildChainManager\\n * Should handle deposit by minting the required amount for user\\n * Make sure minting is done only by this function\\n * @param user user address for whom deposit is being done\\n * @param depositData abi encoded amount\\n */\\n function deposit(address user, bytes calldata depositData)\\n external\\n override\\n only(DEPOSITOR_ROLE)\\n {\\n uint256 amount = abi.decode(depositData, (uint256));\\n _mint(user, amount);\\n }\\n\\n /**\\n * @notice called when user wants to withdraw tokens back to root chain\\n * @dev Should burn user's tokens. This transaction will be verified when exiting on root chain\\n * @param amount amount of tokens to withdraw\\n */\\n function withdraw(uint256 amount) external {\\n _burn(_msgSender(), amount);\\n }\\n}\\n\"\n },\n \"contracts/Libraries/matic/child/ChildToken/UpgradeableChildERC20/ERC20.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.6.0;\\n\\n\\nimport \\\"@openzeppelin/contracts/GSN/Context.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/math/SafeMath.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\n\\n/**\\n * Modified openzeppelin implemtation to add setters for name, symbol and decimals.\\n * This was needed because the variables cannot be set in constructor as the contract is upgradeable.\\n */\\n\\n/**\\n * @dev openzeppelin Implementation of the {IERC20} interface.\\n *\\n * Modified to add setters for name, symbol and decimals. This was needed\\n * because\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin guidelines: functions revert instead\\n * of returning `false` on failure. This behavior is nonetheless conventional\\n * and does not conflict with the expectations of ERC20 applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20 {\\n using SafeMath for uint256;\\n using Address for address;\\n\\n mapping (address => uint256) private _balances;\\n\\n mapping (address => mapping (address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n uint8 private _decimals;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}, initializes {decimals} with\\n * a default value of 18.\\n *\\n * To select a different value for {decimals}, use {_setupDecimals}.\\n *\\n * All three of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor (string memory name, string memory symbol) public {\\n _name = name;\\n _symbol = symbol;\\n _decimals = 18;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view returns (string memory) {\\n return _name;\\n }\\n\\n function setName(string memory newName) internal {\\n _name = newName;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view returns (string memory) {\\n return _symbol;\\n }\\n\\n function setSymbol(string memory newSymbol) internal {\\n _symbol = newSymbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5,05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\\n * called.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view returns (uint8) {\\n return _decimals;\\n }\\n\\n function setDecimals(uint8 newDecimals) internal {\\n _decimals = newDecimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20};\\n *\\n * Requirements:\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\n return true;\\n }\\n\\n /**\\n * @dev Moves tokens `amount` from `sender` to `recipient`.\\n *\\n * This is internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n _balances[recipient] = _balances[recipient].add(amount);\\n emit Transfer(sender, recipient, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements\\n *\\n * - `to` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply = _totalSupply.add(amount);\\n _balances[account] = _balances[account].add(amount);\\n emit Transfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\n _totalSupply = _totalSupply.sub(amount);\\n emit Transfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.\\n *\\n * This is internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Sets {decimals} to a value other than the default one of 18.\\n *\\n * WARNING: This function should only be called from the constructor. Most\\n * applications that interact with token contracts will not expect\\n * {decimals} to ever change, and may work incorrectly if it does.\\n */\\n function _setupDecimals(uint8 decimals_) internal {\\n _decimals = decimals_;\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be to transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both 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 amount) internal virtual { }\\n}\\n\"\n },\n \"@openzeppelin/contracts/GSN/Context.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\"\n },\n \"contracts/Libraries/matic/test/TestUChildERC20.sol\": {\n \"content\": \"pragma solidity 0.6.6;\\n\\nimport {UChildERC20} from \\\"../child/ChildToken/UpgradeableChildERC20/UChildERC20.sol\\\";\\n\\ncontract TestUChildERC20 is UChildERC20 {\\n function magic() external pure returns (string memory) {\\n return \\\"magic\\\";\\n }\\n}\\n\"\n },\n \"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n using SafeMath for uint256;\\n using Address for address;\\n\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n // solhint-disable-next-line max-line-length\\n require((value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n if (returndata.length > 0) { // Return data is optional\\n // solhint-disable-next-line max-line-length\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\"\n },\n \"contracts/Libraries/matic/root/TokenPredicates/ERC20Predicate.sol\": {\n \"content\": \"pragma solidity 0.6.6;\\n\\nimport {IERC20} from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport {SafeERC20} from \\\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\\\";\\nimport {AccessControlMixin} from \\\"../../common/AccessControlMixin.sol\\\";\\nimport {RLPReader} from \\\"../../lib/RLPReader.sol\\\";\\nimport {ITokenPredicate} from \\\"./ITokenPredicate.sol\\\";\\nimport {Initializable} from \\\"../../common/Initializable.sol\\\";\\n\\ncontract ERC20Predicate is ITokenPredicate, AccessControlMixin, Initializable {\\n using RLPReader for bytes;\\n using RLPReader for RLPReader.RLPItem;\\n using SafeERC20 for IERC20;\\n\\n bytes32 public constant MANAGER_ROLE = keccak256(\\\"MANAGER_ROLE\\\");\\n bytes32 public constant TOKEN_TYPE = keccak256(\\\"ERC20\\\");\\n bytes32 public constant TRANSFER_EVENT_SIG = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef;\\n\\n event LockedERC20(\\n address indexed depositor,\\n address indexed depositReceiver,\\n address indexed rootToken,\\n uint256 amount\\n );\\n\\n constructor() public {}\\n\\n function initialize(address _owner) external initializer {\\n _setupContractId(\\\"ERC20Predicate\\\");\\n _setupRole(DEFAULT_ADMIN_ROLE, _owner);\\n _setupRole(MANAGER_ROLE, _owner);\\n }\\n\\n /**\\n * @notice Lock ERC20 tokens for deposit, callable only by manager\\n * @param depositor Address who wants to deposit tokens\\n * @param depositReceiver Address (address) who wants to receive tokens on child chain\\n * @param rootToken Token which gets deposited\\n * @param depositData ABI encoded amount\\n */\\n function lockTokens(\\n address depositor,\\n address depositReceiver,\\n address rootToken,\\n bytes calldata depositData\\n )\\n external\\n override\\n only(MANAGER_ROLE)\\n {\\n uint256 amount = abi.decode(depositData, (uint256));\\n emit LockedERC20(depositor, depositReceiver, rootToken, amount);\\n IERC20(rootToken).safeTransferFrom(depositor, address(this), amount);\\n }\\n\\n /**\\n * @notice Validates log signature, from and to address\\n * then sends the correct amount to withdrawer\\n * callable only by manager\\n * @param rootToken Token which gets withdrawn\\n * @param log Valid ERC20 burn log from child chain\\n */\\n function exitTokens(\\n address,\\n address rootToken,\\n bytes memory log\\n )\\n public\\n override\\n only(MANAGER_ROLE)\\n {\\n RLPReader.RLPItem[] memory logRLPList = log.toRlpItem().toList();\\n RLPReader.RLPItem[] memory logTopicRLPList = logRLPList[1].toList(); // topics\\n\\n require(\\n bytes32(logTopicRLPList[0].toUint()) == TRANSFER_EVENT_SIG, // topic0 is event sig\\n \\\"ERC20Predicate: INVALID_SIGNATURE\\\"\\n );\\n\\n address withdrawer = address(logTopicRLPList[1].toUint()); // topic1 is from address\\n\\n require(\\n address(logTopicRLPList[2].toUint()) == address(0), // topic2 is to address\\n \\\"ERC20Predicate: INVALID_RECEIVER\\\"\\n );\\n\\n IERC20(rootToken).safeTransfer(\\n withdrawer,\\n logRLPList[2].toUint() // log data field\\n );\\n }\\n}\\n\"\n },\n \"contracts/test/MockLink.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.6;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\n\\nabstract contract ERC677Receiver {\\n function onTokenTransfer(\\n address _sender,\\n uint256 _value,\\n bytes memory _data\\n ) public virtual;\\n}\\n\\ncontract MockLink is ERC20 {\\n event Transfer(address indexed from, address indexed to, uint256 value, bytes data);\\n\\n constructor() public ERC20(\\\"MockLink\\\", \\\"LINK\\\") {\\n _mint(msg.sender, 100 * 10**18);\\n }\\n\\n function transferAndCall(\\n address _to,\\n uint256 _value,\\n bytes memory _data\\n ) public virtual returns (bool success) {\\n super.transfer(_to, _value);\\n emit Transfer(msg.sender, _to, _value, _data);\\n if (isContract(_to)) {\\n contractFallback(_to, _value, _data);\\n }\\n return true;\\n }\\n\\n function isContract(address _addr) private view returns (bool hasCode) {\\n uint256 length;\\n assembly {\\n length := extcodesize(_addr)\\n }\\n return length > 0;\\n }\\n\\n function contractFallback(\\n address _to,\\n uint256 _value,\\n bytes memory _data\\n ) private {\\n ERC677Receiver receiver = ERC677Receiver(_to);\\n receiver.onTokenTransfer(msg.sender, _value, _data);\\n }\\n}\\n\"\n },\n \"contracts/Libraries/matic/test/PotatoMigration/RootPotatoToken.sol\": {\n \"content\": \"pragma solidity 0.6.6;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\n\\n// These are the potatoes on Ethereum chain\\ncontract RootPotatoToken is ERC20 {\\n constructor() public ERC20(\\\"Potato\\\", \\\"PTT\\\") {}\\n\\n function mint(uint256 amount) public {\\n _mint(msg.sender, amount);\\n }\\n}\\n\"\n },\n \"contracts/Libraries/matic/root/RootToken/DummyERC20.sol\": {\n \"content\": \"pragma solidity 0.6.6;\\n\\nimport {ERC20} from \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport {NativeMetaTransaction} from \\\"../../common/NativeMetaTransaction.sol\\\";\\nimport {ContextMixin} from \\\"../../common/ContextMixin.sol\\\";\\n\\ncontract DummyERC20 is\\n ERC20,\\n NativeMetaTransaction,\\n ContextMixin\\n{\\n constructor(string memory name_, string memory symbol_)\\n public\\n ERC20(name_, symbol_)\\n {\\n uint256 amount = 10**10 * (10**18);\\n _mint(_msgSender(), amount);\\n _initializeEIP712(name_);\\n }\\n\\n function mint(uint256 amount) public {\\n _mint(_msgSender(), amount);\\n }\\n\\n function _msgSender()\\n internal\\n override\\n view\\n returns (address payable sender)\\n {\\n return ContextMixin.msgSender();\\n }\\n}\\n\"\n },\n \"contracts/Libraries/matic/child/ChildToken/ChildMintableERC20.sol\": {\n \"content\": \"pragma solidity 0.6.6;\\n\\nimport {ERC20} from \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport {AccessControlMixin} from \\\"../../common/AccessControlMixin.sol\\\";\\nimport {IChildToken} from \\\"./IChildToken.sol\\\";\\nimport {NativeMetaTransaction} from \\\"../../common/NativeMetaTransaction.sol\\\";\\nimport {ContextMixin} from \\\"../../common/ContextMixin.sol\\\";\\n\\n\\ncontract ChildMintableERC20 is\\n ERC20,\\n IChildToken,\\n AccessControlMixin,\\n NativeMetaTransaction,\\n ContextMixin\\n{\\n bytes32 public constant DEPOSITOR_ROLE = keccak256(\\\"DEPOSITOR_ROLE\\\");\\n\\n constructor(\\n string memory name_,\\n string memory symbol_,\\n uint8 decimals_,\\n address childChainManager\\n ) public ERC20(name_, symbol_) {\\n _setupContractId(\\\"ChildMintableERC20\\\");\\n _setupDecimals(decimals_);\\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\\n _setupRole(DEPOSITOR_ROLE, childChainManager);\\n _initializeEIP712(name_);\\n }\\n\\n // This is to support Native meta transactions\\n // never use msg.sender directly, use _msgSender() instead\\n function _msgSender()\\n internal\\n override\\n view\\n returns (address payable sender)\\n {\\n return ContextMixin.msgSender();\\n }\\n\\n /**\\n * @notice called when token is deposited on root chain\\n * @dev Should be callable only by ChildChainManager\\n * Should handle deposit by minting the required amount for user\\n * Make sure minting is done only by this function\\n * @param user user address for whom deposit is being done\\n * @param depositData abi encoded amount\\n */\\n function deposit(address user, bytes calldata depositData)\\n external\\n override\\n only(DEPOSITOR_ROLE)\\n {\\n uint256 amount = abi.decode(depositData, (uint256));\\n _mint(user, amount);\\n }\\n\\n /**\\n * @notice called when user wants to withdraw tokens back to root chain\\n * @dev Should burn user's tokens. This transaction will be verified when exiting on root chain\\n * @param amount amount of tokens to withdraw\\n */\\n function withdraw(uint256 amount) external {\\n _burn(_msgSender(), amount);\\n }\\n\\n /**\\n * @notice Example function to handle minting tokens on matic chain\\n * @dev Minting can be done as per requirement,\\n * This implementation allows only admin to mint tokens but it can be changed as per requirement\\n * @param user user for whom tokens are being minted\\n * @param amount amount of token to mint\\n */\\n function mint(address user, uint256 amount) public only(DEFAULT_ADMIN_ROLE) {\\n _mint(user, amount);\\n }\\n}\\n\"\n },\n \"contracts/Libraries/matic/child/ChildToken/ChildERC20.sol\": {\n \"content\": \"pragma solidity 0.6.6;\\n\\nimport {ERC20} from \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport {AccessControlMixin} from \\\"../../common/AccessControlMixin.sol\\\";\\nimport {IChildToken} from \\\"./IChildToken.sol\\\";\\nimport {NativeMetaTransaction} from \\\"../../common/NativeMetaTransaction.sol\\\";\\nimport {ContextMixin} from \\\"../../common/ContextMixin.sol\\\";\\n\\n\\ncontract ChildERC20 is\\n ERC20,\\n IChildToken,\\n AccessControlMixin,\\n NativeMetaTransaction,\\n ContextMixin\\n{\\n bytes32 public constant DEPOSITOR_ROLE = keccak256(\\\"DEPOSITOR_ROLE\\\");\\n\\n constructor(\\n string memory name_,\\n string memory symbol_,\\n uint8 decimals_,\\n address childChainManager\\n ) public ERC20(name_, symbol_) {\\n _setupContractId(\\\"ChildERC20\\\");\\n _setupDecimals(decimals_);\\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\\n _setupRole(DEPOSITOR_ROLE, childChainManager);\\n _initializeEIP712(name_);\\n }\\n\\n // This is to support Native meta transactions\\n // never use msg.sender directly, use _msgSender() instead\\n function _msgSender()\\n internal\\n override\\n view\\n returns (address payable sender)\\n {\\n return ContextMixin.msgSender();\\n }\\n\\n /**\\n * @notice called when token is deposited on root chain\\n * @dev Should be callable only by ChildChainManager\\n * Should handle deposit by minting the required amount for user\\n * Make sure minting is done only by this function\\n * @param user user address for whom deposit is being done\\n * @param depositData abi encoded amount\\n */\\n function deposit(address user, bytes calldata depositData)\\n external\\n override\\n only(DEPOSITOR_ROLE)\\n {\\n uint256 amount = abi.decode(depositData, (uint256));\\n _mint(user, amount);\\n }\\n\\n /**\\n * @notice called when user wants to withdraw tokens back to root chain\\n * @dev Should burn user's tokens. This transaction will be verified when exiting on root chain\\n * @param amount amount of tokens to withdraw\\n */\\n function withdraw(uint256 amount) external {\\n _burn(_msgSender(), amount);\\n }\\n}\\n\"\n },\n \"contracts/Libraries/matic/test/PotatoMigration/ChildPotatoToken.sol\": {\n \"content\": \"pragma solidity 0.6.6;\\n\\nimport \\\"../../child/ChildToken/ChildERC20.sol\\\";\\n\\n// These are the potatoes on Matic chain\\ncontract ChildPotatoToken is ChildERC20 {\\n constructor(address childChainManager) public ChildERC20(\\\"Potato\\\", \\\"PTT\\\", 18, childChainManager) {}\\n}\\n\"\n },\n \"contracts/Libraries/matic/child/ChildToken/MaticWETH.sol\": {\n \"content\": \"pragma solidity 0.6.6;\\n\\nimport {ChildERC20} from \\\"./ChildERC20.sol\\\";\\n\\ncontract MaticWETH is ChildERC20 {\\n constructor(address childChainManager) public ChildERC20(\\\"Wrapped Ether\\\", \\\"WETH\\\", 18, childChainManager) {}\\n}\\n\"\n },\n \"contracts/CryptOrchidERC721/CryptOrchidERC721.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.6 <0.9.0;\\n\\nimport \\\"@chainlink/contracts/src/v0.6/VRFConsumerBase.sol\\\";\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"@openzeppelin/contracts/presets/ERC721PresetMinterPauserAutoId.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/Counters.sol\\\";\\nimport \\\"../Libraries/CurrentTime.sol\\\";\\n\\ncontract CryptOrchidERC721 is ERC721PresetMinterPauserAutoId, Ownable, VRFConsumerBase, CurrentTime {\\n using SafeMathChainlink for uint256;\\n using Strings for string;\\n using Counters for Counters.Counter;\\n\\n struct CryptOrchid {\\n string species;\\n uint256 plantedAt;\\n uint256 waterLevel;\\n }\\n mapping(uint256 => CryptOrchid) public cryptorchids;\\n\\n enum Stage {Unsold, Seed, Flower, Dead}\\n\\n bool internal saleStarted = false;\\n bool internal growingStarted = false;\\n\\n uint256 public constant MAX_CRYPTORCHIDS = 10000;\\n uint256 public constant GROWTH_CYCLE = 604800; // 7 days\\n uint256 public constant WATERING_WINDOW = 10800; // 3 hours\\n uint256 internal constant MAX_TIMESTAMP = 2**256 - 1;\\n string internal constant GRANUM_IPFS = \\\"QmWd1mn7DuGyx9ByfNeqCsgdSUsJZ1cragitgaygsqDvEm\\\";\\n\\n uint16[10] private limits = [0, 3074, 6074, 8074, 9074, 9574, 9824, 9924, 9974, 9999];\\n string[10] private genum = [\\n \\\"shenzhenica orchidaceae\\\",\\n \\\"phalaenopsis micholitzii\\\",\\n \\\"guarianthe aurantiaca\\\",\\n \\\"vanda coerulea\\\",\\n \\\"cypripedium calceolus\\\",\\n \\\"paphiopedilum vietnamense\\\",\\n \\\"miltonia kayasimae\\\",\\n \\\"platanthera azorica\\\",\\n \\\"dendrophylax lindenii\\\",\\n \\\"paphiopedilum rothschildianum\\\"\\n ];\\n\\n string[10] private speciesIPFSConstant = [\\n \\\"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/shenzhenica-orchidaceae.json\\\",\\n \\\"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/phalaenopsis-micholitzii.json\\\",\\n \\\"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/guarianthe-aurantiaca.json\\\",\\n \\\"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/vanda-coerulea.json\\\",\\n \\\"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/cypripedium-calceolus.json\\\",\\n \\\"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/paphiopedilum-vietnamense.json\\\",\\n \\\"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/miltonia-kayasimae.json\\\",\\n \\\"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/platanthera-azorica.json\\\",\\n \\\"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/dendrophylax-lindenii.json\\\",\\n \\\"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/paphiopedilum-rothschildianum.json\\\"\\n ];\\n\\n string[10] private deadSpeciesIPFSConstant = [\\n \\\"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/shenzhenica-orchidaceae.json\\\",\\n \\\"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/phalaenopsis-micholitzii.json\\\",\\n \\\"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/guarianthe-aurantiaca.json\\\",\\n \\\"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/vanda-coerulea.json\\\",\\n \\\"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/cypripedium-calceolus.json\\\",\\n \\\"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/paphiopedilum-vietnamense.json\\\",\\n \\\"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/miltonia-kayasimae.json\\\",\\n \\\"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/platanthera-azorica.json\\\",\\n \\\"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/dendrophylax-lindenii.json\\\",\\n \\\"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/paphiopedilum-rothschildianum.json\\\"\\n ];\\n\\n Counters.Counter private _tokenIds;\\n\\n bytes32 internal keyHash;\\n uint256 internal vrfFee;\\n uint256 public randomResult;\\n address public VRFCoordinator;\\n address public LinkToken;\\n\\n event RequestedRandomness(bytes32 requestId);\\n event Planted(uint256 tokenId, string latinSpecies, uint256 timestamp, address tokenOwner);\\n event Watered(uint256 tokenId, uint256 waterLevel);\\n event Killed(uint256 tokenId);\\n\\n mapping(bytes32 => uint256) public requestToToken;\\n mapping(bytes32 => string) private speciesIPFS;\\n mapping(bytes32 => string) private deadSpeciesIPFS;\\n\\n constructor(\\n address _VRFCoordinator,\\n address _LinkToken,\\n bytes32 _keyhash\\n )\\n public\\n payable\\n VRFConsumerBase(_VRFCoordinator, _LinkToken)\\n ERC721PresetMinterPauserAutoId(\\\"CryptOrchids\\\", \\\"ORCHD\\\", \\\"ipfs://\\\")\\n {\\n VRFCoordinator = _VRFCoordinator;\\n LinkToken = _LinkToken;\\n keyHash = _keyhash;\\n vrfFee = 2000000000000000000; // 2 LINK\\n\\n for (uint256 index = 0; index < genum.length; index++) {\\n speciesIPFS[keccak256(abi.encode(genum[index]))] = speciesIPFSConstant[index];\\n deadSpeciesIPFS[keccak256(abi.encode(genum[index]))] = deadSpeciesIPFSConstant[index];\\n }\\n }\\n\\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\\n (string memory species, , , ) = getTokenMetadata(tokenId);\\n\\n if (growthStage(tokenId) == Stage.Seed) {\\n return string(abi.encodePacked(baseURI(), GRANUM_IPFS));\\n }\\n\\n if (growthStage(tokenId) == Stage.Flower) {\\n return string(abi.encodePacked(baseURI(), speciesIPFS[keccak256(abi.encode(species))]));\\n }\\n\\n return string(abi.encodePacked(baseURI(), deadSpeciesIPFS[keccak256(abi.encode(species))]));\\n }\\n\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 tokenId\\n ) internal virtual override {\\n require(address(0) == to || alive(tokenId), \\\"Dead CryptOrchids cannot be transferred\\\");\\n super._beforeTokenTransfer(from, to, tokenId);\\n }\\n\\n function currentPrice() public view returns (uint256 price) {\\n uint256 currentSupply = totalSupply();\\n if (currentSupply >= 9900) {\\n return 1000000000000000000; // 9900+: 1.00 ETH\\n } else if (currentSupply >= 9500) {\\n return 640000000000000000; // 9500-9500: 0.64 ETH\\n } else if (currentSupply >= 7500) {\\n return 320000000000000000; // 7500-9500: 0.32 ETH\\n } else if (currentSupply >= 3500) {\\n return 160000000000000000; // 3500-7500: 0.16 ETH\\n } else if (currentSupply >= 1500) {\\n return 80000000000000000; // 1500-3500: 0.08 ETH\\n } else if (currentSupply >= 500) {\\n return 60000000000000000; // 500-1500: 0.06 ETH\\n } else {\\n return 40000000000000000; // 0 - 500 0.04 ETH\\n }\\n }\\n\\n function startSale() public onlyOwner {\\n saleStarted = true;\\n }\\n\\n function startGrowing() public onlyOwner {\\n growingStarted = true;\\n }\\n\\n /**\\n * @dev Withdraw ether from this contract (Callable by owner only)\\n */\\n function withdraw() public onlyOwner {\\n uint256 balance = address(this).balance;\\n msg.sender.transfer(balance);\\n }\\n\\n receive() external payable {}\\n\\n function webMint(uint256 units) public payable {\\n require(saleStarted, \\\"The Nursery is closed\\\");\\n require(units <= MAX_CRYPTORCHIDS - totalSupply(), \\\"Not enough bulbs left\\\");\\n require(totalSupply() < MAX_CRYPTORCHIDS, \\\"Sale has already ended\\\");\\n require(units > 0 && units <= 20, \\\"You can plant minimum 1, maximum 20 CryptOrchids\\\");\\n require(SafeMathChainlink.add(totalSupply(), units) <= MAX_CRYPTORCHIDS, \\\"Exceeds MAX_CRYPTORCHIDS\\\");\\n require(msg.value >= SafeMathChainlink.mul(currentPrice(), units), \\\"Ether value sent is below the price\\\");\\n\\n for (uint256 i = 0; i < units; i++) {\\n _tokenIds.increment();\\n uint256 newItemId = _tokenIds.current();\\n cryptorchids[newItemId] = CryptOrchid({species: \\\"granum\\\", plantedAt: MAX_TIMESTAMP, waterLevel: 0});\\n _safeMint(msg.sender, newItemId);\\n }\\n }\\n\\n function germinate(uint256 tokenId, uint256 userProvidedSeed) public {\\n require(growingStarted, \\\"Germination starts 2021-04-12T16:00:00Z\\\");\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"Only the Owner can germinate a CryptOrchid.\\\");\\n _requestRandom(tokenId, userProvidedSeed);\\n }\\n\\n function _requestRandom(uint256 tokenId, uint256 userProvidedSeed) internal returns (bytes32 requestId) {\\n require(LINK.balanceOf(address(this)) >= vrfFee, \\\"Not enough LINK - germination unavailable\\\");\\n requestId = requestRandomness(keyHash, vrfFee, userProvidedSeed);\\n requestToToken[requestId] = tokenId;\\n emit RequestedRandomness(requestId);\\n }\\n\\n function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override {\\n uint256 tokenId = requestToToken[requestId];\\n CryptOrchid storage orchid = cryptorchids[tokenId];\\n string memory species = pickSpecies(SafeMathChainlink.mod(randomness, 10000));\\n orchid.species = species;\\n orchid.plantedAt = currentTime();\\n address tokenOwner = ownerOf(tokenId);\\n emit Planted(tokenId, species, currentTime(), tokenOwner);\\n }\\n\\n function alive(uint256 tokenId) public view returns (bool) {\\n return growthStage(tokenId) != Stage.Dead;\\n }\\n\\n function flowering(uint256 tokenId) public view returns (bool) {\\n return growthStage(tokenId) == Stage.Flower;\\n }\\n\\n function growthStage(uint256 tokenId) public view returns (Stage) {\\n CryptOrchid memory orchid = cryptorchids[tokenId];\\n if (orchid.plantedAt == 0) return Stage.Unsold;\\n if (orchid.plantedAt == MAX_TIMESTAMP) return Stage.Seed;\\n uint256 currentWaterLevel = orchid.waterLevel;\\n uint256 elapsed = currentTime() - orchid.plantedAt;\\n uint256 fullCycles = SafeMathChainlink.div(uint256(elapsed), GROWTH_CYCLE);\\n uint256 modulo = SafeMathChainlink.mod(elapsed, GROWTH_CYCLE);\\n\\n if (currentWaterLevel == fullCycles) {\\n return Stage.Flower;\\n }\\n\\n if (SafeMathChainlink.add(currentWaterLevel, 1) == fullCycles && modulo < WATERING_WINDOW) {\\n return Stage.Flower;\\n }\\n\\n return Stage.Dead;\\n }\\n\\n function water(uint256 tokenId) public {\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"Only the Owner can water a CryptOrchid.\\\");\\n\\n if (!alive(tokenId)) {\\n emit Killed(tokenId);\\n return;\\n }\\n\\n CryptOrchid storage orchid = cryptorchids[tokenId];\\n\\n uint256 wateringLevel = orchid.waterLevel;\\n uint256 elapsed = currentTime() - orchid.plantedAt;\\n uint256 fullCycles = SafeMathChainlink.div(uint256(elapsed), GROWTH_CYCLE);\\n\\n if (wateringLevel > fullCycles) {\\n emit Killed(tokenId);\\n return;\\n }\\n\\n uint256 newWaterLevel = SafeMathChainlink.add(wateringLevel, 1);\\n orchid.waterLevel = newWaterLevel;\\n\\n emit Watered(tokenId, newWaterLevel);\\n }\\n\\n function compost(uint256 tokenId) public {\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"Only the Owner can compost a CryptOrchid.\\\");\\n\\n burn(tokenId);\\n }\\n\\n function getTokenMetadata(uint256 tokenId)\\n public\\n view\\n returns (\\n string memory,\\n uint256,\\n uint256,\\n Stage\\n )\\n {\\n return (\\n cryptorchids[tokenId].species,\\n cryptorchids[tokenId].plantedAt,\\n cryptorchids[tokenId].waterLevel,\\n growthStage(tokenId)\\n );\\n }\\n\\n function heartbeat(uint256 tokenId) public {\\n if (growthStage(tokenId) == Stage.Dead) {\\n emit Killed(tokenId);\\n }\\n }\\n\\n /**\\n * @notice Pick species for random number index\\n * @param randomIndex uint256\\n * @return species string\\n */\\n function pickSpecies(uint256 randomIndex) private view returns (string memory) {\\n for (uint256 i = 0; i < 10; i++) {\\n if (randomIndex <= limits[i]) {\\n return genum[i];\\n }\\n }\\n }\\n}\\n\"\n },\n \"contracts/test/CryptorchidsMock.sol\": {\n \"content\": \"pragma solidity >=0.6.6 <0.9.0;\\n// import \\\"hardhat/console.sol\\\";\\n\\nimport \\\"../CryptOrchidERC721/CryptOrchidERC721.sol\\\";\\n\\ncontract CryptOrchidsMock is CryptOrchidERC721 {\\n uint256 internal secondsToAdd = 0;\\n\\n constructor(\\n address _VRFCoordinator,\\n address _LinkToken,\\n bytes32 _keyhash\\n ) public CryptOrchidERC721(_VRFCoordinator, _LinkToken, _keyhash) {}\\n\\n function timeTravel(uint256 s) public {\\n secondsToAdd = s;\\n }\\n\\n function currentTime() internal view virtual override returns (uint256) {\\n return block.timestamp + secondsToAdd;\\n }\\n}\\n\"\n },\n \"@chainlink/contracts/src/v0.6/tests/VRFCoordinatorMock.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity 0.6.6;\\n\\nimport \\\"../interfaces/LinkTokenInterface.sol\\\";\\nimport \\\"../VRFConsumerBase.sol\\\";\\n\\ncontract VRFCoordinatorMock {\\n\\n LinkTokenInterface public LINK;\\n\\n event RandomnessRequest(address indexed sender, bytes32 indexed keyHash, uint256 indexed seed);\\n\\n constructor(address linkAddress) public {\\n LINK = LinkTokenInterface(linkAddress);\\n }\\n\\n function onTokenTransfer(address sender, uint256 fee, bytes memory _data)\\n public\\n onlyLINK\\n {\\n (bytes32 keyHash, uint256 seed) = abi.decode(_data, (bytes32, uint256));\\n emit RandomnessRequest(sender, keyHash, seed);\\n }\\n\\n function callBackWithRandomness(\\n bytes32 requestId,\\n uint256 randomness,\\n address consumerContract\\n ) public {\\n VRFConsumerBase v;\\n bytes memory resp = abi.encodeWithSelector(v.rawFulfillRandomness.selector, requestId, randomness);\\n uint256 b = 206000;\\n require(gasleft() >= b, \\\"not enough gas for consumer\\\");\\n (bool success,) = consumerContract.call(resp);\\n }\\n\\n modifier onlyLINK() {\\n require(msg.sender == address(LINK), \\\"Must use LINK token\\\");\\n _;\\n }\\n}\"\n },\n \"contracts/test/VRFCoordinatorMock.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.0;\\n\\nimport \\\"@chainlink/contracts/src/v0.6/tests/VRFCoordinatorMock.sol\\\";\\n\"\n },\n \"contracts/Libraries/matic/child/ChildToken/DappTokens/UChildDAI.sol\": {\n \"content\": \"pragma solidity 0.6.6;\\n\\nimport {UChildERC20} from \\\"../UpgradeableChildERC20/UChildERC20.sol\\\";\\n\\ncontract UChildDAI is UChildERC20 {\\n // bytes32 public constant PERMIT_TYPEHASH = keccak256(\\\"Permit(address holder,address spender,uint256 nonce,uint256 expiry,bool allowed)\\\");\\n bytes32 public constant PERMIT_TYPEHASH = 0xea2aa0a1be11a07ed86d755c93467f4f82362b452371d1ba94d1715123511acb;\\n\\n // --- Alias ---\\n function push(address usr, uint wad) external {\\n transferFrom(msg.sender, usr, wad);\\n }\\n function pull(address usr, uint wad) external {\\n transferFrom(usr, msg.sender, wad);\\n }\\n function move(address src, address dst, uint wad) external {\\n transferFrom(src, dst, wad);\\n }\\n\\n // --- Approve by signature ---\\n function permit(\\n address holder,\\n address spender,\\n uint256 nonce,\\n uint256 expiry,\\n bool allowed,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external {\\n bytes32 digest = keccak256(\\n abi.encodePacked(\\n \\\"\\\\x19\\\\x01\\\",\\n getDomainSeperator(),\\n keccak256(\\n abi.encode(\\n PERMIT_TYPEHASH,\\n holder,\\n spender,\\n nonce,\\n expiry,\\n allowed\\n )\\n )\\n ));\\n\\n require(holder == ecrecover(digest, v, r, s), \\\"UChildDAI: INVALID-PERMIT\\\");\\n require(expiry == 0 || now <= expiry, \\\"UChildDAI: PERMIT-EXPIRED\\\");\\n require(nonce == nonces[holder]++, \\\"UChildDAI: INVALID-NONCE\\\");\\n require(msg.sender != address(this), \\\"UChildDAI: PERMIT_META_TX_DISABLED\\\");\\n uint wad = allowed ? uint(-1) : 0;\\n _approve(holder, spender, wad);\\n }\\n}\\n\"\n },\n \"contracts/Libraries/matic/child/ChildToken/ChildMintableERC721.sol\": {\n \"content\": \"pragma solidity 0.6.6;\\n\\nimport {ERC721} from \\\"@openzeppelin/contracts/token/ERC721/ERC721.sol\\\";\\nimport {AccessControlMixin} from \\\"../../common/AccessControlMixin.sol\\\";\\nimport {IChildToken} from \\\"./IChildToken.sol\\\";\\nimport {NativeMetaTransaction} from \\\"../../common/NativeMetaTransaction.sol\\\";\\nimport {ContextMixin} from \\\"../../common/ContextMixin.sol\\\";\\n\\n\\ncontract ChildMintableERC721 is\\n ERC721,\\n IChildToken,\\n AccessControlMixin,\\n NativeMetaTransaction,\\n ContextMixin\\n{\\n bytes32 public constant DEPOSITOR_ROLE = keccak256(\\\"DEPOSITOR_ROLE\\\");\\n mapping (uint256 => bool) public withdrawnTokens;\\n\\n // limit batching of tokens due to gas limit restrictions\\n uint256 public constant BATCH_LIMIT = 20;\\n\\n event WithdrawnBatch(address indexed user, uint256[] tokenIds);\\n event TransferWithMetadata(address indexed from, address indexed to, uint256 indexed tokenId, bytes metaData);\\n\\n constructor(\\n string memory name_,\\n string memory symbol_,\\n address childChainManager\\n ) public ERC721(name_, symbol_) {\\n _setupContractId(\\\"ChildMintableERC721\\\");\\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\\n _setupRole(DEPOSITOR_ROLE, childChainManager);\\n _initializeEIP712(name_);\\n }\\n\\n // This is to support Native meta transactions\\n // never use msg.sender directly, use _msgSender() instead\\n function _msgSender()\\n internal\\n override\\n view\\n returns (address payable sender)\\n {\\n return ContextMixin.msgSender();\\n }\\n\\n /**\\n * @notice called when token is deposited on root chain\\n * @dev Should be callable only by ChildChainManager\\n * Should handle deposit by minting the required tokenId(s) for user\\n * Should set `withdrawnTokens` mapping to `false` for the tokenId being deposited\\n * Minting can also be done by other functions\\n * @param user user address for whom deposit is being done\\n * @param depositData abi encoded tokenIds. Batch deposit also supported.\\n */\\n function deposit(address user, bytes calldata depositData)\\n external\\n override\\n only(DEPOSITOR_ROLE)\\n {\\n\\n // deposit single\\n if (depositData.length == 32) {\\n uint256 tokenId = abi.decode(depositData, (uint256));\\n withdrawnTokens[tokenId] = false;\\n _mint(user, tokenId);\\n\\n // deposit batch\\n } else {\\n uint256[] memory tokenIds = abi.decode(depositData, (uint256[]));\\n uint256 length = tokenIds.length;\\n for (uint256 i; i < length; i++) {\\n withdrawnTokens[tokenIds[i]] = false;\\n _mint(user, tokenIds[i]);\\n }\\n }\\n\\n }\\n\\n /**\\n * @notice called when user wants to withdraw token back to root chain\\n * @dev Should handle withraw by burning user's token.\\n * Should set `withdrawnTokens` mapping to `true` for the tokenId being withdrawn\\n * This transaction will be verified when exiting on root chain\\n * @param tokenId tokenId to withdraw\\n */\\n function withdraw(uint256 tokenId) external {\\n require(_msgSender() == ownerOf(tokenId), \\\"ChildMintableERC721: INVALID_TOKEN_OWNER\\\");\\n withdrawnTokens[tokenId] = true;\\n _burn(tokenId);\\n }\\n\\n /**\\n * @notice called when user wants to withdraw multiple tokens back to root chain\\n * @dev Should burn user's tokens. This transaction will be verified when exiting on root chain\\n * @param tokenIds tokenId list to withdraw\\n */\\n function withdrawBatch(uint256[] calldata tokenIds) external {\\n\\n uint256 length = tokenIds.length;\\n require(length <= BATCH_LIMIT, \\\"ChildMintableERC721: EXCEEDS_BATCH_LIMIT\\\");\\n\\n // Iteratively burn ERC721 tokens, for performing\\n // batch withdraw\\n for (uint256 i; i < length; i++) {\\n\\n uint256 tokenId = tokenIds[i];\\n\\n require(_msgSender() == ownerOf(tokenId), string(abi.encodePacked(\\\"ChildMintableERC721: INVALID_TOKEN_OWNER \\\", tokenId)));\\n withdrawnTokens[tokenId] = true;\\n _burn(tokenId);\\n\\n }\\n\\n // At last emit this event, which will be used\\n // in MintableERC721 predicate contract on L1\\n // while verifying burn proof\\n emit WithdrawnBatch(_msgSender(), tokenIds);\\n\\n }\\n\\n /**\\n * @notice called when user wants to withdraw token back to root chain with token URI\\n * @dev Should handle withraw by burning user's token.\\n * Should set `withdrawnTokens` mapping to `true` for the tokenId being withdrawn\\n * This transaction will be verified when exiting on root chain\\n *\\n * @param tokenId tokenId to withdraw\\n */\\n function withdrawWithMetadata(uint256 tokenId) external {\\n\\n require(_msgSender() == ownerOf(tokenId), \\\"ChildMintableERC721: INVALID_TOKEN_OWNER\\\");\\n withdrawnTokens[tokenId] = true;\\n\\n // Encoding metadata associated with tokenId & emitting event\\n emit TransferWithMetadata(ownerOf(tokenId), address(0), tokenId, this.encodeTokenMetadata(tokenId));\\n\\n _burn(tokenId);\\n\\n }\\n\\n /**\\n * @notice This method is supposed to be called by client when withdrawing token with metadata\\n * and pass return value of this function as second paramter of `withdrawWithMetadata` method\\n *\\n * It can be overridden by clients to encode data in a different form, which needs to\\n * be decoded back by them correctly during exiting\\n *\\n * @param tokenId Token for which URI to be fetched\\n */\\n function encodeTokenMetadata(uint256 tokenId) external view virtual returns (bytes memory) {\\n\\n // You're always free to change this default implementation\\n // and pack more data in byte array which can be decoded back\\n // in L1\\n return abi.encode(tokenURI(tokenId));\\n\\n }\\n\\n /**\\n * @notice Example function to handle minting tokens on matic chain\\n * @dev Minting can be done as per requirement,\\n * This implementation allows only admin to mint tokens but it can be changed as per requirement\\n * Should verify if token is withdrawn by checking `withdrawnTokens` mapping\\n * @param user user for whom tokens are being minted\\n * @param tokenId tokenId to mint\\n */\\n function mint(address user, uint256 tokenId) public only(DEFAULT_ADMIN_ROLE) {\\n require(!withdrawnTokens[tokenId], \\\"ChildMintableERC721: TOKEN_EXISTS_ON_ROOT_CHAIN\\\");\\n _mint(user, tokenId);\\n }\\n}\\n\"\n },\n \"contracts/Libraries/matic/child/ChildToken/ChildMintableERC1155.sol\": {\n \"content\": \"pragma solidity 0.6.6;\\n\\nimport {ERC1155} from \\\"@openzeppelin/contracts/token/ERC1155/ERC1155.sol\\\";\\nimport {AccessControlMixin} from \\\"../../common/AccessControlMixin.sol\\\";\\nimport {IChildToken} from \\\"./IChildToken.sol\\\";\\nimport {NativeMetaTransaction} from \\\"../../common/NativeMetaTransaction.sol\\\";\\nimport {ContextMixin} from \\\"../../common/ContextMixin.sol\\\";\\n\\ncontract ChildMintableERC1155 is\\n ERC1155,\\n IChildToken,\\n AccessControlMixin,\\n NativeMetaTransaction,\\n ContextMixin\\n{\\n bytes32 public constant DEPOSITOR_ROLE = keccak256(\\\"DEPOSITOR_ROLE\\\");\\n\\n constructor(string memory uri_, address childChainManager)\\n public\\n ERC1155(uri_)\\n {\\n _setupContractId(\\\"ChildMintableERC1155\\\");\\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\\n _setupRole(DEPOSITOR_ROLE, childChainManager);\\n _initializeEIP712(uri_);\\n }\\n\\n // This is to support Native meta transactions\\n // never use msg.sender directly, use _msgSender() instead\\n function _msgSender()\\n internal\\n override\\n view\\n returns (address payable sender)\\n {\\n return ContextMixin.msgSender();\\n }\\n\\n /**\\n * @notice called when tokens are deposited on root chain\\n * @dev Should be callable only by ChildChainManager\\n * Should handle deposit by minting the required tokens for user\\n * Make sure minting is done only by this function\\n * @param user user address for whom deposit is being done\\n * @param depositData abi encoded ids array and amounts array\\n */\\n function deposit(address user, bytes calldata depositData)\\n external\\n override\\n only(DEPOSITOR_ROLE)\\n {\\n (\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) = abi.decode(depositData, (uint256[], uint256[], bytes));\\n\\n require(\\n user != address(0),\\n \\\"ChildMintableERC1155: INVALID_DEPOSIT_USER\\\"\\n );\\n\\n _mintBatch(user, ids, amounts, data);\\n }\\n\\n /**\\n * @notice called when user wants to withdraw single token back to root chain\\n * @dev Should burn user's tokens. This transaction will be verified when exiting on root chain\\n * @param id id to withdraw\\n * @param amount amount to withdraw\\n */\\n function withdrawSingle(uint256 id, uint256 amount) external {\\n _burn(_msgSender(), id, amount);\\n }\\n\\n /**\\n * @notice called when user wants to batch withdraw tokens back to root chain\\n * @dev Should burn user's tokens. This transaction will be verified when exiting on root chain\\n * @param ids ids to withdraw\\n * @param amounts amounts to withdraw\\n */\\n function withdrawBatch(uint256[] calldata ids, uint256[] calldata amounts)\\n external\\n {\\n _burnBatch(_msgSender(), ids, amounts);\\n }\\n\\n /**\\n * @notice See definition of `_mint` in ERC1155 contract\\n * @dev This implementation only allows admins to mint tokens\\n * but can be changed as per requirement\\n */\\n function mint(\\n address account,\\n uint256 id,\\n uint256 amount,\\n bytes calldata data\\n ) external only(DEFAULT_ADMIN_ROLE) {\\n _mint(account, id, amount, data);\\n }\\n\\n /**\\n * @notice See definition of `_mintBatch` in ERC1155 contract\\n * @dev This implementation only allows admins to mint tokens\\n * but can be changed as per requirement\\n */\\n function mintBatch(\\n address to,\\n uint256[] calldata ids,\\n uint256[] calldata amounts,\\n bytes calldata data\\n ) external only(DEFAULT_ADMIN_ROLE) {\\n _mintBatch(to, ids, amounts, data);\\n }\\n}\\n\"\n },\n \"contracts/Libraries/matic/child/ChildToken/ChildERC721.sol\": {\n \"content\": \"pragma solidity 0.6.6;\\n\\nimport {ERC721} from \\\"@openzeppelin/contracts/token/ERC721/ERC721.sol\\\";\\nimport {AccessControlMixin} from \\\"../../common/AccessControlMixin.sol\\\";\\nimport {IChildToken} from \\\"./IChildToken.sol\\\";\\nimport {NativeMetaTransaction} from \\\"../../common/NativeMetaTransaction.sol\\\";\\nimport {ContextMixin} from \\\"../../common/ContextMixin.sol\\\";\\n\\ncontract ChildERC721 is\\n ERC721,\\n IChildToken,\\n AccessControlMixin,\\n NativeMetaTransaction,\\n ContextMixin\\n{\\n bytes32 public constant DEPOSITOR_ROLE = keccak256(\\\"DEPOSITOR_ROLE\\\");\\n\\n // limit batching of tokens due to gas limit restrictions\\n uint256 public constant BATCH_LIMIT = 20;\\n\\n event WithdrawnBatch(address indexed user, uint256[] tokenIds);\\n event TransferWithMetadata(address indexed from, address indexed to, uint256 indexed tokenId, bytes metaData);\\n\\n constructor(\\n string memory name_,\\n string memory symbol_,\\n address childChainManager\\n ) public ERC721(name_, symbol_) {\\n _setupContractId(\\\"ChildERC721\\\");\\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\\n _setupRole(DEPOSITOR_ROLE, childChainManager);\\n _initializeEIP712(name_);\\n }\\n\\n // This is to support Native meta transactions\\n // never use msg.sender directly, use _msgSender() instead\\n function _msgSender()\\n internal\\n override\\n view\\n returns (address payable sender)\\n {\\n return ContextMixin.msgSender();\\n }\\n\\n /**\\n * @notice called when token is deposited on root chain\\n * @dev Should be callable only by ChildChainManager\\n * Should handle deposit by minting the required tokenId for user\\n * Make sure minting is done only by this function\\n * @param user user address for whom deposit is being done\\n * @param depositData abi encoded tokenId\\n */\\n function deposit(address user, bytes calldata depositData)\\n external\\n override\\n only(DEPOSITOR_ROLE)\\n {\\n // deposit single\\n if (depositData.length == 32) {\\n uint256 tokenId = abi.decode(depositData, (uint256));\\n _mint(user, tokenId);\\n\\n // deposit batch\\n } else {\\n uint256[] memory tokenIds = abi.decode(depositData, (uint256[]));\\n uint256 length = tokenIds.length;\\n for (uint256 i; i < length; i++) {\\n _mint(user, tokenIds[i]);\\n }\\n }\\n }\\n\\n /**\\n * @notice called when user wants to withdraw token back to root chain\\n * @dev Should burn user's token. This transaction will be verified when exiting on root chain\\n * @param tokenId tokenId to withdraw\\n */\\n function withdraw(uint256 tokenId) external {\\n require(_msgSender() == ownerOf(tokenId), \\\"ChildERC721: INVALID_TOKEN_OWNER\\\");\\n _burn(tokenId);\\n }\\n\\n /**\\n * @notice called when user wants to withdraw multiple tokens back to root chain\\n * @dev Should burn user's tokens. This transaction will be verified when exiting on root chain\\n * @param tokenIds tokenId list to withdraw\\n */\\n function withdrawBatch(uint256[] calldata tokenIds) external {\\n uint256 length = tokenIds.length;\\n require(length <= BATCH_LIMIT, \\\"ChildERC721: EXCEEDS_BATCH_LIMIT\\\");\\n for (uint256 i; i < length; i++) {\\n uint256 tokenId = tokenIds[i];\\n require(_msgSender() == ownerOf(tokenId), string(abi.encodePacked(\\\"ChildERC721: INVALID_TOKEN_OWNER \\\", tokenId)));\\n _burn(tokenId);\\n }\\n emit WithdrawnBatch(_msgSender(), tokenIds);\\n }\\n\\n /**\\n * @notice called when user wants to withdraw token back to root chain with arbitrary metadata\\n * @dev Should handle withraw by burning user's token.\\n * \\n * This transaction will be verified when exiting on root chain\\n *\\n * @param tokenId tokenId to withdraw\\n */\\n function withdrawWithMetadata(uint256 tokenId) external {\\n\\n require(_msgSender() == ownerOf(tokenId), \\\"ChildERC721: INVALID_TOKEN_OWNER\\\");\\n\\n // Encoding metadata associated with tokenId & emitting event\\n emit TransferWithMetadata(_msgSender(), address(0), tokenId, this.encodeTokenMetadata(tokenId));\\n\\n _burn(tokenId);\\n\\n }\\n\\n /**\\n * @notice This method is supposed to be called by client when withdrawing token with metadata\\n * and pass return value of this function as second paramter of `withdrawWithMetadata` method\\n *\\n * It can be overridden by clients to encode data in a different form, which needs to\\n * be decoded back by them correctly during exiting\\n *\\n * @param tokenId Token for which URI to be fetched\\n */\\n function encodeTokenMetadata(uint256 tokenId) external view virtual returns (bytes memory) {\\n\\n // You're always free to change this default implementation\\n // and pack more data in byte array which can be decoded back\\n // in L1\\n return abi.encode(tokenURI(tokenId));\\n\\n }\\n}\\n\"\n },\n \"contracts/Libraries/matic/child/ChildToken/ChildERC1155.sol\": {\n \"content\": \"pragma solidity 0.6.6;\\n\\nimport {ERC1155} from \\\"@openzeppelin/contracts/token/ERC1155/ERC1155.sol\\\";\\nimport {AccessControlMixin} from \\\"../../common/AccessControlMixin.sol\\\";\\nimport {IChildToken} from \\\"./IChildToken.sol\\\";\\nimport {NativeMetaTransaction} from \\\"../../common/NativeMetaTransaction.sol\\\";\\nimport {ContextMixin} from \\\"../../common/ContextMixin.sol\\\";\\n\\ncontract ChildERC1155 is\\n ERC1155,\\n IChildToken,\\n AccessControlMixin,\\n NativeMetaTransaction,\\n ContextMixin\\n{\\n bytes32 public constant DEPOSITOR_ROLE = keccak256(\\\"DEPOSITOR_ROLE\\\");\\n\\n constructor(string memory uri_, address childChainManager)\\n public\\n ERC1155(uri_)\\n {\\n _setupContractId(\\\"ChildERC1155\\\");\\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\\n _setupRole(DEPOSITOR_ROLE, childChainManager);\\n _initializeEIP712(uri_);\\n }\\n\\n // This is to support Native meta transactions\\n // never use msg.sender directly, use _msgSender() instead\\n function _msgSender()\\n internal\\n override\\n view\\n returns (address payable sender)\\n {\\n return ContextMixin.msgSender();\\n }\\n\\n /**\\n * @notice called when tokens are deposited on root chain\\n * @dev Should be callable only by ChildChainManager\\n * Should handle deposit by minting the required tokens for user\\n * Make sure minting is done only by this function\\n * @param user user address for whom deposit is being done\\n * @param depositData abi encoded ids array and amounts array\\n */\\n function deposit(address user, bytes calldata depositData)\\n external\\n override\\n only(DEPOSITOR_ROLE)\\n {\\n (\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) = abi.decode(depositData, (uint256[], uint256[], bytes));\\n require(user != address(0x0), \\\"ChildERC1155: INVALID_DEPOSIT_USER\\\");\\n _mintBatch(user, ids, amounts, data);\\n }\\n\\n /**\\n * @notice called when user wants to withdraw single token back to root chain\\n * @dev Should burn user's tokens. This transaction will be verified when exiting on root chain\\n * @param id id to withdraw\\n * @param amount amount to withdraw\\n */\\n function withdrawSingle(uint256 id, uint256 amount) external {\\n _burn(_msgSender(), id, amount);\\n }\\n\\n /**\\n * @notice called when user wants to batch withdraw tokens back to root chain\\n * @dev Should burn user's tokens. This transaction will be verified when exiting on root chain\\n * @param ids ids to withdraw\\n * @param amounts amounts to withdraw\\n */\\n function withdrawBatch(uint256[] calldata ids, uint256[] calldata amounts)\\n external\\n {\\n _burnBatch(_msgSender(), ids, amounts);\\n }\\n}\\n\"\n },\n \"contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.6 <0.9.0;\\n\\nimport {CryptOrchidGoerli} from \\\"../CryptOrchidGoerli/CryptOrchidGoerli.sol\\\";\\nimport {AccessControlMixin} from \\\"../Libraries/matic/common/AccessControlMixin.sol\\\";\\nimport {IChildToken} from \\\"../Libraries/matic/child/ChildToken/IChildToken.sol\\\";\\nimport {NativeMetaTransaction} from \\\"../Libraries/matic/common/NativeMetaTransaction.sol\\\";\\nimport {ContextMixin} from \\\"../Libraries/matic/common/ContextMixin.sol\\\";\\nimport {FxBaseChildTunnel} from \\\"../Libraries/tunnel/FxBaseChildTunnel.sol\\\";\\n\\ncontract CryptOrchidERC721Child is\\n CryptOrchidGoerli,\\n IChildToken,\\n AccessControlMixin,\\n NativeMetaTransaction,\\n ContextMixin,\\n FxBaseChildTunnel\\n{\\n bytes32 public constant DEPOSITOR_ROLE = keccak256(\\\"DEPOSITOR_ROLE\\\");\\n\\n // limit batching of tokens due to gas limit restrictions\\n uint256 public constant BATCH_LIMIT = 20;\\n\\n event WithdrawnBatch(address indexed user, uint256[] tokenIds);\\n event TransferWithMetadata(address indexed from, address indexed to, uint256 indexed tokenId, bytes metaData);\\n\\n constructor(address childChainManager, address _fxChild) public CryptOrchidGoerli() FxBaseChildTunnel(_fxChild) {\\n _setupContractId(\\\"CryptOrchidERC721Child\\\");\\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\\n _setupRole(DEPOSITOR_ROLE, childChainManager);\\n _initializeEIP712(\\\"CryptOrchids\\\");\\n }\\n\\n // This is to support Native meta transactions\\n // never use msg.sender directly, use _msgSender() instead\\n function _msgSender() internal view override returns (address payable sender) {\\n return ContextMixin.msgSender();\\n }\\n\\n /**\\n * @notice called when token is deposited on root chain\\n * @dev Should be callable only by ChildChainManager\\n * Should handle deposit by minting the required tokenId for user\\n * Make sure minting is done only by this function\\n * @param user user address for whom deposit is being done\\n * @param depositData abi encoded tokenId\\n */\\n function deposit(address user, bytes calldata depositData) external override only(DEPOSITOR_ROLE) {\\n // deposit single\\n if (depositData.length == 32) {\\n uint256 tokenId = abi.decode(depositData, (uint256));\\n _mint(user, tokenId);\\n\\n // deposit batch\\n } else {\\n uint256[] memory tokenIds = abi.decode(depositData, (uint256[]));\\n uint256 length = tokenIds.length;\\n for (uint256 i; i < length; i++) {\\n _mint(user, tokenIds[i]);\\n }\\n }\\n }\\n\\n function _processMessageFromRoot(\\n uint256 stateId,\\n address sender,\\n bytes memory data\\n ) internal override validateSender(sender) {\\n (string memory species, uint256 plantedAt, uint256 waterLevel, uint256 tokenId) = abi.decode(\\n data,\\n (string, uint256, uint256, uint256)\\n );\\n\\n require(cryptorchids[tokenId].plantedAt == 0, \\\"Metdata already transferred\\\");\\n\\n cryptorchids[tokenId] = CryptOrchid({species: species, plantedAt: plantedAt, waterLevel: waterLevel});\\n }\\n\\n function sendMessageToRoot(bytes memory message) public {\\n _sendMessageToRoot(message);\\n }\\n}\\n\"\n },\n \"contracts/Libraries/tunnel/FxBaseChildTunnel.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity >=0.6.6 <0.9.0;\\n\\n// IFxMessageProcessor represents interface to process message\\ninterface IFxMessageProcessor {\\n function processMessageFromRoot(\\n uint256 stateId,\\n address rootMessageSender,\\n bytes calldata data\\n ) external;\\n}\\n\\n/**\\n * @notice Mock child tunnel contract to receive and send message from L2\\n */\\nabstract contract FxBaseChildTunnel is IFxMessageProcessor {\\n // MessageTunnel on L1 will get data from this event\\n event MessageSent(bytes message);\\n\\n // fx child\\n address public fxChild;\\n\\n // fx root tunnel\\n address public fxRootTunnel;\\n\\n constructor(address _fxChild) internal {\\n fxChild = _fxChild;\\n }\\n\\n // Sender must be fxRootTunnel in case of ERC20 tunnel\\n modifier validateSender(address sender) {\\n require(sender == fxRootTunnel, \\\"FxBaseChildTunnel: INVALID_SENDER_FROM_ROOT\\\");\\n _;\\n }\\n\\n // set fxRootTunnel if not set already\\n function setFxRootTunnel(address _fxRootTunnel) public {\\n require(fxRootTunnel == address(0x0), \\\"FxBaseChildTunnel: ROOT_TUNNEL_ALREADY_SET\\\");\\n fxRootTunnel = _fxRootTunnel;\\n }\\n\\n function processMessageFromRoot(\\n uint256 stateId,\\n address rootMessageSender,\\n bytes memory data\\n ) public override {\\n require(msg.sender == fxChild, \\\"FxBaseChildTunnel: INVALID_SENDER\\\");\\n _processMessageFromRoot(stateId, rootMessageSender, data);\\n }\\n\\n /**\\n * @notice Emit message that can be received on Root Tunnel\\n * @dev Call the internal function when need to emit message\\n * @param message bytes message that will be sent to Root Tunnel\\n * some message examples -\\n * abi.encode(tokenId);\\n * abi.encode(tokenId, tokenMetadata);\\n * abi.encode(messageType, messageData);\\n */\\n function _sendMessageToRoot(bytes memory message) internal {\\n emit MessageSent(message);\\n }\\n\\n /**\\n * @notice Process message received from Root Tunnel\\n * @dev function needs to be implemented to handle message as per requirement\\n * This is called by onStateReceive function.\\n * Since it is called via a system call, any event will not be emitted during its execution.\\n * @param stateId unique state id\\n * @param sender root message sender\\n * @param message bytes message that was sent from Root Tunnel\\n */\\n function _processMessageFromRoot(\\n uint256 stateId,\\n address sender,\\n bytes memory message\\n ) internal virtual;\\n}\\n\"\n },\n \"contracts/Libraries/matic/root/RootToken/DummyERC1155.sol\": {\n \"content\": \"pragma solidity 0.6.6;\\n\\nimport {ERC1155} from \\\"@openzeppelin/contracts/token/ERC1155/ERC1155.sol\\\";\\nimport {NativeMetaTransaction} from \\\"../../common/NativeMetaTransaction.sol\\\";\\nimport {ContextMixin} from \\\"../../common/ContextMixin.sol\\\";\\n\\ncontract DummyERC1155 is\\n ERC1155,\\n NativeMetaTransaction,\\n ContextMixin\\n{\\n constructor(string memory uri_)\\n public\\n ERC1155(uri_)\\n {\\n _initializeEIP712(uri_);\\n }\\n\\n function mint(address account, uint256 id, uint256 amount) public {\\n _mint(account, id, amount, bytes(\\\"\\\"));\\n }\\n\\n function _msgSender()\\n internal\\n override\\n view\\n returns (address payable sender)\\n {\\n return ContextMixin.msgSender();\\n }\\n}\\n\"\n },\n \"contracts/Libraries/matic/root/TokenPredicates/ERC1155Predicate.sol\": {\n \"content\": \"pragma solidity 0.6.6;\\n\\nimport {IERC1155} from \\\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\\\";\\nimport {ERC1155Receiver} from \\\"@openzeppelin/contracts/token/ERC1155/ERC1155Receiver.sol\\\";\\nimport {AccessControlMixin} from \\\"../../common/AccessControlMixin.sol\\\";\\nimport {RLPReader} from \\\"../../lib/RLPReader.sol\\\";\\nimport {ITokenPredicate} from \\\"./ITokenPredicate.sol\\\";\\nimport {Initializable} from \\\"../../common/Initializable.sol\\\";\\n\\ncontract ERC1155Predicate is ITokenPredicate, ERC1155Receiver, AccessControlMixin, Initializable {\\n using RLPReader for bytes;\\n using RLPReader for RLPReader.RLPItem;\\n\\n bytes32 public constant MANAGER_ROLE = keccak256(\\\"MANAGER_ROLE\\\");\\n bytes32 public constant TOKEN_TYPE = keccak256(\\\"ERC1155\\\");\\n\\n // keccak256(\\\"TransferSingle(address,address,address,uint256,uint256)\\\")\\n bytes32 public constant TRANSFER_SINGLE_EVENT_SIG = 0xc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62;\\n // keccak256(\\\"TransferBatch(address,address,address,uint256[],uint256[])\\\")\\n bytes32 public constant TRANSFER_BATCH_EVENT_SIG = 0x4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb;\\n\\n event LockedBatchERC1155(\\n address indexed depositor,\\n address indexed depositReceiver,\\n address indexed rootToken,\\n uint256[] ids,\\n uint256[] amounts\\n );\\n\\n constructor() public {}\\n\\n function initialize(address _owner) external initializer {\\n _setupContractId(\\\"ERC1155Predicate\\\");\\n _setupRole(DEFAULT_ADMIN_ROLE, _owner);\\n _setupRole(MANAGER_ROLE, _owner);\\n }\\n\\n /**\\n * @notice rejects single transfer\\n */\\n function onERC1155Received(\\n address,\\n address,\\n uint256,\\n uint256,\\n bytes calldata\\n ) external override returns (bytes4) {\\n return 0;\\n }\\n\\n /**\\n * @notice accepts batch transfer\\n */\\n function onERC1155BatchReceived(\\n address,\\n address,\\n uint256[] calldata,\\n uint256[] calldata,\\n bytes calldata\\n ) external override returns (bytes4) {\\n return ERC1155Receiver(0).onERC1155BatchReceived.selector;\\n }\\n\\n /**\\n * @notice Lock ERC1155 tokens for deposit, callable only by manager\\n * @param depositor Address who wants to deposit tokens\\n * @param depositReceiver Address (address) who wants to receive tokens on child chain\\n * @param rootToken Token which gets deposited\\n * @param depositData ABI encoded id array and amount array\\n */\\n function lockTokens(\\n address depositor,\\n address depositReceiver,\\n address rootToken,\\n bytes calldata depositData\\n )\\n external\\n override\\n only(MANAGER_ROLE)\\n {\\n // forcing batch deposit since supporting both single and batch deposit introduces too much complexity\\n (\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) = abi.decode(depositData, (uint256[], uint256[], bytes));\\n emit LockedBatchERC1155(\\n depositor,\\n depositReceiver,\\n rootToken,\\n ids,\\n amounts\\n );\\n IERC1155(rootToken).safeBatchTransferFrom(\\n depositor,\\n address(this),\\n ids,\\n amounts,\\n data\\n );\\n }\\n\\n /**\\n * @notice Validates log signature, from and to address\\n * then sends the correct tokenId, amount to withdrawer\\n * callable only by manager\\n * @param rootToken Token which gets withdrawn\\n * @param log Valid ERC1155 TransferSingle burn or TransferBatch burn log from child chain\\n */\\n function exitTokens(\\n address,\\n address rootToken,\\n bytes memory log\\n )\\n public\\n override\\n only(MANAGER_ROLE)\\n {\\n RLPReader.RLPItem[] memory logRLPList = log.toRlpItem().toList();\\n RLPReader.RLPItem[] memory logTopicRLPList = logRLPList[1].toList(); // topics\\n bytes memory logData = logRLPList[2].toBytes();\\n\\n address withdrawer = address(logTopicRLPList[2].toUint()); // topic2 is from address\\n\\n require(\\n address(logTopicRLPList[3].toUint()) == address(0), // topic3 is to address\\n \\\"ERC1155Predicate: INVALID_RECEIVER\\\"\\n );\\n\\n if (bytes32(logTopicRLPList[0].toUint()) == TRANSFER_SINGLE_EVENT_SIG) { // topic0 is event sig\\n (uint256 id, uint256 amount) = abi.decode(\\n logData,\\n (uint256, uint256)\\n );\\n IERC1155(rootToken).safeTransferFrom(\\n address(this),\\n withdrawer,\\n id,\\n amount,\\n bytes(\\\"\\\")\\n );\\n } else if (bytes32(logTopicRLPList[0].toUint()) == TRANSFER_BATCH_EVENT_SIG) {\\n (uint256[] memory ids, uint256[] memory amounts) = abi.decode(\\n logData,\\n (uint256[], uint256[])\\n );\\n IERC1155(rootToken).safeBatchTransferFrom(\\n address(this),\\n withdrawer,\\n ids,\\n amounts,\\n bytes(\\\"\\\")\\n );\\n } else {\\n revert(\\\"ERC1155Predicate: INVALID_WITHDRAW_SIG\\\");\\n }\\n }\\n}\\n\"\n },\n \"contracts/Libraries/matic/test/TestRootTunnel.sol\": {\n \"content\": \"pragma solidity 0.6.6;\\n\\nimport {BaseRootTunnel} from \\\"../tunnel/BaseRootTunnel.sol\\\";\\n\\ncontract TestRootTunnel is BaseRootTunnel {\\n uint256 public receivedNumber;\\n\\n event MessageReceivedFromChild(uint256);\\n\\n function _processMessageFromChild(bytes memory message) internal override {\\n (uint256 n) = abi.decode(message, (uint256));\\n emit MessageReceivedFromChild(n);\\n receivedNumber = n;\\n }\\n}\\n\"\n }\n },\n \"settings\": {\n \"optimizer\": {\n \"enabled\": true,\n \"runs\": 200\n },\n \"outputSelection\": {\n \"*\": {\n \"*\": [\n \"abi\",\n \"evm.bytecode\",\n \"evm.deployedBytecode\",\n \"evm.methodIdentifiers\",\n \"metadata\",\n \"devdoc\",\n \"userdoc\",\n \"storageLayout\",\n \"evm.gasEstimates\"\n ],\n \"\": [\n \"ast\"\n ]\n }\n },\n \"metadata\": {\n \"useLiteralContent\": true\n }\n }\n}", + "solcInputHash": "961814ba080324d595a4e1c93377123d", + "transactionHash": "0x672ca51797c5781ac3c933f16b056bb1b500d77b0d0e08d4946f4cb88c480a09", + "args": [] + }, + "decoded": { + "from": "0x0090720FeD7Fed66eD658118b7B3BB0189D3A495", + "gasPrice": "500000000000", + "gasLimit": "7888628", + "to": null, + "value": "0", + "nonce": 125, + "data": "0x600f805461ffff191690556101c060405260006080908152610c0260a0526117ba60c052611f8a60e0526123726101005261256661012052612660610140526126c4610160526126f66101805261270f6101a0526200006390601090600a62000b0c565b506040805161018081018252601761014082019081527f7368656e7a68656e696361206f72636869646163656165000000000000000000610160830152815281518083018352601881527f7068616c61656e6f70736973206d6963686f6c69747a69690000000000000000602082810191909152808301919091528251808401845260158082527f6775617269616e74686520617572616e74696163610000000000000000000000828401528385019190915283518085018552600e81526d76616e646120636f6572756c656160901b818401526060840152835180850185528181527f637970726970656469756d2063616c63656f6c7573000000000000000000000081840152608084015283518085018552601981527f70617068696f706564696c756d20766965746e616d656e7365000000000000008184015260a08401528351808501855260128152716d696c746f6e6961206b61796173696d616560701b8184015260c084015283518085018552601381527f706c6174616e746865726120617a6f72696361000000000000000000000000008184015260e0840152835180850185529081527f64656e64726f7068796c6178206c696e64656e69690000000000000000000000818301526101008301528251808401909352601d83527f70617068696f706564696c756d20726f7468736368696c6469616e756d000000908301526101208101919091526200028390601190600a62000ba9565b50604080516101c08101909152604b610140820181815282916200505f61016084013981526020016040518060800160405280604c815260200162004ef5604c9139815260200160405180608001604052806049815260200162005183604991398152602001604051806080016040528060428152602001620050f060429139815260200160405180608001604052806049815260200162004eac6049913981526020016040518060800160405280604d815260200162004fc9604d91398152602001604051806080016040528060468152602001620050aa604691398152602001604051806080016040528060478152602001620052f96047913981526020016040518060800160405280604981526020016200521960499139815260200160405180608001604052806051815260200162004e14605191399052620003cf90601b90600a62000ba9565b50604080516101c08101909152604b61014082018181528291620052ae61016084013981526020016040518060800160405280604c815260200162005262604c913981526020016040518060800160405280604981526020016200501660499139815260200160405180608001604052806042815260200162004f4160429139815260200160405180608001604052806049815260200162004d826049913981526020016040518060800160405280604d8152602001620051cc604d9139815260200160405180608001604052806046815260200162004f8360469139815260200160405180608001604052806047815260200162004e6560479139815260200160405180608001604052806049815260200162004dcb604991398152602001604051806080016040528060518152602001620051326051913990526200051b90602590600a62000ba9565b506040518060400160405280600c81526020016b43727970744f72636869647360a01b8152506040518060400160405280600581526020016413d490d21160da1b81525060405180604001604052806007815260200166697066733a2f2f60c81b8152508282620005996301ffc9a760e01b6200093660201b60201c565b8151620005ae90600790602085019062000bfc565b508051620005c490600890602084019062000bfc565b50620005e06380ac58cd60e01b6001600160e01b036200093616565b620005fb635b5e139f60e01b6001600160e01b036200093616565b6200061663780e9d6360e01b6001600160e01b036200093616565b5050600b805460ff191690556200064a60006200063b6001600160e01b03620009be16565b6001600160e01b03620009c316565b604080516a4d494e5445525f524f4c4560a81b8152905190819003600b01902062000682906200063b6001600160e01b03620009be16565b604080516a5041555345525f524f4c4560a81b8152905190819003600b019020620006ba906200063b6001600160e01b03620009be16565b620006ce816001600160e01b03620009dc16565b5050506000620006e3620009be60201b60201c565b600d80546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35060005b600a8110156200092f57601b81600a81106200074c57fe5b0160316000601184600a81106200075f57fe5b6040805160208082019081529290930180546002600182161561010002600019019091160491840182905292829160609091019084908015620007e65780601f10620007ba57610100808354040283529160200191620007e6565b820191906000526020600020905b815481529060010190602001808311620007c857829003601f168201915b50509250505060405160208183030381529060405280519060200120815260200190815260200160002090805460018160011615610100020316600290046200083192919062000c7d565b50602581600a81106200084057fe5b0160326000601184600a81106200085357fe5b6040805160208082019081529290930180546002600182161561010002600019019091160491840182905292829160609091019084908015620008da5780601f10620008ae57610100808354040283529160200191620008da565b820191906000526020600020905b815481529060010190602001808311620008bc57829003601f168201915b50509250505060405160208183030381529060405280519060200120815260200190815260200160002090805460018160011615610100020316600290046200092592919062000c7d565b5060010162000734565b5062000da9565b6001600160e01b0319808216141562000996576040805162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604482015290519081900360640190fd5b6001600160e01b0319166000908152600160208190526040909120805460ff19169091179055565b335b90565b620009d882826001600160e01b03620009f116565b5050565b8051620009d890600a90602084019062000bfc565b60008281526020818152604090912062000a1691839062002f9962000a73821b17901c565b15620009d85762000a2f6001600160e01b03620009be16565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600062000a93836001600160a01b0384166001600160e01b0362000a9c16565b90505b92915050565b600062000ab383836001600160e01b0362000af416565b62000aeb5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000a96565b50600062000a96565b60009081526001919091016020526040902054151590565b60018301918390821562000b975791602002820160005b8382111562000b6557835183826101000a81548161ffff021916908361ffff160217905550926020019260020160208160010104928301926001030262000b23565b801562000b955782816101000a81549061ffff021916905560020160208160010104928301926001030262000b65565b505b5062000ba592915062000cf7565b5090565b82600a810192821562000bee579160200282015b8281111562000bee578251805162000bdd91849160209091019062000bfc565b509160200191906001019062000bbd565b5062000ba592915062000d19565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1062000c3f57805160ff191683800117855562000c6f565b8280016001018555821562000c6f579182015b8281111562000c6f57825182559160200191906001019062000c52565b5062000ba592915062000d41565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1062000cb8578054855562000c6f565b8280016001018555821562000c6f57600052602060002091601f016020900482015b8281111562000c6f57825482559160010191906001019062000cda565b620009c091905b8082111562000ba557805461ffff1916815560010162000cfe565b620009c091905b8082111562000ba557600062000d37828262000d5e565b5060010162000d20565b620009c091905b8082111562000ba5576000815560010162000d48565b50805460018160011615610100020316600290046000825580601f1062000d86575062000da6565b601f01602090049060005260206000209081019062000da6919062000d41565b50565b613fc98062000db96000396000f3fe6080604052600436106102e85760003560e01c80636c0360eb11610190578063a7eec44b116100dc578063cac21c8f11610095578063e63ab1e91161006f578063e63ab1e914610ca4578063e985e9c514610cb9578063f2fde38b14610cf4578063ffee200c14610d27576102ef565b8063cac21c8f14610ba6578063d539139314610c56578063d547741f14610c6b576102ef565b8063a7eec44b146109f2578063b66a0e5d14610a1c578063b7aaba2014610a31578063b88d4fde14610a7f578063c87b56dd14610b52578063ca15c87314610b7c576102ef565b80639010d07c116101495780639981d4a1116101235780639981d4a1146109705780639d1b464a1461098d578063a217fddf146109a2578063a22cb465146109b7576102ef565b80639010d07c146108f257806391d148541461092257806395d89b411461095b576102ef565b80636c0360eb1461083b57806370a0823114610850578063715018a6146108835780637fd8d953146108985780638456cb59146108c85780638da5cb5b146108dd576102ef565b806336568abe1161024f5780635c975abb116102085780636352211e116101e25780636352211e1461079f5780636573c787146107c95780636a627842146107f35780636b0c004d14610826576102ef565b80635c975abb1461069b57806360316801146106b057806362ff09d614610775576102ef565b806336568abe146105a15780633ccfd60b146105da5780633f4ba83a146105ef57806342842e0e1461060457806342966c68146106475780634f6ccce714610671576102ef565b8063182199cd116102a1578063182199cd1461048357806323b872dd146104ad578063248a9ca3146104f0578063277dec921461051a5780632f2ff15d1461052f5780632f745c5914610568576102ef565b806301ffc9a7146102f457806306fdde031461033c578063081812fc146103c6578063095ea7b31461040c578063179f0b0a1461044757806318160ddd1461046e576102ef565b366102ef57005b600080fd5b34801561030057600080fd5b506103286004803603602081101561031757600080fd5b50356001600160e01b031916610d3c565b604080519115158252519081900360200190f35b34801561034857600080fd5b50610351610d5f565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561038b578181015183820152602001610373565b50505050905090810190601f1680156103b85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156103d257600080fd5b506103f0600480360360208110156103e957600080fd5b5035610df6565b604080516001600160a01b039092168252519081900360200190f35b34801561041857600080fd5b506104456004803603604081101561042f57600080fd5b506001600160a01b038135169060200135610e58565b005b34801561045357600080fd5b5061045c610f33565b60408051918252519081900360200190f35b34801561047a57600080fd5b5061045c610f3a565b34801561048f57600080fd5b50610328600480360360208110156104a657600080fd5b5035610f4b565b3480156104b957600080fd5b50610445600480360360608110156104d057600080fd5b506001600160a01b03813581169160208101359091169060400135610f6a565b3480156104fc57600080fd5b5061045c6004803603602081101561051357600080fd5b5035610fc1565b34801561052657600080fd5b50610445610fd6565b34801561053b57600080fd5b506104456004803603604081101561055257600080fd5b50803590602001356001600160a01b0316611049565b34801561057457600080fd5b5061045c6004803603604081101561058b57600080fd5b506001600160a01b0381351690602001356110b5565b3480156105ad57600080fd5b50610445600480360360408110156105c457600080fd5b50803590602001356001600160a01b03166110e6565b3480156105e657600080fd5b50610445611147565b3480156105fb57600080fd5b506104456111d8565b34801561061057600080fd5b506104456004803603606081101561062757600080fd5b506001600160a01b03813581169160208101359091169060400135611249565b34801561065357600080fd5b506104456004803603602081101561066a57600080fd5b5035611264565b34801561067d57600080fd5b5061045c6004803603602081101561069457600080fd5b50356112b6565b3480156106a757600080fd5b506103286112d2565b3480156106bc57600080fd5b506106da600480360360208110156106d357600080fd5b50356112db565b60405180806020018581526020018481526020018360038111156106fa57fe5b60ff168152602001828103825286818151815260200191508051906020019080838360005b8381101561073757818101518382015260200161071f565b50505050905090810190601f1680156107645780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b34801561078157600080fd5b5061045c6004803603602081101561079857600080fd5b50356113a0565b3480156107ab57600080fd5b506103f0600480360360208110156107c257600080fd5b50356113b2565b3480156107d557600080fd5b50610328600480360360208110156107ec57600080fd5b50356113e0565b3480156107ff57600080fd5b506104456004803603602081101561081657600080fd5b50356001600160a01b0316611400565b34801561083257600080fd5b5061045c611484565b34801561084757600080fd5b5061035161148a565b34801561085c57600080fd5b5061045c6004803603602081101561087357600080fd5b50356001600160a01b03166114eb565b34801561088f57600080fd5b50610445611553565b3480156108a457600080fd5b50610445600480360360408110156108bb57600080fd5b50803590602001356115ff565b3480156108d457600080fd5b5061044561169b565b3480156108e957600080fd5b506103f061170a565b3480156108fe57600080fd5b506103f06004803603604081101561091557600080fd5b5080359060200135611719565b34801561092e57600080fd5b506103286004803603604081101561094557600080fd5b50803590602001356001600160a01b0316611737565b34801561096757600080fd5b50610351611755565b6104456004803603602081101561098657600080fd5b50356117b6565b34801561099957600080fd5b5061045c611a5c565b3480156109ae57600080fd5b5061045c611b18565b3480156109c357600080fd5b50610445600480360360408110156109da57600080fd5b506001600160a01b0381351690602001351515611b1d565b3480156109fe57600080fd5b5061044560048036036020811015610a1557600080fd5b5035611c22565b348015610a2857600080fd5b50610445611ce0565b348015610a3d57600080fd5b50610a5b60048036036020811015610a5457600080fd5b5035611d51565b60405180826003811115610a6b57fe5b60ff16815260200191505060405180910390f35b348015610a8b57600080fd5b5061044560048036036080811015610aa257600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135640100000000811115610add57600080fd5b820183602082011115610aef57600080fd5b80359060200191846001830284011164010000000083111715610b1157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611ed1945050505050565b348015610b5e57600080fd5b5061035160048036036020811015610b7557600080fd5b5035611f29565b348015610b8857600080fd5b5061045c60048036036020811015610b9f57600080fd5b5035612327565b348015610bb257600080fd5b50610bd060048036036020811015610bc957600080fd5b503561233e565b6040518080602001848152602001838152602001828103825285818151815260200191508051906020019080838360005b83811015610c19578181015183820152602001610c01565b50505050905090810190601f168015610c465780820380516001836020036101000a031916815260200191505b5094505050505060405180910390f35b348015610c6257600080fd5b5061045c6123eb565b348015610c7757600080fd5b5061044560048036036040811015610c8e57600080fd5b50803590602001356001600160a01b031661240e565b348015610cb057600080fd5b5061045c612467565b348015610cc557600080fd5b5061032860048036036040811015610cdc57600080fd5b506001600160a01b038135811691602001351661248a565b348015610d0057600080fd5b5061044560048036036020811015610d1757600080fd5b50356001600160a01b03166124b8565b348015610d3357600080fd5b5061045c6125bb565b6001600160e01b0319811660009081526001602052604090205460ff165b919050565b60078054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610deb5780601f10610dc057610100808354040283529160200191610deb565b820191906000526020600020905b815481529060010190602001808311610dce57829003601f168201915b505050505090505b90565b6000610e01826125c1565b610e3c5760405162461bcd60e51b815260040180806020018281038252602c815260200180613d6f602c913960400191505060405180910390fd5b506000908152600560205260409020546001600160a01b031690565b6000610e63826113b2565b9050806001600160a01b0316836001600160a01b03161415610eb65760405162461bcd60e51b8152600401808060200182810382526021815260200180613e146021913960400191505060405180910390fd5b806001600160a01b0316610ec86125d4565b6001600160a01b03161480610ee95750610ee981610ee46125d4565b61248a565b610f245760405162461bcd60e51b8152600401808060200182810382526038815260200180613c7e6038913960400191505060405180910390fd5b610f2e83836125d8565b505050565b62093a8081565b6000610f466003612646565b905090565b60006002610f5883611d51565b6003811115610f6357fe5b1492915050565b610f7b610f756125d4565b82612651565b610fb65760405162461bcd60e51b8152600401808060200182810382526031815260200180613e5c6031913960400191505060405180910390fd5b610f2e8383836126f5565b60009081526020819052604090206002015490565b610fde6125d4565b6001600160a01b0316610fef61170a565b6001600160a01b031614611038576040805162461bcd60e51b81526020600482018190526024820152600080516020613d9b833981519152604482015290519081900360640190fd5b600f805461ff001916610100179055565b60008281526020819052604090206002015461106c906110676125d4565b611737565b6110a75760405162461bcd60e51b815260040180806020018281038252602f815260200180613a97602f913960400191505060405180910390fd5b6110b18282612853565b5050565b6001600160a01b03821660009081526002602052604081206110dd908363ffffffff6128c216565b90505b92915050565b6110ee6125d4565b6001600160a01b0316816001600160a01b03161461113d5760405162461bcd60e51b815260040180806020018281038252602f815260200180613f65602f913960400191505060405180910390fd5b6110b182826128ce565b61114f6125d4565b6001600160a01b031661116061170a565b6001600160a01b0316146111a9576040805162461bcd60e51b81526020600482018190526024820152600080516020613d9b833981519152604482015290519081900360640190fd5b6040514790339082156108fc029083906000818181858888f193505050501580156110b1573d6000803e3d6000fd5b604080516a5041555345525f524f4c4560a81b8152905190819003600b019020611204906110676125d4565b61123f5760405162461bcd60e51b8152600401808060200182810382526040815260200180613f256040913960400191505060405180910390fd5b61124761293d565b565b610f2e83838360405180602001604052806000815250611ed1565b61126f610f756125d4565b6112aa5760405162461bcd60e51b8152600401808060200182810382526030815260200180613ef56030913960400191505060405180910390fd5b6112b3816129dd565b50565b6000806112ca60038463ffffffff612ab616565b509392505050565b600b5460ff1690565b6000818152600e6020526040812060018101546002820154606093928392839261130488611d51565b8354604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815291869183018282801561138a5780601f1061135f5761010080835404028352916020019161138a565b820191906000526020600020905b81548152906001019060200180831161136d57829003601f168201915b5050505050935093509350935093509193509193565b60306020526000908152604090205481565b60006110e082604051806060016040528060298152602001613ce0602991396003919063ffffffff612ad216565b600060036113ed83611d51565b60038111156113f857fe5b141592915050565b604080516a4d494e5445525f524f4c4560a81b8152905190819003600b01902061142c906110676125d4565b6114675760405162461bcd60e51b815260040180806020018281038252603d815260200180613eb8603d913960400191505060405180910390fd5b61147a81611475600c612ae9565b612aed565b6112b3600c612c27565b61271081565b600a8054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610deb5780601f10610dc057610100808354040283529160200191610deb565b60006001600160a01b0382166115325760405162461bcd60e51b815260040180806020018281038252602a815260200180613cb6602a913960400191505060405180910390fd5b6001600160a01b03821660009081526002602052604090206110e090612646565b61155b6125d4565b6001600160a01b031661156c61170a565b6001600160a01b0316146115b5576040805162461bcd60e51b81526020600482018190526024820152600080516020613d9b833981519152604482015290519081900360640190fd5b600d546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600d80546001600160a01b0319169055565b600f54610100900460ff166116455760405162461bcd60e51b8152600401808060200182810382526027815260200180613b4c6027913960400191505060405180910390fd5b6116566116506125d4565b83612651565b6116915760405162461bcd60e51b815260040180806020018281038252602b815260200180613e8d602b913960400191505060405180910390fd5b610f2e8282612c30565b604080516a5041555345525f524f4c4560a81b8152905190819003600b0190206116c7906110676125d4565b6117025760405162461bcd60e51b815260040180806020018281038252603e815260200180613b73603e913960400191505060405180910390fd5b611247612c76565b600d546001600160a01b031690565b60008281526020819052604081206110dd908363ffffffff6128c216565b60008281526020819052604081206110dd908363ffffffff612cf916565b60088054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610deb5780601f10610dc057610100808354040283529160200191610deb565b600f5460ff16611805576040805162461bcd60e51b8152602060048201526015602482015274151a1948139d5c9cd95c9e481a5cc818db1bdcd959605a1b604482015290519081900360640190fd5b61180d610f3a565b6127100381111561185d576040805162461bcd60e51b8152602060048201526015602482015274139bdd08195b9bdd59da08189d5b189cc81b19599d605a1b604482015290519081900360640190fd5b612710611868610f3a565b106118b3576040805162461bcd60e51b815260206004820152601660248201527514d85b19481a185cc8185b1c9958591e48195b99195960521b604482015290519081900360640190fd5b6000811180156118c4575060148111155b6118ff5760405162461bcd60e51b8152600401808060200182810382526030815260200180613de46030913960400191505060405180910390fd5b61271061191361190d610f3a565b83612d0e565b1115611966576040805162461bcd60e51b815260206004820152601860248201527f45786365656473204d41585f43525950544f5243484944530000000000000000604482015290519081900360640190fd5b611977611971611a5c565b82612d68565b3410156119b55760405162461bcd60e51b8152600401808060200182810382526023815260200180613d096023913960400191505060405180910390fd5b60005b818110156110b1576119ca602f612c27565b60006119d6602f612ae9565b6040805160a081018252600660608201908152656772616e756d60d01b608083015281526000196020808301919091526000828401819052848152600e8252929092208151805194955091939092611a32928492910190613954565b5060208201516001820155604090910151600290910155611a533382612dc1565b506001016119b8565b600080611a67610f3a565b90506126ac8110611a8357670de0b6b3a7640000915050610df3565b61251c8110611a9d576708e1bc9bf0400000915050610df3565b611d4c8110611ab757670470de4df8200000915050610df3565b610dac8110611ad1576702386f26fc100000915050610df3565b6105dc8110611aeb5767011c37937e080000915050610df3565b6101f48110611b045766d529ae9e860000915050610df3565b668e1bc9bf040000915050610df3565b5090565b600081565b611b256125d4565b6001600160a01b0316826001600160a01b03161415611b8b576040805162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015290519081900360640190fd5b8060066000611b986125d4565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff191692151592909217909155611bdc6125d4565b60408051841515815290516001600160a01b0392909216917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319181900360200190a35050565b611c2d610f756125d4565b611c685760405162461bcd60e51b8152600401808060200182810382526027815260200180613bfb6027913960400191505060405180910390fd5b611c71816113e0565b611c7a576112b3565b6000818152600e602052604081206002810154600182015491929091611c9e612ddb565b0390506000611cb08262093a80612ddf565b905080831115611cc357505050506112b3565b6000611cd0846001612d0e565b6002909501949094555050505050565b611ce86125d4565b6001600160a01b0316611cf961170a565b6001600160a01b031614611d42576040805162461bcd60e51b81526020600482018190526024820152600080516020613d9b833981519152604482015290519081900360640190fd5b600f805460ff19166001179055565b6000611d5b6139ce565b6000838152600e60209081526040918290208251815460026001821615610100026000190190911604601f81018490049093028101608090810190945260608101838152909391928492849190840182828015611df95780601f10611dce57610100808354040283529160200191611df9565b820191906000526020600020905b815481529060010190602001808311611ddc57829003601f168201915b50505050508152602001600182015481526020016002820154815250509050806020015160001415611e2f576000915050610d5a565b60001981602001511415611e47576001915050610d5a565b60408101516020820151600090611e5c612ddb565b0390506000611e6e8262093a80612ddf565b90506000611e7f8362093a80612e46565b905081841415611e9757600295505050505050610d5a565b81611ea3856001612d0e565b148015611eb15750612a3081105b15611ec457600295505050505050610d5a565b5060039695505050505050565b611edc6116506125d4565b611f175760405162461bcd60e51b8152600401808060200182810382526031815260200180613e5c6031913960400191505060405180910390fd5b611f2384848484612ead565b50505050565b606080611f35836112db565b5091925060019150611f449050565b611f4d84611d51565b6003811115611f5857fe5b141561203657611f6661148a565b6040518060600160405280602e8152602001613b1e602e91396040516020018083805190602001908083835b60208310611fb15780518252601f199092019160209182019101611f92565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b60208310611ff95780518252601f199092019160209182019101611fda565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052915050610d5a565b600261204184611d51565b600381111561204c57fe5b14156121bd5761205a61148a565b60316000836040516020018080602001828103825283818151815260200191508051906020019080838360005b8381101561209f578181015183820152602001612087565b50505050905090810190601f1680156120cc5780820380516001836020036101000a031916815260200191505b50925050506040516020818303038152906040528051906020012081526020019081526020016000206040516020018083805190602001908083835b602083106121275780518252601f199092019160209182019101612108565b6001836020036101000a038019825116818451168082178552505050505050905001828054600181600116156101000203166002900480156121a05780601f1061217e5761010080835404028352918201916121a0565b820191906000526020600020905b81548152906001019060200180831161218c575b505092505050604051602081830303815290604052915050610d5a565b6121c561148a565b60326000836040516020018080602001828103825283818151815260200191508051906020019080838360005b8381101561220a5781810151838201526020016121f2565b50505050905090810190601f1680156122375780820380516001836020036101000a031916815260200191505b50925050506040516020818303038152906040528051906020012081526020019081526020016000206040516020018083805190602001908083835b602083106122925780518252601f199092019160209182019101612273565b6001836020036101000a0380198251168184511680821785525050505050509050018280546001816001161561010002031660029004801561230b5780601f106122e957610100808354040283529182019161230b565b820191906000526020600020905b8154815290600101906020018083116122f7575b505060408051601f198184030181529190529695505050505050565b60008181526020819052604081206110e090612646565b600e6020908152600091825260409182902080548351601f600260001961010060018616150201909316929092049182018490048402810184019094528084529092918391908301828280156123d55780601f106123aa576101008083540402835291602001916123d5565b820191906000526020600020905b8154815290600101906020018083116123b857829003601f168201915b5050505050908060010154908060020154905083565b604080516a4d494e5445525f524f4c4560a81b8152905190819003600b01902081565b60008281526020819052604090206002015461242c906110676125d4565b61113d5760405162461bcd60e51b8152600401808060200182810382526030815260200180613c4e6030913960400191505060405180910390fd5b604080516a5041555345525f524f4c4560a81b8152905190819003600b01902081565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b6124c06125d4565b6001600160a01b03166124d161170a565b6001600160a01b03161461251a576040805162461bcd60e51b81526020600482018190526024820152600080516020613d9b833981519152604482015290519081900360640190fd5b6001600160a01b03811661255f5760405162461bcd60e51b8152600401808060200182810382526026815260200180613af86026913960400191505060405180910390fd5b600d546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600d80546001600160a01b0319166001600160a01b0392909216919091179055565b612a3081565b60006110e060038363ffffffff612eff16565b3390565b600081815260056020526040902080546001600160a01b0319166001600160a01b038416908117909155819061260d826113b2565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006110e082612ae9565b600061265c826125c1565b6126975760405162461bcd60e51b815260040180806020018281038252602c815260200180613c22602c913960400191505060405180910390fd5b60006126a2836113b2565b9050806001600160a01b0316846001600160a01b031614806126dd5750836001600160a01b03166126d284610df6565b6001600160a01b0316145b806126ed57506126ed818561248a565b949350505050565b826001600160a01b0316612708826113b2565b6001600160a01b03161461274d5760405162461bcd60e51b8152600401808060200182810382526029815260200180613dbb6029913960400191505060405180910390fd5b6001600160a01b0382166127925760405162461bcd60e51b8152600401808060200182810382526024815260200180613bb16024913960400191505060405180910390fd5b61279d838383612f0b565b6127a86000826125d8565b6001600160a01b03831660009081526002602052604090206127d0908263ffffffff612f6b16565b506001600160a01b03821660009081526002602052604090206127f9908263ffffffff612f7716565b5061280c6003828463ffffffff612f8316565b5080826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6000828152602081905260409020612871908263ffffffff612f9916565b156110b15761287e6125d4565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006110dd8383612fae565b60008281526020819052604090206128ec908263ffffffff61301216565b156110b1576128f96125d4565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b6129456112d2565b61298d576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b600b805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6129c06125d4565b604080516001600160a01b039092168252519081900360200190a1565b60006129e8826113b2565b90506129f681600084612f0b565b612a016000836125d8565b6000828152600960205260409020546002600019610100600184161502019091160415612a3f576000828152600960205260408120612a3f916139ef565b6001600160a01b0381166000908152600260205260409020612a67908363ffffffff612f6b16565b50612a7960038363ffffffff61302716565b5060405182906000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6000808080612ac58686613033565b9097909650945050505050565b6000612adf8484846130ae565b90505b9392505050565b5490565b6001600160a01b038216612b48576040805162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015290519081900360640190fd5b612b51816125c1565b15612ba3576040805162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015290519081900360640190fd5b612baf60008383612f0b565b6001600160a01b0382166000908152600260205260409020612bd7908263ffffffff612f7716565b50612bea6003828463ffffffff612f8316565b5060405181906001600160a01b038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b80546001019055565b6040805142602080830191909152448284015260608083018590528351808403909101815260809092019092528051910120600090612c6f8482613178565b5092915050565b612c7e6112d2565b15612cc3576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b600b805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586129c06125d4565b60006110dd836001600160a01b0384166131d2565b6000828201838110156110dd576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082612d77575060006110e0565b82820282848281612d8457fe5b04146110dd5760405162461bcd60e51b8152600401808060200182810382526021815260200180613d4e6021913960400191505060405180910390fd5b6110b18282604051806020016040528060008152506131ea565b4290565b6000808211612e35576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381612e3e57fe5b049392505050565b6000808211612e9c576040805162461bcd60e51b815260206004820152601860248201527f536166654d6174683a206d6f64756c6f206279207a65726f0000000000000000604482015290519081900360640190fd5b818381612ea557fe5b069392505050565b612eb88484846126f5565b612ec48484848461323c565b611f235760405162461bcd60e51b8152600401808060200182810382526032815260200180613ac66032913960400191505060405180910390fd5b60006110dd83836131d2565b6001600160a01b0382161580612f255750612f25816113e0565b612f605760405162461bcd60e51b8152600401808060200182810382526027815260200180613e356027913960400191505060405180910390fd5b610f2e8383836133bc565b60006110dd83836133c7565b60006110dd838361348d565b6000612adf84846001600160a01b0385166134d7565b60006110dd836001600160a01b03841661348d565b81546000908210612ff05760405162461bcd60e51b8152600401808060200182810382526022815260200180613a4a6022913960400191505060405180910390fd5b826000018281548110612fff57fe5b9060005260206000200154905092915050565b60006110dd836001600160a01b0384166133c7565b60006110dd838361356e565b8154600090819083106130775760405162461bcd60e51b8152600401808060200182810382526022815260200180613d2c6022913960400191505060405180910390fd5b600084600001848154811061308857fe5b906000526020600020906002020190508060000154816001015492509250509250929050565b600082815260018401602052604081205482816131495760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561310e5781810151838201526020016130f6565b50505050905090810190601f16801561313b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5084600001600182038154811061315c57fe5b9060005260206000209060020201600101549150509392505050565b6000828152600e60205260409020606061319c61319784612710612e46565b613642565b80519091506131b19083906020840190613954565b506131ba612ddb565b600183015560006131ca856113b2565b505050505050565b60009081526001919091016020526040902054151590565b6131f48383612aed565b613201600084848461323c565b610f2e5760405162461bcd60e51b8152600401808060200182810382526032815260200180613ac66032913960400191505060405180910390fd5b6000613250846001600160a01b031661372e565b61325c575060016126ed565b6060613382630a85bd0160e11b6132716125d4565b88878760405160240180856001600160a01b03166001600160a01b03168152602001846001600160a01b03166001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156132ea5781810151838201526020016132d2565b50505050905090810190601f1680156133175780820380516001836020036101000a031916815260200191505b5095505050505050604051602081830303815290604052906001600160e01b0319166020820180516001600160e01b038381831617835250505050604051806060016040528060328152602001613ac6603291396001600160a01b038816919063ffffffff61373416565b9050600081806020019051602081101561339b57600080fd5b50516001600160e01b031916630a85bd0160e11b1492505050949350505050565b610f2e838383613743565b6000818152600183016020526040812054801561348357835460001980830191908101906000908790839081106133fa57fe5b906000526020600020015490508087600001848154811061341757fe5b60009182526020808320909101929092558281526001898101909252604090209084019055865487908061344757fe5b600190038181906000526020600020016000905590558660010160008781526020019081526020016000206000905560019450505050506110e0565b60009150506110e0565b600061349983836131d2565b6134cf575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556110e0565b5060006110e0565b60008281526001840160205260408120548061353c575050604080518082018252838152602080820184815286546001818101895560008981528481209551600290930290950191825591519082015586548684528188019092529290912055612ae2565b8285600001600183038154811061354f57fe5b9060005260206000209060020201600101819055506000915050612ae2565b6000818152600183016020526040812054801561348357835460001980830191908101906000908790839081106135a157fe5b90600052602060002090600202019050808760000184815481106135c157fe5b60009182526020808320845460029093020191825560019384015491840191909155835482528983019052604090209084019055865487908061360057fe5b60008281526020808220600260001990940193840201828155600190810183905592909355888152898201909252604082209190915594506110e09350505050565b606060005b600a81101561372857601081600a811061365d57fe5b601091828204019190066002029054906101000a900461ffff1661ffff16831161372057601181600a811061368e57fe5b01805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156137135780601f106136e857610100808354040283529160200191613713565b820191906000526020600020905b8154815290600101906020018083116136f657829003601f168201915b5050505050915050610d5a565b600101613647565b50919050565b3b151590565b6060612adf8484600085613792565b61374e838383610f2e565b6137566112d2565b15610f2e5760405162461bcd60e51b815260040180806020018281038252602b815260200180613a6c602b913960400191505060405180910390fd5b6060824710156137d35760405162461bcd60e51b8152600401808060200182810382526026815260200180613bd56026913960400191505060405180910390fd5b6137dc8561372e565b61382d576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b6020831061386c5780518252601f19909201916020918201910161384d565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146138ce576040519150601f19603f3d011682016040523d82523d6000602084013e6138d3565b606091505b50915091506138e38282866138ee565b979650505050505050565b606083156138fd575081612ae2565b82511561390d5782518084602001fd5b60405162461bcd60e51b815260206004820181815284516024840152845185939192839260440191908501908083836000831561310e5781810151838201526020016130f6565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061399557805160ff19168380011785556139c2565b828001600101855582156139c2579182015b828111156139c25782518255916020019190600101906139a7565b50611b14929150613a2f565b60405180606001604052806060815260200160008152602001600081525090565b50805460018160011615610100020316600290046000825580601f10613a1557506112b3565b601f0160209004906000526020600020908101906112b391905b610df391905b80821115611b145760008155600101613a3556fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e64734552433732315061757361626c653a20746f6b656e207472616e73666572207768696c6520706175736564416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e744552433732313a207472616e7366657220746f206e6f6e20455243373231526563656976657220696d706c656d656e7465724f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373516d5764316d6e374475477978394279664e6571437367645355734a5a316372616769746761796773714476456d4765726d696e6174696f6e2073746172747320323032312d30342d31325431363a30303a30305a4552433732315072657365744d696e7465725061757365724175746f49643a206d75737420686176652070617573657220726f6c6520746f2070617573654552433732313a207472616e7366657220746f20746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c4f6e6c7920746865204f776e65722063616e20776174657220612043727970744f72636869642e4552433732313a206f70657261746f7220717565727920666f72206e6f6e6578697374656e7420746f6b656e416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b654552433732313a20617070726f76652063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f76656420666f7220616c6c4552433732313a2062616c616e636520717565727920666f7220746865207a65726f20616464726573734552433732313a206f776e657220717565727920666f72206e6f6e6578697374656e7420746f6b656e45746865722076616c75652073656e742069732062656c6f7720746865207072696365456e756d657261626c654d61703a20696e646578206f7574206f6620626f756e6473536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774552433732313a20617070726f76656420717565727920666f72206e6f6e6578697374656e7420746f6b656e4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65724552433732313a207472616e73666572206f6620746f6b656e2074686174206973206e6f74206f776e596f752063616e20706c616e74206d696e696d756d20312c206d6178696d756d2032302043727970744f7263686964734552433732313a20617070726f76616c20746f2063757272656e74206f776e6572446561642043727970744f7263686964732063616e6e6f74206265207472616e736665727265644552433732313a207472616e736665722063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f7665644f6e6c7920746865204f776e65722063616e206765726d696e61746520612043727970744f72636869642e4552433732315072657365744d696e7465725061757365724175746f49643a206d7573742068617665206d696e74657220726f6c6520746f206d696e744552433732314275726e61626c653a2063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f7665644552433732315072657365744d696e7465725061757365724175746f49643a206d75737420686176652070617573657220726f6c6520746f20756e7061757365416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220669084c037e9e2730b31d45e8cd7d87fcb21b2d1237df1dee094b97b3922927264736f6c63430006060033516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f637970726970656469756d2d63616c63656f6c75732e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f64656e64726f7068796c61782d6c696e64656e69692e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f70617068696f706564696c756d2d726f7468736368696c6469616e756d2e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f706c6174616e74686572612d617a6f726963612e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f637970726970656469756d2d63616c63656f6c75732e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f7068616c61656e6f707369732d6d6963686f6c69747a69692e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f76616e64612d636f6572756c65612e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f6d696c746f6e69612d6b61796173696d61652e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f70617068696f706564696c756d2d766965746e616d656e73652e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f6775617269616e7468652d617572616e74696163612e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f7368656e7a68656e6963612d6f726368696461636561652e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f6d696c746f6e69612d6b61796173696d61652e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f76616e64612d636f6572756c65612e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f70617068696f706564696c756d2d726f7468736368696c6469616e756d2e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f6775617269616e7468652d617572616e74696163612e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f70617068696f706564696c756d2d766965746e616d656e73652e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f64656e64726f7068796c61782d6c696e64656e69692e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f7068616c61656e6f707369732d6d6963686f6c69747a69692e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f7368656e7a68656e6963612d6f726368696461636561652e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f706c6174616e74686572612d617a6f726963612e6a736f6e", + "r": "0xb64534e81219df3b0b8562afe43d8be769b9f4c6edd9f0061655652d1dc623a1", + "s": "0x60b91e2ce4c847ce7c1b0794f4002c76feef4e06fa8950ef5e2536f00f63b633", + "v": 46, + "chainId": 5 + } + } +} \ No newline at end of file diff --git a/deployments/goerli/CryptOrchidGoerli.json b/deployments/goerli/CryptOrchidGoerli.json new file mode 100644 index 0000000..6f9f67c --- /dev/null +++ b/deployments/goerli/CryptOrchidGoerli.json @@ -0,0 +1,1748 @@ +{ + "address": "0xb3EA7Cbb180d834c279B06873b6A971CCe701468", + "abi": [ + { + "inputs": [], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": 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": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "GROWTH_CYCLE", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_CRYPTORCHIDS", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MINTER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PAUSER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "WATERING_WINDOW", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "alive", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "baseURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "cryptorchids", + "outputs": [ + { + "internalType": "string", + "name": "species", + "type": "string" + }, + { + "internalType": "uint256", + "name": "plantedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "waterLevel", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "currentPrice", + "outputs": [ + { + "internalType": "uint256", + "name": "price", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "flowering", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "userProvidedSeed", + "type": "uint256" + } + ], + "name": "germinate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "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": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getTokenMetadata", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "enum CryptOrchidGoerli.Stage", + "name": "", + "type": "uint8" + } + ], + "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": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "growthStage", + "outputs": [ + { + "internalType": "enum CryptOrchidGoerli.Stage", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "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": [], + "name": "renounceOwnership", + "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": "", + "type": "bytes32" + } + ], + "name": "requestToToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "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": "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": [], + "name": "startGrowing", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "startSale", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "tokenByIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "tokenOfOwnerByIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "water", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "units", + "type": "uint256" + } + ], + "name": "webMint", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0xea9e7ecf0f57a3d03ba99b773ca4e44355e04dd7d072c3412612da53e7452a0f", + "receipt": { + "to": null, + "from": "0x0090720FeD7Fed66eD658118b7B3BB0189D3A495", + "contractAddress": "0xb3EA7Cbb180d834c279B06873b6A971CCe701468", + "transactionIndex": 0, + "gasUsed": "7888628", + "logsBloom": "0x00000004000000000000000000000000000000000000000000800000000000000000000000000000000000000000004000000000000001000000000000000000000000000000008000000000000000000001000000000000800000000000000000000000020000000000000000000800000000000000000000000000001002410000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000001000000000000100002000000020000000000000002000000000000000000000000400000000000000000000000000", + "blockHash": "0x4993115a760fe73fab99319c868ad486a93da2fbc90d6ee339259a8045debcc0", + "transactionHash": "0xea9e7ecf0f57a3d03ba99b773ca4e44355e04dd7d072c3412612da53e7452a0f", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 4865914, + "transactionHash": "0xea9e7ecf0f57a3d03ba99b773ca4e44355e04dd7d072c3412612da53e7452a0f", + "address": "0xb3EA7Cbb180d834c279B06873b6A971CCe701468", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000090720fed7fed66ed658118b7b3bb0189d3a495", + "0x0000000000000000000000000090720fed7fed66ed658118b7b3bb0189d3a495" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x4993115a760fe73fab99319c868ad486a93da2fbc90d6ee339259a8045debcc0" + }, + { + "transactionIndex": 0, + "blockNumber": 4865914, + "transactionHash": "0xea9e7ecf0f57a3d03ba99b773ca4e44355e04dd7d072c3412612da53e7452a0f", + "address": "0xb3EA7Cbb180d834c279B06873b6A971CCe701468", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6", + "0x0000000000000000000000000090720fed7fed66ed658118b7b3bb0189d3a495", + "0x0000000000000000000000000090720fed7fed66ed658118b7b3bb0189d3a495" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x4993115a760fe73fab99319c868ad486a93da2fbc90d6ee339259a8045debcc0" + }, + { + "transactionIndex": 0, + "blockNumber": 4865914, + "transactionHash": "0xea9e7ecf0f57a3d03ba99b773ca4e44355e04dd7d072c3412612da53e7452a0f", + "address": "0xb3EA7Cbb180d834c279B06873b6A971CCe701468", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a", + "0x0000000000000000000000000090720fed7fed66ed658118b7b3bb0189d3a495", + "0x0000000000000000000000000090720fed7fed66ed658118b7b3bb0189d3a495" + ], + "data": "0x", + "logIndex": 2, + "blockHash": "0x4993115a760fe73fab99319c868ad486a93da2fbc90d6ee339259a8045debcc0" + }, + { + "transactionIndex": 0, + "blockNumber": 4865914, + "transactionHash": "0xea9e7ecf0f57a3d03ba99b773ca4e44355e04dd7d072c3412612da53e7452a0f", + "address": "0xb3EA7Cbb180d834c279B06873b6A971CCe701468", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000090720fed7fed66ed658118b7b3bb0189d3a495" + ], + "data": "0x", + "logIndex": 3, + "blockHash": "0x4993115a760fe73fab99319c868ad486a93da2fbc90d6ee339259a8045debcc0" + } + ], + "blockNumber": 4865914, + "cumulativeGasUsed": "7888628", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "4f9b70493defebe2f15081e93e9ddfbb", + "metadata": "{\"compiler\":{\"version\":\"0.6.6+commit.6c089d02\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"approved\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":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\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GROWTH_CYCLE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_CRYPTORCHIDS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINTER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PAUSER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WATERING_WINDOW\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"alive\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"baseURI\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"cryptorchids\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"species\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"plantedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"waterLevel\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"price\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"flowering\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"userProvidedSeed\",\"type\":\"uint256\"}],\"name\":\"germinate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getApproved\",\"outputs\":[{\"internalType\":\"address\",\"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\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getTokenMetadata\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"enum CryptOrchidGoerli.Stage\",\"name\":\"\",\"type\":\"uint8\"}],\"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\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"growthStage\",\"outputs\":[{\"internalType\":\"enum CryptOrchidGoerli.Stage\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"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\":[],\"name\":\"renounceOwnership\",\"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\":\"\",\"type\":\"bytes32\"}],\"name\":\"requestToToken\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"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\":\"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\":[],\"name\":\"startGrowing\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startSale\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"tokenByIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"tokenOfOwnerByIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"tokenURI\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"water\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"units\",\"type\":\"uint256\"}],\"name\":\"webMint\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"methods\":{\"approve(address,uint256)\":{\"details\":\"See {IERC721-approve}.\"},\"balanceOf(address)\":{\"details\":\"See {IERC721-balanceOf}.\"},\"baseURI()\":{\"details\":\"Returns the base URI set via {_setBaseURI}. This will be automatically added as a prefix in {tokenURI} to each token's URI, or to the token ID if no specific URI is set for that token ID.\"},\"burn(uint256)\":{\"details\":\"Burns `tokenId`. See {ERC721-_burn}. * Requirements: * - The caller must own `tokenId` or be an approved operator.\"},\"getApproved(uint256)\":{\"details\":\"See {IERC721-getApproved}.\"},\"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.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"isApprovedForAll(address,address)\":{\"details\":\"See {IERC721-isApprovedForAll}.\"},\"mint(address)\":{\"details\":\"Creates a new token for `to`. Its token ID will be automatically assigned (and available on the emitted {IERC721-Transfer} event), and the token URI autogenerated based on the base URI passed at construction. * See {ERC721-_mint}. * Requirements: * - the caller must have the `MINTER_ROLE`.\"},\"name()\":{\"details\":\"See {IERC721Metadata-name}.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"ownerOf(uint256)\":{\"details\":\"See {IERC721-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.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. * NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"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 granted `role`, emits a {RoleRevoked} event. * Requirements: * - the caller must be `account`.\"},\"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.\"},\"safeTransferFrom(address,address,uint256)\":{\"details\":\"See {IERC721-safeTransferFrom}.\"},\"safeTransferFrom(address,address,uint256,bytes)\":{\"details\":\"See {IERC721-safeTransferFrom}.\"},\"setApprovalForAll(address,bool)\":{\"details\":\"See {IERC721-setApprovalForAll}.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}. * Time complexity O(1), guaranteed to always use less than 30 000 gas.\"},\"symbol()\":{\"details\":\"See {IERC721Metadata-symbol}.\"},\"tokenByIndex(uint256)\":{\"details\":\"See {IERC721Enumerable-tokenByIndex}.\"},\"tokenOfOwnerByIndex(address,uint256)\":{\"details\":\"See {IERC721Enumerable-tokenOfOwnerByIndex}.\"},\"totalSupply()\":{\"details\":\"See {IERC721Enumerable-totalSupply}.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC721-transferFrom}.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"unpause()\":{\"details\":\"Unpauses all token transfers. * See {ERC721Pausable} and {Pausable-_unpause}. * Requirements: * - the caller must have the `PAUSER_ROLE`.\"},\"withdraw()\":{\"details\":\"Withdraw ether from this contract (Callable by owner only)\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol\":\"CryptOrchidGoerli\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/AccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../utils/EnumerableSet.sol\\\";\\nimport \\\"../utils/Address.sol\\\";\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms.\\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 * ```\\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 * ```\\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.\\n */\\nabstract contract AccessControl is Context {\\n using EnumerableSet for EnumerableSet.AddressSet;\\n using Address for address;\\n\\n struct RoleData {\\n EnumerableSet.AddressSet 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 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 {_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) public view returns (bool) {\\n return _roles[role].members.contains(account);\\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 returns (uint256) {\\n return _roles[role].members.length();\\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 returns (address) {\\n return _roles[role].members.at(index);\\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 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 function grantRole(bytes32 role, address account) public virtual {\\n require(hasRole(_roles[role].adminRole, _msgSender()), \\\"AccessControl: sender must be an admin to grant\\\");\\n\\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 function revokeRole(bytes32 role, address account) public virtual {\\n require(hasRole(_roles[role].adminRole, _msgSender()), \\\"AccessControl: sender must be an admin to revoke\\\");\\n\\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 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) public virtual {\\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 * [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 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 emit RoleAdminChanged(role, _roles[role].adminRole, adminRole);\\n _roles[role].adminRole = adminRole;\\n }\\n\\n function _grantRole(bytes32 role, address account) private {\\n if (_roles[role].members.add(account)) {\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (_roles[role].members.remove(account)) {\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n}\\n\",\"keccak256\":\"0x4fc155a2f7837603d69a13cfa481eb5e7f5e02cb77e2ec9edbac30986db37988\"},\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor () internal {\\n address msgSender = _msgSender();\\n _owner = msgSender;\\n emit OwnershipTransferred(address(0), msgSender);\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n emit OwnershipTransferred(_owner, address(0));\\n _owner = address(0);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n emit OwnershipTransferred(_owner, newOwner);\\n _owner = newOwner;\\n }\\n}\\n\",\"keccak256\":\"0x15e2d5bd4c28a88548074c54d220e8086f638a71ed07e6b3ba5a70066fcf458d\"},\"@openzeppelin/contracts/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts may inherit from this and call {_registerInterface} to declare\\n * their support of an interface.\\n */\\nabstract contract ERC165 is IERC165 {\\n /*\\n * bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7\\n */\\n bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7;\\n\\n /**\\n * @dev Mapping of interface ids to whether or not it's supported.\\n */\\n mapping(bytes4 => bool) private _supportedInterfaces;\\n\\n constructor () internal {\\n // Derived contracts need only register support for their own interfaces,\\n // we register support for ERC165 itself here\\n _registerInterface(_INTERFACE_ID_ERC165);\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n *\\n * Time complexity O(1), guaranteed to always use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return _supportedInterfaces[interfaceId];\\n }\\n\\n /**\\n * @dev Registers the contract as an implementer of the interface defined by\\n * `interfaceId`. Support of the actual ERC165 interface is automatic and\\n * registering its interface id is not required.\\n *\\n * See {IERC165-supportsInterface}.\\n *\\n * Requirements:\\n *\\n * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`).\\n */\\n function _registerInterface(bytes4 interfaceId) internal virtual {\\n require(interfaceId != 0xffffffff, \\\"ERC165: invalid interface id\\\");\\n _supportedInterfaces[interfaceId] = true;\\n }\\n}\\n\",\"keccak256\":\"0x24141d2f6b98d4cb77a8936eae8cbaad2e261d9062bdc08036096f4550092501\"},\"@openzeppelin/contracts/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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\":\"0xf70bc25d981e4ec9673a995ad2995d5d493ea188d3d8f388bba9c227ce09fb82\"},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\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 uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction 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 if (b > a) return (false, 0);\\n return (true, a - b);\\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 // 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 * @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 if (b == 0) return (false, 0);\\n return (true, a / b);\\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 if (b == 0) return (false, 0);\\n return (true, a % b);\\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 uint256 c = a + b;\\n require(c >= a, \\\"SafeMath: addition overflow\\\");\\n return c;\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\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 if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\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. 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) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\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 require(b > 0, \\\"SafeMath: modulo by zero\\\");\\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 require(b <= a, errorMessage);\\n return a - b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\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 require(b > 0, errorMessage);\\n return a / b;\\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 require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\"},\"@openzeppelin/contracts/presets/ERC721PresetMinterPauserAutoId.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../access/AccessControl.sol\\\";\\nimport \\\"../utils/Context.sol\\\";\\nimport \\\"../utils/Counters.sol\\\";\\nimport \\\"../token/ERC721/ERC721.sol\\\";\\nimport \\\"../token/ERC721/ERC721Burnable.sol\\\";\\nimport \\\"../token/ERC721/ERC721Pausable.sol\\\";\\n\\n/**\\n * @dev {ERC721} token, including:\\n *\\n * - ability for holders to burn (destroy) their tokens\\n * - a minter role that allows for token minting (creation)\\n * - a pauser role that allows to stop all token transfers\\n * - token ID and URI autogeneration\\n *\\n * This contract uses {AccessControl} to lock permissioned functions using the\\n * different roles - head to its documentation for details.\\n *\\n * The account that deploys the contract will be granted the minter and pauser\\n * roles, as well as the default admin role, which will let it grant both minter\\n * and pauser roles to other accounts.\\n */\\ncontract ERC721PresetMinterPauserAutoId is Context, AccessControl, ERC721Burnable, ERC721Pausable {\\n using Counters for Counters.Counter;\\n\\n bytes32 public constant MINTER_ROLE = keccak256(\\\"MINTER_ROLE\\\");\\n bytes32 public constant PAUSER_ROLE = keccak256(\\\"PAUSER_ROLE\\\");\\n\\n Counters.Counter private _tokenIdTracker;\\n\\n /**\\n * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE` and `PAUSER_ROLE` to the\\n * account that deploys the contract.\\n *\\n * Token URIs will be autogenerated based on `baseURI` and their token IDs.\\n * See {ERC721-tokenURI}.\\n */\\n constructor(string memory name, string memory symbol, string memory baseURI) public ERC721(name, symbol) {\\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\\n\\n _setupRole(MINTER_ROLE, _msgSender());\\n _setupRole(PAUSER_ROLE, _msgSender());\\n\\n _setBaseURI(baseURI);\\n }\\n\\n /**\\n * @dev Creates a new token for `to`. Its token ID will be automatically\\n * assigned (and available on the emitted {IERC721-Transfer} event), and the token\\n * URI autogenerated based on the base URI passed at construction.\\n *\\n * See {ERC721-_mint}.\\n *\\n * Requirements:\\n *\\n * - the caller must have the `MINTER_ROLE`.\\n */\\n function mint(address to) public virtual {\\n require(hasRole(MINTER_ROLE, _msgSender()), \\\"ERC721PresetMinterPauserAutoId: must have minter role to mint\\\");\\n\\n // We cannot just use balanceOf to create the new tokenId because tokens\\n // can be burned (destroyed), so we need a separate counter.\\n _mint(to, _tokenIdTracker.current());\\n _tokenIdTracker.increment();\\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() public virtual {\\n require(hasRole(PAUSER_ROLE, _msgSender()), \\\"ERC721PresetMinterPauserAutoId: must have pauser role to pause\\\");\\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() public virtual {\\n require(hasRole(PAUSER_ROLE, _msgSender()), \\\"ERC721PresetMinterPauserAutoId: must have pauser role to unpause\\\");\\n _unpause();\\n }\\n\\n function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override(ERC721, ERC721Pausable) {\\n super._beforeTokenTransfer(from, to, tokenId);\\n }\\n}\\n\",\"keccak256\":\"0x4b87b14833eeb61239208c31ea10bd73fdcd49a693c87f038b9429871f82a412\"},\"@openzeppelin/contracts/token/ERC721/ERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC721.sol\\\";\\nimport \\\"./IERC721Metadata.sol\\\";\\nimport \\\"./IERC721Enumerable.sol\\\";\\nimport \\\"./IERC721Receiver.sol\\\";\\nimport \\\"../../introspection/ERC165.sol\\\";\\nimport \\\"../../math/SafeMath.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/EnumerableSet.sol\\\";\\nimport \\\"../../utils/EnumerableMap.sol\\\";\\nimport \\\"../../utils/Strings.sol\\\";\\n\\n/**\\n * @title ERC721 Non-Fungible Token Standard basic implementation\\n * @dev see https://eips.ethereum.org/EIPS/eip-721\\n */\\ncontract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {\\n using SafeMath for uint256;\\n using Address for address;\\n using EnumerableSet for EnumerableSet.UintSet;\\n using EnumerableMap for EnumerableMap.UintToAddressMap;\\n using Strings for uint256;\\n\\n // Equals to `bytes4(keccak256(\\\"onERC721Received(address,address,uint256,bytes)\\\"))`\\n // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector`\\n bytes4 private constant _ERC721_RECEIVED = 0x150b7a02;\\n\\n // Mapping from holder address to their (enumerable) set of owned tokens\\n mapping (address => EnumerableSet.UintSet) private _holderTokens;\\n\\n // Enumerable mapping from token ids to their owners\\n EnumerableMap.UintToAddressMap private _tokenOwners;\\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 // Token name\\n string private _name;\\n\\n // Token symbol\\n string private _symbol;\\n\\n // Optional mapping for token URIs\\n mapping (uint256 => string) private _tokenURIs;\\n\\n // Base URI\\n string private _baseURI;\\n\\n /*\\n * bytes4(keccak256('balanceOf(address)')) == 0x70a08231\\n * bytes4(keccak256('ownerOf(uint256)')) == 0x6352211e\\n * bytes4(keccak256('approve(address,uint256)')) == 0x095ea7b3\\n * bytes4(keccak256('getApproved(uint256)')) == 0x081812fc\\n * bytes4(keccak256('setApprovalForAll(address,bool)')) == 0xa22cb465\\n * bytes4(keccak256('isApprovedForAll(address,address)')) == 0xe985e9c5\\n * bytes4(keccak256('transferFrom(address,address,uint256)')) == 0x23b872dd\\n * bytes4(keccak256('safeTransferFrom(address,address,uint256)')) == 0x42842e0e\\n * bytes4(keccak256('safeTransferFrom(address,address,uint256,bytes)')) == 0xb88d4fde\\n *\\n * => 0x70a08231 ^ 0x6352211e ^ 0x095ea7b3 ^ 0x081812fc ^\\n * 0xa22cb465 ^ 0xe985e9c5 ^ 0x23b872dd ^ 0x42842e0e ^ 0xb88d4fde == 0x80ac58cd\\n */\\n bytes4 private constant _INTERFACE_ID_ERC721 = 0x80ac58cd;\\n\\n /*\\n * bytes4(keccak256('name()')) == 0x06fdde03\\n * bytes4(keccak256('symbol()')) == 0x95d89b41\\n * bytes4(keccak256('tokenURI(uint256)')) == 0xc87b56dd\\n *\\n * => 0x06fdde03 ^ 0x95d89b41 ^ 0xc87b56dd == 0x5b5e139f\\n */\\n bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x5b5e139f;\\n\\n /*\\n * bytes4(keccak256('totalSupply()')) == 0x18160ddd\\n * bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) == 0x2f745c59\\n * bytes4(keccak256('tokenByIndex(uint256)')) == 0x4f6ccce7\\n *\\n * => 0x18160ddd ^ 0x2f745c59 ^ 0x4f6ccce7 == 0x780e9d63\\n */\\n bytes4 private constant _INTERFACE_ID_ERC721_ENUMERABLE = 0x780e9d63;\\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_) public {\\n _name = name_;\\n _symbol = symbol_;\\n\\n // register the supported interfaces to conform to ERC721 via ERC165\\n _registerInterface(_INTERFACE_ID_ERC721);\\n _registerInterface(_INTERFACE_ID_ERC721_METADATA);\\n _registerInterface(_INTERFACE_ID_ERC721_ENUMERABLE);\\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: balance query for the zero address\\\");\\n return _holderTokens[owner].length();\\n }\\n\\n /**\\n * @dev See {IERC721-ownerOf}.\\n */\\n function ownerOf(uint256 tokenId) public view virtual override returns (address) {\\n return _tokenOwners.get(tokenId, \\\"ERC721: owner query for nonexistent token\\\");\\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 require(_exists(tokenId), \\\"ERC721Metadata: URI query for nonexistent token\\\");\\n\\n string memory _tokenURI = _tokenURIs[tokenId];\\n string memory base = baseURI();\\n\\n // If there is no base URI, return the token URI.\\n if (bytes(base).length == 0) {\\n return _tokenURI;\\n }\\n // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked).\\n if (bytes(_tokenURI).length > 0) {\\n return string(abi.encodePacked(base, _tokenURI));\\n }\\n // If there is a baseURI but no tokenURI, concatenate the tokenID to the baseURI.\\n return string(abi.encodePacked(base, tokenId.toString()));\\n }\\n\\n /**\\n * @dev Returns the base URI set via {_setBaseURI}. This will be\\n * automatically added as a prefix in {tokenURI} to each token's URI, or\\n * to the token ID if no specific URI is set for that token ID.\\n */\\n function baseURI() public view virtual returns (string memory) {\\n return _baseURI;\\n }\\n\\n /**\\n * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.\\n */\\n function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {\\n return _holderTokens[owner].at(index);\\n }\\n\\n /**\\n * @dev See {IERC721Enumerable-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n // _tokenOwners are indexed by tokenIds, so .length() returns the number of tokenIds\\n return _tokenOwners.length();\\n }\\n\\n /**\\n * @dev See {IERC721Enumerable-tokenByIndex}.\\n */\\n function tokenByIndex(uint256 index) public view virtual override returns (uint256) {\\n (uint256 tokenId, ) = _tokenOwners.at(index);\\n return tokenId;\\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(_msgSender() == owner || ERC721.isApprovedForAll(owner, _msgSender()),\\n \\\"ERC721: approve caller is not owner nor 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 require(_exists(tokenId), \\\"ERC721: approved query for nonexistent token\\\");\\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 require(operator != _msgSender(), \\\"ERC721: approve to caller\\\");\\n\\n _operatorApprovals[_msgSender()][operator] = approved;\\n emit ApprovalForAll(_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: transfer caller is not owner nor 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: transfer caller is not owner nor 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 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 _tokenOwners.contains(tokenId);\\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 require(_exists(tokenId), \\\"ERC721: operator query for nonexistent token\\\");\\n address owner = ERC721.ownerOf(tokenId);\\n return (spender == owner || getApproved(tokenId) == spender || ERC721.isApprovedForAll(owner, spender));\\n }\\n\\n /**\\n * @dev Safely mints `tokenId` and transfers it to `to`.\\n *\\n * Requirements:\\n d*\\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(_checkOnERC721Received(address(0), to, tokenId, _data), \\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\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);\\n\\n _holderTokens[to].add(tokenId);\\n\\n _tokenOwners.set(tokenId, to);\\n\\n emit Transfer(address(0), to, tokenId);\\n }\\n\\n /**\\n * @dev Destroys `tokenId`.\\n * The approval is cleared when the token is burned.\\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); // internal owner\\n\\n _beforeTokenTransfer(owner, address(0), tokenId);\\n\\n // Clear approvals\\n _approve(address(0), tokenId);\\n\\n // Clear metadata (if any)\\n if (bytes(_tokenURIs[tokenId]).length != 0) {\\n delete _tokenURIs[tokenId];\\n }\\n\\n _holderTokens[owner].remove(tokenId);\\n\\n _tokenOwners.remove(tokenId);\\n\\n emit Transfer(owner, address(0), tokenId);\\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 of token that is not own\\\"); // internal owner\\n require(to != address(0), \\\"ERC721: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, tokenId);\\n\\n // Clear approvals from the previous owner\\n _approve(address(0), tokenId);\\n\\n _holderTokens[from].remove(tokenId);\\n _holderTokens[to].add(tokenId);\\n\\n _tokenOwners.set(tokenId, to);\\n\\n emit Transfer(from, to, tokenId);\\n }\\n\\n /**\\n * @dev Sets `_tokenURI` as the tokenURI of `tokenId`.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual {\\n require(_exists(tokenId), \\\"ERC721Metadata: URI set of nonexistent token\\\");\\n _tokenURIs[tokenId] = _tokenURI;\\n }\\n\\n /**\\n * @dev Internal function to set the base URI for all token IDs. It is\\n * automatically added as a prefix to the value returned in {tokenURI},\\n * or to the token ID if {tokenURI} is empty.\\n */\\n function _setBaseURI(string memory baseURI_) internal virtual {\\n _baseURI = baseURI_;\\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(address from, address to, uint256 tokenId, bytes memory _data)\\n private returns (bool)\\n {\\n if (!to.isContract()) {\\n return true;\\n }\\n bytes memory returndata = to.functionCall(abi.encodeWithSelector(\\n IERC721Receiver(to).onERC721Received.selector,\\n _msgSender(),\\n from,\\n tokenId,\\n _data\\n ), \\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n bytes4 retval = abi.decode(returndata, (bytes4));\\n return (retval == _ERC721_RECEIVED);\\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); // internal owner\\n }\\n\\n /**\\n * @dev Hook that is called before any token transfer. This includes minting\\n * and burning.\\n *\\n * Calling conditions:\\n *\\n * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be\\n * transferred to `to`.\\n * - When `from` is zero, `tokenId` will be minted for `to`.\\n * - When `to` is zero, ``from``'s `tokenId` will be burned.\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\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 tokenId) internal virtual { }\\n}\\n\",\"keccak256\":\"0x118ed7540f56b21ff92e21ebaa73584048e98d2ac04ca67571329bb8dbd9032f\"},\"@openzeppelin/contracts/token/ERC721/ERC721Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./ERC721.sol\\\";\\n\\n/**\\n * @title ERC721 Burnable Token\\n * @dev ERC721 Token that can be irreversibly 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), \\\"ERC721Burnable: caller is not owner nor approved\\\");\\n _burn(tokenId);\\n }\\n}\\n\",\"keccak256\":\"0x060925a04766df64ac29f56aaa3a38aafd71424ba4d996ca0f14363828b97056\"},\"@openzeppelin/contracts/token/ERC721/ERC721Pausable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./ERC721.sol\\\";\\nimport \\\"../../utils/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 */\\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(address from, address to, uint256 tokenId) internal virtual override {\\n super._beforeTokenTransfer(from, to, tokenId);\\n\\n require(!paused(), \\\"ERC721Pausable: token transfer while paused\\\");\\n }\\n}\\n\",\"keccak256\":\"0x1c31a4c2ad1af9e25cd8f4ea941ebd6a6a932426183ab39c160cb8e51cfc704f\"},\"@openzeppelin/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\nimport \\\"../../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`, 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 be 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: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\\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 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 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 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 /**\\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\",\"keccak256\":\"0x2d99a0deb6648c34fbc66d6ac4a2d64798d7a5321b45624f6736fadc63da1962\"},\"@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <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 /**\\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 tokenId);\\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\":\"0xe6bd1b1218338b6f9fe17776f48623b4ac3d8a40405f74a44bc23c00abe2ca13\"},\"@openzeppelin/contracts/token/ERC721/IERC721Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <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 /**\\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\":\"0xccb917776f826ac6b68bd5a15a5f711e3967848a52ba11e6104d9a4f593314a7\"},\"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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 `IERC721.onERC721Received.selector`.\\n */\\n function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0x52146049d6709c870e8ddcd988b5155cb6c5d640cfcd8978aee52bc1ba2ec4eb\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\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 */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n // solhint-disable-next-line no-inline-assembly\\n assembly { size := extcodesize(account) }\\n return size > 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://diligence.consensys.net/posts/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.5.11/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 // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\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 functionCall(target, data, \\\"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(address target, bytes memory data, string memory errorMessage) 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(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.call{ value: value }(data);\\n return _verifyCallResult(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(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(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(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\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\\n // solhint-disable-next-line no-inline-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}\\n\",\"keccak256\":\"0x28911e614500ae7c607a432a709d35da25f3bc5ddc8bd12b278b66358070c0ea\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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 GSN 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 payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\"},\"@openzeppelin/contracts/utils/Counters.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../math/SafeMath.sol\\\";\\n\\n/**\\n * @title Counters\\n * @author Matt Condon (@shrugs)\\n * @dev Provides counters that can only be incremented or decremented by one. This can be used e.g. to track the number\\n * of elements in a mapping, issuing ERC721 ids, or counting request ids.\\n *\\n * Include with `using Counters for Counters.Counter;`\\n * Since it is not possible to overflow a 256 bit integer with increments of one, `increment` can skip the {SafeMath}\\n * overflow check, thereby saving gas. This does assume however correct usage, in that the underlying `_value` is never\\n * directly accessed.\\n */\\nlibrary Counters {\\n using SafeMath for uint256;\\n\\n struct Counter {\\n // This variable should never be directly accessed by users of the library: interactions must be restricted to\\n // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\\n // this feature: see https://github.com/ethereum/solidity/issues/4637\\n uint256 _value; // default: 0\\n }\\n\\n function current(Counter storage counter) internal view returns (uint256) {\\n return counter._value;\\n }\\n\\n function increment(Counter storage counter) internal {\\n // The {SafeMath} overflow check can be skipped here, see the comment at the top\\n counter._value += 1;\\n }\\n\\n function decrement(Counter storage counter) internal {\\n counter._value = counter._value.sub(1);\\n }\\n}\\n\",\"keccak256\":\"0x21662e4254ce4ac8570b30cc7ab31435966b3cb778a56ba4d09276881cfb2437\"},\"@openzeppelin/contracts/utils/EnumerableMap.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Library for managing an enumerable variant of Solidity's\\n * https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]\\n * type.\\n *\\n * Maps have the following properties:\\n *\\n * - Entries are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Entries are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableMap for EnumerableMap.UintToAddressMap;\\n *\\n * // Declare a set state variable\\n * EnumerableMap.UintToAddressMap private myMap;\\n * }\\n * ```\\n *\\n * As of v3.0.0, only maps of type `uint256 -> address` (`UintToAddressMap`) are\\n * supported.\\n */\\nlibrary EnumerableMap {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Map type with\\n // bytes32 keys and values.\\n // The Map implementation uses private functions, and user-facing\\n // implementations (such as Uint256ToAddressMap) are just wrappers around\\n // the underlying Map.\\n // This means that we can only create new EnumerableMaps for types that fit\\n // in bytes32.\\n\\n struct MapEntry {\\n bytes32 _key;\\n bytes32 _value;\\n }\\n\\n struct Map {\\n // Storage of map keys and values\\n MapEntry[] _entries;\\n\\n // Position of the entry defined by a key in the `entries` array, plus 1\\n // because index 0 means a key is not in the map.\\n mapping (bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Adds a key-value pair to a map, or updates the value for an existing\\n * key. O(1).\\n *\\n * Returns true if the key was added to the map, that is if it was not\\n * already present.\\n */\\n function _set(Map storage map, bytes32 key, bytes32 value) private returns (bool) {\\n // We read and store the key's index to prevent multiple reads from the same storage slot\\n uint256 keyIndex = map._indexes[key];\\n\\n if (keyIndex == 0) { // Equivalent to !contains(map, key)\\n map._entries.push(MapEntry({ _key: key, _value: value }));\\n // The entry is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n map._indexes[key] = map._entries.length;\\n return true;\\n } else {\\n map._entries[keyIndex - 1]._value = value;\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a key-value pair from a map. O(1).\\n *\\n * Returns true if the key was removed from the map, that is if it was present.\\n */\\n function _remove(Map storage map, bytes32 key) private returns (bool) {\\n // We read and store the key's index to prevent multiple reads from the same storage slot\\n uint256 keyIndex = map._indexes[key];\\n\\n if (keyIndex != 0) { // Equivalent to contains(map, key)\\n // To delete a key-value pair from the _entries array in O(1), we swap the entry to delete with the last one\\n // in the array, and then remove the last entry (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = keyIndex - 1;\\n uint256 lastIndex = map._entries.length - 1;\\n\\n // When the entry to delete is the last one, the swap operation is unnecessary. However, since this occurs\\n // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\\n\\n MapEntry storage lastEntry = map._entries[lastIndex];\\n\\n // Move the last entry to the index where the entry to delete is\\n map._entries[toDeleteIndex] = lastEntry;\\n // Update the index for the moved entry\\n map._indexes[lastEntry._key] = toDeleteIndex + 1; // All indexes are 1-based\\n\\n // Delete the slot where the moved entry was stored\\n map._entries.pop();\\n\\n // Delete the index for the deleted slot\\n delete map._indexes[key];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the key is in the map. O(1).\\n */\\n function _contains(Map storage map, bytes32 key) private view returns (bool) {\\n return map._indexes[key] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of key-value pairs in the map. O(1).\\n */\\n function _length(Map storage map) private view returns (uint256) {\\n return map._entries.length;\\n }\\n\\n /**\\n * @dev Returns the key-value pair stored at position `index` in the map. O(1).\\n *\\n * Note that there are no guarantees on the ordering of entries inside the\\n * array, and it may change when more entries are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Map storage map, uint256 index) private view returns (bytes32, bytes32) {\\n require(map._entries.length > index, \\\"EnumerableMap: index out of bounds\\\");\\n\\n MapEntry storage entry = map._entries[index];\\n return (entry._key, entry._value);\\n }\\n\\n /**\\n * @dev Tries to returns the value associated with `key`. O(1).\\n * Does not revert if `key` is not in the map.\\n */\\n function _tryGet(Map storage map, bytes32 key) private view returns (bool, bytes32) {\\n uint256 keyIndex = map._indexes[key];\\n if (keyIndex == 0) return (false, 0); // Equivalent to contains(map, key)\\n return (true, map._entries[keyIndex - 1]._value); // All indexes are 1-based\\n }\\n\\n /**\\n * @dev Returns the value associated with `key`. O(1).\\n *\\n * Requirements:\\n *\\n * - `key` must be in the map.\\n */\\n function _get(Map storage map, bytes32 key) private view returns (bytes32) {\\n uint256 keyIndex = map._indexes[key];\\n require(keyIndex != 0, \\\"EnumerableMap: nonexistent key\\\"); // Equivalent to contains(map, key)\\n return map._entries[keyIndex - 1]._value; // All indexes are 1-based\\n }\\n\\n /**\\n * @dev Same as {_get}, with a custom error message when `key` is not in the map.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {_tryGet}.\\n */\\n function _get(Map storage map, bytes32 key, string memory errorMessage) private view returns (bytes32) {\\n uint256 keyIndex = map._indexes[key];\\n require(keyIndex != 0, errorMessage); // Equivalent to contains(map, key)\\n return map._entries[keyIndex - 1]._value; // All indexes are 1-based\\n }\\n\\n // UintToAddressMap\\n\\n struct UintToAddressMap {\\n Map _inner;\\n }\\n\\n /**\\n * @dev Adds a key-value pair to a map, or updates the value for an existing\\n * key. O(1).\\n *\\n * Returns true if the key was added to the map, that is if it was not\\n * already present.\\n */\\n function set(UintToAddressMap storage map, uint256 key, address value) internal returns (bool) {\\n return _set(map._inner, bytes32(key), bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the key was removed from the map, that is if it was present.\\n */\\n function remove(UintToAddressMap storage map, uint256 key) internal returns (bool) {\\n return _remove(map._inner, bytes32(key));\\n }\\n\\n /**\\n * @dev Returns true if the key is in the map. O(1).\\n */\\n function contains(UintToAddressMap storage map, uint256 key) internal view returns (bool) {\\n return _contains(map._inner, bytes32(key));\\n }\\n\\n /**\\n * @dev Returns the number of elements in the map. O(1).\\n */\\n function length(UintToAddressMap storage map) internal view returns (uint256) {\\n return _length(map._inner);\\n }\\n\\n /**\\n * @dev Returns the element stored at position `index` in the set. O(1).\\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(UintToAddressMap storage map, uint256 index) internal view returns (uint256, address) {\\n (bytes32 key, bytes32 value) = _at(map._inner, index);\\n return (uint256(key), address(uint160(uint256(value))));\\n }\\n\\n /**\\n * @dev Tries to returns the value associated with `key`. O(1).\\n * Does not revert if `key` is not in the map.\\n *\\n * _Available since v3.4._\\n */\\n function tryGet(UintToAddressMap storage map, uint256 key) internal view returns (bool, address) {\\n (bool success, bytes32 value) = _tryGet(map._inner, bytes32(key));\\n return (success, address(uint160(uint256(value))));\\n }\\n\\n /**\\n * @dev Returns the value associated with `key`. O(1).\\n *\\n * Requirements:\\n *\\n * - `key` must be in the map.\\n */\\n function get(UintToAddressMap storage map, uint256 key) internal view returns (address) {\\n return address(uint160(uint256(_get(map._inner, bytes32(key)))));\\n }\\n\\n /**\\n * @dev Same as {get}, with a custom error message when `key` is not in the map.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryGet}.\\n */\\n function get(UintToAddressMap storage map, uint256 key, string memory errorMessage) internal view returns (address) {\\n return address(uint160(uint256(_get(map._inner, bytes32(key), errorMessage))));\\n }\\n}\\n\",\"keccak256\":\"0x4b087f06b6670a131a5a14e53b1d2a5ef19c034cc5ec42eeebcf9554325744ad\"},\"@openzeppelin/contracts/utils/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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 * ```\\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 */\\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\\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) { // 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 // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs\\n // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\\n\\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] = toDeleteIndex + 1; // All indexes are 1-based\\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 require(set._values.length > index, \\\"EnumerableSet: index out of bounds\\\");\\n return set._values[index];\\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 // 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 // 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 on 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\",\"keccak256\":\"0x1562cd9922fbf739edfb979f506809e2743789cbde3177515542161c3d04b164\"},\"@openzeppelin/contracts/utils/Pausable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./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 () internal {\\n _paused = false;\\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 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 require(!paused(), \\\"Pausable: paused\\\");\\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 require(paused(), \\\"Pausable: not paused\\\");\\n _;\\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\":\"0x212fb1b1d4beaf74354dad9bc329f44ee3c5375ef1c32acff76b4ecefc10f1d8\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n uint256 index = digits - 1;\\n temp = value;\\n while (temp != 0) {\\n buffer[index--] = bytes1(uint8(48 + temp % 10));\\n temp /= 10;\\n }\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0xa1e12f97981f1d0964b1c048978606a57127c56c438bab61cdfe269cad859a74\"},\"contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n// NB: this is only meant to deploy to goerli, where chainlink VRF is unavailable.\\n// goerli connects to polygon mumbai, which is what we need to test PoS bridging.\\n// Deploy scripts prevent other contracts from goerli deploy, and this contract from\\n// anything other than goerlui\\npragma solidity >=0.6.6 <0.9.0;\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"@openzeppelin/contracts/math/SafeMath.sol\\\";\\nimport \\\"@openzeppelin/contracts/presets/ERC721PresetMinterPauserAutoId.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/Counters.sol\\\";\\nimport \\\"../Libraries/CurrentTime.sol\\\";\\n\\ncontract CryptOrchidGoerli is ERC721PresetMinterPauserAutoId, Ownable, CurrentTime {\\n using SafeMath for uint256;\\n using Strings for string;\\n using Counters for Counters.Counter;\\n\\n struct CryptOrchid {\\n string species;\\n uint256 plantedAt;\\n uint256 waterLevel;\\n }\\n mapping(uint256 => CryptOrchid) public cryptorchids;\\n\\n enum Stage {Unsold, Seed, Flower, Dead}\\n\\n bool internal saleStarted = false;\\n bool internal growingStarted = false;\\n\\n uint256 public constant MAX_CRYPTORCHIDS = 10000;\\n uint256 public constant GROWTH_CYCLE = 604800; // 7 days\\n uint256 public constant WATERING_WINDOW = 10800; // 3 hours\\n uint256 internal constant MAX_TIMESTAMP = 2**256 - 1;\\n string internal constant GRANUM_IPFS = \\\"QmWd1mn7DuGyx9ByfNeqCsgdSUsJZ1cragitgaygsqDvEm\\\";\\n\\n uint16[10] private limits = [0, 3074, 6074, 8074, 9074, 9574, 9824, 9924, 9974, 9999];\\n string[10] private genum = [\\n \\\"shenzhenica orchidaceae\\\",\\n \\\"phalaenopsis micholitzii\\\",\\n \\\"guarianthe aurantiaca\\\",\\n \\\"vanda coerulea\\\",\\n \\\"cypripedium calceolus\\\",\\n \\\"paphiopedilum vietnamense\\\",\\n \\\"miltonia kayasimae\\\",\\n \\\"platanthera azorica\\\",\\n \\\"dendrophylax lindenii\\\",\\n \\\"paphiopedilum rothschildianum\\\"\\n ];\\n\\n string[10] private speciesIPFSConstant = [\\n \\\"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/shenzhenica-orchidaceae.json\\\",\\n \\\"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/phalaenopsis-micholitzii.json\\\",\\n \\\"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/guarianthe-aurantiaca.json\\\",\\n \\\"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/vanda-coerulea.json\\\",\\n \\\"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/cypripedium-calceolus.json\\\",\\n \\\"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/paphiopedilum-vietnamense.json\\\",\\n \\\"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/miltonia-kayasimae.json\\\",\\n \\\"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/platanthera-azorica.json\\\",\\n \\\"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/dendrophylax-lindenii.json\\\",\\n \\\"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/paphiopedilum-rothschildianum.json\\\"\\n ];\\n\\n string[10] private deadSpeciesIPFSConstant = [\\n \\\"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/shenzhenica-orchidaceae.json\\\",\\n \\\"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/phalaenopsis-micholitzii.json\\\",\\n \\\"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/guarianthe-aurantiaca.json\\\",\\n \\\"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/vanda-coerulea.json\\\",\\n \\\"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/cypripedium-calceolus.json\\\",\\n \\\"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/paphiopedilum-vietnamense.json\\\",\\n \\\"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/miltonia-kayasimae.json\\\",\\n \\\"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/platanthera-azorica.json\\\",\\n \\\"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/dendrophylax-lindenii.json\\\",\\n \\\"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/paphiopedilum-rothschildianum.json\\\"\\n ];\\n\\n Counters.Counter private _tokenIds;\\n\\n mapping(bytes32 => uint256) public requestToToken;\\n mapping(bytes32 => string) private speciesIPFS;\\n mapping(bytes32 => string) private deadSpeciesIPFS;\\n\\n constructor() public payable ERC721PresetMinterPauserAutoId(\\\"CryptOrchids\\\", \\\"ORCHD\\\", \\\"ipfs://\\\") {\\n for (uint256 index = 0; index < genum.length; index++) {\\n speciesIPFS[keccak256(abi.encode(genum[index]))] = speciesIPFSConstant[index];\\n deadSpeciesIPFS[keccak256(abi.encode(genum[index]))] = deadSpeciesIPFSConstant[index];\\n }\\n }\\n\\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\\n (string memory species, , , ) = getTokenMetadata(tokenId);\\n\\n if (growthStage(tokenId) == Stage.Seed) {\\n return string(abi.encodePacked(baseURI(), GRANUM_IPFS));\\n }\\n\\n if (growthStage(tokenId) == Stage.Flower) {\\n return string(abi.encodePacked(baseURI(), speciesIPFS[keccak256(abi.encode(species))]));\\n }\\n\\n return string(abi.encodePacked(baseURI(), deadSpeciesIPFS[keccak256(abi.encode(species))]));\\n }\\n\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 tokenId\\n ) internal virtual override {\\n require(address(0) == to || alive(tokenId), \\\"Dead CryptOrchids cannot be transferred\\\");\\n super._beforeTokenTransfer(from, to, tokenId);\\n }\\n\\n function currentPrice() public view returns (uint256 price) {\\n uint256 currentSupply = totalSupply();\\n if (currentSupply >= 9900) {\\n return 1000000000000000000; // 9900+: 1.00 ETH\\n } else if (currentSupply >= 9500) {\\n return 640000000000000000; // 9500-9500: 0.64 ETH\\n } else if (currentSupply >= 7500) {\\n return 320000000000000000; // 7500-9500: 0.32 ETH\\n } else if (currentSupply >= 3500) {\\n return 160000000000000000; // 3500-7500: 0.16 ETH\\n } else if (currentSupply >= 1500) {\\n return 80000000000000000; // 1500-3500: 0.08 ETH\\n } else if (currentSupply >= 500) {\\n return 60000000000000000; // 500-1500: 0.06 ETH\\n } else {\\n return 40000000000000000; // 0 - 500 0.04 ETH\\n }\\n }\\n\\n function startSale() public onlyOwner {\\n saleStarted = true;\\n }\\n\\n function startGrowing() public onlyOwner {\\n growingStarted = true;\\n }\\n\\n /**\\n * @dev Withdraw ether from this contract (Callable by owner only)\\n */\\n function withdraw() public onlyOwner {\\n uint256 balance = address(this).balance;\\n msg.sender.transfer(balance);\\n }\\n\\n receive() external payable {}\\n\\n function webMint(uint256 units) public payable {\\n require(saleStarted, \\\"The Nursery is closed\\\");\\n require(units <= MAX_CRYPTORCHIDS - totalSupply(), \\\"Not enough bulbs left\\\");\\n require(totalSupply() < MAX_CRYPTORCHIDS, \\\"Sale has already ended\\\");\\n require(units > 0 && units <= 20, \\\"You can plant minimum 1, maximum 20 CryptOrchids\\\");\\n require(SafeMath.add(totalSupply(), units) <= MAX_CRYPTORCHIDS, \\\"Exceeds MAX_CRYPTORCHIDS\\\");\\n require(msg.value >= SafeMath.mul(currentPrice(), units), \\\"Ether value sent is below the price\\\");\\n\\n for (uint256 i = 0; i < units; i++) {\\n _tokenIds.increment();\\n uint256 newItemId = _tokenIds.current();\\n cryptorchids[newItemId] = CryptOrchid({species: \\\"granum\\\", plantedAt: MAX_TIMESTAMP, waterLevel: 0});\\n _safeMint(msg.sender, newItemId);\\n }\\n }\\n\\n function germinate(uint256 tokenId, uint256 userProvidedSeed) public {\\n require(growingStarted, \\\"Germination starts 2021-04-12T16:00:00Z\\\");\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"Only the Owner can germinate a CryptOrchid.\\\");\\n _requestRandom(tokenId, userProvidedSeed);\\n }\\n\\n function _requestRandom(uint256 tokenId, uint256 userProvidedSeed) internal returns (bytes32 requestId) {\\n uint256 pseudoRand = uint256(keccak256(abi.encodePacked(block.timestamp, block.difficulty, userProvidedSeed)));\\n fulfillRandomness(tokenId, pseudoRand);\\n }\\n\\n function fulfillRandomness(uint256 tokenId, uint256 randomness) internal {\\n CryptOrchid storage orchid = cryptorchids[tokenId];\\n string memory species = pickSpecies(SafeMath.mod(randomness, 10000));\\n orchid.species = species;\\n orchid.plantedAt = currentTime();\\n address tokenOwner = ownerOf(tokenId);\\n }\\n\\n function alive(uint256 tokenId) public view returns (bool) {\\n return growthStage(tokenId) != Stage.Dead;\\n }\\n\\n function flowering(uint256 tokenId) public view returns (bool) {\\n return growthStage(tokenId) == Stage.Flower;\\n }\\n\\n function growthStage(uint256 tokenId) public view returns (Stage) {\\n CryptOrchid memory orchid = cryptorchids[tokenId];\\n if (orchid.plantedAt == 0) return Stage.Unsold;\\n if (orchid.plantedAt == MAX_TIMESTAMP) return Stage.Seed;\\n uint256 currentWaterLevel = orchid.waterLevel;\\n uint256 elapsed = currentTime() - orchid.plantedAt;\\n uint256 fullCycles = SafeMath.div(uint256(elapsed), GROWTH_CYCLE);\\n uint256 modulo = SafeMath.mod(elapsed, GROWTH_CYCLE);\\n\\n if (currentWaterLevel == fullCycles) {\\n return Stage.Flower;\\n }\\n\\n if (SafeMath.add(currentWaterLevel, 1) == fullCycles && modulo < WATERING_WINDOW) {\\n return Stage.Flower;\\n }\\n\\n return Stage.Dead;\\n }\\n\\n function water(uint256 tokenId) public {\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"Only the Owner can water a CryptOrchid.\\\");\\n\\n if (!alive(tokenId)) {\\n return;\\n }\\n\\n CryptOrchid storage orchid = cryptorchids[tokenId];\\n\\n uint256 wateringLevel = orchid.waterLevel;\\n uint256 elapsed = currentTime() - orchid.plantedAt;\\n uint256 fullCycles = SafeMath.div(uint256(elapsed), GROWTH_CYCLE);\\n\\n if (wateringLevel > fullCycles) {\\n return;\\n }\\n\\n uint256 newWaterLevel = SafeMath.add(wateringLevel, 1);\\n orchid.waterLevel = newWaterLevel;\\n }\\n\\n function getTokenMetadata(uint256 tokenId)\\n public\\n view\\n returns (\\n string memory,\\n uint256,\\n uint256,\\n Stage\\n )\\n {\\n return (\\n cryptorchids[tokenId].species,\\n cryptorchids[tokenId].plantedAt,\\n cryptorchids[tokenId].waterLevel,\\n growthStage(tokenId)\\n );\\n }\\n\\n /**\\n * @notice Pick species for random number index\\n * @param randomIndex uint256\\n * @return species string\\n */\\n function pickSpecies(uint256 randomIndex) private view returns (string memory) {\\n for (uint256 i = 0; i < 10; i++) {\\n if (randomIndex <= limits[i]) {\\n return genum[i];\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x51b1f3e914311c7a69ad3795e877e316b1740b2f4da01bf1bb3a1100f83af446\"},\"contracts/Libraries/CurrentTime.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.6 <0.9.0;\\n\\ncontract CurrentTime {\\n function currentTime() internal view virtual returns (uint256) {\\n return block.timestamp;\\n }\\n}\\n\",\"keccak256\":\"0xa9a311d0f67d3d7aabd318210bed7051401151fa5f45e75071d7a52c50214cee\"}},\"version\":1}", + "bytecode": "0x600f805461ffff191690556101c060405260006080908152610c0260a0526117ba60c052611f8a60e0526123726101005261256661012052612660610140526126c4610160526126f66101805261270f6101a0526200006390601090600a62000b0c565b506040805161018081018252601761014082019081527f7368656e7a68656e696361206f72636869646163656165000000000000000000610160830152815281518083018352601881527f7068616c61656e6f70736973206d6963686f6c69747a69690000000000000000602082810191909152808301919091528251808401845260158082527f6775617269616e74686520617572616e74696163610000000000000000000000828401528385019190915283518085018552600e81526d76616e646120636f6572756c656160901b818401526060840152835180850185528181527f637970726970656469756d2063616c63656f6c7573000000000000000000000081840152608084015283518085018552601981527f70617068696f706564696c756d20766965746e616d656e7365000000000000008184015260a08401528351808501855260128152716d696c746f6e6961206b61796173696d616560701b8184015260c084015283518085018552601381527f706c6174616e746865726120617a6f72696361000000000000000000000000008184015260e0840152835180850185529081527f64656e64726f7068796c6178206c696e64656e69690000000000000000000000818301526101008301528251808401909352601d83527f70617068696f706564696c756d20726f7468736368696c6469616e756d000000908301526101208101919091526200028390601190600a62000ba9565b50604080516101c08101909152604b610140820181815282916200505f61016084013981526020016040518060800160405280604c815260200162004ef5604c9139815260200160405180608001604052806049815260200162005183604991398152602001604051806080016040528060428152602001620050f060429139815260200160405180608001604052806049815260200162004eac6049913981526020016040518060800160405280604d815260200162004fc9604d91398152602001604051806080016040528060468152602001620050aa604691398152602001604051806080016040528060478152602001620052f96047913981526020016040518060800160405280604981526020016200521960499139815260200160405180608001604052806051815260200162004e14605191399052620003cf90601b90600a62000ba9565b50604080516101c08101909152604b61014082018181528291620052ae61016084013981526020016040518060800160405280604c815260200162005262604c913981526020016040518060800160405280604981526020016200501660499139815260200160405180608001604052806042815260200162004f4160429139815260200160405180608001604052806049815260200162004d826049913981526020016040518060800160405280604d8152602001620051cc604d9139815260200160405180608001604052806046815260200162004f8360469139815260200160405180608001604052806047815260200162004e6560479139815260200160405180608001604052806049815260200162004dcb604991398152602001604051806080016040528060518152602001620051326051913990526200051b90602590600a62000ba9565b506040518060400160405280600c81526020016b43727970744f72636869647360a01b8152506040518060400160405280600581526020016413d490d21160da1b81525060405180604001604052806007815260200166697066733a2f2f60c81b8152508282620005996301ffc9a760e01b6200093660201b60201c565b8151620005ae90600790602085019062000bfc565b508051620005c490600890602084019062000bfc565b50620005e06380ac58cd60e01b6001600160e01b036200093616565b620005fb635b5e139f60e01b6001600160e01b036200093616565b6200061663780e9d6360e01b6001600160e01b036200093616565b5050600b805460ff191690556200064a60006200063b6001600160e01b03620009be16565b6001600160e01b03620009c316565b604080516a4d494e5445525f524f4c4560a81b8152905190819003600b01902062000682906200063b6001600160e01b03620009be16565b604080516a5041555345525f524f4c4560a81b8152905190819003600b019020620006ba906200063b6001600160e01b03620009be16565b620006ce816001600160e01b03620009dc16565b5050506000620006e3620009be60201b60201c565b600d80546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35060005b600a8110156200092f57601b81600a81106200074c57fe5b0160316000601184600a81106200075f57fe5b6040805160208082019081529290930180546002600182161561010002600019019091160491840182905292829160609091019084908015620007e65780601f10620007ba57610100808354040283529160200191620007e6565b820191906000526020600020905b815481529060010190602001808311620007c857829003601f168201915b50509250505060405160208183030381529060405280519060200120815260200190815260200160002090805460018160011615610100020316600290046200083192919062000c7d565b50602581600a81106200084057fe5b0160326000601184600a81106200085357fe5b6040805160208082019081529290930180546002600182161561010002600019019091160491840182905292829160609091019084908015620008da5780601f10620008ae57610100808354040283529160200191620008da565b820191906000526020600020905b815481529060010190602001808311620008bc57829003601f168201915b50509250505060405160208183030381529060405280519060200120815260200190815260200160002090805460018160011615610100020316600290046200092592919062000c7d565b5060010162000734565b5062000da9565b6001600160e01b0319808216141562000996576040805162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604482015290519081900360640190fd5b6001600160e01b0319166000908152600160208190526040909120805460ff19169091179055565b335b90565b620009d882826001600160e01b03620009f116565b5050565b8051620009d890600a90602084019062000bfc565b60008281526020818152604090912062000a1691839062002f9962000a73821b17901c565b15620009d85762000a2f6001600160e01b03620009be16565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600062000a93836001600160a01b0384166001600160e01b0362000a9c16565b90505b92915050565b600062000ab383836001600160e01b0362000af416565b62000aeb5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000a96565b50600062000a96565b60009081526001919091016020526040902054151590565b60018301918390821562000b975791602002820160005b8382111562000b6557835183826101000a81548161ffff021916908361ffff160217905550926020019260020160208160010104928301926001030262000b23565b801562000b955782816101000a81549061ffff021916905560020160208160010104928301926001030262000b65565b505b5062000ba592915062000cf7565b5090565b82600a810192821562000bee579160200282015b8281111562000bee578251805162000bdd91849160209091019062000bfc565b509160200191906001019062000bbd565b5062000ba592915062000d19565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1062000c3f57805160ff191683800117855562000c6f565b8280016001018555821562000c6f579182015b8281111562000c6f57825182559160200191906001019062000c52565b5062000ba592915062000d41565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1062000cb8578054855562000c6f565b8280016001018555821562000c6f57600052602060002091601f016020900482015b8281111562000c6f57825482559160010191906001019062000cda565b620009c091905b8082111562000ba557805461ffff1916815560010162000cfe565b620009c091905b8082111562000ba557600062000d37828262000d5e565b5060010162000d20565b620009c091905b8082111562000ba5576000815560010162000d48565b50805460018160011615610100020316600290046000825580601f1062000d86575062000da6565b601f01602090049060005260206000209081019062000da6919062000d41565b50565b613fc98062000db96000396000f3fe6080604052600436106102e85760003560e01c80636c0360eb11610190578063a7eec44b116100dc578063cac21c8f11610095578063e63ab1e91161006f578063e63ab1e914610ca4578063e985e9c514610cb9578063f2fde38b14610cf4578063ffee200c14610d27576102ef565b8063cac21c8f14610ba6578063d539139314610c56578063d547741f14610c6b576102ef565b8063a7eec44b146109f2578063b66a0e5d14610a1c578063b7aaba2014610a31578063b88d4fde14610a7f578063c87b56dd14610b52578063ca15c87314610b7c576102ef565b80639010d07c116101495780639981d4a1116101235780639981d4a1146109705780639d1b464a1461098d578063a217fddf146109a2578063a22cb465146109b7576102ef565b80639010d07c146108f257806391d148541461092257806395d89b411461095b576102ef565b80636c0360eb1461083b57806370a0823114610850578063715018a6146108835780637fd8d953146108985780638456cb59146108c85780638da5cb5b146108dd576102ef565b806336568abe1161024f5780635c975abb116102085780636352211e116101e25780636352211e1461079f5780636573c787146107c95780636a627842146107f35780636b0c004d14610826576102ef565b80635c975abb1461069b57806360316801146106b057806362ff09d614610775576102ef565b806336568abe146105a15780633ccfd60b146105da5780633f4ba83a146105ef57806342842e0e1461060457806342966c68146106475780634f6ccce714610671576102ef565b8063182199cd116102a1578063182199cd1461048357806323b872dd146104ad578063248a9ca3146104f0578063277dec921461051a5780632f2ff15d1461052f5780632f745c5914610568576102ef565b806301ffc9a7146102f457806306fdde031461033c578063081812fc146103c6578063095ea7b31461040c578063179f0b0a1461044757806318160ddd1461046e576102ef565b366102ef57005b600080fd5b34801561030057600080fd5b506103286004803603602081101561031757600080fd5b50356001600160e01b031916610d3c565b604080519115158252519081900360200190f35b34801561034857600080fd5b50610351610d5f565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561038b578181015183820152602001610373565b50505050905090810190601f1680156103b85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156103d257600080fd5b506103f0600480360360208110156103e957600080fd5b5035610df6565b604080516001600160a01b039092168252519081900360200190f35b34801561041857600080fd5b506104456004803603604081101561042f57600080fd5b506001600160a01b038135169060200135610e58565b005b34801561045357600080fd5b5061045c610f33565b60408051918252519081900360200190f35b34801561047a57600080fd5b5061045c610f3a565b34801561048f57600080fd5b50610328600480360360208110156104a657600080fd5b5035610f4b565b3480156104b957600080fd5b50610445600480360360608110156104d057600080fd5b506001600160a01b03813581169160208101359091169060400135610f6a565b3480156104fc57600080fd5b5061045c6004803603602081101561051357600080fd5b5035610fc1565b34801561052657600080fd5b50610445610fd6565b34801561053b57600080fd5b506104456004803603604081101561055257600080fd5b50803590602001356001600160a01b0316611049565b34801561057457600080fd5b5061045c6004803603604081101561058b57600080fd5b506001600160a01b0381351690602001356110b5565b3480156105ad57600080fd5b50610445600480360360408110156105c457600080fd5b50803590602001356001600160a01b03166110e6565b3480156105e657600080fd5b50610445611147565b3480156105fb57600080fd5b506104456111d8565b34801561061057600080fd5b506104456004803603606081101561062757600080fd5b506001600160a01b03813581169160208101359091169060400135611249565b34801561065357600080fd5b506104456004803603602081101561066a57600080fd5b5035611264565b34801561067d57600080fd5b5061045c6004803603602081101561069457600080fd5b50356112b6565b3480156106a757600080fd5b506103286112d2565b3480156106bc57600080fd5b506106da600480360360208110156106d357600080fd5b50356112db565b60405180806020018581526020018481526020018360038111156106fa57fe5b60ff168152602001828103825286818151815260200191508051906020019080838360005b8381101561073757818101518382015260200161071f565b50505050905090810190601f1680156107645780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b34801561078157600080fd5b5061045c6004803603602081101561079857600080fd5b50356113a0565b3480156107ab57600080fd5b506103f0600480360360208110156107c257600080fd5b50356113b2565b3480156107d557600080fd5b50610328600480360360208110156107ec57600080fd5b50356113e0565b3480156107ff57600080fd5b506104456004803603602081101561081657600080fd5b50356001600160a01b0316611400565b34801561083257600080fd5b5061045c611484565b34801561084757600080fd5b5061035161148a565b34801561085c57600080fd5b5061045c6004803603602081101561087357600080fd5b50356001600160a01b03166114eb565b34801561088f57600080fd5b50610445611553565b3480156108a457600080fd5b50610445600480360360408110156108bb57600080fd5b50803590602001356115ff565b3480156108d457600080fd5b5061044561169b565b3480156108e957600080fd5b506103f061170a565b3480156108fe57600080fd5b506103f06004803603604081101561091557600080fd5b5080359060200135611719565b34801561092e57600080fd5b506103286004803603604081101561094557600080fd5b50803590602001356001600160a01b0316611737565b34801561096757600080fd5b50610351611755565b6104456004803603602081101561098657600080fd5b50356117b6565b34801561099957600080fd5b5061045c611a5c565b3480156109ae57600080fd5b5061045c611b18565b3480156109c357600080fd5b50610445600480360360408110156109da57600080fd5b506001600160a01b0381351690602001351515611b1d565b3480156109fe57600080fd5b5061044560048036036020811015610a1557600080fd5b5035611c22565b348015610a2857600080fd5b50610445611ce0565b348015610a3d57600080fd5b50610a5b60048036036020811015610a5457600080fd5b5035611d51565b60405180826003811115610a6b57fe5b60ff16815260200191505060405180910390f35b348015610a8b57600080fd5b5061044560048036036080811015610aa257600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135640100000000811115610add57600080fd5b820183602082011115610aef57600080fd5b80359060200191846001830284011164010000000083111715610b1157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611ed1945050505050565b348015610b5e57600080fd5b5061035160048036036020811015610b7557600080fd5b5035611f29565b348015610b8857600080fd5b5061045c60048036036020811015610b9f57600080fd5b5035612327565b348015610bb257600080fd5b50610bd060048036036020811015610bc957600080fd5b503561233e565b6040518080602001848152602001838152602001828103825285818151815260200191508051906020019080838360005b83811015610c19578181015183820152602001610c01565b50505050905090810190601f168015610c465780820380516001836020036101000a031916815260200191505b5094505050505060405180910390f35b348015610c6257600080fd5b5061045c6123eb565b348015610c7757600080fd5b5061044560048036036040811015610c8e57600080fd5b50803590602001356001600160a01b031661240e565b348015610cb057600080fd5b5061045c612467565b348015610cc557600080fd5b5061032860048036036040811015610cdc57600080fd5b506001600160a01b038135811691602001351661248a565b348015610d0057600080fd5b5061044560048036036020811015610d1757600080fd5b50356001600160a01b03166124b8565b348015610d3357600080fd5b5061045c6125bb565b6001600160e01b0319811660009081526001602052604090205460ff165b919050565b60078054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610deb5780601f10610dc057610100808354040283529160200191610deb565b820191906000526020600020905b815481529060010190602001808311610dce57829003601f168201915b505050505090505b90565b6000610e01826125c1565b610e3c5760405162461bcd60e51b815260040180806020018281038252602c815260200180613d6f602c913960400191505060405180910390fd5b506000908152600560205260409020546001600160a01b031690565b6000610e63826113b2565b9050806001600160a01b0316836001600160a01b03161415610eb65760405162461bcd60e51b8152600401808060200182810382526021815260200180613e146021913960400191505060405180910390fd5b806001600160a01b0316610ec86125d4565b6001600160a01b03161480610ee95750610ee981610ee46125d4565b61248a565b610f245760405162461bcd60e51b8152600401808060200182810382526038815260200180613c7e6038913960400191505060405180910390fd5b610f2e83836125d8565b505050565b62093a8081565b6000610f466003612646565b905090565b60006002610f5883611d51565b6003811115610f6357fe5b1492915050565b610f7b610f756125d4565b82612651565b610fb65760405162461bcd60e51b8152600401808060200182810382526031815260200180613e5c6031913960400191505060405180910390fd5b610f2e8383836126f5565b60009081526020819052604090206002015490565b610fde6125d4565b6001600160a01b0316610fef61170a565b6001600160a01b031614611038576040805162461bcd60e51b81526020600482018190526024820152600080516020613d9b833981519152604482015290519081900360640190fd5b600f805461ff001916610100179055565b60008281526020819052604090206002015461106c906110676125d4565b611737565b6110a75760405162461bcd60e51b815260040180806020018281038252602f815260200180613a97602f913960400191505060405180910390fd5b6110b18282612853565b5050565b6001600160a01b03821660009081526002602052604081206110dd908363ffffffff6128c216565b90505b92915050565b6110ee6125d4565b6001600160a01b0316816001600160a01b03161461113d5760405162461bcd60e51b815260040180806020018281038252602f815260200180613f65602f913960400191505060405180910390fd5b6110b182826128ce565b61114f6125d4565b6001600160a01b031661116061170a565b6001600160a01b0316146111a9576040805162461bcd60e51b81526020600482018190526024820152600080516020613d9b833981519152604482015290519081900360640190fd5b6040514790339082156108fc029083906000818181858888f193505050501580156110b1573d6000803e3d6000fd5b604080516a5041555345525f524f4c4560a81b8152905190819003600b019020611204906110676125d4565b61123f5760405162461bcd60e51b8152600401808060200182810382526040815260200180613f256040913960400191505060405180910390fd5b61124761293d565b565b610f2e83838360405180602001604052806000815250611ed1565b61126f610f756125d4565b6112aa5760405162461bcd60e51b8152600401808060200182810382526030815260200180613ef56030913960400191505060405180910390fd5b6112b3816129dd565b50565b6000806112ca60038463ffffffff612ab616565b509392505050565b600b5460ff1690565b6000818152600e6020526040812060018101546002820154606093928392839261130488611d51565b8354604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815291869183018282801561138a5780601f1061135f5761010080835404028352916020019161138a565b820191906000526020600020905b81548152906001019060200180831161136d57829003601f168201915b5050505050935093509350935093509193509193565b60306020526000908152604090205481565b60006110e082604051806060016040528060298152602001613ce0602991396003919063ffffffff612ad216565b600060036113ed83611d51565b60038111156113f857fe5b141592915050565b604080516a4d494e5445525f524f4c4560a81b8152905190819003600b01902061142c906110676125d4565b6114675760405162461bcd60e51b815260040180806020018281038252603d815260200180613eb8603d913960400191505060405180910390fd5b61147a81611475600c612ae9565b612aed565b6112b3600c612c27565b61271081565b600a8054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610deb5780601f10610dc057610100808354040283529160200191610deb565b60006001600160a01b0382166115325760405162461bcd60e51b815260040180806020018281038252602a815260200180613cb6602a913960400191505060405180910390fd5b6001600160a01b03821660009081526002602052604090206110e090612646565b61155b6125d4565b6001600160a01b031661156c61170a565b6001600160a01b0316146115b5576040805162461bcd60e51b81526020600482018190526024820152600080516020613d9b833981519152604482015290519081900360640190fd5b600d546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600d80546001600160a01b0319169055565b600f54610100900460ff166116455760405162461bcd60e51b8152600401808060200182810382526027815260200180613b4c6027913960400191505060405180910390fd5b6116566116506125d4565b83612651565b6116915760405162461bcd60e51b815260040180806020018281038252602b815260200180613e8d602b913960400191505060405180910390fd5b610f2e8282612c30565b604080516a5041555345525f524f4c4560a81b8152905190819003600b0190206116c7906110676125d4565b6117025760405162461bcd60e51b815260040180806020018281038252603e815260200180613b73603e913960400191505060405180910390fd5b611247612c76565b600d546001600160a01b031690565b60008281526020819052604081206110dd908363ffffffff6128c216565b60008281526020819052604081206110dd908363ffffffff612cf916565b60088054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610deb5780601f10610dc057610100808354040283529160200191610deb565b600f5460ff16611805576040805162461bcd60e51b8152602060048201526015602482015274151a1948139d5c9cd95c9e481a5cc818db1bdcd959605a1b604482015290519081900360640190fd5b61180d610f3a565b6127100381111561185d576040805162461bcd60e51b8152602060048201526015602482015274139bdd08195b9bdd59da08189d5b189cc81b19599d605a1b604482015290519081900360640190fd5b612710611868610f3a565b106118b3576040805162461bcd60e51b815260206004820152601660248201527514d85b19481a185cc8185b1c9958591e48195b99195960521b604482015290519081900360640190fd5b6000811180156118c4575060148111155b6118ff5760405162461bcd60e51b8152600401808060200182810382526030815260200180613de46030913960400191505060405180910390fd5b61271061191361190d610f3a565b83612d0e565b1115611966576040805162461bcd60e51b815260206004820152601860248201527f45786365656473204d41585f43525950544f5243484944530000000000000000604482015290519081900360640190fd5b611977611971611a5c565b82612d68565b3410156119b55760405162461bcd60e51b8152600401808060200182810382526023815260200180613d096023913960400191505060405180910390fd5b60005b818110156110b1576119ca602f612c27565b60006119d6602f612ae9565b6040805160a081018252600660608201908152656772616e756d60d01b608083015281526000196020808301919091526000828401819052848152600e8252929092208151805194955091939092611a32928492910190613954565b5060208201516001820155604090910151600290910155611a533382612dc1565b506001016119b8565b600080611a67610f3a565b90506126ac8110611a8357670de0b6b3a7640000915050610df3565b61251c8110611a9d576708e1bc9bf0400000915050610df3565b611d4c8110611ab757670470de4df8200000915050610df3565b610dac8110611ad1576702386f26fc100000915050610df3565b6105dc8110611aeb5767011c37937e080000915050610df3565b6101f48110611b045766d529ae9e860000915050610df3565b668e1bc9bf040000915050610df3565b5090565b600081565b611b256125d4565b6001600160a01b0316826001600160a01b03161415611b8b576040805162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015290519081900360640190fd5b8060066000611b986125d4565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff191692151592909217909155611bdc6125d4565b60408051841515815290516001600160a01b0392909216917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319181900360200190a35050565b611c2d610f756125d4565b611c685760405162461bcd60e51b8152600401808060200182810382526027815260200180613bfb6027913960400191505060405180910390fd5b611c71816113e0565b611c7a576112b3565b6000818152600e602052604081206002810154600182015491929091611c9e612ddb565b0390506000611cb08262093a80612ddf565b905080831115611cc357505050506112b3565b6000611cd0846001612d0e565b6002909501949094555050505050565b611ce86125d4565b6001600160a01b0316611cf961170a565b6001600160a01b031614611d42576040805162461bcd60e51b81526020600482018190526024820152600080516020613d9b833981519152604482015290519081900360640190fd5b600f805460ff19166001179055565b6000611d5b6139ce565b6000838152600e60209081526040918290208251815460026001821615610100026000190190911604601f81018490049093028101608090810190945260608101838152909391928492849190840182828015611df95780601f10611dce57610100808354040283529160200191611df9565b820191906000526020600020905b815481529060010190602001808311611ddc57829003601f168201915b50505050508152602001600182015481526020016002820154815250509050806020015160001415611e2f576000915050610d5a565b60001981602001511415611e47576001915050610d5a565b60408101516020820151600090611e5c612ddb565b0390506000611e6e8262093a80612ddf565b90506000611e7f8362093a80612e46565b905081841415611e9757600295505050505050610d5a565b81611ea3856001612d0e565b148015611eb15750612a3081105b15611ec457600295505050505050610d5a565b5060039695505050505050565b611edc6116506125d4565b611f175760405162461bcd60e51b8152600401808060200182810382526031815260200180613e5c6031913960400191505060405180910390fd5b611f2384848484612ead565b50505050565b606080611f35836112db565b5091925060019150611f449050565b611f4d84611d51565b6003811115611f5857fe5b141561203657611f6661148a565b6040518060600160405280602e8152602001613b1e602e91396040516020018083805190602001908083835b60208310611fb15780518252601f199092019160209182019101611f92565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b60208310611ff95780518252601f199092019160209182019101611fda565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052915050610d5a565b600261204184611d51565b600381111561204c57fe5b14156121bd5761205a61148a565b60316000836040516020018080602001828103825283818151815260200191508051906020019080838360005b8381101561209f578181015183820152602001612087565b50505050905090810190601f1680156120cc5780820380516001836020036101000a031916815260200191505b50925050506040516020818303038152906040528051906020012081526020019081526020016000206040516020018083805190602001908083835b602083106121275780518252601f199092019160209182019101612108565b6001836020036101000a038019825116818451168082178552505050505050905001828054600181600116156101000203166002900480156121a05780601f1061217e5761010080835404028352918201916121a0565b820191906000526020600020905b81548152906001019060200180831161218c575b505092505050604051602081830303815290604052915050610d5a565b6121c561148a565b60326000836040516020018080602001828103825283818151815260200191508051906020019080838360005b8381101561220a5781810151838201526020016121f2565b50505050905090810190601f1680156122375780820380516001836020036101000a031916815260200191505b50925050506040516020818303038152906040528051906020012081526020019081526020016000206040516020018083805190602001908083835b602083106122925780518252601f199092019160209182019101612273565b6001836020036101000a0380198251168184511680821785525050505050509050018280546001816001161561010002031660029004801561230b5780601f106122e957610100808354040283529182019161230b565b820191906000526020600020905b8154815290600101906020018083116122f7575b505060408051601f198184030181529190529695505050505050565b60008181526020819052604081206110e090612646565b600e6020908152600091825260409182902080548351601f600260001961010060018616150201909316929092049182018490048402810184019094528084529092918391908301828280156123d55780601f106123aa576101008083540402835291602001916123d5565b820191906000526020600020905b8154815290600101906020018083116123b857829003601f168201915b5050505050908060010154908060020154905083565b604080516a4d494e5445525f524f4c4560a81b8152905190819003600b01902081565b60008281526020819052604090206002015461242c906110676125d4565b61113d5760405162461bcd60e51b8152600401808060200182810382526030815260200180613c4e6030913960400191505060405180910390fd5b604080516a5041555345525f524f4c4560a81b8152905190819003600b01902081565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b6124c06125d4565b6001600160a01b03166124d161170a565b6001600160a01b03161461251a576040805162461bcd60e51b81526020600482018190526024820152600080516020613d9b833981519152604482015290519081900360640190fd5b6001600160a01b03811661255f5760405162461bcd60e51b8152600401808060200182810382526026815260200180613af86026913960400191505060405180910390fd5b600d546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600d80546001600160a01b0319166001600160a01b0392909216919091179055565b612a3081565b60006110e060038363ffffffff612eff16565b3390565b600081815260056020526040902080546001600160a01b0319166001600160a01b038416908117909155819061260d826113b2565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006110e082612ae9565b600061265c826125c1565b6126975760405162461bcd60e51b815260040180806020018281038252602c815260200180613c22602c913960400191505060405180910390fd5b60006126a2836113b2565b9050806001600160a01b0316846001600160a01b031614806126dd5750836001600160a01b03166126d284610df6565b6001600160a01b0316145b806126ed57506126ed818561248a565b949350505050565b826001600160a01b0316612708826113b2565b6001600160a01b03161461274d5760405162461bcd60e51b8152600401808060200182810382526029815260200180613dbb6029913960400191505060405180910390fd5b6001600160a01b0382166127925760405162461bcd60e51b8152600401808060200182810382526024815260200180613bb16024913960400191505060405180910390fd5b61279d838383612f0b565b6127a86000826125d8565b6001600160a01b03831660009081526002602052604090206127d0908263ffffffff612f6b16565b506001600160a01b03821660009081526002602052604090206127f9908263ffffffff612f7716565b5061280c6003828463ffffffff612f8316565b5080826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6000828152602081905260409020612871908263ffffffff612f9916565b156110b15761287e6125d4565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006110dd8383612fae565b60008281526020819052604090206128ec908263ffffffff61301216565b156110b1576128f96125d4565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b6129456112d2565b61298d576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b600b805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6129c06125d4565b604080516001600160a01b039092168252519081900360200190a1565b60006129e8826113b2565b90506129f681600084612f0b565b612a016000836125d8565b6000828152600960205260409020546002600019610100600184161502019091160415612a3f576000828152600960205260408120612a3f916139ef565b6001600160a01b0381166000908152600260205260409020612a67908363ffffffff612f6b16565b50612a7960038363ffffffff61302716565b5060405182906000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6000808080612ac58686613033565b9097909650945050505050565b6000612adf8484846130ae565b90505b9392505050565b5490565b6001600160a01b038216612b48576040805162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015290519081900360640190fd5b612b51816125c1565b15612ba3576040805162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015290519081900360640190fd5b612baf60008383612f0b565b6001600160a01b0382166000908152600260205260409020612bd7908263ffffffff612f7716565b50612bea6003828463ffffffff612f8316565b5060405181906001600160a01b038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b80546001019055565b6040805142602080830191909152448284015260608083018590528351808403909101815260809092019092528051910120600090612c6f8482613178565b5092915050565b612c7e6112d2565b15612cc3576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b600b805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586129c06125d4565b60006110dd836001600160a01b0384166131d2565b6000828201838110156110dd576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082612d77575060006110e0565b82820282848281612d8457fe5b04146110dd5760405162461bcd60e51b8152600401808060200182810382526021815260200180613d4e6021913960400191505060405180910390fd5b6110b18282604051806020016040528060008152506131ea565b4290565b6000808211612e35576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381612e3e57fe5b049392505050565b6000808211612e9c576040805162461bcd60e51b815260206004820152601860248201527f536166654d6174683a206d6f64756c6f206279207a65726f0000000000000000604482015290519081900360640190fd5b818381612ea557fe5b069392505050565b612eb88484846126f5565b612ec48484848461323c565b611f235760405162461bcd60e51b8152600401808060200182810382526032815260200180613ac66032913960400191505060405180910390fd5b60006110dd83836131d2565b6001600160a01b0382161580612f255750612f25816113e0565b612f605760405162461bcd60e51b8152600401808060200182810382526027815260200180613e356027913960400191505060405180910390fd5b610f2e8383836133bc565b60006110dd83836133c7565b60006110dd838361348d565b6000612adf84846001600160a01b0385166134d7565b60006110dd836001600160a01b03841661348d565b81546000908210612ff05760405162461bcd60e51b8152600401808060200182810382526022815260200180613a4a6022913960400191505060405180910390fd5b826000018281548110612fff57fe5b9060005260206000200154905092915050565b60006110dd836001600160a01b0384166133c7565b60006110dd838361356e565b8154600090819083106130775760405162461bcd60e51b8152600401808060200182810382526022815260200180613d2c6022913960400191505060405180910390fd5b600084600001848154811061308857fe5b906000526020600020906002020190508060000154816001015492509250509250929050565b600082815260018401602052604081205482816131495760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561310e5781810151838201526020016130f6565b50505050905090810190601f16801561313b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5084600001600182038154811061315c57fe5b9060005260206000209060020201600101549150509392505050565b6000828152600e60205260409020606061319c61319784612710612e46565b613642565b80519091506131b19083906020840190613954565b506131ba612ddb565b600183015560006131ca856113b2565b505050505050565b60009081526001919091016020526040902054151590565b6131f48383612aed565b613201600084848461323c565b610f2e5760405162461bcd60e51b8152600401808060200182810382526032815260200180613ac66032913960400191505060405180910390fd5b6000613250846001600160a01b031661372e565b61325c575060016126ed565b6060613382630a85bd0160e11b6132716125d4565b88878760405160240180856001600160a01b03166001600160a01b03168152602001846001600160a01b03166001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156132ea5781810151838201526020016132d2565b50505050905090810190601f1680156133175780820380516001836020036101000a031916815260200191505b5095505050505050604051602081830303815290604052906001600160e01b0319166020820180516001600160e01b038381831617835250505050604051806060016040528060328152602001613ac6603291396001600160a01b038816919063ffffffff61373416565b9050600081806020019051602081101561339b57600080fd5b50516001600160e01b031916630a85bd0160e11b1492505050949350505050565b610f2e838383613743565b6000818152600183016020526040812054801561348357835460001980830191908101906000908790839081106133fa57fe5b906000526020600020015490508087600001848154811061341757fe5b60009182526020808320909101929092558281526001898101909252604090209084019055865487908061344757fe5b600190038181906000526020600020016000905590558660010160008781526020019081526020016000206000905560019450505050506110e0565b60009150506110e0565b600061349983836131d2565b6134cf575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556110e0565b5060006110e0565b60008281526001840160205260408120548061353c575050604080518082018252838152602080820184815286546001818101895560008981528481209551600290930290950191825591519082015586548684528188019092529290912055612ae2565b8285600001600183038154811061354f57fe5b9060005260206000209060020201600101819055506000915050612ae2565b6000818152600183016020526040812054801561348357835460001980830191908101906000908790839081106135a157fe5b90600052602060002090600202019050808760000184815481106135c157fe5b60009182526020808320845460029093020191825560019384015491840191909155835482528983019052604090209084019055865487908061360057fe5b60008281526020808220600260001990940193840201828155600190810183905592909355888152898201909252604082209190915594506110e09350505050565b606060005b600a81101561372857601081600a811061365d57fe5b601091828204019190066002029054906101000a900461ffff1661ffff16831161372057601181600a811061368e57fe5b01805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156137135780601f106136e857610100808354040283529160200191613713565b820191906000526020600020905b8154815290600101906020018083116136f657829003601f168201915b5050505050915050610d5a565b600101613647565b50919050565b3b151590565b6060612adf8484600085613792565b61374e838383610f2e565b6137566112d2565b15610f2e5760405162461bcd60e51b815260040180806020018281038252602b815260200180613a6c602b913960400191505060405180910390fd5b6060824710156137d35760405162461bcd60e51b8152600401808060200182810382526026815260200180613bd56026913960400191505060405180910390fd5b6137dc8561372e565b61382d576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b6020831061386c5780518252601f19909201916020918201910161384d565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146138ce576040519150601f19603f3d011682016040523d82523d6000602084013e6138d3565b606091505b50915091506138e38282866138ee565b979650505050505050565b606083156138fd575081612ae2565b82511561390d5782518084602001fd5b60405162461bcd60e51b815260206004820181815284516024840152845185939192839260440191908501908083836000831561310e5781810151838201526020016130f6565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061399557805160ff19168380011785556139c2565b828001600101855582156139c2579182015b828111156139c25782518255916020019190600101906139a7565b50611b14929150613a2f565b60405180606001604052806060815260200160008152602001600081525090565b50805460018160011615610100020316600290046000825580601f10613a1557506112b3565b601f0160209004906000526020600020908101906112b391905b610df391905b80821115611b145760008155600101613a3556fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e64734552433732315061757361626c653a20746f6b656e207472616e73666572207768696c6520706175736564416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e744552433732313a207472616e7366657220746f206e6f6e20455243373231526563656976657220696d706c656d656e7465724f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373516d5764316d6e374475477978394279664e6571437367645355734a5a316372616769746761796773714476456d4765726d696e6174696f6e2073746172747320323032312d30342d31325431363a30303a30305a4552433732315072657365744d696e7465725061757365724175746f49643a206d75737420686176652070617573657220726f6c6520746f2070617573654552433732313a207472616e7366657220746f20746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c4f6e6c7920746865204f776e65722063616e20776174657220612043727970744f72636869642e4552433732313a206f70657261746f7220717565727920666f72206e6f6e6578697374656e7420746f6b656e416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b654552433732313a20617070726f76652063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f76656420666f7220616c6c4552433732313a2062616c616e636520717565727920666f7220746865207a65726f20616464726573734552433732313a206f776e657220717565727920666f72206e6f6e6578697374656e7420746f6b656e45746865722076616c75652073656e742069732062656c6f7720746865207072696365456e756d657261626c654d61703a20696e646578206f7574206f6620626f756e6473536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774552433732313a20617070726f76656420717565727920666f72206e6f6e6578697374656e7420746f6b656e4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65724552433732313a207472616e73666572206f6620746f6b656e2074686174206973206e6f74206f776e596f752063616e20706c616e74206d696e696d756d20312c206d6178696d756d2032302043727970744f7263686964734552433732313a20617070726f76616c20746f2063757272656e74206f776e6572446561642043727970744f7263686964732063616e6e6f74206265207472616e736665727265644552433732313a207472616e736665722063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f7665644f6e6c7920746865204f776e65722063616e206765726d696e61746520612043727970744f72636869642e4552433732315072657365744d696e7465725061757365724175746f49643a206d7573742068617665206d696e74657220726f6c6520746f206d696e744552433732314275726e61626c653a2063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f7665644552433732315072657365744d696e7465725061757365724175746f49643a206d75737420686176652070617573657220726f6c6520746f20756e7061757365416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220669084c037e9e2730b31d45e8cd7d87fcb21b2d1237df1dee094b97b3922927264736f6c63430006060033516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f637970726970656469756d2d63616c63656f6c75732e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f64656e64726f7068796c61782d6c696e64656e69692e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f70617068696f706564696c756d2d726f7468736368696c6469616e756d2e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f706c6174616e74686572612d617a6f726963612e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f637970726970656469756d2d63616c63656f6c75732e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f7068616c61656e6f707369732d6d6963686f6c69747a69692e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f76616e64612d636f6572756c65612e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f6d696c746f6e69612d6b61796173696d61652e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f70617068696f706564696c756d2d766965746e616d656e73652e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f6775617269616e7468652d617572616e74696163612e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f7368656e7a68656e6963612d6f726368696461636561652e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f6d696c746f6e69612d6b61796173696d61652e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f76616e64612d636f6572756c65612e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f70617068696f706564696c756d2d726f7468736368696c6469616e756d2e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f6775617269616e7468652d617572616e74696163612e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f70617068696f706564696c756d2d766965746e616d656e73652e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f64656e64726f7068796c61782d6c696e64656e69692e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f7068616c61656e6f707369732d6d6963686f6c69747a69692e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f7368656e7a68656e6963612d6f726368696461636561652e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f706c6174616e74686572612d617a6f726963612e6a736f6e", + "deployedBytecode": "0x6080604052600436106102e85760003560e01c80636c0360eb11610190578063a7eec44b116100dc578063cac21c8f11610095578063e63ab1e91161006f578063e63ab1e914610ca4578063e985e9c514610cb9578063f2fde38b14610cf4578063ffee200c14610d27576102ef565b8063cac21c8f14610ba6578063d539139314610c56578063d547741f14610c6b576102ef565b8063a7eec44b146109f2578063b66a0e5d14610a1c578063b7aaba2014610a31578063b88d4fde14610a7f578063c87b56dd14610b52578063ca15c87314610b7c576102ef565b80639010d07c116101495780639981d4a1116101235780639981d4a1146109705780639d1b464a1461098d578063a217fddf146109a2578063a22cb465146109b7576102ef565b80639010d07c146108f257806391d148541461092257806395d89b411461095b576102ef565b80636c0360eb1461083b57806370a0823114610850578063715018a6146108835780637fd8d953146108985780638456cb59146108c85780638da5cb5b146108dd576102ef565b806336568abe1161024f5780635c975abb116102085780636352211e116101e25780636352211e1461079f5780636573c787146107c95780636a627842146107f35780636b0c004d14610826576102ef565b80635c975abb1461069b57806360316801146106b057806362ff09d614610775576102ef565b806336568abe146105a15780633ccfd60b146105da5780633f4ba83a146105ef57806342842e0e1461060457806342966c68146106475780634f6ccce714610671576102ef565b8063182199cd116102a1578063182199cd1461048357806323b872dd146104ad578063248a9ca3146104f0578063277dec921461051a5780632f2ff15d1461052f5780632f745c5914610568576102ef565b806301ffc9a7146102f457806306fdde031461033c578063081812fc146103c6578063095ea7b31461040c578063179f0b0a1461044757806318160ddd1461046e576102ef565b366102ef57005b600080fd5b34801561030057600080fd5b506103286004803603602081101561031757600080fd5b50356001600160e01b031916610d3c565b604080519115158252519081900360200190f35b34801561034857600080fd5b50610351610d5f565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561038b578181015183820152602001610373565b50505050905090810190601f1680156103b85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156103d257600080fd5b506103f0600480360360208110156103e957600080fd5b5035610df6565b604080516001600160a01b039092168252519081900360200190f35b34801561041857600080fd5b506104456004803603604081101561042f57600080fd5b506001600160a01b038135169060200135610e58565b005b34801561045357600080fd5b5061045c610f33565b60408051918252519081900360200190f35b34801561047a57600080fd5b5061045c610f3a565b34801561048f57600080fd5b50610328600480360360208110156104a657600080fd5b5035610f4b565b3480156104b957600080fd5b50610445600480360360608110156104d057600080fd5b506001600160a01b03813581169160208101359091169060400135610f6a565b3480156104fc57600080fd5b5061045c6004803603602081101561051357600080fd5b5035610fc1565b34801561052657600080fd5b50610445610fd6565b34801561053b57600080fd5b506104456004803603604081101561055257600080fd5b50803590602001356001600160a01b0316611049565b34801561057457600080fd5b5061045c6004803603604081101561058b57600080fd5b506001600160a01b0381351690602001356110b5565b3480156105ad57600080fd5b50610445600480360360408110156105c457600080fd5b50803590602001356001600160a01b03166110e6565b3480156105e657600080fd5b50610445611147565b3480156105fb57600080fd5b506104456111d8565b34801561061057600080fd5b506104456004803603606081101561062757600080fd5b506001600160a01b03813581169160208101359091169060400135611249565b34801561065357600080fd5b506104456004803603602081101561066a57600080fd5b5035611264565b34801561067d57600080fd5b5061045c6004803603602081101561069457600080fd5b50356112b6565b3480156106a757600080fd5b506103286112d2565b3480156106bc57600080fd5b506106da600480360360208110156106d357600080fd5b50356112db565b60405180806020018581526020018481526020018360038111156106fa57fe5b60ff168152602001828103825286818151815260200191508051906020019080838360005b8381101561073757818101518382015260200161071f565b50505050905090810190601f1680156107645780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b34801561078157600080fd5b5061045c6004803603602081101561079857600080fd5b50356113a0565b3480156107ab57600080fd5b506103f0600480360360208110156107c257600080fd5b50356113b2565b3480156107d557600080fd5b50610328600480360360208110156107ec57600080fd5b50356113e0565b3480156107ff57600080fd5b506104456004803603602081101561081657600080fd5b50356001600160a01b0316611400565b34801561083257600080fd5b5061045c611484565b34801561084757600080fd5b5061035161148a565b34801561085c57600080fd5b5061045c6004803603602081101561087357600080fd5b50356001600160a01b03166114eb565b34801561088f57600080fd5b50610445611553565b3480156108a457600080fd5b50610445600480360360408110156108bb57600080fd5b50803590602001356115ff565b3480156108d457600080fd5b5061044561169b565b3480156108e957600080fd5b506103f061170a565b3480156108fe57600080fd5b506103f06004803603604081101561091557600080fd5b5080359060200135611719565b34801561092e57600080fd5b506103286004803603604081101561094557600080fd5b50803590602001356001600160a01b0316611737565b34801561096757600080fd5b50610351611755565b6104456004803603602081101561098657600080fd5b50356117b6565b34801561099957600080fd5b5061045c611a5c565b3480156109ae57600080fd5b5061045c611b18565b3480156109c357600080fd5b50610445600480360360408110156109da57600080fd5b506001600160a01b0381351690602001351515611b1d565b3480156109fe57600080fd5b5061044560048036036020811015610a1557600080fd5b5035611c22565b348015610a2857600080fd5b50610445611ce0565b348015610a3d57600080fd5b50610a5b60048036036020811015610a5457600080fd5b5035611d51565b60405180826003811115610a6b57fe5b60ff16815260200191505060405180910390f35b348015610a8b57600080fd5b5061044560048036036080811015610aa257600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135640100000000811115610add57600080fd5b820183602082011115610aef57600080fd5b80359060200191846001830284011164010000000083111715610b1157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611ed1945050505050565b348015610b5e57600080fd5b5061035160048036036020811015610b7557600080fd5b5035611f29565b348015610b8857600080fd5b5061045c60048036036020811015610b9f57600080fd5b5035612327565b348015610bb257600080fd5b50610bd060048036036020811015610bc957600080fd5b503561233e565b6040518080602001848152602001838152602001828103825285818151815260200191508051906020019080838360005b83811015610c19578181015183820152602001610c01565b50505050905090810190601f168015610c465780820380516001836020036101000a031916815260200191505b5094505050505060405180910390f35b348015610c6257600080fd5b5061045c6123eb565b348015610c7757600080fd5b5061044560048036036040811015610c8e57600080fd5b50803590602001356001600160a01b031661240e565b348015610cb057600080fd5b5061045c612467565b348015610cc557600080fd5b5061032860048036036040811015610cdc57600080fd5b506001600160a01b038135811691602001351661248a565b348015610d0057600080fd5b5061044560048036036020811015610d1757600080fd5b50356001600160a01b03166124b8565b348015610d3357600080fd5b5061045c6125bb565b6001600160e01b0319811660009081526001602052604090205460ff165b919050565b60078054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610deb5780601f10610dc057610100808354040283529160200191610deb565b820191906000526020600020905b815481529060010190602001808311610dce57829003601f168201915b505050505090505b90565b6000610e01826125c1565b610e3c5760405162461bcd60e51b815260040180806020018281038252602c815260200180613d6f602c913960400191505060405180910390fd5b506000908152600560205260409020546001600160a01b031690565b6000610e63826113b2565b9050806001600160a01b0316836001600160a01b03161415610eb65760405162461bcd60e51b8152600401808060200182810382526021815260200180613e146021913960400191505060405180910390fd5b806001600160a01b0316610ec86125d4565b6001600160a01b03161480610ee95750610ee981610ee46125d4565b61248a565b610f245760405162461bcd60e51b8152600401808060200182810382526038815260200180613c7e6038913960400191505060405180910390fd5b610f2e83836125d8565b505050565b62093a8081565b6000610f466003612646565b905090565b60006002610f5883611d51565b6003811115610f6357fe5b1492915050565b610f7b610f756125d4565b82612651565b610fb65760405162461bcd60e51b8152600401808060200182810382526031815260200180613e5c6031913960400191505060405180910390fd5b610f2e8383836126f5565b60009081526020819052604090206002015490565b610fde6125d4565b6001600160a01b0316610fef61170a565b6001600160a01b031614611038576040805162461bcd60e51b81526020600482018190526024820152600080516020613d9b833981519152604482015290519081900360640190fd5b600f805461ff001916610100179055565b60008281526020819052604090206002015461106c906110676125d4565b611737565b6110a75760405162461bcd60e51b815260040180806020018281038252602f815260200180613a97602f913960400191505060405180910390fd5b6110b18282612853565b5050565b6001600160a01b03821660009081526002602052604081206110dd908363ffffffff6128c216565b90505b92915050565b6110ee6125d4565b6001600160a01b0316816001600160a01b03161461113d5760405162461bcd60e51b815260040180806020018281038252602f815260200180613f65602f913960400191505060405180910390fd5b6110b182826128ce565b61114f6125d4565b6001600160a01b031661116061170a565b6001600160a01b0316146111a9576040805162461bcd60e51b81526020600482018190526024820152600080516020613d9b833981519152604482015290519081900360640190fd5b6040514790339082156108fc029083906000818181858888f193505050501580156110b1573d6000803e3d6000fd5b604080516a5041555345525f524f4c4560a81b8152905190819003600b019020611204906110676125d4565b61123f5760405162461bcd60e51b8152600401808060200182810382526040815260200180613f256040913960400191505060405180910390fd5b61124761293d565b565b610f2e83838360405180602001604052806000815250611ed1565b61126f610f756125d4565b6112aa5760405162461bcd60e51b8152600401808060200182810382526030815260200180613ef56030913960400191505060405180910390fd5b6112b3816129dd565b50565b6000806112ca60038463ffffffff612ab616565b509392505050565b600b5460ff1690565b6000818152600e6020526040812060018101546002820154606093928392839261130488611d51565b8354604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815291869183018282801561138a5780601f1061135f5761010080835404028352916020019161138a565b820191906000526020600020905b81548152906001019060200180831161136d57829003601f168201915b5050505050935093509350935093509193509193565b60306020526000908152604090205481565b60006110e082604051806060016040528060298152602001613ce0602991396003919063ffffffff612ad216565b600060036113ed83611d51565b60038111156113f857fe5b141592915050565b604080516a4d494e5445525f524f4c4560a81b8152905190819003600b01902061142c906110676125d4565b6114675760405162461bcd60e51b815260040180806020018281038252603d815260200180613eb8603d913960400191505060405180910390fd5b61147a81611475600c612ae9565b612aed565b6112b3600c612c27565b61271081565b600a8054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610deb5780601f10610dc057610100808354040283529160200191610deb565b60006001600160a01b0382166115325760405162461bcd60e51b815260040180806020018281038252602a815260200180613cb6602a913960400191505060405180910390fd5b6001600160a01b03821660009081526002602052604090206110e090612646565b61155b6125d4565b6001600160a01b031661156c61170a565b6001600160a01b0316146115b5576040805162461bcd60e51b81526020600482018190526024820152600080516020613d9b833981519152604482015290519081900360640190fd5b600d546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600d80546001600160a01b0319169055565b600f54610100900460ff166116455760405162461bcd60e51b8152600401808060200182810382526027815260200180613b4c6027913960400191505060405180910390fd5b6116566116506125d4565b83612651565b6116915760405162461bcd60e51b815260040180806020018281038252602b815260200180613e8d602b913960400191505060405180910390fd5b610f2e8282612c30565b604080516a5041555345525f524f4c4560a81b8152905190819003600b0190206116c7906110676125d4565b6117025760405162461bcd60e51b815260040180806020018281038252603e815260200180613b73603e913960400191505060405180910390fd5b611247612c76565b600d546001600160a01b031690565b60008281526020819052604081206110dd908363ffffffff6128c216565b60008281526020819052604081206110dd908363ffffffff612cf916565b60088054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610deb5780601f10610dc057610100808354040283529160200191610deb565b600f5460ff16611805576040805162461bcd60e51b8152602060048201526015602482015274151a1948139d5c9cd95c9e481a5cc818db1bdcd959605a1b604482015290519081900360640190fd5b61180d610f3a565b6127100381111561185d576040805162461bcd60e51b8152602060048201526015602482015274139bdd08195b9bdd59da08189d5b189cc81b19599d605a1b604482015290519081900360640190fd5b612710611868610f3a565b106118b3576040805162461bcd60e51b815260206004820152601660248201527514d85b19481a185cc8185b1c9958591e48195b99195960521b604482015290519081900360640190fd5b6000811180156118c4575060148111155b6118ff5760405162461bcd60e51b8152600401808060200182810382526030815260200180613de46030913960400191505060405180910390fd5b61271061191361190d610f3a565b83612d0e565b1115611966576040805162461bcd60e51b815260206004820152601860248201527f45786365656473204d41585f43525950544f5243484944530000000000000000604482015290519081900360640190fd5b611977611971611a5c565b82612d68565b3410156119b55760405162461bcd60e51b8152600401808060200182810382526023815260200180613d096023913960400191505060405180910390fd5b60005b818110156110b1576119ca602f612c27565b60006119d6602f612ae9565b6040805160a081018252600660608201908152656772616e756d60d01b608083015281526000196020808301919091526000828401819052848152600e8252929092208151805194955091939092611a32928492910190613954565b5060208201516001820155604090910151600290910155611a533382612dc1565b506001016119b8565b600080611a67610f3a565b90506126ac8110611a8357670de0b6b3a7640000915050610df3565b61251c8110611a9d576708e1bc9bf0400000915050610df3565b611d4c8110611ab757670470de4df8200000915050610df3565b610dac8110611ad1576702386f26fc100000915050610df3565b6105dc8110611aeb5767011c37937e080000915050610df3565b6101f48110611b045766d529ae9e860000915050610df3565b668e1bc9bf040000915050610df3565b5090565b600081565b611b256125d4565b6001600160a01b0316826001600160a01b03161415611b8b576040805162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015290519081900360640190fd5b8060066000611b986125d4565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff191692151592909217909155611bdc6125d4565b60408051841515815290516001600160a01b0392909216917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319181900360200190a35050565b611c2d610f756125d4565b611c685760405162461bcd60e51b8152600401808060200182810382526027815260200180613bfb6027913960400191505060405180910390fd5b611c71816113e0565b611c7a576112b3565b6000818152600e602052604081206002810154600182015491929091611c9e612ddb565b0390506000611cb08262093a80612ddf565b905080831115611cc357505050506112b3565b6000611cd0846001612d0e565b6002909501949094555050505050565b611ce86125d4565b6001600160a01b0316611cf961170a565b6001600160a01b031614611d42576040805162461bcd60e51b81526020600482018190526024820152600080516020613d9b833981519152604482015290519081900360640190fd5b600f805460ff19166001179055565b6000611d5b6139ce565b6000838152600e60209081526040918290208251815460026001821615610100026000190190911604601f81018490049093028101608090810190945260608101838152909391928492849190840182828015611df95780601f10611dce57610100808354040283529160200191611df9565b820191906000526020600020905b815481529060010190602001808311611ddc57829003601f168201915b50505050508152602001600182015481526020016002820154815250509050806020015160001415611e2f576000915050610d5a565b60001981602001511415611e47576001915050610d5a565b60408101516020820151600090611e5c612ddb565b0390506000611e6e8262093a80612ddf565b90506000611e7f8362093a80612e46565b905081841415611e9757600295505050505050610d5a565b81611ea3856001612d0e565b148015611eb15750612a3081105b15611ec457600295505050505050610d5a565b5060039695505050505050565b611edc6116506125d4565b611f175760405162461bcd60e51b8152600401808060200182810382526031815260200180613e5c6031913960400191505060405180910390fd5b611f2384848484612ead565b50505050565b606080611f35836112db565b5091925060019150611f449050565b611f4d84611d51565b6003811115611f5857fe5b141561203657611f6661148a565b6040518060600160405280602e8152602001613b1e602e91396040516020018083805190602001908083835b60208310611fb15780518252601f199092019160209182019101611f92565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b60208310611ff95780518252601f199092019160209182019101611fda565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052915050610d5a565b600261204184611d51565b600381111561204c57fe5b14156121bd5761205a61148a565b60316000836040516020018080602001828103825283818151815260200191508051906020019080838360005b8381101561209f578181015183820152602001612087565b50505050905090810190601f1680156120cc5780820380516001836020036101000a031916815260200191505b50925050506040516020818303038152906040528051906020012081526020019081526020016000206040516020018083805190602001908083835b602083106121275780518252601f199092019160209182019101612108565b6001836020036101000a038019825116818451168082178552505050505050905001828054600181600116156101000203166002900480156121a05780601f1061217e5761010080835404028352918201916121a0565b820191906000526020600020905b81548152906001019060200180831161218c575b505092505050604051602081830303815290604052915050610d5a565b6121c561148a565b60326000836040516020018080602001828103825283818151815260200191508051906020019080838360005b8381101561220a5781810151838201526020016121f2565b50505050905090810190601f1680156122375780820380516001836020036101000a031916815260200191505b50925050506040516020818303038152906040528051906020012081526020019081526020016000206040516020018083805190602001908083835b602083106122925780518252601f199092019160209182019101612273565b6001836020036101000a0380198251168184511680821785525050505050509050018280546001816001161561010002031660029004801561230b5780601f106122e957610100808354040283529182019161230b565b820191906000526020600020905b8154815290600101906020018083116122f7575b505060408051601f198184030181529190529695505050505050565b60008181526020819052604081206110e090612646565b600e6020908152600091825260409182902080548351601f600260001961010060018616150201909316929092049182018490048402810184019094528084529092918391908301828280156123d55780601f106123aa576101008083540402835291602001916123d5565b820191906000526020600020905b8154815290600101906020018083116123b857829003601f168201915b5050505050908060010154908060020154905083565b604080516a4d494e5445525f524f4c4560a81b8152905190819003600b01902081565b60008281526020819052604090206002015461242c906110676125d4565b61113d5760405162461bcd60e51b8152600401808060200182810382526030815260200180613c4e6030913960400191505060405180910390fd5b604080516a5041555345525f524f4c4560a81b8152905190819003600b01902081565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b6124c06125d4565b6001600160a01b03166124d161170a565b6001600160a01b03161461251a576040805162461bcd60e51b81526020600482018190526024820152600080516020613d9b833981519152604482015290519081900360640190fd5b6001600160a01b03811661255f5760405162461bcd60e51b8152600401808060200182810382526026815260200180613af86026913960400191505060405180910390fd5b600d546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600d80546001600160a01b0319166001600160a01b0392909216919091179055565b612a3081565b60006110e060038363ffffffff612eff16565b3390565b600081815260056020526040902080546001600160a01b0319166001600160a01b038416908117909155819061260d826113b2565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006110e082612ae9565b600061265c826125c1565b6126975760405162461bcd60e51b815260040180806020018281038252602c815260200180613c22602c913960400191505060405180910390fd5b60006126a2836113b2565b9050806001600160a01b0316846001600160a01b031614806126dd5750836001600160a01b03166126d284610df6565b6001600160a01b0316145b806126ed57506126ed818561248a565b949350505050565b826001600160a01b0316612708826113b2565b6001600160a01b03161461274d5760405162461bcd60e51b8152600401808060200182810382526029815260200180613dbb6029913960400191505060405180910390fd5b6001600160a01b0382166127925760405162461bcd60e51b8152600401808060200182810382526024815260200180613bb16024913960400191505060405180910390fd5b61279d838383612f0b565b6127a86000826125d8565b6001600160a01b03831660009081526002602052604090206127d0908263ffffffff612f6b16565b506001600160a01b03821660009081526002602052604090206127f9908263ffffffff612f7716565b5061280c6003828463ffffffff612f8316565b5080826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6000828152602081905260409020612871908263ffffffff612f9916565b156110b15761287e6125d4565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006110dd8383612fae565b60008281526020819052604090206128ec908263ffffffff61301216565b156110b1576128f96125d4565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b6129456112d2565b61298d576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b600b805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6129c06125d4565b604080516001600160a01b039092168252519081900360200190a1565b60006129e8826113b2565b90506129f681600084612f0b565b612a016000836125d8565b6000828152600960205260409020546002600019610100600184161502019091160415612a3f576000828152600960205260408120612a3f916139ef565b6001600160a01b0381166000908152600260205260409020612a67908363ffffffff612f6b16565b50612a7960038363ffffffff61302716565b5060405182906000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6000808080612ac58686613033565b9097909650945050505050565b6000612adf8484846130ae565b90505b9392505050565b5490565b6001600160a01b038216612b48576040805162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015290519081900360640190fd5b612b51816125c1565b15612ba3576040805162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015290519081900360640190fd5b612baf60008383612f0b565b6001600160a01b0382166000908152600260205260409020612bd7908263ffffffff612f7716565b50612bea6003828463ffffffff612f8316565b5060405181906001600160a01b038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b80546001019055565b6040805142602080830191909152448284015260608083018590528351808403909101815260809092019092528051910120600090612c6f8482613178565b5092915050565b612c7e6112d2565b15612cc3576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b600b805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586129c06125d4565b60006110dd836001600160a01b0384166131d2565b6000828201838110156110dd576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082612d77575060006110e0565b82820282848281612d8457fe5b04146110dd5760405162461bcd60e51b8152600401808060200182810382526021815260200180613d4e6021913960400191505060405180910390fd5b6110b18282604051806020016040528060008152506131ea565b4290565b6000808211612e35576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381612e3e57fe5b049392505050565b6000808211612e9c576040805162461bcd60e51b815260206004820152601860248201527f536166654d6174683a206d6f64756c6f206279207a65726f0000000000000000604482015290519081900360640190fd5b818381612ea557fe5b069392505050565b612eb88484846126f5565b612ec48484848461323c565b611f235760405162461bcd60e51b8152600401808060200182810382526032815260200180613ac66032913960400191505060405180910390fd5b60006110dd83836131d2565b6001600160a01b0382161580612f255750612f25816113e0565b612f605760405162461bcd60e51b8152600401808060200182810382526027815260200180613e356027913960400191505060405180910390fd5b610f2e8383836133bc565b60006110dd83836133c7565b60006110dd838361348d565b6000612adf84846001600160a01b0385166134d7565b60006110dd836001600160a01b03841661348d565b81546000908210612ff05760405162461bcd60e51b8152600401808060200182810382526022815260200180613a4a6022913960400191505060405180910390fd5b826000018281548110612fff57fe5b9060005260206000200154905092915050565b60006110dd836001600160a01b0384166133c7565b60006110dd838361356e565b8154600090819083106130775760405162461bcd60e51b8152600401808060200182810382526022815260200180613d2c6022913960400191505060405180910390fd5b600084600001848154811061308857fe5b906000526020600020906002020190508060000154816001015492509250509250929050565b600082815260018401602052604081205482816131495760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561310e5781810151838201526020016130f6565b50505050905090810190601f16801561313b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5084600001600182038154811061315c57fe5b9060005260206000209060020201600101549150509392505050565b6000828152600e60205260409020606061319c61319784612710612e46565b613642565b80519091506131b19083906020840190613954565b506131ba612ddb565b600183015560006131ca856113b2565b505050505050565b60009081526001919091016020526040902054151590565b6131f48383612aed565b613201600084848461323c565b610f2e5760405162461bcd60e51b8152600401808060200182810382526032815260200180613ac66032913960400191505060405180910390fd5b6000613250846001600160a01b031661372e565b61325c575060016126ed565b6060613382630a85bd0160e11b6132716125d4565b88878760405160240180856001600160a01b03166001600160a01b03168152602001846001600160a01b03166001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156132ea5781810151838201526020016132d2565b50505050905090810190601f1680156133175780820380516001836020036101000a031916815260200191505b5095505050505050604051602081830303815290604052906001600160e01b0319166020820180516001600160e01b038381831617835250505050604051806060016040528060328152602001613ac6603291396001600160a01b038816919063ffffffff61373416565b9050600081806020019051602081101561339b57600080fd5b50516001600160e01b031916630a85bd0160e11b1492505050949350505050565b610f2e838383613743565b6000818152600183016020526040812054801561348357835460001980830191908101906000908790839081106133fa57fe5b906000526020600020015490508087600001848154811061341757fe5b60009182526020808320909101929092558281526001898101909252604090209084019055865487908061344757fe5b600190038181906000526020600020016000905590558660010160008781526020019081526020016000206000905560019450505050506110e0565b60009150506110e0565b600061349983836131d2565b6134cf575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556110e0565b5060006110e0565b60008281526001840160205260408120548061353c575050604080518082018252838152602080820184815286546001818101895560008981528481209551600290930290950191825591519082015586548684528188019092529290912055612ae2565b8285600001600183038154811061354f57fe5b9060005260206000209060020201600101819055506000915050612ae2565b6000818152600183016020526040812054801561348357835460001980830191908101906000908790839081106135a157fe5b90600052602060002090600202019050808760000184815481106135c157fe5b60009182526020808320845460029093020191825560019384015491840191909155835482528983019052604090209084019055865487908061360057fe5b60008281526020808220600260001990940193840201828155600190810183905592909355888152898201909252604082209190915594506110e09350505050565b606060005b600a81101561372857601081600a811061365d57fe5b601091828204019190066002029054906101000a900461ffff1661ffff16831161372057601181600a811061368e57fe5b01805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156137135780601f106136e857610100808354040283529160200191613713565b820191906000526020600020905b8154815290600101906020018083116136f657829003601f168201915b5050505050915050610d5a565b600101613647565b50919050565b3b151590565b6060612adf8484600085613792565b61374e838383610f2e565b6137566112d2565b15610f2e5760405162461bcd60e51b815260040180806020018281038252602b815260200180613a6c602b913960400191505060405180910390fd5b6060824710156137d35760405162461bcd60e51b8152600401808060200182810382526026815260200180613bd56026913960400191505060405180910390fd5b6137dc8561372e565b61382d576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b6020831061386c5780518252601f19909201916020918201910161384d565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146138ce576040519150601f19603f3d011682016040523d82523d6000602084013e6138d3565b606091505b50915091506138e38282866138ee565b979650505050505050565b606083156138fd575081612ae2565b82511561390d5782518084602001fd5b60405162461bcd60e51b815260206004820181815284516024840152845185939192839260440191908501908083836000831561310e5781810151838201526020016130f6565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061399557805160ff19168380011785556139c2565b828001600101855582156139c2579182015b828111156139c25782518255916020019190600101906139a7565b50611b14929150613a2f565b60405180606001604052806060815260200160008152602001600081525090565b50805460018160011615610100020316600290046000825580601f10613a1557506112b3565b601f0160209004906000526020600020908101906112b391905b610df391905b80821115611b145760008155600101613a3556fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e64734552433732315061757361626c653a20746f6b656e207472616e73666572207768696c6520706175736564416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e744552433732313a207472616e7366657220746f206e6f6e20455243373231526563656976657220696d706c656d656e7465724f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373516d5764316d6e374475477978394279664e6571437367645355734a5a316372616769746761796773714476456d4765726d696e6174696f6e2073746172747320323032312d30342d31325431363a30303a30305a4552433732315072657365744d696e7465725061757365724175746f49643a206d75737420686176652070617573657220726f6c6520746f2070617573654552433732313a207472616e7366657220746f20746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c4f6e6c7920746865204f776e65722063616e20776174657220612043727970744f72636869642e4552433732313a206f70657261746f7220717565727920666f72206e6f6e6578697374656e7420746f6b656e416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b654552433732313a20617070726f76652063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f76656420666f7220616c6c4552433732313a2062616c616e636520717565727920666f7220746865207a65726f20616464726573734552433732313a206f776e657220717565727920666f72206e6f6e6578697374656e7420746f6b656e45746865722076616c75652073656e742069732062656c6f7720746865207072696365456e756d657261626c654d61703a20696e646578206f7574206f6620626f756e6473536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774552433732313a20617070726f76656420717565727920666f72206e6f6e6578697374656e7420746f6b656e4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65724552433732313a207472616e73666572206f6620746f6b656e2074686174206973206e6f74206f776e596f752063616e20706c616e74206d696e696d756d20312c206d6178696d756d2032302043727970744f7263686964734552433732313a20617070726f76616c20746f2063757272656e74206f776e6572446561642043727970744f7263686964732063616e6e6f74206265207472616e736665727265644552433732313a207472616e736665722063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f7665644f6e6c7920746865204f776e65722063616e206765726d696e61746520612043727970744f72636869642e4552433732315072657365744d696e7465725061757365724175746f49643a206d7573742068617665206d696e74657220726f6c6520746f206d696e744552433732314275726e61626c653a2063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f7665644552433732315072657365744d696e7465725061757365724175746f49643a206d75737420686176652070617573657220726f6c6520746f20756e7061757365416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220669084c037e9e2730b31d45e8cd7d87fcb21b2d1237df1dee094b97b3922927264736f6c63430006060033", + "devdoc": { + "methods": { + "approve(address,uint256)": { + "details": "See {IERC721-approve}." + }, + "balanceOf(address)": { + "details": "See {IERC721-balanceOf}." + }, + "baseURI()": { + "details": "Returns the base URI set via {_setBaseURI}. This will be automatically added as a prefix in {tokenURI} to each token's URI, or to the token ID if no specific URI is set for that token ID." + }, + "burn(uint256)": { + "details": "Burns `tokenId`. See {ERC721-_burn}. * Requirements: * - The caller must own `tokenId` or be an approved operator." + }, + "getApproved(uint256)": { + "details": "See {IERC721-getApproved}." + }, + "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." + }, + "hasRole(bytes32,address)": { + "details": "Returns `true` if `account` has been granted `role`." + }, + "isApprovedForAll(address,address)": { + "details": "See {IERC721-isApprovedForAll}." + }, + "mint(address)": { + "details": "Creates a new token for `to`. Its token ID will be automatically assigned (and available on the emitted {IERC721-Transfer} event), and the token URI autogenerated based on the base URI passed at construction. * See {ERC721-_mint}. * Requirements: * - the caller must have the `MINTER_ROLE`." + }, + "name()": { + "details": "See {IERC721Metadata-name}." + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "ownerOf(uint256)": { + "details": "See {IERC721-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." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. * NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "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 granted `role`, emits a {RoleRevoked} event. * Requirements: * - the caller must be `account`." + }, + "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." + }, + "safeTransferFrom(address,address,uint256)": { + "details": "See {IERC721-safeTransferFrom}." + }, + "safeTransferFrom(address,address,uint256,bytes)": { + "details": "See {IERC721-safeTransferFrom}." + }, + "setApprovalForAll(address,bool)": { + "details": "See {IERC721-setApprovalForAll}." + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}. * Time complexity O(1), guaranteed to always use less than 30 000 gas." + }, + "symbol()": { + "details": "See {IERC721Metadata-symbol}." + }, + "tokenByIndex(uint256)": { + "details": "See {IERC721Enumerable-tokenByIndex}." + }, + "tokenOfOwnerByIndex(address,uint256)": { + "details": "See {IERC721Enumerable-tokenOfOwnerByIndex}." + }, + "totalSupply()": { + "details": "See {IERC721Enumerable-totalSupply}." + }, + "transferFrom(address,address,uint256)": { + "details": "See {IERC721-transferFrom}." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "unpause()": { + "details": "Unpauses all token transfers. * See {ERC721Pausable} and {Pausable-_unpause}. * Requirements: * - the caller must have the `PAUSER_ROLE`." + }, + "withdraw()": { + "details": "Withdraw ether from this contract (Callable by owner only)" + } + } + }, + "userdoc": { + "methods": {} + }, + "storageLayout": { + "storage": [ + { + "astId": 549, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "_roles", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_struct(RoleData)545_storage)" + }, + { + "astId": 932, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "_supportedInterfaces", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes4,t_bool)" + }, + { + "astId": 3555, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "_holderTokens", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_struct(UintSet)6038_storage)" + }, + { + "astId": 3557, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "_tokenOwners", + "offset": 0, + "slot": "3", + "type": "t_struct(UintToAddressMap)5415_storage" + }, + { + "astId": 3561, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "_tokenApprovals", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_uint256,t_address)" + }, + { + "astId": 3567, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "_operatorApprovals", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_address,t_mapping(t_address,t_bool))" + }, + { + "astId": 3569, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "_name", + "offset": 0, + "slot": "7", + "type": "t_string_storage" + }, + { + "astId": 3571, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "_symbol", + "offset": 0, + "slot": "8", + "type": "t_string_storage" + }, + { + "astId": 3575, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "_tokenURIs", + "offset": 0, + "slot": "9", + "type": "t_mapping(t_uint256,t_string_storage)" + }, + { + "astId": 3577, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "_baseURI", + "offset": 0, + "slot": "10", + "type": "t_string_storage" + }, + { + "astId": 6151, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "_paused", + "offset": 0, + "slot": "11", + "type": "t_bool" + }, + { + "astId": 1374, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "_tokenIdTracker", + "offset": 0, + "slot": "12", + "type": "t_struct(Counter)5041_storage" + }, + { + "astId": 817, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "_owner", + "offset": 0, + "slot": "13", + "type": "t_address" + }, + { + "astId": 8425, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "cryptorchids", + "offset": 0, + "slot": "14", + "type": "t_mapping(t_uint256,t_struct(CryptOrchid)8421_storage)" + }, + { + "astId": 8433, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "saleStarted", + "offset": 0, + "slot": "15", + "type": "t_bool" + }, + { + "astId": 8436, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "growingStarted", + "offset": 1, + "slot": "15", + "type": "t_bool" + }, + { + "astId": 8470, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "limits", + "offset": 0, + "slot": "16", + "type": "t_array(t_uint16)10_storage" + }, + { + "astId": 8485, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "genum", + "offset": 0, + "slot": "17", + "type": "t_array(t_string_storage)10_storage" + }, + { + "astId": 8500, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "speciesIPFSConstant", + "offset": 0, + "slot": "27", + "type": "t_array(t_string_storage)10_storage" + }, + { + "astId": 8515, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "deadSpeciesIPFSConstant", + "offset": 0, + "slot": "37", + "type": "t_array(t_string_storage)10_storage" + }, + { + "astId": 8517, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "_tokenIds", + "offset": 0, + "slot": "47", + "type": "t_struct(Counter)5041_storage" + }, + { + "astId": 8521, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "requestToToken", + "offset": 0, + "slot": "48", + "type": "t_mapping(t_bytes32,t_uint256)" + }, + { + "astId": 8525, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "speciesIPFS", + "offset": 0, + "slot": "49", + "type": "t_mapping(t_bytes32,t_string_storage)" + }, + { + "astId": 8529, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "deadSpeciesIPFS", + "offset": 0, + "slot": "50", + "type": "t_mapping(t_bytes32,t_string_storage)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_array(t_string_storage)10_storage": { + "base": "t_string_storage", + "encoding": "inplace", + "label": "string[10]", + "numberOfBytes": "320" + }, + "t_array(t_struct(MapEntry)5089_storage)dyn_storage": { + "base": "t_struct(MapEntry)5089_storage", + "encoding": "dynamic_array", + "label": "struct EnumerableMap.MapEntry[]", + "numberOfBytes": "32" + }, + "t_array(t_uint16)10_storage": { + "base": "t_uint16", + "encoding": "inplace", + "label": "uint16[10]", + "numberOfBytes": "32" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_bytes4": { + "encoding": "inplace", + "label": "bytes4", + "numberOfBytes": "4" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_mapping(t_address,t_bool))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => bool))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_bool)" + }, + "t_mapping(t_address,t_struct(UintSet)6038_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct EnumerableSet.UintSet)", + "numberOfBytes": "32", + "value": "t_struct(UintSet)6038_storage" + }, + "t_mapping(t_bytes32,t_string_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => string)", + "numberOfBytes": "32", + "value": "t_string_storage" + }, + "t_mapping(t_bytes32,t_struct(RoleData)545_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct AccessControl.RoleData)", + "numberOfBytes": "32", + "value": "t_struct(RoleData)545_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_bytes4,t_bool)": { + "encoding": "mapping", + "key": "t_bytes4", + "label": "mapping(bytes4 => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_uint256,t_address)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_uint256,t_string_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => string)", + "numberOfBytes": "32", + "value": "t_string_storage" + }, + "t_mapping(t_uint256,t_struct(CryptOrchid)8421_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => struct CryptOrchidGoerli.CryptOrchid)", + "numberOfBytes": "32", + "value": "t_struct(CryptOrchid)8421_storage" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(AddressSet)5917_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.AddressSet", + "members": [ + { + "astId": 5916, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)5652_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Counter)5041_storage": { + "encoding": "inplace", + "label": "struct Counters.Counter", + "members": [ + { + "astId": 5040, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "_value", + "offset": 0, + "slot": "0", + "type": "t_uint256" + } + ], + "numberOfBytes": "32" + }, + "t_struct(CryptOrchid)8421_storage": { + "encoding": "inplace", + "label": "struct CryptOrchidGoerli.CryptOrchid", + "members": [ + { + "astId": 8416, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "species", + "offset": 0, + "slot": "0", + "type": "t_string_storage" + }, + { + "astId": 8418, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "plantedAt", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 8420, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "waterLevel", + "offset": 0, + "slot": "2", + "type": "t_uint256" + } + ], + "numberOfBytes": "96" + }, + "t_struct(Map)5097_storage": { + "encoding": "inplace", + "label": "struct EnumerableMap.Map", + "members": [ + { + "astId": 5092, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "_entries", + "offset": 0, + "slot": "0", + "type": "t_array(t_struct(MapEntry)5089_storage)dyn_storage" + }, + { + "astId": 5096, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(MapEntry)5089_storage": { + "encoding": "inplace", + "label": "struct EnumerableMap.MapEntry", + "members": [ + { + "astId": 5086, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "_key", + "offset": 0, + "slot": "0", + "type": "t_bytes32" + }, + { + "astId": 5088, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "_value", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ], + "numberOfBytes": "64" + }, + "t_struct(RoleData)545_storage": { + "encoding": "inplace", + "label": "struct AccessControl.RoleData", + "members": [ + { + "astId": 542, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "members", + "offset": 0, + "slot": "0", + "type": "t_struct(AddressSet)5917_storage" + }, + { + "astId": 544, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "adminRole", + "offset": 0, + "slot": "2", + "type": "t_bytes32" + } + ], + "numberOfBytes": "96" + }, + "t_struct(Set)5652_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 5647, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 5651, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(UintSet)6038_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.UintSet", + "members": [ + { + "astId": 6037, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)5652_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(UintToAddressMap)5415_storage": { + "encoding": "inplace", + "label": "struct EnumerableMap.UintToAddressMap", + "members": [ + { + "astId": 5414, + "contract": "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol:CryptOrchidGoerli", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Map)5097_storage" + } + ], + "numberOfBytes": "64" + }, + "t_uint16": { + "encoding": "inplace", + "label": "uint16", + "numberOfBytes": "2" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/goerli/CryptOrchidRootTunnel.json b/deployments/goerli/CryptOrchidRootTunnel.json new file mode 100644 index 0000000..c861eb3 --- /dev/null +++ b/deployments/goerli/CryptOrchidRootTunnel.json @@ -0,0 +1,296 @@ +{ + "address": "0x4d3991906E23fA3E7b7297569C3bE3c3B4F3fFeB", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_checkpointManager", + "type": "address" + }, + { + "internalType": "address", + "name": "_fxRoot", + "type": "address" + }, + { + "internalType": "address", + "name": "_CryptOrchidERC721", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "CryptOrchidERC721", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "SEND_MESSAGE_EVENT_SIG", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "checkpointManager", + "outputs": [ + { + "internalType": "contract ICheckpointManager", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fxChildTunnel", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fxRoot", + "outputs": [ + { + "internalType": "contract IFxStateSender", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "latestData", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "processedExits", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "inputData", + "type": "bytes" + } + ], + "name": "receiveMessage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "sendMessageToChild", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_fxChildTunnel", + "type": "address" + } + ], + "name": "setFxChildTunnel", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xda36401ab6eb431651ebb879d17216daa70fbf46b1beadbf04e648ae305c8c8a", + "receipt": { + "to": null, + "from": "0x0090720FeD7Fed66eD658118b7B3BB0189D3A495", + "contractAddress": "0x4d3991906E23fA3E7b7297569C3bE3c3B4F3fFeB", + "transactionIndex": 32, + "gasUsed": "1775858", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x068c0757f02bdd3229ef0b475e929adbbc1d0f6745d44b95009c9ed3b9e0eb63", + "transactionHash": "0xda36401ab6eb431651ebb879d17216daa70fbf46b1beadbf04e648ae305c8c8a", + "logs": [], + "blockNumber": 4865987, + "cumulativeGasUsed": "7993442", + "status": 1, + "byzantium": true + }, + "args": [ + "0x2890bA17EfE978480615e330ecB65333b880928e", + "0x3d1d3E34f7fB6D26245E6640E1c50710eFFf15bA", + "0xb3EA7Cbb180d834c279B06873b6A971CCe701468" + ], + "solcInputHash": "044a1064ec6b174d77e4f6f8cf396848", + "metadata": "{\"compiler\":{\"version\":\"0.6.6+commit.6c089d02\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_checkpointManager\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_fxRoot\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_CryptOrchidERC721\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"CryptOrchidERC721\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SEND_MESSAGE_EVENT_SIG\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"checkpointManager\",\"outputs\":[{\"internalType\":\"contract ICheckpointManager\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fxChildTunnel\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fxRoot\",\"outputs\":[{\"internalType\":\"contract IFxStateSender\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestData\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"processedExits\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"inputData\",\"type\":\"bytes\"}],\"name\":\"receiveMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"sendMessageToChild\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_fxChildTunnel\",\"type\":\"address\"}],\"name\":\"setFxChildTunnel\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"receiveMessage(bytes)\":{\"details\":\"This function verifies if the transaction actually happened on child chain\",\"params\":{\"inputData\":\"RLP encoded data of the reference tx containing following list of fields 0 - headerNumber - Checkpoint header block number containing the reference tx 1 - blockProof - Proof that the block header (in the child chain) is a leaf in the submitted merkle root 2 - blockNumber - Block number containing the reference tx on child chain 3 - blockTime - Reference tx block time 4 - txRoot - Transactions root of block 5 - receiptRoot - Receipts root of block 6 - receipt - Receipt of the reference transaction 7 - receiptProof - Merkle proof of the reference receipt 8 - branchMask - 32 bits denoting the path of receipt in merkle tree 9 - receiptLogIndex - Log Index to read from the receipt\"}}},\"title\":\"CryptOrchidRootTunnel\"},\"userdoc\":{\"methods\":{\"receiveMessage(bytes)\":{\"notice\":\"receive message from L2 to L1, validated by proof\"}}}},\"settings\":{\"compilationTarget\":{\"contracts/CryptOrchidRootTunnel/CryptOrchidRootTunnel.sol\":\"CryptOrchidRootTunnel\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/CryptOrchidRootTunnel/CryptOrchidRootTunnel.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.6.6 <0.9.0;\\n\\nimport {FxBaseRootTunnel} from \\\"../Libraries/tunnel/FxBaseRootTunnel.sol\\\";\\n\\ninterface CryptOrchidParent {\\n enum Stage {Unsold, Seed, Flower, Dead}\\n\\n function getTokenMetadata(uint256 tokenId)\\n external\\n view\\n returns (\\n string memory,\\n uint256,\\n uint256,\\n Stage\\n );\\n}\\n\\n/**\\n * @title CryptOrchidRootTunnel\\n */\\ncontract CryptOrchidRootTunnel is FxBaseRootTunnel {\\n bytes public latestData;\\n address public CryptOrchidERC721;\\n\\n constructor(\\n address _checkpointManager,\\n address _fxRoot,\\n address _CryptOrchidERC721\\n ) public FxBaseRootTunnel(_checkpointManager, _fxRoot) {\\n CryptOrchidERC721 = _CryptOrchidERC721;\\n }\\n\\n function _processMessageFromChild(bytes memory data) internal override {\\n latestData = data;\\n uint256 tokenId = abi.decode(data, (uint256));\\n sendMessageToChild(tokenId);\\n }\\n\\n function sendMessageToChild(uint256 tokenId) public {\\n // TODO:\\n // 1. check owner?\\n\\n (string memory species, uint256 plantedAt, uint256 waterLevel, ) = CryptOrchidParent(CryptOrchidERC721)\\n .getTokenMetadata(tokenId);\\n\\n bytes memory message = abi.encode(species, plantedAt, waterLevel, tokenId);\\n\\n _sendMessageToChild(message);\\n }\\n}\\n\",\"keccak256\":\"0x8ecf7285367936fa40be85e563922839297116a49e7b5699a51b6912851dd422\"},\"contracts/Libraries/tunnel/FxBaseRootTunnel.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.6.6 <0.9.0;\\n\\nimport {RLPReader} from \\\"./RLPReader.sol\\\";\\nimport {MerklePatriciaProof} from \\\"./MerklePatriciaProof.sol\\\";\\nimport {Merkle} from \\\"./Merkle.sol\\\";\\n\\ninterface IFxStateSender {\\n function sendMessageToChild(address _receiver, bytes calldata _data) external;\\n}\\n\\ncontract ICheckpointManager {\\n struct HeaderBlock {\\n bytes32 root;\\n uint256 start;\\n uint256 end;\\n uint256 createdAt;\\n address proposer;\\n }\\n\\n /**\\n * @notice mapping of checkpoint header numbers to block details\\n * @dev These checkpoints are submited by plasma contracts\\n */\\n mapping(uint256 => HeaderBlock) public headerBlocks;\\n}\\n\\nabstract contract FxBaseRootTunnel {\\n using RLPReader for bytes;\\n using RLPReader for RLPReader.RLPItem;\\n using Merkle for bytes32;\\n\\n // keccak256(MessageSent(bytes))\\n bytes32 public constant SEND_MESSAGE_EVENT_SIG = 0x8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036;\\n\\n // state sender contract\\n IFxStateSender public fxRoot;\\n // root chain manager\\n ICheckpointManager public checkpointManager;\\n // child tunnel contract which receives and sends messages\\n address public fxChildTunnel;\\n\\n // storage to avoid duplicate exits\\n mapping(bytes32 => bool) public processedExits;\\n\\n constructor(address _checkpointManager, address _fxRoot) internal {\\n checkpointManager = ICheckpointManager(_checkpointManager);\\n fxRoot = IFxStateSender(_fxRoot);\\n }\\n\\n // set fxChildTunnel if not set already\\n function setFxChildTunnel(address _fxChildTunnel) public {\\n require(fxChildTunnel == address(0x0), \\\"FxBaseRootTunnel: CHILD_TUNNEL_ALREADY_SET\\\");\\n fxChildTunnel = _fxChildTunnel;\\n }\\n\\n /**\\n * @notice Send bytes message to Child Tunnel\\n * @param message bytes message that will be sent to Child Tunnel\\n * some message examples -\\n * abi.encode(tokenId);\\n * abi.encode(tokenId, tokenMetadata);\\n * abi.encode(messageType, messageData);\\n */\\n function _sendMessageToChild(bytes memory message) internal {\\n fxRoot.sendMessageToChild(fxChildTunnel, message);\\n }\\n\\n function _validateAndExtractMessage(bytes memory inputData) internal returns (bytes memory) {\\n RLPReader.RLPItem[] memory inputDataRLPList = inputData.toRlpItem().toList();\\n\\n // checking if exit has already been processed\\n // unique exit is identified using hash of (blockNumber, branchMask, receiptLogIndex)\\n bytes32 exitHash = keccak256(\\n abi.encodePacked(\\n inputDataRLPList[2].toUint(), // blockNumber\\n // first 2 nibbles are dropped while generating nibble array\\n // this allows branch masks that are valid but bypass exitHash check (changing first 2 nibbles only)\\n // so converting to nibble array and then hashing it\\n MerklePatriciaProof._getNibbleArray(inputDataRLPList[8].toBytes()), // branchMask\\n inputDataRLPList[9].toUint() // receiptLogIndex\\n )\\n );\\n require(processedExits[exitHash] == false, \\\"FxRootTunnel: EXIT_ALREADY_PROCESSED\\\");\\n processedExits[exitHash] = true;\\n\\n RLPReader.RLPItem[] memory receiptRLPList = inputDataRLPList[6].toBytes().toRlpItem().toList();\\n RLPReader.RLPItem memory logRLP = receiptRLPList[3].toList()[inputDataRLPList[9].toUint()]; // receiptLogIndex\\n\\n RLPReader.RLPItem[] memory logRLPList = logRLP.toList();\\n\\n // check child tunnel\\n require(fxChildTunnel == RLPReader.toAddress(logRLPList[0]), \\\"FxRootTunnel: INVALID_FX_CHILD_TUNNEL\\\");\\n\\n // verify receipt inclusion\\n require(\\n MerklePatriciaProof.verify(\\n inputDataRLPList[6].toBytes(), // receipt\\n inputDataRLPList[8].toBytes(), // branchMask\\n inputDataRLPList[7].toBytes(), // receiptProof\\n bytes32(inputDataRLPList[5].toUint()) // receiptRoot\\n ),\\n \\\"FxRootTunnel: INVALID_RECEIPT_PROOF\\\"\\n );\\n\\n // verify checkpoint inclusion\\n _checkBlockMembershipInCheckpoint(\\n inputDataRLPList[2].toUint(), // blockNumber\\n inputDataRLPList[3].toUint(), // blockTime\\n bytes32(inputDataRLPList[4].toUint()), // txRoot\\n bytes32(inputDataRLPList[5].toUint()), // receiptRoot\\n inputDataRLPList[0].toUint(), // headerNumber\\n inputDataRLPList[1].toBytes() // blockProof\\n );\\n\\n RLPReader.RLPItem[] memory logTopicRLPList = logRLPList[1].toList(); // topics\\n\\n require(\\n bytes32(logTopicRLPList[0].toUint()) == SEND_MESSAGE_EVENT_SIG, // topic0 is event sig\\n \\\"FxRootTunnel: INVALID_SIGNATURE\\\"\\n );\\n\\n // received message data\\n bytes memory receivedData = logRLPList[2].toBytes();\\n bytes memory message = abi.decode(receivedData, (bytes)); // event decodes params again, so decoding bytes to get message\\n return message;\\n }\\n\\n function _checkBlockMembershipInCheckpoint(\\n uint256 blockNumber,\\n uint256 blockTime,\\n bytes32 txRoot,\\n bytes32 receiptRoot,\\n uint256 headerNumber,\\n bytes memory blockProof\\n ) private view returns (uint256) {\\n (bytes32 headerRoot, uint256 startBlock, , uint256 createdAt, ) = checkpointManager.headerBlocks(headerNumber);\\n\\n require(\\n keccak256(abi.encodePacked(blockNumber, blockTime, txRoot, receiptRoot)).checkMembership(\\n blockNumber - startBlock,\\n headerRoot,\\n blockProof\\n ),\\n \\\"FxRootTunnel: INVALID_HEADER\\\"\\n );\\n return createdAt;\\n }\\n\\n /**\\n * @notice receive message from L2 to L1, validated by proof\\n * @dev This function verifies if the transaction actually happened on child chain\\n *\\n * @param inputData RLP encoded data of the reference tx containing following list of fields\\n * 0 - headerNumber - Checkpoint header block number containing the reference tx\\n * 1 - blockProof - Proof that the block header (in the child chain) is a leaf in the submitted merkle root\\n * 2 - blockNumber - Block number containing the reference tx on child chain\\n * 3 - blockTime - Reference tx block time\\n * 4 - txRoot - Transactions root of block\\n * 5 - receiptRoot - Receipts root of block\\n * 6 - receipt - Receipt of the reference transaction\\n * 7 - receiptProof - Merkle proof of the reference receipt\\n * 8 - branchMask - 32 bits denoting the path of receipt in merkle tree\\n * 9 - receiptLogIndex - Log Index to read from the receipt\\n */\\n function receiveMessage(bytes memory inputData) public virtual {\\n bytes memory message = _validateAndExtractMessage(inputData);\\n _processMessageFromChild(message);\\n }\\n\\n /**\\n * @notice Process message received from Child Tunnel\\n * @dev function needs to be implemented to handle message as per requirement\\n * This is called by onStateReceive function.\\n * Since it is called via a system call, any event will not be emitted during its execution.\\n * @param message bytes message that was sent from Child Tunnel\\n */\\n function _processMessageFromChild(bytes memory message) internal virtual;\\n}\\n\",\"keccak256\":\"0xf886005b901e40c04e6ab7902efbc65314855897f57d240629886c06873c757f\"},\"contracts/Libraries/tunnel/Merkle.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.6.6 <0.9.0;\\n\\nlibrary Merkle {\\n function checkMembership(\\n bytes32 leaf,\\n uint256 index,\\n bytes32 rootHash,\\n bytes memory proof\\n ) internal pure returns (bool) {\\n require(proof.length % 32 == 0, \\\"Invalid proof length\\\");\\n uint256 proofHeight = proof.length / 32;\\n // Proof of size n means, height of the tree is n+1.\\n // In a tree of height n+1, max #leafs possible is 2 ^ n\\n require(index < 2**proofHeight, \\\"Leaf index is too big\\\");\\n\\n bytes32 proofElement;\\n bytes32 computedHash = leaf;\\n for (uint256 i = 32; i <= proof.length; i += 32) {\\n assembly {\\n proofElement := mload(add(proof, i))\\n }\\n\\n if (index % 2 == 0) {\\n computedHash = keccak256(abi.encodePacked(computedHash, proofElement));\\n } else {\\n computedHash = keccak256(abi.encodePacked(proofElement, computedHash));\\n }\\n\\n index = index / 2;\\n }\\n return computedHash == rootHash;\\n }\\n}\\n\",\"keccak256\":\"0x75e1779f276a19fcb26a9865a7c5405b7c35928dc24bdc03d9fd0c55f10650bf\"},\"contracts/Libraries/tunnel/MerklePatriciaProof.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.6.6 <0.9.0;\\n\\nimport {RLPReader} from \\\"./RLPReader.sol\\\";\\n\\nlibrary MerklePatriciaProof {\\n /*\\n * @dev Verifies a merkle patricia proof.\\n * @param value The terminating value in the trie.\\n * @param encodedPath The path in the trie leading to value.\\n * @param rlpParentNodes The rlp encoded stack of nodes.\\n * @param root The root hash of the trie.\\n * @return The boolean validity of the proof.\\n */\\n function verify(\\n bytes memory value,\\n bytes memory encodedPath,\\n bytes memory rlpParentNodes,\\n bytes32 root\\n ) internal pure returns (bool) {\\n RLPReader.RLPItem memory item = RLPReader.toRlpItem(rlpParentNodes);\\n RLPReader.RLPItem[] memory parentNodes = RLPReader.toList(item);\\n\\n bytes memory currentNode;\\n RLPReader.RLPItem[] memory currentNodeList;\\n\\n bytes32 nodeKey = root;\\n uint256 pathPtr = 0;\\n\\n bytes memory path = _getNibbleArray(encodedPath);\\n if (path.length == 0) {\\n return false;\\n }\\n\\n for (uint256 i = 0; i < parentNodes.length; i++) {\\n if (pathPtr > path.length) {\\n return false;\\n }\\n\\n currentNode = RLPReader.toRlpBytes(parentNodes[i]);\\n if (nodeKey != keccak256(currentNode)) {\\n return false;\\n }\\n currentNodeList = RLPReader.toList(parentNodes[i]);\\n\\n if (currentNodeList.length == 17) {\\n if (pathPtr == path.length) {\\n if (keccak256(RLPReader.toBytes(currentNodeList[16])) == keccak256(value)) {\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n uint8 nextPathNibble = uint8(path[pathPtr]);\\n if (nextPathNibble > 16) {\\n return false;\\n }\\n nodeKey = bytes32(RLPReader.toUintStrict(currentNodeList[nextPathNibble]));\\n pathPtr += 1;\\n } else if (currentNodeList.length == 2) {\\n uint256 traversed = _nibblesToTraverse(RLPReader.toBytes(currentNodeList[0]), path, pathPtr);\\n if (pathPtr + traversed == path.length) {\\n //leaf node\\n if (keccak256(RLPReader.toBytes(currentNodeList[1])) == keccak256(value)) {\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n //extension node\\n if (traversed == 0) {\\n return false;\\n }\\n\\n pathPtr += traversed;\\n nodeKey = bytes32(RLPReader.toUintStrict(currentNodeList[1]));\\n } else {\\n return false;\\n }\\n }\\n }\\n\\n function _nibblesToTraverse(\\n bytes memory encodedPartialPath,\\n bytes memory path,\\n uint256 pathPtr\\n ) private pure returns (uint256) {\\n uint256 len = 0;\\n // encodedPartialPath has elements that are each two hex characters (1 byte), but partialPath\\n // and slicedPath have elements that are each one hex character (1 nibble)\\n bytes memory partialPath = _getNibbleArray(encodedPartialPath);\\n bytes memory slicedPath = new bytes(partialPath.length);\\n\\n // pathPtr counts nibbles in path\\n // partialPath.length is a number of nibbles\\n for (uint256 i = pathPtr; i < pathPtr + partialPath.length; i++) {\\n bytes1 pathNibble = path[i];\\n slicedPath[i - pathPtr] = pathNibble;\\n }\\n\\n if (keccak256(partialPath) == keccak256(slicedPath)) {\\n len = partialPath.length;\\n } else {\\n len = 0;\\n }\\n return len;\\n }\\n\\n // bytes b must be hp encoded\\n function _getNibbleArray(bytes memory b) internal pure returns (bytes memory) {\\n bytes memory nibbles = \\\"\\\";\\n if (b.length > 0) {\\n uint8 offset;\\n uint8 hpNibble = uint8(_getNthNibbleOfBytes(0, b));\\n if (hpNibble == 1 || hpNibble == 3) {\\n nibbles = new bytes(b.length * 2 - 1);\\n bytes1 oddNibble = _getNthNibbleOfBytes(1, b);\\n nibbles[0] = oddNibble;\\n offset = 1;\\n } else {\\n nibbles = new bytes(b.length * 2 - 2);\\n offset = 0;\\n }\\n\\n for (uint256 i = offset; i < nibbles.length; i++) {\\n nibbles[i] = _getNthNibbleOfBytes(i - offset + 2, b);\\n }\\n }\\n return nibbles;\\n }\\n\\n function _getNthNibbleOfBytes(uint256 n, bytes memory str) private pure returns (bytes1) {\\n return bytes1(n % 2 == 0 ? uint8(str[n / 2]) / 0x10 : uint8(str[n / 2]) % 0x10);\\n }\\n}\\n\",\"keccak256\":\"0x385acb922054e3bf199668e5f3ce36f597c6e7ead1d3a2cc0fd6a6406e1136a3\"},\"contracts/Libraries/tunnel/RLPReader.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.6.6 <0.9.0;\\n\\nlibrary RLPReader {\\n uint8 constant STRING_SHORT_START = 0x80;\\n uint8 constant STRING_LONG_START = 0xb8;\\n uint8 constant LIST_SHORT_START = 0xc0;\\n uint8 constant LIST_LONG_START = 0xf8;\\n uint8 constant WORD_SIZE = 32;\\n\\n struct RLPItem {\\n uint256 len;\\n uint256 memPtr;\\n }\\n\\n /*\\n * @param item RLP encoded bytes\\n */\\n function toRlpItem(bytes memory item) internal pure returns (RLPItem memory) {\\n require(item.length > 0, \\\"RLPReader: INVALID_BYTES_LENGTH\\\");\\n uint256 memPtr;\\n assembly {\\n memPtr := add(item, 0x20)\\n }\\n\\n return RLPItem(item.length, memPtr);\\n }\\n\\n /*\\n * @param item RLP encoded list in bytes\\n */\\n function toList(RLPItem memory item) internal pure returns (RLPItem[] memory) {\\n require(isList(item), \\\"RLPReader: ITEM_NOT_LIST\\\");\\n\\n uint256 items = numItems(item);\\n RLPItem[] memory result = new RLPItem[](items);\\n uint256 listLength = _itemLength(item.memPtr);\\n require(listLength == item.len, \\\"RLPReader: LIST_DECODED_LENGTH_MISMATCH\\\");\\n\\n uint256 memPtr = item.memPtr + _payloadOffset(item.memPtr);\\n uint256 dataLen;\\n for (uint256 i = 0; i < items; i++) {\\n dataLen = _itemLength(memPtr);\\n result[i] = RLPItem(dataLen, memPtr);\\n memPtr = memPtr + dataLen;\\n }\\n\\n return result;\\n }\\n\\n // @return indicator whether encoded payload is a list. negate this function call for isData.\\n function isList(RLPItem memory item) internal pure returns (bool) {\\n uint8 byte0;\\n uint256 memPtr = item.memPtr;\\n assembly {\\n byte0 := byte(0, mload(memPtr))\\n }\\n\\n if (byte0 < LIST_SHORT_START) return false;\\n return true;\\n }\\n\\n /** RLPItem conversions into data types **/\\n\\n // @returns raw rlp encoding in bytes\\n function toRlpBytes(RLPItem memory item) internal pure returns (bytes memory) {\\n bytes memory result = new bytes(item.len);\\n\\n uint256 ptr;\\n assembly {\\n ptr := add(0x20, result)\\n }\\n\\n copy(item.memPtr, ptr, item.len);\\n return result;\\n }\\n\\n function toAddress(RLPItem memory item) internal pure returns (address) {\\n require(!isList(item), \\\"RLPReader: DECODING_LIST_AS_ADDRESS\\\");\\n // 1 byte for the length prefix\\n require(item.len == 21, \\\"RLPReader: INVALID_ADDRESS_LENGTH\\\");\\n\\n return address(toUint(item));\\n }\\n\\n function toUint(RLPItem memory item) internal pure returns (uint256) {\\n require(!isList(item), \\\"RLPReader: DECODING_LIST_AS_UINT\\\");\\n require(item.len <= 33, \\\"RLPReader: INVALID_UINT_LENGTH\\\");\\n\\n uint256 itemLength = _itemLength(item.memPtr);\\n require(itemLength == item.len, \\\"RLPReader: UINT_DECODED_LENGTH_MISMATCH\\\");\\n\\n uint256 offset = _payloadOffset(item.memPtr);\\n uint256 len = item.len - offset;\\n uint256 result;\\n uint256 memPtr = item.memPtr + offset;\\n assembly {\\n result := mload(memPtr)\\n\\n // shfit to the correct location if neccesary\\n if lt(len, 32) {\\n result := div(result, exp(256, sub(32, len)))\\n }\\n }\\n\\n return result;\\n }\\n\\n // enforces 32 byte length\\n function toUintStrict(RLPItem memory item) internal pure returns (uint256) {\\n uint256 itemLength = _itemLength(item.memPtr);\\n require(itemLength == item.len, \\\"RLPReader: UINT_STRICT_DECODED_LENGTH_MISMATCH\\\");\\n // one byte prefix\\n require(item.len == 33, \\\"RLPReader: INVALID_UINT_STRICT_LENGTH\\\");\\n\\n uint256 result;\\n uint256 memPtr = item.memPtr + 1;\\n assembly {\\n result := mload(memPtr)\\n }\\n\\n return result;\\n }\\n\\n function toBytes(RLPItem memory item) internal pure returns (bytes memory) {\\n uint256 listLength = _itemLength(item.memPtr);\\n require(listLength == item.len, \\\"RLPReader: BYTES_DECODED_LENGTH_MISMATCH\\\");\\n uint256 offset = _payloadOffset(item.memPtr);\\n\\n uint256 len = item.len - offset; // data length\\n bytes memory result = new bytes(len);\\n\\n uint256 destPtr;\\n assembly {\\n destPtr := add(0x20, result)\\n }\\n\\n copy(item.memPtr + offset, destPtr, len);\\n return result;\\n }\\n\\n /*\\n * Private Helpers\\n */\\n\\n // @return number of payload items inside an encoded list.\\n function numItems(RLPItem memory item) private pure returns (uint256) {\\n // add `isList` check if `item` is expected to be passsed without a check from calling function\\n // require(isList(item), \\\"RLPReader: NUM_ITEMS_NOT_LIST\\\");\\n\\n uint256 count = 0;\\n uint256 currPtr = item.memPtr + _payloadOffset(item.memPtr);\\n uint256 endPtr = item.memPtr + item.len;\\n while (currPtr < endPtr) {\\n currPtr = currPtr + _itemLength(currPtr); // skip over an item\\n require(currPtr <= endPtr, \\\"RLPReader: NUM_ITEMS_DECODED_LENGTH_MISMATCH\\\");\\n count++;\\n }\\n\\n return count;\\n }\\n\\n // @return entire rlp item byte length\\n function _itemLength(uint256 memPtr) private pure returns (uint256) {\\n uint256 itemLen;\\n uint256 byte0;\\n assembly {\\n byte0 := byte(0, mload(memPtr))\\n }\\n\\n if (byte0 < STRING_SHORT_START) itemLen = 1;\\n else if (byte0 < STRING_LONG_START) itemLen = byte0 - STRING_SHORT_START + 1;\\n else if (byte0 < LIST_SHORT_START) {\\n assembly {\\n let byteLen := sub(byte0, 0xb7) // # of bytes the actual length is\\n memPtr := add(memPtr, 1) // skip over the first byte\\n\\n /* 32 byte word size */\\n let dataLen := div(mload(memPtr), exp(256, sub(32, byteLen))) // right shifting to get the len\\n itemLen := add(dataLen, add(byteLen, 1))\\n }\\n } else if (byte0 < LIST_LONG_START) {\\n itemLen = byte0 - LIST_SHORT_START + 1;\\n } else {\\n assembly {\\n let byteLen := sub(byte0, 0xf7)\\n memPtr := add(memPtr, 1)\\n\\n let dataLen := div(mload(memPtr), exp(256, sub(32, byteLen))) // right shifting to the correct length\\n itemLen := add(dataLen, add(byteLen, 1))\\n }\\n }\\n\\n return itemLen;\\n }\\n\\n // @return number of bytes until the data\\n function _payloadOffset(uint256 memPtr) private pure returns (uint256) {\\n uint256 byte0;\\n assembly {\\n byte0 := byte(0, mload(memPtr))\\n }\\n\\n if (byte0 < STRING_SHORT_START) return 0;\\n else if (byte0 < STRING_LONG_START || (byte0 >= LIST_SHORT_START && byte0 < LIST_LONG_START)) return 1;\\n else if (byte0 < LIST_SHORT_START)\\n // being explicit\\n return byte0 - (STRING_LONG_START - 1) + 1;\\n else return byte0 - (LIST_LONG_START - 1) + 1;\\n }\\n\\n /*\\n * @param src Pointer to source\\n * @param dest Pointer to destination\\n * @param len Amount of memory to copy from the source\\n */\\n function copy(\\n uint256 src,\\n uint256 dest,\\n uint256 len\\n ) private pure {\\n if (len == 0) return;\\n\\n // copy as many word sizes as possible\\n for (; len >= WORD_SIZE; len -= WORD_SIZE) {\\n assembly {\\n mstore(dest, mload(src))\\n }\\n\\n src += WORD_SIZE;\\n dest += WORD_SIZE;\\n }\\n\\n // left over bytes. Mask is used to remove unwanted bytes from the word\\n uint256 mask = 256**(WORD_SIZE - len) - 1;\\n assembly {\\n let srcpart := and(mload(src), not(mask)) // zero out src\\n let destpart := and(mload(dest), mask) // retrieve the bytes\\n mstore(dest, or(destpart, srcpart))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x7fe606b4996782cff2d0409365bc591a5b8bfd6957ff3659ecd08ff2076e1570\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50604051611e77380380611e778339818101604052606081101561003357600080fd5b5080516020820151604090920151600180546001600160a01b039384166001600160a01b0319918216179091556000805494841694821694909417909355600580549290911691909216179055611de88061008f6000396000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063aea4e49e11610066578063aea4e49e146101ae578063c0857ba0146101d4578063de9b771f146101dc578063f2c0dd39146101e4578063f953cec7146101ec5761009e565b80630c903de5146100a35780630e387de6146100c2578063142bc2ae146100dc578063607f2d4214610159578063972c49281461018a575b600080fd5b6100c0600480360360208110156100b957600080fd5b5035610292565b005b6100ca610497565b60408051918252519081900360200190f35b6100e46104bb565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561011e578181015183820152602001610106565b50505050905090810190601f16801561014b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101766004803603602081101561016f57600080fd5b5035610549565b604080519115158252519081900360200190f35b61019261055e565b604080516001600160a01b039092168252519081900360200190f35b6100c0600480360360208110156101c457600080fd5b50356001600160a01b031661056d565b6101926105d7565b6101926105e6565b6101926105f5565b6100c06004803603602081101561020257600080fd5b81019060208101813564010000000081111561021d57600080fd5b82018360208201111561022f57600080fd5b8035906020019184600183028401116401000000008311171561025157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610604945050505050565b60055460408051636031680160e01b815260048101849052905160609260009283926001600160a01b03909216916360316801916024808201928692909190829003018186803b1580156102e557600080fd5b505afa1580156102f9573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052608081101561032257600080fd5b810190808051604051939291908464010000000082111561034257600080fd5b90830190602082018581111561035757600080fd5b825164010000000081118282018810171561037157600080fd5b82525081516020918201929091019080838360005b8381101561039e578181015183820152602001610386565b50505050905090810190601f1680156103cb5780820380516001836020036101000a031916815260200191505b50604081815260208381015193820151918301849052606080840183905260808085018d9052828501908152885160a08601528851989b50949950919750909589955088945087938b939092839260c0909201919088019080838360005b83811015610441578181015183820152602001610429565b50505050905090810190601f16801561046e5780820380516001836020036101000a031916815260200191505b509550505050505060405160208183030381529060405290506104908161061e565b5050505050565b7f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b03681565b6004805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105415780601f1061051657610100808354040283529160200191610541565b820191906000526020600020905b81548152906001019060200180831161052457829003601f168201915b505050505081565b60036020526000908152604090205460ff1681565b6002546001600160a01b031681565b6002546001600160a01b0316156105b55760405162461bcd60e51b815260040180806020018281038252602a815260200180611c09602a913960400191505060405180910390fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b031681565b6000546001600160a01b031681565b6005546001600160a01b031681565b606061060f826106f0565b905061061a81610b93565b5050565b600080546002546040805163b472047760e01b81526001600160a01b039283166004820181815260248301938452875160448401528751949095169563b472047795919488949293606401916020860191908190849084905b8381101561068f578181015183820152602001610677565b50505050905090810190601f1680156106bc5780820380516001836020036101000a031916815260200191505b509350505050600060405180830381600087803b1580156106dc57600080fd5b505af1158015610490573d6000803e3d6000fd5b6060806107046106ff84610bcb565b610c46565b905060006107258260028151811061071857fe5b6020026020010151610dc8565b61074a6107458460088151811061073857fe5b6020026020010151610f10565b610fda565b61075a8460098151811061071857fe5b6040516020018084815260200183805190602001908083835b602083106107925780518252601f199092019160209182019101610773565b51815160209384036101000a6000190180199092169116179052920193845250604080518085038152938201815283519382019390932060008181526003909252929020549194505060ff1615915061081e90505760405162461bcd60e51b8152600401808060200182810382526024815260200180611c566024913960400191505060405180910390fd5b6000818152600360205260409020805460ff19166001179055815160609061085a906106ff90610855908690600690811061073857fe5b610bcb565b9050610864611b2e565b6108818260038151811061087457fe5b6020026020010151610c46565b6108918560098151811061071857fe5b8151811061089b57fe5b6020026020010151905060606108b082610c46565b90506108cf816000815181106108c257fe5b602002602001015161114e565b6002546001600160a01b0390811691161461091b5760405162461bcd60e51b8152600401808060200182810382526025815260200180611d186025913960400191505060405180910390fd5b61096361092e8660068151811061073857fe5b61093e8760088151811061073857fe5b61094e8860078151811061073857fe5b61095e8960058151811061071857fe5b6111de565b61099e5760405162461bcd60e51b8152600401808060200182810382526023815260200180611c336023913960400191505060405180910390fd5b610a0c6109b18660028151811061071857fe5b6109c18760038151811061071857fe5b6109d18860048151811061071857fe5b60001b6109e48960058151811061071857fe5b60001b6109f78a60008151811061071857fe5b610a078b60018151811061073857fe5b611425565b506060610a1f8260018151811061087457fe5b90507f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b03660001b610a558260008151811061071857fe5b14610aa7576040805162461bcd60e51b815260206004820152601f60248201527f4678526f6f7454756e6e656c3a20494e56414c49445f5349474e415455524500604482015290519081900360640190fd5b6060610ab98360028151811061073857fe5b90506060818060200190516020811015610ad257600080fd5b8101908080516040519392919084640100000000821115610af257600080fd5b908301906020820185811115610b0757600080fd5b8251640100000000811182820188101715610b2157600080fd5b82525081516020918201929091019080838360005b83811015610b4e578181015183820152602001610b36565b50505050905090810190601f168015610b7b5780820380516001836020036101000a031916815260200191505b5060405250919a50505050505050505050505b919050565b8051610ba6906004906020840190611b48565b506000818060200190516020811015610bbe57600080fd5b5051905061061a81610292565b610bd3611b2e565b6000825111610c29576040805162461bcd60e51b815260206004820152601f60248201527f524c505265616465723a20494e56414c49445f42595445535f4c454e47544800604482015290519081900360640190fd5b506040805180820190915281518152602082810190820152919050565b6060610c5182611597565b610ca2576040805162461bcd60e51b815260206004820152601860248201527f524c505265616465723a204954454d5f4e4f545f4c4953540000000000000000604482015290519081900360640190fd5b6000610cad836115c3565b905060608167ffffffffffffffff81118015610cc857600080fd5b50604051908082528060200260200182016040528015610d0257816020015b610cef611b2e565b815260200190600190039081610ce75790505b5090506000610d14856020015161164f565b85519091508114610d565760405162461bcd60e51b8152600401808060200182810382526027815260200180611cf16027913960400191505060405180910390fd5b6000610d6586602001516116e8565b60208701510190506000805b85811015610dbc57610d828361164f565b9150604051806040016040528083815260200184815250858281518110610da557fe5b602090810291909101015291810191600101610d71565b50929695505050505050565b6000610dd382611597565b15610e25576040805162461bcd60e51b815260206004820181905260248201527f524c505265616465723a204445434f44494e475f4c4953545f41535f55494e54604482015290519081900360640190fd5b815160211015610e7c576040805162461bcd60e51b815260206004820152601e60248201527f524c505265616465723a20494e56414c49445f55494e545f4c454e4754480000604482015290519081900360640190fd5b6000610e8b836020015161164f565b83519091508114610ecd5760405162461bcd60e51b8152600401808060200182810382526027815260200180611d6b6027913960400191505060405180910390fd5b6000610edc84602001516116e8565b84516020808701518301805193945091849003929190831015610f0657826020036101000a820491505b5095945050505050565b60606000610f21836020015161164f565b83519091508114610f635760405162461bcd60e51b8152600401808060200182810382526028815260200180611c7a6028913960400191505060405180910390fd5b6000610f7284602001516116e8565b845190915081900360608167ffffffffffffffff81118015610f9357600080fd5b506040519080825280601f01601f191660200182016040528015610fbe576020820181803683370190505b5090506000816020019050610f0684886020015101828561174b565b6040805160208101909152600081528151606091901561114857600080611002600086611796565b60f81c9050600181148061101957508060ff166003145b156110a857600185516002020367ffffffffffffffff8111801561103c57600080fd5b506040519080825280601f01601f191660200182016040528015611067576020820181803683370190505b5092506000611077600187611796565b9050808460008151811061108757fe5b60200101906001600160f81b031916908160001a90535060019250506110f9565b600285516002020367ffffffffffffffff811180156110c657600080fd5b506040519080825280601f01601f1916602001820160405280156110f1576020820181803683370190505b509250600091505b60ff82165b8351811015611144576111198360ff16820360020187611796565b84828151811061112557fe5b60200101906001600160f81b031916908160001a9053506001016110fe565b5050505b92915050565b600061115982611597565b156111955760405162461bcd60e51b8152600401808060200182810382526023815260200180611cce6023913960400191505060405180910390fd5b81516015146111d55760405162461bcd60e51b8152600401808060200182810382526021815260200180611d926021913960400191505060405180910390fd5b61114882610dc8565b60006111e8611b2e565b6111f184610bcb565b905060606111fe82610c46565b9050606080856000826112108b610fda565b905080516000141561122c57600097505050505050505061141d565b60005b86518110156114145781518311156112525760009850505050505050505061141d565b61126e87828151811061126157fe5b60200260200101516117f3565b95508580519060200120841461128f5760009850505050505050505061141d565b61129e87828151811061087457fe5b945084516011141561135b5781518314156112fa578c805190602001206112cb8660108151811061073857fe5b8051906020012014156112e95760019850505050505050505061141d565b60009850505050505050505061141d565b600082848151811061130857fe5b016020015160f81c9050601081111561132d576000995050505050505050505061141d565b61134c868260ff168151811061133f57fe5b602002602001015161185a565b9450506001929092019161140c565b8451600214156112e957600061138161137a8760008151811061073857fe5b84866118f9565b9050825181850114156113d7578d805190602001206113a68760018151811061073857fe5b8051906020012014156113c5576001995050505050505050505061141d565b6000995050505050505050505061141d565b806113ee576000995050505050505050505061141d565b80840193506114038660018151811061133f57fe5b945061140c9050565b60010161122f565b50505050505050505b949350505050565b600154604080516320a9cea560e11b81526004810185905290516000928392839283926001600160a01b0316916341539d4a9160248083019260a0929190829003018186803b15801561147757600080fd5b505afa15801561148b573d6000803e3d6000fd5b505050506040513d60a08110156114a157600080fd5b8101908080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291905050505093505092509250611539828b0384878d8d8d8d60405160200180858152602001848152602001838152602001828152602001945050505050604051602081830303815290604052805190602001206119d8909392919063ffffffff16565b61158a576040805162461bcd60e51b815260206004820152601c60248201527f4678526f6f7454756e6e656c3a20494e56414c49445f48454144455200000000604482015290519081900360640190fd5b9998505050505050505050565b6020810151805160009190821a9060c08210156115b957600092505050610b8e565b5060019392505050565b6000806000905060006115d984602001516116e8565b602085015185519181019250015b80821015611646576115f88261164f565b820191508082111561163b5760405162461bcd60e51b815260040180806020018281038252602c815260200180611ca2602c913960400191505060405180910390fd5b6001909201916115e7565b50909392505050565b80516000908190811a608081101561166a57600191506116e1565b60b881101561167f57607e19810191506116e1565b60c08110156116ac5760b78103600185019450806020036101000a855104600182018101935050506116e1565b60f88110156116c15760be19810191506116e1565b60f78103600185019450806020036101000a855104600182018101935050505b5092915050565b8051600090811a6080811015611702576000915050610b8e565b60b881108061171d575060c0811080159061171d575060f881105b1561172c576001915050610b8e565b60c08110156117405760b519019050610b8e565b60f519019050610b8e565b8061175557611791565b5b60208110611775578251825260209283019290910190601f1901611756565b8251825160208390036101000a60001901801990921691161782525b505050565b600060028306156117c75760108260028504815181106117b257fe5b016020015160f81c816117c157fe5b066117e9565b60108260028504815181106117d857fe5b016020015160f81c816117e757fe5b045b60f81b9392505050565b606080826000015167ffffffffffffffff8111801561181157600080fd5b506040519080825280601f01601f19166020018201604052801561183c576020820181803683370190505b50905060008160200190506116e1846020015182866000015161174b565b60008061186a836020015161164f565b835190915081146118ac5760405162461bcd60e51b815260040180806020018281038252602e815260200180611d3d602e913960400191505060405180910390fd5b82516021146118ec5760405162461bcd60e51b8152600401808060200182810382526025815260200180611be46025913960400191505060405180910390fd5b5050602001516001015190565b600080606061190786610fda565b90506060815167ffffffffffffffff8111801561192357600080fd5b506040519080825280601f01601f19166020018201604052801561194e576020820181803683370190505b509050845b825186018110156119a857600087828151811061196c57fe5b602001015160f81c60f81b905080838884038151811061198857fe5b60200101906001600160f81b031916908160001a90535050600101611953565b508080519060200120828051906020012014156119c857815192506119cd565b600092505b509095945050505050565b600060208251816119e557fe5b0615611a2f576040805162461bcd60e51b8152602060048201526014602482015273092dcecc2d8d2c840e0e4dedecc40d8cadccee8d60631b604482015290519081900360640190fd5b60006020835181611a3c57fe5b0490508060020a8510611a8e576040805162461bcd60e51b81526020600482015260156024820152744c65616620696e64657820697320746f6f2062696760581b604482015290519081900360640190fd5b60008660205b85518111611b205785810151925060028806611ae05781836040516020018083815260200182815260200192505050604051602081830303815290604052805190602001209150611b12565b828260405160200180838152602001828152602001925050506040516020818303038152906040528051906020012091505b600288049750602001611a94565b509094149695505050505050565b604051806040016040528060008152602001600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611b8957805160ff1916838001178555611bb6565b82800160010185558215611bb6579182015b82811115611bb6578251825591602001919060010190611b9b565b50611bc2929150611bc6565b5090565b611be091905b80821115611bc25760008155600101611bcc565b9056fe524c505265616465723a20494e56414c49445f55494e545f5354524943545f4c454e475448467842617365526f6f7454756e6e656c3a204348494c445f54554e4e454c5f414c52454144595f5345544678526f6f7454756e6e656c3a20494e56414c49445f524543454950545f50524f4f464678526f6f7454756e6e656c3a20455849545f414c52454144595f50524f434553534544524c505265616465723a2042595445535f4445434f4445445f4c454e4754485f4d49534d41544348524c505265616465723a204e554d5f4954454d535f4445434f4445445f4c454e4754485f4d49534d41544348524c505265616465723a204445434f44494e475f4c4953545f41535f41444452455353524c505265616465723a204c4953545f4445434f4445445f4c454e4754485f4d49534d415443484678526f6f7454756e6e656c3a20494e56414c49445f46585f4348494c445f54554e4e454c524c505265616465723a2055494e545f5354524943545f4445434f4445445f4c454e4754485f4d49534d41544348524c505265616465723a2055494e545f4445434f4445445f4c454e4754485f4d49534d41544348524c505265616465723a20494e56414c49445f414444524553535f4c454e475448a2646970667358221220d29f7066321780c0e925442b2f117cc8c896858aed5cfe437686905db996047b64736f6c63430006060033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063aea4e49e11610066578063aea4e49e146101ae578063c0857ba0146101d4578063de9b771f146101dc578063f2c0dd39146101e4578063f953cec7146101ec5761009e565b80630c903de5146100a35780630e387de6146100c2578063142bc2ae146100dc578063607f2d4214610159578063972c49281461018a575b600080fd5b6100c0600480360360208110156100b957600080fd5b5035610292565b005b6100ca610497565b60408051918252519081900360200190f35b6100e46104bb565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561011e578181015183820152602001610106565b50505050905090810190601f16801561014b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101766004803603602081101561016f57600080fd5b5035610549565b604080519115158252519081900360200190f35b61019261055e565b604080516001600160a01b039092168252519081900360200190f35b6100c0600480360360208110156101c457600080fd5b50356001600160a01b031661056d565b6101926105d7565b6101926105e6565b6101926105f5565b6100c06004803603602081101561020257600080fd5b81019060208101813564010000000081111561021d57600080fd5b82018360208201111561022f57600080fd5b8035906020019184600183028401116401000000008311171561025157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610604945050505050565b60055460408051636031680160e01b815260048101849052905160609260009283926001600160a01b03909216916360316801916024808201928692909190829003018186803b1580156102e557600080fd5b505afa1580156102f9573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052608081101561032257600080fd5b810190808051604051939291908464010000000082111561034257600080fd5b90830190602082018581111561035757600080fd5b825164010000000081118282018810171561037157600080fd5b82525081516020918201929091019080838360005b8381101561039e578181015183820152602001610386565b50505050905090810190601f1680156103cb5780820380516001836020036101000a031916815260200191505b50604081815260208381015193820151918301849052606080840183905260808085018d9052828501908152885160a08601528851989b50949950919750909589955088945087938b939092839260c0909201919088019080838360005b83811015610441578181015183820152602001610429565b50505050905090810190601f16801561046e5780820380516001836020036101000a031916815260200191505b509550505050505060405160208183030381529060405290506104908161061e565b5050505050565b7f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b03681565b6004805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105415780601f1061051657610100808354040283529160200191610541565b820191906000526020600020905b81548152906001019060200180831161052457829003601f168201915b505050505081565b60036020526000908152604090205460ff1681565b6002546001600160a01b031681565b6002546001600160a01b0316156105b55760405162461bcd60e51b815260040180806020018281038252602a815260200180611c09602a913960400191505060405180910390fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b031681565b6000546001600160a01b031681565b6005546001600160a01b031681565b606061060f826106f0565b905061061a81610b93565b5050565b600080546002546040805163b472047760e01b81526001600160a01b039283166004820181815260248301938452875160448401528751949095169563b472047795919488949293606401916020860191908190849084905b8381101561068f578181015183820152602001610677565b50505050905090810190601f1680156106bc5780820380516001836020036101000a031916815260200191505b509350505050600060405180830381600087803b1580156106dc57600080fd5b505af1158015610490573d6000803e3d6000fd5b6060806107046106ff84610bcb565b610c46565b905060006107258260028151811061071857fe5b6020026020010151610dc8565b61074a6107458460088151811061073857fe5b6020026020010151610f10565b610fda565b61075a8460098151811061071857fe5b6040516020018084815260200183805190602001908083835b602083106107925780518252601f199092019160209182019101610773565b51815160209384036101000a6000190180199092169116179052920193845250604080518085038152938201815283519382019390932060008181526003909252929020549194505060ff1615915061081e90505760405162461bcd60e51b8152600401808060200182810382526024815260200180611c566024913960400191505060405180910390fd5b6000818152600360205260409020805460ff19166001179055815160609061085a906106ff90610855908690600690811061073857fe5b610bcb565b9050610864611b2e565b6108818260038151811061087457fe5b6020026020010151610c46565b6108918560098151811061071857fe5b8151811061089b57fe5b6020026020010151905060606108b082610c46565b90506108cf816000815181106108c257fe5b602002602001015161114e565b6002546001600160a01b0390811691161461091b5760405162461bcd60e51b8152600401808060200182810382526025815260200180611d186025913960400191505060405180910390fd5b61096361092e8660068151811061073857fe5b61093e8760088151811061073857fe5b61094e8860078151811061073857fe5b61095e8960058151811061071857fe5b6111de565b61099e5760405162461bcd60e51b8152600401808060200182810382526023815260200180611c336023913960400191505060405180910390fd5b610a0c6109b18660028151811061071857fe5b6109c18760038151811061071857fe5b6109d18860048151811061071857fe5b60001b6109e48960058151811061071857fe5b60001b6109f78a60008151811061071857fe5b610a078b60018151811061073857fe5b611425565b506060610a1f8260018151811061087457fe5b90507f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b03660001b610a558260008151811061071857fe5b14610aa7576040805162461bcd60e51b815260206004820152601f60248201527f4678526f6f7454756e6e656c3a20494e56414c49445f5349474e415455524500604482015290519081900360640190fd5b6060610ab98360028151811061073857fe5b90506060818060200190516020811015610ad257600080fd5b8101908080516040519392919084640100000000821115610af257600080fd5b908301906020820185811115610b0757600080fd5b8251640100000000811182820188101715610b2157600080fd5b82525081516020918201929091019080838360005b83811015610b4e578181015183820152602001610b36565b50505050905090810190601f168015610b7b5780820380516001836020036101000a031916815260200191505b5060405250919a50505050505050505050505b919050565b8051610ba6906004906020840190611b48565b506000818060200190516020811015610bbe57600080fd5b5051905061061a81610292565b610bd3611b2e565b6000825111610c29576040805162461bcd60e51b815260206004820152601f60248201527f524c505265616465723a20494e56414c49445f42595445535f4c454e47544800604482015290519081900360640190fd5b506040805180820190915281518152602082810190820152919050565b6060610c5182611597565b610ca2576040805162461bcd60e51b815260206004820152601860248201527f524c505265616465723a204954454d5f4e4f545f4c4953540000000000000000604482015290519081900360640190fd5b6000610cad836115c3565b905060608167ffffffffffffffff81118015610cc857600080fd5b50604051908082528060200260200182016040528015610d0257816020015b610cef611b2e565b815260200190600190039081610ce75790505b5090506000610d14856020015161164f565b85519091508114610d565760405162461bcd60e51b8152600401808060200182810382526027815260200180611cf16027913960400191505060405180910390fd5b6000610d6586602001516116e8565b60208701510190506000805b85811015610dbc57610d828361164f565b9150604051806040016040528083815260200184815250858281518110610da557fe5b602090810291909101015291810191600101610d71565b50929695505050505050565b6000610dd382611597565b15610e25576040805162461bcd60e51b815260206004820181905260248201527f524c505265616465723a204445434f44494e475f4c4953545f41535f55494e54604482015290519081900360640190fd5b815160211015610e7c576040805162461bcd60e51b815260206004820152601e60248201527f524c505265616465723a20494e56414c49445f55494e545f4c454e4754480000604482015290519081900360640190fd5b6000610e8b836020015161164f565b83519091508114610ecd5760405162461bcd60e51b8152600401808060200182810382526027815260200180611d6b6027913960400191505060405180910390fd5b6000610edc84602001516116e8565b84516020808701518301805193945091849003929190831015610f0657826020036101000a820491505b5095945050505050565b60606000610f21836020015161164f565b83519091508114610f635760405162461bcd60e51b8152600401808060200182810382526028815260200180611c7a6028913960400191505060405180910390fd5b6000610f7284602001516116e8565b845190915081900360608167ffffffffffffffff81118015610f9357600080fd5b506040519080825280601f01601f191660200182016040528015610fbe576020820181803683370190505b5090506000816020019050610f0684886020015101828561174b565b6040805160208101909152600081528151606091901561114857600080611002600086611796565b60f81c9050600181148061101957508060ff166003145b156110a857600185516002020367ffffffffffffffff8111801561103c57600080fd5b506040519080825280601f01601f191660200182016040528015611067576020820181803683370190505b5092506000611077600187611796565b9050808460008151811061108757fe5b60200101906001600160f81b031916908160001a90535060019250506110f9565b600285516002020367ffffffffffffffff811180156110c657600080fd5b506040519080825280601f01601f1916602001820160405280156110f1576020820181803683370190505b509250600091505b60ff82165b8351811015611144576111198360ff16820360020187611796565b84828151811061112557fe5b60200101906001600160f81b031916908160001a9053506001016110fe565b5050505b92915050565b600061115982611597565b156111955760405162461bcd60e51b8152600401808060200182810382526023815260200180611cce6023913960400191505060405180910390fd5b81516015146111d55760405162461bcd60e51b8152600401808060200182810382526021815260200180611d926021913960400191505060405180910390fd5b61114882610dc8565b60006111e8611b2e565b6111f184610bcb565b905060606111fe82610c46565b9050606080856000826112108b610fda565b905080516000141561122c57600097505050505050505061141d565b60005b86518110156114145781518311156112525760009850505050505050505061141d565b61126e87828151811061126157fe5b60200260200101516117f3565b95508580519060200120841461128f5760009850505050505050505061141d565b61129e87828151811061087457fe5b945084516011141561135b5781518314156112fa578c805190602001206112cb8660108151811061073857fe5b8051906020012014156112e95760019850505050505050505061141d565b60009850505050505050505061141d565b600082848151811061130857fe5b016020015160f81c9050601081111561132d576000995050505050505050505061141d565b61134c868260ff168151811061133f57fe5b602002602001015161185a565b9450506001929092019161140c565b8451600214156112e957600061138161137a8760008151811061073857fe5b84866118f9565b9050825181850114156113d7578d805190602001206113a68760018151811061073857fe5b8051906020012014156113c5576001995050505050505050505061141d565b6000995050505050505050505061141d565b806113ee576000995050505050505050505061141d565b80840193506114038660018151811061133f57fe5b945061140c9050565b60010161122f565b50505050505050505b949350505050565b600154604080516320a9cea560e11b81526004810185905290516000928392839283926001600160a01b0316916341539d4a9160248083019260a0929190829003018186803b15801561147757600080fd5b505afa15801561148b573d6000803e3d6000fd5b505050506040513d60a08110156114a157600080fd5b8101908080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291905050505093505092509250611539828b0384878d8d8d8d60405160200180858152602001848152602001838152602001828152602001945050505050604051602081830303815290604052805190602001206119d8909392919063ffffffff16565b61158a576040805162461bcd60e51b815260206004820152601c60248201527f4678526f6f7454756e6e656c3a20494e56414c49445f48454144455200000000604482015290519081900360640190fd5b9998505050505050505050565b6020810151805160009190821a9060c08210156115b957600092505050610b8e565b5060019392505050565b6000806000905060006115d984602001516116e8565b602085015185519181019250015b80821015611646576115f88261164f565b820191508082111561163b5760405162461bcd60e51b815260040180806020018281038252602c815260200180611ca2602c913960400191505060405180910390fd5b6001909201916115e7565b50909392505050565b80516000908190811a608081101561166a57600191506116e1565b60b881101561167f57607e19810191506116e1565b60c08110156116ac5760b78103600185019450806020036101000a855104600182018101935050506116e1565b60f88110156116c15760be19810191506116e1565b60f78103600185019450806020036101000a855104600182018101935050505b5092915050565b8051600090811a6080811015611702576000915050610b8e565b60b881108061171d575060c0811080159061171d575060f881105b1561172c576001915050610b8e565b60c08110156117405760b519019050610b8e565b60f519019050610b8e565b8061175557611791565b5b60208110611775578251825260209283019290910190601f1901611756565b8251825160208390036101000a60001901801990921691161782525b505050565b600060028306156117c75760108260028504815181106117b257fe5b016020015160f81c816117c157fe5b066117e9565b60108260028504815181106117d857fe5b016020015160f81c816117e757fe5b045b60f81b9392505050565b606080826000015167ffffffffffffffff8111801561181157600080fd5b506040519080825280601f01601f19166020018201604052801561183c576020820181803683370190505b50905060008160200190506116e1846020015182866000015161174b565b60008061186a836020015161164f565b835190915081146118ac5760405162461bcd60e51b815260040180806020018281038252602e815260200180611d3d602e913960400191505060405180910390fd5b82516021146118ec5760405162461bcd60e51b8152600401808060200182810382526025815260200180611be46025913960400191505060405180910390fd5b5050602001516001015190565b600080606061190786610fda565b90506060815167ffffffffffffffff8111801561192357600080fd5b506040519080825280601f01601f19166020018201604052801561194e576020820181803683370190505b509050845b825186018110156119a857600087828151811061196c57fe5b602001015160f81c60f81b905080838884038151811061198857fe5b60200101906001600160f81b031916908160001a90535050600101611953565b508080519060200120828051906020012014156119c857815192506119cd565b600092505b509095945050505050565b600060208251816119e557fe5b0615611a2f576040805162461bcd60e51b8152602060048201526014602482015273092dcecc2d8d2c840e0e4dedecc40d8cadccee8d60631b604482015290519081900360640190fd5b60006020835181611a3c57fe5b0490508060020a8510611a8e576040805162461bcd60e51b81526020600482015260156024820152744c65616620696e64657820697320746f6f2062696760581b604482015290519081900360640190fd5b60008660205b85518111611b205785810151925060028806611ae05781836040516020018083815260200182815260200192505050604051602081830303815290604052805190602001209150611b12565b828260405160200180838152602001828152602001925050506040516020818303038152906040528051906020012091505b600288049750602001611a94565b509094149695505050505050565b604051806040016040528060008152602001600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611b8957805160ff1916838001178555611bb6565b82800160010185558215611bb6579182015b82811115611bb6578251825591602001919060010190611b9b565b50611bc2929150611bc6565b5090565b611be091905b80821115611bc25760008155600101611bcc565b9056fe524c505265616465723a20494e56414c49445f55494e545f5354524943545f4c454e475448467842617365526f6f7454756e6e656c3a204348494c445f54554e4e454c5f414c52454144595f5345544678526f6f7454756e6e656c3a20494e56414c49445f524543454950545f50524f4f464678526f6f7454756e6e656c3a20455849545f414c52454144595f50524f434553534544524c505265616465723a2042595445535f4445434f4445445f4c454e4754485f4d49534d41544348524c505265616465723a204e554d5f4954454d535f4445434f4445445f4c454e4754485f4d49534d41544348524c505265616465723a204445434f44494e475f4c4953545f41535f41444452455353524c505265616465723a204c4953545f4445434f4445445f4c454e4754485f4d49534d415443484678526f6f7454756e6e656c3a20494e56414c49445f46585f4348494c445f54554e4e454c524c505265616465723a2055494e545f5354524943545f4445434f4445445f4c454e4754485f4d49534d41544348524c505265616465723a2055494e545f4445434f4445445f4c454e4754485f4d49534d41544348524c505265616465723a20494e56414c49445f414444524553535f4c454e475448a2646970667358221220d29f7066321780c0e925442b2f117cc8c896858aed5cfe437686905db996047b64736f6c63430006060033", + "devdoc": { + "methods": { + "receiveMessage(bytes)": { + "details": "This function verifies if the transaction actually happened on child chain", + "params": { + "inputData": "RLP encoded data of the reference tx containing following list of fields 0 - headerNumber - Checkpoint header block number containing the reference tx 1 - blockProof - Proof that the block header (in the child chain) is a leaf in the submitted merkle root 2 - blockNumber - Block number containing the reference tx on child chain 3 - blockTime - Reference tx block time 4 - txRoot - Transactions root of block 5 - receiptRoot - Receipts root of block 6 - receipt - Receipt of the reference transaction 7 - receiptProof - Merkle proof of the reference receipt 8 - branchMask - 32 bits denoting the path of receipt in merkle tree 9 - receiptLogIndex - Log Index to read from the receipt" + } + } + }, + "title": "CryptOrchidRootTunnel" + }, + "userdoc": { + "methods": { + "receiveMessage(bytes)": { + "notice": "receive message from L2 to L1, validated by proof" + } + } + }, + "storageLayout": { + "storage": [ + { + "astId": 152, + "contract": "contracts/CryptOrchidRootTunnel/CryptOrchidRootTunnel.sol:CryptOrchidRootTunnel", + "label": "fxRoot", + "offset": 0, + "slot": "0", + "type": "t_contract(IFxStateSender)122" + }, + { + "astId": 154, + "contract": "contracts/CryptOrchidRootTunnel/CryptOrchidRootTunnel.sol:CryptOrchidRootTunnel", + "label": "checkpointManager", + "offset": 0, + "slot": "1", + "type": "t_contract(ICheckpointManager)138" + }, + { + "astId": 156, + "contract": "contracts/CryptOrchidRootTunnel/CryptOrchidRootTunnel.sol:CryptOrchidRootTunnel", + "label": "fxChildTunnel", + "offset": 0, + "slot": "2", + "type": "t_address" + }, + { + "astId": 160, + "contract": "contracts/CryptOrchidRootTunnel/CryptOrchidRootTunnel.sol:CryptOrchidRootTunnel", + "label": "processedExits", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_bytes32,t_bool)" + }, + { + "astId": 27, + "contract": "contracts/CryptOrchidRootTunnel/CryptOrchidRootTunnel.sol:CryptOrchidRootTunnel", + "label": "latestData", + "offset": 0, + "slot": "4", + "type": "t_bytes_storage" + }, + { + "astId": 29, + "contract": "contracts/CryptOrchidRootTunnel/CryptOrchidRootTunnel.sol:CryptOrchidRootTunnel", + "label": "CryptOrchidERC721", + "offset": 0, + "slot": "5", + "type": "t_address" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_bytes_storage": { + "encoding": "bytes", + "label": "bytes", + "numberOfBytes": "32" + }, + "t_contract(ICheckpointManager)138": { + "encoding": "inplace", + "label": "contract ICheckpointManager", + "numberOfBytes": "20" + }, + "t_contract(IFxStateSender)122": { + "encoding": "inplace", + "label": "contract IFxStateSender", + "numberOfBytes": "20" + }, + "t_mapping(t_bytes32,t_bool)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => bool)", + "numberOfBytes": "32", + "value": "t_bool" + } + } + } +} \ No newline at end of file diff --git a/deployments/goerli/solcInputs/044a1064ec6b174d77e4f6f8cf396848.json b/deployments/goerli/solcInputs/044a1064ec6b174d77e4f6f8cf396848.json new file mode 100644 index 0000000..31d7a5a --- /dev/null +++ b/deployments/goerli/solcInputs/044a1064ec6b174d77e4f6f8cf396848.json @@ -0,0 +1,47 @@ +{ + "language": "Solidity", + "sources": { + "contracts/CryptOrchidRootTunnel/CryptOrchidRootTunnel.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.6 <0.9.0;\n\nimport {FxBaseRootTunnel} from \"../Libraries/tunnel/FxBaseRootTunnel.sol\";\n\ninterface CryptOrchidParent {\n enum Stage {Unsold, Seed, Flower, Dead}\n\n function getTokenMetadata(uint256 tokenId)\n external\n view\n returns (\n string memory,\n uint256,\n uint256,\n Stage\n );\n}\n\n/**\n * @title CryptOrchidRootTunnel\n */\ncontract CryptOrchidRootTunnel is FxBaseRootTunnel {\n bytes public latestData;\n address public CryptOrchidERC721;\n\n constructor(\n address _checkpointManager,\n address _fxRoot,\n address _CryptOrchidERC721\n ) public FxBaseRootTunnel(_checkpointManager, _fxRoot) {\n CryptOrchidERC721 = _CryptOrchidERC721;\n }\n\n function _processMessageFromChild(bytes memory data) internal override {\n latestData = data;\n uint256 tokenId = abi.decode(data, (uint256));\n sendMessageToChild(tokenId);\n }\n\n function sendMessageToChild(uint256 tokenId) public {\n // TODO:\n // 1. check owner?\n\n (string memory species, uint256 plantedAt, uint256 waterLevel, ) = CryptOrchidParent(CryptOrchidERC721)\n .getTokenMetadata(tokenId);\n\n bytes memory message = abi.encode(species, plantedAt, waterLevel, tokenId);\n\n _sendMessageToChild(message);\n }\n}\n" + }, + "contracts/Libraries/tunnel/FxBaseRootTunnel.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.6 <0.9.0;\n\nimport {RLPReader} from \"./RLPReader.sol\";\nimport {MerklePatriciaProof} from \"./MerklePatriciaProof.sol\";\nimport {Merkle} from \"./Merkle.sol\";\n\ninterface IFxStateSender {\n function sendMessageToChild(address _receiver, bytes calldata _data) external;\n}\n\ncontract ICheckpointManager {\n struct HeaderBlock {\n bytes32 root;\n uint256 start;\n uint256 end;\n uint256 createdAt;\n address proposer;\n }\n\n /**\n * @notice mapping of checkpoint header numbers to block details\n * @dev These checkpoints are submited by plasma contracts\n */\n mapping(uint256 => HeaderBlock) public headerBlocks;\n}\n\nabstract contract FxBaseRootTunnel {\n using RLPReader for bytes;\n using RLPReader for RLPReader.RLPItem;\n using Merkle for bytes32;\n\n // keccak256(MessageSent(bytes))\n bytes32 public constant SEND_MESSAGE_EVENT_SIG = 0x8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036;\n\n // state sender contract\n IFxStateSender public fxRoot;\n // root chain manager\n ICheckpointManager public checkpointManager;\n // child tunnel contract which receives and sends messages\n address public fxChildTunnel;\n\n // storage to avoid duplicate exits\n mapping(bytes32 => bool) public processedExits;\n\n constructor(address _checkpointManager, address _fxRoot) internal {\n checkpointManager = ICheckpointManager(_checkpointManager);\n fxRoot = IFxStateSender(_fxRoot);\n }\n\n // set fxChildTunnel if not set already\n function setFxChildTunnel(address _fxChildTunnel) public {\n require(fxChildTunnel == address(0x0), \"FxBaseRootTunnel: CHILD_TUNNEL_ALREADY_SET\");\n fxChildTunnel = _fxChildTunnel;\n }\n\n /**\n * @notice Send bytes message to Child Tunnel\n * @param message bytes message that will be sent to Child Tunnel\n * some message examples -\n * abi.encode(tokenId);\n * abi.encode(tokenId, tokenMetadata);\n * abi.encode(messageType, messageData);\n */\n function _sendMessageToChild(bytes memory message) internal {\n fxRoot.sendMessageToChild(fxChildTunnel, message);\n }\n\n function _validateAndExtractMessage(bytes memory inputData) internal returns (bytes memory) {\n RLPReader.RLPItem[] memory inputDataRLPList = inputData.toRlpItem().toList();\n\n // checking if exit has already been processed\n // unique exit is identified using hash of (blockNumber, branchMask, receiptLogIndex)\n bytes32 exitHash = keccak256(\n abi.encodePacked(\n inputDataRLPList[2].toUint(), // blockNumber\n // first 2 nibbles are dropped while generating nibble array\n // this allows branch masks that are valid but bypass exitHash check (changing first 2 nibbles only)\n // so converting to nibble array and then hashing it\n MerklePatriciaProof._getNibbleArray(inputDataRLPList[8].toBytes()), // branchMask\n inputDataRLPList[9].toUint() // receiptLogIndex\n )\n );\n require(processedExits[exitHash] == false, \"FxRootTunnel: EXIT_ALREADY_PROCESSED\");\n processedExits[exitHash] = true;\n\n RLPReader.RLPItem[] memory receiptRLPList = inputDataRLPList[6].toBytes().toRlpItem().toList();\n RLPReader.RLPItem memory logRLP = receiptRLPList[3].toList()[inputDataRLPList[9].toUint()]; // receiptLogIndex\n\n RLPReader.RLPItem[] memory logRLPList = logRLP.toList();\n\n // check child tunnel\n require(fxChildTunnel == RLPReader.toAddress(logRLPList[0]), \"FxRootTunnel: INVALID_FX_CHILD_TUNNEL\");\n\n // verify receipt inclusion\n require(\n MerklePatriciaProof.verify(\n inputDataRLPList[6].toBytes(), // receipt\n inputDataRLPList[8].toBytes(), // branchMask\n inputDataRLPList[7].toBytes(), // receiptProof\n bytes32(inputDataRLPList[5].toUint()) // receiptRoot\n ),\n \"FxRootTunnel: INVALID_RECEIPT_PROOF\"\n );\n\n // verify checkpoint inclusion\n _checkBlockMembershipInCheckpoint(\n inputDataRLPList[2].toUint(), // blockNumber\n inputDataRLPList[3].toUint(), // blockTime\n bytes32(inputDataRLPList[4].toUint()), // txRoot\n bytes32(inputDataRLPList[5].toUint()), // receiptRoot\n inputDataRLPList[0].toUint(), // headerNumber\n inputDataRLPList[1].toBytes() // blockProof\n );\n\n RLPReader.RLPItem[] memory logTopicRLPList = logRLPList[1].toList(); // topics\n\n require(\n bytes32(logTopicRLPList[0].toUint()) == SEND_MESSAGE_EVENT_SIG, // topic0 is event sig\n \"FxRootTunnel: INVALID_SIGNATURE\"\n );\n\n // received message data\n bytes memory receivedData = logRLPList[2].toBytes();\n bytes memory message = abi.decode(receivedData, (bytes)); // event decodes params again, so decoding bytes to get message\n return message;\n }\n\n function _checkBlockMembershipInCheckpoint(\n uint256 blockNumber,\n uint256 blockTime,\n bytes32 txRoot,\n bytes32 receiptRoot,\n uint256 headerNumber,\n bytes memory blockProof\n ) private view returns (uint256) {\n (bytes32 headerRoot, uint256 startBlock, , uint256 createdAt, ) = checkpointManager.headerBlocks(headerNumber);\n\n require(\n keccak256(abi.encodePacked(blockNumber, blockTime, txRoot, receiptRoot)).checkMembership(\n blockNumber - startBlock,\n headerRoot,\n blockProof\n ),\n \"FxRootTunnel: INVALID_HEADER\"\n );\n return createdAt;\n }\n\n /**\n * @notice receive message from L2 to L1, validated by proof\n * @dev This function verifies if the transaction actually happened on child chain\n *\n * @param inputData RLP encoded data of the reference tx containing following list of fields\n * 0 - headerNumber - Checkpoint header block number containing the reference tx\n * 1 - blockProof - Proof that the block header (in the child chain) is a leaf in the submitted merkle root\n * 2 - blockNumber - Block number containing the reference tx on child chain\n * 3 - blockTime - Reference tx block time\n * 4 - txRoot - Transactions root of block\n * 5 - receiptRoot - Receipts root of block\n * 6 - receipt - Receipt of the reference transaction\n * 7 - receiptProof - Merkle proof of the reference receipt\n * 8 - branchMask - 32 bits denoting the path of receipt in merkle tree\n * 9 - receiptLogIndex - Log Index to read from the receipt\n */\n function receiveMessage(bytes memory inputData) public virtual {\n bytes memory message = _validateAndExtractMessage(inputData);\n _processMessageFromChild(message);\n }\n\n /**\n * @notice Process message received from Child Tunnel\n * @dev function needs to be implemented to handle message as per requirement\n * This is called by onStateReceive function.\n * Since it is called via a system call, any event will not be emitted during its execution.\n * @param message bytes message that was sent from Child Tunnel\n */\n function _processMessageFromChild(bytes memory message) internal virtual;\n}\n" + }, + "contracts/Libraries/tunnel/RLPReader.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.6 <0.9.0;\n\nlibrary RLPReader {\n uint8 constant STRING_SHORT_START = 0x80;\n uint8 constant STRING_LONG_START = 0xb8;\n uint8 constant LIST_SHORT_START = 0xc0;\n uint8 constant LIST_LONG_START = 0xf8;\n uint8 constant WORD_SIZE = 32;\n\n struct RLPItem {\n uint256 len;\n uint256 memPtr;\n }\n\n /*\n * @param item RLP encoded bytes\n */\n function toRlpItem(bytes memory item) internal pure returns (RLPItem memory) {\n require(item.length > 0, \"RLPReader: INVALID_BYTES_LENGTH\");\n uint256 memPtr;\n assembly {\n memPtr := add(item, 0x20)\n }\n\n return RLPItem(item.length, memPtr);\n }\n\n /*\n * @param item RLP encoded list in bytes\n */\n function toList(RLPItem memory item) internal pure returns (RLPItem[] memory) {\n require(isList(item), \"RLPReader: ITEM_NOT_LIST\");\n\n uint256 items = numItems(item);\n RLPItem[] memory result = new RLPItem[](items);\n uint256 listLength = _itemLength(item.memPtr);\n require(listLength == item.len, \"RLPReader: LIST_DECODED_LENGTH_MISMATCH\");\n\n uint256 memPtr = item.memPtr + _payloadOffset(item.memPtr);\n uint256 dataLen;\n for (uint256 i = 0; i < items; i++) {\n dataLen = _itemLength(memPtr);\n result[i] = RLPItem(dataLen, memPtr);\n memPtr = memPtr + dataLen;\n }\n\n return result;\n }\n\n // @return indicator whether encoded payload is a list. negate this function call for isData.\n function isList(RLPItem memory item) internal pure returns (bool) {\n uint8 byte0;\n uint256 memPtr = item.memPtr;\n assembly {\n byte0 := byte(0, mload(memPtr))\n }\n\n if (byte0 < LIST_SHORT_START) return false;\n return true;\n }\n\n /** RLPItem conversions into data types **/\n\n // @returns raw rlp encoding in bytes\n function toRlpBytes(RLPItem memory item) internal pure returns (bytes memory) {\n bytes memory result = new bytes(item.len);\n\n uint256 ptr;\n assembly {\n ptr := add(0x20, result)\n }\n\n copy(item.memPtr, ptr, item.len);\n return result;\n }\n\n function toAddress(RLPItem memory item) internal pure returns (address) {\n require(!isList(item), \"RLPReader: DECODING_LIST_AS_ADDRESS\");\n // 1 byte for the length prefix\n require(item.len == 21, \"RLPReader: INVALID_ADDRESS_LENGTH\");\n\n return address(toUint(item));\n }\n\n function toUint(RLPItem memory item) internal pure returns (uint256) {\n require(!isList(item), \"RLPReader: DECODING_LIST_AS_UINT\");\n require(item.len <= 33, \"RLPReader: INVALID_UINT_LENGTH\");\n\n uint256 itemLength = _itemLength(item.memPtr);\n require(itemLength == item.len, \"RLPReader: UINT_DECODED_LENGTH_MISMATCH\");\n\n uint256 offset = _payloadOffset(item.memPtr);\n uint256 len = item.len - offset;\n uint256 result;\n uint256 memPtr = item.memPtr + offset;\n assembly {\n result := mload(memPtr)\n\n // shfit to the correct location if neccesary\n if lt(len, 32) {\n result := div(result, exp(256, sub(32, len)))\n }\n }\n\n return result;\n }\n\n // enforces 32 byte length\n function toUintStrict(RLPItem memory item) internal pure returns (uint256) {\n uint256 itemLength = _itemLength(item.memPtr);\n require(itemLength == item.len, \"RLPReader: UINT_STRICT_DECODED_LENGTH_MISMATCH\");\n // one byte prefix\n require(item.len == 33, \"RLPReader: INVALID_UINT_STRICT_LENGTH\");\n\n uint256 result;\n uint256 memPtr = item.memPtr + 1;\n assembly {\n result := mload(memPtr)\n }\n\n return result;\n }\n\n function toBytes(RLPItem memory item) internal pure returns (bytes memory) {\n uint256 listLength = _itemLength(item.memPtr);\n require(listLength == item.len, \"RLPReader: BYTES_DECODED_LENGTH_MISMATCH\");\n uint256 offset = _payloadOffset(item.memPtr);\n\n uint256 len = item.len - offset; // data length\n bytes memory result = new bytes(len);\n\n uint256 destPtr;\n assembly {\n destPtr := add(0x20, result)\n }\n\n copy(item.memPtr + offset, destPtr, len);\n return result;\n }\n\n /*\n * Private Helpers\n */\n\n // @return number of payload items inside an encoded list.\n function numItems(RLPItem memory item) private pure returns (uint256) {\n // add `isList` check if `item` is expected to be passsed without a check from calling function\n // require(isList(item), \"RLPReader: NUM_ITEMS_NOT_LIST\");\n\n uint256 count = 0;\n uint256 currPtr = item.memPtr + _payloadOffset(item.memPtr);\n uint256 endPtr = item.memPtr + item.len;\n while (currPtr < endPtr) {\n currPtr = currPtr + _itemLength(currPtr); // skip over an item\n require(currPtr <= endPtr, \"RLPReader: NUM_ITEMS_DECODED_LENGTH_MISMATCH\");\n count++;\n }\n\n return count;\n }\n\n // @return entire rlp item byte length\n function _itemLength(uint256 memPtr) private pure returns (uint256) {\n uint256 itemLen;\n uint256 byte0;\n assembly {\n byte0 := byte(0, mload(memPtr))\n }\n\n if (byte0 < STRING_SHORT_START) itemLen = 1;\n else if (byte0 < STRING_LONG_START) itemLen = byte0 - STRING_SHORT_START + 1;\n else if (byte0 < LIST_SHORT_START) {\n assembly {\n let byteLen := sub(byte0, 0xb7) // # of bytes the actual length is\n memPtr := add(memPtr, 1) // skip over the first byte\n\n /* 32 byte word size */\n let dataLen := div(mload(memPtr), exp(256, sub(32, byteLen))) // right shifting to get the len\n itemLen := add(dataLen, add(byteLen, 1))\n }\n } else if (byte0 < LIST_LONG_START) {\n itemLen = byte0 - LIST_SHORT_START + 1;\n } else {\n assembly {\n let byteLen := sub(byte0, 0xf7)\n memPtr := add(memPtr, 1)\n\n let dataLen := div(mload(memPtr), exp(256, sub(32, byteLen))) // right shifting to the correct length\n itemLen := add(dataLen, add(byteLen, 1))\n }\n }\n\n return itemLen;\n }\n\n // @return number of bytes until the data\n function _payloadOffset(uint256 memPtr) private pure returns (uint256) {\n uint256 byte0;\n assembly {\n byte0 := byte(0, mload(memPtr))\n }\n\n if (byte0 < STRING_SHORT_START) return 0;\n else if (byte0 < STRING_LONG_START || (byte0 >= LIST_SHORT_START && byte0 < LIST_LONG_START)) return 1;\n else if (byte0 < LIST_SHORT_START)\n // being explicit\n return byte0 - (STRING_LONG_START - 1) + 1;\n else return byte0 - (LIST_LONG_START - 1) + 1;\n }\n\n /*\n * @param src Pointer to source\n * @param dest Pointer to destination\n * @param len Amount of memory to copy from the source\n */\n function copy(\n uint256 src,\n uint256 dest,\n uint256 len\n ) private pure {\n if (len == 0) return;\n\n // copy as many word sizes as possible\n for (; len >= WORD_SIZE; len -= WORD_SIZE) {\n assembly {\n mstore(dest, mload(src))\n }\n\n src += WORD_SIZE;\n dest += WORD_SIZE;\n }\n\n // left over bytes. Mask is used to remove unwanted bytes from the word\n uint256 mask = 256**(WORD_SIZE - len) - 1;\n assembly {\n let srcpart := and(mload(src), not(mask)) // zero out src\n let destpart := and(mload(dest), mask) // retrieve the bytes\n mstore(dest, or(destpart, srcpart))\n }\n }\n}\n" + }, + "contracts/Libraries/tunnel/MerklePatriciaProof.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.6 <0.9.0;\n\nimport {RLPReader} from \"./RLPReader.sol\";\n\nlibrary MerklePatriciaProof {\n /*\n * @dev Verifies a merkle patricia proof.\n * @param value The terminating value in the trie.\n * @param encodedPath The path in the trie leading to value.\n * @param rlpParentNodes The rlp encoded stack of nodes.\n * @param root The root hash of the trie.\n * @return The boolean validity of the proof.\n */\n function verify(\n bytes memory value,\n bytes memory encodedPath,\n bytes memory rlpParentNodes,\n bytes32 root\n ) internal pure returns (bool) {\n RLPReader.RLPItem memory item = RLPReader.toRlpItem(rlpParentNodes);\n RLPReader.RLPItem[] memory parentNodes = RLPReader.toList(item);\n\n bytes memory currentNode;\n RLPReader.RLPItem[] memory currentNodeList;\n\n bytes32 nodeKey = root;\n uint256 pathPtr = 0;\n\n bytes memory path = _getNibbleArray(encodedPath);\n if (path.length == 0) {\n return false;\n }\n\n for (uint256 i = 0; i < parentNodes.length; i++) {\n if (pathPtr > path.length) {\n return false;\n }\n\n currentNode = RLPReader.toRlpBytes(parentNodes[i]);\n if (nodeKey != keccak256(currentNode)) {\n return false;\n }\n currentNodeList = RLPReader.toList(parentNodes[i]);\n\n if (currentNodeList.length == 17) {\n if (pathPtr == path.length) {\n if (keccak256(RLPReader.toBytes(currentNodeList[16])) == keccak256(value)) {\n return true;\n } else {\n return false;\n }\n }\n\n uint8 nextPathNibble = uint8(path[pathPtr]);\n if (nextPathNibble > 16) {\n return false;\n }\n nodeKey = bytes32(RLPReader.toUintStrict(currentNodeList[nextPathNibble]));\n pathPtr += 1;\n } else if (currentNodeList.length == 2) {\n uint256 traversed = _nibblesToTraverse(RLPReader.toBytes(currentNodeList[0]), path, pathPtr);\n if (pathPtr + traversed == path.length) {\n //leaf node\n if (keccak256(RLPReader.toBytes(currentNodeList[1])) == keccak256(value)) {\n return true;\n } else {\n return false;\n }\n }\n\n //extension node\n if (traversed == 0) {\n return false;\n }\n\n pathPtr += traversed;\n nodeKey = bytes32(RLPReader.toUintStrict(currentNodeList[1]));\n } else {\n return false;\n }\n }\n }\n\n function _nibblesToTraverse(\n bytes memory encodedPartialPath,\n bytes memory path,\n uint256 pathPtr\n ) private pure returns (uint256) {\n uint256 len = 0;\n // encodedPartialPath has elements that are each two hex characters (1 byte), but partialPath\n // and slicedPath have elements that are each one hex character (1 nibble)\n bytes memory partialPath = _getNibbleArray(encodedPartialPath);\n bytes memory slicedPath = new bytes(partialPath.length);\n\n // pathPtr counts nibbles in path\n // partialPath.length is a number of nibbles\n for (uint256 i = pathPtr; i < pathPtr + partialPath.length; i++) {\n bytes1 pathNibble = path[i];\n slicedPath[i - pathPtr] = pathNibble;\n }\n\n if (keccak256(partialPath) == keccak256(slicedPath)) {\n len = partialPath.length;\n } else {\n len = 0;\n }\n return len;\n }\n\n // bytes b must be hp encoded\n function _getNibbleArray(bytes memory b) internal pure returns (bytes memory) {\n bytes memory nibbles = \"\";\n if (b.length > 0) {\n uint8 offset;\n uint8 hpNibble = uint8(_getNthNibbleOfBytes(0, b));\n if (hpNibble == 1 || hpNibble == 3) {\n nibbles = new bytes(b.length * 2 - 1);\n bytes1 oddNibble = _getNthNibbleOfBytes(1, b);\n nibbles[0] = oddNibble;\n offset = 1;\n } else {\n nibbles = new bytes(b.length * 2 - 2);\n offset = 0;\n }\n\n for (uint256 i = offset; i < nibbles.length; i++) {\n nibbles[i] = _getNthNibbleOfBytes(i - offset + 2, b);\n }\n }\n return nibbles;\n }\n\n function _getNthNibbleOfBytes(uint256 n, bytes memory str) private pure returns (bytes1) {\n return bytes1(n % 2 == 0 ? uint8(str[n / 2]) / 0x10 : uint8(str[n / 2]) % 0x10);\n }\n}\n" + }, + "contracts/Libraries/tunnel/Merkle.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.6 <0.9.0;\n\nlibrary Merkle {\n function checkMembership(\n bytes32 leaf,\n uint256 index,\n bytes32 rootHash,\n bytes memory proof\n ) internal pure returns (bool) {\n require(proof.length % 32 == 0, \"Invalid proof length\");\n uint256 proofHeight = proof.length / 32;\n // Proof of size n means, height of the tree is n+1.\n // In a tree of height n+1, max #leafs possible is 2 ^ n\n require(index < 2**proofHeight, \"Leaf index is too big\");\n\n bytes32 proofElement;\n bytes32 computedHash = leaf;\n for (uint256 i = 32; i <= proof.length; i += 32) {\n assembly {\n proofElement := mload(add(proof, i))\n }\n\n if (index % 2 == 0) {\n computedHash = keccak256(abi.encodePacked(computedHash, proofElement));\n } else {\n computedHash = keccak256(abi.encodePacked(proofElement, computedHash));\n }\n\n index = index / 2;\n }\n return computedHash == rootHash;\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/deployments/goerli/solcInputs/4f9b70493defebe2f15081e93e9ddfbb.json b/deployments/goerli/solcInputs/4f9b70493defebe2f15081e93e9ddfbb.json new file mode 100644 index 0000000..7c1e048 --- /dev/null +++ b/deployments/goerli/solcInputs/4f9b70493defebe2f15081e93e9ddfbb.json @@ -0,0 +1,359 @@ +{ + "language": "Solidity", + "sources": { + "contracts/Coupon/Coupon.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.6 <0.9.0;\n\nimport \"@openzeppelin/contracts/math/SafeMath.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@chainlink/contracts/src/v0.6/VRFConsumerBase.sol\";\nimport \"../Interfaces/ERC721.sol\";\nimport \"../Libraries/CurrentTime.sol\";\n\ncontract Coupon is Ownable, VRFConsumerBase, CurrentTime {\n using SafeMath for uint256;\n mapping(uint256 => bool) internal redemptions;\n mapping(address => uint256) public addressEntriesCount;\n\n uint256 public constant PROMOTION_END = 1622520000;\n uint256 internal constant REBATE_AMOUNT = 20000000000000000;\n uint256 internal constant MINT_FLOOR = 40000000000000000;\n\n uint256 public promotionStart;\n address public cryptorchidsERC721;\n\n uint256 public drawingEntriesCount;\n uint256 public pot;\n address[] internal drawingEntries;\n bytes32 internal randomWinnerRequestId;\n bool public winnerRequested;\n address public winner;\n\n bytes32 internal keyHash;\n uint256 internal vrfFee;\n address public VRFCoordinator;\n address public LinkToken;\n\n constructor(\n address cryptorchidsAddress,\n address _VRFCoordinator,\n address _LinkToken,\n bytes32 _keyhash\n ) public payable VRFConsumerBase(_VRFCoordinator, _LinkToken) {\n VRFCoordinator = _VRFCoordinator;\n LinkToken = _LinkToken;\n keyHash = _keyhash;\n vrfFee = 2000000000000000000; // 2 LINK\n cryptorchidsERC721 = cryptorchidsAddress;\n promotionStart = block.timestamp;\n }\n\n /** Public function for whether the promotion is open. The promotion is only\n * open if the contract balance is greater than the currentRebate. Displayed\n * on CryptOrchids nursery for transparency.\n * @dev\n * @return bool Whether promotion is open for entries.\n */\n function promotionOpen() public view returns (bool) {\n if (currentTime() > PROMOTION_END) return false;\n if (pot > address(this).balance + currentRebate()) return false;\n if (currentRebate() > address(this).balance) return false;\n\n return true;\n }\n\n /** Check rebate value and eligible tokens. Tokens are valid if they are planted\n * after this contract is deployed, alive, and not yet redeemed.\n * @dev calls public functions on the CryptOrchids contract to build\n * an array of eligible token IDs and a rebate amount.\n * @return eligibleTokens uint256[] Uncompacted array of 0s and eligible token IDs\n * @return rebateAmount uint256 Eligible tokens * currentRebate\n */\n function checkEligibility()\n public\n view\n returns (\n uint256[] memory eligibleTokens,\n uint256 rebateAmount,\n uint256 count\n )\n {\n require(promotionOpen(), \"Promotion over\");\n\n uint256 _rebateAmount = 0;\n uint256 tokenCount = ERC721(cryptorchidsERC721).balanceOf(msg.sender);\n uint256[] memory _eligibleTokens = new uint256[](tokenCount);\n\n for (uint256 index = 0; index < tokenCount; index++) {\n uint256 tokenId = ERC721(cryptorchidsERC721).tokenOfOwnerByIndex(msg.sender, index);\n bool flowering = ERC721(cryptorchidsERC721).flowering(tokenId);\n (, uint256 plantedAt, , ) = ERC721(cryptorchidsERC721).getTokenMetadata(tokenId);\n\n if (redemptions[tokenId] != true && flowering && plantedAt > promotionStart) {\n _eligibleTokens[index] = tokenId;\n _rebateAmount += tokenRebate(tokenId);\n count += 1;\n }\n }\n\n if (_rebateAmount > safeBalance()) {\n uint256[] memory empty = new uint256[](0);\n return (empty, _rebateAmount, uint256(0));\n }\n return (_eligibleTokens, _rebateAmount, count);\n }\n\n /** Claim ETH for valid tokens. Check for valid tokens before claming.\n * @dev calls checkEligibility and sets all eligibleTokens as redeemed.\n * Then transfers caller rebateAmount.\n */\n function redeem() public virtual returns (uint256) {\n require(currentTime() < PROMOTION_END, \"Promotion over\");\n (uint256[] memory redeeming, uint256 rebateAmount, ) = checkEligibility();\n require(safeBalance() >= rebateAmount, \"COC:rdm:paused\");\n\n for (uint256 index = 0; index < redeeming.length - 1; index++) {\n uint256 tokenId = redeeming[index];\n if (tokenId > 0) redemptions[tokenId] = true;\n }\n\n payable(msg.sender).transfer(rebateAmount);\n\n return rebateAmount;\n }\n\n /** Redeem tokens for entries in drawing.\n * @dev Adds address to drawingEntries, increments entriesCount, and\n * increases pot for each eligible token, while marking each token redeemed.\n */\n function enter() public virtual {\n require(currentTime() < PROMOTION_END, \"Promotion over\");\n (uint256[] memory redeeming, uint256 rebateAmount, uint256 count) = checkEligibility();\n\n require(safeBalance() >= rebateAmount, \"COC:enr:paused\");\n\n for (uint256 index = 0; index < redeeming.length; index++) {\n uint256 tokenId = redeeming[index];\n if (tokenId > 0) {\n redemptions[tokenId] = true;\n drawingEntriesCount += 1;\n addressEntriesCount[msg.sender] += 1;\n drawingEntries.push(address(msg.sender));\n pot += tokenRebate(tokenId);\n }\n }\n }\n\n /** Current rebate amount for new, mintable token. Based on CryptOrchids current price,\n * the ramping rebate is intended to address the regrettable FOMO ramp pricing.\n * Starts at 0.02ETH, and increases with inverse correlation to price ramp to\n * offer effectively straight 0.04 ETH for seeds.\n * @dev calls CryptOrchids.currentPrice and finds difference with MINT_FLOOR to return rebate.\n */\n function currentRebate() public view returns (uint256) {\n uint256 currentPrice = ERC721(cryptorchidsERC721).currentPrice();\n\n if (currentPrice == MINT_FLOOR) return REBATE_AMOUNT;\n\n return currentPrice - MINT_FLOOR;\n }\n\n /** Redeemable rebate amount for existing token. Based on the price the token was sold at,\n * this prevents a seed holder from redeeming a seed for more than it was purchased for.\n * @dev Copies currentPrice and returns rebate amount for tokenId\n */\n function tokenRebate(uint256 tokenId) public view returns (uint256) {\n if (tokenId > 9900) {\n return 1000000000000000000 - MINT_FLOOR; // 9900+: 0.960 ETH\n } else if (tokenId > 9500) {\n return 640000000000000000 - MINT_FLOOR; // 9500-9500: 0.60 ETH\n } else if (tokenId > 7500) {\n return 320000000000000000 - MINT_FLOOR; // 7500-9500: 0.28 ETH\n } else if (tokenId > 3500) {\n return 160000000000000000 - MINT_FLOOR; // 3500-7500: 0.12 ETH\n } else if (tokenId > 1500) {\n return 80000000000000000 - MINT_FLOOR; // 1500-3500: 0.04 ETH\n } else if (tokenId > 500) {\n return 60000000000000000 - MINT_FLOOR; // 500-1500: 0.02 ETH\n } else {\n return REBATE_AMOUNT; // 0 - 500 0.02 ETH\n }\n }\n\n /** Current count of rebates available as determined by safeBalance and currentRebate\n */\n function rebatesAvailable() public view returns (uint256) {\n return SafeMath.div(safeBalance(), currentRebate());\n }\n\n /** Current rebate amount for eligible token. Based on CryptOrchids current price,\n * the ramping rebate is intended to address the regrettable FOMO ramp pricing.\n * Starts at 0.02ETH,\n * @dev calls CryptOrchids.currentPrice and finds difference to .\n * Then transfers caller rebateAmount.\n */\n function safeBalance() internal view returns (uint256) {\n return address(this).balance - pot;\n }\n\n function selectWinner(uint256 userProvidedSeed) public virtual {\n require(currentTime() > PROMOTION_END, \"COC:wW:promotion running\");\n require(randomWinnerRequestId[0] == 0, \"COC:wW:winner requested\");\n require(LINK.balanceOf(address(this)) >= vrfFee, \"COC:sW:no LINK\");\n\n randomWinnerRequestId = requestRandomness(keyHash, vrfFee, userProvidedSeed);\n }\n\n function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override {\n require(requestId == randomWinnerRequestId, \"COC:fR:invalid request ID\");\n uint256 winnerIndex = SafeMath.mod(randomness, drawingEntriesCount);\n winner = drawingEntries[winnerIndex];\n }\n\n /** Winner may withdraw ether from the contract once the promotion is over.\n *\n */\n function withdrawWinner() public {\n require(currentTime() > PROMOTION_END, \"COC:wW:promotion running\");\n require(msg.sender == winner, \"COC:wW:not winner\");\n uint256 txAmount = pot;\n pot = 0;\n payable(msg.sender).transfer(txAmount);\n }\n\n /** Withdraw ether from this contract once the promotion is over.\n * @dev Transfer remaining balance to owner if after PROMOTION_END.\n *\n */\n function withdrawUnclaimed() public onlyOwner {\n require(currentTime() > PROMOTION_END, \"COC:wU:promotion running\");\n require(pot == 0, \"COC:wU:winnings unclaimed\");\n\n uint256 balance = address(this).balance;\n payable(msg.sender).transfer(balance);\n }\n\n receive() external payable {}\n}\n" + }, + "@openzeppelin/contracts/math/SafeMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\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 uint256 c = a + b;\n if (c < a) return (false, 0);\n return (true, c);\n }\n\n /**\n * @dev Returns the substraction 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 if (b > a) return (false, 0);\n return (true, a - b);\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 // 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 * @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 if (b == 0) return (false, 0);\n return (true, a / b);\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 if (b == 0) return (false, 0);\n return (true, a % b);\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 uint256 c = a + b;\n require(c >= a, \"SafeMath: addition overflow\");\n return c;\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 require(b <= a, \"SafeMath: subtraction overflow\");\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 if (a == 0) return 0;\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n return c;\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. 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) internal pure returns (uint256) {\n require(b > 0, \"SafeMath: division by zero\");\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 require(b > 0, \"SafeMath: modulo by zero\");\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 require(b <= a, errorMessage);\n return a - b;\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\n * message unnecessarily. For custom revert reasons use {tryDiv}.\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 require(b > 0, errorMessage);\n return a / b;\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 require(b > 0, errorMessage);\n return a % b;\n }\n}\n" + }, + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"../utils/Context.sol\";\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor () internal {\n address msgSender = _msgSender();\n _owner = msgSender;\n emit OwnershipTransferred(address(0), msgSender);\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n emit OwnershipTransferred(_owner, address(0));\n _owner = address(0);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n emit OwnershipTransferred(_owner, newOwner);\n _owner = newOwner;\n }\n}\n" + }, + "@chainlink/contracts/src/v0.6/VRFConsumerBase.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.0;\n\nimport \"./vendor/SafeMathChainlink.sol\";\n\nimport \"./interfaces/LinkTokenInterface.sol\";\n\nimport \"./VRFRequestIDBase.sol\";\n\n/** ****************************************************************************\n * @notice Interface for contracts using VRF randomness\n * *****************************************************************************\n * @dev PURPOSE\n *\n * @dev Reggie the Random Oracle (not his real job) wants to provide randomness\n * @dev to Vera the verifier in such a way that Vera can be sure he's not\n * @dev making his output up to suit himself. Reggie provides Vera a public key\n * @dev to which he knows the secret key. Each time Vera provides a seed to\n * @dev Reggie, he gives back a value which is computed completely\n * @dev deterministically from the seed and the secret key.\n *\n * @dev Reggie provides a proof by which Vera can verify that the output was\n * @dev correctly computed once Reggie tells it to her, but without that proof,\n * @dev the output is indistinguishable to her from a uniform random sample\n * @dev from the output space.\n *\n * @dev The purpose of this contract is to make it easy for unrelated contracts\n * @dev to talk to Vera the verifier about the work Reggie is doing, to provide\n * @dev simple access to a verifiable source of randomness.\n * *****************************************************************************\n * @dev USAGE\n *\n * @dev Calling contracts must inherit from VRFConsumerBase, and can\n * @dev initialize VRFConsumerBase's attributes in their constructor as\n * @dev shown:\n *\n * @dev contract VRFConsumer {\n * @dev constuctor(, address _vrfCoordinator, address _link)\n * @dev VRFConsumerBase(_vrfCoordinator, _link) public {\n * @dev \n * @dev }\n * @dev }\n *\n * @dev The oracle will have given you an ID for the VRF keypair they have\n * @dev committed to (let's call it keyHash), and have told you the minimum LINK\n * @dev price for VRF service. Make sure your contract has sufficient LINK, and\n * @dev call requestRandomness(keyHash, fee, seed), where seed is the input you\n * @dev want to generate randomness from.\n *\n * @dev Once the VRFCoordinator has received and validated the oracle's response\n * @dev to your request, it will call your contract's fulfillRandomness method.\n *\n * @dev The randomness argument to fulfillRandomness is the actual random value\n * @dev generated from your seed.\n *\n * @dev The requestId argument is generated from the keyHash and the seed by\n * @dev makeRequestId(keyHash, seed). If your contract could have concurrent\n * @dev requests open, you can use the requestId to track which seed is\n * @dev associated with which randomness. See VRFRequestIDBase.sol for more\n * @dev details. (See \"SECURITY CONSIDERATIONS\" for principles to keep in mind,\n * @dev if your contract could have multiple requests in flight simultaneously.)\n *\n * @dev Colliding `requestId`s are cryptographically impossible as long as seeds\n * @dev differ. (Which is critical to making unpredictable randomness! See the\n * @dev next section.)\n *\n * *****************************************************************************\n * @dev SECURITY CONSIDERATIONS\n *\n * @dev A method with the ability to call your fulfillRandomness method directly\n * @dev could spoof a VRF response with any random value, so it's critical that\n * @dev it cannot be directly called by anything other than this base contract\n * @dev (specifically, by the VRFConsumerBase.rawFulfillRandomness method).\n *\n * @dev For your users to trust that your contract's random behavior is free\n * @dev from malicious interference, it's best if you can write it so that all\n * @dev behaviors implied by a VRF response are executed *during* your\n * @dev fulfillRandomness method. If your contract must store the response (or\n * @dev anything derived from it) and use it later, you must ensure that any\n * @dev user-significant behavior which depends on that stored value cannot be\n * @dev manipulated by a subsequent VRF request.\n *\n * @dev Similarly, both miners and the VRF oracle itself have some influence\n * @dev over the order in which VRF responses appear on the blockchain, so if\n * @dev your contract could have multiple VRF requests in flight simultaneously,\n * @dev you must ensure that the order in which the VRF responses arrive cannot\n * @dev be used to manipulate your contract's user-significant behavior.\n *\n * @dev Since the ultimate input to the VRF is mixed with the block hash of the\n * @dev block in which the request is made, user-provided seeds have no impact\n * @dev on its economic security properties. They are only included for API\n * @dev compatability with previous versions of this contract.\n *\n * @dev Since the block hash of the block which contains the requestRandomness\n * @dev call is mixed into the input to the VRF *last*, a sufficiently powerful\n * @dev miner could, in principle, fork the blockchain to evict the block\n * @dev containing the request, forcing the request to be included in a\n * @dev different block with a different hash, and therefore a different input\n * @dev to the VRF. However, such an attack would incur a substantial economic\n * @dev cost. This cost scales with the number of blocks the VRF oracle waits\n * @dev until it calls responds to a request.\n */\nabstract contract VRFConsumerBase is VRFRequestIDBase {\n\n using SafeMathChainlink for uint256;\n\n /**\n * @notice fulfillRandomness handles the VRF response. Your contract must\n * @notice implement it. See \"SECURITY CONSIDERATIONS\" above for important\n * @notice principles to keep in mind when implementing your fulfillRandomness\n * @notice method.\n *\n * @dev VRFConsumerBase expects its subcontracts to have a method with this\n * @dev signature, and will call it once it has verified the proof\n * @dev associated with the randomness. (It is triggered via a call to\n * @dev rawFulfillRandomness, below.)\n *\n * @param requestId The Id initially returned by requestRandomness\n * @param randomness the VRF output\n */\n function fulfillRandomness(bytes32 requestId, uint256 randomness)\n internal virtual;\n\n /**\n * @notice requestRandomness initiates a request for VRF output given _seed\n *\n * @dev The fulfillRandomness method receives the output, once it's provided\n * @dev by the Oracle, and verified by the vrfCoordinator.\n *\n * @dev The _keyHash must already be registered with the VRFCoordinator, and\n * @dev the _fee must exceed the fee specified during registration of the\n * @dev _keyHash.\n *\n * @dev The _seed parameter is vestigial, and is kept only for API\n * @dev compatibility with older versions. It can't *hurt* to mix in some of\n * @dev your own randomness, here, but it's not necessary because the VRF\n * @dev oracle will mix the hash of the block containing your request into the\n * @dev VRF seed it ultimately uses.\n *\n * @param _keyHash ID of public key against which randomness is generated\n * @param _fee The amount of LINK to send with the request\n * @param _seed seed mixed into the input of the VRF.\n *\n * @return requestId unique ID for this request\n *\n * @dev The returned requestId can be used to distinguish responses to\n * @dev concurrent requests. It is passed as the first argument to\n * @dev fulfillRandomness.\n */\n function requestRandomness(bytes32 _keyHash, uint256 _fee, uint256 _seed)\n internal returns (bytes32 requestId)\n {\n LINK.transferAndCall(vrfCoordinator, _fee, abi.encode(_keyHash, _seed));\n // This is the seed passed to VRFCoordinator. The oracle will mix this with\n // the hash of the block containing this request to obtain the seed/input\n // which is finally passed to the VRF cryptographic machinery.\n uint256 vRFSeed = makeVRFInputSeed(_keyHash, _seed, address(this), nonces[_keyHash]);\n // nonces[_keyHash] must stay in sync with\n // VRFCoordinator.nonces[_keyHash][this], which was incremented by the above\n // successful LINK.transferAndCall (in VRFCoordinator.randomnessRequest).\n // This provides protection against the user repeating their input seed,\n // which would result in a predictable/duplicate output, if multiple such\n // requests appeared in the same block.\n nonces[_keyHash] = nonces[_keyHash].add(1);\n return makeRequestId(_keyHash, vRFSeed);\n }\n\n LinkTokenInterface immutable internal LINK;\n address immutable private vrfCoordinator;\n\n // Nonces for each VRF key from which randomness has been requested.\n //\n // Must stay in sync with VRFCoordinator[_keyHash][this]\n mapping(bytes32 /* keyHash */ => uint256 /* nonce */) private nonces;\n\n /**\n * @param _vrfCoordinator address of VRFCoordinator contract\n * @param _link address of LINK token contract\n *\n * @dev https://docs.chain.link/docs/link-token-contracts\n */\n constructor(address _vrfCoordinator, address _link) public {\n vrfCoordinator = _vrfCoordinator;\n LINK = LinkTokenInterface(_link);\n }\n\n // rawFulfillRandomness is called by VRFCoordinator when it receives a valid VRF\n // proof. rawFulfillRandomness then calls fulfillRandomness, after validating\n // the origin of the call\n function rawFulfillRandomness(bytes32 requestId, uint256 randomness) external {\n require(msg.sender == vrfCoordinator, \"Only VRFCoordinator can fulfill\");\n fulfillRandomness(requestId, randomness);\n }\n}\n" + }, + "contracts/Interfaces/ERC721.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.6 <0.9.0;\n\ninterface ERC721 {\n enum Stage {Unsold, Seed, Flower, Dead}\n\n struct CryptOrchid {\n string species;\n uint256 plantedAt;\n uint256 waterLevel;\n }\n\n /// @dev This emits when ownership of any NFT changes by any mechanism.\n /// This event emits when NFTs are created (`from` == 0) and destroyed\n /// (`to` == 0). Exception: during contract creation, any number of NFTs\n /// may be created and assigned without emitting Transfer. At the time of\n /// any transfer, the approved address for that NFT (if any) is reset to none.\n event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId);\n\n /// @dev This emits when the approved address for an NFT is changed or\n /// reaffirmed. The zero address indicates there is no approved address.\n /// When a Transfer event emits, this also indicates that the approved\n /// address for that NFT (if any) is reset to none.\n event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId);\n\n /// @dev This emits when an operator is enabled or disabled for an owner.\n /// The operator can manage all NFTs of the owner.\n event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved);\n\n /// @notice Count all NFTs assigned to an owner\n /// @dev NFTs assigned to the zero address are considered invalid, and this\n /// function throws for queries about the zero address.\n /// @param _owner An address for whom to query the balance\n /// @return The number of NFTs owned by `_owner`, possibly zero\n function balanceOf(address _owner) external view returns (uint256);\n\n /// @notice Find the owner of an NFT\n /// @dev NFTs assigned to zero address are considered invalid, and queries\n /// about them do throw.\n /// @param _tokenId The identifier for an NFT\n /// @return The address of the owner of the NFT\n function ownerOf(uint256 _tokenId) external view returns (address);\n\n /// @notice Transfers the ownership of an NFT from one address to another address\n /// @dev Throws unless `msg.sender` is the current owner, an authorized\n /// operator, or the approved address for this NFT. Throws if `_from` is\n /// not the current owner. Throws if `_to` is the zero address. Throws if\n /// `_tokenId` is not a valid NFT. When transfer is complete, this function\n /// checks if `_to` is a smart contract (code size > 0). If so, it calls\n /// `onERC721Received` on `_to` and throws if the return value is not\n /// `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`.\n /// @param _from The current owner of the NFT\n /// @param _to The new owner\n /// @param _tokenId The NFT to transfer\n /// @param data Additional data with no specified format, sent in call to `_to`\n function safeTransferFrom(\n address _from,\n address _to,\n uint256 _tokenId,\n bytes calldata data\n ) external payable;\n\n /// @notice Transfers the ownership of an NFT from one address to another address\n /// @dev This works identically to the other function with an extra data parameter,\n /// except this function just sets data to \"\".\n /// @param _from The current owner of the NFT\n /// @param _to The new owner\n /// @param _tokenId The NFT to transfer\n function safeTransferFrom(\n address _from,\n address _to,\n uint256 _tokenId\n ) external payable;\n\n /// @notice Transfer ownership of an NFT -- THE CALLER IS RESPONSIBLE\n /// TO CONFIRM THAT `_to` IS CAPABLE OF RECEIVING NFTS OR ELSE\n /// THEY MAY BE PERMANENTLY LOST\n /// @dev Throws unless `msg.sender` is the current owner, an authorized\n /// operator, or the approved address for this NFT. Throws if `_from` is\n /// not the current owner. Throws if `_to` is the zero address. Throws if\n /// `_tokenId` is not a valid NFT.\n /// @param _from The current owner of the NFT\n /// @param _to The new owner\n /// @param _tokenId The NFT to transfer\n function transferFrom(\n address _from,\n address _to,\n uint256 _tokenId\n ) external payable;\n\n /// @notice Change or reaffirm the approved address for an NFT\n /// @dev The zero address indicates there is no approved address.\n /// Throws unless `msg.sender` is the current NFT owner, or an authorized\n /// operator of the current owner.\n /// @param _approved The new approved NFT controller\n /// @param _tokenId The NFT to approve\n function approve(address _approved, uint256 _tokenId) external payable;\n\n /// @notice Enable or disable approval for a third party (\"operator\") to manage\n /// all of `msg.sender`'s assets\n /// @dev Emits the ApprovalForAll event. The contract MUST allow\n /// multiple operators per owner.\n /// @param _operator Address to add to the set of authorized operators\n /// @param _approved True if the operator is approved, false to revoke approval\n function setApprovalForAll(address _operator, bool _approved) external;\n\n /// @notice Get the approved address for a single NFT\n /// @dev Throws if `_tokenId` is not a valid NFT.\n /// @param _tokenId The NFT to find the approved address for\n /// @return The approved address for this NFT, or the zero address if there is none\n function getApproved(uint256 _tokenId) external view returns (address);\n\n /// @notice Query if an address is an authorized operator for another address\n /// @param _owner The address that owns the NFTs\n /// @param _operator The address that acts on behalf of the owner\n /// @return True if `_operator` is an approved operator for `_owner`, false otherwise\n function isApprovedForAll(address _owner, address _operator) external view returns (bool);\n\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 tokenId);\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 function flowering(uint256 tokenId) external view returns (bool);\n\n function currentPrice() external view returns (uint256 price);\n\n function getTokenMetadata(uint256 tokenId)\n external\n view\n returns (\n string memory,\n uint256,\n uint256,\n Stage\n );\n}\n" + }, + "contracts/Libraries/CurrentTime.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.6 <0.9.0;\n\ncontract CurrentTime {\n function currentTime() internal view virtual returns (uint256) {\n return block.timestamp;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <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 GSN 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 payable) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes memory) {\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\n return msg.data;\n }\n}\n" + }, + "@chainlink/contracts/src/v0.6/vendor/SafeMathChainlink.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.0;\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeMathChainlink {\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 * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, \"SafeMath: addition overflow\");\n\n return c;\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 * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n require(b <= a, \"SafeMath: subtraction overflow\");\n uint256 c = a - b;\n\n return c;\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 * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\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-solidity/pull/522\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts 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 * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // Solidity only automatically asserts when dividing by 0\n require(b > 0, \"SafeMath: division by zero\");\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n\n return c;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts 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 * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n require(b != 0, \"SafeMath: modulo by zero\");\n return a % b;\n }\n}\n" + }, + "@chainlink/contracts/src/v0.6/interfaces/LinkTokenInterface.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.0;\n\ninterface LinkTokenInterface {\n function allowance(address owner, address spender) external view returns (uint256 remaining);\n function approve(address spender, uint256 value) external returns (bool success);\n function balanceOf(address owner) external view returns (uint256 balance);\n function decimals() external view returns (uint8 decimalPlaces);\n function decreaseApproval(address spender, uint256 addedValue) external returns (bool success);\n function increaseApproval(address spender, uint256 subtractedValue) external;\n function name() external view returns (string memory tokenName);\n function symbol() external view returns (string memory tokenSymbol);\n function totalSupply() external view returns (uint256 totalTokensIssued);\n function transfer(address to, uint256 value) external returns (bool success);\n function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool success);\n function transferFrom(address from, address to, uint256 value) external returns (bool success);\n}\n" + }, + "@chainlink/contracts/src/v0.6/VRFRequestIDBase.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.0;\n\ncontract VRFRequestIDBase {\n\n /**\n * @notice returns the seed which is actually input to the VRF coordinator\n *\n * @dev To prevent repetition of VRF output due to repetition of the\n * @dev user-supplied seed, that seed is combined in a hash with the\n * @dev user-specific nonce, and the address of the consuming contract. The\n * @dev risk of repetition is mostly mitigated by inclusion of a blockhash in\n * @dev the final seed, but the nonce does protect against repetition in\n * @dev requests which are included in a single block.\n *\n * @param _userSeed VRF seed input provided by user\n * @param _requester Address of the requesting contract\n * @param _nonce User-specific nonce at the time of the request\n */\n function makeVRFInputSeed(bytes32 _keyHash, uint256 _userSeed,\n address _requester, uint256 _nonce)\n internal pure returns (uint256)\n {\n return uint256(keccak256(abi.encode(_keyHash, _userSeed, _requester, _nonce)));\n }\n\n /**\n * @notice Returns the id for this request\n * @param _keyHash The serviceAgreement ID to be used for this request\n * @param _vRFInputSeed The seed to be passed directly to the VRF\n * @return The id for this request\n *\n * @dev Note that _vRFInputSeed is not the seed passed by the consuming\n * @dev contract, but the one generated by makeVRFInputSeed\n */\n function makeRequestId(\n bytes32 _keyHash, uint256 _vRFInputSeed) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(_keyHash, _vRFInputSeed));\n }\n}\n" + }, + "contracts/test/CouponMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.6 <0.9.0;\n\nimport \"../Coupon/Coupon.sol\";\n\n// DEBUG\n\nimport \"hardhat/console.sol\";\n\ncontract CouponMock is Coupon {\n event Redemption(address account, uint256 rebate);\n event RequestedRandomness(bytes32 requestId);\n\n uint256 internal secondsToAdd = 0;\n\n constructor(\n address cryptorchidsAddress,\n address _VRFCoordinator,\n address _LinkToken,\n bytes32 _keyhash\n ) public payable Coupon(cryptorchidsAddress, _VRFCoordinator, _LinkToken, _keyhash) {}\n\n /**\n * @dev calls checkEligibility and sets all eligibleTokens as redeemed.\n * Then transfers caller rebateAmount.\n */\n function redeem() public virtual override returns (uint256) {\n uint256 rebateAmount = super.redeem();\n emit Redemption(msg.sender, rebateAmount);\n return rebateAmount;\n }\n\n function selectWinner(uint256 userProvidedSeed) public override {\n super.selectWinner(userProvidedSeed);\n emit RequestedRandomness(randomWinnerRequestId);\n }\n\n function timeTravel(uint256 s) public {\n secondsToAdd = s;\n }\n\n function currentTime() internal view virtual override returns (uint256) {\n return block.timestamp + secondsToAdd;\n }\n}\n" + }, + "hardhat/console.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >= 0.4.22 <0.9.0;\n\nlibrary console {\n\taddress constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\n\n\tfunction _sendLogPayload(bytes memory payload) private view {\n\t\tuint256 payloadLength = payload.length;\n\t\taddress consoleAddress = CONSOLE_ADDRESS;\n\t\tassembly {\n\t\t\tlet payloadStart := add(payload, 32)\n\t\t\tlet r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\n\t\t}\n\t}\n\n\tfunction log() internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log()\"));\n\t}\n\n\tfunction logInt(int p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(int)\", p0));\n\t}\n\n\tfunction logUint(uint p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n\t}\n\n\tfunction logString(string memory p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n\t}\n\n\tfunction logBool(bool p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n\t}\n\n\tfunction logAddress(address p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n\t}\n\n\tfunction logBytes(bytes memory p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes)\", p0));\n\t}\n\n\tfunction logBytes1(bytes1 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes1)\", p0));\n\t}\n\n\tfunction logBytes2(bytes2 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes2)\", p0));\n\t}\n\n\tfunction logBytes3(bytes3 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes3)\", p0));\n\t}\n\n\tfunction logBytes4(bytes4 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes4)\", p0));\n\t}\n\n\tfunction logBytes5(bytes5 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes5)\", p0));\n\t}\n\n\tfunction logBytes6(bytes6 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes6)\", p0));\n\t}\n\n\tfunction logBytes7(bytes7 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes7)\", p0));\n\t}\n\n\tfunction logBytes8(bytes8 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes8)\", p0));\n\t}\n\n\tfunction logBytes9(bytes9 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes9)\", p0));\n\t}\n\n\tfunction logBytes10(bytes10 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes10)\", p0));\n\t}\n\n\tfunction logBytes11(bytes11 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes11)\", p0));\n\t}\n\n\tfunction logBytes12(bytes12 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes12)\", p0));\n\t}\n\n\tfunction logBytes13(bytes13 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes13)\", p0));\n\t}\n\n\tfunction logBytes14(bytes14 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes14)\", p0));\n\t}\n\n\tfunction logBytes15(bytes15 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes15)\", p0));\n\t}\n\n\tfunction logBytes16(bytes16 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes16)\", p0));\n\t}\n\n\tfunction logBytes17(bytes17 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes17)\", p0));\n\t}\n\n\tfunction logBytes18(bytes18 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes18)\", p0));\n\t}\n\n\tfunction logBytes19(bytes19 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes19)\", p0));\n\t}\n\n\tfunction logBytes20(bytes20 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes20)\", p0));\n\t}\n\n\tfunction logBytes21(bytes21 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes21)\", p0));\n\t}\n\n\tfunction logBytes22(bytes22 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes22)\", p0));\n\t}\n\n\tfunction logBytes23(bytes23 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes23)\", p0));\n\t}\n\n\tfunction logBytes24(bytes24 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes24)\", p0));\n\t}\n\n\tfunction logBytes25(bytes25 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes25)\", p0));\n\t}\n\n\tfunction logBytes26(bytes26 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes26)\", p0));\n\t}\n\n\tfunction logBytes27(bytes27 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes27)\", p0));\n\t}\n\n\tfunction logBytes28(bytes28 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes28)\", p0));\n\t}\n\n\tfunction logBytes29(bytes29 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes29)\", p0));\n\t}\n\n\tfunction logBytes30(bytes30 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes30)\", p0));\n\t}\n\n\tfunction logBytes31(bytes31 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes31)\", p0));\n\t}\n\n\tfunction logBytes32(bytes32 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes32)\", p0));\n\t}\n\n\tfunction log(uint p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n\t}\n\n\tfunction log(string memory p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n\t}\n\n\tfunction log(bool p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n\t}\n\n\tfunction log(address p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n\t}\n\n\tfunction log(uint p0, uint p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint)\", p0, p1));\n\t}\n\n\tfunction log(uint p0, string memory p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string)\", p0, p1));\n\t}\n\n\tfunction log(uint p0, bool p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool)\", p0, p1));\n\t}\n\n\tfunction log(uint p0, address p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address)\", p0, p1));\n\t}\n\n\tfunction log(string memory p0, uint p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint)\", p0, p1));\n\t}\n\n\tfunction log(string memory p0, string memory p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n\t}\n\n\tfunction log(string memory p0, bool p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool)\", p0, p1));\n\t}\n\n\tfunction log(string memory p0, address p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address)\", p0, p1));\n\t}\n\n\tfunction log(bool p0, uint p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint)\", p0, p1));\n\t}\n\n\tfunction log(bool p0, string memory p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string)\", p0, p1));\n\t}\n\n\tfunction log(bool p0, bool p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool)\", p0, p1));\n\t}\n\n\tfunction log(bool p0, address p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address)\", p0, p1));\n\t}\n\n\tfunction log(address p0, uint p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint)\", p0, p1));\n\t}\n\n\tfunction log(address p0, string memory p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string)\", p0, p1));\n\t}\n\n\tfunction log(address p0, bool p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool)\", p0, p1));\n\t}\n\n\tfunction log(address p0, address p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address)\", p0, p1));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, address p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, address p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, uint p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, bool p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, address p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, address p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, address p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,address)\", p0, p1, p2, p3));\n\t}\n\n}\n" + }, + "contracts/test/CurrentTimeMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.6 <0.9.0;\n\nimport \"../Libraries/CurrentTime.sol\";\n\ncontract CurrentTimeMock is CurrentTime {\n uint256 internal secondsToAdd = 0;\n}\n" + }, + "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol": { + "content": "// SPDX-License-Identifier: MIT\n\n// NB: this is only meant to deploy to goerli, where chainlink VRF is unavailable.\n// goerli connects to polygon mumbai, which is what we need to test PoS bridging.\n// Deploy scripts prevent other contracts from goerli deploy, and this contract from\n// anything other than goerlui\npragma solidity >=0.6.6 <0.9.0;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts/math/SafeMath.sol\";\nimport \"@openzeppelin/contracts/presets/ERC721PresetMinterPauserAutoId.sol\";\nimport \"@openzeppelin/contracts/utils/Counters.sol\";\nimport \"../Libraries/CurrentTime.sol\";\n\ncontract CryptOrchidGoerli is ERC721PresetMinterPauserAutoId, Ownable, CurrentTime {\n using SafeMath for uint256;\n using Strings for string;\n using Counters for Counters.Counter;\n\n struct CryptOrchid {\n string species;\n uint256 plantedAt;\n uint256 waterLevel;\n }\n mapping(uint256 => CryptOrchid) public cryptorchids;\n\n enum Stage {Unsold, Seed, Flower, Dead}\n\n bool internal saleStarted = false;\n bool internal growingStarted = false;\n\n uint256 public constant MAX_CRYPTORCHIDS = 10000;\n uint256 public constant GROWTH_CYCLE = 604800; // 7 days\n uint256 public constant WATERING_WINDOW = 10800; // 3 hours\n uint256 internal constant MAX_TIMESTAMP = 2**256 - 1;\n string internal constant GRANUM_IPFS = \"QmWd1mn7DuGyx9ByfNeqCsgdSUsJZ1cragitgaygsqDvEm\";\n\n uint16[10] private limits = [0, 3074, 6074, 8074, 9074, 9574, 9824, 9924, 9974, 9999];\n string[10] private genum = [\n \"shenzhenica orchidaceae\",\n \"phalaenopsis micholitzii\",\n \"guarianthe aurantiaca\",\n \"vanda coerulea\",\n \"cypripedium calceolus\",\n \"paphiopedilum vietnamense\",\n \"miltonia kayasimae\",\n \"platanthera azorica\",\n \"dendrophylax lindenii\",\n \"paphiopedilum rothschildianum\"\n ];\n\n string[10] private speciesIPFSConstant = [\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/shenzhenica-orchidaceae.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/phalaenopsis-micholitzii.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/guarianthe-aurantiaca.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/vanda-coerulea.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/cypripedium-calceolus.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/paphiopedilum-vietnamense.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/miltonia-kayasimae.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/platanthera-azorica.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/dendrophylax-lindenii.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/paphiopedilum-rothschildianum.json\"\n ];\n\n string[10] private deadSpeciesIPFSConstant = [\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/shenzhenica-orchidaceae.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/phalaenopsis-micholitzii.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/guarianthe-aurantiaca.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/vanda-coerulea.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/cypripedium-calceolus.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/paphiopedilum-vietnamense.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/miltonia-kayasimae.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/platanthera-azorica.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/dendrophylax-lindenii.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/paphiopedilum-rothschildianum.json\"\n ];\n\n Counters.Counter private _tokenIds;\n\n mapping(bytes32 => uint256) public requestToToken;\n mapping(bytes32 => string) private speciesIPFS;\n mapping(bytes32 => string) private deadSpeciesIPFS;\n\n constructor() public payable ERC721PresetMinterPauserAutoId(\"CryptOrchids\", \"ORCHD\", \"ipfs://\") {\n for (uint256 index = 0; index < genum.length; index++) {\n speciesIPFS[keccak256(abi.encode(genum[index]))] = speciesIPFSConstant[index];\n deadSpeciesIPFS[keccak256(abi.encode(genum[index]))] = deadSpeciesIPFSConstant[index];\n }\n }\n\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\n (string memory species, , , ) = getTokenMetadata(tokenId);\n\n if (growthStage(tokenId) == Stage.Seed) {\n return string(abi.encodePacked(baseURI(), GRANUM_IPFS));\n }\n\n if (growthStage(tokenId) == Stage.Flower) {\n return string(abi.encodePacked(baseURI(), speciesIPFS[keccak256(abi.encode(species))]));\n }\n\n return string(abi.encodePacked(baseURI(), deadSpeciesIPFS[keccak256(abi.encode(species))]));\n }\n\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 tokenId\n ) internal virtual override {\n require(address(0) == to || alive(tokenId), \"Dead CryptOrchids cannot be transferred\");\n super._beforeTokenTransfer(from, to, tokenId);\n }\n\n function currentPrice() public view returns (uint256 price) {\n uint256 currentSupply = totalSupply();\n if (currentSupply >= 9900) {\n return 1000000000000000000; // 9900+: 1.00 ETH\n } else if (currentSupply >= 9500) {\n return 640000000000000000; // 9500-9500: 0.64 ETH\n } else if (currentSupply >= 7500) {\n return 320000000000000000; // 7500-9500: 0.32 ETH\n } else if (currentSupply >= 3500) {\n return 160000000000000000; // 3500-7500: 0.16 ETH\n } else if (currentSupply >= 1500) {\n return 80000000000000000; // 1500-3500: 0.08 ETH\n } else if (currentSupply >= 500) {\n return 60000000000000000; // 500-1500: 0.06 ETH\n } else {\n return 40000000000000000; // 0 - 500 0.04 ETH\n }\n }\n\n function startSale() public onlyOwner {\n saleStarted = true;\n }\n\n function startGrowing() public onlyOwner {\n growingStarted = true;\n }\n\n /**\n * @dev Withdraw ether from this contract (Callable by owner only)\n */\n function withdraw() public onlyOwner {\n uint256 balance = address(this).balance;\n msg.sender.transfer(balance);\n }\n\n receive() external payable {}\n\n function webMint(uint256 units) public payable {\n require(saleStarted, \"The Nursery is closed\");\n require(units <= MAX_CRYPTORCHIDS - totalSupply(), \"Not enough bulbs left\");\n require(totalSupply() < MAX_CRYPTORCHIDS, \"Sale has already ended\");\n require(units > 0 && units <= 20, \"You can plant minimum 1, maximum 20 CryptOrchids\");\n require(SafeMath.add(totalSupply(), units) <= MAX_CRYPTORCHIDS, \"Exceeds MAX_CRYPTORCHIDS\");\n require(msg.value >= SafeMath.mul(currentPrice(), units), \"Ether value sent is below the price\");\n\n for (uint256 i = 0; i < units; i++) {\n _tokenIds.increment();\n uint256 newItemId = _tokenIds.current();\n cryptorchids[newItemId] = CryptOrchid({species: \"granum\", plantedAt: MAX_TIMESTAMP, waterLevel: 0});\n _safeMint(msg.sender, newItemId);\n }\n }\n\n function germinate(uint256 tokenId, uint256 userProvidedSeed) public {\n require(growingStarted, \"Germination starts 2021-04-12T16:00:00Z\");\n require(_isApprovedOrOwner(_msgSender(), tokenId), \"Only the Owner can germinate a CryptOrchid.\");\n _requestRandom(tokenId, userProvidedSeed);\n }\n\n function _requestRandom(uint256 tokenId, uint256 userProvidedSeed) internal returns (bytes32 requestId) {\n uint256 pseudoRand = uint256(keccak256(abi.encodePacked(block.timestamp, block.difficulty, userProvidedSeed)));\n fulfillRandomness(tokenId, pseudoRand);\n }\n\n function fulfillRandomness(uint256 tokenId, uint256 randomness) internal {\n CryptOrchid storage orchid = cryptorchids[tokenId];\n string memory species = pickSpecies(SafeMath.mod(randomness, 10000));\n orchid.species = species;\n orchid.plantedAt = currentTime();\n address tokenOwner = ownerOf(tokenId);\n }\n\n function alive(uint256 tokenId) public view returns (bool) {\n return growthStage(tokenId) != Stage.Dead;\n }\n\n function flowering(uint256 tokenId) public view returns (bool) {\n return growthStage(tokenId) == Stage.Flower;\n }\n\n function growthStage(uint256 tokenId) public view returns (Stage) {\n CryptOrchid memory orchid = cryptorchids[tokenId];\n if (orchid.plantedAt == 0) return Stage.Unsold;\n if (orchid.plantedAt == MAX_TIMESTAMP) return Stage.Seed;\n uint256 currentWaterLevel = orchid.waterLevel;\n uint256 elapsed = currentTime() - orchid.plantedAt;\n uint256 fullCycles = SafeMath.div(uint256(elapsed), GROWTH_CYCLE);\n uint256 modulo = SafeMath.mod(elapsed, GROWTH_CYCLE);\n\n if (currentWaterLevel == fullCycles) {\n return Stage.Flower;\n }\n\n if (SafeMath.add(currentWaterLevel, 1) == fullCycles && modulo < WATERING_WINDOW) {\n return Stage.Flower;\n }\n\n return Stage.Dead;\n }\n\n function water(uint256 tokenId) public {\n require(_isApprovedOrOwner(_msgSender(), tokenId), \"Only the Owner can water a CryptOrchid.\");\n\n if (!alive(tokenId)) {\n return;\n }\n\n CryptOrchid storage orchid = cryptorchids[tokenId];\n\n uint256 wateringLevel = orchid.waterLevel;\n uint256 elapsed = currentTime() - orchid.plantedAt;\n uint256 fullCycles = SafeMath.div(uint256(elapsed), GROWTH_CYCLE);\n\n if (wateringLevel > fullCycles) {\n return;\n }\n\n uint256 newWaterLevel = SafeMath.add(wateringLevel, 1);\n orchid.waterLevel = newWaterLevel;\n }\n\n function getTokenMetadata(uint256 tokenId)\n public\n view\n returns (\n string memory,\n uint256,\n uint256,\n Stage\n )\n {\n return (\n cryptorchids[tokenId].species,\n cryptorchids[tokenId].plantedAt,\n cryptorchids[tokenId].waterLevel,\n growthStage(tokenId)\n );\n }\n\n /**\n * @notice Pick species for random number index\n * @param randomIndex uint256\n * @return species string\n */\n function pickSpecies(uint256 randomIndex) private view returns (string memory) {\n for (uint256 i = 0; i < 10; i++) {\n if (randomIndex <= limits[i]) {\n return genum[i];\n }\n }\n }\n}\n" + }, + "@openzeppelin/contracts/presets/ERC721PresetMinterPauserAutoId.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"../access/AccessControl.sol\";\nimport \"../utils/Context.sol\";\nimport \"../utils/Counters.sol\";\nimport \"../token/ERC721/ERC721.sol\";\nimport \"../token/ERC721/ERC721Burnable.sol\";\nimport \"../token/ERC721/ERC721Pausable.sol\";\n\n/**\n * @dev {ERC721} token, including:\n *\n * - ability for holders to burn (destroy) their tokens\n * - a minter role that allows for token minting (creation)\n * - a pauser role that allows to stop all token transfers\n * - token ID and URI autogeneration\n *\n * This contract uses {AccessControl} to lock permissioned functions using the\n * different roles - head to its documentation for details.\n *\n * The account that deploys the contract will be granted the minter and pauser\n * roles, as well as the default admin role, which will let it grant both minter\n * and pauser roles to other accounts.\n */\ncontract ERC721PresetMinterPauserAutoId is Context, AccessControl, ERC721Burnable, ERC721Pausable {\n using Counters for Counters.Counter;\n\n bytes32 public constant MINTER_ROLE = keccak256(\"MINTER_ROLE\");\n bytes32 public constant PAUSER_ROLE = keccak256(\"PAUSER_ROLE\");\n\n Counters.Counter private _tokenIdTracker;\n\n /**\n * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE` and `PAUSER_ROLE` to the\n * account that deploys the contract.\n *\n * Token URIs will be autogenerated based on `baseURI` and their token IDs.\n * See {ERC721-tokenURI}.\n */\n constructor(string memory name, string memory symbol, string memory baseURI) public ERC721(name, symbol) {\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n\n _setupRole(MINTER_ROLE, _msgSender());\n _setupRole(PAUSER_ROLE, _msgSender());\n\n _setBaseURI(baseURI);\n }\n\n /**\n * @dev Creates a new token for `to`. Its token ID will be automatically\n * assigned (and available on the emitted {IERC721-Transfer} event), and the token\n * URI autogenerated based on the base URI passed at construction.\n *\n * See {ERC721-_mint}.\n *\n * Requirements:\n *\n * - the caller must have the `MINTER_ROLE`.\n */\n function mint(address to) public virtual {\n require(hasRole(MINTER_ROLE, _msgSender()), \"ERC721PresetMinterPauserAutoId: must have minter role to mint\");\n\n // We cannot just use balanceOf to create the new tokenId because tokens\n // can be burned (destroyed), so we need a separate counter.\n _mint(to, _tokenIdTracker.current());\n _tokenIdTracker.increment();\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() public virtual {\n require(hasRole(PAUSER_ROLE, _msgSender()), \"ERC721PresetMinterPauserAutoId: must have pauser role to pause\");\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() public virtual {\n require(hasRole(PAUSER_ROLE, _msgSender()), \"ERC721PresetMinterPauserAutoId: must have pauser role to unpause\");\n _unpause();\n }\n\n function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override(ERC721, ERC721Pausable) {\n super._beforeTokenTransfer(from, to, tokenId);\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Counters.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"../math/SafeMath.sol\";\n\n/**\n * @title Counters\n * @author Matt Condon (@shrugs)\n * @dev Provides counters that can only be incremented or decremented by one. This can be used e.g. to track the number\n * of elements in a mapping, issuing ERC721 ids, or counting request ids.\n *\n * Include with `using Counters for Counters.Counter;`\n * Since it is not possible to overflow a 256 bit integer with increments of one, `increment` can skip the {SafeMath}\n * overflow check, thereby saving gas. This does assume however correct usage, in that the underlying `_value` is never\n * directly accessed.\n */\nlibrary Counters {\n using SafeMath for uint256;\n\n struct Counter {\n // This variable should never be directly accessed by users of the library: interactions must be restricted to\n // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\n // this feature: see https://github.com/ethereum/solidity/issues/4637\n uint256 _value; // default: 0\n }\n\n function current(Counter storage counter) internal view returns (uint256) {\n return counter._value;\n }\n\n function increment(Counter storage counter) internal {\n // The {SafeMath} overflow check can be skipped here, see the comment at the top\n counter._value += 1;\n }\n\n function decrement(Counter storage counter) internal {\n counter._value = counter._value.sub(1);\n }\n}\n" + }, + "@openzeppelin/contracts/access/AccessControl.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"../utils/EnumerableSet.sol\";\nimport \"../utils/Address.sol\";\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module that allows children to implement role-based access\n * control mechanisms.\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 * ```\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 * ```\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.\n */\nabstract contract AccessControl is Context {\n using EnumerableSet for EnumerableSet.AddressSet;\n using Address for address;\n\n struct RoleData {\n EnumerableSet.AddressSet 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 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 {_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) public view returns (bool) {\n return _roles[role].members.contains(account);\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 returns (uint256) {\n return _roles[role].members.length();\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 returns (address) {\n return _roles[role].members.at(index);\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 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 function grantRole(bytes32 role, address account) public virtual {\n require(hasRole(_roles[role].adminRole, _msgSender()), \"AccessControl: sender must be an admin to grant\");\n\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 function revokeRole(bytes32 role, address account) public virtual {\n require(hasRole(_roles[role].adminRole, _msgSender()), \"AccessControl: sender must be an admin to revoke\");\n\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 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) public virtual {\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 * [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 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 emit RoleAdminChanged(role, _roles[role].adminRole, adminRole);\n _roles[role].adminRole = adminRole;\n }\n\n function _grantRole(bytes32 role, address account) private {\n if (_roles[role].members.add(account)) {\n emit RoleGranted(role, account, _msgSender());\n }\n }\n\n function _revokeRole(bytes32 role, address account) private {\n if (_roles[role].members.remove(account)) {\n emit RoleRevoked(role, account, _msgSender());\n }\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/ERC721.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"../../utils/Context.sol\";\nimport \"./IERC721.sol\";\nimport \"./IERC721Metadata.sol\";\nimport \"./IERC721Enumerable.sol\";\nimport \"./IERC721Receiver.sol\";\nimport \"../../introspection/ERC165.sol\";\nimport \"../../math/SafeMath.sol\";\nimport \"../../utils/Address.sol\";\nimport \"../../utils/EnumerableSet.sol\";\nimport \"../../utils/EnumerableMap.sol\";\nimport \"../../utils/Strings.sol\";\n\n/**\n * @title ERC721 Non-Fungible Token Standard basic implementation\n * @dev see https://eips.ethereum.org/EIPS/eip-721\n */\ncontract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {\n using SafeMath for uint256;\n using Address for address;\n using EnumerableSet for EnumerableSet.UintSet;\n using EnumerableMap for EnumerableMap.UintToAddressMap;\n using Strings for uint256;\n\n // Equals to `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`\n // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector`\n bytes4 private constant _ERC721_RECEIVED = 0x150b7a02;\n\n // Mapping from holder address to their (enumerable) set of owned tokens\n mapping (address => EnumerableSet.UintSet) private _holderTokens;\n\n // Enumerable mapping from token ids to their owners\n EnumerableMap.UintToAddressMap private _tokenOwners;\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 // Token name\n string private _name;\n\n // Token symbol\n string private _symbol;\n\n // Optional mapping for token URIs\n mapping (uint256 => string) private _tokenURIs;\n\n // Base URI\n string private _baseURI;\n\n /*\n * bytes4(keccak256('balanceOf(address)')) == 0x70a08231\n * bytes4(keccak256('ownerOf(uint256)')) == 0x6352211e\n * bytes4(keccak256('approve(address,uint256)')) == 0x095ea7b3\n * bytes4(keccak256('getApproved(uint256)')) == 0x081812fc\n * bytes4(keccak256('setApprovalForAll(address,bool)')) == 0xa22cb465\n * bytes4(keccak256('isApprovedForAll(address,address)')) == 0xe985e9c5\n * bytes4(keccak256('transferFrom(address,address,uint256)')) == 0x23b872dd\n * bytes4(keccak256('safeTransferFrom(address,address,uint256)')) == 0x42842e0e\n * bytes4(keccak256('safeTransferFrom(address,address,uint256,bytes)')) == 0xb88d4fde\n *\n * => 0x70a08231 ^ 0x6352211e ^ 0x095ea7b3 ^ 0x081812fc ^\n * 0xa22cb465 ^ 0xe985e9c5 ^ 0x23b872dd ^ 0x42842e0e ^ 0xb88d4fde == 0x80ac58cd\n */\n bytes4 private constant _INTERFACE_ID_ERC721 = 0x80ac58cd;\n\n /*\n * bytes4(keccak256('name()')) == 0x06fdde03\n * bytes4(keccak256('symbol()')) == 0x95d89b41\n * bytes4(keccak256('tokenURI(uint256)')) == 0xc87b56dd\n *\n * => 0x06fdde03 ^ 0x95d89b41 ^ 0xc87b56dd == 0x5b5e139f\n */\n bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x5b5e139f;\n\n /*\n * bytes4(keccak256('totalSupply()')) == 0x18160ddd\n * bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) == 0x2f745c59\n * bytes4(keccak256('tokenByIndex(uint256)')) == 0x4f6ccce7\n *\n * => 0x18160ddd ^ 0x2f745c59 ^ 0x4f6ccce7 == 0x780e9d63\n */\n bytes4 private constant _INTERFACE_ID_ERC721_ENUMERABLE = 0x780e9d63;\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_) public {\n _name = name_;\n _symbol = symbol_;\n\n // register the supported interfaces to conform to ERC721 via ERC165\n _registerInterface(_INTERFACE_ID_ERC721);\n _registerInterface(_INTERFACE_ID_ERC721_METADATA);\n _registerInterface(_INTERFACE_ID_ERC721_ENUMERABLE);\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: balance query for the zero address\");\n return _holderTokens[owner].length();\n }\n\n /**\n * @dev See {IERC721-ownerOf}.\n */\n function ownerOf(uint256 tokenId) public view virtual override returns (address) {\n return _tokenOwners.get(tokenId, \"ERC721: owner query for nonexistent token\");\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 require(_exists(tokenId), \"ERC721Metadata: URI query for nonexistent token\");\n\n string memory _tokenURI = _tokenURIs[tokenId];\n string memory base = baseURI();\n\n // If there is no base URI, return the token URI.\n if (bytes(base).length == 0) {\n return _tokenURI;\n }\n // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked).\n if (bytes(_tokenURI).length > 0) {\n return string(abi.encodePacked(base, _tokenURI));\n }\n // If there is a baseURI but no tokenURI, concatenate the tokenID to the baseURI.\n return string(abi.encodePacked(base, tokenId.toString()));\n }\n\n /**\n * @dev Returns the base URI set via {_setBaseURI}. This will be\n * automatically added as a prefix in {tokenURI} to each token's URI, or\n * to the token ID if no specific URI is set for that token ID.\n */\n function baseURI() public view virtual returns (string memory) {\n return _baseURI;\n }\n\n /**\n * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.\n */\n function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {\n return _holderTokens[owner].at(index);\n }\n\n /**\n * @dev See {IERC721Enumerable-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n // _tokenOwners are indexed by tokenIds, so .length() returns the number of tokenIds\n return _tokenOwners.length();\n }\n\n /**\n * @dev See {IERC721Enumerable-tokenByIndex}.\n */\n function tokenByIndex(uint256 index) public view virtual override returns (uint256) {\n (uint256 tokenId, ) = _tokenOwners.at(index);\n return tokenId;\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(_msgSender() == owner || ERC721.isApprovedForAll(owner, _msgSender()),\n \"ERC721: approve caller is not owner nor 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 require(_exists(tokenId), \"ERC721: approved query for nonexistent token\");\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 require(operator != _msgSender(), \"ERC721: approve to caller\");\n\n _operatorApprovals[_msgSender()][operator] = approved;\n emit ApprovalForAll(_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: transfer caller is not owner nor 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: transfer caller is not owner nor 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 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 _tokenOwners.contains(tokenId);\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 require(_exists(tokenId), \"ERC721: operator query for nonexistent token\");\n address owner = ERC721.ownerOf(tokenId);\n return (spender == owner || getApproved(tokenId) == spender || ERC721.isApprovedForAll(owner, spender));\n }\n\n /**\n * @dev Safely mints `tokenId` and transfers it to `to`.\n *\n * Requirements:\n d*\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(_checkOnERC721Received(address(0), to, tokenId, _data), \"ERC721: transfer to non ERC721Receiver implementer\");\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);\n\n _holderTokens[to].add(tokenId);\n\n _tokenOwners.set(tokenId, to);\n\n emit Transfer(address(0), to, tokenId);\n }\n\n /**\n * @dev Destroys `tokenId`.\n * The approval is cleared when the token is burned.\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); // internal owner\n\n _beforeTokenTransfer(owner, address(0), tokenId);\n\n // Clear approvals\n _approve(address(0), tokenId);\n\n // Clear metadata (if any)\n if (bytes(_tokenURIs[tokenId]).length != 0) {\n delete _tokenURIs[tokenId];\n }\n\n _holderTokens[owner].remove(tokenId);\n\n _tokenOwners.remove(tokenId);\n\n emit Transfer(owner, address(0), tokenId);\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 of token that is not own\"); // internal owner\n require(to != address(0), \"ERC721: transfer to the zero address\");\n\n _beforeTokenTransfer(from, to, tokenId);\n\n // Clear approvals from the previous owner\n _approve(address(0), tokenId);\n\n _holderTokens[from].remove(tokenId);\n _holderTokens[to].add(tokenId);\n\n _tokenOwners.set(tokenId, to);\n\n emit Transfer(from, to, tokenId);\n }\n\n /**\n * @dev Sets `_tokenURI` as the tokenURI of `tokenId`.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual {\n require(_exists(tokenId), \"ERC721Metadata: URI set of nonexistent token\");\n _tokenURIs[tokenId] = _tokenURI;\n }\n\n /**\n * @dev Internal function to set the base URI for all token IDs. It is\n * automatically added as a prefix to the value returned in {tokenURI},\n * or to the token ID if {tokenURI} is empty.\n */\n function _setBaseURI(string memory baseURI_) internal virtual {\n _baseURI = baseURI_;\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(address from, address to, uint256 tokenId, bytes memory _data)\n private returns (bool)\n {\n if (!to.isContract()) {\n return true;\n }\n bytes memory returndata = to.functionCall(abi.encodeWithSelector(\n IERC721Receiver(to).onERC721Received.selector,\n _msgSender(),\n from,\n tokenId,\n _data\n ), \"ERC721: transfer to non ERC721Receiver implementer\");\n bytes4 retval = abi.decode(returndata, (bytes4));\n return (retval == _ERC721_RECEIVED);\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); // internal owner\n }\n\n /**\n * @dev Hook that is called before any token transfer. This includes minting\n * and burning.\n *\n * Calling conditions:\n *\n * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be\n * transferred to `to`.\n * - When `from` is zero, `tokenId` will be minted for `to`.\n * - When `to` is zero, ``from``'s `tokenId` will be burned.\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\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 tokenId) internal virtual { }\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/ERC721Burnable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"../../utils/Context.sol\";\nimport \"./ERC721.sol\";\n\n/**\n * @title ERC721 Burnable Token\n * @dev ERC721 Token that can be irreversibly 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), \"ERC721Burnable: caller is not owner nor approved\");\n _burn(tokenId);\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/ERC721Pausable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"./ERC721.sol\";\nimport \"../../utils/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 */\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(address from, address to, uint256 tokenId) internal virtual override {\n super._beforeTokenTransfer(from, to, tokenId);\n\n require(!paused(), \"ERC721Pausable: token transfer while paused\");\n }\n}\n" + }, + "@openzeppelin/contracts/utils/EnumerableSet.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <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 * ```\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 */\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\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) { // 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 // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs\n // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\n\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] = toDeleteIndex + 1; // All indexes are 1-based\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 require(set._values.length > index, \"EnumerableSet: index out of bounds\");\n return set._values[index];\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 // 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 // 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 on 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" + }, + "@openzeppelin/contracts/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.2 <0.8.0;\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 */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n uint256 size;\n // solhint-disable-next-line no-inline-assembly\n assembly { size := extcodesize(account) }\n return size > 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://diligence.consensys.net/posts/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.5.11/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 // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\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 functionCall(target, data, \"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(address target, bytes memory data, string memory errorMessage) 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(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n require(isContract(target), \"Address: call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = target.call{ value: value }(data);\n return _verifyCallResult(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(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\n require(isContract(target), \"Address: static call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = target.staticcall(data);\n return _verifyCallResult(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(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\n require(isContract(target), \"Address: delegate call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return _verifyCallResult(success, returndata, errorMessage);\n }\n\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {\n if (success) {\n return returndata;\n } else {\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\n // solhint-disable-next-line no-inline-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}\n" + }, + "@openzeppelin/contracts/token/ERC721/IERC721.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.2 <0.8.0;\n\nimport \"../../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`, 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 be 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: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\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 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 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 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 /**\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" + }, + "@openzeppelin/contracts/token/ERC721/IERC721Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.2 <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 /**\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" + }, + "@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.2 <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 /**\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 tokenId);\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" + }, + "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <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 `IERC721.onERC721Received.selector`.\n */\n function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) external returns (bytes4);\n}\n" + }, + "@openzeppelin/contracts/introspection/ERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts may inherit from this and call {_registerInterface} to declare\n * their support of an interface.\n */\nabstract contract ERC165 is IERC165 {\n /*\n * bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7\n */\n bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7;\n\n /**\n * @dev Mapping of interface ids to whether or not it's supported.\n */\n mapping(bytes4 => bool) private _supportedInterfaces;\n\n constructor () internal {\n // Derived contracts need only register support for their own interfaces,\n // we register support for ERC165 itself here\n _registerInterface(_INTERFACE_ID_ERC165);\n }\n\n /**\n * @dev See {IERC165-supportsInterface}.\n *\n * Time complexity O(1), guaranteed to always use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return _supportedInterfaces[interfaceId];\n }\n\n /**\n * @dev Registers the contract as an implementer of the interface defined by\n * `interfaceId`. Support of the actual ERC165 interface is automatic and\n * registering its interface id is not required.\n *\n * See {IERC165-supportsInterface}.\n *\n * Requirements:\n *\n * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`).\n */\n function _registerInterface(bytes4 interfaceId) internal virtual {\n require(interfaceId != 0xffffffff, \"ERC165: invalid interface id\");\n _supportedInterfaces[interfaceId] = true;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/EnumerableMap.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\n/**\n * @dev Library for managing an enumerable variant of Solidity's\n * https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]\n * type.\n *\n * Maps have the following properties:\n *\n * - Entries are added, removed, and checked for existence in constant time\n * (O(1)).\n * - Entries are enumerated in O(n). No guarantees are made on the ordering.\n *\n * ```\n * contract Example {\n * // Add the library methods\n * using EnumerableMap for EnumerableMap.UintToAddressMap;\n *\n * // Declare a set state variable\n * EnumerableMap.UintToAddressMap private myMap;\n * }\n * ```\n *\n * As of v3.0.0, only maps of type `uint256 -> address` (`UintToAddressMap`) are\n * supported.\n */\nlibrary EnumerableMap {\n // To implement this library for multiple types with as little code\n // repetition as possible, we write it in terms of a generic Map type with\n // bytes32 keys and values.\n // The Map implementation uses private functions, and user-facing\n // implementations (such as Uint256ToAddressMap) are just wrappers around\n // the underlying Map.\n // This means that we can only create new EnumerableMaps for types that fit\n // in bytes32.\n\n struct MapEntry {\n bytes32 _key;\n bytes32 _value;\n }\n\n struct Map {\n // Storage of map keys and values\n MapEntry[] _entries;\n\n // Position of the entry defined by a key in the `entries` array, plus 1\n // because index 0 means a key is not in the map.\n mapping (bytes32 => uint256) _indexes;\n }\n\n /**\n * @dev Adds a key-value pair to a map, or updates the value for an existing\n * key. O(1).\n *\n * Returns true if the key was added to the map, that is if it was not\n * already present.\n */\n function _set(Map storage map, bytes32 key, bytes32 value) private returns (bool) {\n // We read and store the key's index to prevent multiple reads from the same storage slot\n uint256 keyIndex = map._indexes[key];\n\n if (keyIndex == 0) { // Equivalent to !contains(map, key)\n map._entries.push(MapEntry({ _key: key, _value: value }));\n // The entry is stored at length-1, but we add 1 to all indexes\n // and use 0 as a sentinel value\n map._indexes[key] = map._entries.length;\n return true;\n } else {\n map._entries[keyIndex - 1]._value = value;\n return false;\n }\n }\n\n /**\n * @dev Removes a key-value pair from a map. O(1).\n *\n * Returns true if the key was removed from the map, that is if it was present.\n */\n function _remove(Map storage map, bytes32 key) private returns (bool) {\n // We read and store the key's index to prevent multiple reads from the same storage slot\n uint256 keyIndex = map._indexes[key];\n\n if (keyIndex != 0) { // Equivalent to contains(map, key)\n // To delete a key-value pair from the _entries array in O(1), we swap the entry to delete with the last one\n // in the array, and then remove the last entry (sometimes called as 'swap and pop').\n // This modifies the order of the array, as noted in {at}.\n\n uint256 toDeleteIndex = keyIndex - 1;\n uint256 lastIndex = map._entries.length - 1;\n\n // When the entry to delete is the last one, the swap operation is unnecessary. However, since this occurs\n // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\n\n MapEntry storage lastEntry = map._entries[lastIndex];\n\n // Move the last entry to the index where the entry to delete is\n map._entries[toDeleteIndex] = lastEntry;\n // Update the index for the moved entry\n map._indexes[lastEntry._key] = toDeleteIndex + 1; // All indexes are 1-based\n\n // Delete the slot where the moved entry was stored\n map._entries.pop();\n\n // Delete the index for the deleted slot\n delete map._indexes[key];\n\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * @dev Returns true if the key is in the map. O(1).\n */\n function _contains(Map storage map, bytes32 key) private view returns (bool) {\n return map._indexes[key] != 0;\n }\n\n /**\n * @dev Returns the number of key-value pairs in the map. O(1).\n */\n function _length(Map storage map) private view returns (uint256) {\n return map._entries.length;\n }\n\n /**\n * @dev Returns the key-value pair stored at position `index` in the map. O(1).\n *\n * Note that there are no guarantees on the ordering of entries inside the\n * array, and it may change when more entries are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function _at(Map storage map, uint256 index) private view returns (bytes32, bytes32) {\n require(map._entries.length > index, \"EnumerableMap: index out of bounds\");\n\n MapEntry storage entry = map._entries[index];\n return (entry._key, entry._value);\n }\n\n /**\n * @dev Tries to returns the value associated with `key`. O(1).\n * Does not revert if `key` is not in the map.\n */\n function _tryGet(Map storage map, bytes32 key) private view returns (bool, bytes32) {\n uint256 keyIndex = map._indexes[key];\n if (keyIndex == 0) return (false, 0); // Equivalent to contains(map, key)\n return (true, map._entries[keyIndex - 1]._value); // All indexes are 1-based\n }\n\n /**\n * @dev Returns the value associated with `key`. O(1).\n *\n * Requirements:\n *\n * - `key` must be in the map.\n */\n function _get(Map storage map, bytes32 key) private view returns (bytes32) {\n uint256 keyIndex = map._indexes[key];\n require(keyIndex != 0, \"EnumerableMap: nonexistent key\"); // Equivalent to contains(map, key)\n return map._entries[keyIndex - 1]._value; // All indexes are 1-based\n }\n\n /**\n * @dev Same as {_get}, with a custom error message when `key` is not in the map.\n *\n * CAUTION: This function is deprecated because it requires allocating memory for the error\n * message unnecessarily. For custom revert reasons use {_tryGet}.\n */\n function _get(Map storage map, bytes32 key, string memory errorMessage) private view returns (bytes32) {\n uint256 keyIndex = map._indexes[key];\n require(keyIndex != 0, errorMessage); // Equivalent to contains(map, key)\n return map._entries[keyIndex - 1]._value; // All indexes are 1-based\n }\n\n // UintToAddressMap\n\n struct UintToAddressMap {\n Map _inner;\n }\n\n /**\n * @dev Adds a key-value pair to a map, or updates the value for an existing\n * key. O(1).\n *\n * Returns true if the key was added to the map, that is if it was not\n * already present.\n */\n function set(UintToAddressMap storage map, uint256 key, address value) internal returns (bool) {\n return _set(map._inner, bytes32(key), bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the key was removed from the map, that is if it was present.\n */\n function remove(UintToAddressMap storage map, uint256 key) internal returns (bool) {\n return _remove(map._inner, bytes32(key));\n }\n\n /**\n * @dev Returns true if the key is in the map. O(1).\n */\n function contains(UintToAddressMap storage map, uint256 key) internal view returns (bool) {\n return _contains(map._inner, bytes32(key));\n }\n\n /**\n * @dev Returns the number of elements in the map. O(1).\n */\n function length(UintToAddressMap storage map) internal view returns (uint256) {\n return _length(map._inner);\n }\n\n /**\n * @dev Returns the element stored at position `index` in the set. O(1).\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(UintToAddressMap storage map, uint256 index) internal view returns (uint256, address) {\n (bytes32 key, bytes32 value) = _at(map._inner, index);\n return (uint256(key), address(uint160(uint256(value))));\n }\n\n /**\n * @dev Tries to returns the value associated with `key`. O(1).\n * Does not revert if `key` is not in the map.\n *\n * _Available since v3.4._\n */\n function tryGet(UintToAddressMap storage map, uint256 key) internal view returns (bool, address) {\n (bool success, bytes32 value) = _tryGet(map._inner, bytes32(key));\n return (success, address(uint160(uint256(value))));\n }\n\n /**\n * @dev Returns the value associated with `key`. O(1).\n *\n * Requirements:\n *\n * - `key` must be in the map.\n */\n function get(UintToAddressMap storage map, uint256 key) internal view returns (address) {\n return address(uint160(uint256(_get(map._inner, bytes32(key)))));\n }\n\n /**\n * @dev Same as {get}, with a custom error message when `key` is not in the map.\n *\n * CAUTION: This function is deprecated because it requires allocating memory for the error\n * message unnecessarily. For custom revert reasons use {tryGet}.\n */\n function get(UintToAddressMap storage map, uint256 key, string memory errorMessage) internal view returns (address) {\n return address(uint160(uint256(_get(map._inner, bytes32(key), errorMessage))));\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n /**\n * @dev Converts a `uint256` to its ASCII `string` representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n // Inspired by OraclizeAPI's implementation - MIT licence\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n if (value == 0) {\n return \"0\";\n }\n uint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n bytes memory buffer = new bytes(digits);\n uint256 index = digits - 1;\n temp = value;\n while (temp != 0) {\n buffer[index--] = bytes1(uint8(48 + temp % 10));\n temp /= 10;\n }\n return string(buffer);\n }\n}\n" + }, + "@openzeppelin/contracts/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <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" + }, + "@openzeppelin/contracts/utils/Pausable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"./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 () internal {\n _paused = false;\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 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 require(!paused(), \"Pausable: paused\");\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 require(paused(), \"Pausable: not paused\");\n _;\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" + }, + "contracts/Libraries/matic/tunnel/BaseRootTunnel.sol": { + "content": "pragma solidity ^0.6.6;\n\n\nimport {SafeMath} from \"@openzeppelin/contracts/math/SafeMath.sol\";\n\nimport {AccessControlMixin} from \"../common/AccessControlMixin.sol\";\nimport {IStateSender} from \"../root/StateSender/IStateSender.sol\";\nimport {RLPReader} from \"../lib/RLPReader.sol\";\nimport {MerklePatriciaProof} from \"../lib/MerklePatriciaProof.sol\";\nimport {ICheckpointManager} from \"../root/ICheckpointManager.sol\";\nimport {RLPReader} from \"../lib/RLPReader.sol\";\nimport {Merkle} from \"../lib/Merkle.sol\";\n\nabstract contract BaseRootTunnel is AccessControlMixin {\n using RLPReader for bytes;\n using RLPReader for RLPReader.RLPItem;\n using Merkle for bytes32;\n using SafeMath for uint256;\n\n // keccak256(MessageSent(bytes))\n bytes32 public constant SEND_MESSAGE_EVENT_SIG = 0x8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036;\n\n // state sender contract\n IStateSender public stateSender;\n // root chain manager\n ICheckpointManager public checkpointManager;\n // child tunnel contract which receives and sends messages \n address public childTunnel;\n // storage to avoid duplicate exits\n mapping(bytes32 => bool) public processedExits;\n\n constructor() internal {\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\n _setupContractId(\"RootTunnel\");\n }\n\n /**\n * @notice Set the state sender, callable only by admins\n * @dev This should be the state sender from plasma contracts\n * It is used to send bytes from root to child chain\n * @param newStateSender address of state sender contract\n */\n function setStateSender(address newStateSender)\n external\n only(DEFAULT_ADMIN_ROLE)\n {\n stateSender = IStateSender(newStateSender);\n }\n\n /**\n * @notice Set the checkpoint manager, callable only by admins\n * @dev This should be the plasma contract responsible for keeping track of checkpoints\n * @param newCheckpointManager address of checkpoint manager contract\n */\n function setCheckpointManager(address newCheckpointManager)\n external\n only(DEFAULT_ADMIN_ROLE)\n {\n checkpointManager = ICheckpointManager(newCheckpointManager);\n }\n\n /**\n * @notice Set the child chain tunnel, callable only by admins\n * @dev This should be the contract responsible to receive data bytes on child chain\n * @param newChildTunnel address of child tunnel contract\n */\n function setChildTunnel(address newChildTunnel)\n external\n only(DEFAULT_ADMIN_ROLE)\n {\n require(newChildTunnel != address(0x0), \"RootTunnel: INVALID_CHILD_TUNNEL_ADDRESS\");\n childTunnel = newChildTunnel;\n }\n\n /**\n * @notice Send bytes message to Child Tunnel\n * @param message bytes message that will be sent to Child Tunnel\n * some message examples -\n * abi.encode(tokenId);\n * abi.encode(tokenId, tokenMetadata);\n * abi.encode(messageType, messageData);\n */\n function _sendMessageToChild(bytes memory message) internal {\n stateSender.syncState(childTunnel, message);\n }\n\n function _validateAndExtractMessage(bytes memory inputData) internal returns (bytes memory) {\n RLPReader.RLPItem[] memory inputDataRLPList = inputData\n .toRlpItem()\n .toList();\n\n // checking if exit has already been processed\n // unique exit is identified using hash of (blockNumber, branchMask, receiptLogIndex)\n bytes32 exitHash = keccak256(\n abi.encodePacked(\n inputDataRLPList[2].toUint(), // blockNumber\n // first 2 nibbles are dropped while generating nibble array\n // this allows branch masks that are valid but bypass exitHash check (changing first 2 nibbles only)\n // so converting to nibble array and then hashing it\n MerklePatriciaProof._getNibbleArray(inputDataRLPList[8].toBytes()), // branchMask\n inputDataRLPList[9].toUint() // receiptLogIndex\n )\n );\n require(\n processedExits[exitHash] == false,\n \"RootTunnel: EXIT_ALREADY_PROCESSED\"\n );\n processedExits[exitHash] = true;\n\n RLPReader.RLPItem[] memory receiptRLPList = inputDataRLPList[6]\n .toBytes()\n .toRlpItem()\n .toList();\n RLPReader.RLPItem memory logRLP = receiptRLPList[3]\n .toList()[\n inputDataRLPList[9].toUint() // receiptLogIndex\n ];\n\n RLPReader.RLPItem[] memory logRLPList = logRLP.toList();\n \n // check child tunnel\n require(childTunnel == RLPReader.toAddress(logRLPList[0]), \"RootTunnel: INVALID_CHILD_TUNNEL\");\n\n // verify receipt inclusion\n require(\n MerklePatriciaProof.verify(\n inputDataRLPList[6].toBytes(), // receipt\n inputDataRLPList[8].toBytes(), // branchMask\n inputDataRLPList[7].toBytes(), // receiptProof\n bytes32(inputDataRLPList[5].toUint()) // receiptRoot\n ),\n \"RootTunnel: INVALID_RECEIPT_PROOF\"\n );\n\n // verify checkpoint inclusion\n _checkBlockMembershipInCheckpoint(\n inputDataRLPList[2].toUint(), // blockNumber\n inputDataRLPList[3].toUint(), // blockTime\n bytes32(inputDataRLPList[4].toUint()), // txRoot\n bytes32(inputDataRLPList[5].toUint()), // receiptRoot\n inputDataRLPList[0].toUint(), // headerNumber\n inputDataRLPList[1].toBytes() // blockProof\n );\n\n RLPReader.RLPItem[] memory logTopicRLPList = logRLPList[1].toList(); // topics\n\n require(\n bytes32(logTopicRLPList[0].toUint()) == SEND_MESSAGE_EVENT_SIG, // topic0 is event sig\n \"RootTunnel: INVALID_SIGNATURE\"\n );\n\n // received message data\n bytes memory receivedData = logRLPList[2].toBytes();\n (bytes memory message) = abi.decode(receivedData, (bytes)); // event decodes params again, so decoding bytes to get message\n return message;\n }\n\n function _checkBlockMembershipInCheckpoint(\n uint256 blockNumber,\n uint256 blockTime,\n bytes32 txRoot,\n bytes32 receiptRoot,\n uint256 headerNumber,\n bytes memory blockProof\n ) private view returns (uint256) {\n (\n bytes32 headerRoot,\n uint256 startBlock,\n ,\n uint256 createdAt,\n\n ) = checkpointManager.headerBlocks(headerNumber);\n\n require(\n keccak256(\n abi.encodePacked(blockNumber, blockTime, txRoot, receiptRoot)\n )\n .checkMembership(\n blockNumber.sub(startBlock),\n headerRoot,\n blockProof\n ),\n \"RootTunnel: INVALID_HEADER\"\n );\n return createdAt;\n }\n\n /**\n * @notice receive message from L2 to L1, validated by proof\n * @dev This function verifies if the transaction actually happened on child chain\n *\n * @param inputData RLP encoded data of the reference tx containing following list of fields\n * 0 - headerNumber - Checkpoint header block number containing the reference tx\n * 1 - blockProof - Proof that the block header (in the child chain) is a leaf in the submitted merkle root\n * 2 - blockNumber - Block number containing the reference tx on child chain\n * 3 - blockTime - Reference tx block time\n * 4 - txRoot - Transactions root of block\n * 5 - receiptRoot - Receipts root of block\n * 6 - receipt - Receipt of the reference transaction\n * 7 - receiptProof - Merkle proof of the reference receipt\n * 8 - branchMask - 32 bits denoting the path of receipt in merkle tree\n * 9 - receiptLogIndex - Log Index to read from the receipt\n */\n function receiveMessage(bytes memory inputData) public virtual {\n bytes memory message = _validateAndExtractMessage(inputData);\n _processMessageFromChild(message);\n }\n\n /**\n * @notice Process message received from Child Tunnel\n * @dev function needs to be implemented to handle message as per requirement\n * This is called by onStateReceive function.\n * Since it is called via a system call, any event will not be emitted during its execution.\n * @param message bytes message that was sent from Child Tunnel\n */\n function _processMessageFromChild(bytes memory message) virtual internal;\n}\n" + }, + "contracts/Libraries/matic/common/AccessControlMixin.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {AccessControl} from \"@openzeppelin/contracts/access/AccessControl.sol\";\n\ncontract AccessControlMixin is AccessControl {\n string private _revertMsg;\n function _setupContractId(string memory contractId) internal {\n _revertMsg = string(abi.encodePacked(contractId, \": INSUFFICIENT_PERMISSIONS\"));\n }\n\n modifier only(bytes32 role) {\n require(\n hasRole(role, _msgSender()),\n _revertMsg\n );\n _;\n }\n}\n" + }, + "contracts/Libraries/matic/root/StateSender/IStateSender.sol": { + "content": "pragma solidity 0.6.6;\n\ninterface IStateSender {\n function syncState(address receiver, bytes calldata data) external;\n}\n" + }, + "contracts/Libraries/matic/lib/RLPReader.sol": { + "content": "/*\n * @author Hamdi Allam hamdi.allam97@gmail.com\n * Please reach out with any questions or concerns\n * https://github.com/hamdiallam/Solidity-RLP/blob/e681e25a376dbd5426b509380bc03446f05d0f97/contracts/RLPReader.sol\n */\npragma solidity 0.6.6;\n\nlibrary RLPReader {\n uint8 constant STRING_SHORT_START = 0x80;\n uint8 constant STRING_LONG_START = 0xb8;\n uint8 constant LIST_SHORT_START = 0xc0;\n uint8 constant LIST_LONG_START = 0xf8;\n uint8 constant WORD_SIZE = 32;\n\n struct RLPItem {\n uint256 len;\n uint256 memPtr;\n }\n\n /*\n * @param item RLP encoded bytes\n */\n function toRlpItem(bytes memory item)\n internal\n pure\n returns (RLPItem memory)\n {\n require(item.length > 0, \"RLPReader: INVALID_BYTES_LENGTH\");\n uint256 memPtr;\n assembly {\n memPtr := add(item, 0x20)\n }\n\n return RLPItem(item.length, memPtr);\n }\n\n /*\n * @param item RLP encoded list in bytes\n */\n function toList(RLPItem memory item)\n internal\n pure\n returns (RLPItem[] memory)\n {\n require(isList(item), \"RLPReader: ITEM_NOT_LIST\");\n\n uint256 items = numItems(item);\n RLPItem[] memory result = new RLPItem[](items);\n uint256 listLength = _itemLength(item.memPtr);\n require(listLength == item.len, \"RLPReader: LIST_DECODED_LENGTH_MISMATCH\");\n\n uint256 memPtr = item.memPtr + _payloadOffset(item.memPtr);\n uint256 dataLen;\n for (uint256 i = 0; i < items; i++) {\n dataLen = _itemLength(memPtr);\n result[i] = RLPItem(dataLen, memPtr);\n memPtr = memPtr + dataLen;\n }\n\n return result;\n }\n\n // @return indicator whether encoded payload is a list. negate this function call for isData.\n function isList(RLPItem memory item) internal pure returns (bool) {\n uint8 byte0;\n uint256 memPtr = item.memPtr;\n assembly {\n byte0 := byte(0, mload(memPtr))\n }\n\n if (byte0 < LIST_SHORT_START) return false;\n return true;\n }\n\n /** RLPItem conversions into data types **/\n\n // @returns raw rlp encoding in bytes\n function toRlpBytes(RLPItem memory item)\n internal\n pure\n returns (bytes memory)\n {\n bytes memory result = new bytes(item.len);\n\n uint256 ptr;\n assembly {\n ptr := add(0x20, result)\n }\n\n copy(item.memPtr, ptr, item.len);\n return result;\n }\n\n function toAddress(RLPItem memory item) internal pure returns (address) {\n require(!isList(item), \"RLPReader: DECODING_LIST_AS_ADDRESS\");\n // 1 byte for the length prefix\n require(item.len == 21, \"RLPReader: INVALID_ADDRESS_LENGTH\");\n\n return address(toUint(item));\n }\n\n function toUint(RLPItem memory item) internal pure returns (uint256) {\n require(!isList(item), \"RLPReader: DECODING_LIST_AS_UINT\");\n require(item.len <= 33, \"RLPReader: INVALID_UINT_LENGTH\");\n\n uint256 itemLength = _itemLength(item.memPtr);\n require(itemLength == item.len, \"RLPReader: UINT_DECODED_LENGTH_MISMATCH\");\n\n uint256 offset = _payloadOffset(item.memPtr);\n uint256 len = item.len - offset;\n uint256 result;\n uint256 memPtr = item.memPtr + offset;\n assembly {\n result := mload(memPtr)\n\n // shfit to the correct location if neccesary\n if lt(len, 32) {\n result := div(result, exp(256, sub(32, len)))\n }\n }\n\n return result;\n }\n\n // enforces 32 byte length\n function toUintStrict(RLPItem memory item) internal pure returns (uint256) {\n uint256 itemLength = _itemLength(item.memPtr);\n require(itemLength == item.len, \"RLPReader: UINT_STRICT_DECODED_LENGTH_MISMATCH\");\n // one byte prefix\n require(item.len == 33, \"RLPReader: INVALID_UINT_STRICT_LENGTH\");\n\n uint256 result;\n uint256 memPtr = item.memPtr + 1;\n assembly {\n result := mload(memPtr)\n }\n\n return result;\n }\n\n function toBytes(RLPItem memory item) internal pure returns (bytes memory) {\n uint256 listLength = _itemLength(item.memPtr);\n require(listLength == item.len, \"RLPReader: BYTES_DECODED_LENGTH_MISMATCH\");\n uint256 offset = _payloadOffset(item.memPtr);\n\n uint256 len = item.len - offset; // data length\n bytes memory result = new bytes(len);\n\n uint256 destPtr;\n assembly {\n destPtr := add(0x20, result)\n }\n\n copy(item.memPtr + offset, destPtr, len);\n return result;\n }\n\n /*\n * Private Helpers\n */\n\n // @return number of payload items inside an encoded list.\n function numItems(RLPItem memory item) private pure returns (uint256) {\n // add `isList` check if `item` is expected to be passsed without a check from calling function\n // require(isList(item), \"RLPReader: NUM_ITEMS_NOT_LIST\");\n\n uint256 count = 0;\n uint256 currPtr = item.memPtr + _payloadOffset(item.memPtr);\n uint256 endPtr = item.memPtr + item.len;\n while (currPtr < endPtr) {\n currPtr = currPtr + _itemLength(currPtr); // skip over an item\n require(currPtr <= endPtr, \"RLPReader: NUM_ITEMS_DECODED_LENGTH_MISMATCH\");\n count++;\n }\n\n return count;\n }\n\n // @return entire rlp item byte length\n function _itemLength(uint256 memPtr) private pure returns (uint256) {\n uint256 itemLen;\n uint256 byte0;\n assembly {\n byte0 := byte(0, mload(memPtr))\n }\n\n if (byte0 < STRING_SHORT_START) itemLen = 1;\n else if (byte0 < STRING_LONG_START)\n itemLen = byte0 - STRING_SHORT_START + 1;\n else if (byte0 < LIST_SHORT_START) {\n assembly {\n let byteLen := sub(byte0, 0xb7) // # of bytes the actual length is\n memPtr := add(memPtr, 1) // skip over the first byte\n\n /* 32 byte word size */\n let dataLen := div(mload(memPtr), exp(256, sub(32, byteLen))) // right shifting to get the len\n itemLen := add(dataLen, add(byteLen, 1))\n }\n } else if (byte0 < LIST_LONG_START) {\n itemLen = byte0 - LIST_SHORT_START + 1;\n } else {\n assembly {\n let byteLen := sub(byte0, 0xf7)\n memPtr := add(memPtr, 1)\n\n let dataLen := div(mload(memPtr), exp(256, sub(32, byteLen))) // right shifting to the correct length\n itemLen := add(dataLen, add(byteLen, 1))\n }\n }\n\n return itemLen;\n }\n\n // @return number of bytes until the data\n function _payloadOffset(uint256 memPtr) private pure returns (uint256) {\n uint256 byte0;\n assembly {\n byte0 := byte(0, mload(memPtr))\n }\n\n if (byte0 < STRING_SHORT_START) return 0;\n else if (\n byte0 < STRING_LONG_START ||\n (byte0 >= LIST_SHORT_START && byte0 < LIST_LONG_START)\n ) return 1;\n else if (byte0 < LIST_SHORT_START)\n // being explicit\n return byte0 - (STRING_LONG_START - 1) + 1;\n else return byte0 - (LIST_LONG_START - 1) + 1;\n }\n\n /*\n * @param src Pointer to source\n * @param dest Pointer to destination\n * @param len Amount of memory to copy from the source\n */\n function copy(\n uint256 src,\n uint256 dest,\n uint256 len\n ) private pure {\n if (len == 0) return;\n\n // copy as many word sizes as possible\n for (; len >= WORD_SIZE; len -= WORD_SIZE) {\n assembly {\n mstore(dest, mload(src))\n }\n\n src += WORD_SIZE;\n dest += WORD_SIZE;\n }\n\n // left over bytes. Mask is used to remove unwanted bytes from the word\n uint256 mask = 256**(WORD_SIZE - len) - 1;\n assembly {\n let srcpart := and(mload(src), not(mask)) // zero out src\n let destpart := and(mload(dest), mask) // retrieve the bytes\n mstore(dest, or(destpart, srcpart))\n }\n }\n}\n" + }, + "contracts/Libraries/matic/lib/MerklePatriciaProof.sol": { + "content": "/*\n * @title MerklePatriciaVerifier\n * @author Sam Mayo (sammayo888@gmail.com)\n *\n * @dev Library for verifing merkle patricia proofs.\n */\npragma solidity 0.6.6;\n\nimport {RLPReader} from \"./RLPReader.sol\";\n\nlibrary MerklePatriciaProof {\n /*\n * @dev Verifies a merkle patricia proof.\n * @param value The terminating value in the trie.\n * @param encodedPath The path in the trie leading to value.\n * @param rlpParentNodes The rlp encoded stack of nodes.\n * @param root The root hash of the trie.\n * @return The boolean validity of the proof.\n */\n function verify(\n bytes memory value,\n bytes memory encodedPath,\n bytes memory rlpParentNodes,\n bytes32 root\n ) internal pure returns (bool) {\n RLPReader.RLPItem memory item = RLPReader.toRlpItem(rlpParentNodes);\n RLPReader.RLPItem[] memory parentNodes = RLPReader.toList(item);\n\n bytes memory currentNode;\n RLPReader.RLPItem[] memory currentNodeList;\n\n bytes32 nodeKey = root;\n uint256 pathPtr = 0;\n\n bytes memory path = _getNibbleArray(encodedPath);\n if (path.length == 0) {\n return false;\n }\n\n for (uint256 i = 0; i < parentNodes.length; i++) {\n if (pathPtr > path.length) {\n return false;\n }\n\n currentNode = RLPReader.toRlpBytes(parentNodes[i]);\n if (nodeKey != keccak256(currentNode)) {\n return false;\n }\n currentNodeList = RLPReader.toList(parentNodes[i]);\n\n if (currentNodeList.length == 17) {\n if (pathPtr == path.length) {\n if (\n keccak256(RLPReader.toBytes(currentNodeList[16])) ==\n keccak256(value)\n ) {\n return true;\n } else {\n return false;\n }\n }\n\n uint8 nextPathNibble = uint8(path[pathPtr]);\n if (nextPathNibble > 16) {\n return false;\n }\n nodeKey = bytes32(\n RLPReader.toUintStrict(currentNodeList[nextPathNibble])\n );\n pathPtr += 1;\n } else if (currentNodeList.length == 2) {\n uint256 traversed = _nibblesToTraverse(\n RLPReader.toBytes(currentNodeList[0]),\n path,\n pathPtr\n );\n if (pathPtr + traversed == path.length) {\n //leaf node\n if (\n keccak256(RLPReader.toBytes(currentNodeList[1])) ==\n keccak256(value)\n ) {\n return true;\n } else {\n return false;\n }\n }\n\n //extension node\n if (traversed == 0) {\n return false;\n }\n\n pathPtr += traversed;\n nodeKey = bytes32(RLPReader.toUintStrict(currentNodeList[1]));\n } else {\n return false;\n }\n }\n }\n\n function _nibblesToTraverse(\n bytes memory encodedPartialPath,\n bytes memory path,\n uint256 pathPtr\n ) private pure returns (uint256) {\n uint256 len = 0;\n // encodedPartialPath has elements that are each two hex characters (1 byte), but partialPath\n // and slicedPath have elements that are each one hex character (1 nibble)\n bytes memory partialPath = _getNibbleArray(encodedPartialPath);\n bytes memory slicedPath = new bytes(partialPath.length);\n\n // pathPtr counts nibbles in path\n // partialPath.length is a number of nibbles\n for (uint256 i = pathPtr; i < pathPtr + partialPath.length; i++) {\n bytes1 pathNibble = path[i];\n slicedPath[i - pathPtr] = pathNibble;\n }\n\n if (keccak256(partialPath) == keccak256(slicedPath)) {\n len = partialPath.length;\n } else {\n len = 0;\n }\n return len;\n }\n\n // bytes b must be hp encoded\n function _getNibbleArray(bytes memory b)\n internal\n pure\n returns (bytes memory)\n {\n bytes memory nibbles = \"\";\n if (b.length > 0) {\n uint8 offset;\n uint8 hpNibble = uint8(_getNthNibbleOfBytes(0, b));\n if (hpNibble == 1 || hpNibble == 3) {\n nibbles = new bytes(b.length * 2 - 1);\n bytes1 oddNibble = _getNthNibbleOfBytes(1, b);\n nibbles[0] = oddNibble;\n offset = 1;\n } else {\n nibbles = new bytes(b.length * 2 - 2);\n offset = 0;\n }\n\n for (uint256 i = offset; i < nibbles.length; i++) {\n nibbles[i] = _getNthNibbleOfBytes(i - offset + 2, b);\n }\n }\n return nibbles;\n }\n\n function _getNthNibbleOfBytes(uint256 n, bytes memory str)\n private\n pure\n returns (bytes1)\n {\n return\n bytes1(\n n % 2 == 0 ? uint8(str[n / 2]) / 0x10 : uint8(str[n / 2]) % 0x10\n );\n }\n}\n" + }, + "contracts/Libraries/matic/root/ICheckpointManager.sol": { + "content": "pragma solidity 0.6.6;\n\ncontract ICheckpointManager {\n struct HeaderBlock {\n bytes32 root;\n uint256 start;\n uint256 end;\n uint256 createdAt;\n address proposer;\n }\n\n /**\n * @notice mapping of checkpoint header numbers to block details\n * @dev These checkpoints are submited by plasma contracts\n */\n mapping(uint256 => HeaderBlock) public headerBlocks;\n}\n" + }, + "contracts/Libraries/matic/lib/Merkle.sol": { + "content": "pragma solidity 0.6.6;\n\nlibrary Merkle {\n function checkMembership(\n bytes32 leaf,\n uint256 index,\n bytes32 rootHash,\n bytes memory proof\n ) internal pure returns (bool) {\n require(proof.length % 32 == 0, \"Invalid proof length\");\n uint256 proofHeight = proof.length / 32;\n // Proof of size n means, height of the tree is n+1.\n // In a tree of height n+1, max #leafs possible is 2 ^ n\n require(index < 2 ** proofHeight, \"Leaf index is too big\");\n\n bytes32 proofElement;\n bytes32 computedHash = leaf;\n for (uint256 i = 32; i <= proof.length; i += 32) {\n assembly {\n proofElement := mload(add(proof, i))\n }\n\n if (index % 2 == 0) {\n computedHash = keccak256(\n abi.encodePacked(computedHash, proofElement)\n );\n } else {\n computedHash = keccak256(\n abi.encodePacked(proofElement, computedHash)\n );\n }\n\n index = index / 2;\n }\n return computedHash == rootHash;\n }\n}\n" + }, + "contracts/Libraries/matic/tunnel/RootTunnel.sol": { + "content": "pragma solidity ^0.6.6;\n\nimport {BaseRootTunnel} from \"./BaseRootTunnel.sol\";\n\n\ncontract RootTunnel is BaseRootTunnel {\n function _processMessageFromChild(bytes memory message) internal override {\n // implement your core logic here\n }\n}\n" + }, + "contracts/Libraries/matic/root/RootChainManager/RootChainManager.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {SafeMath} from \"@openzeppelin/contracts/math/SafeMath.sol\";\nimport {IRootChainManager} from \"./IRootChainManager.sol\";\nimport {RootChainManagerStorage} from \"./RootChainManagerStorage.sol\";\nimport {IStateSender} from \"../StateSender/IStateSender.sol\";\nimport {ICheckpointManager} from \"../ICheckpointManager.sol\";\nimport {RLPReader} from \"../../lib/RLPReader.sol\";\nimport {MerklePatriciaProof} from \"../../lib/MerklePatriciaProof.sol\";\nimport {Merkle} from \"../../lib/Merkle.sol\";\nimport {ITokenPredicate} from \"../TokenPredicates/ITokenPredicate.sol\";\nimport {Initializable} from \"../../common/Initializable.sol\";\nimport {NativeMetaTransaction} from \"../../common/NativeMetaTransaction.sol\";\nimport {AccessControl} from \"@openzeppelin/contracts/access/AccessControl.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\nimport {ContextMixin} from \"../../common/ContextMixin.sol\";\n\ncontract RootChainManager is\n IRootChainManager,\n Initializable,\n AccessControl, // included to match old storage layout while upgrading\n RootChainManagerStorage, // created to match old storage layout while upgrading\n AccessControlMixin,\n NativeMetaTransaction,\n ContextMixin\n{\n using RLPReader for bytes;\n using RLPReader for RLPReader.RLPItem;\n using Merkle for bytes32;\n using SafeMath for uint256;\n\n // maybe DEPOSIT and MAP_TOKEN can be reduced to bytes4\n bytes32 public constant DEPOSIT = keccak256(\"DEPOSIT\");\n bytes32 public constant MAP_TOKEN = keccak256(\"MAP_TOKEN\");\n address public constant ETHER_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n bytes32 public constant MAPPER_ROLE = keccak256(\"MAPPER_ROLE\");\n\n function _msgSender()\n internal\n override\n view\n returns (address payable sender)\n {\n return ContextMixin.msgSender();\n }\n\n /**\n * @notice Deposit ether by directly sending to the contract\n * The account sending ether receives WETH on child chain\n */\n receive() external payable {\n _depositEtherFor(_msgSender());\n }\n\n /**\n * @notice Initialize the contract after it has been proxified\n * @dev meant to be called once immediately after deployment\n * @param _owner the account that should be granted admin role\n */\n function initialize(\n address _owner\n )\n external\n initializer\n {\n _initializeEIP712(\"RootChainManager\");\n _setupContractId(\"RootChainManager\");\n _setupRole(DEFAULT_ADMIN_ROLE, _owner);\n _setupRole(MAPPER_ROLE, _owner);\n }\n\n // adding seperate function setupContractId since initialize is already called with old implementation\n function setupContractId()\n external\n only(DEFAULT_ADMIN_ROLE)\n {\n _setupContractId(\"RootChainManager\");\n }\n\n // adding seperate function initializeEIP712 since initialize is already called with old implementation\n function initializeEIP712()\n external\n only(DEFAULT_ADMIN_ROLE)\n {\n _setDomainSeperator(\"RootChainManager\");\n }\n\n /**\n * @notice Set the state sender, callable only by admins\n * @dev This should be the state sender from plasma contracts\n * It is used to send bytes from root to child chain\n * @param newStateSender address of state sender contract\n */\n function setStateSender(address newStateSender)\n external\n only(DEFAULT_ADMIN_ROLE)\n {\n _stateSender = IStateSender(newStateSender);\n }\n\n /**\n * @notice Get the address of contract set as state sender\n * @return The address of state sender contract\n */\n function stateSenderAddress() external view returns (address) {\n return address(_stateSender);\n }\n\n /**\n * @notice Set the checkpoint manager, callable only by admins\n * @dev This should be the plasma contract responsible for keeping track of checkpoints\n * @param newCheckpointManager address of checkpoint manager contract\n */\n function setCheckpointManager(address newCheckpointManager)\n external\n only(DEFAULT_ADMIN_ROLE)\n {\n _checkpointManager = ICheckpointManager(newCheckpointManager);\n }\n\n /**\n * @notice Get the address of contract set as checkpoint manager\n * @return The address of checkpoint manager contract\n */\n function checkpointManagerAddress() external view returns (address) {\n return address(_checkpointManager);\n }\n\n /**\n * @notice Set the child chain manager, callable only by admins\n * @dev This should be the contract responsible to receive deposit bytes on child chain\n * @param newChildChainManager address of child chain manager contract\n */\n function setChildChainManagerAddress(address newChildChainManager)\n external\n only(DEFAULT_ADMIN_ROLE)\n {\n require(newChildChainManager != address(0x0), \"RootChainManager: INVALID_CHILD_CHAIN_ADDRESS\");\n childChainManagerAddress = newChildChainManager;\n }\n\n /**\n * @notice Register a token predicate address against its type, callable only by mappers\n * @dev A predicate is a contract responsible to process the token specific logic while locking or exiting tokens\n * @param tokenType bytes32 unique identifier for the token type\n * @param predicateAddress address of token predicate address\n */\n function registerPredicate(bytes32 tokenType, address predicateAddress)\n external\n override\n only(DEFAULT_ADMIN_ROLE)\n {\n typeToPredicate[tokenType] = predicateAddress;\n emit PredicateRegistered(tokenType, predicateAddress);\n }\n\n /**\n * @notice Map a token to enable its movement via the PoS Portal, callable only by mappers\n * @param rootToken address of token on root chain\n * @param childToken address of token on child chain\n * @param tokenType bytes32 unique identifier for the token type\n */\n function mapToken(\n address rootToken,\n address childToken,\n bytes32 tokenType\n ) external override only(MAPPER_ROLE) {\n // explicit check if token is already mapped to avoid accidental remaps\n require(\n rootToChildToken[rootToken] == address(0) &&\n childToRootToken[childToken] == address(0),\n \"RootChainManager: ALREADY_MAPPED\"\n );\n _mapToken(rootToken, childToken, tokenType);\n }\n\n /**\n * @notice Clean polluted token mapping\n * @param rootToken address of token on root chain. Since rename token was introduced later stage, \n * clean method is used to clean pollulated mapping\n */\n function cleanMapToken(\n address rootToken,\n address childToken\n ) external override only(DEFAULT_ADMIN_ROLE) {\n rootToChildToken[rootToken] = address(0);\n childToRootToken[childToken] = address(0);\n tokenToType[rootToken] = bytes32(0);\n\n emit TokenMapped(rootToken, childToken, tokenToType[rootToken]);\n }\n\n /**\n * @notice Remap a token that has already been mapped, properly cleans up old mapping\n * Callable only by mappers\n * @param rootToken address of token on root chain\n * @param childToken address of token on child chain\n * @param tokenType bytes32 unique identifier for the token type\n */\n function remapToken(\n address rootToken,\n address childToken,\n bytes32 tokenType\n ) external override only(DEFAULT_ADMIN_ROLE) {\n // cleanup old mapping\n address oldChildToken = rootToChildToken[rootToken];\n address oldRootToken = childToRootToken[childToken];\n\n if (rootToChildToken[oldRootToken] != address(0)) {\n rootToChildToken[oldRootToken] = address(0);\n tokenToType[oldRootToken] = bytes32(0);\n }\n\n if (childToRootToken[oldChildToken] != address(0)) {\n childToRootToken[oldChildToken] = address(0);\n }\n\n _mapToken(rootToken, childToken, tokenType);\n }\n\n function _mapToken(\n address rootToken,\n address childToken,\n bytes32 tokenType\n ) private {\n require(\n typeToPredicate[tokenType] != address(0x0),\n \"RootChainManager: TOKEN_TYPE_NOT_SUPPORTED\"\n );\n\n rootToChildToken[rootToken] = childToken;\n childToRootToken[childToken] = rootToken;\n tokenToType[rootToken] = tokenType;\n\n emit TokenMapped(rootToken, childToken, tokenType);\n\n bytes memory syncData = abi.encode(rootToken, childToken, tokenType);\n _stateSender.syncState(\n childChainManagerAddress,\n abi.encode(MAP_TOKEN, syncData)\n );\n }\n\n /**\n * @notice Move ether from root to child chain, accepts ether transfer\n * Keep in mind this ether cannot be used to pay gas on child chain\n * Use Matic tokens deposited using plasma mechanism for that\n * @param user address of account that should receive WETH on child chain\n */\n function depositEtherFor(address user) external override payable {\n _depositEtherFor(user);\n }\n\n /**\n * @notice Move tokens from root to child chain\n * @dev This mechanism supports arbitrary tokens as long as its predicate has been registered and the token is mapped\n * @param user address of account that should receive this deposit on child chain\n * @param rootToken address of token that is being deposited\n * @param depositData bytes data that is sent to predicate and child token contracts to handle deposit\n */\n function depositFor(\n address user,\n address rootToken,\n bytes calldata depositData\n ) external override {\n require(\n rootToken != ETHER_ADDRESS,\n \"RootChainManager: INVALID_ROOT_TOKEN\"\n );\n _depositFor(user, rootToken, depositData);\n }\n\n function _depositEtherFor(address user) private {\n bytes memory depositData = abi.encode(msg.value);\n _depositFor(user, ETHER_ADDRESS, depositData);\n\n // payable(typeToPredicate[tokenToType[ETHER_ADDRESS]]).transfer(msg.value);\n // transfer doesn't work as expected when receiving contract is proxified so using call\n (bool success, /* bytes memory data */) = typeToPredicate[tokenToType[ETHER_ADDRESS]].call{value: msg.value}(\"\");\n if (!success) {\n revert(\"RootChainManager: ETHER_TRANSFER_FAILED\");\n }\n }\n\n function _depositFor(\n address user,\n address rootToken,\n bytes memory depositData\n ) private {\n bytes32 tokenType = tokenToType[rootToken];\n require(\n rootToChildToken[rootToken] != address(0x0) &&\n tokenType != 0,\n \"RootChainManager: TOKEN_NOT_MAPPED\"\n );\n address predicateAddress = typeToPredicate[tokenType];\n require(\n predicateAddress != address(0),\n \"RootChainManager: INVALID_TOKEN_TYPE\"\n );\n require(\n user != address(0),\n \"RootChainManager: INVALID_USER\"\n );\n\n ITokenPredicate(predicateAddress).lockTokens(\n _msgSender(),\n user,\n rootToken,\n depositData\n );\n bytes memory syncData = abi.encode(user, rootToken, depositData);\n _stateSender.syncState(\n childChainManagerAddress,\n abi.encode(DEPOSIT, syncData)\n );\n }\n\n /**\n * @notice exit tokens by providing proof\n * @dev This function verifies if the transaction actually happened on child chain\n * the transaction log is then sent to token predicate to handle it accordingly\n *\n * @param inputData RLP encoded data of the reference tx containing following list of fields\n * 0 - headerNumber - Checkpoint header block number containing the reference tx\n * 1 - blockProof - Proof that the block header (in the child chain) is a leaf in the submitted merkle root\n * 2 - blockNumber - Block number containing the reference tx on child chain\n * 3 - blockTime - Reference tx block time\n * 4 - txRoot - Transactions root of block\n * 5 - receiptRoot - Receipts root of block\n * 6 - receipt - Receipt of the reference transaction\n * 7 - receiptProof - Merkle proof of the reference receipt\n * 8 - branchMask - 32 bits denoting the path of receipt in merkle tree\n * 9 - receiptLogIndex - Log Index to read from the receipt\n */\n function exit(bytes calldata inputData) external override {\n RLPReader.RLPItem[] memory inputDataRLPList = inputData\n .toRlpItem()\n .toList();\n\n // checking if exit has already been processed\n // unique exit is identified using hash of (blockNumber, branchMask, receiptLogIndex)\n bytes32 exitHash = keccak256(\n abi.encodePacked(\n inputDataRLPList[2].toUint(), // blockNumber\n // first 2 nibbles are dropped while generating nibble array\n // this allows branch masks that are valid but bypass exitHash check (changing first 2 nibbles only)\n // so converting to nibble array and then hashing it\n MerklePatriciaProof._getNibbleArray(inputDataRLPList[8].toBytes()), // branchMask\n inputDataRLPList[9].toUint() // receiptLogIndex\n )\n );\n require(\n processedExits[exitHash] == false,\n \"RootChainManager: EXIT_ALREADY_PROCESSED\"\n );\n processedExits[exitHash] = true;\n\n RLPReader.RLPItem[] memory receiptRLPList = inputDataRLPList[6]\n .toBytes()\n .toRlpItem()\n .toList();\n RLPReader.RLPItem memory logRLP = receiptRLPList[3]\n .toList()[\n inputDataRLPList[9].toUint() // receiptLogIndex\n ];\n\n address childToken = RLPReader.toAddress(logRLP.toList()[0]); // log emitter address field\n // log should be emmited only by the child token\n address rootToken = childToRootToken[childToken];\n require(\n rootToken != address(0),\n \"RootChainManager: TOKEN_NOT_MAPPED\"\n );\n\n address predicateAddress = typeToPredicate[\n tokenToType[rootToken]\n ];\n\n // branch mask can be maximum 32 bits\n require(\n inputDataRLPList[8].toUint() &\n 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000 ==\n 0,\n \"RootChainManager: INVALID_BRANCH_MASK\"\n );\n\n // verify receipt inclusion\n require(\n MerklePatriciaProof.verify(\n inputDataRLPList[6].toBytes(), // receipt\n inputDataRLPList[8].toBytes(), // branchMask\n inputDataRLPList[7].toBytes(), // receiptProof\n bytes32(inputDataRLPList[5].toUint()) // receiptRoot\n ),\n \"RootChainManager: INVALID_PROOF\"\n );\n\n // verify checkpoint inclusion\n _checkBlockMembershipInCheckpoint(\n inputDataRLPList[2].toUint(), // blockNumber\n inputDataRLPList[3].toUint(), // blockTime\n bytes32(inputDataRLPList[4].toUint()), // txRoot\n bytes32(inputDataRLPList[5].toUint()), // receiptRoot\n inputDataRLPList[0].toUint(), // headerNumber\n inputDataRLPList[1].toBytes() // blockProof\n );\n\n ITokenPredicate(predicateAddress).exitTokens(\n _msgSender(),\n rootToken,\n logRLP.toRlpBytes()\n );\n }\n\n function _checkBlockMembershipInCheckpoint(\n uint256 blockNumber,\n uint256 blockTime,\n bytes32 txRoot,\n bytes32 receiptRoot,\n uint256 headerNumber,\n bytes memory blockProof\n ) private view returns (uint256) {\n (\n bytes32 headerRoot,\n uint256 startBlock,\n ,\n uint256 createdAt,\n\n ) = _checkpointManager.headerBlocks(headerNumber);\n\n require(\n keccak256(\n abi.encodePacked(blockNumber, blockTime, txRoot, receiptRoot)\n )\n .checkMembership(\n blockNumber.sub(startBlock),\n headerRoot,\n blockProof\n ),\n \"RootChainManager: INVALID_HEADER\"\n );\n return createdAt;\n }\n}\n" + }, + "contracts/Libraries/matic/root/RootChainManager/IRootChainManager.sol": { + "content": "pragma solidity 0.6.6;\n\ninterface IRootChainManager {\n event TokenMapped(\n address indexed rootToken,\n address indexed childToken,\n bytes32 indexed tokenType\n );\n\n event PredicateRegistered(\n bytes32 indexed tokenType,\n address indexed predicateAddress\n );\n\n function registerPredicate(bytes32 tokenType, address predicateAddress)\n external;\n\n function mapToken(\n address rootToken,\n address childToken,\n bytes32 tokenType\n ) external;\n\n function cleanMapToken(\n address rootToken,\n address childToken\n ) external;\n\n function remapToken(\n address rootToken,\n address childToken,\n bytes32 tokenType\n ) external;\n\n function depositEtherFor(address user) external payable;\n\n function depositFor(\n address user,\n address rootToken,\n bytes calldata depositData\n ) external;\n\n function exit(bytes calldata inputData) external;\n}\n" + }, + "contracts/Libraries/matic/root/RootChainManager/RootChainManagerStorage.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {IStateSender} from \"../StateSender/IStateSender.sol\";\nimport {ICheckpointManager} from \"../ICheckpointManager.sol\";\n\nabstract contract RootChainManagerStorage {\n mapping(bytes32 => address) public typeToPredicate;\n mapping(address => address) public rootToChildToken;\n mapping(address => address) public childToRootToken;\n mapping(address => bytes32) public tokenToType;\n mapping(bytes32 => bool) public processedExits;\n IStateSender internal _stateSender;\n ICheckpointManager internal _checkpointManager;\n address public childChainManagerAddress;\n}\n" + }, + "contracts/Libraries/matic/root/TokenPredicates/ITokenPredicate.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {RLPReader} from \"../../lib/RLPReader.sol\";\n\n/// @title Token predicate interface for all pos portal predicates\n/// @notice Abstract interface that defines methods for custom predicates\ninterface ITokenPredicate {\n\n /**\n * @notice Deposit tokens into pos portal\n * @dev When `depositor` deposits tokens into pos portal, tokens get locked into predicate contract.\n * @param depositor Address who wants to deposit tokens\n * @param depositReceiver Address (address) who wants to receive tokens on side chain\n * @param rootToken Token which gets deposited\n * @param depositData Extra data for deposit (amount for ERC20, token id for ERC721 etc.) [ABI encoded]\n */\n function lockTokens(\n address depositor,\n address depositReceiver,\n address rootToken,\n bytes calldata depositData\n ) external;\n\n /**\n * @notice Validates and processes exit while withdraw process\n * @dev Validates exit log emitted on sidechain. Reverts if validation fails.\n * @dev Processes withdraw based on custom logic. Example: transfer ERC20/ERC721, mint ERC721 if mintable withdraw\n * @param sender Address\n * @param rootToken Token which gets withdrawn\n * @param logRLPList Valid sidechain log for data like amount, token id etc.\n */\n function exitTokens(\n address sender,\n address rootToken,\n bytes calldata logRLPList\n ) external;\n}\n" + }, + "contracts/Libraries/matic/common/Initializable.sol": { + "content": "pragma solidity 0.6.6;\n\ncontract Initializable {\n bool inited = false;\n\n modifier initializer() {\n require(!inited, \"already inited\");\n _;\n inited = true;\n }\n}\n" + }, + "contracts/Libraries/matic/common/NativeMetaTransaction.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {SafeMath} from \"@openzeppelin/contracts/math/SafeMath.sol\";\nimport {EIP712Base} from \"./EIP712Base.sol\";\n\ncontract NativeMetaTransaction is EIP712Base {\n using SafeMath for uint256;\n bytes32 private constant META_TRANSACTION_TYPEHASH = keccak256(\n bytes(\n \"MetaTransaction(uint256 nonce,address from,bytes functionSignature)\"\n )\n );\n event MetaTransactionExecuted(\n address userAddress,\n address payable relayerAddress,\n bytes functionSignature\n );\n mapping(address => uint256) nonces;\n\n /*\n * Meta transaction structure.\n * No point of including value field here as if user is doing value transfer then he has the funds to pay for gas\n * He should call the desired function directly in that case.\n */\n struct MetaTransaction {\n uint256 nonce;\n address from;\n bytes functionSignature;\n }\n\n function executeMetaTransaction(\n address userAddress,\n bytes memory functionSignature,\n bytes32 sigR,\n bytes32 sigS,\n uint8 sigV\n ) public payable returns (bytes memory) {\n MetaTransaction memory metaTx = MetaTransaction({\n nonce: nonces[userAddress],\n from: userAddress,\n functionSignature: functionSignature\n });\n\n require(\n verify(userAddress, metaTx, sigR, sigS, sigV),\n \"Signer and signature do not match\"\n );\n\n // increase nonce for user (to avoid re-use)\n nonces[userAddress] = nonces[userAddress].add(1);\n\n emit MetaTransactionExecuted(\n userAddress,\n msg.sender,\n functionSignature\n );\n\n // Append userAddress and relayer address at the end to extract it from calling context\n (bool success, bytes memory returnData) = address(this).call(\n abi.encodePacked(functionSignature, userAddress)\n );\n require(success, \"Function call not successful\");\n\n return returnData;\n }\n\n function hashMetaTransaction(MetaTransaction memory metaTx)\n internal\n pure\n returns (bytes32)\n {\n return\n keccak256(\n abi.encode(\n META_TRANSACTION_TYPEHASH,\n metaTx.nonce,\n metaTx.from,\n keccak256(metaTx.functionSignature)\n )\n );\n }\n\n function getNonce(address user) public view returns (uint256 nonce) {\n nonce = nonces[user];\n }\n\n function verify(\n address signer,\n MetaTransaction memory metaTx,\n bytes32 sigR,\n bytes32 sigS,\n uint8 sigV\n ) internal view returns (bool) {\n require(signer != address(0), \"NativeMetaTransaction: INVALID_SIGNER\");\n return\n signer ==\n ecrecover(\n toTypedMessageHash(hashMetaTransaction(metaTx)),\n sigV,\n sigR,\n sigS\n );\n }\n}\n" + }, + "contracts/Libraries/matic/common/ContextMixin.sol": { + "content": "pragma solidity 0.6.6;\n\nabstract contract ContextMixin {\n function msgSender()\n internal\n view\n returns (address payable sender)\n {\n if (msg.sender == address(this)) {\n bytes memory array = msg.data;\n uint256 index = msg.data.length;\n assembly {\n // Load the 32 bytes word from memory with the address on the lower 20 bytes, and mask those.\n sender := and(\n mload(add(array, index)),\n 0xffffffffffffffffffffffffffffffffffffffff\n )\n }\n } else {\n sender = msg.sender;\n }\n return sender;\n }\n}\n" + }, + "contracts/Libraries/matic/common/EIP712Base.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {Initializable} from \"./Initializable.sol\";\n\ncontract EIP712Base is Initializable {\n struct EIP712Domain {\n string name;\n string version;\n address verifyingContract;\n bytes32 salt;\n }\n\n string constant public ERC712_VERSION = \"1\";\n\n bytes32 internal constant EIP712_DOMAIN_TYPEHASH = keccak256(\n bytes(\n \"EIP712Domain(string name,string version,address verifyingContract,bytes32 salt)\"\n )\n );\n bytes32 internal domainSeperator;\n\n // supposed to be called once while initializing.\n // one of the contractsa that inherits this contract follows proxy pattern\n // so it is not possible to do this in a constructor\n function _initializeEIP712(\n string memory name\n )\n internal\n initializer\n {\n _setDomainSeperator(name);\n }\n\n function _setDomainSeperator(string memory name) internal {\n domainSeperator = keccak256(\n abi.encode(\n EIP712_DOMAIN_TYPEHASH,\n keccak256(bytes(name)),\n keccak256(bytes(ERC712_VERSION)),\n address(this),\n bytes32(getChainId())\n )\n );\n }\n\n function getDomainSeperator() public view returns (bytes32) {\n return domainSeperator;\n }\n\n function getChainId() public pure returns (uint256) {\n uint256 id;\n assembly {\n id := chainid()\n }\n return id;\n }\n\n /**\n * Accept message hash and returns hash message in EIP712 compatible form\n * So that it can be used to recover signer from signature signed using EIP712 formatted data\n * https://eips.ethereum.org/EIPS/eip-712\n * \"\\\\x19\" makes the encoding deterministic\n * \"\\\\x01\" is the version byte to make it compatible to EIP-191\n */\n function toTypedMessageHash(bytes32 messageHash)\n internal\n view\n returns (bytes32)\n {\n return\n keccak256(\n abi.encodePacked(\"\\x19\\x01\", getDomainSeperator(), messageHash)\n );\n }\n}\n" + }, + "contracts/Libraries/matic/root/RootToken/DummyMintableERC721.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {ERC721} from \"@openzeppelin/contracts/token/ERC721/ERC721.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\nimport {NativeMetaTransaction} from \"../../common/NativeMetaTransaction.sol\";\nimport {IMintableERC721} from \"./IMintableERC721.sol\";\nimport {ContextMixin} from \"../../common/ContextMixin.sol\";\n\ncontract DummyMintableERC721 is\n ERC721,\n AccessControlMixin,\n NativeMetaTransaction,\n IMintableERC721,\n ContextMixin\n{\n bytes32 public constant PREDICATE_ROLE = keccak256(\"PREDICATE_ROLE\");\n constructor(string memory name_, string memory symbol_)\n public\n ERC721(name_, symbol_)\n {\n _setupContractId(\"DummyMintableERC721\");\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n _setupRole(PREDICATE_ROLE, _msgSender());\n _initializeEIP712(name_);\n }\n\n function _msgSender()\n internal\n override\n view\n returns (address payable sender)\n {\n return ContextMixin.msgSender();\n }\n\n /**\n * @dev See {IMintableERC721-mint}.\n */\n function mint(address user, uint256 tokenId) external override only(PREDICATE_ROLE) {\n _mint(user, tokenId);\n }\n\n /**\n * If you're attempting to bring metadata associated with token\n * from L2 to L1, you must implement this method, to be invoked\n * when minting token back on L1, during exit\n */\n function setTokenMetadata(uint256 tokenId, bytes memory data) internal virtual {\n // This function should decode metadata obtained from L2\n // and attempt to set it for this `tokenId`\n //\n // Following is just a default implementation, feel\n // free to define your own encoding/ decoding scheme\n // for L2 -> L1 token metadata transfer\n string memory uri = abi.decode(data, (string));\n\n _setTokenURI(tokenId, uri);\n }\n\n /**\n * @dev See {IMintableERC721-mint}.\n * \n * If you're attempting to bring metadata associated with token\n * from L2 to L1, you must implement this method\n */\n function mint(address user, uint256 tokenId, bytes calldata metaData) external override only(PREDICATE_ROLE) {\n _mint(user, tokenId);\n\n setTokenMetadata(tokenId, metaData);\n }\n\n\n /**\n * @dev See {IMintableERC721-exists}.\n */\n function exists(uint256 tokenId) external view override returns (bool) {\n return _exists(tokenId);\n }\n}\n" + }, + "contracts/Libraries/matic/root/RootToken/IMintableERC721.sol": { + "content": "import {IERC721} from \"@openzeppelin/contracts/token/ERC721/IERC721.sol\";\n\npragma solidity 0.6.6;\n\ninterface IMintableERC721 is IERC721 {\n /**\n * @notice called by predicate contract to mint tokens while withdrawing\n * @dev Should be callable only by MintableERC721Predicate\n * Make sure minting is done only by this function\n * @param user user address for whom token is being minted\n * @param tokenId tokenId being minted\n */\n function mint(address user, uint256 tokenId) external;\n\n /**\n * @notice called by predicate contract to mint tokens while withdrawing with metadata from L2\n * @dev Should be callable only by MintableERC721Predicate\n * Make sure minting is only done either by this function/ 👆\n * @param user user address for whom token is being minted\n * @param tokenId tokenId being minted\n * @param metaData Associated token metadata, to be decoded & set using `setTokenMetadata`\n *\n * Note : If you're interested in taking token metadata from L2 to L1 during exit, you must\n * implement this method\n */\n function mint(address user, uint256 tokenId, bytes calldata metaData) external;\n\n /**\n * @notice check if token already exists, return true if it does exist\n * @dev this check will be used by the predicate to determine if the token needs to be minted or transfered\n * @param tokenId tokenId being checked\n */\n function exists(uint256 tokenId) external view returns (bool);\n}\n" + }, + "contracts/Libraries/matic/root/TokenPredicates/MintableERC721Predicate.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {IERC721Receiver} from \"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\nimport {RLPReader} from \"../../lib/RLPReader.sol\";\nimport {IMintableERC721} from \"../RootToken/IMintableERC721.sol\";\nimport {ITokenPredicate} from \"./ITokenPredicate.sol\";\nimport {Initializable} from \"../../common/Initializable.sol\";\n\ncontract MintableERC721Predicate is ITokenPredicate, AccessControlMixin, Initializable, IERC721Receiver {\n using RLPReader for bytes;\n using RLPReader for RLPReader.RLPItem;\n\n // keccak256(\"MANAGER_ROLE\")\n bytes32 public constant MANAGER_ROLE = 0x241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b08;\n // keccak256(\"MintableERC721\")\n bytes32 public constant TOKEN_TYPE = 0xd4392723c111fcb98b073fe55873efb447bcd23cd3e49ec9ea2581930cd01ddc;\n // keccak256(\"Transfer(address,address,uint256)\")\n bytes32 public constant TRANSFER_EVENT_SIG = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef;\n // keccak256(\"WithdrawnBatch(address,uint256[])\")\n bytes32 public constant WITHDRAW_BATCH_EVENT_SIG = 0xf871896b17e9cb7a64941c62c188a4f5c621b86800e3d15452ece01ce56073df;\n // keccak256(\"TransferWithMetadata(address,address,uint256,bytes)\")\n bytes32 public constant TRANSFER_WITH_METADATA_EVENT_SIG = 0xf94915c6d1fd521cee85359239227480c7e8776d7caf1fc3bacad5c269b66a14;\n\n // limit batching of tokens due to gas limit restrictions\n uint256 public constant BATCH_LIMIT = 20;\n\n event LockedMintableERC721(\n address indexed depositor,\n address indexed depositReceiver,\n address indexed rootToken,\n uint256 tokenId\n );\n\n event LockedMintableERC721Batch(\n address indexed depositor,\n address indexed depositReceiver,\n address indexed rootToken,\n uint256[] tokenIds\n );\n\n constructor() public {}\n\n function initialize(address _owner) external initializer {\n _setupContractId(\"MintableERC721Predicate\");\n _setupRole(DEFAULT_ADMIN_ROLE, _owner);\n _setupRole(MANAGER_ROLE, _owner);\n }\n\n /**\n * @notice accepts safe ERC721 transfer\n */\n function onERC721Received(\n address,\n address,\n uint256,\n bytes calldata\n )\n external\n override\n returns (bytes4)\n {\n return IERC721Receiver.onERC721Received.selector;\n }\n\n /**\n * @notice Lock ERC721 token(s) for deposit, callable only by manager\n * @param depositor Address who wants to deposit token\n * @param depositReceiver Address (address) who wants to receive token on child chain\n * @param rootToken Token which gets deposited\n * @param depositData ABI encoded tokenId(s). It's possible to deposit batch of tokens.\n */\n function lockTokens(\n address depositor,\n address depositReceiver,\n address rootToken,\n bytes calldata depositData\n )\n external\n override\n only(MANAGER_ROLE)\n {\n\n // Locking single ERC721 token\n if (depositData.length == 32) {\n\n uint256 tokenId = abi.decode(depositData, (uint256));\n\n // Emitting event that single token is getting locked in predicate\n emit LockedMintableERC721(depositor, depositReceiver, rootToken, tokenId);\n\n // Transferring token to this address, which will be\n // released when attempted to be unlocked\n IMintableERC721(rootToken).safeTransferFrom(depositor, address(this), tokenId);\n\n } else {\n // Locking a set a ERC721 token(s)\n\n uint256[] memory tokenIds = abi.decode(depositData, (uint256[]));\n\n // Emitting event that a set of ERC721 tokens are getting lockec\n // in this predicate contract\n emit LockedMintableERC721Batch(depositor, depositReceiver, rootToken, tokenIds);\n\n // These many tokens are attempted to be deposited\n // by user\n uint256 length = tokenIds.length;\n require(length <= BATCH_LIMIT, \"MintableERC721Predicate: EXCEEDS_BATCH_LIMIT\");\n\n // Iteratively trying to transfer ERC721 token\n // to this predicate address\n for (uint256 i; i < length; i++) {\n\n IMintableERC721(rootToken).safeTransferFrom(depositor, address(this), tokenIds[i]);\n\n }\n\n }\n\n }\n\n /**\n * @notice Validates log signature, from and to address\n * then checks if token already exists on root chain\n * if token exits then transfers it to withdrawer\n * if token doesn't exit then it is minted\n * callable only by manager\n * @param rootToken Token which gets withdrawn\n * @param log Valid ERC721 burn log from child chain\n */\n function exitTokens(\n address,\n address rootToken,\n bytes memory log\n )\n public\n override\n only(MANAGER_ROLE)\n {\n RLPReader.RLPItem[] memory logRLPList = log.toRlpItem().toList();\n RLPReader.RLPItem[] memory logTopicRLPList = logRLPList[1].toList(); // topics\n\n // If it's a simple exit ( with out metadata coming from L2 to L1 )\n if(bytes32(logTopicRLPList[0].toUint()) == TRANSFER_EVENT_SIG) {\n\n address withdrawer = address(logTopicRLPList[1].toUint()); // topic1 is from address\n\n require(\n address(logTopicRLPList[2].toUint()) == address(0), // topic2 is to address\n \"MintableERC721Predicate: INVALID_RECEIVER\"\n );\n\n IMintableERC721 token = IMintableERC721(rootToken);\n\n uint256 tokenId = logTopicRLPList[3].toUint(); // topic3 is tokenId field\n if (token.exists(tokenId)) {\n token.safeTransferFrom(\n address(this),\n withdrawer,\n tokenId\n );\n } else {\n token.mint(withdrawer, tokenId);\n }\n\n } else if (bytes32(logTopicRLPList[0].toUint()) == WITHDRAW_BATCH_EVENT_SIG) { // topic0 is event sig\n // If it's a simple batch exit, where a set of\n // ERC721s were burnt in child chain with event signature\n // looking like `WithdrawnBatch(address indexed user, uint256[] tokenIds);`\n //\n // @note This doesn't allow transfer of metadata cross chain\n // For that check below `else if` block\n\n address withdrawer = address(logTopicRLPList[1].toUint()); // topic1 is from address\n\n // RLP encoded tokenId list\n bytes memory logData = logRLPList[2].toBytes();\n\n (uint256[] memory tokenIds) = abi.decode(logData, (uint256[]));\n uint256 length = tokenIds.length;\n\n IMintableERC721 token = IMintableERC721(rootToken);\n\n for (uint256 i; i < length; i++) {\n\n uint256 tokenId = tokenIds[i];\n\n // Check if token exists or not\n //\n // If does, transfer token to withdrawer\n if (token.exists(tokenId)) {\n token.safeTransferFrom(\n address(this),\n withdrawer,\n tokenId\n );\n } else {\n // If token was minted on L2\n // we'll mint it here, on L1, during\n // exiting from L2\n token.mint(withdrawer, tokenId);\n }\n\n }\n\n } else if (bytes32(logTopicRLPList[0].toUint()) == TRANSFER_WITH_METADATA_EVENT_SIG) { \n // If this is NFT exit with metadata i.e. URI 👆\n //\n // Note: If your token is only minted in L2, you can exit\n // it with metadata. But if it was minted on L1, it'll be\n // simply transferred to withdrawer address. And in that case,\n // it's lot better to exit with `Transfer(address,address,uint256)`\n // i.e. calling `withdraw` method on L2 contract\n // event signature proof, which is defined under first `if` clause\n //\n // If you've called `withdrawWithMetadata`, you should submit\n // proof of event signature `TransferWithMetadata(address,address,uint256,bytes)`\n\n address withdrawer = address(logTopicRLPList[1].toUint()); // topic1 is from address\n\n require(\n address(logTopicRLPList[2].toUint()) == address(0), // topic2 is to address\n \"MintableERC721Predicate: INVALID_RECEIVER\"\n );\n\n IMintableERC721 token = IMintableERC721(rootToken);\n\n uint256 tokenId = logTopicRLPList[3].toUint(); // topic3 is tokenId field\n if (token.exists(tokenId)) {\n token.safeTransferFrom(\n address(this),\n withdrawer,\n tokenId\n );\n } else {\n // Minting with metadata received from L2 i.e. emitted\n // by event `TransferWithMetadata` during burning\n bytes memory logData = logRLPList[2].toBytes();\n bytes memory metaData = abi.decode(logData, (bytes));\n \n token.mint(withdrawer, tokenId, metaData);\n }\n\n } else {\n // Attempting to exit with some event signature from L2, which is\n // not ( yet ) supported by L1 exit manager\n revert(\"MintableERC721Predicate: INVALID_SIGNATURE\");\n }\n \n }\n}\n" + }, + "contracts/Libraries/matic/test/ProxyTestImplStorageLayoutChange.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {Initializable} from \"../common/Initializable.sol\";\n\ncontract ProxyTestImplStorageLayoutChange is Initializable {\n uint256 public b;\n uint256 public a;\n}\n" + }, + "contracts/Libraries/matic/test/ProxyTestImpl.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {Initializable} from \"../common/Initializable.sol\";\n\ncontract ProxyTestImpl is Initializable {\n uint256 public a = 1;\n uint256 public b = 2;\n uint256 public ctorInit;\n\n constructor() public {\n ctorInit = 3;\n }\n\n function init() public initializer {\n a = 1;\n b = 2;\n }\n}\n" + }, + "contracts/Libraries/matic/root/TokenPredicates/MintableERC20Predicate.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {IMintableERC20} from \"../RootToken/IMintableERC20.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\nimport {RLPReader} from \"../../lib/RLPReader.sol\";\nimport {ITokenPredicate} from \"./ITokenPredicate.sol\";\nimport {Initializable} from \"../../common/Initializable.sol\";\n\ncontract MintableERC20Predicate is\n ITokenPredicate,\n AccessControlMixin,\n Initializable\n{\n using RLPReader for bytes;\n using RLPReader for RLPReader.RLPItem;\n\n bytes32 public constant MANAGER_ROLE = keccak256(\"MANAGER_ROLE\");\n bytes32 public constant TOKEN_TYPE = keccak256(\"MintableERC20\");\n bytes32 public constant TRANSFER_EVENT_SIG = keccak256(\n \"Transfer(address,address,uint256)\"\n );\n\n event LockedMintableERC20(\n address indexed depositor,\n address indexed depositReceiver,\n address indexed rootToken,\n uint256 amount\n );\n\n constructor() public {}\n\n function initialize(address _owner) external initializer {\n _setupContractId(\"MintableERC20Predicate\");\n _setupRole(DEFAULT_ADMIN_ROLE, _owner);\n _setupRole(MANAGER_ROLE, _owner);\n }\n\n /**\n * @notice Lock ERC20 tokens for deposit, callable only by manager\n * @param depositor Address who wants to deposit tokens\n * @param depositReceiver Address (address) who wants to receive tokens on child chain\n * @param rootToken Token which gets deposited\n * @param depositData ABI encoded amount\n */\n function lockTokens(\n address depositor,\n address depositReceiver,\n address rootToken,\n bytes calldata depositData\n ) external override only(MANAGER_ROLE) {\n uint256 amount = abi.decode(depositData, (uint256));\n\n emit LockedMintableERC20(depositor, depositReceiver, rootToken, amount);\n IMintableERC20(rootToken).transferFrom(\n depositor,\n address(this),\n amount\n );\n }\n\n /**\n * @notice Validates log signature, from and to address\n * then sends the correct amount to withdrawer\n * callable only by manager\n * @param rootToken Token which gets withdrawn\n * @param log Valid ERC20 burn log from child chain\n */\n function exitTokens(\n address,\n address rootToken,\n bytes memory log\n ) public override only(MANAGER_ROLE) {\n RLPReader.RLPItem[] memory logRLPList = log.toRlpItem().toList();\n RLPReader.RLPItem[] memory logTopicRLPList = logRLPList[1].toList(); // topics\n\n require(\n bytes32(logTopicRLPList[0].toUint()) == TRANSFER_EVENT_SIG, // topic0 is `Transfer` event sig\n \"MintableERC20Predicate: INVALID_SIGNATURE\"\n );\n\n address withdrawer = address(logTopicRLPList[1].toUint()); // topic1 is `from` address\n\n require(\n address(logTopicRLPList[2].toUint()) == address(0), // topic2 is `to` address\n \"MintableERC20Predicate: INVALID_RECEIVER\"\n );\n\n IMintableERC20 token = IMintableERC20(rootToken);\n\n uint256 tokenBalance = token.balanceOf(address(this));\n uint256 amount = logRLPList[2].toUint();\n\n // Checking whether MintableERC20Predicate has enough balance\n // to transfer `amount` to withdrawer or not\n //\n // If no, it'll mint those extra tokens & transfer `amount`\n // to withdrawer\n if (tokenBalance < amount) {\n token.mint(address(this), amount - tokenBalance);\n }\n\n token.transfer(withdrawer, amount);\n }\n}\n" + }, + "contracts/Libraries/matic/root/RootToken/IMintableERC20.sol": { + "content": "import {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\npragma solidity 0.6.6;\n\ninterface IMintableERC20 is IERC20 {\n /**\n * @notice called by predicate contract to mint tokens while withdrawing\n * @dev Should be callable only by MintableERC20Predicate\n * Make sure minting is done only by this function\n * @param user user address for whom token is being minted\n * @param amount amount of token being minted\n */\n function mint(address user, uint256 amount) external;\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n" + }, + "contracts/Libraries/matic/root/TokenPredicates/MintableERC1155Predicate.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {IMintableERC1155} from \"../RootToken/IMintableERC1155.sol\";\nimport {\n ERC1155Receiver\n} from \"@openzeppelin/contracts/token/ERC1155/ERC1155Receiver.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\nimport {RLPReader} from \"../../lib/RLPReader.sol\";\nimport {ITokenPredicate} from \"./ITokenPredicate.sol\";\nimport {Initializable} from \"../../common/Initializable.sol\";\n\ncontract MintableERC1155Predicate is\n ITokenPredicate,\n ERC1155Receiver,\n AccessControlMixin,\n Initializable\n{\n using RLPReader for bytes;\n using RLPReader for RLPReader.RLPItem;\n\n bytes32 public constant MANAGER_ROLE = keccak256(\"MANAGER_ROLE\");\n bytes32 public constant TOKEN_TYPE = keccak256(\"MintableERC1155\");\n\n bytes32 public constant TRANSFER_SINGLE_EVENT_SIG = keccak256(\n \"TransferSingle(address,address,address,uint256,uint256)\"\n );\n bytes32 public constant TRANSFER_BATCH_EVENT_SIG = keccak256(\n \"TransferBatch(address,address,address,uint256[],uint256[])\"\n );\n\n event LockedBatchMintableERC1155(\n address indexed depositor,\n address indexed depositReceiver,\n address indexed rootToken,\n uint256[] ids,\n uint256[] amounts\n );\n\n constructor() public {}\n\n function initialize(address _owner) external initializer {\n _setupContractId(\"MintableERC1155Predicate\");\n _setupRole(DEFAULT_ADMIN_ROLE, _owner);\n _setupRole(MANAGER_ROLE, _owner);\n }\n\n /**\n * @notice rejects single transfer\n */\n function onERC1155Received(\n address,\n address,\n uint256,\n uint256,\n bytes calldata\n ) external override returns (bytes4) {\n return 0;\n }\n\n /**\n * @notice accepts batch transfer\n */\n function onERC1155BatchReceived(\n address,\n address,\n uint256[] calldata,\n uint256[] calldata,\n bytes calldata\n ) external override returns (bytes4) {\n return ERC1155Receiver(0).onERC1155BatchReceived.selector;\n }\n\n /**\n * @notice Lock ERC1155 tokens for deposit, callable only by manager\n * @param depositor Address who wants to deposit tokens\n * @param depositReceiver Address (address) who wants to receive tokens on child chain\n * @param rootToken Token which gets deposited\n * @param depositData ABI encoded id array and amount array\n */\n function lockTokens(\n address depositor,\n address depositReceiver,\n address rootToken,\n bytes calldata depositData\n ) external override only(MANAGER_ROLE) {\n // forcing batch deposit since supporting both single and batch deposit introduces too much complexity\n (\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n ) = abi.decode(depositData, (uint256[], uint256[], bytes));\n\n emit LockedBatchMintableERC1155(\n depositor,\n depositReceiver,\n rootToken,\n ids,\n amounts\n );\n IMintableERC1155(rootToken).safeBatchTransferFrom(\n depositor,\n address(this),\n ids,\n amounts,\n data\n );\n }\n \n // Used when attempting to exit with single token, single amount/ id is converted into\n // slice of amounts/ ids\n // Generally size is going to be `1` i.e. single element array, but it's kept generic\n function makeArrayWithValue(uint256 val, uint size) internal pure returns(uint256[] memory) {\n require(\n size > 0,\n \"MintableERC1155Predicate: Invalid resulting array length\"\n );\n\n uint256[] memory vals = new uint256[](size);\n\n for (uint256 i = 0; i < size; i++) {\n vals[i] = val;\n }\n\n return vals;\n }\n\n /**\n * @notice Creates an array of `size` by repeating provided address,\n * to be required for passing to batch balance checking function of ERC1155 tokens.\n * @param addr Address to be repeated `size` times in resulting array\n * @param size Size of resulting array\n */\n function makeArrayWithAddress(address addr, uint256 size)\n internal\n pure\n returns (address[] memory)\n {\n require(\n addr != address(0),\n \"MintableERC1155Predicate: Invalid address\"\n );\n require(\n size > 0,\n \"MintableERC1155Predicate: Invalid resulting array length\"\n );\n\n address[] memory addresses = new address[](size);\n\n for (uint256 i = 0; i < size; i++) {\n addresses[i] = addr;\n }\n\n return addresses;\n }\n\n /**\n * @notice Calculates amount of tokens to be minted, by subtracting available\n * token balances from amount of tokens to be exited\n * @param tokenBalances Token balances this contract holds for some ordered token ids\n * @param amountsToBeExited Amount of tokens being exited\n */\n function calculateAmountsToBeMinted(\n uint256[] memory tokenBalances,\n uint256[] memory amountsToBeExited\n ) internal pure returns (uint256[] memory) {\n require(\n tokenBalances.length == amountsToBeExited.length,\n \"MintableERC1155Predicate: Array length mismatch found\"\n );\n\n uint256[] memory toBeMintedAmounts = new uint256[](\n tokenBalances.length\n );\n\n // Iteratively calculating amounts of token to be minted\n //\n // Please note, in some cases it can be 0, but that will not\n // be a problem, due to implementation of mint logic for ERC1155\n for (uint256 i = 0; i < tokenBalances.length; i++) {\n if (tokenBalances[i] < amountsToBeExited[i]) {\n toBeMintedAmounts[i] = amountsToBeExited[i] - tokenBalances[i];\n }\n }\n\n return toBeMintedAmounts;\n }\n\n /**\n * @notice Validates log signature, from and to address\n * then sends the correct tokenId, amount to withdrawer\n * callable only by manager\n * @param rootToken Token which gets withdrawn\n * @param log Valid ERC1155 TransferSingle burn or TransferBatch burn log from child chain\n */\n function exitTokens(\n address,\n address rootToken,\n bytes memory log\n ) public override only(MANAGER_ROLE) {\n RLPReader.RLPItem[] memory logRLPList = log.toRlpItem().toList();\n RLPReader.RLPItem[] memory logTopicRLPList = logRLPList[1].toList(); // topics\n bytes memory logData = logRLPList[2].toBytes();\n\n address withdrawer = address(logTopicRLPList[2].toUint()); // topic2 is from address\n\n require(\n address(logTopicRLPList[3].toUint()) == address(0), // topic3 is to address\n \"MintableERC1155Predicate: INVALID_RECEIVER\"\n );\n\n if (bytes32(logTopicRLPList[0].toUint()) == TRANSFER_SINGLE_EVENT_SIG) {\n // topic0 is event sig\n (uint256 id, uint256 amount) = abi.decode(\n logData,\n (uint256, uint256)\n );\n\n IMintableERC1155 token = IMintableERC1155(rootToken);\n // Currently locked tokens for `id` in this contract\n uint256 tokenBalance = token.balanceOf(address(this), id);\n\n // Checking whether MintableERC1155 contract has enough\n // tokens locked in to transfer to withdrawer, if not\n // it'll mint those tokens for this contract and return\n // safely transfer those to withdrawer\n if (tokenBalance < amount) {\n // @notice We could have done `mint`, but that would require\n // us implementing `onERC1155Received`, which we avoid intentionally\n // for sake of only supporting batch deposit.\n //\n // Which is why this transfer is wrapped as single element batch minting\n token.mintBatch(address(this), \n makeArrayWithValue(id, 1), \n makeArrayWithValue(amount - tokenBalance, 1), \n bytes(\"\"));\n }\n\n token.safeTransferFrom(\n address(this),\n withdrawer,\n id,\n amount,\n bytes(\"\")\n );\n } else if (\n bytes32(logTopicRLPList[0].toUint()) == TRANSFER_BATCH_EVENT_SIG\n ) {\n (uint256[] memory ids, uint256[] memory amounts) = abi.decode(\n logData,\n (uint256[], uint256[])\n );\n\n IMintableERC1155 token = IMintableERC1155(rootToken);\n\n token.mintBatch(\n address(this),\n ids,\n calculateAmountsToBeMinted(\n token.balanceOfBatch(\n makeArrayWithAddress(address(this), ids.length),\n ids\n ),\n amounts\n ),\n bytes(\"\")\n );\n\n IMintableERC1155(rootToken).safeBatchTransferFrom(\n address(this),\n withdrawer,\n ids,\n amounts,\n bytes(\"\")\n );\n } else {\n revert(\"MintableERC1155Predicate: INVALID_WITHDRAW_SIG\");\n }\n }\n}\n" + }, + "contracts/Libraries/matic/root/RootToken/IMintableERC1155.sol": { + "content": "import {IERC1155} from \"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\";\n\npragma solidity 0.6.6;\n\ninterface IMintableERC1155 is IERC1155 {\n /**\n * @notice Creates `amount` tokens of token type `id`, and assigns them to `account`.\n * @dev Should be callable only by MintableERC1155Predicate\n * Make sure minting is done only by this function\n * @param account user address for whom token is being minted\n * @param id token which is being minted\n * @param amount amount of token being minted\n * @param data extra byte data to be accompanied with minted tokens\n */\n function mint(address account, uint256 id, uint256 amount, bytes calldata data) external;\n\n /**\n * @notice Batched version of singular token minting, where\n * for each token in `ids` respective amount to be minted from `amounts`\n * array, for address `to`.\n * @dev Should be callable only by MintableERC1155Predicate\n * Make sure minting is done only by this function\n * @param to user address for whom token is being minted\n * @param ids tokens which are being minted\n * @param amounts amount of each token being minted\n * @param data extra byte data to be accompanied with minted tokens\n */\n function mintBatch(address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data) external;\n}\n" + }, + "@openzeppelin/contracts/token/ERC1155/ERC1155Receiver.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"./IERC1155Receiver.sol\";\nimport \"../../introspection/ERC165.sol\";\n\n/**\n * @dev _Available since v3.1._\n */\nabstract contract ERC1155Receiver is ERC165, IERC1155Receiver {\n constructor() internal {\n _registerInterface(\n ERC1155Receiver(address(0)).onERC1155Received.selector ^\n ERC1155Receiver(address(0)).onERC1155BatchReceived.selector\n );\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC1155/IERC1155.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.2 <0.8.0;\n\nimport \"../../introspection/IERC165.sol\";\n\n/**\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\n *\n * _Available since v3.1._\n */\ninterface IERC1155 is IERC165 {\n /**\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\n */\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\n\n /**\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\n * transfers.\n */\n event TransferBatch(address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values);\n\n /**\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\n * `approved`.\n */\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\n\n /**\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\n *\n * If an {URI} event was emitted for `id`, the standard\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\n * returned by {IERC1155MetadataURI-uri}.\n */\n event URI(string value, uint256 indexed id);\n\n /**\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function balanceOf(address account, uint256 id) external view returns (uint256);\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\n *\n * Requirements:\n *\n * - `accounts` and `ids` must have the same length.\n */\n function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory);\n\n /**\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\n *\n * Emits an {ApprovalForAll} event.\n *\n * Requirements:\n *\n * - `operator` cannot be the caller.\n */\n function setApprovalForAll(address operator, bool approved) external;\n\n /**\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\n *\n * See {setApprovalForAll}.\n */\n function isApprovedForAll(address account, address operator) external view returns (bool);\n\n /**\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\n *\n * Emits a {TransferSingle} event.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}.\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\n * acceptance magic value.\n */\n function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\n *\n * Emits a {TransferBatch} event.\n *\n * Requirements:\n *\n * - `ids` and `amounts` must have the same length.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\n * acceptance magic value.\n */\n function safeBatchTransferFrom(address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data) external;\n}\n" + }, + "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"../../introspection/IERC165.sol\";\n\n/**\n * _Available since v3.1._\n */\ninterface IERC1155Receiver is IERC165 {\n\n /**\n @dev Handles the receipt of a single ERC1155 token type. This function is\n called at the end of a `safeTransferFrom` after the balance has been updated.\n To accept the transfer, this must return\n `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))`\n (i.e. 0xf23a6e61, or its own function selector).\n @param operator The address which initiated the transfer (i.e. msg.sender)\n @param from The address which previously owned the token\n @param id The ID of the token being transferred\n @param value The amount of tokens being transferred\n @param data Additional data with no specified format\n @return `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))` if transfer is allowed\n */\n function onERC1155Received(\n address operator,\n address from,\n uint256 id,\n uint256 value,\n bytes calldata data\n )\n external\n returns(bytes4);\n\n /**\n @dev Handles the receipt of a multiple ERC1155 token types. This function\n is called at the end of a `safeBatchTransferFrom` after the balances have\n been updated. To accept the transfer(s), this must return\n `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))`\n (i.e. 0xbc197c81, or its own function selector).\n @param operator The address which initiated the batch transfer (i.e. msg.sender)\n @param from The address which previously owned the token\n @param ids An array containing ids of each token being transferred (order and length must match values array)\n @param values An array containing amounts of each token being transferred (order and length must match ids array)\n @param data Additional data with no specified format\n @return `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))` if transfer is allowed\n */\n function onERC1155BatchReceived(\n address operator,\n address from,\n uint256[] calldata ids,\n uint256[] calldata values,\n bytes calldata data\n )\n external\n returns(bytes4);\n}\n" + }, + "contracts/Libraries/matic/test/MerklePatriciaTest.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {MerklePatriciaProof} from \"../lib/MerklePatriciaProof.sol\";\nimport {RLPReader} from \"../lib/RLPReader.sol\";\n\ncontract MerklePatriciaTest {\n using RLPReader for bytes;\n using RLPReader for RLPReader.RLPItem;\n\n function verify(uint receiptRoot, bytes calldata receipt, bytes calldata receiptProof, bytes calldata branchMask) external pure returns(bool) {\n\n return MerklePatriciaProof.verify(\n receipt, // receipt\n branchMask, // branchMask\n receiptProof, // receiptProof\n bytes32(receiptRoot) // receiptRoot\n );\n }\n}\n" + }, + "contracts/Libraries/matic/root/TokenPredicates/EtherPredicate.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\nimport {RLPReader} from \"../../lib/RLPReader.sol\";\nimport {ITokenPredicate} from \"./ITokenPredicate.sol\";\nimport {Initializable} from \"../../common/Initializable.sol\";\n\ncontract EtherPredicate is ITokenPredicate, AccessControlMixin, Initializable {\n using RLPReader for bytes;\n using RLPReader for RLPReader.RLPItem;\n\n bytes32 public constant MANAGER_ROLE = keccak256(\"MANAGER_ROLE\");\n bytes32 public constant TOKEN_TYPE = keccak256(\"Ether\");\n bytes32 public constant TRANSFER_EVENT_SIG = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef;\n\n event LockedEther(\n address indexed depositor,\n address indexed depositReceiver,\n uint256 amount\n );\n\n event ExitedEther(\n address indexed exitor,\n uint256 amount\n );\n\n constructor() public {}\n\n function initialize(address _owner) external initializer {\n _setupContractId(\"EtherPredicate\");\n _setupRole(DEFAULT_ADMIN_ROLE, _owner);\n _setupRole(MANAGER_ROLE, _owner);\n }\n\n /**\n * @notice Receive Ether to lock for deposit, callable only by manager\n */\n receive() external payable only(MANAGER_ROLE) {}\n\n /**\n * @notice handle ether lock, callable only by manager\n * @param depositor Address who wants to deposit tokens\n * @param depositReceiver Address (address) who wants to receive tokens on child chain\n * @param depositData ABI encoded amount\n */\n function lockTokens(\n address depositor,\n address depositReceiver,\n address,\n bytes calldata depositData\n )\n external\n override\n only(MANAGER_ROLE)\n {\n uint256 amount = abi.decode(depositData, (uint256));\n emit LockedEther(depositor, depositReceiver, amount);\n }\n\n /**\n * @notice Validates log signature, from and to address\n * then sends the correct amount to withdrawer\n * callable only by manager\n * @param log Valid ERC20 burn log from child chain\n */\n function exitTokens(\n address,\n address,\n bytes memory log\n )\n public\n override\n only(MANAGER_ROLE)\n {\n RLPReader.RLPItem[] memory logRLPList = log.toRlpItem().toList();\n RLPReader.RLPItem[] memory logTopicRLPList = logRLPList[1].toList(); // topics\n\n require(\n bytes32(logTopicRLPList[0].toUint()) == TRANSFER_EVENT_SIG, // topic0 is event sig\n \"EtherPredicate: INVALID_SIGNATURE\"\n );\n\n address withdrawer = address(logTopicRLPList[1].toUint()); // topic1 is from address\n\n require(\n address(logTopicRLPList[2].toUint()) == address(0), // topic2 is to address\n \"EtherPredicate: INVALID_RECEIVER\"\n );\n\n emit ExitedEther(withdrawer, logRLPList[2].toUint());\n\n payable(withdrawer).transfer(logRLPList[2].toUint());\n }\n}\n" + }, + "contracts/Libraries/matic/tunnel/BaseChildTunnel.sol": { + "content": "pragma solidity 0.6.6;\n\n\nimport {AccessControlMixin} from \"../common/AccessControlMixin.sol\";\n\n/**\n* @notice Mock child tunnel contract to receive and send message from L2\n*/\nabstract contract BaseChildTunnel is AccessControlMixin {\n bytes32 public constant STATE_SYNCER_ROLE = keccak256(\"STATE_SYNCER_ROLE\");\n\n // MessageTunnel on L1 will get data from this event\n event MessageSent(bytes message);\n\n constructor() internal {\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\n _setupRole(STATE_SYNCER_ROLE, 0x0000000000000000000000000000000000001001);\n _setupContractId(\"ChildTunnel\");\n }\n\n /**\n * @notice Receive state sync from matic contracts\n * @dev This method will be called by Matic chain internally.\n * This is executed without transaction using a system call.\n */\n function onStateReceive(uint256, bytes memory message) public only(STATE_SYNCER_ROLE) {\n _processMessageFromRoot(message);\n }\n\n /**\n * @notice Emit message that can be received on Root Tunnel\n * @dev Call the internal function when need to emit message\n * @param message bytes message that will be sent to Root Tunnel\n * some message examples -\n * abi.encode(tokenId);\n * abi.encode(tokenId, tokenMetadata);\n * abi.encode(messageType, messageData);\n */\n function _sendMessageToRoot(bytes memory message) internal {\n emit MessageSent(message);\n }\n\n /**\n * @notice Process message received from Root Tunnel\n * @dev function needs to be implemented to handle message as per requirement\n * This is called by onStateReceive function.\n * Since it is called via a system call, any event will not be emitted during its execution.\n * @param message bytes message that was sent from Root Tunnel\n */\n function _processMessageFromRoot(bytes memory message) virtual internal;\n}\n" + }, + "contracts/Libraries/matic/tunnel/ChildTunnel.sol": { + "content": "pragma solidity ^0.6.6;\n\nimport {BaseChildTunnel} from \"./BaseChildTunnel.sol\";\n\n\ncontract ChildTunnel is BaseChildTunnel {\n function _processMessageFromRoot(bytes memory message) internal override {\n // implement your core logic here\n }\n}\n" + }, + "contracts/Libraries/matic/test/TestChildTunnel.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {BaseChildTunnel} from \"../tunnel/BaseChildTunnel.sol\";\n\ncontract TestChildTunnel is BaseChildTunnel {\n uint256 public number;\n\n bytes32 public constant TYPE1 = keccak256(\"TYPE1\");\n bytes32 public constant TYPE2 = keccak256(\"TYPE2\");\n\n function _processMessageFromRoot(bytes memory message) internal override {\n (bytes32 syncType, uint256 n) = abi.decode(\n message,\n (bytes32, uint256)\n );\n\n if (TYPE1 == syncType) {\n number = number + n; // add\n } else if (TYPE2 == syncType) {\n number = number - n; // sub\n }\n }\n\n function sendMessage(bytes calldata message) external {\n _sendMessageToRoot(message);\n }\n}\n" + }, + "contracts/Libraries/matic/root/TokenPredicates/ERC721Predicate.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {IRootERC721} from \"../RootToken/IRootERC721.sol\";\nimport {IERC721Receiver} from \"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\";\nimport {RLPReader} from \"../../lib/RLPReader.sol\";\nimport {ITokenPredicate} from \"./ITokenPredicate.sol\";\nimport {Initializable} from \"../../common/Initializable.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\n\ncontract ERC721Predicate is ITokenPredicate, AccessControlMixin, Initializable, IERC721Receiver {\n using RLPReader for bytes;\n using RLPReader for RLPReader.RLPItem;\n\n bytes32 public constant MANAGER_ROLE = keccak256(\"MANAGER_ROLE\");\n bytes32 public constant TOKEN_TYPE = keccak256(\"ERC721\");\n // keccak256(\"Transfer(address,address,uint256)\")\n bytes32 public constant TRANSFER_EVENT_SIG = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef;\n // keccak256(\"WithdrawnBatch(address,uint256[])\")\n bytes32 public constant WITHDRAW_BATCH_EVENT_SIG = 0xf871896b17e9cb7a64941c62c188a4f5c621b86800e3d15452ece01ce56073df;\n // keccak256(\"TransferWithMetadata(address,address,uint256,bytes)\")\n bytes32 public constant TRANSFER_WITH_METADATA_EVENT_SIG = 0xf94915c6d1fd521cee85359239227480c7e8776d7caf1fc3bacad5c269b66a14;\n\n // limit batching of tokens due to gas limit restrictions\n uint256 public constant BATCH_LIMIT = 20;\n\n event LockedERC721(\n address indexed depositor,\n address indexed depositReceiver,\n address indexed rootToken,\n uint256 tokenId\n );\n event LockedERC721Batch(\n address indexed depositor,\n address indexed depositReceiver,\n address indexed rootToken,\n uint256[] tokenIds\n );\n\n constructor() public {}\n\n function initialize(address _owner) external initializer {\n _setupContractId(\"ERC721Predicate\");\n _setupRole(DEFAULT_ADMIN_ROLE, _owner);\n _setupRole(MANAGER_ROLE, _owner);\n }\n\n /**\n * @notice accepts safe ERC721 transfer\n */\n function onERC721Received(\n address,\n address,\n uint256,\n bytes calldata\n )\n external\n override\n returns (bytes4)\n {\n return IERC721Receiver.onERC721Received.selector;\n }\n\n /**\n * @notice Lock ERC721 tokens for deposit, callable only by manager\n * @param depositor Address who wants to deposit token\n * @param depositReceiver Address (address) who wants to receive token on child chain\n * @param rootToken Token which gets deposited\n * @param depositData ABI encoded tokenId\n */\n function lockTokens(\n address depositor,\n address depositReceiver,\n address rootToken,\n bytes calldata depositData\n )\n external\n override\n only(MANAGER_ROLE)\n {\n // deposit single\n if (depositData.length == 32) {\n uint256 tokenId = abi.decode(depositData, (uint256));\n emit LockedERC721(depositor, depositReceiver, rootToken, tokenId);\n IRootERC721(rootToken).safeTransferFrom(depositor, address(this), tokenId);\n\n // deposit batch\n } else {\n uint256[] memory tokenIds = abi.decode(depositData, (uint256[]));\n emit LockedERC721Batch(depositor, depositReceiver, rootToken, tokenIds);\n uint256 length = tokenIds.length;\n require(length <= BATCH_LIMIT, \"ERC721Predicate: EXCEEDS_BATCH_LIMIT\");\n for (uint256 i; i < length; i++) {\n IRootERC721(rootToken).safeTransferFrom(depositor, address(this), tokenIds[i]);\n }\n }\n }\n\n /**\n * @notice Validates log signature, from and to address\n * then sends the correct tokenId to withdrawer\n * callable only by manager\n * @param rootToken Token which gets withdrawn\n * @param log Valid ERC721 burn log from child chain\n */\n function exitTokens(\n address,\n address rootToken,\n bytes memory log\n )\n public\n override\n only(MANAGER_ROLE)\n {\n RLPReader.RLPItem[] memory logRLPList = log.toRlpItem().toList();\n RLPReader.RLPItem[] memory logTopicRLPList = logRLPList[1].toList(); // topics\n address withdrawer = address(logTopicRLPList[1].toUint()); // topic1 is from address\n\n if (bytes32(logTopicRLPList[0].toUint()) == TRANSFER_EVENT_SIG) { // topic0 is event sig\n require(\n address(logTopicRLPList[2].toUint()) == address(0), // topic2 is to address\n \"ERC721Predicate: INVALID_RECEIVER\"\n );\n\n IRootERC721(rootToken).safeTransferFrom(\n address(this),\n withdrawer,\n logTopicRLPList[3].toUint() // topic3 is tokenId field\n );\n\n } else if (bytes32(logTopicRLPList[0].toUint()) == WITHDRAW_BATCH_EVENT_SIG) { // topic0 is event sig\n bytes memory logData = logRLPList[2].toBytes();\n (uint256[] memory tokenIds) = abi.decode(logData, (uint256[])); // data is tokenId list\n uint256 length = tokenIds.length;\n for (uint256 i; i < length; i++) {\n IRootERC721(rootToken).safeTransferFrom(address(this), withdrawer, tokenIds[i]);\n }\n\n } else if (bytes32(logTopicRLPList[0].toUint()) == TRANSFER_WITH_METADATA_EVENT_SIG) { \n // If this is when NFT exit is done with arbitrary metadata on L2\n\n require(\n address(logTopicRLPList[2].toUint()) == address(0), // topic2 is to address\n \"ERC721Predicate: INVALID_RECEIVER\"\n );\n\n IRootERC721 token = IRootERC721(rootToken);\n uint256 tokenId = logTopicRLPList[3].toUint(); // topic3 is tokenId field\n\n token.safeTransferFrom(address(this), withdrawer, tokenId);\n // This function will be invoked for passing arbitrary\n // metadata, obtained from event emitted in L2, to\n // L1 ERC721, so that it can decode & do further processing\n //\n // @note Make sure you've implemented this method\n // if you're interested in exiting with metadata\n bytes memory logData = logRLPList[2].toBytes();\n bytes memory metaData = abi.decode(logData, (bytes));\n\n token.setTokenMetadata(tokenId, metaData);\n\n } else {\n revert(\"ERC721Predicate: INVALID_SIGNATURE\");\n }\n }\n}\n" + }, + "contracts/Libraries/matic/root/RootToken/IRootERC721.sol": { + "content": "import {IERC721} from \"@openzeppelin/contracts/token/ERC721/IERC721.sol\";\n\npragma solidity 0.6.6;\n\ninterface IRootERC721 is IERC721 {\n\n // Make sure you implement this method is root ERC721\n // contract when you're interested in transferring\n // metadata from L2 to L1\n function setTokenMetadata(uint256 tokenId, bytes calldata data) external;\n\n}\n" + }, + "contracts/Libraries/matic/root/RootToken/DummyERC721.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {ERC721} from \"@openzeppelin/contracts/token/ERC721/ERC721.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\nimport {NativeMetaTransaction} from \"../../common/NativeMetaTransaction.sol\";\nimport {IRootERC721} from \"./IRootERC721.sol\";\nimport {ContextMixin} from \"../../common/ContextMixin.sol\";\n\ncontract DummyERC721 is\n ERC721,\n AccessControlMixin,\n NativeMetaTransaction,\n IRootERC721,\n ContextMixin\n{\n bytes32 public constant PREDICATE_ROLE = keccak256(\"PREDICATE_ROLE\");\n constructor(string memory name_, string memory symbol_)\n public\n ERC721(name_, symbol_)\n {\n _setupContractId(\"DummyERC721\");\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n _setupRole(PREDICATE_ROLE, _msgSender());\n _initializeEIP712(name_);\n }\n\n function mint(uint256 tokenId) public {\n _mint(_msgSender(), tokenId);\n }\n\n /**\n * If you're attempting to bring metadata associated with token\n * from L2 to L1, you must implement this method\n *\n * To be invoked when attempting to exit ERC721 with metadata from L2\n *\n * `data` is nothing but arbitrary byte array which\n * is brought in L1, by event emitted in L2, during withdraw\n *\n * Make sure this method is always callable by Predicate contract\n * who will invoke it when attempting to exit with metadata\n */\n function setTokenMetadata(uint256 tokenId, bytes calldata data) external override only(PREDICATE_ROLE) {\n // This function should decode metadata obtained from L2\n // and attempt to set it for this `tokenId`\n //\n // Following is just a default implementation, feel\n // free to define your own encoding/ decoding scheme\n // for L2 -> L1 token metadata transfer\n string memory uri = abi.decode(data, (string));\n\n _setTokenURI(tokenId, uri);\n }\n\n function _msgSender()\n internal\n override\n view\n returns (address payable sender)\n {\n return ContextMixin.msgSender();\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC1155/ERC1155.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"./IERC1155.sol\";\nimport \"./IERC1155MetadataURI.sol\";\nimport \"./IERC1155Receiver.sol\";\nimport \"../../utils/Context.sol\";\nimport \"../../introspection/ERC165.sol\";\nimport \"../../math/SafeMath.sol\";\nimport \"../../utils/Address.sol\";\n\n/**\n *\n * @dev Implementation of the basic standard multi-token.\n * See https://eips.ethereum.org/EIPS/eip-1155\n * Originally based on code by Enjin: https://github.com/enjin/erc-1155\n *\n * _Available since v3.1._\n */\ncontract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {\n using SafeMath for uint256;\n using Address for address;\n\n // Mapping from token ID to account balances\n mapping (uint256 => mapping(address => uint256)) private _balances;\n\n // Mapping from account to operator approvals\n mapping (address => mapping(address => bool)) private _operatorApprovals;\n\n // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json\n string private _uri;\n\n /*\n * bytes4(keccak256('balanceOf(address,uint256)')) == 0x00fdd58e\n * bytes4(keccak256('balanceOfBatch(address[],uint256[])')) == 0x4e1273f4\n * bytes4(keccak256('setApprovalForAll(address,bool)')) == 0xa22cb465\n * bytes4(keccak256('isApprovedForAll(address,address)')) == 0xe985e9c5\n * bytes4(keccak256('safeTransferFrom(address,address,uint256,uint256,bytes)')) == 0xf242432a\n * bytes4(keccak256('safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)')) == 0x2eb2c2d6\n *\n * => 0x00fdd58e ^ 0x4e1273f4 ^ 0xa22cb465 ^\n * 0xe985e9c5 ^ 0xf242432a ^ 0x2eb2c2d6 == 0xd9b67a26\n */\n bytes4 private constant _INTERFACE_ID_ERC1155 = 0xd9b67a26;\n\n /*\n * bytes4(keccak256('uri(uint256)')) == 0x0e89341c\n */\n bytes4 private constant _INTERFACE_ID_ERC1155_METADATA_URI = 0x0e89341c;\n\n /**\n * @dev See {_setURI}.\n */\n constructor (string memory uri_) public {\n _setURI(uri_);\n\n // register the supported interfaces to conform to ERC1155 via ERC165\n _registerInterface(_INTERFACE_ID_ERC1155);\n\n // register the supported interfaces to conform to ERC1155MetadataURI via ERC165\n _registerInterface(_INTERFACE_ID_ERC1155_METADATA_URI);\n }\n\n /**\n * @dev See {IERC1155MetadataURI-uri}.\n *\n * This implementation returns the same URI for *all* token types. It relies\n * on the token type ID substitution mechanism\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\n *\n * Clients calling this function must replace the `\\{id\\}` substring with the\n * actual token type ID.\n */\n function uri(uint256) external view virtual override returns (string memory) {\n return _uri;\n }\n\n /**\n * @dev See {IERC1155-balanceOf}.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {\n require(account != address(0), \"ERC1155: balance query for the zero address\");\n return _balances[id][account];\n }\n\n /**\n * @dev See {IERC1155-balanceOfBatch}.\n *\n * Requirements:\n *\n * - `accounts` and `ids` must have the same length.\n */\n function balanceOfBatch(\n address[] memory accounts,\n uint256[] memory ids\n )\n public\n view\n virtual\n override\n returns (uint256[] memory)\n {\n require(accounts.length == ids.length, \"ERC1155: accounts and ids length mismatch\");\n\n uint256[] memory batchBalances = new uint256[](accounts.length);\n\n for (uint256 i = 0; i < accounts.length; ++i) {\n batchBalances[i] = balanceOf(accounts[i], ids[i]);\n }\n\n return batchBalances;\n }\n\n /**\n * @dev See {IERC1155-setApprovalForAll}.\n */\n function setApprovalForAll(address operator, bool approved) public virtual override {\n require(_msgSender() != operator, \"ERC1155: setting approval status for self\");\n\n _operatorApprovals[_msgSender()][operator] = approved;\n emit ApprovalForAll(_msgSender(), operator, approved);\n }\n\n /**\n * @dev See {IERC1155-isApprovedForAll}.\n */\n function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {\n return _operatorApprovals[account][operator];\n }\n\n /**\n * @dev See {IERC1155-safeTransferFrom}.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 id,\n uint256 amount,\n bytes memory data\n )\n public\n virtual\n override\n {\n require(to != address(0), \"ERC1155: transfer to the zero address\");\n require(\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\n \"ERC1155: caller is not owner nor approved\"\n );\n\n address operator = _msgSender();\n\n _beforeTokenTransfer(operator, from, to, _asSingletonArray(id), _asSingletonArray(amount), data);\n\n _balances[id][from] = _balances[id][from].sub(amount, \"ERC1155: insufficient balance for transfer\");\n _balances[id][to] = _balances[id][to].add(amount);\n\n emit TransferSingle(operator, from, to, id, amount);\n\n _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);\n }\n\n /**\n * @dev See {IERC1155-safeBatchTransferFrom}.\n */\n function safeBatchTransferFrom(\n address from,\n address to,\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n )\n public\n virtual\n override\n {\n require(ids.length == amounts.length, \"ERC1155: ids and amounts length mismatch\");\n require(to != address(0), \"ERC1155: transfer to the zero address\");\n require(\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\n \"ERC1155: transfer caller is not owner nor approved\"\n );\n\n address operator = _msgSender();\n\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\n\n for (uint256 i = 0; i < ids.length; ++i) {\n uint256 id = ids[i];\n uint256 amount = amounts[i];\n\n _balances[id][from] = _balances[id][from].sub(\n amount,\n \"ERC1155: insufficient balance for transfer\"\n );\n _balances[id][to] = _balances[id][to].add(amount);\n }\n\n emit TransferBatch(operator, from, to, ids, amounts);\n\n _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);\n }\n\n /**\n * @dev Sets a new URI for all token types, by relying on the token type ID\n * substitution mechanism\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\n *\n * By this mechanism, any occurrence of the `\\{id\\}` substring in either the\n * URI or any of the amounts in the JSON file at said URI will be replaced by\n * clients with the token type ID.\n *\n * For example, the `https://token-cdn-domain/\\{id\\}.json` URI would be\n * interpreted by clients as\n * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`\n * for token type ID 0x4cce0.\n *\n * See {uri}.\n *\n * Because these URIs cannot be meaningfully represented by the {URI} event,\n * this function emits no events.\n */\n function _setURI(string memory newuri) internal virtual {\n _uri = newuri;\n }\n\n /**\n * @dev Creates `amount` tokens of token type `id`, and assigns them to `account`.\n *\n * Emits a {TransferSingle} event.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n * - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\n * acceptance magic value.\n */\n function _mint(address account, uint256 id, uint256 amount, bytes memory data) internal virtual {\n require(account != address(0), \"ERC1155: mint to the zero address\");\n\n address operator = _msgSender();\n\n _beforeTokenTransfer(operator, address(0), account, _asSingletonArray(id), _asSingletonArray(amount), data);\n\n _balances[id][account] = _balances[id][account].add(amount);\n emit TransferSingle(operator, address(0), account, id, amount);\n\n _doSafeTransferAcceptanceCheck(operator, address(0), account, id, amount, data);\n }\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.\n *\n * Requirements:\n *\n * - `ids` and `amounts` must have the same length.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\n * acceptance magic value.\n */\n function _mintBatch(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) internal virtual {\n require(to != address(0), \"ERC1155: mint to the zero address\");\n require(ids.length == amounts.length, \"ERC1155: ids and amounts length mismatch\");\n\n address operator = _msgSender();\n\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\n\n for (uint i = 0; i < ids.length; i++) {\n _balances[ids[i]][to] = amounts[i].add(_balances[ids[i]][to]);\n }\n\n emit TransferBatch(operator, address(0), to, ids, amounts);\n\n _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);\n }\n\n /**\n * @dev Destroys `amount` tokens of token type `id` from `account`\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens of token type `id`.\n */\n function _burn(address account, uint256 id, uint256 amount) internal virtual {\n require(account != address(0), \"ERC1155: burn from the zero address\");\n\n address operator = _msgSender();\n\n _beforeTokenTransfer(operator, account, address(0), _asSingletonArray(id), _asSingletonArray(amount), \"\");\n\n _balances[id][account] = _balances[id][account].sub(\n amount,\n \"ERC1155: burn amount exceeds balance\"\n );\n\n emit TransferSingle(operator, account, address(0), id, amount);\n }\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.\n *\n * Requirements:\n *\n * - `ids` and `amounts` must have the same length.\n */\n function _burnBatch(address account, uint256[] memory ids, uint256[] memory amounts) internal virtual {\n require(account != address(0), \"ERC1155: burn from the zero address\");\n require(ids.length == amounts.length, \"ERC1155: ids and amounts length mismatch\");\n\n address operator = _msgSender();\n\n _beforeTokenTransfer(operator, account, address(0), ids, amounts, \"\");\n\n for (uint i = 0; i < ids.length; i++) {\n _balances[ids[i]][account] = _balances[ids[i]][account].sub(\n amounts[i],\n \"ERC1155: burn amount exceeds balance\"\n );\n }\n\n emit TransferBatch(operator, account, address(0), ids, amounts);\n }\n\n /**\n * @dev Hook that is called before any token transfer. This includes minting\n * and burning, as well as batched variants.\n *\n * The same hook is called on both single and batched variants. For single\n * transfers, the length of the `id` and `amount` arrays will be 1.\n *\n * Calling conditions (for each `id` and `amount` pair):\n *\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * of token type `id` will be transferred to `to`.\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\n * for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\n * will be burned.\n * - `from` and `to` are never both zero.\n * - `ids` and `amounts` have the same, non-zero length.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(\n address operator,\n address from,\n address to,\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n )\n internal\n virtual\n { }\n\n function _doSafeTransferAcceptanceCheck(\n address operator,\n address from,\n address to,\n uint256 id,\n uint256 amount,\n bytes memory data\n )\n private\n {\n if (to.isContract()) {\n try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {\n if (response != IERC1155Receiver(to).onERC1155Received.selector) {\n revert(\"ERC1155: ERC1155Receiver rejected tokens\");\n }\n } catch Error(string memory reason) {\n revert(reason);\n } catch {\n revert(\"ERC1155: transfer to non ERC1155Receiver implementer\");\n }\n }\n }\n\n function _doSafeBatchTransferAcceptanceCheck(\n address operator,\n address from,\n address to,\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n )\n private\n {\n if (to.isContract()) {\n try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (bytes4 response) {\n if (response != IERC1155Receiver(to).onERC1155BatchReceived.selector) {\n revert(\"ERC1155: ERC1155Receiver rejected tokens\");\n }\n } catch Error(string memory reason) {\n revert(reason);\n } catch {\n revert(\"ERC1155: transfer to non ERC1155Receiver implementer\");\n }\n }\n }\n\n function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {\n uint256[] memory array = new uint256[](1);\n array[0] = element;\n\n return array;\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC1155/IERC1155MetadataURI.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.2 <0.8.0;\n\nimport \"./IERC1155.sol\";\n\n/**\n * @dev Interface of the optional ERC1155MetadataExtension interface, as defined\n * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].\n *\n * _Available since v3.1._\n */\ninterface IERC1155MetadataURI is IERC1155 {\n /**\n * @dev Returns the URI for token type `id`.\n *\n * If the `\\{id\\}` substring is present in the URI, it must be replaced by\n * clients with the actual token type ID.\n */\n function uri(uint256 id) external view returns (string memory);\n}\n" + }, + "contracts/Libraries/matic/root/RootToken/DummyMintableERC1155.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {ERC1155} from \"@openzeppelin/contracts/token/ERC1155/ERC1155.sol\";\nimport {IMintableERC1155} from \"./IMintableERC1155.sol\";\nimport {NativeMetaTransaction} from \"../../common/NativeMetaTransaction.sol\";\nimport {ContextMixin} from \"../../common/ContextMixin.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\n\ncontract DummyMintableERC1155 is\n ERC1155,\n AccessControlMixin,\n NativeMetaTransaction,\n ContextMixin,\n IMintableERC1155\n{\n bytes32 public constant PREDICATE_ROLE = keccak256(\"PREDICATE_ROLE\");\n\n constructor(string memory uri_) public ERC1155(uri_) {\n _setupContractId(\"DummyMintableERC1155\");\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n _setupRole(PREDICATE_ROLE, _msgSender());\n\n _initializeEIP712(uri_);\n }\n\n function mint(\n address account,\n uint256 id,\n uint256 amount,\n bytes calldata data\n ) external override only(PREDICATE_ROLE) {\n _mint(account, id, amount, data);\n }\n\n function mintBatch(\n address to,\n uint256[] calldata ids,\n uint256[] calldata amounts,\n bytes calldata data\n ) external override only(PREDICATE_ROLE) {\n _mintBatch(to, ids, amounts, data);\n }\n\n function _msgSender()\n internal\n override\n view\n returns (address payable sender)\n {\n return ContextMixin.msgSender();\n }\n}\n" + }, + "contracts/Libraries/matic/root/RootToken/DummyMintableERC20.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {ERC20} from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport {IMintableERC20} from \"./IMintableERC20.sol\";\nimport {NativeMetaTransaction} from \"../../common/NativeMetaTransaction.sol\";\nimport {ContextMixin} from \"../../common/ContextMixin.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\n\ncontract DummyMintableERC20 is\n ERC20,\n AccessControlMixin,\n NativeMetaTransaction,\n ContextMixin,\n IMintableERC20\n{\n bytes32 public constant PREDICATE_ROLE = keccak256(\"PREDICATE_ROLE\");\n\n constructor(string memory name_, string memory symbol_)\n public\n ERC20(name_, symbol_)\n {\n _setupContractId(\"DummyMintableERC20\");\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n _setupRole(PREDICATE_ROLE, _msgSender());\n\n _mint(_msgSender(), 10**10 * (10**18));\n _initializeEIP712(name_);\n }\n\n /**\n * @dev See {IMintableERC20-mint}.\n */\n function mint(address user, uint256 amount) external override only(PREDICATE_ROLE) {\n _mint(user, amount);\n }\n\n function _msgSender()\n internal\n override\n view\n returns (address payable sender)\n {\n return ContextMixin.msgSender();\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"../../utils/Context.sol\";\nimport \"./IERC20.sol\";\nimport \"../../math/SafeMath.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * We have followed general OpenZeppelin guidelines: functions revert instead\n * of returning `false` on failure. This behavior is nonetheless conventional\n * and does not conflict with the expectations of ERC20 applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20 is Context, IERC20 {\n using SafeMath for uint256;\n\n mapping (address => uint256) private _balances;\n\n mapping (address => mapping (address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n uint8 private _decimals;\n\n /**\n * @dev Sets the values for {name} and {symbol}, initializes {decimals} with\n * a default value of 18.\n *\n * To select a different value for {decimals}, use {_setupDecimals}.\n *\n * All three of these values are immutable: they can only be set once during\n * construction.\n */\n constructor (string memory name_, string memory symbol_) public {\n _name = name_;\n _symbol = symbol_;\n _decimals = 18;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5,05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\n * called.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual returns (uint8) {\n return _decimals;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `recipient` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * Requirements:\n *\n * - `sender` and `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n * - the caller must have allowance for ``sender``'s tokens of at least\n * `amount`.\n */\n function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \"ERC20: transfer amount exceeds allowance\"));\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \"ERC20: decreased allowance below zero\"));\n return true;\n }\n\n /**\n * @dev Moves tokens `amount` from `sender` to `recipient`.\n *\n * This is internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `sender` cannot be the zero address.\n * - `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n */\n function _transfer(address sender, address recipient, uint256 amount) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(sender, recipient, amount);\n\n _balances[sender] = _balances[sender].sub(amount, \"ERC20: transfer amount exceeds balance\");\n _balances[recipient] = _balances[recipient].add(amount);\n emit Transfer(sender, recipient, amount);\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n * the total supply.\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n */\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply = _totalSupply.add(amount);\n _balances[account] = _balances[account].add(amount);\n emit Transfer(address(0), account, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the\n * total supply.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens.\n */\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n _balances[account] = _balances[account].sub(amount, \"ERC20: burn amount exceeds balance\");\n _totalSupply = _totalSupply.sub(amount);\n emit Transfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(address owner, address spender, uint256 amount) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Sets {decimals} to a value other than the default one of 18.\n *\n * WARNING: This function should only be called from the constructor. Most\n * applications that interact with token contracts will not expect\n * {decimals} to ever change, and may work incorrectly if it does.\n */\n function _setupDecimals(uint8 decimals_) internal virtual {\n _decimals = decimals_;\n }\n\n /**\n * @dev Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * will be to transferred to `to`.\n * - when `from` is zero, `amount` tokens will be minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n * - `from` and `to` are never both 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 amount) internal virtual { }\n}\n" + }, + "contracts/Libraries/matic/test/PotatoMigration/RootPotatoMigrator.sol": { + "content": "pragma solidity 0.6.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"../../root/StateSender/IStateSender.sol\";\nimport \"../../root/RootChainManager/IRootChainManager.sol\";\n\n// This contract enables deposit and plant deom single tx on ethereum chain\n// First potatoes are transferred to this contract\n// Then they are deposited to ChildPotatoMigrator contract\n// Then a custom state sync is sent to ChildPotatoMigrator, using this the potatoes will be planted on matic chain\ncontract RootPotatoMigrator {\n IStateSender stateSender;\n IERC20 potato;\n IRootChainManager rootChainManager;\n address erc20Predicate;\n address childPotatoMigrator;\n\n constructor(\n address stateSender_,\n address potato_,\n address rootChainManager_,\n address erc20Predicate_,\n address childPotatoMigrator_\n ) public {\n stateSender = IStateSender(stateSender_);\n potato = IERC20(potato_);\n rootChainManager = IRootChainManager(rootChainManager_);\n erc20Predicate = erc20Predicate_;\n childPotatoMigrator = childPotatoMigrator_;\n }\n\n function plantOnChildFarm(uint amount) external {\n potato.transferFrom(\n msg.sender,\n address(this),\n amount\n );\n\n potato.approve(erc20Predicate, amount);\n\n rootChainManager.depositFor(\n childPotatoMigrator,\n address(potato),\n abi.encode(amount)\n );\n\n stateSender.syncState(\n childPotatoMigrator,\n abi.encode(msg.sender, amount)\n );\n }\n}\n" + }, + "contracts/Libraries/matic/root/StateSender/DummyStateSender.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {IStateSender} from \"../StateSender/IStateSender.sol\";\n\n/**\n* @notice Dummy State Sender contract to simulate plasma state sender while testing\n*/\ncontract DummyStateSender is IStateSender {\n /**\n * @notice Event emitted when when syncState is called\n * @dev Heimdall bridge listens to this event and sends the data to receiver contract on child chain\n * @param id Id of the sync, increamented for each event in case of actual state sender contract\n * @param contractAddress the contract receiving data on child chain\n * @param data bytes data to be sent\n */\n event StateSynced(\n uint256 indexed id,\n address indexed contractAddress,\n bytes data\n );\n\n /**\n * @notice called to send data to child chain\n * @dev sender and receiver contracts need to be registered in case of actual state sender contract\n * @param receiver the contract receiving data on child chain\n * @param data bytes data to be sent\n */\n function syncState(address receiver, bytes calldata data) external override {\n emit StateSynced(1, receiver, data);\n }\n}\n" + }, + "contracts/Libraries/matic/root/MockCheckpointManager.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {SafeMath} from \"@openzeppelin/contracts/math/SafeMath.sol\";\nimport {ICheckpointManager} from \"./ICheckpointManager.sol\";\n\n/**\n* @notice Mock Checkpoint Manager contract to simulate plasma checkpoints while testing\n*/\ncontract MockCheckpointManager is ICheckpointManager {\n using SafeMath for uint256;\n\n uint256 public currentCheckpointNumber = 0;\n\n function setCheckpoint(bytes32 rootHash, uint256 start, uint256 end) public {\n HeaderBlock memory headerBlock = HeaderBlock({\n root: rootHash,\n start: start,\n end: end,\n createdAt: now,\n proposer: msg.sender\n });\n\n currentCheckpointNumber = currentCheckpointNumber.add(1);\n headerBlocks[currentCheckpointNumber] = headerBlock;\n }\n}\n" + }, + "contracts/Libraries/matic/test/PotatoMigration/ChildPotatoMigrator.sol": { + "content": "pragma solidity 0.6.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"../../child/IStateReceiver.sol\";\nimport \"./ChildPotatoFarm.sol\";\n\n// This contract receives the deposit of potatoes from pos bridge\n// then plants the potatoes for user using custom state sync\ncontract ChildPotatoMigrator is IStateReceiver {\n IERC20 potato;\n ChildPotatoFarm farm;\n constructor(address potato_, address farm_) public {\n potato = IERC20(potato_);\n farm = ChildPotatoFarm(farm_);\n }\n\n function onStateReceive(uint, bytes calldata data) external override {\n (address user, uint amount) = abi.decode(data, (address, uint));\n potato.approve(address(farm), amount);\n farm.plantFor(user, amount);\n }\n}\n" + }, + "contracts/Libraries/matic/child/IStateReceiver.sol": { + "content": "pragma solidity 0.6.6;\n\ninterface IStateReceiver {\n function onStateReceive(uint256 id, bytes calldata data) external;\n}\n" + }, + "contracts/Libraries/matic/test/PotatoMigration/ChildPotatoFarm.sol": { + "content": "pragma solidity 0.6.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\n// This is where potatoes are planted to earn harvest\ncontract ChildPotatoFarm {\n IERC20 potato;\n mapping(address => uint) public plantedAmount;\n\n constructor(address potato_) public {\n potato = IERC20(potato_);\n }\n\n function plantFor(address user, uint amount) external {\n plantedAmount[user] += amount;\n potato.transferFrom(msg.sender, address(this), amount);\n }\n}\n" + }, + "contracts/Libraries/matic/child/ChildChainManager/ChildChainManager.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {IChildChainManager} from \"./IChildChainManager.sol\";\nimport {IChildToken} from \"../ChildToken/IChildToken.sol\";\nimport {Initializable} from \"../../common/Initializable.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\nimport {IStateReceiver} from \"../IStateReceiver.sol\";\n\n\ncontract ChildChainManager is\n IChildChainManager,\n Initializable,\n AccessControlMixin,\n IStateReceiver\n{\n bytes32 public constant DEPOSIT = keccak256(\"DEPOSIT\");\n bytes32 public constant MAP_TOKEN = keccak256(\"MAP_TOKEN\");\n bytes32 public constant MAPPER_ROLE = keccak256(\"MAPPER_ROLE\");\n bytes32 public constant STATE_SYNCER_ROLE = keccak256(\"STATE_SYNCER_ROLE\");\n\n mapping(address => address) public rootToChildToken;\n mapping(address => address) public childToRootToken;\n\n function initialize(address _owner) external initializer {\n _setupContractId(\"ChildChainManager\");\n _setupRole(DEFAULT_ADMIN_ROLE, _owner);\n _setupRole(MAPPER_ROLE, _owner);\n _setupRole(STATE_SYNCER_ROLE, _owner);\n }\n\n /**\n * @notice Map a token to enable its movement via the PoS Portal, callable only by mappers\n * Normally mapping should happen automatically using state sync\n * This function should be used only while initial deployment when state sync is not registrered or if it fails\n * @param rootToken address of token on root chain\n * @param childToken address of token on child chain\n */\n function mapToken(address rootToken, address childToken)\n external\n override\n only(MAPPER_ROLE)\n {\n _mapToken(rootToken, childToken);\n }\n\n /**\n * @notice Receive state sync data from root chain, only callable by state syncer\n * @dev state syncing mechanism is used for both depositing tokens and mapping them\n * @param data bytes data from RootChainManager contract\n * `data` is made up of bytes32 `syncType` and bytes `syncData`\n * `syncType` determines if it is deposit or token mapping\n * in case of token mapping, `syncData` is encoded address `rootToken`, address `childToken` and bytes32 `tokenType`\n * in case of deposit, `syncData` is encoded address `user`, address `rootToken` and bytes `depositData`\n * `depositData` is token specific data (amount in case of ERC20). It is passed as is to child token\n */\n function onStateReceive(uint256, bytes calldata data)\n external\n override\n only(STATE_SYNCER_ROLE)\n {\n (bytes32 syncType, bytes memory syncData) = abi.decode(\n data,\n (bytes32, bytes)\n );\n\n if (syncType == DEPOSIT) {\n _syncDeposit(syncData);\n } else if (syncType == MAP_TOKEN) {\n (address rootToken, address childToken, ) = abi.decode(\n syncData,\n (address, address, bytes32)\n );\n _mapToken(rootToken, childToken);\n } else {\n revert(\"ChildChainManager: INVALID_SYNC_TYPE\");\n }\n }\n\n /**\n * @notice Clean polluted token mapping\n * @param rootToken address of token on root chain. Since rename token was introduced later stage,\n * clean method is used to clean pollulated mapping\n */\n function cleanMapToken(\n address rootToken,\n address childToken\n ) external override only(MAPPER_ROLE) {\n rootToChildToken[rootToken] = address(0);\n childToRootToken[childToken] = address(0);\n\n emit TokenMapped(rootToken, childToken);\n }\n\n function _mapToken(address rootToken, address childToken) private {\n address oldChildToken = rootToChildToken[rootToken];\n address oldRootToken = childToRootToken[childToken];\n\n if (rootToChildToken[oldRootToken] != address(0)) {\n rootToChildToken[oldRootToken] = address(0);\n }\n\n if (childToRootToken[oldChildToken] != address(0)) {\n childToRootToken[oldChildToken] = address(0);\n }\n\n rootToChildToken[rootToken] = childToken;\n childToRootToken[childToken] = rootToken;\n\n emit TokenMapped(rootToken, childToken);\n }\n\n function _syncDeposit(bytes memory syncData) private {\n (address user, address rootToken, bytes memory depositData) = abi\n .decode(syncData, (address, address, bytes));\n address childTokenAddress = rootToChildToken[rootToken];\n require(\n childTokenAddress != address(0x0),\n \"ChildChainManager: TOKEN_NOT_MAPPED\"\n );\n IChildToken childTokenContract = IChildToken(childTokenAddress);\n childTokenContract.deposit(user, depositData);\n }\n}\n" + }, + "contracts/Libraries/matic/child/ChildChainManager/IChildChainManager.sol": { + "content": "pragma solidity 0.6.6;\n\ninterface IChildChainManager {\n event TokenMapped(address indexed rootToken, address indexed childToken);\n\n function mapToken(address rootToken, address childToken) external;\n function cleanMapToken(address rootToken, address childToken) external;\n}\n" + }, + "contracts/Libraries/matic/child/ChildToken/IChildToken.sol": { + "content": "pragma solidity 0.6.6;\n\ninterface IChildToken {\n function deposit(address user, bytes calldata depositData) external;\n}\n" + }, + "contracts/Libraries/matic/child/ChildToken/UpgradeableChildERC20/UChildERC20.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {ERC20} from \"./ERC20.sol\";\nimport {AccessControlMixin} from \"../../../common/AccessControlMixin.sol\";\nimport {IChildToken} from \"../IChildToken.sol\";\nimport {NativeMetaTransaction} from \"../../../common/NativeMetaTransaction.sol\";\nimport {ContextMixin} from \"../../../common/ContextMixin.sol\";\n\n\ncontract UChildERC20 is\n ERC20,\n IChildToken,\n AccessControlMixin,\n NativeMetaTransaction,\n ContextMixin\n{\n bytes32 public constant DEPOSITOR_ROLE = keccak256(\"DEPOSITOR_ROLE\");\n\n constructor() public ERC20(\"\", \"\") {}\n\n /**\n * @notice Initialize the contract after it has been proxified\n * @dev meant to be called once immediately after deployment\n */\n function initialize(\n string calldata name_,\n string calldata symbol_,\n uint8 decimals_,\n address childChainManager\n )\n external\n initializer\n {\n setName(name_);\n setSymbol(symbol_);\n setDecimals(decimals_);\n _setupContractId(string(abi.encodePacked(\"Child\", symbol_)));\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n _setupRole(DEPOSITOR_ROLE, childChainManager);\n _initializeEIP712(name_);\n }\n\n // This is to support Native meta transactions\n // never use msg.sender directly, use _msgSender() instead\n function _msgSender()\n internal\n override\n view\n returns (address payable sender)\n {\n return ContextMixin.msgSender();\n }\n\n function changeName(string calldata name_) external only(DEFAULT_ADMIN_ROLE) {\n setName(name_);\n _setDomainSeperator(name_);\n }\n\n /**\n * @notice called when token is deposited on root chain\n * @dev Should be callable only by ChildChainManager\n * Should handle deposit by minting the required amount for user\n * Make sure minting is done only by this function\n * @param user user address for whom deposit is being done\n * @param depositData abi encoded amount\n */\n function deposit(address user, bytes calldata depositData)\n external\n override\n only(DEPOSITOR_ROLE)\n {\n uint256 amount = abi.decode(depositData, (uint256));\n _mint(user, amount);\n }\n\n /**\n * @notice called when user wants to withdraw tokens back to root chain\n * @dev Should burn user's tokens. This transaction will be verified when exiting on root chain\n * @param amount amount of tokens to withdraw\n */\n function withdraw(uint256 amount) external {\n _burn(_msgSender(), amount);\n }\n}\n" + }, + "contracts/Libraries/matic/child/ChildToken/UpgradeableChildERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.6.0;\n\n\nimport \"@openzeppelin/contracts/GSN/Context.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"@openzeppelin/contracts/math/SafeMath.sol\";\nimport \"@openzeppelin/contracts/utils/Address.sol\";\n\n/**\n * Modified openzeppelin implemtation to add setters for name, symbol and decimals.\n * This was needed because the variables cannot be set in constructor as the contract is upgradeable.\n */\n\n/**\n * @dev openzeppelin Implementation of the {IERC20} interface.\n *\n * Modified to add setters for name, symbol and decimals. This was needed\n * because\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * We have followed general OpenZeppelin guidelines: functions revert instead\n * of returning `false` on failure. This behavior is nonetheless conventional\n * and does not conflict with the expectations of ERC20 applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20 is Context, IERC20 {\n using SafeMath for uint256;\n using Address for address;\n\n mapping (address => uint256) private _balances;\n\n mapping (address => mapping (address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n uint8 private _decimals;\n\n /**\n * @dev Sets the values for {name} and {symbol}, initializes {decimals} with\n * a default value of 18.\n *\n * To select a different value for {decimals}, use {_setupDecimals}.\n *\n * All three of these values are immutable: they can only be set once during\n * construction.\n */\n constructor (string memory name, string memory symbol) public {\n _name = name;\n _symbol = symbol;\n _decimals = 18;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view returns (string memory) {\n return _name;\n }\n\n function setName(string memory newName) internal {\n _name = newName;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function setSymbol(string memory newSymbol) internal {\n _symbol = newSymbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5,05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\n * called.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n function setDecimals(uint8 newDecimals) internal {\n _decimals = newDecimals;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `recipient` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20};\n *\n * Requirements:\n * - `sender` and `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n * - the caller must have allowance for ``sender``'s tokens of at least\n * `amount`.\n */\n function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \"ERC20: transfer amount exceeds allowance\"));\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \"ERC20: decreased allowance below zero\"));\n return true;\n }\n\n /**\n * @dev Moves tokens `amount` from `sender` to `recipient`.\n *\n * This is internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `sender` cannot be the zero address.\n * - `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n */\n function _transfer(address sender, address recipient, uint256 amount) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(sender, recipient, amount);\n\n _balances[sender] = _balances[sender].sub(amount, \"ERC20: transfer amount exceeds balance\");\n _balances[recipient] = _balances[recipient].add(amount);\n emit Transfer(sender, recipient, amount);\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n * the total supply.\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * Requirements\n *\n * - `to` cannot be the zero address.\n */\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply = _totalSupply.add(amount);\n _balances[account] = _balances[account].add(amount);\n emit Transfer(address(0), account, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the\n * total supply.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * Requirements\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens.\n */\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n _balances[account] = _balances[account].sub(amount, \"ERC20: burn amount exceeds balance\");\n _totalSupply = _totalSupply.sub(amount);\n emit Transfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.\n *\n * This is internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(address owner, address spender, uint256 amount) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Sets {decimals} to a value other than the default one of 18.\n *\n * WARNING: This function should only be called from the constructor. Most\n * applications that interact with token contracts will not expect\n * {decimals} to ever change, and may work incorrectly if it does.\n */\n function _setupDecimals(uint8 decimals_) internal {\n _decimals = decimals_;\n }\n\n /**\n * @dev Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * will be to transferred to `to`.\n * - when `from` is zero, `amount` tokens will be minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n * - `from` and `to` are never both 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 amount) internal virtual { }\n}\n" + }, + "@openzeppelin/contracts/GSN/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"../utils/Context.sol\";\n" + }, + "contracts/Libraries/matic/test/TestUChildERC20.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {UChildERC20} from \"../child/ChildToken/UpgradeableChildERC20/UChildERC20.sol\";\n\ncontract TestUChildERC20 is UChildERC20 {\n function magic() external pure returns (string memory) {\n return \"magic\";\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/SafeERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"./IERC20.sol\";\nimport \"../../math/SafeMath.sol\";\nimport \"../../utils/Address.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using SafeMath for uint256;\n using Address for address;\n\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n /**\n * @dev Deprecated. This function has issues similar to the ones found in\n * {IERC20-approve}, and its usage is discouraged.\n *\n * Whenever possible, use {safeIncreaseAllowance} and\n * {safeDecreaseAllowance} instead.\n */\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n // solhint-disable-next-line max-line-length\n require((value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \"SafeERC20: decreased allowance below zero\");\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\n // the target address contains contract code and also asserts for success in the low-level call.\n\n bytes memory returndata = address(token).functionCall(data, \"SafeERC20: low-level call failed\");\n if (returndata.length > 0) { // Return data is optional\n // solhint-disable-next-line max-line-length\n require(abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n }\n}\n" + }, + "contracts/Libraries/matic/root/TokenPredicates/ERC20Predicate.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {SafeERC20} from \"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\nimport {RLPReader} from \"../../lib/RLPReader.sol\";\nimport {ITokenPredicate} from \"./ITokenPredicate.sol\";\nimport {Initializable} from \"../../common/Initializable.sol\";\n\ncontract ERC20Predicate is ITokenPredicate, AccessControlMixin, Initializable {\n using RLPReader for bytes;\n using RLPReader for RLPReader.RLPItem;\n using SafeERC20 for IERC20;\n\n bytes32 public constant MANAGER_ROLE = keccak256(\"MANAGER_ROLE\");\n bytes32 public constant TOKEN_TYPE = keccak256(\"ERC20\");\n bytes32 public constant TRANSFER_EVENT_SIG = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef;\n\n event LockedERC20(\n address indexed depositor,\n address indexed depositReceiver,\n address indexed rootToken,\n uint256 amount\n );\n\n constructor() public {}\n\n function initialize(address _owner) external initializer {\n _setupContractId(\"ERC20Predicate\");\n _setupRole(DEFAULT_ADMIN_ROLE, _owner);\n _setupRole(MANAGER_ROLE, _owner);\n }\n\n /**\n * @notice Lock ERC20 tokens for deposit, callable only by manager\n * @param depositor Address who wants to deposit tokens\n * @param depositReceiver Address (address) who wants to receive tokens on child chain\n * @param rootToken Token which gets deposited\n * @param depositData ABI encoded amount\n */\n function lockTokens(\n address depositor,\n address depositReceiver,\n address rootToken,\n bytes calldata depositData\n )\n external\n override\n only(MANAGER_ROLE)\n {\n uint256 amount = abi.decode(depositData, (uint256));\n emit LockedERC20(depositor, depositReceiver, rootToken, amount);\n IERC20(rootToken).safeTransferFrom(depositor, address(this), amount);\n }\n\n /**\n * @notice Validates log signature, from and to address\n * then sends the correct amount to withdrawer\n * callable only by manager\n * @param rootToken Token which gets withdrawn\n * @param log Valid ERC20 burn log from child chain\n */\n function exitTokens(\n address,\n address rootToken,\n bytes memory log\n )\n public\n override\n only(MANAGER_ROLE)\n {\n RLPReader.RLPItem[] memory logRLPList = log.toRlpItem().toList();\n RLPReader.RLPItem[] memory logTopicRLPList = logRLPList[1].toList(); // topics\n\n require(\n bytes32(logTopicRLPList[0].toUint()) == TRANSFER_EVENT_SIG, // topic0 is event sig\n \"ERC20Predicate: INVALID_SIGNATURE\"\n );\n\n address withdrawer = address(logTopicRLPList[1].toUint()); // topic1 is from address\n\n require(\n address(logTopicRLPList[2].toUint()) == address(0), // topic2 is to address\n \"ERC20Predicate: INVALID_RECEIVER\"\n );\n\n IERC20(rootToken).safeTransfer(\n withdrawer,\n logRLPList[2].toUint() // log data field\n );\n }\n}\n" + }, + "contracts/test/MockLink.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\n\nabstract contract ERC677Receiver {\n function onTokenTransfer(\n address _sender,\n uint256 _value,\n bytes memory _data\n ) public virtual;\n}\n\ncontract MockLink is ERC20 {\n event Transfer(address indexed from, address indexed to, uint256 value, bytes data);\n\n constructor() public ERC20(\"MockLink\", \"LINK\") {\n _mint(msg.sender, 100 * 10**18);\n }\n\n function transferAndCall(\n address _to,\n uint256 _value,\n bytes memory _data\n ) public virtual returns (bool success) {\n super.transfer(_to, _value);\n emit Transfer(msg.sender, _to, _value, _data);\n if (isContract(_to)) {\n contractFallback(_to, _value, _data);\n }\n return true;\n }\n\n function isContract(address _addr) private view returns (bool hasCode) {\n uint256 length;\n assembly {\n length := extcodesize(_addr)\n }\n return length > 0;\n }\n\n function contractFallback(\n address _to,\n uint256 _value,\n bytes memory _data\n ) private {\n ERC677Receiver receiver = ERC677Receiver(_to);\n receiver.onTokenTransfer(msg.sender, _value, _data);\n }\n}\n" + }, + "contracts/Libraries/matic/test/PotatoMigration/RootPotatoToken.sol": { + "content": "pragma solidity 0.6.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\n\n// These are the potatoes on Ethereum chain\ncontract RootPotatoToken is ERC20 {\n constructor() public ERC20(\"Potato\", \"PTT\") {}\n\n function mint(uint256 amount) public {\n _mint(msg.sender, amount);\n }\n}\n" + }, + "contracts/Libraries/matic/root/RootToken/DummyERC20.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {ERC20} from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport {NativeMetaTransaction} from \"../../common/NativeMetaTransaction.sol\";\nimport {ContextMixin} from \"../../common/ContextMixin.sol\";\n\ncontract DummyERC20 is\n ERC20,\n NativeMetaTransaction,\n ContextMixin\n{\n constructor(string memory name_, string memory symbol_)\n public\n ERC20(name_, symbol_)\n {\n uint256 amount = 10**10 * (10**18);\n _mint(_msgSender(), amount);\n _initializeEIP712(name_);\n }\n\n function mint(uint256 amount) public {\n _mint(_msgSender(), amount);\n }\n\n function _msgSender()\n internal\n override\n view\n returns (address payable sender)\n {\n return ContextMixin.msgSender();\n }\n}\n" + }, + "contracts/Libraries/matic/child/ChildToken/ChildMintableERC20.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {ERC20} from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\nimport {IChildToken} from \"./IChildToken.sol\";\nimport {NativeMetaTransaction} from \"../../common/NativeMetaTransaction.sol\";\nimport {ContextMixin} from \"../../common/ContextMixin.sol\";\n\n\ncontract ChildMintableERC20 is\n ERC20,\n IChildToken,\n AccessControlMixin,\n NativeMetaTransaction,\n ContextMixin\n{\n bytes32 public constant DEPOSITOR_ROLE = keccak256(\"DEPOSITOR_ROLE\");\n\n constructor(\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address childChainManager\n ) public ERC20(name_, symbol_) {\n _setupContractId(\"ChildMintableERC20\");\n _setupDecimals(decimals_);\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n _setupRole(DEPOSITOR_ROLE, childChainManager);\n _initializeEIP712(name_);\n }\n\n // This is to support Native meta transactions\n // never use msg.sender directly, use _msgSender() instead\n function _msgSender()\n internal\n override\n view\n returns (address payable sender)\n {\n return ContextMixin.msgSender();\n }\n\n /**\n * @notice called when token is deposited on root chain\n * @dev Should be callable only by ChildChainManager\n * Should handle deposit by minting the required amount for user\n * Make sure minting is done only by this function\n * @param user user address for whom deposit is being done\n * @param depositData abi encoded amount\n */\n function deposit(address user, bytes calldata depositData)\n external\n override\n only(DEPOSITOR_ROLE)\n {\n uint256 amount = abi.decode(depositData, (uint256));\n _mint(user, amount);\n }\n\n /**\n * @notice called when user wants to withdraw tokens back to root chain\n * @dev Should burn user's tokens. This transaction will be verified when exiting on root chain\n * @param amount amount of tokens to withdraw\n */\n function withdraw(uint256 amount) external {\n _burn(_msgSender(), amount);\n }\n\n /**\n * @notice Example function to handle minting tokens on matic chain\n * @dev Minting can be done as per requirement,\n * This implementation allows only admin to mint tokens but it can be changed as per requirement\n * @param user user for whom tokens are being minted\n * @param amount amount of token to mint\n */\n function mint(address user, uint256 amount) public only(DEFAULT_ADMIN_ROLE) {\n _mint(user, amount);\n }\n}\n" + }, + "contracts/Libraries/matic/child/ChildToken/ChildERC20.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {ERC20} from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\nimport {IChildToken} from \"./IChildToken.sol\";\nimport {NativeMetaTransaction} from \"../../common/NativeMetaTransaction.sol\";\nimport {ContextMixin} from \"../../common/ContextMixin.sol\";\n\n\ncontract ChildERC20 is\n ERC20,\n IChildToken,\n AccessControlMixin,\n NativeMetaTransaction,\n ContextMixin\n{\n bytes32 public constant DEPOSITOR_ROLE = keccak256(\"DEPOSITOR_ROLE\");\n\n constructor(\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address childChainManager\n ) public ERC20(name_, symbol_) {\n _setupContractId(\"ChildERC20\");\n _setupDecimals(decimals_);\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n _setupRole(DEPOSITOR_ROLE, childChainManager);\n _initializeEIP712(name_);\n }\n\n // This is to support Native meta transactions\n // never use msg.sender directly, use _msgSender() instead\n function _msgSender()\n internal\n override\n view\n returns (address payable sender)\n {\n return ContextMixin.msgSender();\n }\n\n /**\n * @notice called when token is deposited on root chain\n * @dev Should be callable only by ChildChainManager\n * Should handle deposit by minting the required amount for user\n * Make sure minting is done only by this function\n * @param user user address for whom deposit is being done\n * @param depositData abi encoded amount\n */\n function deposit(address user, bytes calldata depositData)\n external\n override\n only(DEPOSITOR_ROLE)\n {\n uint256 amount = abi.decode(depositData, (uint256));\n _mint(user, amount);\n }\n\n /**\n * @notice called when user wants to withdraw tokens back to root chain\n * @dev Should burn user's tokens. This transaction will be verified when exiting on root chain\n * @param amount amount of tokens to withdraw\n */\n function withdraw(uint256 amount) external {\n _burn(_msgSender(), amount);\n }\n}\n" + }, + "contracts/Libraries/matic/test/PotatoMigration/ChildPotatoToken.sol": { + "content": "pragma solidity 0.6.6;\n\nimport \"../../child/ChildToken/ChildERC20.sol\";\n\n// These are the potatoes on Matic chain\ncontract ChildPotatoToken is ChildERC20 {\n constructor(address childChainManager) public ChildERC20(\"Potato\", \"PTT\", 18, childChainManager) {}\n}\n" + }, + "contracts/Libraries/matic/child/ChildToken/MaticWETH.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {ChildERC20} from \"./ChildERC20.sol\";\n\ncontract MaticWETH is ChildERC20 {\n constructor(address childChainManager) public ChildERC20(\"Wrapped Ether\", \"WETH\", 18, childChainManager) {}\n}\n" + }, + "contracts/CryptOrchidERC721/CryptOrchidERC721.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.6 <0.9.0;\n\nimport \"@chainlink/contracts/src/v0.6/VRFConsumerBase.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts/presets/ERC721PresetMinterPauserAutoId.sol\";\nimport \"@openzeppelin/contracts/utils/Counters.sol\";\nimport \"../Libraries/CurrentTime.sol\";\n\ncontract CryptOrchidERC721 is ERC721PresetMinterPauserAutoId, Ownable, VRFConsumerBase, CurrentTime {\n using SafeMathChainlink for uint256;\n using Strings for string;\n using Counters for Counters.Counter;\n\n struct CryptOrchid {\n string species;\n uint256 plantedAt;\n uint256 waterLevel;\n }\n mapping(uint256 => CryptOrchid) public cryptorchids;\n\n enum Stage {Unsold, Seed, Flower, Dead}\n\n bool internal saleStarted = false;\n bool internal growingStarted = false;\n\n uint256 public constant MAX_CRYPTORCHIDS = 10000;\n uint256 public constant GROWTH_CYCLE = 604800; // 7 days\n uint256 public constant WATERING_WINDOW = 10800; // 3 hours\n uint256 internal constant MAX_TIMESTAMP = 2**256 - 1;\n string internal constant GRANUM_IPFS = \"QmWd1mn7DuGyx9ByfNeqCsgdSUsJZ1cragitgaygsqDvEm\";\n\n uint16[10] private limits = [0, 3074, 6074, 8074, 9074, 9574, 9824, 9924, 9974, 9999];\n string[10] private genum = [\n \"shenzhenica orchidaceae\",\n \"phalaenopsis micholitzii\",\n \"guarianthe aurantiaca\",\n \"vanda coerulea\",\n \"cypripedium calceolus\",\n \"paphiopedilum vietnamense\",\n \"miltonia kayasimae\",\n \"platanthera azorica\",\n \"dendrophylax lindenii\",\n \"paphiopedilum rothschildianum\"\n ];\n\n string[10] private speciesIPFSConstant = [\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/shenzhenica-orchidaceae.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/phalaenopsis-micholitzii.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/guarianthe-aurantiaca.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/vanda-coerulea.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/cypripedium-calceolus.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/paphiopedilum-vietnamense.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/miltonia-kayasimae.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/platanthera-azorica.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/dendrophylax-lindenii.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/paphiopedilum-rothschildianum.json\"\n ];\n\n string[10] private deadSpeciesIPFSConstant = [\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/shenzhenica-orchidaceae.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/phalaenopsis-micholitzii.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/guarianthe-aurantiaca.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/vanda-coerulea.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/cypripedium-calceolus.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/paphiopedilum-vietnamense.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/miltonia-kayasimae.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/platanthera-azorica.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/dendrophylax-lindenii.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/paphiopedilum-rothschildianum.json\"\n ];\n\n Counters.Counter private _tokenIds;\n\n bytes32 internal keyHash;\n uint256 internal vrfFee;\n uint256 public randomResult;\n address public VRFCoordinator;\n address public LinkToken;\n\n event RequestedRandomness(bytes32 requestId);\n event Planted(uint256 tokenId, string latinSpecies, uint256 timestamp, address tokenOwner);\n event Watered(uint256 tokenId, uint256 waterLevel);\n event Killed(uint256 tokenId);\n\n mapping(bytes32 => uint256) public requestToToken;\n mapping(bytes32 => string) private speciesIPFS;\n mapping(bytes32 => string) private deadSpeciesIPFS;\n\n constructor(\n address _VRFCoordinator,\n address _LinkToken,\n bytes32 _keyhash\n )\n public\n payable\n VRFConsumerBase(_VRFCoordinator, _LinkToken)\n ERC721PresetMinterPauserAutoId(\"CryptOrchids\", \"ORCHD\", \"ipfs://\")\n {\n VRFCoordinator = _VRFCoordinator;\n LinkToken = _LinkToken;\n keyHash = _keyhash;\n vrfFee = 2000000000000000000; // 2 LINK\n\n for (uint256 index = 0; index < genum.length; index++) {\n speciesIPFS[keccak256(abi.encode(genum[index]))] = speciesIPFSConstant[index];\n deadSpeciesIPFS[keccak256(abi.encode(genum[index]))] = deadSpeciesIPFSConstant[index];\n }\n }\n\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\n (string memory species, , , ) = getTokenMetadata(tokenId);\n\n if (growthStage(tokenId) == Stage.Seed) {\n return string(abi.encodePacked(baseURI(), GRANUM_IPFS));\n }\n\n if (growthStage(tokenId) == Stage.Flower) {\n return string(abi.encodePacked(baseURI(), speciesIPFS[keccak256(abi.encode(species))]));\n }\n\n return string(abi.encodePacked(baseURI(), deadSpeciesIPFS[keccak256(abi.encode(species))]));\n }\n\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 tokenId\n ) internal virtual override {\n require(address(0) == to || alive(tokenId), \"Dead CryptOrchids cannot be transferred\");\n super._beforeTokenTransfer(from, to, tokenId);\n }\n\n function currentPrice() public view returns (uint256 price) {\n uint256 currentSupply = totalSupply();\n if (currentSupply >= 9900) {\n return 1000000000000000000; // 9900+: 1.00 ETH\n } else if (currentSupply >= 9500) {\n return 640000000000000000; // 9500-9500: 0.64 ETH\n } else if (currentSupply >= 7500) {\n return 320000000000000000; // 7500-9500: 0.32 ETH\n } else if (currentSupply >= 3500) {\n return 160000000000000000; // 3500-7500: 0.16 ETH\n } else if (currentSupply >= 1500) {\n return 80000000000000000; // 1500-3500: 0.08 ETH\n } else if (currentSupply >= 500) {\n return 60000000000000000; // 500-1500: 0.06 ETH\n } else {\n return 40000000000000000; // 0 - 500 0.04 ETH\n }\n }\n\n function startSale() public onlyOwner {\n saleStarted = true;\n }\n\n function startGrowing() public onlyOwner {\n growingStarted = true;\n }\n\n /**\n * @dev Withdraw ether from this contract (Callable by owner only)\n */\n function withdraw() public onlyOwner {\n uint256 balance = address(this).balance;\n msg.sender.transfer(balance);\n }\n\n receive() external payable {}\n\n function webMint(uint256 units) public payable {\n require(saleStarted, \"The Nursery is closed\");\n require(units <= MAX_CRYPTORCHIDS - totalSupply(), \"Not enough bulbs left\");\n require(totalSupply() < MAX_CRYPTORCHIDS, \"Sale has already ended\");\n require(units > 0 && units <= 20, \"You can plant minimum 1, maximum 20 CryptOrchids\");\n require(SafeMathChainlink.add(totalSupply(), units) <= MAX_CRYPTORCHIDS, \"Exceeds MAX_CRYPTORCHIDS\");\n require(msg.value >= SafeMathChainlink.mul(currentPrice(), units), \"Ether value sent is below the price\");\n\n for (uint256 i = 0; i < units; i++) {\n _tokenIds.increment();\n uint256 newItemId = _tokenIds.current();\n cryptorchids[newItemId] = CryptOrchid({species: \"granum\", plantedAt: MAX_TIMESTAMP, waterLevel: 0});\n _safeMint(msg.sender, newItemId);\n }\n }\n\n function germinate(uint256 tokenId, uint256 userProvidedSeed) public {\n require(growingStarted, \"Germination starts 2021-04-12T16:00:00Z\");\n require(_isApprovedOrOwner(_msgSender(), tokenId), \"Only the Owner can germinate a CryptOrchid.\");\n _requestRandom(tokenId, userProvidedSeed);\n }\n\n function _requestRandom(uint256 tokenId, uint256 userProvidedSeed) internal returns (bytes32 requestId) {\n require(LINK.balanceOf(address(this)) >= vrfFee, \"Not enough LINK - germination unavailable\");\n requestId = requestRandomness(keyHash, vrfFee, userProvidedSeed);\n requestToToken[requestId] = tokenId;\n emit RequestedRandomness(requestId);\n }\n\n function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override {\n uint256 tokenId = requestToToken[requestId];\n CryptOrchid storage orchid = cryptorchids[tokenId];\n string memory species = pickSpecies(SafeMathChainlink.mod(randomness, 10000));\n orchid.species = species;\n orchid.plantedAt = currentTime();\n address tokenOwner = ownerOf(tokenId);\n emit Planted(tokenId, species, currentTime(), tokenOwner);\n }\n\n function alive(uint256 tokenId) public view returns (bool) {\n return growthStage(tokenId) != Stage.Dead;\n }\n\n function flowering(uint256 tokenId) public view returns (bool) {\n return growthStage(tokenId) == Stage.Flower;\n }\n\n function growthStage(uint256 tokenId) public view returns (Stage) {\n CryptOrchid memory orchid = cryptorchids[tokenId];\n if (orchid.plantedAt == 0) return Stage.Unsold;\n if (orchid.plantedAt == MAX_TIMESTAMP) return Stage.Seed;\n uint256 currentWaterLevel = orchid.waterLevel;\n uint256 elapsed = currentTime() - orchid.plantedAt;\n uint256 fullCycles = SafeMathChainlink.div(uint256(elapsed), GROWTH_CYCLE);\n uint256 modulo = SafeMathChainlink.mod(elapsed, GROWTH_CYCLE);\n\n if (currentWaterLevel == fullCycles) {\n return Stage.Flower;\n }\n\n if (SafeMathChainlink.add(currentWaterLevel, 1) == fullCycles && modulo < WATERING_WINDOW) {\n return Stage.Flower;\n }\n\n return Stage.Dead;\n }\n\n function water(uint256 tokenId) public {\n require(_isApprovedOrOwner(_msgSender(), tokenId), \"Only the Owner can water a CryptOrchid.\");\n\n if (!alive(tokenId)) {\n emit Killed(tokenId);\n return;\n }\n\n CryptOrchid storage orchid = cryptorchids[tokenId];\n\n uint256 wateringLevel = orchid.waterLevel;\n uint256 elapsed = currentTime() - orchid.plantedAt;\n uint256 fullCycles = SafeMathChainlink.div(uint256(elapsed), GROWTH_CYCLE);\n\n if (wateringLevel > fullCycles) {\n emit Killed(tokenId);\n return;\n }\n\n uint256 newWaterLevel = SafeMathChainlink.add(wateringLevel, 1);\n orchid.waterLevel = newWaterLevel;\n\n emit Watered(tokenId, newWaterLevel);\n }\n\n function compost(uint256 tokenId) public {\n require(_isApprovedOrOwner(_msgSender(), tokenId), \"Only the Owner can compost a CryptOrchid.\");\n\n burn(tokenId);\n }\n\n function getTokenMetadata(uint256 tokenId)\n public\n view\n returns (\n string memory,\n uint256,\n uint256,\n Stage\n )\n {\n return (\n cryptorchids[tokenId].species,\n cryptorchids[tokenId].plantedAt,\n cryptorchids[tokenId].waterLevel,\n growthStage(tokenId)\n );\n }\n\n function heartbeat(uint256 tokenId) public {\n if (growthStage(tokenId) == Stage.Dead) {\n emit Killed(tokenId);\n }\n }\n\n /**\n * @notice Pick species for random number index\n * @param randomIndex uint256\n * @return species string\n */\n function pickSpecies(uint256 randomIndex) private view returns (string memory) {\n for (uint256 i = 0; i < 10; i++) {\n if (randomIndex <= limits[i]) {\n return genum[i];\n }\n }\n }\n}\n" + }, + "contracts/test/CryptorchidsMock.sol": { + "content": "pragma solidity >=0.6.6 <0.9.0;\n// import \"hardhat/console.sol\";\n\nimport \"../CryptOrchidERC721/CryptOrchidERC721.sol\";\n\ncontract CryptOrchidsMock is CryptOrchidERC721 {\n uint256 internal secondsToAdd = 0;\n\n constructor(\n address _VRFCoordinator,\n address _LinkToken,\n bytes32 _keyhash\n ) public CryptOrchidERC721(_VRFCoordinator, _LinkToken, _keyhash) {}\n\n function timeTravel(uint256 s) public {\n secondsToAdd = s;\n }\n\n function currentTime() internal view virtual override returns (uint256) {\n return block.timestamp + secondsToAdd;\n }\n}\n" + }, + "@chainlink/contracts/src/v0.6/tests/VRFCoordinatorMock.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.6.6;\n\nimport \"../interfaces/LinkTokenInterface.sol\";\nimport \"../VRFConsumerBase.sol\";\n\ncontract VRFCoordinatorMock {\n\n LinkTokenInterface public LINK;\n\n event RandomnessRequest(address indexed sender, bytes32 indexed keyHash, uint256 indexed seed);\n\n constructor(address linkAddress) public {\n LINK = LinkTokenInterface(linkAddress);\n }\n\n function onTokenTransfer(address sender, uint256 fee, bytes memory _data)\n public\n onlyLINK\n {\n (bytes32 keyHash, uint256 seed) = abi.decode(_data, (bytes32, uint256));\n emit RandomnessRequest(sender, keyHash, seed);\n }\n\n function callBackWithRandomness(\n bytes32 requestId,\n uint256 randomness,\n address consumerContract\n ) public {\n VRFConsumerBase v;\n bytes memory resp = abi.encodeWithSelector(v.rawFulfillRandomness.selector, requestId, randomness);\n uint256 b = 206000;\n require(gasleft() >= b, \"not enough gas for consumer\");\n (bool success,) = consumerContract.call(resp);\n }\n\n modifier onlyLINK() {\n require(msg.sender == address(LINK), \"Must use LINK token\");\n _;\n }\n}" + }, + "contracts/test/VRFCoordinatorMock.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.0;\n\nimport \"@chainlink/contracts/src/v0.6/tests/VRFCoordinatorMock.sol\";\n" + }, + "contracts/Libraries/matic/child/ChildToken/DappTokens/UChildDAI.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {UChildERC20} from \"../UpgradeableChildERC20/UChildERC20.sol\";\n\ncontract UChildDAI is UChildERC20 {\n // bytes32 public constant PERMIT_TYPEHASH = keccak256(\"Permit(address holder,address spender,uint256 nonce,uint256 expiry,bool allowed)\");\n bytes32 public constant PERMIT_TYPEHASH = 0xea2aa0a1be11a07ed86d755c93467f4f82362b452371d1ba94d1715123511acb;\n\n // --- Alias ---\n function push(address usr, uint wad) external {\n transferFrom(msg.sender, usr, wad);\n }\n function pull(address usr, uint wad) external {\n transferFrom(usr, msg.sender, wad);\n }\n function move(address src, address dst, uint wad) external {\n transferFrom(src, dst, wad);\n }\n\n // --- Approve by signature ---\n function permit(\n address holder,\n address spender,\n uint256 nonce,\n uint256 expiry,\n bool allowed,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external {\n bytes32 digest = keccak256(\n abi.encodePacked(\n \"\\x19\\x01\",\n getDomainSeperator(),\n keccak256(\n abi.encode(\n PERMIT_TYPEHASH,\n holder,\n spender,\n nonce,\n expiry,\n allowed\n )\n )\n ));\n\n require(holder == ecrecover(digest, v, r, s), \"UChildDAI: INVALID-PERMIT\");\n require(expiry == 0 || now <= expiry, \"UChildDAI: PERMIT-EXPIRED\");\n require(nonce == nonces[holder]++, \"UChildDAI: INVALID-NONCE\");\n require(msg.sender != address(this), \"UChildDAI: PERMIT_META_TX_DISABLED\");\n uint wad = allowed ? uint(-1) : 0;\n _approve(holder, spender, wad);\n }\n}\n" + }, + "contracts/Libraries/matic/child/ChildToken/ChildMintableERC721.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {ERC721} from \"@openzeppelin/contracts/token/ERC721/ERC721.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\nimport {IChildToken} from \"./IChildToken.sol\";\nimport {NativeMetaTransaction} from \"../../common/NativeMetaTransaction.sol\";\nimport {ContextMixin} from \"../../common/ContextMixin.sol\";\n\n\ncontract ChildMintableERC721 is\n ERC721,\n IChildToken,\n AccessControlMixin,\n NativeMetaTransaction,\n ContextMixin\n{\n bytes32 public constant DEPOSITOR_ROLE = keccak256(\"DEPOSITOR_ROLE\");\n mapping (uint256 => bool) public withdrawnTokens;\n\n // limit batching of tokens due to gas limit restrictions\n uint256 public constant BATCH_LIMIT = 20;\n\n event WithdrawnBatch(address indexed user, uint256[] tokenIds);\n event TransferWithMetadata(address indexed from, address indexed to, uint256 indexed tokenId, bytes metaData);\n\n constructor(\n string memory name_,\n string memory symbol_,\n address childChainManager\n ) public ERC721(name_, symbol_) {\n _setupContractId(\"ChildMintableERC721\");\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n _setupRole(DEPOSITOR_ROLE, childChainManager);\n _initializeEIP712(name_);\n }\n\n // This is to support Native meta transactions\n // never use msg.sender directly, use _msgSender() instead\n function _msgSender()\n internal\n override\n view\n returns (address payable sender)\n {\n return ContextMixin.msgSender();\n }\n\n /**\n * @notice called when token is deposited on root chain\n * @dev Should be callable only by ChildChainManager\n * Should handle deposit by minting the required tokenId(s) for user\n * Should set `withdrawnTokens` mapping to `false` for the tokenId being deposited\n * Minting can also be done by other functions\n * @param user user address for whom deposit is being done\n * @param depositData abi encoded tokenIds. Batch deposit also supported.\n */\n function deposit(address user, bytes calldata depositData)\n external\n override\n only(DEPOSITOR_ROLE)\n {\n\n // deposit single\n if (depositData.length == 32) {\n uint256 tokenId = abi.decode(depositData, (uint256));\n withdrawnTokens[tokenId] = false;\n _mint(user, tokenId);\n\n // deposit batch\n } else {\n uint256[] memory tokenIds = abi.decode(depositData, (uint256[]));\n uint256 length = tokenIds.length;\n for (uint256 i; i < length; i++) {\n withdrawnTokens[tokenIds[i]] = false;\n _mint(user, tokenIds[i]);\n }\n }\n\n }\n\n /**\n * @notice called when user wants to withdraw token back to root chain\n * @dev Should handle withraw by burning user's token.\n * Should set `withdrawnTokens` mapping to `true` for the tokenId being withdrawn\n * This transaction will be verified when exiting on root chain\n * @param tokenId tokenId to withdraw\n */\n function withdraw(uint256 tokenId) external {\n require(_msgSender() == ownerOf(tokenId), \"ChildMintableERC721: INVALID_TOKEN_OWNER\");\n withdrawnTokens[tokenId] = true;\n _burn(tokenId);\n }\n\n /**\n * @notice called when user wants to withdraw multiple tokens back to root chain\n * @dev Should burn user's tokens. This transaction will be verified when exiting on root chain\n * @param tokenIds tokenId list to withdraw\n */\n function withdrawBatch(uint256[] calldata tokenIds) external {\n\n uint256 length = tokenIds.length;\n require(length <= BATCH_LIMIT, \"ChildMintableERC721: EXCEEDS_BATCH_LIMIT\");\n\n // Iteratively burn ERC721 tokens, for performing\n // batch withdraw\n for (uint256 i; i < length; i++) {\n\n uint256 tokenId = tokenIds[i];\n\n require(_msgSender() == ownerOf(tokenId), string(abi.encodePacked(\"ChildMintableERC721: INVALID_TOKEN_OWNER \", tokenId)));\n withdrawnTokens[tokenId] = true;\n _burn(tokenId);\n\n }\n\n // At last emit this event, which will be used\n // in MintableERC721 predicate contract on L1\n // while verifying burn proof\n emit WithdrawnBatch(_msgSender(), tokenIds);\n\n }\n\n /**\n * @notice called when user wants to withdraw token back to root chain with token URI\n * @dev Should handle withraw by burning user's token.\n * Should set `withdrawnTokens` mapping to `true` for the tokenId being withdrawn\n * This transaction will be verified when exiting on root chain\n *\n * @param tokenId tokenId to withdraw\n */\n function withdrawWithMetadata(uint256 tokenId) external {\n\n require(_msgSender() == ownerOf(tokenId), \"ChildMintableERC721: INVALID_TOKEN_OWNER\");\n withdrawnTokens[tokenId] = true;\n\n // Encoding metadata associated with tokenId & emitting event\n emit TransferWithMetadata(ownerOf(tokenId), address(0), tokenId, this.encodeTokenMetadata(tokenId));\n\n _burn(tokenId);\n\n }\n\n /**\n * @notice This method is supposed to be called by client when withdrawing token with metadata\n * and pass return value of this function as second paramter of `withdrawWithMetadata` method\n *\n * It can be overridden by clients to encode data in a different form, which needs to\n * be decoded back by them correctly during exiting\n *\n * @param tokenId Token for which URI to be fetched\n */\n function encodeTokenMetadata(uint256 tokenId) external view virtual returns (bytes memory) {\n\n // You're always free to change this default implementation\n // and pack more data in byte array which can be decoded back\n // in L1\n return abi.encode(tokenURI(tokenId));\n\n }\n\n /**\n * @notice Example function to handle minting tokens on matic chain\n * @dev Minting can be done as per requirement,\n * This implementation allows only admin to mint tokens but it can be changed as per requirement\n * Should verify if token is withdrawn by checking `withdrawnTokens` mapping\n * @param user user for whom tokens are being minted\n * @param tokenId tokenId to mint\n */\n function mint(address user, uint256 tokenId) public only(DEFAULT_ADMIN_ROLE) {\n require(!withdrawnTokens[tokenId], \"ChildMintableERC721: TOKEN_EXISTS_ON_ROOT_CHAIN\");\n _mint(user, tokenId);\n }\n}\n" + }, + "contracts/Libraries/matic/child/ChildToken/ChildMintableERC1155.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {ERC1155} from \"@openzeppelin/contracts/token/ERC1155/ERC1155.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\nimport {IChildToken} from \"./IChildToken.sol\";\nimport {NativeMetaTransaction} from \"../../common/NativeMetaTransaction.sol\";\nimport {ContextMixin} from \"../../common/ContextMixin.sol\";\n\ncontract ChildMintableERC1155 is\n ERC1155,\n IChildToken,\n AccessControlMixin,\n NativeMetaTransaction,\n ContextMixin\n{\n bytes32 public constant DEPOSITOR_ROLE = keccak256(\"DEPOSITOR_ROLE\");\n\n constructor(string memory uri_, address childChainManager)\n public\n ERC1155(uri_)\n {\n _setupContractId(\"ChildMintableERC1155\");\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n _setupRole(DEPOSITOR_ROLE, childChainManager);\n _initializeEIP712(uri_);\n }\n\n // This is to support Native meta transactions\n // never use msg.sender directly, use _msgSender() instead\n function _msgSender()\n internal\n override\n view\n returns (address payable sender)\n {\n return ContextMixin.msgSender();\n }\n\n /**\n * @notice called when tokens are deposited on root chain\n * @dev Should be callable only by ChildChainManager\n * Should handle deposit by minting the required tokens for user\n * Make sure minting is done only by this function\n * @param user user address for whom deposit is being done\n * @param depositData abi encoded ids array and amounts array\n */\n function deposit(address user, bytes calldata depositData)\n external\n override\n only(DEPOSITOR_ROLE)\n {\n (\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n ) = abi.decode(depositData, (uint256[], uint256[], bytes));\n\n require(\n user != address(0),\n \"ChildMintableERC1155: INVALID_DEPOSIT_USER\"\n );\n\n _mintBatch(user, ids, amounts, data);\n }\n\n /**\n * @notice called when user wants to withdraw single token back to root chain\n * @dev Should burn user's tokens. This transaction will be verified when exiting on root chain\n * @param id id to withdraw\n * @param amount amount to withdraw\n */\n function withdrawSingle(uint256 id, uint256 amount) external {\n _burn(_msgSender(), id, amount);\n }\n\n /**\n * @notice called when user wants to batch withdraw tokens back to root chain\n * @dev Should burn user's tokens. This transaction will be verified when exiting on root chain\n * @param ids ids to withdraw\n * @param amounts amounts to withdraw\n */\n function withdrawBatch(uint256[] calldata ids, uint256[] calldata amounts)\n external\n {\n _burnBatch(_msgSender(), ids, amounts);\n }\n\n /**\n * @notice See definition of `_mint` in ERC1155 contract\n * @dev This implementation only allows admins to mint tokens\n * but can be changed as per requirement\n */\n function mint(\n address account,\n uint256 id,\n uint256 amount,\n bytes calldata data\n ) external only(DEFAULT_ADMIN_ROLE) {\n _mint(account, id, amount, data);\n }\n\n /**\n * @notice See definition of `_mintBatch` in ERC1155 contract\n * @dev This implementation only allows admins to mint tokens\n * but can be changed as per requirement\n */\n function mintBatch(\n address to,\n uint256[] calldata ids,\n uint256[] calldata amounts,\n bytes calldata data\n ) external only(DEFAULT_ADMIN_ROLE) {\n _mintBatch(to, ids, amounts, data);\n }\n}\n" + }, + "contracts/Libraries/matic/child/ChildToken/ChildERC721.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {ERC721} from \"@openzeppelin/contracts/token/ERC721/ERC721.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\nimport {IChildToken} from \"./IChildToken.sol\";\nimport {NativeMetaTransaction} from \"../../common/NativeMetaTransaction.sol\";\nimport {ContextMixin} from \"../../common/ContextMixin.sol\";\n\ncontract ChildERC721 is\n ERC721,\n IChildToken,\n AccessControlMixin,\n NativeMetaTransaction,\n ContextMixin\n{\n bytes32 public constant DEPOSITOR_ROLE = keccak256(\"DEPOSITOR_ROLE\");\n\n // limit batching of tokens due to gas limit restrictions\n uint256 public constant BATCH_LIMIT = 20;\n\n event WithdrawnBatch(address indexed user, uint256[] tokenIds);\n event TransferWithMetadata(address indexed from, address indexed to, uint256 indexed tokenId, bytes metaData);\n\n constructor(\n string memory name_,\n string memory symbol_,\n address childChainManager\n ) public ERC721(name_, symbol_) {\n _setupContractId(\"ChildERC721\");\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n _setupRole(DEPOSITOR_ROLE, childChainManager);\n _initializeEIP712(name_);\n }\n\n // This is to support Native meta transactions\n // never use msg.sender directly, use _msgSender() instead\n function _msgSender()\n internal\n override\n view\n returns (address payable sender)\n {\n return ContextMixin.msgSender();\n }\n\n /**\n * @notice called when token is deposited on root chain\n * @dev Should be callable only by ChildChainManager\n * Should handle deposit by minting the required tokenId for user\n * Make sure minting is done only by this function\n * @param user user address for whom deposit is being done\n * @param depositData abi encoded tokenId\n */\n function deposit(address user, bytes calldata depositData)\n external\n override\n only(DEPOSITOR_ROLE)\n {\n // deposit single\n if (depositData.length == 32) {\n uint256 tokenId = abi.decode(depositData, (uint256));\n _mint(user, tokenId);\n\n // deposit batch\n } else {\n uint256[] memory tokenIds = abi.decode(depositData, (uint256[]));\n uint256 length = tokenIds.length;\n for (uint256 i; i < length; i++) {\n _mint(user, tokenIds[i]);\n }\n }\n }\n\n /**\n * @notice called when user wants to withdraw token back to root chain\n * @dev Should burn user's token. This transaction will be verified when exiting on root chain\n * @param tokenId tokenId to withdraw\n */\n function withdraw(uint256 tokenId) external {\n require(_msgSender() == ownerOf(tokenId), \"ChildERC721: INVALID_TOKEN_OWNER\");\n _burn(tokenId);\n }\n\n /**\n * @notice called when user wants to withdraw multiple tokens back to root chain\n * @dev Should burn user's tokens. This transaction will be verified when exiting on root chain\n * @param tokenIds tokenId list to withdraw\n */\n function withdrawBatch(uint256[] calldata tokenIds) external {\n uint256 length = tokenIds.length;\n require(length <= BATCH_LIMIT, \"ChildERC721: EXCEEDS_BATCH_LIMIT\");\n for (uint256 i; i < length; i++) {\n uint256 tokenId = tokenIds[i];\n require(_msgSender() == ownerOf(tokenId), string(abi.encodePacked(\"ChildERC721: INVALID_TOKEN_OWNER \", tokenId)));\n _burn(tokenId);\n }\n emit WithdrawnBatch(_msgSender(), tokenIds);\n }\n\n /**\n * @notice called when user wants to withdraw token back to root chain with arbitrary metadata\n * @dev Should handle withraw by burning user's token.\n * \n * This transaction will be verified when exiting on root chain\n *\n * @param tokenId tokenId to withdraw\n */\n function withdrawWithMetadata(uint256 tokenId) external {\n\n require(_msgSender() == ownerOf(tokenId), \"ChildERC721: INVALID_TOKEN_OWNER\");\n\n // Encoding metadata associated with tokenId & emitting event\n emit TransferWithMetadata(_msgSender(), address(0), tokenId, this.encodeTokenMetadata(tokenId));\n\n _burn(tokenId);\n\n }\n\n /**\n * @notice This method is supposed to be called by client when withdrawing token with metadata\n * and pass return value of this function as second paramter of `withdrawWithMetadata` method\n *\n * It can be overridden by clients to encode data in a different form, which needs to\n * be decoded back by them correctly during exiting\n *\n * @param tokenId Token for which URI to be fetched\n */\n function encodeTokenMetadata(uint256 tokenId) external view virtual returns (bytes memory) {\n\n // You're always free to change this default implementation\n // and pack more data in byte array which can be decoded back\n // in L1\n return abi.encode(tokenURI(tokenId));\n\n }\n}\n" + }, + "contracts/Libraries/matic/child/ChildToken/ChildERC1155.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {ERC1155} from \"@openzeppelin/contracts/token/ERC1155/ERC1155.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\nimport {IChildToken} from \"./IChildToken.sol\";\nimport {NativeMetaTransaction} from \"../../common/NativeMetaTransaction.sol\";\nimport {ContextMixin} from \"../../common/ContextMixin.sol\";\n\ncontract ChildERC1155 is\n ERC1155,\n IChildToken,\n AccessControlMixin,\n NativeMetaTransaction,\n ContextMixin\n{\n bytes32 public constant DEPOSITOR_ROLE = keccak256(\"DEPOSITOR_ROLE\");\n\n constructor(string memory uri_, address childChainManager)\n public\n ERC1155(uri_)\n {\n _setupContractId(\"ChildERC1155\");\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n _setupRole(DEPOSITOR_ROLE, childChainManager);\n _initializeEIP712(uri_);\n }\n\n // This is to support Native meta transactions\n // never use msg.sender directly, use _msgSender() instead\n function _msgSender()\n internal\n override\n view\n returns (address payable sender)\n {\n return ContextMixin.msgSender();\n }\n\n /**\n * @notice called when tokens are deposited on root chain\n * @dev Should be callable only by ChildChainManager\n * Should handle deposit by minting the required tokens for user\n * Make sure minting is done only by this function\n * @param user user address for whom deposit is being done\n * @param depositData abi encoded ids array and amounts array\n */\n function deposit(address user, bytes calldata depositData)\n external\n override\n only(DEPOSITOR_ROLE)\n {\n (\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n ) = abi.decode(depositData, (uint256[], uint256[], bytes));\n require(user != address(0x0), \"ChildERC1155: INVALID_DEPOSIT_USER\");\n _mintBatch(user, ids, amounts, data);\n }\n\n /**\n * @notice called when user wants to withdraw single token back to root chain\n * @dev Should burn user's tokens. This transaction will be verified when exiting on root chain\n * @param id id to withdraw\n * @param amount amount to withdraw\n */\n function withdrawSingle(uint256 id, uint256 amount) external {\n _burn(_msgSender(), id, amount);\n }\n\n /**\n * @notice called when user wants to batch withdraw tokens back to root chain\n * @dev Should burn user's tokens. This transaction will be verified when exiting on root chain\n * @param ids ids to withdraw\n * @param amounts amounts to withdraw\n */\n function withdrawBatch(uint256[] calldata ids, uint256[] calldata amounts)\n external\n {\n _burnBatch(_msgSender(), ids, amounts);\n }\n}\n" + }, + "contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.6 <0.9.0;\n\nimport {CryptOrchidGoerli} from \"../CryptOrchidGoerli/CryptOrchidGoerli.sol\";\nimport {AccessControlMixin} from \"../Libraries/matic/common/AccessControlMixin.sol\";\nimport {IChildToken} from \"../Libraries/matic/child/ChildToken/IChildToken.sol\";\nimport {NativeMetaTransaction} from \"../Libraries/matic/common/NativeMetaTransaction.sol\";\nimport {ContextMixin} from \"../Libraries/matic/common/ContextMixin.sol\";\nimport {FxBaseChildTunnel} from \"../Libraries/tunnel/FxBaseChildTunnel.sol\";\n\ncontract CryptOrchidERC721Child is\n CryptOrchidGoerli,\n IChildToken,\n AccessControlMixin,\n NativeMetaTransaction,\n ContextMixin,\n FxBaseChildTunnel\n{\n bytes32 public constant DEPOSITOR_ROLE = keccak256(\"DEPOSITOR_ROLE\");\n\n // limit batching of tokens due to gas limit restrictions\n uint256 public constant BATCH_LIMIT = 20;\n\n event WithdrawnBatch(address indexed user, uint256[] tokenIds);\n event TransferWithMetadata(address indexed from, address indexed to, uint256 indexed tokenId, bytes metaData);\n\n constructor(address childChainManager, address _fxChild) public CryptOrchidGoerli() FxBaseChildTunnel(_fxChild) {\n _setupContractId(\"CryptOrchidERC721Child\");\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n _setupRole(DEPOSITOR_ROLE, childChainManager);\n _initializeEIP712(\"CryptOrchids\");\n }\n\n // This is to support Native meta transactions\n // never use msg.sender directly, use _msgSender() instead\n function _msgSender() internal view override returns (address payable sender) {\n return ContextMixin.msgSender();\n }\n\n /**\n * @notice called when token is deposited on root chain\n * @dev Should be callable only by ChildChainManager\n * Should handle deposit by minting the required tokenId for user\n * Make sure minting is done only by this function\n * @param user user address for whom deposit is being done\n * @param depositData abi encoded tokenId\n */\n function deposit(address user, bytes calldata depositData) external override only(DEPOSITOR_ROLE) {\n // deposit single\n if (depositData.length == 32) {\n uint256 tokenId = abi.decode(depositData, (uint256));\n _mint(user, tokenId);\n\n // deposit batch\n } else {\n uint256[] memory tokenIds = abi.decode(depositData, (uint256[]));\n uint256 length = tokenIds.length;\n for (uint256 i; i < length; i++) {\n _mint(user, tokenIds[i]);\n }\n }\n }\n\n /**\n * @notice called when user wants to withdraw token back to root chain\n * @dev Should burn user's token. This transaction will be verified when exiting on root chain\n * @param tokenId tokenId to withdraw\n */\n function withdraw(uint256 tokenId) external {\n require(_msgSender() == ownerOf(tokenId), \"ChildERC721: INVALID_TOKEN_OWNER\");\n _burn(tokenId);\n }\n\n /**\n * @notice called when user wants to withdraw multiple tokens back to root chain\n * @dev Should burn user's tokens. This transaction will be verified when exiting on root chain\n * @param tokenIds tokenId list to withdraw\n */\n function withdrawBatch(uint256[] calldata tokenIds) external {\n uint256 length = tokenIds.length;\n require(length <= BATCH_LIMIT, \"ChildERC721: EXCEEDS_BATCH_LIMIT\");\n for (uint256 i; i < length; i++) {\n uint256 tokenId = tokenIds[i];\n require(\n _msgSender() == ownerOf(tokenId),\n string(abi.encodePacked(\"ChildERC721: INVALID_TOKEN_OWNER \", tokenId))\n );\n _burn(tokenId);\n }\n emit WithdrawnBatch(_msgSender(), tokenIds);\n }\n\n /**\n * @notice called when user wants to withdraw token back to root chain with arbitrary metadata\n * @dev Should handle withraw by burning user's token.\n *\n * This transaction will be verified when exiting on root chain\n *\n * @param tokenId tokenId to withdraw\n */\n function withdrawWithMetadata(uint256 tokenId) external {\n require(_msgSender() == ownerOf(tokenId), \"ChildERC721: INVALID_TOKEN_OWNER\");\n\n // Encoding metadata associated with tokenId & emitting event\n emit TransferWithMetadata(_msgSender(), address(0), tokenId, this.encodeTokenMetadata(tokenId));\n\n _burn(tokenId);\n }\n\n /**\n * @notice This method is supposed to be called by client when withdrawing token with metadata\n * and pass return value of this function as second paramter of `withdrawWithMetadata` method\n *\n * It can be overridden by clients to encode data in a different form, which needs to\n * be decoded back by them correctly during exiting\n *\n * @param tokenId Token for which URI to be fetched\n */\n function encodeTokenMetadata(uint256 tokenId) external view virtual returns (bytes memory) {\n // You're always free to change this default implementation\n // and pack more data in byte array which can be decoded back\n // in L1\n return abi.encode(tokenURI(tokenId));\n }\n\n function _processMessageFromRoot(\n uint256 stateId,\n address sender,\n bytes memory data\n ) internal override validateSender(sender) {\n (string memory species, uint256 plantedAt, uint256 waterLevel, uint256 tokenId) = abi.decode(\n data,\n (string, uint256, uint256, uint256)\n );\n cryptorchids[tokenId] = CryptOrchid({species: species, plantedAt: plantedAt, waterLevel: waterLevel});\n }\n\n function sendMessageToRoot(bytes memory message) public {\n _sendMessageToRoot(message);\n }\n}\n" + }, + "contracts/Libraries/tunnel/FxBaseChildTunnel.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.6 <0.9.0;\n\n// IFxMessageProcessor represents interface to process message\ninterface IFxMessageProcessor {\n function processMessageFromRoot(\n uint256 stateId,\n address rootMessageSender,\n bytes calldata data\n ) external;\n}\n\n/**\n * @notice Mock child tunnel contract to receive and send message from L2\n */\nabstract contract FxBaseChildTunnel is IFxMessageProcessor {\n // MessageTunnel on L1 will get data from this event\n event MessageSent(bytes message);\n\n // fx child\n address public fxChild;\n\n // fx root tunnel\n address public fxRootTunnel;\n\n constructor(address _fxChild) internal {\n fxChild = _fxChild;\n }\n\n // Sender must be fxRootTunnel in case of ERC20 tunnel\n modifier validateSender(address sender) {\n require(sender == fxRootTunnel, \"FxBaseChildTunnel: INVALID_SENDER_FROM_ROOT\");\n _;\n }\n\n // set fxRootTunnel if not set already\n function setFxRootTunnel(address _fxRootTunnel) public {\n require(fxRootTunnel == address(0x0), \"FxBaseChildTunnel: ROOT_TUNNEL_ALREADY_SET\");\n fxRootTunnel = _fxRootTunnel;\n }\n\n function processMessageFromRoot(\n uint256 stateId,\n address rootMessageSender,\n bytes memory data\n ) public override {\n require(msg.sender == fxChild, \"FxBaseChildTunnel: INVALID_SENDER\");\n _processMessageFromRoot(stateId, rootMessageSender, data);\n }\n\n /**\n * @notice Emit message that can be received on Root Tunnel\n * @dev Call the internal function when need to emit message\n * @param message bytes message that will be sent to Root Tunnel\n * some message examples -\n * abi.encode(tokenId);\n * abi.encode(tokenId, tokenMetadata);\n * abi.encode(messageType, messageData);\n */\n function _sendMessageToRoot(bytes memory message) internal {\n emit MessageSent(message);\n }\n\n /**\n * @notice Process message received from Root Tunnel\n * @dev function needs to be implemented to handle message as per requirement\n * This is called by onStateReceive function.\n * Since it is called via a system call, any event will not be emitted during its execution.\n * @param stateId unique state id\n * @param sender root message sender\n * @param message bytes message that was sent from Root Tunnel\n */\n function _processMessageFromRoot(\n uint256 stateId,\n address sender,\n bytes memory message\n ) internal virtual;\n}\n" + }, + "contracts/Libraries/matic/root/RootToken/DummyERC1155.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {ERC1155} from \"@openzeppelin/contracts/token/ERC1155/ERC1155.sol\";\nimport {NativeMetaTransaction} from \"../../common/NativeMetaTransaction.sol\";\nimport {ContextMixin} from \"../../common/ContextMixin.sol\";\n\ncontract DummyERC1155 is\n ERC1155,\n NativeMetaTransaction,\n ContextMixin\n{\n constructor(string memory uri_)\n public\n ERC1155(uri_)\n {\n _initializeEIP712(uri_);\n }\n\n function mint(address account, uint256 id, uint256 amount) public {\n _mint(account, id, amount, bytes(\"\"));\n }\n\n function _msgSender()\n internal\n override\n view\n returns (address payable sender)\n {\n return ContextMixin.msgSender();\n }\n}\n" + }, + "contracts/Libraries/matic/root/TokenPredicates/ERC1155Predicate.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {IERC1155} from \"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\";\nimport {ERC1155Receiver} from \"@openzeppelin/contracts/token/ERC1155/ERC1155Receiver.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\nimport {RLPReader} from \"../../lib/RLPReader.sol\";\nimport {ITokenPredicate} from \"./ITokenPredicate.sol\";\nimport {Initializable} from \"../../common/Initializable.sol\";\n\ncontract ERC1155Predicate is ITokenPredicate, ERC1155Receiver, AccessControlMixin, Initializable {\n using RLPReader for bytes;\n using RLPReader for RLPReader.RLPItem;\n\n bytes32 public constant MANAGER_ROLE = keccak256(\"MANAGER_ROLE\");\n bytes32 public constant TOKEN_TYPE = keccak256(\"ERC1155\");\n\n // keccak256(\"TransferSingle(address,address,address,uint256,uint256)\")\n bytes32 public constant TRANSFER_SINGLE_EVENT_SIG = 0xc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62;\n // keccak256(\"TransferBatch(address,address,address,uint256[],uint256[])\")\n bytes32 public constant TRANSFER_BATCH_EVENT_SIG = 0x4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb;\n\n event LockedBatchERC1155(\n address indexed depositor,\n address indexed depositReceiver,\n address indexed rootToken,\n uint256[] ids,\n uint256[] amounts\n );\n\n constructor() public {}\n\n function initialize(address _owner) external initializer {\n _setupContractId(\"ERC1155Predicate\");\n _setupRole(DEFAULT_ADMIN_ROLE, _owner);\n _setupRole(MANAGER_ROLE, _owner);\n }\n\n /**\n * @notice rejects single transfer\n */\n function onERC1155Received(\n address,\n address,\n uint256,\n uint256,\n bytes calldata\n ) external override returns (bytes4) {\n return 0;\n }\n\n /**\n * @notice accepts batch transfer\n */\n function onERC1155BatchReceived(\n address,\n address,\n uint256[] calldata,\n uint256[] calldata,\n bytes calldata\n ) external override returns (bytes4) {\n return ERC1155Receiver(0).onERC1155BatchReceived.selector;\n }\n\n /**\n * @notice Lock ERC1155 tokens for deposit, callable only by manager\n * @param depositor Address who wants to deposit tokens\n * @param depositReceiver Address (address) who wants to receive tokens on child chain\n * @param rootToken Token which gets deposited\n * @param depositData ABI encoded id array and amount array\n */\n function lockTokens(\n address depositor,\n address depositReceiver,\n address rootToken,\n bytes calldata depositData\n )\n external\n override\n only(MANAGER_ROLE)\n {\n // forcing batch deposit since supporting both single and batch deposit introduces too much complexity\n (\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n ) = abi.decode(depositData, (uint256[], uint256[], bytes));\n emit LockedBatchERC1155(\n depositor,\n depositReceiver,\n rootToken,\n ids,\n amounts\n );\n IERC1155(rootToken).safeBatchTransferFrom(\n depositor,\n address(this),\n ids,\n amounts,\n data\n );\n }\n\n /**\n * @notice Validates log signature, from and to address\n * then sends the correct tokenId, amount to withdrawer\n * callable only by manager\n * @param rootToken Token which gets withdrawn\n * @param log Valid ERC1155 TransferSingle burn or TransferBatch burn log from child chain\n */\n function exitTokens(\n address,\n address rootToken,\n bytes memory log\n )\n public\n override\n only(MANAGER_ROLE)\n {\n RLPReader.RLPItem[] memory logRLPList = log.toRlpItem().toList();\n RLPReader.RLPItem[] memory logTopicRLPList = logRLPList[1].toList(); // topics\n bytes memory logData = logRLPList[2].toBytes();\n\n address withdrawer = address(logTopicRLPList[2].toUint()); // topic2 is from address\n\n require(\n address(logTopicRLPList[3].toUint()) == address(0), // topic3 is to address\n \"ERC1155Predicate: INVALID_RECEIVER\"\n );\n\n if (bytes32(logTopicRLPList[0].toUint()) == TRANSFER_SINGLE_EVENT_SIG) { // topic0 is event sig\n (uint256 id, uint256 amount) = abi.decode(\n logData,\n (uint256, uint256)\n );\n IERC1155(rootToken).safeTransferFrom(\n address(this),\n withdrawer,\n id,\n amount,\n bytes(\"\")\n );\n } else if (bytes32(logTopicRLPList[0].toUint()) == TRANSFER_BATCH_EVENT_SIG) {\n (uint256[] memory ids, uint256[] memory amounts) = abi.decode(\n logData,\n (uint256[], uint256[])\n );\n IERC1155(rootToken).safeBatchTransferFrom(\n address(this),\n withdrawer,\n ids,\n amounts,\n bytes(\"\")\n );\n } else {\n revert(\"ERC1155Predicate: INVALID_WITHDRAW_SIG\");\n }\n }\n}\n" + }, + "contracts/Libraries/matic/test/TestRootTunnel.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {BaseRootTunnel} from \"../tunnel/BaseRootTunnel.sol\";\n\ncontract TestRootTunnel is BaseRootTunnel {\n uint256 public receivedNumber;\n\n event MessageReceivedFromChild(uint256);\n\n function _processMessageFromChild(bytes memory message) internal override {\n (uint256 n) = abi.decode(message, (uint256));\n emit MessageReceivedFromChild(n);\n receivedNumber = n;\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/deployments/mumbai/.chainId b/deployments/mumbai/.chainId new file mode 100644 index 0000000..d7e2f72 --- /dev/null +++ b/deployments/mumbai/.chainId @@ -0,0 +1 @@ +80001 \ No newline at end of file diff --git a/deployments/mumbai/CryptOrchidERC721Child.json b/deployments/mumbai/CryptOrchidERC721Child.json new file mode 100644 index 0000000..d552437 --- /dev/null +++ b/deployments/mumbai/CryptOrchidERC721Child.json @@ -0,0 +1,2255 @@ +{ + "address": "0xdAa17ECcBdA217DE434fefeB1c4f5a0596d3c39f", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "childChainManager", + "type": "address" + }, + { + "internalType": "address", + "name": "_fxChild", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes", + "name": "message", + "type": "bytes" + } + ], + "name": "MessageSent", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "userAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address payable", + "name": "relayerAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "functionSignature", + "type": "bytes" + } + ], + "name": "MetaTransactionExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "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": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "metaData", + "type": "bytes" + } + ], + "name": "TransferWithMetadata", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "tokenIds", + "type": "uint256[]" + } + ], + "name": "WithdrawnBatch", + "type": "event" + }, + { + "inputs": [], + "name": "BATCH_LIMIT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DEPOSITOR_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ERC712_VERSION", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "GROWTH_CYCLE", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_CRYPTORCHIDS", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MINTER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PAUSER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "WATERING_WINDOW", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "alive", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "baseURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "cryptorchids", + "outputs": [ + { + "internalType": "string", + "name": "species", + "type": "string" + }, + { + "internalType": "uint256", + "name": "plantedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "waterLevel", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "currentPrice", + "outputs": [ + { + "internalType": "uint256", + "name": "price", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "bytes", + "name": "depositData", + "type": "bytes" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "encodeTokenMetadata", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "userAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "functionSignature", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "sigR", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "sigS", + "type": "bytes32" + }, + { + "internalType": "uint8", + "name": "sigV", + "type": "uint8" + } + ], + "name": "executeMetaTransaction", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "flowering", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fxChild", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fxRootTunnel", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "userProvidedSeed", + "type": "uint256" + } + ], + "name": "germinate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getChainId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "getDomainSeperator", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getNonce", + "outputs": [ + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "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": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getTokenMetadata", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "enum CryptOrchidGoerli.Stage", + "name": "", + "type": "uint8" + } + ], + "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": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "growthStage", + "outputs": [ + { + "internalType": "enum CryptOrchidGoerli.Stage", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "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": "stateId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "rootMessageSender", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "processMessageFromRoot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "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": "", + "type": "bytes32" + } + ], + "name": "requestToToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "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": "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": "bytes", + "name": "message", + "type": "bytes" + } + ], + "name": "sendMessageToRoot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_fxRootTunnel", + "type": "address" + } + ], + "name": "setFxRootTunnel", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "startGrowing", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "startSale", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "tokenByIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "tokenOfOwnerByIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "water", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "units", + "type": "uint256" + } + ], + "name": "webMint", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "tokenIds", + "type": "uint256[]" + } + ], + "name": "withdrawBatch", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "withdrawWithMetadata", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x3a89ac2a0757bfaee2c6ae8ff1d46aa87f5f70ba988f8e6eebb63dfa68921ad4", + "receipt": { + "to": null, + "from": "0x0090720FeD7Fed66eD658118b7B3BB0189D3A495", + "contractAddress": "0xdAa17ECcBdA217DE434fefeB1c4f5a0596d3c39f", + "transactionIndex": 0, + "gasUsed": "9350337", + "logsBloom": "0x00000004000000000000000000000000000000000001000000800000000000040000000000000000800400000000004000008000002001000000000000000000000000000000000000000000000000800001000000000000040100000000000000000000020000000000000000000800000000200000000080000000001002400000000000000000000000000000008010000000000000000000000000000000200000000000000000000000000000000000000000000800001040000000004000000000000000000001000000000002001000100000000100102000000020000000000000002000000000000000000000000400000000000000000000100000", + "blockHash": "0xc6b50ea64310823b9734204edfe55216774a7641f0ab41cb0d0b2f08956f39b0", + "transactionHash": "0x3a89ac2a0757bfaee2c6ae8ff1d46aa87f5f70ba988f8e6eebb63dfa68921ad4", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 14358898, + "transactionHash": "0x3a89ac2a0757bfaee2c6ae8ff1d46aa87f5f70ba988f8e6eebb63dfa68921ad4", + "address": "0xdAa17ECcBdA217DE434fefeB1c4f5a0596d3c39f", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000090720fed7fed66ed658118b7b3bb0189d3a495", + "0x0000000000000000000000000090720fed7fed66ed658118b7b3bb0189d3a495" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0xc6b50ea64310823b9734204edfe55216774a7641f0ab41cb0d0b2f08956f39b0" + }, + { + "transactionIndex": 0, + "blockNumber": 14358898, + "transactionHash": "0x3a89ac2a0757bfaee2c6ae8ff1d46aa87f5f70ba988f8e6eebb63dfa68921ad4", + "address": "0xdAa17ECcBdA217DE434fefeB1c4f5a0596d3c39f", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6", + "0x0000000000000000000000000090720fed7fed66ed658118b7b3bb0189d3a495", + "0x0000000000000000000000000090720fed7fed66ed658118b7b3bb0189d3a495" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0xc6b50ea64310823b9734204edfe55216774a7641f0ab41cb0d0b2f08956f39b0" + }, + { + "transactionIndex": 0, + "blockNumber": 14358898, + "transactionHash": "0x3a89ac2a0757bfaee2c6ae8ff1d46aa87f5f70ba988f8e6eebb63dfa68921ad4", + "address": "0xdAa17ECcBdA217DE434fefeB1c4f5a0596d3c39f", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a", + "0x0000000000000000000000000090720fed7fed66ed658118b7b3bb0189d3a495", + "0x0000000000000000000000000090720fed7fed66ed658118b7b3bb0189d3a495" + ], + "data": "0x", + "logIndex": 2, + "blockHash": "0xc6b50ea64310823b9734204edfe55216774a7641f0ab41cb0d0b2f08956f39b0" + }, + { + "transactionIndex": 0, + "blockNumber": 14358898, + "transactionHash": "0x3a89ac2a0757bfaee2c6ae8ff1d46aa87f5f70ba988f8e6eebb63dfa68921ad4", + "address": "0xdAa17ECcBdA217DE434fefeB1c4f5a0596d3c39f", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000090720fed7fed66ed658118b7b3bb0189d3a495" + ], + "data": "0x", + "logIndex": 3, + "blockHash": "0xc6b50ea64310823b9734204edfe55216774a7641f0ab41cb0d0b2f08956f39b0" + }, + { + "transactionIndex": 0, + "blockNumber": 14358898, + "transactionHash": "0x3a89ac2a0757bfaee2c6ae8ff1d46aa87f5f70ba988f8e6eebb63dfa68921ad4", + "address": "0xdAa17ECcBdA217DE434fefeB1c4f5a0596d3c39f", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x8f4f2da22e8ac8f11e15f9fc141cddbb5deea8800186560abb6e68c5496619a9", + "0x000000000000000000000000b5505a6d998549090530911180f38ac5130101c6", + "0x0000000000000000000000000090720fed7fed66ed658118b7b3bb0189d3a495" + ], + "data": "0x", + "logIndex": 4, + "blockHash": "0xc6b50ea64310823b9734204edfe55216774a7641f0ab41cb0d0b2f08956f39b0" + }, + { + "transactionIndex": 0, + "blockNumber": 14358898, + "transactionHash": "0x3a89ac2a0757bfaee2c6ae8ff1d46aa87f5f70ba988f8e6eebb63dfa68921ad4", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x0000000000000000000000000090720fed7fed66ed658118b7b3bb0189d3a495", + "0x000000000000000000000000c275dc8be39f50d12f66b6a63629c39da5bae5bd" + ], + "data": "0x000000000000000000000000000000000000000000000000014c30d1d226e40000000000000000000000000000000000000000000000000002977e574e4ba60000000000000000000000000000000000000000000000007496925ae5992e7d08000000000000000000000000000000000000000000000000014b4d857c24c20000000000000000000000000000000000000000000000007497de8bb76b556108", + "logIndex": 5, + "blockHash": "0xc6b50ea64310823b9734204edfe55216774a7641f0ab41cb0d0b2f08956f39b0" + } + ], + "blockNumber": 14358898, + "cumulativeGasUsed": "9350337", + "status": 1, + "byzantium": true + }, + "args": [ + "0xb5505a6d998549090530911180f38aC5130101c6", + "0xCf73231F28B7331BBe3124B907840A94851f9f11" + ], + "solcInputHash": "4f9b70493defebe2f15081e93e9ddfbb", + "metadata": "{\"compiler\":{\"version\":\"0.6.6+commit.6c089d02\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"childChainManager\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_fxChild\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"approved\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"userAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address payable\",\"name\":\"relayerAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"functionSignature\",\"type\":\"bytes\"}],\"name\":\"MetaTransactionExecuted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"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\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"metaData\",\"type\":\"bytes\"}],\"name\":\"TransferWithMetadata\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"}],\"name\":\"WithdrawnBatch\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BATCH_LIMIT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEPOSITOR_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ERC712_VERSION\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GROWTH_CYCLE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_CRYPTORCHIDS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINTER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PAUSER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WATERING_WINDOW\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"alive\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"baseURI\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"cryptorchids\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"species\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"plantedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"waterLevel\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"price\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"depositData\",\"type\":\"bytes\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"encodeTokenMetadata\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"userAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"functionSignature\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"sigR\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"sigS\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"sigV\",\"type\":\"uint8\"}],\"name\":\"executeMetaTransaction\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"flowering\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fxChild\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fxRootTunnel\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"userProvidedSeed\",\"type\":\"uint256\"}],\"name\":\"germinate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getApproved\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDomainSeperator\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"getNonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"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\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getTokenMetadata\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"enum CryptOrchidGoerli.Stage\",\"name\":\"\",\"type\":\"uint8\"}],\"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\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"growthStage\",\"outputs\":[{\"internalType\":\"enum CryptOrchidGoerli.Stage\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"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\":\"stateId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"rootMessageSender\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"processMessageFromRoot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"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\":\"\",\"type\":\"bytes32\"}],\"name\":\"requestToToken\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"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\":\"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\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"sendMessageToRoot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_fxRootTunnel\",\"type\":\"address\"}],\"name\":\"setFxRootTunnel\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startGrowing\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startSale\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"tokenByIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"tokenOfOwnerByIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"tokenURI\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"water\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"units\",\"type\":\"uint256\"}],\"name\":\"webMint\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"}],\"name\":\"withdrawBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"withdrawWithMetadata\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"methods\":{\"approve(address,uint256)\":{\"details\":\"See {IERC721-approve}.\"},\"balanceOf(address)\":{\"details\":\"See {IERC721-balanceOf}.\"},\"baseURI()\":{\"details\":\"Returns the base URI set via {_setBaseURI}. This will be automatically added as a prefix in {tokenURI} to each token's URI, or to the token ID if no specific URI is set for that token ID.\"},\"burn(uint256)\":{\"details\":\"Burns `tokenId`. See {ERC721-_burn}. * Requirements: * - The caller must own `tokenId` or be an approved operator.\"},\"deposit(address,bytes)\":{\"details\":\"Should be callable only by ChildChainManager Should handle deposit by minting the required tokenId for user Make sure minting is done only by this function\",\"params\":{\"depositData\":\"abi encoded tokenId\",\"user\":\"user address for whom deposit is being done\"}},\"encodeTokenMetadata(uint256)\":{\"params\":{\"tokenId\":\"Token for which URI to be fetched\"}},\"getApproved(uint256)\":{\"details\":\"See {IERC721-getApproved}.\"},\"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.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"isApprovedForAll(address,address)\":{\"details\":\"See {IERC721-isApprovedForAll}.\"},\"mint(address)\":{\"details\":\"Creates a new token for `to`. Its token ID will be automatically assigned (and available on the emitted {IERC721-Transfer} event), and the token URI autogenerated based on the base URI passed at construction. * See {ERC721-_mint}. * Requirements: * - the caller must have the `MINTER_ROLE`.\"},\"name()\":{\"details\":\"See {IERC721Metadata-name}.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"ownerOf(uint256)\":{\"details\":\"See {IERC721-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.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. * NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"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 granted `role`, emits a {RoleRevoked} event. * Requirements: * - the caller must be `account`.\"},\"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.\"},\"safeTransferFrom(address,address,uint256)\":{\"details\":\"See {IERC721-safeTransferFrom}.\"},\"safeTransferFrom(address,address,uint256,bytes)\":{\"details\":\"See {IERC721-safeTransferFrom}.\"},\"setApprovalForAll(address,bool)\":{\"details\":\"See {IERC721-setApprovalForAll}.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}. * Time complexity O(1), guaranteed to always use less than 30 000 gas.\"},\"symbol()\":{\"details\":\"See {IERC721Metadata-symbol}.\"},\"tokenByIndex(uint256)\":{\"details\":\"See {IERC721Enumerable-tokenByIndex}.\"},\"tokenOfOwnerByIndex(address,uint256)\":{\"details\":\"See {IERC721Enumerable-tokenOfOwnerByIndex}.\"},\"totalSupply()\":{\"details\":\"See {IERC721Enumerable-totalSupply}.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC721-transferFrom}.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"unpause()\":{\"details\":\"Unpauses all token transfers. * See {ERC721Pausable} and {Pausable-_unpause}. * Requirements: * - the caller must have the `PAUSER_ROLE`.\"},\"withdraw()\":{\"details\":\"Withdraw ether from this contract (Callable by owner only)\"},\"withdraw(uint256)\":{\"details\":\"Should burn user's token. This transaction will be verified when exiting on root chain\",\"params\":{\"tokenId\":\"tokenId to withdraw\"}},\"withdrawBatch(uint256[])\":{\"details\":\"Should burn user's tokens. This transaction will be verified when exiting on root chain\",\"params\":{\"tokenIds\":\"tokenId list to withdraw\"}},\"withdrawWithMetadata(uint256)\":{\"details\":\"Should handle withraw by burning user's token. * This transaction will be verified when exiting on root chain\",\"params\":{\"tokenId\":\"tokenId to withdraw\"}}}},\"userdoc\":{\"methods\":{\"deposit(address,bytes)\":{\"notice\":\"called when token is deposited on root chain\"},\"encodeTokenMetadata(uint256)\":{\"notice\":\"This method is supposed to be called by client when withdrawing token with metadata and pass return value of this function as second paramter of `withdrawWithMetadata` method * It can be overridden by clients to encode data in a different form, which needs to be decoded back by them correctly during exiting\"},\"withdraw(uint256)\":{\"notice\":\"called when user wants to withdraw token back to root chain\"},\"withdrawBatch(uint256[])\":{\"notice\":\"called when user wants to withdraw multiple tokens back to root chain\"},\"withdrawWithMetadata(uint256)\":{\"notice\":\"called when user wants to withdraw token back to root chain with arbitrary metadata\"}}}},\"settings\":{\"compilationTarget\":{\"contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol\":\"CryptOrchidERC721Child\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/AccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../utils/EnumerableSet.sol\\\";\\nimport \\\"../utils/Address.sol\\\";\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms.\\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 * ```\\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 * ```\\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.\\n */\\nabstract contract AccessControl is Context {\\n using EnumerableSet for EnumerableSet.AddressSet;\\n using Address for address;\\n\\n struct RoleData {\\n EnumerableSet.AddressSet 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 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 {_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) public view returns (bool) {\\n return _roles[role].members.contains(account);\\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 returns (uint256) {\\n return _roles[role].members.length();\\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 returns (address) {\\n return _roles[role].members.at(index);\\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 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 function grantRole(bytes32 role, address account) public virtual {\\n require(hasRole(_roles[role].adminRole, _msgSender()), \\\"AccessControl: sender must be an admin to grant\\\");\\n\\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 function revokeRole(bytes32 role, address account) public virtual {\\n require(hasRole(_roles[role].adminRole, _msgSender()), \\\"AccessControl: sender must be an admin to revoke\\\");\\n\\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 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) public virtual {\\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 * [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 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 emit RoleAdminChanged(role, _roles[role].adminRole, adminRole);\\n _roles[role].adminRole = adminRole;\\n }\\n\\n function _grantRole(bytes32 role, address account) private {\\n if (_roles[role].members.add(account)) {\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (_roles[role].members.remove(account)) {\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n}\\n\",\"keccak256\":\"0x4fc155a2f7837603d69a13cfa481eb5e7f5e02cb77e2ec9edbac30986db37988\"},\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor () internal {\\n address msgSender = _msgSender();\\n _owner = msgSender;\\n emit OwnershipTransferred(address(0), msgSender);\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n emit OwnershipTransferred(_owner, address(0));\\n _owner = address(0);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n emit OwnershipTransferred(_owner, newOwner);\\n _owner = newOwner;\\n }\\n}\\n\",\"keccak256\":\"0x15e2d5bd4c28a88548074c54d220e8086f638a71ed07e6b3ba5a70066fcf458d\"},\"@openzeppelin/contracts/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts may inherit from this and call {_registerInterface} to declare\\n * their support of an interface.\\n */\\nabstract contract ERC165 is IERC165 {\\n /*\\n * bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7\\n */\\n bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7;\\n\\n /**\\n * @dev Mapping of interface ids to whether or not it's supported.\\n */\\n mapping(bytes4 => bool) private _supportedInterfaces;\\n\\n constructor () internal {\\n // Derived contracts need only register support for their own interfaces,\\n // we register support for ERC165 itself here\\n _registerInterface(_INTERFACE_ID_ERC165);\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n *\\n * Time complexity O(1), guaranteed to always use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return _supportedInterfaces[interfaceId];\\n }\\n\\n /**\\n * @dev Registers the contract as an implementer of the interface defined by\\n * `interfaceId`. Support of the actual ERC165 interface is automatic and\\n * registering its interface id is not required.\\n *\\n * See {IERC165-supportsInterface}.\\n *\\n * Requirements:\\n *\\n * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`).\\n */\\n function _registerInterface(bytes4 interfaceId) internal virtual {\\n require(interfaceId != 0xffffffff, \\\"ERC165: invalid interface id\\\");\\n _supportedInterfaces[interfaceId] = true;\\n }\\n}\\n\",\"keccak256\":\"0x24141d2f6b98d4cb77a8936eae8cbaad2e261d9062bdc08036096f4550092501\"},\"@openzeppelin/contracts/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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\":\"0xf70bc25d981e4ec9673a995ad2995d5d493ea188d3d8f388bba9c227ce09fb82\"},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\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 uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction 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 if (b > a) return (false, 0);\\n return (true, a - b);\\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 // 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 * @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 if (b == 0) return (false, 0);\\n return (true, a / b);\\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 if (b == 0) return (false, 0);\\n return (true, a % b);\\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 uint256 c = a + b;\\n require(c >= a, \\\"SafeMath: addition overflow\\\");\\n return c;\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\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 if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\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. 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) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\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 require(b > 0, \\\"SafeMath: modulo by zero\\\");\\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 require(b <= a, errorMessage);\\n return a - b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\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 require(b > 0, errorMessage);\\n return a / b;\\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 require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\"},\"@openzeppelin/contracts/presets/ERC721PresetMinterPauserAutoId.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../access/AccessControl.sol\\\";\\nimport \\\"../utils/Context.sol\\\";\\nimport \\\"../utils/Counters.sol\\\";\\nimport \\\"../token/ERC721/ERC721.sol\\\";\\nimport \\\"../token/ERC721/ERC721Burnable.sol\\\";\\nimport \\\"../token/ERC721/ERC721Pausable.sol\\\";\\n\\n/**\\n * @dev {ERC721} token, including:\\n *\\n * - ability for holders to burn (destroy) their tokens\\n * - a minter role that allows for token minting (creation)\\n * - a pauser role that allows to stop all token transfers\\n * - token ID and URI autogeneration\\n *\\n * This contract uses {AccessControl} to lock permissioned functions using the\\n * different roles - head to its documentation for details.\\n *\\n * The account that deploys the contract will be granted the minter and pauser\\n * roles, as well as the default admin role, which will let it grant both minter\\n * and pauser roles to other accounts.\\n */\\ncontract ERC721PresetMinterPauserAutoId is Context, AccessControl, ERC721Burnable, ERC721Pausable {\\n using Counters for Counters.Counter;\\n\\n bytes32 public constant MINTER_ROLE = keccak256(\\\"MINTER_ROLE\\\");\\n bytes32 public constant PAUSER_ROLE = keccak256(\\\"PAUSER_ROLE\\\");\\n\\n Counters.Counter private _tokenIdTracker;\\n\\n /**\\n * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE` and `PAUSER_ROLE` to the\\n * account that deploys the contract.\\n *\\n * Token URIs will be autogenerated based on `baseURI` and their token IDs.\\n * See {ERC721-tokenURI}.\\n */\\n constructor(string memory name, string memory symbol, string memory baseURI) public ERC721(name, symbol) {\\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\\n\\n _setupRole(MINTER_ROLE, _msgSender());\\n _setupRole(PAUSER_ROLE, _msgSender());\\n\\n _setBaseURI(baseURI);\\n }\\n\\n /**\\n * @dev Creates a new token for `to`. Its token ID will be automatically\\n * assigned (and available on the emitted {IERC721-Transfer} event), and the token\\n * URI autogenerated based on the base URI passed at construction.\\n *\\n * See {ERC721-_mint}.\\n *\\n * Requirements:\\n *\\n * - the caller must have the `MINTER_ROLE`.\\n */\\n function mint(address to) public virtual {\\n require(hasRole(MINTER_ROLE, _msgSender()), \\\"ERC721PresetMinterPauserAutoId: must have minter role to mint\\\");\\n\\n // We cannot just use balanceOf to create the new tokenId because tokens\\n // can be burned (destroyed), so we need a separate counter.\\n _mint(to, _tokenIdTracker.current());\\n _tokenIdTracker.increment();\\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() public virtual {\\n require(hasRole(PAUSER_ROLE, _msgSender()), \\\"ERC721PresetMinterPauserAutoId: must have pauser role to pause\\\");\\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() public virtual {\\n require(hasRole(PAUSER_ROLE, _msgSender()), \\\"ERC721PresetMinterPauserAutoId: must have pauser role to unpause\\\");\\n _unpause();\\n }\\n\\n function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override(ERC721, ERC721Pausable) {\\n super._beforeTokenTransfer(from, to, tokenId);\\n }\\n}\\n\",\"keccak256\":\"0x4b87b14833eeb61239208c31ea10bd73fdcd49a693c87f038b9429871f82a412\"},\"@openzeppelin/contracts/token/ERC721/ERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC721.sol\\\";\\nimport \\\"./IERC721Metadata.sol\\\";\\nimport \\\"./IERC721Enumerable.sol\\\";\\nimport \\\"./IERC721Receiver.sol\\\";\\nimport \\\"../../introspection/ERC165.sol\\\";\\nimport \\\"../../math/SafeMath.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/EnumerableSet.sol\\\";\\nimport \\\"../../utils/EnumerableMap.sol\\\";\\nimport \\\"../../utils/Strings.sol\\\";\\n\\n/**\\n * @title ERC721 Non-Fungible Token Standard basic implementation\\n * @dev see https://eips.ethereum.org/EIPS/eip-721\\n */\\ncontract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {\\n using SafeMath for uint256;\\n using Address for address;\\n using EnumerableSet for EnumerableSet.UintSet;\\n using EnumerableMap for EnumerableMap.UintToAddressMap;\\n using Strings for uint256;\\n\\n // Equals to `bytes4(keccak256(\\\"onERC721Received(address,address,uint256,bytes)\\\"))`\\n // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector`\\n bytes4 private constant _ERC721_RECEIVED = 0x150b7a02;\\n\\n // Mapping from holder address to their (enumerable) set of owned tokens\\n mapping (address => EnumerableSet.UintSet) private _holderTokens;\\n\\n // Enumerable mapping from token ids to their owners\\n EnumerableMap.UintToAddressMap private _tokenOwners;\\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 // Token name\\n string private _name;\\n\\n // Token symbol\\n string private _symbol;\\n\\n // Optional mapping for token URIs\\n mapping (uint256 => string) private _tokenURIs;\\n\\n // Base URI\\n string private _baseURI;\\n\\n /*\\n * bytes4(keccak256('balanceOf(address)')) == 0x70a08231\\n * bytes4(keccak256('ownerOf(uint256)')) == 0x6352211e\\n * bytes4(keccak256('approve(address,uint256)')) == 0x095ea7b3\\n * bytes4(keccak256('getApproved(uint256)')) == 0x081812fc\\n * bytes4(keccak256('setApprovalForAll(address,bool)')) == 0xa22cb465\\n * bytes4(keccak256('isApprovedForAll(address,address)')) == 0xe985e9c5\\n * bytes4(keccak256('transferFrom(address,address,uint256)')) == 0x23b872dd\\n * bytes4(keccak256('safeTransferFrom(address,address,uint256)')) == 0x42842e0e\\n * bytes4(keccak256('safeTransferFrom(address,address,uint256,bytes)')) == 0xb88d4fde\\n *\\n * => 0x70a08231 ^ 0x6352211e ^ 0x095ea7b3 ^ 0x081812fc ^\\n * 0xa22cb465 ^ 0xe985e9c5 ^ 0x23b872dd ^ 0x42842e0e ^ 0xb88d4fde == 0x80ac58cd\\n */\\n bytes4 private constant _INTERFACE_ID_ERC721 = 0x80ac58cd;\\n\\n /*\\n * bytes4(keccak256('name()')) == 0x06fdde03\\n * bytes4(keccak256('symbol()')) == 0x95d89b41\\n * bytes4(keccak256('tokenURI(uint256)')) == 0xc87b56dd\\n *\\n * => 0x06fdde03 ^ 0x95d89b41 ^ 0xc87b56dd == 0x5b5e139f\\n */\\n bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x5b5e139f;\\n\\n /*\\n * bytes4(keccak256('totalSupply()')) == 0x18160ddd\\n * bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) == 0x2f745c59\\n * bytes4(keccak256('tokenByIndex(uint256)')) == 0x4f6ccce7\\n *\\n * => 0x18160ddd ^ 0x2f745c59 ^ 0x4f6ccce7 == 0x780e9d63\\n */\\n bytes4 private constant _INTERFACE_ID_ERC721_ENUMERABLE = 0x780e9d63;\\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_) public {\\n _name = name_;\\n _symbol = symbol_;\\n\\n // register the supported interfaces to conform to ERC721 via ERC165\\n _registerInterface(_INTERFACE_ID_ERC721);\\n _registerInterface(_INTERFACE_ID_ERC721_METADATA);\\n _registerInterface(_INTERFACE_ID_ERC721_ENUMERABLE);\\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: balance query for the zero address\\\");\\n return _holderTokens[owner].length();\\n }\\n\\n /**\\n * @dev See {IERC721-ownerOf}.\\n */\\n function ownerOf(uint256 tokenId) public view virtual override returns (address) {\\n return _tokenOwners.get(tokenId, \\\"ERC721: owner query for nonexistent token\\\");\\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 require(_exists(tokenId), \\\"ERC721Metadata: URI query for nonexistent token\\\");\\n\\n string memory _tokenURI = _tokenURIs[tokenId];\\n string memory base = baseURI();\\n\\n // If there is no base URI, return the token URI.\\n if (bytes(base).length == 0) {\\n return _tokenURI;\\n }\\n // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked).\\n if (bytes(_tokenURI).length > 0) {\\n return string(abi.encodePacked(base, _tokenURI));\\n }\\n // If there is a baseURI but no tokenURI, concatenate the tokenID to the baseURI.\\n return string(abi.encodePacked(base, tokenId.toString()));\\n }\\n\\n /**\\n * @dev Returns the base URI set via {_setBaseURI}. This will be\\n * automatically added as a prefix in {tokenURI} to each token's URI, or\\n * to the token ID if no specific URI is set for that token ID.\\n */\\n function baseURI() public view virtual returns (string memory) {\\n return _baseURI;\\n }\\n\\n /**\\n * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.\\n */\\n function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {\\n return _holderTokens[owner].at(index);\\n }\\n\\n /**\\n * @dev See {IERC721Enumerable-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n // _tokenOwners are indexed by tokenIds, so .length() returns the number of tokenIds\\n return _tokenOwners.length();\\n }\\n\\n /**\\n * @dev See {IERC721Enumerable-tokenByIndex}.\\n */\\n function tokenByIndex(uint256 index) public view virtual override returns (uint256) {\\n (uint256 tokenId, ) = _tokenOwners.at(index);\\n return tokenId;\\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(_msgSender() == owner || ERC721.isApprovedForAll(owner, _msgSender()),\\n \\\"ERC721: approve caller is not owner nor 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 require(_exists(tokenId), \\\"ERC721: approved query for nonexistent token\\\");\\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 require(operator != _msgSender(), \\\"ERC721: approve to caller\\\");\\n\\n _operatorApprovals[_msgSender()][operator] = approved;\\n emit ApprovalForAll(_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: transfer caller is not owner nor 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: transfer caller is not owner nor 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 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 _tokenOwners.contains(tokenId);\\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 require(_exists(tokenId), \\\"ERC721: operator query for nonexistent token\\\");\\n address owner = ERC721.ownerOf(tokenId);\\n return (spender == owner || getApproved(tokenId) == spender || ERC721.isApprovedForAll(owner, spender));\\n }\\n\\n /**\\n * @dev Safely mints `tokenId` and transfers it to `to`.\\n *\\n * Requirements:\\n d*\\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(_checkOnERC721Received(address(0), to, tokenId, _data), \\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\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);\\n\\n _holderTokens[to].add(tokenId);\\n\\n _tokenOwners.set(tokenId, to);\\n\\n emit Transfer(address(0), to, tokenId);\\n }\\n\\n /**\\n * @dev Destroys `tokenId`.\\n * The approval is cleared when the token is burned.\\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); // internal owner\\n\\n _beforeTokenTransfer(owner, address(0), tokenId);\\n\\n // Clear approvals\\n _approve(address(0), tokenId);\\n\\n // Clear metadata (if any)\\n if (bytes(_tokenURIs[tokenId]).length != 0) {\\n delete _tokenURIs[tokenId];\\n }\\n\\n _holderTokens[owner].remove(tokenId);\\n\\n _tokenOwners.remove(tokenId);\\n\\n emit Transfer(owner, address(0), tokenId);\\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 of token that is not own\\\"); // internal owner\\n require(to != address(0), \\\"ERC721: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, tokenId);\\n\\n // Clear approvals from the previous owner\\n _approve(address(0), tokenId);\\n\\n _holderTokens[from].remove(tokenId);\\n _holderTokens[to].add(tokenId);\\n\\n _tokenOwners.set(tokenId, to);\\n\\n emit Transfer(from, to, tokenId);\\n }\\n\\n /**\\n * @dev Sets `_tokenURI` as the tokenURI of `tokenId`.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual {\\n require(_exists(tokenId), \\\"ERC721Metadata: URI set of nonexistent token\\\");\\n _tokenURIs[tokenId] = _tokenURI;\\n }\\n\\n /**\\n * @dev Internal function to set the base URI for all token IDs. It is\\n * automatically added as a prefix to the value returned in {tokenURI},\\n * or to the token ID if {tokenURI} is empty.\\n */\\n function _setBaseURI(string memory baseURI_) internal virtual {\\n _baseURI = baseURI_;\\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(address from, address to, uint256 tokenId, bytes memory _data)\\n private returns (bool)\\n {\\n if (!to.isContract()) {\\n return true;\\n }\\n bytes memory returndata = to.functionCall(abi.encodeWithSelector(\\n IERC721Receiver(to).onERC721Received.selector,\\n _msgSender(),\\n from,\\n tokenId,\\n _data\\n ), \\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n bytes4 retval = abi.decode(returndata, (bytes4));\\n return (retval == _ERC721_RECEIVED);\\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); // internal owner\\n }\\n\\n /**\\n * @dev Hook that is called before any token transfer. This includes minting\\n * and burning.\\n *\\n * Calling conditions:\\n *\\n * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be\\n * transferred to `to`.\\n * - When `from` is zero, `tokenId` will be minted for `to`.\\n * - When `to` is zero, ``from``'s `tokenId` will be burned.\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\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 tokenId) internal virtual { }\\n}\\n\",\"keccak256\":\"0x118ed7540f56b21ff92e21ebaa73584048e98d2ac04ca67571329bb8dbd9032f\"},\"@openzeppelin/contracts/token/ERC721/ERC721Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./ERC721.sol\\\";\\n\\n/**\\n * @title ERC721 Burnable Token\\n * @dev ERC721 Token that can be irreversibly 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), \\\"ERC721Burnable: caller is not owner nor approved\\\");\\n _burn(tokenId);\\n }\\n}\\n\",\"keccak256\":\"0x060925a04766df64ac29f56aaa3a38aafd71424ba4d996ca0f14363828b97056\"},\"@openzeppelin/contracts/token/ERC721/ERC721Pausable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./ERC721.sol\\\";\\nimport \\\"../../utils/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 */\\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(address from, address to, uint256 tokenId) internal virtual override {\\n super._beforeTokenTransfer(from, to, tokenId);\\n\\n require(!paused(), \\\"ERC721Pausable: token transfer while paused\\\");\\n }\\n}\\n\",\"keccak256\":\"0x1c31a4c2ad1af9e25cd8f4ea941ebd6a6a932426183ab39c160cb8e51cfc704f\"},\"@openzeppelin/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\nimport \\\"../../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`, 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 be 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: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\\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 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 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 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 /**\\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\",\"keccak256\":\"0x2d99a0deb6648c34fbc66d6ac4a2d64798d7a5321b45624f6736fadc63da1962\"},\"@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <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 /**\\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 tokenId);\\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\":\"0xe6bd1b1218338b6f9fe17776f48623b4ac3d8a40405f74a44bc23c00abe2ca13\"},\"@openzeppelin/contracts/token/ERC721/IERC721Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <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 /**\\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\":\"0xccb917776f826ac6b68bd5a15a5f711e3967848a52ba11e6104d9a4f593314a7\"},\"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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 `IERC721.onERC721Received.selector`.\\n */\\n function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0x52146049d6709c870e8ddcd988b5155cb6c5d640cfcd8978aee52bc1ba2ec4eb\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\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 */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n // solhint-disable-next-line no-inline-assembly\\n assembly { size := extcodesize(account) }\\n return size > 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://diligence.consensys.net/posts/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.5.11/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 // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\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 functionCall(target, data, \\\"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(address target, bytes memory data, string memory errorMessage) 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(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.call{ value: value }(data);\\n return _verifyCallResult(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(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(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(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\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\\n // solhint-disable-next-line no-inline-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}\\n\",\"keccak256\":\"0x28911e614500ae7c607a432a709d35da25f3bc5ddc8bd12b278b66358070c0ea\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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 GSN 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 payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\"},\"@openzeppelin/contracts/utils/Counters.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../math/SafeMath.sol\\\";\\n\\n/**\\n * @title Counters\\n * @author Matt Condon (@shrugs)\\n * @dev Provides counters that can only be incremented or decremented by one. This can be used e.g. to track the number\\n * of elements in a mapping, issuing ERC721 ids, or counting request ids.\\n *\\n * Include with `using Counters for Counters.Counter;`\\n * Since it is not possible to overflow a 256 bit integer with increments of one, `increment` can skip the {SafeMath}\\n * overflow check, thereby saving gas. This does assume however correct usage, in that the underlying `_value` is never\\n * directly accessed.\\n */\\nlibrary Counters {\\n using SafeMath for uint256;\\n\\n struct Counter {\\n // This variable should never be directly accessed by users of the library: interactions must be restricted to\\n // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\\n // this feature: see https://github.com/ethereum/solidity/issues/4637\\n uint256 _value; // default: 0\\n }\\n\\n function current(Counter storage counter) internal view returns (uint256) {\\n return counter._value;\\n }\\n\\n function increment(Counter storage counter) internal {\\n // The {SafeMath} overflow check can be skipped here, see the comment at the top\\n counter._value += 1;\\n }\\n\\n function decrement(Counter storage counter) internal {\\n counter._value = counter._value.sub(1);\\n }\\n}\\n\",\"keccak256\":\"0x21662e4254ce4ac8570b30cc7ab31435966b3cb778a56ba4d09276881cfb2437\"},\"@openzeppelin/contracts/utils/EnumerableMap.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Library for managing an enumerable variant of Solidity's\\n * https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]\\n * type.\\n *\\n * Maps have the following properties:\\n *\\n * - Entries are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Entries are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableMap for EnumerableMap.UintToAddressMap;\\n *\\n * // Declare a set state variable\\n * EnumerableMap.UintToAddressMap private myMap;\\n * }\\n * ```\\n *\\n * As of v3.0.0, only maps of type `uint256 -> address` (`UintToAddressMap`) are\\n * supported.\\n */\\nlibrary EnumerableMap {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Map type with\\n // bytes32 keys and values.\\n // The Map implementation uses private functions, and user-facing\\n // implementations (such as Uint256ToAddressMap) are just wrappers around\\n // the underlying Map.\\n // This means that we can only create new EnumerableMaps for types that fit\\n // in bytes32.\\n\\n struct MapEntry {\\n bytes32 _key;\\n bytes32 _value;\\n }\\n\\n struct Map {\\n // Storage of map keys and values\\n MapEntry[] _entries;\\n\\n // Position of the entry defined by a key in the `entries` array, plus 1\\n // because index 0 means a key is not in the map.\\n mapping (bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Adds a key-value pair to a map, or updates the value for an existing\\n * key. O(1).\\n *\\n * Returns true if the key was added to the map, that is if it was not\\n * already present.\\n */\\n function _set(Map storage map, bytes32 key, bytes32 value) private returns (bool) {\\n // We read and store the key's index to prevent multiple reads from the same storage slot\\n uint256 keyIndex = map._indexes[key];\\n\\n if (keyIndex == 0) { // Equivalent to !contains(map, key)\\n map._entries.push(MapEntry({ _key: key, _value: value }));\\n // The entry is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n map._indexes[key] = map._entries.length;\\n return true;\\n } else {\\n map._entries[keyIndex - 1]._value = value;\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a key-value pair from a map. O(1).\\n *\\n * Returns true if the key was removed from the map, that is if it was present.\\n */\\n function _remove(Map storage map, bytes32 key) private returns (bool) {\\n // We read and store the key's index to prevent multiple reads from the same storage slot\\n uint256 keyIndex = map._indexes[key];\\n\\n if (keyIndex != 0) { // Equivalent to contains(map, key)\\n // To delete a key-value pair from the _entries array in O(1), we swap the entry to delete with the last one\\n // in the array, and then remove the last entry (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = keyIndex - 1;\\n uint256 lastIndex = map._entries.length - 1;\\n\\n // When the entry to delete is the last one, the swap operation is unnecessary. However, since this occurs\\n // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\\n\\n MapEntry storage lastEntry = map._entries[lastIndex];\\n\\n // Move the last entry to the index where the entry to delete is\\n map._entries[toDeleteIndex] = lastEntry;\\n // Update the index for the moved entry\\n map._indexes[lastEntry._key] = toDeleteIndex + 1; // All indexes are 1-based\\n\\n // Delete the slot where the moved entry was stored\\n map._entries.pop();\\n\\n // Delete the index for the deleted slot\\n delete map._indexes[key];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the key is in the map. O(1).\\n */\\n function _contains(Map storage map, bytes32 key) private view returns (bool) {\\n return map._indexes[key] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of key-value pairs in the map. O(1).\\n */\\n function _length(Map storage map) private view returns (uint256) {\\n return map._entries.length;\\n }\\n\\n /**\\n * @dev Returns the key-value pair stored at position `index` in the map. O(1).\\n *\\n * Note that there are no guarantees on the ordering of entries inside the\\n * array, and it may change when more entries are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Map storage map, uint256 index) private view returns (bytes32, bytes32) {\\n require(map._entries.length > index, \\\"EnumerableMap: index out of bounds\\\");\\n\\n MapEntry storage entry = map._entries[index];\\n return (entry._key, entry._value);\\n }\\n\\n /**\\n * @dev Tries to returns the value associated with `key`. O(1).\\n * Does not revert if `key` is not in the map.\\n */\\n function _tryGet(Map storage map, bytes32 key) private view returns (bool, bytes32) {\\n uint256 keyIndex = map._indexes[key];\\n if (keyIndex == 0) return (false, 0); // Equivalent to contains(map, key)\\n return (true, map._entries[keyIndex - 1]._value); // All indexes are 1-based\\n }\\n\\n /**\\n * @dev Returns the value associated with `key`. O(1).\\n *\\n * Requirements:\\n *\\n * - `key` must be in the map.\\n */\\n function _get(Map storage map, bytes32 key) private view returns (bytes32) {\\n uint256 keyIndex = map._indexes[key];\\n require(keyIndex != 0, \\\"EnumerableMap: nonexistent key\\\"); // Equivalent to contains(map, key)\\n return map._entries[keyIndex - 1]._value; // All indexes are 1-based\\n }\\n\\n /**\\n * @dev Same as {_get}, with a custom error message when `key` is not in the map.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {_tryGet}.\\n */\\n function _get(Map storage map, bytes32 key, string memory errorMessage) private view returns (bytes32) {\\n uint256 keyIndex = map._indexes[key];\\n require(keyIndex != 0, errorMessage); // Equivalent to contains(map, key)\\n return map._entries[keyIndex - 1]._value; // All indexes are 1-based\\n }\\n\\n // UintToAddressMap\\n\\n struct UintToAddressMap {\\n Map _inner;\\n }\\n\\n /**\\n * @dev Adds a key-value pair to a map, or updates the value for an existing\\n * key. O(1).\\n *\\n * Returns true if the key was added to the map, that is if it was not\\n * already present.\\n */\\n function set(UintToAddressMap storage map, uint256 key, address value) internal returns (bool) {\\n return _set(map._inner, bytes32(key), bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the key was removed from the map, that is if it was present.\\n */\\n function remove(UintToAddressMap storage map, uint256 key) internal returns (bool) {\\n return _remove(map._inner, bytes32(key));\\n }\\n\\n /**\\n * @dev Returns true if the key is in the map. O(1).\\n */\\n function contains(UintToAddressMap storage map, uint256 key) internal view returns (bool) {\\n return _contains(map._inner, bytes32(key));\\n }\\n\\n /**\\n * @dev Returns the number of elements in the map. O(1).\\n */\\n function length(UintToAddressMap storage map) internal view returns (uint256) {\\n return _length(map._inner);\\n }\\n\\n /**\\n * @dev Returns the element stored at position `index` in the set. O(1).\\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(UintToAddressMap storage map, uint256 index) internal view returns (uint256, address) {\\n (bytes32 key, bytes32 value) = _at(map._inner, index);\\n return (uint256(key), address(uint160(uint256(value))));\\n }\\n\\n /**\\n * @dev Tries to returns the value associated with `key`. O(1).\\n * Does not revert if `key` is not in the map.\\n *\\n * _Available since v3.4._\\n */\\n function tryGet(UintToAddressMap storage map, uint256 key) internal view returns (bool, address) {\\n (bool success, bytes32 value) = _tryGet(map._inner, bytes32(key));\\n return (success, address(uint160(uint256(value))));\\n }\\n\\n /**\\n * @dev Returns the value associated with `key`. O(1).\\n *\\n * Requirements:\\n *\\n * - `key` must be in the map.\\n */\\n function get(UintToAddressMap storage map, uint256 key) internal view returns (address) {\\n return address(uint160(uint256(_get(map._inner, bytes32(key)))));\\n }\\n\\n /**\\n * @dev Same as {get}, with a custom error message when `key` is not in the map.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryGet}.\\n */\\n function get(UintToAddressMap storage map, uint256 key, string memory errorMessage) internal view returns (address) {\\n return address(uint160(uint256(_get(map._inner, bytes32(key), errorMessage))));\\n }\\n}\\n\",\"keccak256\":\"0x4b087f06b6670a131a5a14e53b1d2a5ef19c034cc5ec42eeebcf9554325744ad\"},\"@openzeppelin/contracts/utils/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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 * ```\\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 */\\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\\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) { // 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 // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs\\n // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\\n\\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] = toDeleteIndex + 1; // All indexes are 1-based\\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 require(set._values.length > index, \\\"EnumerableSet: index out of bounds\\\");\\n return set._values[index];\\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 // 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 // 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 on 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\",\"keccak256\":\"0x1562cd9922fbf739edfb979f506809e2743789cbde3177515542161c3d04b164\"},\"@openzeppelin/contracts/utils/Pausable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./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 () internal {\\n _paused = false;\\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 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 require(!paused(), \\\"Pausable: paused\\\");\\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 require(paused(), \\\"Pausable: not paused\\\");\\n _;\\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\":\"0x212fb1b1d4beaf74354dad9bc329f44ee3c5375ef1c32acff76b4ecefc10f1d8\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n uint256 index = digits - 1;\\n temp = value;\\n while (temp != 0) {\\n buffer[index--] = bytes1(uint8(48 + temp % 10));\\n temp /= 10;\\n }\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0xa1e12f97981f1d0964b1c048978606a57127c56c438bab61cdfe269cad859a74\"},\"contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.6 <0.9.0;\\n\\nimport {CryptOrchidGoerli} from \\\"../CryptOrchidGoerli/CryptOrchidGoerli.sol\\\";\\nimport {AccessControlMixin} from \\\"../Libraries/matic/common/AccessControlMixin.sol\\\";\\nimport {IChildToken} from \\\"../Libraries/matic/child/ChildToken/IChildToken.sol\\\";\\nimport {NativeMetaTransaction} from \\\"../Libraries/matic/common/NativeMetaTransaction.sol\\\";\\nimport {ContextMixin} from \\\"../Libraries/matic/common/ContextMixin.sol\\\";\\nimport {FxBaseChildTunnel} from \\\"../Libraries/tunnel/FxBaseChildTunnel.sol\\\";\\n\\ncontract CryptOrchidERC721Child is\\n CryptOrchidGoerli,\\n IChildToken,\\n AccessControlMixin,\\n NativeMetaTransaction,\\n ContextMixin,\\n FxBaseChildTunnel\\n{\\n bytes32 public constant DEPOSITOR_ROLE = keccak256(\\\"DEPOSITOR_ROLE\\\");\\n\\n // limit batching of tokens due to gas limit restrictions\\n uint256 public constant BATCH_LIMIT = 20;\\n\\n event WithdrawnBatch(address indexed user, uint256[] tokenIds);\\n event TransferWithMetadata(address indexed from, address indexed to, uint256 indexed tokenId, bytes metaData);\\n\\n constructor(address childChainManager, address _fxChild) public CryptOrchidGoerli() FxBaseChildTunnel(_fxChild) {\\n _setupContractId(\\\"CryptOrchidERC721Child\\\");\\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\\n _setupRole(DEPOSITOR_ROLE, childChainManager);\\n _initializeEIP712(\\\"CryptOrchids\\\");\\n }\\n\\n // This is to support Native meta transactions\\n // never use msg.sender directly, use _msgSender() instead\\n function _msgSender() internal view override returns (address payable sender) {\\n return ContextMixin.msgSender();\\n }\\n\\n /**\\n * @notice called when token is deposited on root chain\\n * @dev Should be callable only by ChildChainManager\\n * Should handle deposit by minting the required tokenId for user\\n * Make sure minting is done only by this function\\n * @param user user address for whom deposit is being done\\n * @param depositData abi encoded tokenId\\n */\\n function deposit(address user, bytes calldata depositData) external override only(DEPOSITOR_ROLE) {\\n // deposit single\\n if (depositData.length == 32) {\\n uint256 tokenId = abi.decode(depositData, (uint256));\\n _mint(user, tokenId);\\n\\n // deposit batch\\n } else {\\n uint256[] memory tokenIds = abi.decode(depositData, (uint256[]));\\n uint256 length = tokenIds.length;\\n for (uint256 i; i < length; i++) {\\n _mint(user, tokenIds[i]);\\n }\\n }\\n }\\n\\n /**\\n * @notice called when user wants to withdraw token back to root chain\\n * @dev Should burn user's token. This transaction will be verified when exiting on root chain\\n * @param tokenId tokenId to withdraw\\n */\\n function withdraw(uint256 tokenId) external {\\n require(_msgSender() == ownerOf(tokenId), \\\"ChildERC721: INVALID_TOKEN_OWNER\\\");\\n _burn(tokenId);\\n }\\n\\n /**\\n * @notice called when user wants to withdraw multiple tokens back to root chain\\n * @dev Should burn user's tokens. This transaction will be verified when exiting on root chain\\n * @param tokenIds tokenId list to withdraw\\n */\\n function withdrawBatch(uint256[] calldata tokenIds) external {\\n uint256 length = tokenIds.length;\\n require(length <= BATCH_LIMIT, \\\"ChildERC721: EXCEEDS_BATCH_LIMIT\\\");\\n for (uint256 i; i < length; i++) {\\n uint256 tokenId = tokenIds[i];\\n require(\\n _msgSender() == ownerOf(tokenId),\\n string(abi.encodePacked(\\\"ChildERC721: INVALID_TOKEN_OWNER \\\", tokenId))\\n );\\n _burn(tokenId);\\n }\\n emit WithdrawnBatch(_msgSender(), tokenIds);\\n }\\n\\n /**\\n * @notice called when user wants to withdraw token back to root chain with arbitrary metadata\\n * @dev Should handle withraw by burning user's token.\\n *\\n * This transaction will be verified when exiting on root chain\\n *\\n * @param tokenId tokenId to withdraw\\n */\\n function withdrawWithMetadata(uint256 tokenId) external {\\n require(_msgSender() == ownerOf(tokenId), \\\"ChildERC721: INVALID_TOKEN_OWNER\\\");\\n\\n // Encoding metadata associated with tokenId & emitting event\\n emit TransferWithMetadata(_msgSender(), address(0), tokenId, this.encodeTokenMetadata(tokenId));\\n\\n _burn(tokenId);\\n }\\n\\n /**\\n * @notice This method is supposed to be called by client when withdrawing token with metadata\\n * and pass return value of this function as second paramter of `withdrawWithMetadata` method\\n *\\n * It can be overridden by clients to encode data in a different form, which needs to\\n * be decoded back by them correctly during exiting\\n *\\n * @param tokenId Token for which URI to be fetched\\n */\\n function encodeTokenMetadata(uint256 tokenId) external view virtual returns (bytes memory) {\\n // You're always free to change this default implementation\\n // and pack more data in byte array which can be decoded back\\n // in L1\\n return abi.encode(tokenURI(tokenId));\\n }\\n\\n function _processMessageFromRoot(\\n uint256 stateId,\\n address sender,\\n bytes memory data\\n ) internal override validateSender(sender) {\\n (string memory species, uint256 plantedAt, uint256 waterLevel, uint256 tokenId) = abi.decode(\\n data,\\n (string, uint256, uint256, uint256)\\n );\\n cryptorchids[tokenId] = CryptOrchid({species: species, plantedAt: plantedAt, waterLevel: waterLevel});\\n }\\n\\n function sendMessageToRoot(bytes memory message) public {\\n _sendMessageToRoot(message);\\n }\\n}\\n\",\"keccak256\":\"0xa6717dcc09c48c93ec0650e8e2a9588653a4967624e2828c282117d56f2e1128\"},\"contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n// NB: this is only meant to deploy to goerli, where chainlink VRF is unavailable.\\n// goerli connects to polygon mumbai, which is what we need to test PoS bridging.\\n// Deploy scripts prevent other contracts from goerli deploy, and this contract from\\n// anything other than goerlui\\npragma solidity >=0.6.6 <0.9.0;\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"@openzeppelin/contracts/math/SafeMath.sol\\\";\\nimport \\\"@openzeppelin/contracts/presets/ERC721PresetMinterPauserAutoId.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/Counters.sol\\\";\\nimport \\\"../Libraries/CurrentTime.sol\\\";\\n\\ncontract CryptOrchidGoerli is ERC721PresetMinterPauserAutoId, Ownable, CurrentTime {\\n using SafeMath for uint256;\\n using Strings for string;\\n using Counters for Counters.Counter;\\n\\n struct CryptOrchid {\\n string species;\\n uint256 plantedAt;\\n uint256 waterLevel;\\n }\\n mapping(uint256 => CryptOrchid) public cryptorchids;\\n\\n enum Stage {Unsold, Seed, Flower, Dead}\\n\\n bool internal saleStarted = false;\\n bool internal growingStarted = false;\\n\\n uint256 public constant MAX_CRYPTORCHIDS = 10000;\\n uint256 public constant GROWTH_CYCLE = 604800; // 7 days\\n uint256 public constant WATERING_WINDOW = 10800; // 3 hours\\n uint256 internal constant MAX_TIMESTAMP = 2**256 - 1;\\n string internal constant GRANUM_IPFS = \\\"QmWd1mn7DuGyx9ByfNeqCsgdSUsJZ1cragitgaygsqDvEm\\\";\\n\\n uint16[10] private limits = [0, 3074, 6074, 8074, 9074, 9574, 9824, 9924, 9974, 9999];\\n string[10] private genum = [\\n \\\"shenzhenica orchidaceae\\\",\\n \\\"phalaenopsis micholitzii\\\",\\n \\\"guarianthe aurantiaca\\\",\\n \\\"vanda coerulea\\\",\\n \\\"cypripedium calceolus\\\",\\n \\\"paphiopedilum vietnamense\\\",\\n \\\"miltonia kayasimae\\\",\\n \\\"platanthera azorica\\\",\\n \\\"dendrophylax lindenii\\\",\\n \\\"paphiopedilum rothschildianum\\\"\\n ];\\n\\n string[10] private speciesIPFSConstant = [\\n \\\"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/shenzhenica-orchidaceae.json\\\",\\n \\\"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/phalaenopsis-micholitzii.json\\\",\\n \\\"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/guarianthe-aurantiaca.json\\\",\\n \\\"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/vanda-coerulea.json\\\",\\n \\\"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/cypripedium-calceolus.json\\\",\\n \\\"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/paphiopedilum-vietnamense.json\\\",\\n \\\"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/miltonia-kayasimae.json\\\",\\n \\\"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/platanthera-azorica.json\\\",\\n \\\"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/dendrophylax-lindenii.json\\\",\\n \\\"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/paphiopedilum-rothschildianum.json\\\"\\n ];\\n\\n string[10] private deadSpeciesIPFSConstant = [\\n \\\"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/shenzhenica-orchidaceae.json\\\",\\n \\\"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/phalaenopsis-micholitzii.json\\\",\\n \\\"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/guarianthe-aurantiaca.json\\\",\\n \\\"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/vanda-coerulea.json\\\",\\n \\\"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/cypripedium-calceolus.json\\\",\\n \\\"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/paphiopedilum-vietnamense.json\\\",\\n \\\"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/miltonia-kayasimae.json\\\",\\n \\\"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/platanthera-azorica.json\\\",\\n \\\"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/dendrophylax-lindenii.json\\\",\\n \\\"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/paphiopedilum-rothschildianum.json\\\"\\n ];\\n\\n Counters.Counter private _tokenIds;\\n\\n mapping(bytes32 => uint256) public requestToToken;\\n mapping(bytes32 => string) private speciesIPFS;\\n mapping(bytes32 => string) private deadSpeciesIPFS;\\n\\n constructor() public payable ERC721PresetMinterPauserAutoId(\\\"CryptOrchids\\\", \\\"ORCHD\\\", \\\"ipfs://\\\") {\\n for (uint256 index = 0; index < genum.length; index++) {\\n speciesIPFS[keccak256(abi.encode(genum[index]))] = speciesIPFSConstant[index];\\n deadSpeciesIPFS[keccak256(abi.encode(genum[index]))] = deadSpeciesIPFSConstant[index];\\n }\\n }\\n\\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\\n (string memory species, , , ) = getTokenMetadata(tokenId);\\n\\n if (growthStage(tokenId) == Stage.Seed) {\\n return string(abi.encodePacked(baseURI(), GRANUM_IPFS));\\n }\\n\\n if (growthStage(tokenId) == Stage.Flower) {\\n return string(abi.encodePacked(baseURI(), speciesIPFS[keccak256(abi.encode(species))]));\\n }\\n\\n return string(abi.encodePacked(baseURI(), deadSpeciesIPFS[keccak256(abi.encode(species))]));\\n }\\n\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 tokenId\\n ) internal virtual override {\\n require(address(0) == to || alive(tokenId), \\\"Dead CryptOrchids cannot be transferred\\\");\\n super._beforeTokenTransfer(from, to, tokenId);\\n }\\n\\n function currentPrice() public view returns (uint256 price) {\\n uint256 currentSupply = totalSupply();\\n if (currentSupply >= 9900) {\\n return 1000000000000000000; // 9900+: 1.00 ETH\\n } else if (currentSupply >= 9500) {\\n return 640000000000000000; // 9500-9500: 0.64 ETH\\n } else if (currentSupply >= 7500) {\\n return 320000000000000000; // 7500-9500: 0.32 ETH\\n } else if (currentSupply >= 3500) {\\n return 160000000000000000; // 3500-7500: 0.16 ETH\\n } else if (currentSupply >= 1500) {\\n return 80000000000000000; // 1500-3500: 0.08 ETH\\n } else if (currentSupply >= 500) {\\n return 60000000000000000; // 500-1500: 0.06 ETH\\n } else {\\n return 40000000000000000; // 0 - 500 0.04 ETH\\n }\\n }\\n\\n function startSale() public onlyOwner {\\n saleStarted = true;\\n }\\n\\n function startGrowing() public onlyOwner {\\n growingStarted = true;\\n }\\n\\n /**\\n * @dev Withdraw ether from this contract (Callable by owner only)\\n */\\n function withdraw() public onlyOwner {\\n uint256 balance = address(this).balance;\\n msg.sender.transfer(balance);\\n }\\n\\n receive() external payable {}\\n\\n function webMint(uint256 units) public payable {\\n require(saleStarted, \\\"The Nursery is closed\\\");\\n require(units <= MAX_CRYPTORCHIDS - totalSupply(), \\\"Not enough bulbs left\\\");\\n require(totalSupply() < MAX_CRYPTORCHIDS, \\\"Sale has already ended\\\");\\n require(units > 0 && units <= 20, \\\"You can plant minimum 1, maximum 20 CryptOrchids\\\");\\n require(SafeMath.add(totalSupply(), units) <= MAX_CRYPTORCHIDS, \\\"Exceeds MAX_CRYPTORCHIDS\\\");\\n require(msg.value >= SafeMath.mul(currentPrice(), units), \\\"Ether value sent is below the price\\\");\\n\\n for (uint256 i = 0; i < units; i++) {\\n _tokenIds.increment();\\n uint256 newItemId = _tokenIds.current();\\n cryptorchids[newItemId] = CryptOrchid({species: \\\"granum\\\", plantedAt: MAX_TIMESTAMP, waterLevel: 0});\\n _safeMint(msg.sender, newItemId);\\n }\\n }\\n\\n function germinate(uint256 tokenId, uint256 userProvidedSeed) public {\\n require(growingStarted, \\\"Germination starts 2021-04-12T16:00:00Z\\\");\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"Only the Owner can germinate a CryptOrchid.\\\");\\n _requestRandom(tokenId, userProvidedSeed);\\n }\\n\\n function _requestRandom(uint256 tokenId, uint256 userProvidedSeed) internal returns (bytes32 requestId) {\\n uint256 pseudoRand = uint256(keccak256(abi.encodePacked(block.timestamp, block.difficulty, userProvidedSeed)));\\n fulfillRandomness(tokenId, pseudoRand);\\n }\\n\\n function fulfillRandomness(uint256 tokenId, uint256 randomness) internal {\\n CryptOrchid storage orchid = cryptorchids[tokenId];\\n string memory species = pickSpecies(SafeMath.mod(randomness, 10000));\\n orchid.species = species;\\n orchid.plantedAt = currentTime();\\n address tokenOwner = ownerOf(tokenId);\\n }\\n\\n function alive(uint256 tokenId) public view returns (bool) {\\n return growthStage(tokenId) != Stage.Dead;\\n }\\n\\n function flowering(uint256 tokenId) public view returns (bool) {\\n return growthStage(tokenId) == Stage.Flower;\\n }\\n\\n function growthStage(uint256 tokenId) public view returns (Stage) {\\n CryptOrchid memory orchid = cryptorchids[tokenId];\\n if (orchid.plantedAt == 0) return Stage.Unsold;\\n if (orchid.plantedAt == MAX_TIMESTAMP) return Stage.Seed;\\n uint256 currentWaterLevel = orchid.waterLevel;\\n uint256 elapsed = currentTime() - orchid.plantedAt;\\n uint256 fullCycles = SafeMath.div(uint256(elapsed), GROWTH_CYCLE);\\n uint256 modulo = SafeMath.mod(elapsed, GROWTH_CYCLE);\\n\\n if (currentWaterLevel == fullCycles) {\\n return Stage.Flower;\\n }\\n\\n if (SafeMath.add(currentWaterLevel, 1) == fullCycles && modulo < WATERING_WINDOW) {\\n return Stage.Flower;\\n }\\n\\n return Stage.Dead;\\n }\\n\\n function water(uint256 tokenId) public {\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"Only the Owner can water a CryptOrchid.\\\");\\n\\n if (!alive(tokenId)) {\\n return;\\n }\\n\\n CryptOrchid storage orchid = cryptorchids[tokenId];\\n\\n uint256 wateringLevel = orchid.waterLevel;\\n uint256 elapsed = currentTime() - orchid.plantedAt;\\n uint256 fullCycles = SafeMath.div(uint256(elapsed), GROWTH_CYCLE);\\n\\n if (wateringLevel > fullCycles) {\\n return;\\n }\\n\\n uint256 newWaterLevel = SafeMath.add(wateringLevel, 1);\\n orchid.waterLevel = newWaterLevel;\\n }\\n\\n function getTokenMetadata(uint256 tokenId)\\n public\\n view\\n returns (\\n string memory,\\n uint256,\\n uint256,\\n Stage\\n )\\n {\\n return (\\n cryptorchids[tokenId].species,\\n cryptorchids[tokenId].plantedAt,\\n cryptorchids[tokenId].waterLevel,\\n growthStage(tokenId)\\n );\\n }\\n\\n /**\\n * @notice Pick species for random number index\\n * @param randomIndex uint256\\n * @return species string\\n */\\n function pickSpecies(uint256 randomIndex) private view returns (string memory) {\\n for (uint256 i = 0; i < 10; i++) {\\n if (randomIndex <= limits[i]) {\\n return genum[i];\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x51b1f3e914311c7a69ad3795e877e316b1740b2f4da01bf1bb3a1100f83af446\"},\"contracts/Libraries/CurrentTime.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.6 <0.9.0;\\n\\ncontract CurrentTime {\\n function currentTime() internal view virtual returns (uint256) {\\n return block.timestamp;\\n }\\n}\\n\",\"keccak256\":\"0xa9a311d0f67d3d7aabd318210bed7051401151fa5f45e75071d7a52c50214cee\"},\"contracts/Libraries/matic/child/ChildToken/IChildToken.sol\":{\"content\":\"pragma solidity 0.6.6;\\n\\ninterface IChildToken {\\n function deposit(address user, bytes calldata depositData) external;\\n}\\n\",\"keccak256\":\"0x0daa27038b5143761eff366e3f795295f20eb46cc6092617fcecb94a9694636a\"},\"contracts/Libraries/matic/common/AccessControlMixin.sol\":{\"content\":\"pragma solidity 0.6.6;\\n\\nimport {AccessControl} from \\\"@openzeppelin/contracts/access/AccessControl.sol\\\";\\n\\ncontract AccessControlMixin is AccessControl {\\n string private _revertMsg;\\n function _setupContractId(string memory contractId) internal {\\n _revertMsg = string(abi.encodePacked(contractId, \\\": INSUFFICIENT_PERMISSIONS\\\"));\\n }\\n\\n modifier only(bytes32 role) {\\n require(\\n hasRole(role, _msgSender()),\\n _revertMsg\\n );\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x27a3479070b6d90caaf333a46690021569e6bc555e2f5a1e40fedab3b7688c28\"},\"contracts/Libraries/matic/common/ContextMixin.sol\":{\"content\":\"pragma solidity 0.6.6;\\n\\nabstract contract ContextMixin {\\n function msgSender()\\n internal\\n view\\n returns (address payable sender)\\n {\\n if (msg.sender == address(this)) {\\n bytes memory array = msg.data;\\n uint256 index = msg.data.length;\\n assembly {\\n // Load the 32 bytes word from memory with the address on the lower 20 bytes, and mask those.\\n sender := and(\\n mload(add(array, index)),\\n 0xffffffffffffffffffffffffffffffffffffffff\\n )\\n }\\n } else {\\n sender = msg.sender;\\n }\\n return sender;\\n }\\n}\\n\",\"keccak256\":\"0xb9c8d90444f3cb8aeadd6c400d42c777068be5d46cb74f28313508284b224b34\"},\"contracts/Libraries/matic/common/EIP712Base.sol\":{\"content\":\"pragma solidity 0.6.6;\\n\\nimport {Initializable} from \\\"./Initializable.sol\\\";\\n\\ncontract EIP712Base is Initializable {\\n struct EIP712Domain {\\n string name;\\n string version;\\n address verifyingContract;\\n bytes32 salt;\\n }\\n\\n string constant public ERC712_VERSION = \\\"1\\\";\\n\\n bytes32 internal constant EIP712_DOMAIN_TYPEHASH = keccak256(\\n bytes(\\n \\\"EIP712Domain(string name,string version,address verifyingContract,bytes32 salt)\\\"\\n )\\n );\\n bytes32 internal domainSeperator;\\n\\n // supposed to be called once while initializing.\\n // one of the contractsa that inherits this contract follows proxy pattern\\n // so it is not possible to do this in a constructor\\n function _initializeEIP712(\\n string memory name\\n )\\n internal\\n initializer\\n {\\n _setDomainSeperator(name);\\n }\\n\\n function _setDomainSeperator(string memory name) internal {\\n domainSeperator = keccak256(\\n abi.encode(\\n EIP712_DOMAIN_TYPEHASH,\\n keccak256(bytes(name)),\\n keccak256(bytes(ERC712_VERSION)),\\n address(this),\\n bytes32(getChainId())\\n )\\n );\\n }\\n\\n function getDomainSeperator() public view returns (bytes32) {\\n return domainSeperator;\\n }\\n\\n function getChainId() public pure returns (uint256) {\\n uint256 id;\\n assembly {\\n id := chainid()\\n }\\n return id;\\n }\\n\\n /**\\n * Accept message hash and returns hash message in EIP712 compatible form\\n * So that it can be used to recover signer from signature signed using EIP712 formatted data\\n * https://eips.ethereum.org/EIPS/eip-712\\n * \\\"\\\\\\\\x19\\\" makes the encoding deterministic\\n * \\\"\\\\\\\\x01\\\" is the version byte to make it compatible to EIP-191\\n */\\n function toTypedMessageHash(bytes32 messageHash)\\n internal\\n view\\n returns (bytes32)\\n {\\n return\\n keccak256(\\n abi.encodePacked(\\\"\\\\x19\\\\x01\\\", getDomainSeperator(), messageHash)\\n );\\n }\\n}\\n\",\"keccak256\":\"0x8388a5fa3ddc45ec21c8b24b09d511539af270ae5b0d62ba363da40fd5bb9b65\"},\"contracts/Libraries/matic/common/Initializable.sol\":{\"content\":\"pragma solidity 0.6.6;\\n\\ncontract Initializable {\\n bool inited = false;\\n\\n modifier initializer() {\\n require(!inited, \\\"already inited\\\");\\n _;\\n inited = true;\\n }\\n}\\n\",\"keccak256\":\"0xa21250206c1423c08d7cf64f3f7213570b1d64ee262e9444e02aca7194182505\"},\"contracts/Libraries/matic/common/NativeMetaTransaction.sol\":{\"content\":\"pragma solidity 0.6.6;\\n\\nimport {SafeMath} from \\\"@openzeppelin/contracts/math/SafeMath.sol\\\";\\nimport {EIP712Base} from \\\"./EIP712Base.sol\\\";\\n\\ncontract NativeMetaTransaction is EIP712Base {\\n using SafeMath for uint256;\\n bytes32 private constant META_TRANSACTION_TYPEHASH = keccak256(\\n bytes(\\n \\\"MetaTransaction(uint256 nonce,address from,bytes functionSignature)\\\"\\n )\\n );\\n event MetaTransactionExecuted(\\n address userAddress,\\n address payable relayerAddress,\\n bytes functionSignature\\n );\\n mapping(address => uint256) nonces;\\n\\n /*\\n * Meta transaction structure.\\n * No point of including value field here as if user is doing value transfer then he has the funds to pay for gas\\n * He should call the desired function directly in that case.\\n */\\n struct MetaTransaction {\\n uint256 nonce;\\n address from;\\n bytes functionSignature;\\n }\\n\\n function executeMetaTransaction(\\n address userAddress,\\n bytes memory functionSignature,\\n bytes32 sigR,\\n bytes32 sigS,\\n uint8 sigV\\n ) public payable returns (bytes memory) {\\n MetaTransaction memory metaTx = MetaTransaction({\\n nonce: nonces[userAddress],\\n from: userAddress,\\n functionSignature: functionSignature\\n });\\n\\n require(\\n verify(userAddress, metaTx, sigR, sigS, sigV),\\n \\\"Signer and signature do not match\\\"\\n );\\n\\n // increase nonce for user (to avoid re-use)\\n nonces[userAddress] = nonces[userAddress].add(1);\\n\\n emit MetaTransactionExecuted(\\n userAddress,\\n msg.sender,\\n functionSignature\\n );\\n\\n // Append userAddress and relayer address at the end to extract it from calling context\\n (bool success, bytes memory returnData) = address(this).call(\\n abi.encodePacked(functionSignature, userAddress)\\n );\\n require(success, \\\"Function call not successful\\\");\\n\\n return returnData;\\n }\\n\\n function hashMetaTransaction(MetaTransaction memory metaTx)\\n internal\\n pure\\n returns (bytes32)\\n {\\n return\\n keccak256(\\n abi.encode(\\n META_TRANSACTION_TYPEHASH,\\n metaTx.nonce,\\n metaTx.from,\\n keccak256(metaTx.functionSignature)\\n )\\n );\\n }\\n\\n function getNonce(address user) public view returns (uint256 nonce) {\\n nonce = nonces[user];\\n }\\n\\n function verify(\\n address signer,\\n MetaTransaction memory metaTx,\\n bytes32 sigR,\\n bytes32 sigS,\\n uint8 sigV\\n ) internal view returns (bool) {\\n require(signer != address(0), \\\"NativeMetaTransaction: INVALID_SIGNER\\\");\\n return\\n signer ==\\n ecrecover(\\n toTypedMessageHash(hashMetaTransaction(metaTx)),\\n sigV,\\n sigR,\\n sigS\\n );\\n }\\n}\\n\",\"keccak256\":\"0x3b03c8bbb1c01c3da7cec46e8904efd5a183778f7d1682b4271c2b27cc79ffe9\"},\"contracts/Libraries/tunnel/FxBaseChildTunnel.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.6.6 <0.9.0;\\n\\n// IFxMessageProcessor represents interface to process message\\ninterface IFxMessageProcessor {\\n function processMessageFromRoot(\\n uint256 stateId,\\n address rootMessageSender,\\n bytes calldata data\\n ) external;\\n}\\n\\n/**\\n * @notice Mock child tunnel contract to receive and send message from L2\\n */\\nabstract contract FxBaseChildTunnel is IFxMessageProcessor {\\n // MessageTunnel on L1 will get data from this event\\n event MessageSent(bytes message);\\n\\n // fx child\\n address public fxChild;\\n\\n // fx root tunnel\\n address public fxRootTunnel;\\n\\n constructor(address _fxChild) internal {\\n fxChild = _fxChild;\\n }\\n\\n // Sender must be fxRootTunnel in case of ERC20 tunnel\\n modifier validateSender(address sender) {\\n require(sender == fxRootTunnel, \\\"FxBaseChildTunnel: INVALID_SENDER_FROM_ROOT\\\");\\n _;\\n }\\n\\n // set fxRootTunnel if not set already\\n function setFxRootTunnel(address _fxRootTunnel) public {\\n require(fxRootTunnel == address(0x0), \\\"FxBaseChildTunnel: ROOT_TUNNEL_ALREADY_SET\\\");\\n fxRootTunnel = _fxRootTunnel;\\n }\\n\\n function processMessageFromRoot(\\n uint256 stateId,\\n address rootMessageSender,\\n bytes memory data\\n ) public override {\\n require(msg.sender == fxChild, \\\"FxBaseChildTunnel: INVALID_SENDER\\\");\\n _processMessageFromRoot(stateId, rootMessageSender, data);\\n }\\n\\n /**\\n * @notice Emit message that can be received on Root Tunnel\\n * @dev Call the internal function when need to emit message\\n * @param message bytes message that will be sent to Root Tunnel\\n * some message examples -\\n * abi.encode(tokenId);\\n * abi.encode(tokenId, tokenMetadata);\\n * abi.encode(messageType, messageData);\\n */\\n function _sendMessageToRoot(bytes memory message) internal {\\n emit MessageSent(message);\\n }\\n\\n /**\\n * @notice Process message received from Root Tunnel\\n * @dev function needs to be implemented to handle message as per requirement\\n * This is called by onStateReceive function.\\n * Since it is called via a system call, any event will not be emitted during its execution.\\n * @param stateId unique state id\\n * @param sender root message sender\\n * @param message bytes message that was sent from Root Tunnel\\n */\\n function _processMessageFromRoot(\\n uint256 stateId,\\n address sender,\\n bytes memory message\\n ) internal virtual;\\n}\\n\",\"keccak256\":\"0x2647c2b78752eb7614409270c147e39319e1d74dd67261e4883c29abaaf49094\"}},\"version\":1}", + "bytecode": "0x600f805461ffff191690556101c060405260006080908152610c0260a0526117ba60c052611f8a60e0526123726101005261256661012052612660610140526126c4610160526126f66101805261270f6101a0526200006390601090600a62000e8d565b506040805161018081018252601761014082019081527f7368656e7a68656e696361206f72636869646163656165000000000000000000610160830152815281518083018352601881527f7068616c61656e6f70736973206d6963686f6c69747a69690000000000000000602082810191909152808301919091528251808401845260158082527f6775617269616e74686520617572616e74696163610000000000000000000000828401528385019190915283518085018552600e81526d76616e646120636f6572756c656160901b818401526060840152835180850185528181527f637970726970656469756d2063616c63656f6c7573000000000000000000000081840152608084015283518085018552601981527f70617068696f706564696c756d20766965746e616d656e7365000000000000008184015260a08401528351808501855260128152716d696c746f6e6961206b61796173696d616560701b8184015260c084015283518085018552601381527f706c6174616e746865726120617a6f72696361000000000000000000000000008184015260e0840152835180850185529081527f64656e64726f7068796c6178206c696e64656e69690000000000000000000000818301526101008301528251808401909352601d83527f70617068696f706564696c756d20726f7468736368696c6469616e756d000000908301526101208101919091526200028390601190600a62000f2a565b50604080516101c08101909152604b6101408201818152829162006a9e61016084013981526020016040518060800160405280604c815260200162006934604c9139815260200160405180608001604052806049815260200162006bc260499139815260200160405180608001604052806042815260200162006b2f604291398152602001604051806080016040528060498152602001620068eb6049913981526020016040518060800160405280604d815260200162006a08604d9139815260200160405180608001604052806046815260200162006ae960469139815260200160405180608001604052806047815260200162006d3860479139815260200160405180608001604052806049815260200162006c5860499139815260200160405180608001604052806051815260200162006804605191399052620003cf90601b90600a62000f2a565b50604080516101c08101909152604b6101408201818152829162006ced61016084013981526020016040518060800160405280604c815260200162006ca1604c9139815260200160405180608001604052806049815260200162006a5560499139815260200160405180608001604052806042815260200162006980604291398152602001604051806080016040528060498152602001620067726049913981526020016040518060800160405280604d815260200162006c0b604d91398152602001604051806080016040528060468152602001620069c260469139815260200160405180608001604052806047815260200162006855604791398152602001604051806080016040528060498152602001620067bb60499139815260200160405180608001604052806051815260200162006b716051913990526200051b90602590600a62000f2a565b506034805460ff191690553480156200053357600080fd5b5060405162006d7f38038062006d7f833981810160405260408110156200055957600080fd5b508051602091820151604080518082018252600c81526b43727970744f72636869647360a01b8186015281518083018352600581526413d490d21160da1b8187015282518084019093526007835266697066733a2f2f60c81b9583019590955292939192839290918282620005de6301ffc9a760e01b6001600160e01b0362000a6416565b8151620005f390600790602085019062000f7d565b5080516200060990600890602084019062000f7d565b50620006256380ac58cd60e01b6001600160e01b0362000a6416565b62000640635b5e139f60e01b6001600160e01b0362000a6416565b6200065b63780e9d6360e01b6001600160e01b0362000a6416565b5050600b805460ff191690556200068f6000620006806001600160e01b0362000aec16565b6001600160e01b0362000b0916565b604080516a4d494e5445525f524f4c4560a81b8152905190819003600b019020620006c790620006806001600160e01b0362000aec16565b604080516a5041555345525f524f4c4560a81b8152905190819003600b019020620006ff90620006806001600160e01b0362000aec16565b62000713816001600160e01b0362000b2216565b50505060006200072862000aec60201b60201c565b600d80546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35060005b600a8110156200097457601b81600a81106200079157fe5b0160316000601184600a8110620007a457fe5b60408051602080820190815292909301805460026001821615610100026000190190911604918401829052928291606090910190849080156200082b5780601f10620007ff576101008083540402835291602001916200082b565b820191906000526020600020905b8154815290600101906020018083116200080d57829003601f168201915b50509250505060405160208183030381529060405280519060200120815260200190815260200160002090805460018160011615610100020316600290046200087692919062000ffe565b50602581600a81106200088557fe5b0160326000601184600a81106200089857fe5b60408051602080820190815292909301805460026001821615610100026000190190911604918401829052928291606090910190849080156200091f5780601f10620008f3576101008083540402835291602001916200091f565b820191906000526020600020905b8154815290600101906020018083116200090157829003601f168201915b50509250505060405160208183030381529060405280519060200120815260200190815260200160002090805460018160011615610100020316600290046200096a92919062000ffe565b5060010162000779565b50603780546001600160a01b0319166001600160a01b039290921691909117905560408051808201909152601681527f43727970744f72636869644552433732314368696c64000000000000000000006020820152620009d49062000b37565b620009ed6000620006806001600160e01b0362000aec16565b604080516d4445504f5349544f525f524f4c4560901b8152905190819003600e01902062000a2590836001600160e01b0362000b0916565b60408051808201909152600c81526b43727970744f72636869647360a01b602082015262000a5c906001600160e01b0362000bd916565b50506200112a565b6001600160e01b0319808216141562000ac4576040805162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604482015290519081900360640190fd5b6001600160e01b0319166000908152600160208190526040909120805460ff19169091179055565b600062000b0362000c4760201b620043381760201c565b90505b90565b62000b1e82826001600160e01b0362000ca616565b5050565b805162000b1e90600a90602084019062000f7d565b806040516020018082805190602001908083835b6020831062000b6c5780518252601f19909201916020918201910162000b4b565b51815160209384036101000a60001901801990921691161790527f3a20494e53554646494349454e545f5045524d495353494f4e530000000000009190930190815260408051808303600519018152601a9092019052805162000b1e955060339450920191905062000f7d565b60345460ff161562000c23576040805162461bcd60e51b815260206004820152600e60248201526d185b1c9958591e481a5b9a5d195960921b604482015290519081900360640190fd5b62000c37816001600160e01b0362000d2816565b506034805460ff19166001179055565b60003330141562000ca15760606000368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b0316915062000b069050565b503390565b60008281526020818152604090912062000ccb9183906200450762000df0821b17901c565b1562000b1e5762000ce46001600160e01b0362000aec16565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6040518060800160405280604f81526020016200689c604f913980516020918201208251838301206040805180820190915260018152603160f81b930192909252907fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc63062000d9f6001600160e01b0362000e1916565b604080516020808201979097528082019590955260608501939093526001600160a01b03909116608084015260a0808401919091528151808403909101815260c09092019052805191012060355550565b600062000e10836001600160a01b0384166001600160e01b0362000e1d16565b90505b92915050565b4690565b600062000e3483836001600160e01b0362000e7516565b62000e6c5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000e13565b50600062000e13565b60009081526001919091016020526040902054151590565b60018301918390821562000f185791602002820160005b8382111562000ee657835183826101000a81548161ffff021916908361ffff160217905550926020019260020160208160010104928301926001030262000ea4565b801562000f165782816101000a81549061ffff021916905560020160208160010104928301926001030262000ee6565b505b5062000f2692915062001078565b5090565b82600a810192821562000f6f579160200282015b8281111562000f6f578251805162000f5e91849160209091019062000f7d565b509160200191906001019062000f3e565b5062000f269291506200109a565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1062000fc057805160ff191683800117855562000ff0565b8280016001018555821562000ff0579182015b8281111562000ff057825182559160200191906001019062000fd3565b5062000f26929150620010c2565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1062001039578054855562000ff0565b8280016001018555821562000ff057600052602060002091601f016020900482015b8281111562000ff05782548255916001019190600101906200105b565b62000b0691905b8082111562000f2657805461ffff191681556001016200107f565b62000b0691905b8082111562000f26576000620010b88282620010df565b50600101620010a1565b62000b0691905b8082111562000f265760008155600101620010c9565b50805460018160011615610100020316600290046000825580601f1062001107575062001127565b601f016020900490600052602060002090810190620011279190620010c2565b50565b615638806200113a6000396000f3fe6080604052600436106103f35760003560e01c806370a0823111610208578063a22cb46511610118578063ca15c873116100ab578063d547741f1161007a578063d547741f1461122a578063e63ab1e914611263578063e985e9c514611278578063f2fde38b146112b3578063ffee200c146112e6576103fa565b8063ca15c873146110b0578063cac21c8f146110da578063cf2c52cb1461118a578063d539139314611215576103fa565b8063b66a0e5d116100e7578063b66a0e5d14610f52578063b7aaba2014610f67578063b88d4fde14610fb5578063c87b56dd14611086576103fa565b8063a22cb46514610eae578063a3b0b5a314610ee9578063a5e584dc14610efe578063a7eec44b14610f28576103fa565b806391d148541161019b5780639a113ee21161016a5780639a113ee214610c925780639a7c4b7114610d435780639c8d415614610e095780639d1b464a14610e84578063a217fddf14610e99576103fa565b806391d1485414610c125780639559c0bd14610c4b57806395d89b4114610c605780639981d4a114610c75576103fa565b80638456cb59116101d75780638456cb5914610b855780638883709414610b9a5780638da5cb5b14610bcd5780639010d07c14610be2576103fa565b806370a0823114610af8578063715018a614610b2b5780637f1e9cb014610b405780637fd8d95314610b55576103fa565b80632f745c59116103035780634f6ccce7116102965780636352211e116102655780636352211e14610a475780636573c78714610a715780636a62784214610a9b5780636b0c004d14610ace5780636c0360eb14610ae3576103fa565b80634f6ccce7146109195780635c975abb14610943578063603168011461095857806362ff09d614610a1d576103fa565b80633f4ba83a116102d25780633f4ba83a1461088257806342842e0e1461089757806342966c68146108da578063450d11f014610904576103fa565b80632f745c59146107e65780633408e4701461081f57806336568abe146108345780633ccfd60b1461086d576103fa565b806318160ddd11610386578063248a9ca311610355578063248a9ca314610711578063277dec921461073b5780632d0335ab146107505780632e1a7d4d146107835780632f2ff15d146107ad576103fa565b806318160ddd1461067a578063182199cd1461068f57806320379ee5146106b957806323b872dd146106ce576103fa565b80630c53c51c116103c25780630c53c51c146105525780630f7e5970146106145780631653c39a14610629578063179f0b0a14610653576103fa565b806301ffc9a7146103ff57806306fdde0314610447578063081812fc146104d1578063095ea7b314610517576103fa565b366103fa57005b600080fd5b34801561040b57600080fd5b506104336004803603602081101561042257600080fd5b50356001600160e01b0319166112fb565b604080519115158252519081900360200190f35b34801561045357600080fd5b5061045c61131e565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561049657818101518382015260200161047e565b50505050905090810190601f1680156104c35780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156104dd57600080fd5b506104fb600480360360208110156104f457600080fd5b50356113b5565b604080516001600160a01b039092168252519081900360200190f35b34801561052357600080fd5b506105506004803603604081101561053a57600080fd5b506001600160a01b038135169060200135611417565b005b61045c600480360360a081101561056857600080fd5b6001600160a01b038235169190810190604081016020820135600160201b81111561059257600080fd5b8201836020820111156105a457600080fd5b803590602001918460018302840111600160201b831117156105c557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550508235935050506020810135906040013560ff166114f2565b34801561062057600080fd5b5061045c6117f5565b34801561063557600080fd5b5061045c6004803603602081101561064c57600080fd5b5035611812565b34801561065f57600080fd5b506106686118a4565b60408051918252519081900360200190f35b34801561068657600080fd5b506106686118ab565b34801561069b57600080fd5b50610433600480360360208110156106b257600080fd5b50356118bc565b3480156106c557600080fd5b506106686118db565b3480156106da57600080fd5b50610550600480360360608110156106f157600080fd5b506001600160a01b038135811691602081013590911690604001356118e1565b34801561071d57600080fd5b506106686004803603602081101561073457600080fd5b5035611938565b34801561074757600080fd5b5061055061194d565b34801561075c57600080fd5b506106686004803603602081101561077357600080fd5b50356001600160a01b03166119c0565b34801561078f57600080fd5b50610550600480360360208110156107a657600080fd5b50356119db565b3480156107b957600080fd5b50610550600480360360408110156107d057600080fd5b50803590602001356001600160a01b0316611a5c565b3480156107f257600080fd5b506106686004803603604081101561080957600080fd5b506001600160a01b038135169060200135611ac8565b34801561082b57600080fd5b50610668611af9565b34801561084057600080fd5b506105506004803603604081101561085757600080fd5b50803590602001356001600160a01b0316611afd565b34801561087957600080fd5b50610550611b5e565b34801561088e57600080fd5b50610550611bef565b3480156108a357600080fd5b50610550600480360360608110156108ba57600080fd5b506001600160a01b03813581169160208101359091169060400135611c60565b3480156108e657600080fd5b50610550600480360360208110156108fd57600080fd5b5035611c7b565b34801561091057600080fd5b506104fb611cc1565b34801561092557600080fd5b506106686004803603602081101561093c57600080fd5b5035611cd0565b34801561094f57600080fd5b50610433611cec565b34801561096457600080fd5b506109826004803603602081101561097b57600080fd5b5035611cf5565b60405180806020018581526020018481526020018360038111156109a257fe5b60ff168152602001828103825286818151815260200191508051906020019080838360005b838110156109df5781810151838201526020016109c7565b50505050905090810190601f168015610a0c5780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b348015610a2957600080fd5b5061066860048036036020811015610a4057600080fd5b5035611dba565b348015610a5357600080fd5b506104fb60048036036020811015610a6a57600080fd5b5035611dcc565b348015610a7d57600080fd5b5061043360048036036020811015610a9457600080fd5b5035611dfa565b348015610aa757600080fd5b5061055060048036036020811015610abe57600080fd5b50356001600160a01b0316611e1a565b348015610ada57600080fd5b50610668611e9e565b348015610aef57600080fd5b5061045c611ea4565b348015610b0457600080fd5b5061066860048036036020811015610b1b57600080fd5b50356001600160a01b0316611f05565b348015610b3757600080fd5b50610550611f6d565b348015610b4c57600080fd5b506104fb612019565b348015610b6157600080fd5b5061055060048036036040811015610b7857600080fd5b5080359060200135612028565b348015610b9157600080fd5b506105506120c4565b348015610ba657600080fd5b5061055060048036036020811015610bbd57600080fd5b50356001600160a01b0316612133565b348015610bd957600080fd5b506104fb61219d565b348015610bee57600080fd5b506104fb60048036036040811015610c0557600080fd5b50803590602001356121ac565b348015610c1e57600080fd5b5061043360048036036040811015610c3557600080fd5b50803590602001356001600160a01b03166121ca565b348015610c5757600080fd5b506106686121e8565b348015610c6c57600080fd5b5061045c6121ed565b61055060048036036020811015610c8b57600080fd5b503561224e565b348015610c9e57600080fd5b5061055060048036036020811015610cb557600080fd5b810190602081018135600160201b811115610ccf57600080fd5b820183602082011115610ce157600080fd5b803590602001918460018302840111600160201b83111715610d0257600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506124f4945050505050565b348015610d4f57600080fd5b5061055060048036036060811015610d6657600080fd5b8135916001600160a01b0360208201351691810190606081016040820135600160201b811115610d9557600080fd5b820183602082011115610da757600080fd5b803590602001918460018302840111600160201b83111715610dc857600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506124fd945050505050565b348015610e1557600080fd5b5061055060048036036020811015610e2c57600080fd5b810190602081018135600160201b811115610e4657600080fd5b820183602082011115610e5857600080fd5b803590602001918460208302840111600160201b83111715610e7957600080fd5b509092509050612551565b348015610e9057600080fd5b5061066861272f565b348015610ea557600080fd5b506106686127eb565b348015610eba57600080fd5b5061055060048036036040811015610ed157600080fd5b506001600160a01b03813516906020013515156127f0565b348015610ef557600080fd5b506106686128f5565b348015610f0a57600080fd5b5061055060048036036020811015610f2157600080fd5b503561291b565b348015610f3457600080fd5b5061055060048036036020811015610f4b57600080fd5b5035612b6f565b348015610f5e57600080fd5b50610550612c2d565b348015610f7357600080fd5b50610f9160048036036020811015610f8a57600080fd5b5035612c9e565b60405180826003811115610fa157fe5b60ff16815260200191505060405180910390f35b348015610fc157600080fd5b5061055060048036036080811015610fd857600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135600160201b81111561101257600080fd5b82018360208201111561102457600080fd5b803590602001918460018302840111600160201b8311171561104557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550612e1e945050505050565b34801561109257600080fd5b5061045c600480360360208110156110a957600080fd5b5035612e76565b3480156110bc57600080fd5b50610668600480360360208110156110d357600080fd5b5035613274565b3480156110e657600080fd5b50611104600480360360208110156110fd57600080fd5b503561328b565b6040518080602001848152602001838152602001828103825285818151815260200191508051906020019080838360005b8381101561114d578181015183820152602001611135565b50505050905090810190601f16801561117a5780820380516001836020036101000a031916815260200191505b5094505050505060405180910390f35b34801561119657600080fd5b50610550600480360360408110156111ad57600080fd5b6001600160a01b038235169190810190604081016020820135600160201b8111156111d757600080fd5b8201836020820111156111e957600080fd5b803590602001918460018302840111600160201b8311171561120a57600080fd5b509092509050613338565b34801561122157600080fd5b5061066861350b565b34801561123657600080fd5b506105506004803603604081101561124d57600080fd5b50803590602001356001600160a01b031661352e565b34801561126f57600080fd5b50610668613587565b34801561128457600080fd5b506104336004803603604081101561129b57600080fd5b506001600160a01b03813581169160200135166135aa565b3480156112bf57600080fd5b50610550600480360360208110156112d657600080fd5b50356001600160a01b03166135d8565b3480156112f257600080fd5b506106686136db565b6001600160e01b0319811660009081526001602052604090205460ff165b919050565b60078054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156113aa5780601f1061137f576101008083540402835291602001916113aa565b820191906000526020600020905b81548152906001019060200180831161138d57829003601f168201915b505050505090505b90565b60006113c0826136e1565b6113fb5760405162461bcd60e51b815260040180806020018281038252602c815260200180615393602c913960400191505060405180910390fd5b506000908152600560205260409020546001600160a01b031690565b600061142282611dcc565b9050806001600160a01b0316836001600160a01b031614156114755760405162461bcd60e51b81526004018080602001828103825260218152602001806154596021913960400191505060405180910390fd5b806001600160a01b03166114876136f4565b6001600160a01b031614806114a857506114a8816114a36136f4565b6135aa565b6114e35760405162461bcd60e51b81526004018080602001828103825260388152602001806152a26038913960400191505060405180910390fd5b6114ed83836136fe565b505050565b60606114fc614e79565b50604080516060810182526001600160a01b0388166000818152603660209081529084902054835282015290810186905261153a878287878761376c565b6115755760405162461bcd60e51b81526004018080602001828103825260218152602001806154086021913960400191505060405180910390fd5b6001600160a01b03871660009081526036602052604090205461159f90600163ffffffff61384916565b6001600160a01b03881660008181526036602090815260408083209490945583519283523383820181905260609484018581528b51958501959095528a517f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b958d9592948d94919260808501928601918190849084905b8381101561162e578181015183820152602001611616565b50505050905090810190601f16801561165b5780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a160006060306001600160a01b0316888a6040516020018083805190602001908083835b602083106116ac5780518252601f19909201916020918201910161168d565b6001836020036101000a038019825116818451168082178552505050505050905001826001600160a01b03166001600160a01b031660601b8152601401925050506040516020818303038152906040526040518082805190602001908083835b6020831061172b5780518252601f19909201916020918201910161170c565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461178d576040519150601f19603f3d011682016040523d82523d6000602084013e611792565b606091505b5091509150816117e9576040805162461bcd60e51b815260206004820152601c60248201527f46756e6374696f6e2063616c6c206e6f74207375636365737366756c00000000604482015290519081900360640190fd5b98975050505050505050565b604051806040016040528060018152602001603160f81b81525081565b606061181d82612e76565b6040516020018080602001828103825283818151815260200191508051906020019080838360005b8381101561185d578181015183820152602001611845565b50505050905090810190601f16801561188a5780820380516001836020036101000a031916815260200191505b5060408051601f1981840301815291905295945050505050565b62093a8081565b60006118b760036138a3565b905090565b600060026118c983612c9e565b60038111156118d457fe5b1492915050565b60355490565b6118f26118ec6136f4565b826138ae565b61192d5760405162461bcd60e51b81526004018080602001828103825260318152602001806154a16031913960400191505060405180910390fd5b6114ed838383613952565b60009081526020819052604090206002015490565b6119556136f4565b6001600160a01b031661196661219d565b6001600160a01b0316146119af576040805162461bcd60e51b815260206004820181905260248201526000805160206153bf833981519152604482015290519081900360640190fd5b600f805461ff001916610100179055565b6001600160a01b031660009081526036602052604090205490565b6119e481611dcc565b6001600160a01b03166119f56136f4565b6001600160a01b031614611a50576040805162461bcd60e51b815260206004820181905260248201527f4368696c644552433732313a20494e56414c49445f544f4b454e5f4f574e4552604482015290519081900360640190fd5b611a5981613ab0565b50565b600082815260208190526040902060020154611a7f90611a7a6136f4565b6121ca565b611aba5760405162461bcd60e51b815260040180806020018281038252602f815260200180615007602f913960400191505060405180910390fd5b611ac48282613b89565b5050565b6001600160a01b0382166000908152600260205260408120611af0908363ffffffff613bf816565b90505b92915050565b4690565b611b056136f4565b6001600160a01b0316816001600160a01b031614611b545760405162461bcd60e51b815260040180806020018281038252602f8152602001806155d4602f913960400191505060405180910390fd5b611ac48282613c04565b611b666136f4565b6001600160a01b0316611b7761219d565b6001600160a01b031614611bc0576040805162461bcd60e51b815260206004820181905260248201526000805160206153bf833981519152604482015290519081900360640190fd5b6040514790339082156108fc029083906000818181858888f19350505050158015611ac4573d6000803e3d6000fd5b604080516a5041555345525f524f4c4560a81b8152905190819003600b019020611c1b90611a7a6136f4565b611c565760405162461bcd60e51b815260040180806020018281038252604081526020018061556a6040913960400191505060405180910390fd5b611c5e613c73565b565b6114ed83838360405180602001604052806000815250612e1e565b611c866118ec6136f4565b611a505760405162461bcd60e51b815260040180806020018281038252603081526020018061553a6030913960400191505060405180910390fd5b6037546001600160a01b031681565b600080611ce460038463ffffffff613d1316565b509392505050565b600b5460ff1690565b6000818152600e60205260408120600181015460028201546060939283928392611d1e88612c9e565b8354604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152918691830182828015611da45780601f10611d7957610100808354040283529160200191611da4565b820191906000526020600020905b815481529060010190602001808311611d8757829003601f168201915b5050505050935093509350935093509193509193565b60306020526000908152604090205481565b6000611af382604051806060016040528060298152602001615304602991396003919063ffffffff613d2f16565b60006003611e0783612c9e565b6003811115611e1257fe5b141592915050565b604080516a4d494e5445525f524f4c4560a81b8152905190819003600b019020611e4690611a7a6136f4565b611e815760405162461bcd60e51b815260040180806020018281038252603d8152602001806154fd603d913960400191505060405180910390fd5b611e9481611e8f600c613d46565b613d4a565b611a59600c613e84565b61271081565b600a8054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156113aa5780601f1061137f576101008083540402835291602001916113aa565b60006001600160a01b038216611f4c5760405162461bcd60e51b815260040180806020018281038252602a8152602001806152da602a913960400191505060405180910390fd5b6001600160a01b0382166000908152600260205260409020611af3906138a3565b611f756136f4565b6001600160a01b0316611f8661219d565b6001600160a01b031614611fcf576040805162461bcd60e51b815260206004820181905260248201526000805160206153bf833981519152604482015290519081900360640190fd5b600d546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600d80546001600160a01b0319169055565b6038546001600160a01b031681565b600f54610100900460ff1661206e5760405162461bcd60e51b815260040180806020018281038252602781526020018061512a6027913960400191505060405180910390fd5b61207f6120796136f4565b836138ae565b6120ba5760405162461bcd60e51b815260040180806020018281038252602b8152602001806154d2602b913960400191505060405180910390fd5b6114ed8282613e8d565b604080516a5041555345525f524f4c4560a81b8152905190819003600b0190206120f090611a7a6136f4565b61212b5760405162461bcd60e51b815260040180806020018281038252603e815260200180615151603e913960400191505060405180910390fd5b611c5e613ed3565b6038546001600160a01b03161561217b5760405162461bcd60e51b815260040180806020018281038252602a8152602001806155aa602a913960400191505060405180910390fd5b603880546001600160a01b0319166001600160a01b0392909216919091179055565b600d546001600160a01b031690565b6000828152602081905260408120611af0908363ffffffff613bf816565b6000828152602081905260408120611af0908363ffffffff613f5616565b601481565b60088054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156113aa5780601f1061137f576101008083540402835291602001916113aa565b600f5460ff1661229d576040805162461bcd60e51b8152602060048201526015602482015274151a1948139d5c9cd95c9e481a5cc818db1bdcd959605a1b604482015290519081900360640190fd5b6122a56118ab565b612710038111156122f5576040805162461bcd60e51b8152602060048201526015602482015274139bdd08195b9bdd59da08189d5b189cc81b19599d605a1b604482015290519081900360640190fd5b6127106123006118ab565b1061234b576040805162461bcd60e51b815260206004820152601660248201527514d85b19481a185cc8185b1c9958591e48195b99195960521b604482015290519081900360640190fd5b60008111801561235c575060148111155b6123975760405162461bcd60e51b81526004018080602001828103825260308152602001806154296030913960400191505060405180910390fd5b6127106123ab6123a56118ab565b83613849565b11156123fe576040805162461bcd60e51b815260206004820152601860248201527f45786365656473204d41585f43525950544f5243484944530000000000000000604482015290519081900360640190fd5b61240f61240961272f565b82613f6b565b34101561244d5760405162461bcd60e51b815260040180806020018281038252602381526020018061532d6023913960400191505060405180910390fd5b60005b81811015611ac457612462602f613e84565b600061246e602f613d46565b6040805160a081018252600660608201908152656772616e756d60d01b608083015281526000196020808301919091526000828401819052848152600e82529290922081518051949550919390926124ca928492910190614ea3565b50602082015160018201556040909101516002909101556124eb3382613fc4565b50600101612450565b611a5981613fde565b6037546001600160a01b031633146125465760405162461bcd60e51b8152600401808060200182810382526021815260200180614f996021913960400191505060405180910390fd5b6114ed83838361407a565b8060148111156125a8576040805162461bcd60e51b815260206004820181905260248201527f4368696c644552433732313a20455843454544535f42415443485f4c494d4954604482015290519081900360640190fd5b60005b818110156126b55760008484838181106125c157fe5b9050602002013590506125d381611dcc565b6001600160a01b03166125e46136f4565b6001600160a01b03161481604051602001808061525c60219139602101828152602001915050604051602081830303815290604052906126a25760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561266757818101518382015260200161264f565b50505050905090810190601f1680156126945780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506126ac81613ab0565b506001016125ab565b506126be6136f4565b6001600160a01b03167ff871896b17e9cb7a64941c62c188a4f5c621b86800e3d15452ece01ce56073df848460405180806020018281038252848482818152602001925060200280828437600083820152604051601f909101601f19169092018290039550909350505050a2505050565b60008061273a6118ab565b90506126ac811061275657670de0b6b3a76400009150506113b2565b61251c8110612770576708e1bc9bf04000009150506113b2565b611d4c811061278a57670470de4df82000009150506113b2565b610dac81106127a4576702386f26fc1000009150506113b2565b6105dc81106127be5767011c37937e0800009150506113b2565b6101f481106127d75766d529ae9e8600009150506113b2565b668e1bc9bf0400009150506113b2565b5090565b600081565b6127f86136f4565b6001600160a01b0316826001600160a01b0316141561285e576040805162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015290519081900360640190fd5b806006600061286b6136f4565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff1916921515929092179091556128af6136f4565b60408051841515815290516001600160a01b0392909216917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319181900360200190a35050565b604080516d4445504f5349544f525f524f4c4560901b8152905190819003600e01902081565b61292481611dcc565b6001600160a01b03166129356136f4565b6001600160a01b031614612990576040805162461bcd60e51b815260206004820181905260248201527f4368696c644552433732313a20494e56414c49445f544f4b454e5f4f574e4552604482015290519081900360640190fd5b80600061299b6136f4565b6001600160a01b03167ff94915c6d1fd521cee85359239227480c7e8776d7caf1fc3bacad5c269b66a14306001600160a01b0316631653c39a866040518263ffffffff1660e01b81526004018082815260200191505060006040518083038186803b158015612a0957600080fd5b505afa158015612a1d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015612a4657600080fd5b8101908080516040519392919084600160201b821115612a6557600080fd5b908301906020820185811115612a7a57600080fd5b8251600160201b811182820188101715612a9357600080fd5b82525081516020918201929091019080838360005b83811015612ac0578181015183820152602001612aa8565b50505050905090810190601f168015612aed5780820380516001836020036101000a031916815260200191505b50604081815260208083528651818401528651929550859450908401925085019080838360005b83811015612b2c578181015183820152602001612b14565b50505050905090810190601f168015612b595780820380516001836020036101000a031916815260200191505b509250505060405180910390a4611a5981613ab0565b612b7a6118ec6136f4565b612bb55760405162461bcd60e51b81526004018080602001828103825260278152602001806151d96027913960400191505060405180910390fd5b612bbe81611dfa565b612bc757611a59565b6000818152600e602052604081206002810154600182015491929091612beb614208565b0390506000612bfd8262093a8061420c565b905080831115612c105750505050611a59565b6000612c1d846001613849565b6002909501949094555050505050565b612c356136f4565b6001600160a01b0316612c4661219d565b6001600160a01b031614612c8f576040805162461bcd60e51b815260206004820181905260248201526000805160206153bf833981519152604482015290519081900360640190fd5b600f805460ff19166001179055565b6000612ca8614f1d565b6000838152600e60209081526040918290208251815460026001821615610100026000190190911604601f81018490049093028101608090810190945260608101838152909391928492849190840182828015612d465780601f10612d1b57610100808354040283529160200191612d46565b820191906000526020600020905b815481529060010190602001808311612d2957829003601f168201915b50505050508152602001600182015481526020016002820154815250509050806020015160001415612d7c576000915050611319565b60001981602001511415612d94576001915050611319565b60408101516020820151600090612da9614208565b0390506000612dbb8262093a8061420c565b90506000612dcc8362093a80614273565b905081841415612de457600295505050505050611319565b81612df0856001613849565b148015612dfe5750612a3081105b15612e1157600295505050505050611319565b5060039695505050505050565b612e296120796136f4565b612e645760405162461bcd60e51b81526004018080602001828103825260318152602001806154a16031913960400191505060405180910390fd5b612e70848484846142da565b50505050565b606080612e8283611cf5565b5091925060019150612e919050565b612e9a84612c9e565b6003811115612ea557fe5b1415612f8357612eb3611ea4565b6040518060600160405280602e81526020016150fc602e91396040516020018083805190602001908083835b60208310612efe5780518252601f199092019160209182019101612edf565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b60208310612f465780518252601f199092019160209182019101612f27565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052915050611319565b6002612f8e84612c9e565b6003811115612f9957fe5b141561310a57612fa7611ea4565b60316000836040516020018080602001828103825283818151815260200191508051906020019080838360005b83811015612fec578181015183820152602001612fd4565b50505050905090810190601f1680156130195780820380516001836020036101000a031916815260200191505b50925050506040516020818303038152906040528051906020012081526020019081526020016000206040516020018083805190602001908083835b602083106130745780518252601f199092019160209182019101613055565b6001836020036101000a038019825116818451168082178552505050505050905001828054600181600116156101000203166002900480156130ed5780601f106130cb5761010080835404028352918201916130ed565b820191906000526020600020905b8154815290600101906020018083116130d9575b505092505050604051602081830303815290604052915050611319565b613112611ea4565b60326000836040516020018080602001828103825283818151815260200191508051906020019080838360005b8381101561315757818101518382015260200161313f565b50505050905090810190601f1680156131845780820380516001836020036101000a031916815260200191505b50925050506040516020818303038152906040528051906020012081526020019081526020016000206040516020018083805190602001908083835b602083106131df5780518252601f1990920191602091820191016131c0565b6001836020036101000a038019825116818451168082178552505050505050905001828054600181600116156101000203166002900480156132585780601f10613236576101008083540402835291820191613258565b820191906000526020600020905b815481529060010190602001808311613244575b505060408051601f198184030181529190529695505050505050565b6000818152602081905260408120611af3906138a3565b600e6020908152600091825260409182902080548351601f600260001961010060018616150201909316929092049182018490048402810184019094528084529092918391908301828280156133225780601f106132f757610100808354040283529160200191613322565b820191906000526020600020905b81548152906001019060200180831161330557829003601f168201915b5050505050908060010154908060020154905083565b604080516d4445504f5349544f525f524f4c4560901b8152905190819003600e01902061336781611a7a6136f4565b6033906134075760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156133f85780601f106133cd576101008083540402835291602001916133f8565b820191906000526020600020905b8154815290600101906020018083116133db57829003601f168201915b50509250505060405180910390fd5b5060208214156134375760008383602081101561342357600080fd5b503590506134318582613d4a565b50612e70565b60608383602081101561344957600080fd5b810190602081018135600160201b81111561346357600080fd5b82018360208201111561347557600080fd5b803590602001918460208302840111600160201b8311171561349657600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201829052508451949850939650929450505050505b81811015613502576134fa878483815181106134ed57fe5b6020026020010151613d4a565b6001016134d5565b50505050505050565b604080516a4d494e5445525f524f4c4560a81b8152905190819003600b01902081565b60008281526020819052604090206002015461354c90611a7a6136f4565b611b545760405162461bcd60e51b815260040180806020018281038252603081526020018061522c6030913960400191505060405180910390fd5b604080516a5041555345525f524f4c4560a81b8152905190819003600b01902081565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b6135e06136f4565b6001600160a01b03166135f161219d565b6001600160a01b03161461363a576040805162461bcd60e51b815260206004820181905260248201526000805160206153bf833981519152604482015290519081900360640190fd5b6001600160a01b03811661367f5760405162461bcd60e51b81526004018080602001828103825260268152602001806150d66026913960400191505060405180910390fd5b600d546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600d80546001600160a01b0319166001600160a01b0392909216919091179055565b612a3081565b6000611af360038363ffffffff61432c16565b60006118b7614338565b600081815260056020526040902080546001600160a01b0319166001600160a01b038416908117909155819061373382611dcc565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006001600160a01b0386166137b35760405162461bcd60e51b815260040180806020018281038252602581526020018061527d6025913960400191505060405180910390fd5b60016137c66137c187614395565b614421565b83868660405160008152602001604052604051808581526020018460ff1660ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015613820573d6000803e3d6000fd5b505050602060405103516001600160a01b0316866001600160a01b031614905095945050505050565b600082820183811015611af0576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000611af382613d46565b60006138b9826136e1565b6138f45760405162461bcd60e51b815260040180806020018281038252602c815260200180615200602c913960400191505060405180910390fd5b60006138ff83611dcc565b9050806001600160a01b0316846001600160a01b0316148061393a5750836001600160a01b031661392f846113b5565b6001600160a01b0316145b8061394a575061394a81856135aa565b949350505050565b826001600160a01b031661396582611dcc565b6001600160a01b0316146139aa5760405162461bcd60e51b81526004018080602001828103825260298152602001806153df6029913960400191505060405180910390fd5b6001600160a01b0382166139ef5760405162461bcd60e51b815260040180806020018281038252602481526020018061518f6024913960400191505060405180910390fd5b6139fa83838361446d565b613a056000826136fe565b6001600160a01b0383166000908152600260205260409020613a2d908263ffffffff6144cd16565b506001600160a01b0382166000908152600260205260409020613a56908263ffffffff6144d916565b50613a696003828463ffffffff6144e516565b5080826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6000613abb82611dcc565b9050613ac98160008461446d565b613ad46000836136fe565b6000828152600960205260409020546002600019610100600184161502019091160415613b12576000828152600960205260408120613b1291614f3e565b6001600160a01b0381166000908152600260205260409020613b3a908363ffffffff6144cd16565b50613b4c60038363ffffffff6144fb16565b5060405182906000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6000828152602081905260409020613ba7908263ffffffff61450716565b15611ac457613bb46136f4565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000611af0838361451c565b6000828152602081905260409020613c22908263ffffffff61458016565b15611ac457613c2f6136f4565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b613c7b611cec565b613cc3576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b600b805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa613cf66136f4565b604080516001600160a01b039092168252519081900360200190a1565b6000808080613d228686614595565b9097909650945050505050565b6000613d3c848484614610565b90505b9392505050565b5490565b6001600160a01b038216613da5576040805162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015290519081900360640190fd5b613dae816136e1565b15613e00576040805162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015290519081900360640190fd5b613e0c6000838361446d565b6001600160a01b0382166000908152600260205260409020613e34908263ffffffff6144d916565b50613e476003828463ffffffff6144e516565b5060405181906001600160a01b038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b80546001019055565b6040805142602080830191909152448284015260608083018590528351808403909101815260809092019092528051910120600090613ecc848261469d565b5092915050565b613edb611cec565b15613f20576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b600b805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258613cf66136f4565b6000611af0836001600160a01b0384166146f7565b600082613f7a57506000611af3565b82820282848281613f8757fe5b0414611af05760405162461bcd60e51b81526004018080602001828103825260218152602001806153726021913960400191505060405180910390fd5b611ac482826040518060200160405280600081525061470f565b7f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036816040518080602001828103825283818151815260200191508051906020019080838360005b8381101561403d578181015183820152602001614025565b50505050905090810190601f16801561406a5780820380516001836020036101000a031916815260200191505b509250505060405180910390a150565b60385482906001600160a01b038083169116146140c85760405162461bcd60e51b815260040180806020018281038252602b815260200180615036602b913960400191505060405180910390fd5b606060008060008580602001905160808110156140e457600080fd5b8101908080516040519392919084600160201b82111561410357600080fd5b90830190602082018581111561411857600080fd5b8251600160201b81118282018810171561413157600080fd5b82525081516020918201929091019080838360005b8381101561415e578181015183820152602001614146565b50505050905090810190601f16801561418b5780820380516001836020036101000a031916815260200191505b5060408181526020838101518483015160609586015195850184528885528285018290528484018190526000868152600e84529390932084518051999d50919b5092995093975091959094506141e79350849290910190614ea3565b50602082015160018201556040909101516002909101555050505050505050565b4290565b6000808211614262576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161426b57fe5b049392505050565b60008082116142c9576040805162461bcd60e51b815260206004820152601860248201527f536166654d6174683a206d6f64756c6f206279207a65726f0000000000000000604482015290519081900360640190fd5b8183816142d257fe5b069392505050565b6142e5848484613952565b6142f184848484614761565b612e705760405162461bcd60e51b81526004018080602001828103825260328152602001806150616032913960400191505060405180910390fd5b6000611af083836146f7565b6000333014156143905760606000368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b031691506113b29050565b503390565b600060405180608001604052806043815260200161509360439139805190602001208260000151836020015184604001518051906020012060405160200180858152602001848152602001836001600160a01b03166001600160a01b03168152602001828152602001945050505050604051602081830303815290604052805190602001209050919050565b600061442b6118db565b82604051602001808061190160f01b81525060020183815260200182815260200192505050604051602081830303815290604052805190602001209050919050565b6001600160a01b0382161580614487575061448781611dfa565b6144c25760405162461bcd60e51b815260040180806020018281038252602781526020018061547a6027913960400191505060405180910390fd5b6114ed8383836148e1565b6000611af083836148ec565b6000611af083836149b2565b6000613d3c84846001600160a01b0385166149fc565b6000611af08383614a93565b6000611af0836001600160a01b0384166149b2565b8154600090821061455e5760405162461bcd60e51b8152600401808060200182810382526022815260200180614fba6022913960400191505060405180910390fd5b82600001828154811061456d57fe5b9060005260206000200154905092915050565b6000611af0836001600160a01b0384166148ec565b8154600090819083106145d95760405162461bcd60e51b81526004018080602001828103825260228152602001806153506022913960400191505060405180910390fd5b60008460000184815481106145ea57fe5b906000526020600020906002020190508060000154816001015492509250509250929050565b6000828152600184016020526040812054828161466e5760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561266757818101518382015260200161264f565b5084600001600182038154811061468157fe5b9060005260206000209060020201600101549150509392505050565b6000828152600e6020526040902060606146c16146bc84612710614273565b614b67565b80519091506146d69083906020840190614ea3565b506146df614208565b600183015560006146ef85611dcc565b505050505050565b60009081526001919091016020526040902054151590565b6147198383613d4a565b6147266000848484614761565b6114ed5760405162461bcd60e51b81526004018080602001828103825260328152602001806150616032913960400191505060405180910390fd5b6000614775846001600160a01b0316614c53565b6147815750600161394a565b60606148a7630a85bd0160e11b6147966136f4565b88878760405160240180856001600160a01b03166001600160a01b03168152602001846001600160a01b03166001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561480f5781810151838201526020016147f7565b50505050905090810190601f16801561483c5780820380516001836020036101000a031916815260200191505b5095505050505050604051602081830303815290604052906001600160e01b0319166020820180516001600160e01b038381831617835250505050604051806060016040528060328152602001615061603291396001600160a01b038816919063ffffffff614c5916565b905060008180602001905160208110156148c057600080fd5b50516001600160e01b031916630a85bd0160e11b1492505050949350505050565b6114ed838383614c68565b600081815260018301602052604081205480156149a8578354600019808301919081019060009087908390811061491f57fe5b906000526020600020015490508087600001848154811061493c57fe5b60009182526020808320909101929092558281526001898101909252604090209084019055865487908061496c57fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050611af3565b6000915050611af3565b60006149be83836146f7565b6149f457508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155611af3565b506000611af3565b600082815260018401602052604081205480614a61575050604080518082018252838152602080820184815286546001818101895560008981528481209551600290930290950191825591519082015586548684528188019092529290912055613d3f565b82856000016001830381548110614a7457fe5b9060005260206000209060020201600101819055506000915050613d3f565b600081815260018301602052604081205480156149a85783546000198083019190810190600090879083908110614ac657fe5b9060005260206000209060020201905080876000018481548110614ae657fe5b600091825260208083208454600290930201918255600193840154918401919091558354825289830190526040902090840190558654879080614b2557fe5b6000828152602080822060026000199094019384020182815560019081018390559290935588815289820190925260408220919091559450611af39350505050565b606060005b600a811015614c4d57601081600a8110614b8257fe5b601091828204019190066002029054906101000a900461ffff1661ffff168311614c4557601181600a8110614bb357fe5b01805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015614c385780601f10614c0d57610100808354040283529160200191614c38565b820191906000526020600020905b815481529060010190602001808311614c1b57829003601f168201915b5050505050915050611319565b600101614b6c565b50919050565b3b151590565b6060613d3c8484600085614cb7565b614c738383836114ed565b614c7b611cec565b156114ed5760405162461bcd60e51b815260040180806020018281038252602b815260200180614fdc602b913960400191505060405180910390fd5b606082471015614cf85760405162461bcd60e51b81526004018080602001828103825260268152602001806151b36026913960400191505060405180910390fd5b614d0185614c53565b614d52576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310614d915780518252601f199092019160209182019101614d72565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114614df3576040519150601f19603f3d011682016040523d82523d6000602084013e614df8565b606091505b5091509150614e08828286614e13565b979650505050505050565b60608315614e22575081613d3f565b825115614e325782518084602001fd5b60405162461bcd60e51b815260206004820181815284516024840152845185939192839260440191908501908083836000831561266757818101518382015260200161264f565b60405180606001604052806000815260200160006001600160a01b03168152602001606081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10614ee457805160ff1916838001178555614f11565b82800160010185558215614f11579182015b82811115614f11578251825591602001919060010190614ef6565b506127e7929150614f7e565b60405180606001604052806060815260200160008152602001600081525090565b50805460018160011615610100020316600290046000825580601f10614f645750611a59565b601f016020900490600052602060002090810190611a5991905b6113b291905b808211156127e75760008155600101614f8456fe4678426173654368696c6454756e6e656c3a20494e56414c49445f53454e444552456e756d657261626c655365743a20696e646578206f7574206f6620626f756e64734552433732315061757361626c653a20746f6b656e207472616e73666572207768696c6520706175736564416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e744678426173654368696c6454756e6e656c3a20494e56414c49445f53454e4445525f46524f4d5f524f4f544552433732313a207472616e7366657220746f206e6f6e20455243373231526563656976657220696d706c656d656e7465724d6574615472616e73616374696f6e2875696e74323536206e6f6e63652c616464726573732066726f6d2c62797465732066756e6374696f6e5369676e6174757265294f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373516d5764316d6e374475477978394279664e6571437367645355734a5a316372616769746761796773714476456d4765726d696e6174696f6e2073746172747320323032312d30342d31325431363a30303a30305a4552433732315072657365744d696e7465725061757365724175746f49643a206d75737420686176652070617573657220726f6c6520746f2070617573654552433732313a207472616e7366657220746f20746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c4f6e6c7920746865204f776e65722063616e20776174657220612043727970744f72636869642e4552433732313a206f70657261746f7220717565727920666f72206e6f6e6578697374656e7420746f6b656e416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b654368696c644552433732313a20494e56414c49445f544f4b454e5f4f574e4552204e61746976654d6574615472616e73616374696f6e3a20494e56414c49445f5349474e45524552433732313a20617070726f76652063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f76656420666f7220616c6c4552433732313a2062616c616e636520717565727920666f7220746865207a65726f20616464726573734552433732313a206f776e657220717565727920666f72206e6f6e6578697374656e7420746f6b656e45746865722076616c75652073656e742069732062656c6f7720746865207072696365456e756d657261626c654d61703a20696e646578206f7574206f6620626f756e6473536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774552433732313a20617070726f76656420717565727920666f72206e6f6e6578697374656e7420746f6b656e4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65724552433732313a207472616e73666572206f6620746f6b656e2074686174206973206e6f74206f776e5369676e657220616e64207369676e617475726520646f206e6f74206d61746368596f752063616e20706c616e74206d696e696d756d20312c206d6178696d756d2032302043727970744f7263686964734552433732313a20617070726f76616c20746f2063757272656e74206f776e6572446561642043727970744f7263686964732063616e6e6f74206265207472616e736665727265644552433732313a207472616e736665722063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f7665644f6e6c7920746865204f776e65722063616e206765726d696e61746520612043727970744f72636869642e4552433732315072657365744d696e7465725061757365724175746f49643a206d7573742068617665206d696e74657220726f6c6520746f206d696e744552433732314275726e61626c653a2063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f7665644552433732315072657365744d696e7465725061757365724175746f49643a206d75737420686176652070617573657220726f6c6520746f20756e70617573654678426173654368696c6454756e6e656c3a20524f4f545f54554e4e454c5f414c52454144595f534554416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220e290e661f06b099131748d4903ab89ac02e7e4c155b3877ae9cfb4be903ad42964736f6c63430006060033516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f637970726970656469756d2d63616c63656f6c75732e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f64656e64726f7068796c61782d6c696e64656e69692e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f70617068696f706564696c756d2d726f7468736368696c6469616e756d2e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f706c6174616e74686572612d617a6f726963612e6a736f6e454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c6164647265737320766572696679696e67436f6e74726163742c627974657333322073616c7429516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f637970726970656469756d2d63616c63656f6c75732e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f7068616c61656e6f707369732d6d6963686f6c69747a69692e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f76616e64612d636f6572756c65612e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f6d696c746f6e69612d6b61796173696d61652e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f70617068696f706564696c756d2d766965746e616d656e73652e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f6775617269616e7468652d617572616e74696163612e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f7368656e7a68656e6963612d6f726368696461636561652e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f6d696c746f6e69612d6b61796173696d61652e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f76616e64612d636f6572756c65612e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f70617068696f706564696c756d2d726f7468736368696c6469616e756d2e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f6775617269616e7468652d617572616e74696163612e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f70617068696f706564696c756d2d766965746e616d656e73652e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f64656e64726f7068796c61782d6c696e64656e69692e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f7068616c61656e6f707369732d6d6963686f6c69747a69692e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f7368656e7a68656e6963612d6f726368696461636561652e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f706c6174616e74686572612d617a6f726963612e6a736f6e", + "deployedBytecode": "0x6080604052600436106103f35760003560e01c806370a0823111610208578063a22cb46511610118578063ca15c873116100ab578063d547741f1161007a578063d547741f1461122a578063e63ab1e914611263578063e985e9c514611278578063f2fde38b146112b3578063ffee200c146112e6576103fa565b8063ca15c873146110b0578063cac21c8f146110da578063cf2c52cb1461118a578063d539139314611215576103fa565b8063b66a0e5d116100e7578063b66a0e5d14610f52578063b7aaba2014610f67578063b88d4fde14610fb5578063c87b56dd14611086576103fa565b8063a22cb46514610eae578063a3b0b5a314610ee9578063a5e584dc14610efe578063a7eec44b14610f28576103fa565b806391d148541161019b5780639a113ee21161016a5780639a113ee214610c925780639a7c4b7114610d435780639c8d415614610e095780639d1b464a14610e84578063a217fddf14610e99576103fa565b806391d1485414610c125780639559c0bd14610c4b57806395d89b4114610c605780639981d4a114610c75576103fa565b80638456cb59116101d75780638456cb5914610b855780638883709414610b9a5780638da5cb5b14610bcd5780639010d07c14610be2576103fa565b806370a0823114610af8578063715018a614610b2b5780637f1e9cb014610b405780637fd8d95314610b55576103fa565b80632f745c59116103035780634f6ccce7116102965780636352211e116102655780636352211e14610a475780636573c78714610a715780636a62784214610a9b5780636b0c004d14610ace5780636c0360eb14610ae3576103fa565b80634f6ccce7146109195780635c975abb14610943578063603168011461095857806362ff09d614610a1d576103fa565b80633f4ba83a116102d25780633f4ba83a1461088257806342842e0e1461089757806342966c68146108da578063450d11f014610904576103fa565b80632f745c59146107e65780633408e4701461081f57806336568abe146108345780633ccfd60b1461086d576103fa565b806318160ddd11610386578063248a9ca311610355578063248a9ca314610711578063277dec921461073b5780632d0335ab146107505780632e1a7d4d146107835780632f2ff15d146107ad576103fa565b806318160ddd1461067a578063182199cd1461068f57806320379ee5146106b957806323b872dd146106ce576103fa565b80630c53c51c116103c25780630c53c51c146105525780630f7e5970146106145780631653c39a14610629578063179f0b0a14610653576103fa565b806301ffc9a7146103ff57806306fdde0314610447578063081812fc146104d1578063095ea7b314610517576103fa565b366103fa57005b600080fd5b34801561040b57600080fd5b506104336004803603602081101561042257600080fd5b50356001600160e01b0319166112fb565b604080519115158252519081900360200190f35b34801561045357600080fd5b5061045c61131e565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561049657818101518382015260200161047e565b50505050905090810190601f1680156104c35780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156104dd57600080fd5b506104fb600480360360208110156104f457600080fd5b50356113b5565b604080516001600160a01b039092168252519081900360200190f35b34801561052357600080fd5b506105506004803603604081101561053a57600080fd5b506001600160a01b038135169060200135611417565b005b61045c600480360360a081101561056857600080fd5b6001600160a01b038235169190810190604081016020820135600160201b81111561059257600080fd5b8201836020820111156105a457600080fd5b803590602001918460018302840111600160201b831117156105c557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550508235935050506020810135906040013560ff166114f2565b34801561062057600080fd5b5061045c6117f5565b34801561063557600080fd5b5061045c6004803603602081101561064c57600080fd5b5035611812565b34801561065f57600080fd5b506106686118a4565b60408051918252519081900360200190f35b34801561068657600080fd5b506106686118ab565b34801561069b57600080fd5b50610433600480360360208110156106b257600080fd5b50356118bc565b3480156106c557600080fd5b506106686118db565b3480156106da57600080fd5b50610550600480360360608110156106f157600080fd5b506001600160a01b038135811691602081013590911690604001356118e1565b34801561071d57600080fd5b506106686004803603602081101561073457600080fd5b5035611938565b34801561074757600080fd5b5061055061194d565b34801561075c57600080fd5b506106686004803603602081101561077357600080fd5b50356001600160a01b03166119c0565b34801561078f57600080fd5b50610550600480360360208110156107a657600080fd5b50356119db565b3480156107b957600080fd5b50610550600480360360408110156107d057600080fd5b50803590602001356001600160a01b0316611a5c565b3480156107f257600080fd5b506106686004803603604081101561080957600080fd5b506001600160a01b038135169060200135611ac8565b34801561082b57600080fd5b50610668611af9565b34801561084057600080fd5b506105506004803603604081101561085757600080fd5b50803590602001356001600160a01b0316611afd565b34801561087957600080fd5b50610550611b5e565b34801561088e57600080fd5b50610550611bef565b3480156108a357600080fd5b50610550600480360360608110156108ba57600080fd5b506001600160a01b03813581169160208101359091169060400135611c60565b3480156108e657600080fd5b50610550600480360360208110156108fd57600080fd5b5035611c7b565b34801561091057600080fd5b506104fb611cc1565b34801561092557600080fd5b506106686004803603602081101561093c57600080fd5b5035611cd0565b34801561094f57600080fd5b50610433611cec565b34801561096457600080fd5b506109826004803603602081101561097b57600080fd5b5035611cf5565b60405180806020018581526020018481526020018360038111156109a257fe5b60ff168152602001828103825286818151815260200191508051906020019080838360005b838110156109df5781810151838201526020016109c7565b50505050905090810190601f168015610a0c5780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b348015610a2957600080fd5b5061066860048036036020811015610a4057600080fd5b5035611dba565b348015610a5357600080fd5b506104fb60048036036020811015610a6a57600080fd5b5035611dcc565b348015610a7d57600080fd5b5061043360048036036020811015610a9457600080fd5b5035611dfa565b348015610aa757600080fd5b5061055060048036036020811015610abe57600080fd5b50356001600160a01b0316611e1a565b348015610ada57600080fd5b50610668611e9e565b348015610aef57600080fd5b5061045c611ea4565b348015610b0457600080fd5b5061066860048036036020811015610b1b57600080fd5b50356001600160a01b0316611f05565b348015610b3757600080fd5b50610550611f6d565b348015610b4c57600080fd5b506104fb612019565b348015610b6157600080fd5b5061055060048036036040811015610b7857600080fd5b5080359060200135612028565b348015610b9157600080fd5b506105506120c4565b348015610ba657600080fd5b5061055060048036036020811015610bbd57600080fd5b50356001600160a01b0316612133565b348015610bd957600080fd5b506104fb61219d565b348015610bee57600080fd5b506104fb60048036036040811015610c0557600080fd5b50803590602001356121ac565b348015610c1e57600080fd5b5061043360048036036040811015610c3557600080fd5b50803590602001356001600160a01b03166121ca565b348015610c5757600080fd5b506106686121e8565b348015610c6c57600080fd5b5061045c6121ed565b61055060048036036020811015610c8b57600080fd5b503561224e565b348015610c9e57600080fd5b5061055060048036036020811015610cb557600080fd5b810190602081018135600160201b811115610ccf57600080fd5b820183602082011115610ce157600080fd5b803590602001918460018302840111600160201b83111715610d0257600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506124f4945050505050565b348015610d4f57600080fd5b5061055060048036036060811015610d6657600080fd5b8135916001600160a01b0360208201351691810190606081016040820135600160201b811115610d9557600080fd5b820183602082011115610da757600080fd5b803590602001918460018302840111600160201b83111715610dc857600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506124fd945050505050565b348015610e1557600080fd5b5061055060048036036020811015610e2c57600080fd5b810190602081018135600160201b811115610e4657600080fd5b820183602082011115610e5857600080fd5b803590602001918460208302840111600160201b83111715610e7957600080fd5b509092509050612551565b348015610e9057600080fd5b5061066861272f565b348015610ea557600080fd5b506106686127eb565b348015610eba57600080fd5b5061055060048036036040811015610ed157600080fd5b506001600160a01b03813516906020013515156127f0565b348015610ef557600080fd5b506106686128f5565b348015610f0a57600080fd5b5061055060048036036020811015610f2157600080fd5b503561291b565b348015610f3457600080fd5b5061055060048036036020811015610f4b57600080fd5b5035612b6f565b348015610f5e57600080fd5b50610550612c2d565b348015610f7357600080fd5b50610f9160048036036020811015610f8a57600080fd5b5035612c9e565b60405180826003811115610fa157fe5b60ff16815260200191505060405180910390f35b348015610fc157600080fd5b5061055060048036036080811015610fd857600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135600160201b81111561101257600080fd5b82018360208201111561102457600080fd5b803590602001918460018302840111600160201b8311171561104557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550612e1e945050505050565b34801561109257600080fd5b5061045c600480360360208110156110a957600080fd5b5035612e76565b3480156110bc57600080fd5b50610668600480360360208110156110d357600080fd5b5035613274565b3480156110e657600080fd5b50611104600480360360208110156110fd57600080fd5b503561328b565b6040518080602001848152602001838152602001828103825285818151815260200191508051906020019080838360005b8381101561114d578181015183820152602001611135565b50505050905090810190601f16801561117a5780820380516001836020036101000a031916815260200191505b5094505050505060405180910390f35b34801561119657600080fd5b50610550600480360360408110156111ad57600080fd5b6001600160a01b038235169190810190604081016020820135600160201b8111156111d757600080fd5b8201836020820111156111e957600080fd5b803590602001918460018302840111600160201b8311171561120a57600080fd5b509092509050613338565b34801561122157600080fd5b5061066861350b565b34801561123657600080fd5b506105506004803603604081101561124d57600080fd5b50803590602001356001600160a01b031661352e565b34801561126f57600080fd5b50610668613587565b34801561128457600080fd5b506104336004803603604081101561129b57600080fd5b506001600160a01b03813581169160200135166135aa565b3480156112bf57600080fd5b50610550600480360360208110156112d657600080fd5b50356001600160a01b03166135d8565b3480156112f257600080fd5b506106686136db565b6001600160e01b0319811660009081526001602052604090205460ff165b919050565b60078054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156113aa5780601f1061137f576101008083540402835291602001916113aa565b820191906000526020600020905b81548152906001019060200180831161138d57829003601f168201915b505050505090505b90565b60006113c0826136e1565b6113fb5760405162461bcd60e51b815260040180806020018281038252602c815260200180615393602c913960400191505060405180910390fd5b506000908152600560205260409020546001600160a01b031690565b600061142282611dcc565b9050806001600160a01b0316836001600160a01b031614156114755760405162461bcd60e51b81526004018080602001828103825260218152602001806154596021913960400191505060405180910390fd5b806001600160a01b03166114876136f4565b6001600160a01b031614806114a857506114a8816114a36136f4565b6135aa565b6114e35760405162461bcd60e51b81526004018080602001828103825260388152602001806152a26038913960400191505060405180910390fd5b6114ed83836136fe565b505050565b60606114fc614e79565b50604080516060810182526001600160a01b0388166000818152603660209081529084902054835282015290810186905261153a878287878761376c565b6115755760405162461bcd60e51b81526004018080602001828103825260218152602001806154086021913960400191505060405180910390fd5b6001600160a01b03871660009081526036602052604090205461159f90600163ffffffff61384916565b6001600160a01b03881660008181526036602090815260408083209490945583519283523383820181905260609484018581528b51958501959095528a517f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b958d9592948d94919260808501928601918190849084905b8381101561162e578181015183820152602001611616565b50505050905090810190601f16801561165b5780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a160006060306001600160a01b0316888a6040516020018083805190602001908083835b602083106116ac5780518252601f19909201916020918201910161168d565b6001836020036101000a038019825116818451168082178552505050505050905001826001600160a01b03166001600160a01b031660601b8152601401925050506040516020818303038152906040526040518082805190602001908083835b6020831061172b5780518252601f19909201916020918201910161170c565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461178d576040519150601f19603f3d011682016040523d82523d6000602084013e611792565b606091505b5091509150816117e9576040805162461bcd60e51b815260206004820152601c60248201527f46756e6374696f6e2063616c6c206e6f74207375636365737366756c00000000604482015290519081900360640190fd5b98975050505050505050565b604051806040016040528060018152602001603160f81b81525081565b606061181d82612e76565b6040516020018080602001828103825283818151815260200191508051906020019080838360005b8381101561185d578181015183820152602001611845565b50505050905090810190601f16801561188a5780820380516001836020036101000a031916815260200191505b5060408051601f1981840301815291905295945050505050565b62093a8081565b60006118b760036138a3565b905090565b600060026118c983612c9e565b60038111156118d457fe5b1492915050565b60355490565b6118f26118ec6136f4565b826138ae565b61192d5760405162461bcd60e51b81526004018080602001828103825260318152602001806154a16031913960400191505060405180910390fd5b6114ed838383613952565b60009081526020819052604090206002015490565b6119556136f4565b6001600160a01b031661196661219d565b6001600160a01b0316146119af576040805162461bcd60e51b815260206004820181905260248201526000805160206153bf833981519152604482015290519081900360640190fd5b600f805461ff001916610100179055565b6001600160a01b031660009081526036602052604090205490565b6119e481611dcc565b6001600160a01b03166119f56136f4565b6001600160a01b031614611a50576040805162461bcd60e51b815260206004820181905260248201527f4368696c644552433732313a20494e56414c49445f544f4b454e5f4f574e4552604482015290519081900360640190fd5b611a5981613ab0565b50565b600082815260208190526040902060020154611a7f90611a7a6136f4565b6121ca565b611aba5760405162461bcd60e51b815260040180806020018281038252602f815260200180615007602f913960400191505060405180910390fd5b611ac48282613b89565b5050565b6001600160a01b0382166000908152600260205260408120611af0908363ffffffff613bf816565b90505b92915050565b4690565b611b056136f4565b6001600160a01b0316816001600160a01b031614611b545760405162461bcd60e51b815260040180806020018281038252602f8152602001806155d4602f913960400191505060405180910390fd5b611ac48282613c04565b611b666136f4565b6001600160a01b0316611b7761219d565b6001600160a01b031614611bc0576040805162461bcd60e51b815260206004820181905260248201526000805160206153bf833981519152604482015290519081900360640190fd5b6040514790339082156108fc029083906000818181858888f19350505050158015611ac4573d6000803e3d6000fd5b604080516a5041555345525f524f4c4560a81b8152905190819003600b019020611c1b90611a7a6136f4565b611c565760405162461bcd60e51b815260040180806020018281038252604081526020018061556a6040913960400191505060405180910390fd5b611c5e613c73565b565b6114ed83838360405180602001604052806000815250612e1e565b611c866118ec6136f4565b611a505760405162461bcd60e51b815260040180806020018281038252603081526020018061553a6030913960400191505060405180910390fd5b6037546001600160a01b031681565b600080611ce460038463ffffffff613d1316565b509392505050565b600b5460ff1690565b6000818152600e60205260408120600181015460028201546060939283928392611d1e88612c9e565b8354604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152918691830182828015611da45780601f10611d7957610100808354040283529160200191611da4565b820191906000526020600020905b815481529060010190602001808311611d8757829003601f168201915b5050505050935093509350935093509193509193565b60306020526000908152604090205481565b6000611af382604051806060016040528060298152602001615304602991396003919063ffffffff613d2f16565b60006003611e0783612c9e565b6003811115611e1257fe5b141592915050565b604080516a4d494e5445525f524f4c4560a81b8152905190819003600b019020611e4690611a7a6136f4565b611e815760405162461bcd60e51b815260040180806020018281038252603d8152602001806154fd603d913960400191505060405180910390fd5b611e9481611e8f600c613d46565b613d4a565b611a59600c613e84565b61271081565b600a8054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156113aa5780601f1061137f576101008083540402835291602001916113aa565b60006001600160a01b038216611f4c5760405162461bcd60e51b815260040180806020018281038252602a8152602001806152da602a913960400191505060405180910390fd5b6001600160a01b0382166000908152600260205260409020611af3906138a3565b611f756136f4565b6001600160a01b0316611f8661219d565b6001600160a01b031614611fcf576040805162461bcd60e51b815260206004820181905260248201526000805160206153bf833981519152604482015290519081900360640190fd5b600d546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600d80546001600160a01b0319169055565b6038546001600160a01b031681565b600f54610100900460ff1661206e5760405162461bcd60e51b815260040180806020018281038252602781526020018061512a6027913960400191505060405180910390fd5b61207f6120796136f4565b836138ae565b6120ba5760405162461bcd60e51b815260040180806020018281038252602b8152602001806154d2602b913960400191505060405180910390fd5b6114ed8282613e8d565b604080516a5041555345525f524f4c4560a81b8152905190819003600b0190206120f090611a7a6136f4565b61212b5760405162461bcd60e51b815260040180806020018281038252603e815260200180615151603e913960400191505060405180910390fd5b611c5e613ed3565b6038546001600160a01b03161561217b5760405162461bcd60e51b815260040180806020018281038252602a8152602001806155aa602a913960400191505060405180910390fd5b603880546001600160a01b0319166001600160a01b0392909216919091179055565b600d546001600160a01b031690565b6000828152602081905260408120611af0908363ffffffff613bf816565b6000828152602081905260408120611af0908363ffffffff613f5616565b601481565b60088054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156113aa5780601f1061137f576101008083540402835291602001916113aa565b600f5460ff1661229d576040805162461bcd60e51b8152602060048201526015602482015274151a1948139d5c9cd95c9e481a5cc818db1bdcd959605a1b604482015290519081900360640190fd5b6122a56118ab565b612710038111156122f5576040805162461bcd60e51b8152602060048201526015602482015274139bdd08195b9bdd59da08189d5b189cc81b19599d605a1b604482015290519081900360640190fd5b6127106123006118ab565b1061234b576040805162461bcd60e51b815260206004820152601660248201527514d85b19481a185cc8185b1c9958591e48195b99195960521b604482015290519081900360640190fd5b60008111801561235c575060148111155b6123975760405162461bcd60e51b81526004018080602001828103825260308152602001806154296030913960400191505060405180910390fd5b6127106123ab6123a56118ab565b83613849565b11156123fe576040805162461bcd60e51b815260206004820152601860248201527f45786365656473204d41585f43525950544f5243484944530000000000000000604482015290519081900360640190fd5b61240f61240961272f565b82613f6b565b34101561244d5760405162461bcd60e51b815260040180806020018281038252602381526020018061532d6023913960400191505060405180910390fd5b60005b81811015611ac457612462602f613e84565b600061246e602f613d46565b6040805160a081018252600660608201908152656772616e756d60d01b608083015281526000196020808301919091526000828401819052848152600e82529290922081518051949550919390926124ca928492910190614ea3565b50602082015160018201556040909101516002909101556124eb3382613fc4565b50600101612450565b611a5981613fde565b6037546001600160a01b031633146125465760405162461bcd60e51b8152600401808060200182810382526021815260200180614f996021913960400191505060405180910390fd5b6114ed83838361407a565b8060148111156125a8576040805162461bcd60e51b815260206004820181905260248201527f4368696c644552433732313a20455843454544535f42415443485f4c494d4954604482015290519081900360640190fd5b60005b818110156126b55760008484838181106125c157fe5b9050602002013590506125d381611dcc565b6001600160a01b03166125e46136f4565b6001600160a01b03161481604051602001808061525c60219139602101828152602001915050604051602081830303815290604052906126a25760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561266757818101518382015260200161264f565b50505050905090810190601f1680156126945780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506126ac81613ab0565b506001016125ab565b506126be6136f4565b6001600160a01b03167ff871896b17e9cb7a64941c62c188a4f5c621b86800e3d15452ece01ce56073df848460405180806020018281038252848482818152602001925060200280828437600083820152604051601f909101601f19169092018290039550909350505050a2505050565b60008061273a6118ab565b90506126ac811061275657670de0b6b3a76400009150506113b2565b61251c8110612770576708e1bc9bf04000009150506113b2565b611d4c811061278a57670470de4df82000009150506113b2565b610dac81106127a4576702386f26fc1000009150506113b2565b6105dc81106127be5767011c37937e0800009150506113b2565b6101f481106127d75766d529ae9e8600009150506113b2565b668e1bc9bf0400009150506113b2565b5090565b600081565b6127f86136f4565b6001600160a01b0316826001600160a01b0316141561285e576040805162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015290519081900360640190fd5b806006600061286b6136f4565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff1916921515929092179091556128af6136f4565b60408051841515815290516001600160a01b0392909216917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319181900360200190a35050565b604080516d4445504f5349544f525f524f4c4560901b8152905190819003600e01902081565b61292481611dcc565b6001600160a01b03166129356136f4565b6001600160a01b031614612990576040805162461bcd60e51b815260206004820181905260248201527f4368696c644552433732313a20494e56414c49445f544f4b454e5f4f574e4552604482015290519081900360640190fd5b80600061299b6136f4565b6001600160a01b03167ff94915c6d1fd521cee85359239227480c7e8776d7caf1fc3bacad5c269b66a14306001600160a01b0316631653c39a866040518263ffffffff1660e01b81526004018082815260200191505060006040518083038186803b158015612a0957600080fd5b505afa158015612a1d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015612a4657600080fd5b8101908080516040519392919084600160201b821115612a6557600080fd5b908301906020820185811115612a7a57600080fd5b8251600160201b811182820188101715612a9357600080fd5b82525081516020918201929091019080838360005b83811015612ac0578181015183820152602001612aa8565b50505050905090810190601f168015612aed5780820380516001836020036101000a031916815260200191505b50604081815260208083528651818401528651929550859450908401925085019080838360005b83811015612b2c578181015183820152602001612b14565b50505050905090810190601f168015612b595780820380516001836020036101000a031916815260200191505b509250505060405180910390a4611a5981613ab0565b612b7a6118ec6136f4565b612bb55760405162461bcd60e51b81526004018080602001828103825260278152602001806151d96027913960400191505060405180910390fd5b612bbe81611dfa565b612bc757611a59565b6000818152600e602052604081206002810154600182015491929091612beb614208565b0390506000612bfd8262093a8061420c565b905080831115612c105750505050611a59565b6000612c1d846001613849565b6002909501949094555050505050565b612c356136f4565b6001600160a01b0316612c4661219d565b6001600160a01b031614612c8f576040805162461bcd60e51b815260206004820181905260248201526000805160206153bf833981519152604482015290519081900360640190fd5b600f805460ff19166001179055565b6000612ca8614f1d565b6000838152600e60209081526040918290208251815460026001821615610100026000190190911604601f81018490049093028101608090810190945260608101838152909391928492849190840182828015612d465780601f10612d1b57610100808354040283529160200191612d46565b820191906000526020600020905b815481529060010190602001808311612d2957829003601f168201915b50505050508152602001600182015481526020016002820154815250509050806020015160001415612d7c576000915050611319565b60001981602001511415612d94576001915050611319565b60408101516020820151600090612da9614208565b0390506000612dbb8262093a8061420c565b90506000612dcc8362093a80614273565b905081841415612de457600295505050505050611319565b81612df0856001613849565b148015612dfe5750612a3081105b15612e1157600295505050505050611319565b5060039695505050505050565b612e296120796136f4565b612e645760405162461bcd60e51b81526004018080602001828103825260318152602001806154a16031913960400191505060405180910390fd5b612e70848484846142da565b50505050565b606080612e8283611cf5565b5091925060019150612e919050565b612e9a84612c9e565b6003811115612ea557fe5b1415612f8357612eb3611ea4565b6040518060600160405280602e81526020016150fc602e91396040516020018083805190602001908083835b60208310612efe5780518252601f199092019160209182019101612edf565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b60208310612f465780518252601f199092019160209182019101612f27565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052915050611319565b6002612f8e84612c9e565b6003811115612f9957fe5b141561310a57612fa7611ea4565b60316000836040516020018080602001828103825283818151815260200191508051906020019080838360005b83811015612fec578181015183820152602001612fd4565b50505050905090810190601f1680156130195780820380516001836020036101000a031916815260200191505b50925050506040516020818303038152906040528051906020012081526020019081526020016000206040516020018083805190602001908083835b602083106130745780518252601f199092019160209182019101613055565b6001836020036101000a038019825116818451168082178552505050505050905001828054600181600116156101000203166002900480156130ed5780601f106130cb5761010080835404028352918201916130ed565b820191906000526020600020905b8154815290600101906020018083116130d9575b505092505050604051602081830303815290604052915050611319565b613112611ea4565b60326000836040516020018080602001828103825283818151815260200191508051906020019080838360005b8381101561315757818101518382015260200161313f565b50505050905090810190601f1680156131845780820380516001836020036101000a031916815260200191505b50925050506040516020818303038152906040528051906020012081526020019081526020016000206040516020018083805190602001908083835b602083106131df5780518252601f1990920191602091820191016131c0565b6001836020036101000a038019825116818451168082178552505050505050905001828054600181600116156101000203166002900480156132585780601f10613236576101008083540402835291820191613258565b820191906000526020600020905b815481529060010190602001808311613244575b505060408051601f198184030181529190529695505050505050565b6000818152602081905260408120611af3906138a3565b600e6020908152600091825260409182902080548351601f600260001961010060018616150201909316929092049182018490048402810184019094528084529092918391908301828280156133225780601f106132f757610100808354040283529160200191613322565b820191906000526020600020905b81548152906001019060200180831161330557829003601f168201915b5050505050908060010154908060020154905083565b604080516d4445504f5349544f525f524f4c4560901b8152905190819003600e01902061336781611a7a6136f4565b6033906134075760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156133f85780601f106133cd576101008083540402835291602001916133f8565b820191906000526020600020905b8154815290600101906020018083116133db57829003601f168201915b50509250505060405180910390fd5b5060208214156134375760008383602081101561342357600080fd5b503590506134318582613d4a565b50612e70565b60608383602081101561344957600080fd5b810190602081018135600160201b81111561346357600080fd5b82018360208201111561347557600080fd5b803590602001918460208302840111600160201b8311171561349657600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201829052508451949850939650929450505050505b81811015613502576134fa878483815181106134ed57fe5b6020026020010151613d4a565b6001016134d5565b50505050505050565b604080516a4d494e5445525f524f4c4560a81b8152905190819003600b01902081565b60008281526020819052604090206002015461354c90611a7a6136f4565b611b545760405162461bcd60e51b815260040180806020018281038252603081526020018061522c6030913960400191505060405180910390fd5b604080516a5041555345525f524f4c4560a81b8152905190819003600b01902081565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b6135e06136f4565b6001600160a01b03166135f161219d565b6001600160a01b03161461363a576040805162461bcd60e51b815260206004820181905260248201526000805160206153bf833981519152604482015290519081900360640190fd5b6001600160a01b03811661367f5760405162461bcd60e51b81526004018080602001828103825260268152602001806150d66026913960400191505060405180910390fd5b600d546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600d80546001600160a01b0319166001600160a01b0392909216919091179055565b612a3081565b6000611af360038363ffffffff61432c16565b60006118b7614338565b600081815260056020526040902080546001600160a01b0319166001600160a01b038416908117909155819061373382611dcc565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006001600160a01b0386166137b35760405162461bcd60e51b815260040180806020018281038252602581526020018061527d6025913960400191505060405180910390fd5b60016137c66137c187614395565b614421565b83868660405160008152602001604052604051808581526020018460ff1660ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015613820573d6000803e3d6000fd5b505050602060405103516001600160a01b0316866001600160a01b031614905095945050505050565b600082820183811015611af0576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000611af382613d46565b60006138b9826136e1565b6138f45760405162461bcd60e51b815260040180806020018281038252602c815260200180615200602c913960400191505060405180910390fd5b60006138ff83611dcc565b9050806001600160a01b0316846001600160a01b0316148061393a5750836001600160a01b031661392f846113b5565b6001600160a01b0316145b8061394a575061394a81856135aa565b949350505050565b826001600160a01b031661396582611dcc565b6001600160a01b0316146139aa5760405162461bcd60e51b81526004018080602001828103825260298152602001806153df6029913960400191505060405180910390fd5b6001600160a01b0382166139ef5760405162461bcd60e51b815260040180806020018281038252602481526020018061518f6024913960400191505060405180910390fd5b6139fa83838361446d565b613a056000826136fe565b6001600160a01b0383166000908152600260205260409020613a2d908263ffffffff6144cd16565b506001600160a01b0382166000908152600260205260409020613a56908263ffffffff6144d916565b50613a696003828463ffffffff6144e516565b5080826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6000613abb82611dcc565b9050613ac98160008461446d565b613ad46000836136fe565b6000828152600960205260409020546002600019610100600184161502019091160415613b12576000828152600960205260408120613b1291614f3e565b6001600160a01b0381166000908152600260205260409020613b3a908363ffffffff6144cd16565b50613b4c60038363ffffffff6144fb16565b5060405182906000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6000828152602081905260409020613ba7908263ffffffff61450716565b15611ac457613bb46136f4565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000611af0838361451c565b6000828152602081905260409020613c22908263ffffffff61458016565b15611ac457613c2f6136f4565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b613c7b611cec565b613cc3576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b600b805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa613cf66136f4565b604080516001600160a01b039092168252519081900360200190a1565b6000808080613d228686614595565b9097909650945050505050565b6000613d3c848484614610565b90505b9392505050565b5490565b6001600160a01b038216613da5576040805162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015290519081900360640190fd5b613dae816136e1565b15613e00576040805162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015290519081900360640190fd5b613e0c6000838361446d565b6001600160a01b0382166000908152600260205260409020613e34908263ffffffff6144d916565b50613e476003828463ffffffff6144e516565b5060405181906001600160a01b038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b80546001019055565b6040805142602080830191909152448284015260608083018590528351808403909101815260809092019092528051910120600090613ecc848261469d565b5092915050565b613edb611cec565b15613f20576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b600b805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258613cf66136f4565b6000611af0836001600160a01b0384166146f7565b600082613f7a57506000611af3565b82820282848281613f8757fe5b0414611af05760405162461bcd60e51b81526004018080602001828103825260218152602001806153726021913960400191505060405180910390fd5b611ac482826040518060200160405280600081525061470f565b7f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036816040518080602001828103825283818151815260200191508051906020019080838360005b8381101561403d578181015183820152602001614025565b50505050905090810190601f16801561406a5780820380516001836020036101000a031916815260200191505b509250505060405180910390a150565b60385482906001600160a01b038083169116146140c85760405162461bcd60e51b815260040180806020018281038252602b815260200180615036602b913960400191505060405180910390fd5b606060008060008580602001905160808110156140e457600080fd5b8101908080516040519392919084600160201b82111561410357600080fd5b90830190602082018581111561411857600080fd5b8251600160201b81118282018810171561413157600080fd5b82525081516020918201929091019080838360005b8381101561415e578181015183820152602001614146565b50505050905090810190601f16801561418b5780820380516001836020036101000a031916815260200191505b5060408181526020838101518483015160609586015195850184528885528285018290528484018190526000868152600e84529390932084518051999d50919b5092995093975091959094506141e79350849290910190614ea3565b50602082015160018201556040909101516002909101555050505050505050565b4290565b6000808211614262576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161426b57fe5b049392505050565b60008082116142c9576040805162461bcd60e51b815260206004820152601860248201527f536166654d6174683a206d6f64756c6f206279207a65726f0000000000000000604482015290519081900360640190fd5b8183816142d257fe5b069392505050565b6142e5848484613952565b6142f184848484614761565b612e705760405162461bcd60e51b81526004018080602001828103825260328152602001806150616032913960400191505060405180910390fd5b6000611af083836146f7565b6000333014156143905760606000368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b031691506113b29050565b503390565b600060405180608001604052806043815260200161509360439139805190602001208260000151836020015184604001518051906020012060405160200180858152602001848152602001836001600160a01b03166001600160a01b03168152602001828152602001945050505050604051602081830303815290604052805190602001209050919050565b600061442b6118db565b82604051602001808061190160f01b81525060020183815260200182815260200192505050604051602081830303815290604052805190602001209050919050565b6001600160a01b0382161580614487575061448781611dfa565b6144c25760405162461bcd60e51b815260040180806020018281038252602781526020018061547a6027913960400191505060405180910390fd5b6114ed8383836148e1565b6000611af083836148ec565b6000611af083836149b2565b6000613d3c84846001600160a01b0385166149fc565b6000611af08383614a93565b6000611af0836001600160a01b0384166149b2565b8154600090821061455e5760405162461bcd60e51b8152600401808060200182810382526022815260200180614fba6022913960400191505060405180910390fd5b82600001828154811061456d57fe5b9060005260206000200154905092915050565b6000611af0836001600160a01b0384166148ec565b8154600090819083106145d95760405162461bcd60e51b81526004018080602001828103825260228152602001806153506022913960400191505060405180910390fd5b60008460000184815481106145ea57fe5b906000526020600020906002020190508060000154816001015492509250509250929050565b6000828152600184016020526040812054828161466e5760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561266757818101518382015260200161264f565b5084600001600182038154811061468157fe5b9060005260206000209060020201600101549150509392505050565b6000828152600e6020526040902060606146c16146bc84612710614273565b614b67565b80519091506146d69083906020840190614ea3565b506146df614208565b600183015560006146ef85611dcc565b505050505050565b60009081526001919091016020526040902054151590565b6147198383613d4a565b6147266000848484614761565b6114ed5760405162461bcd60e51b81526004018080602001828103825260328152602001806150616032913960400191505060405180910390fd5b6000614775846001600160a01b0316614c53565b6147815750600161394a565b60606148a7630a85bd0160e11b6147966136f4565b88878760405160240180856001600160a01b03166001600160a01b03168152602001846001600160a01b03166001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561480f5781810151838201526020016147f7565b50505050905090810190601f16801561483c5780820380516001836020036101000a031916815260200191505b5095505050505050604051602081830303815290604052906001600160e01b0319166020820180516001600160e01b038381831617835250505050604051806060016040528060328152602001615061603291396001600160a01b038816919063ffffffff614c5916565b905060008180602001905160208110156148c057600080fd5b50516001600160e01b031916630a85bd0160e11b1492505050949350505050565b6114ed838383614c68565b600081815260018301602052604081205480156149a8578354600019808301919081019060009087908390811061491f57fe5b906000526020600020015490508087600001848154811061493c57fe5b60009182526020808320909101929092558281526001898101909252604090209084019055865487908061496c57fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050611af3565b6000915050611af3565b60006149be83836146f7565b6149f457508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155611af3565b506000611af3565b600082815260018401602052604081205480614a61575050604080518082018252838152602080820184815286546001818101895560008981528481209551600290930290950191825591519082015586548684528188019092529290912055613d3f565b82856000016001830381548110614a7457fe5b9060005260206000209060020201600101819055506000915050613d3f565b600081815260018301602052604081205480156149a85783546000198083019190810190600090879083908110614ac657fe5b9060005260206000209060020201905080876000018481548110614ae657fe5b600091825260208083208454600290930201918255600193840154918401919091558354825289830190526040902090840190558654879080614b2557fe5b6000828152602080822060026000199094019384020182815560019081018390559290935588815289820190925260408220919091559450611af39350505050565b606060005b600a811015614c4d57601081600a8110614b8257fe5b601091828204019190066002029054906101000a900461ffff1661ffff168311614c4557601181600a8110614bb357fe5b01805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015614c385780601f10614c0d57610100808354040283529160200191614c38565b820191906000526020600020905b815481529060010190602001808311614c1b57829003601f168201915b5050505050915050611319565b600101614b6c565b50919050565b3b151590565b6060613d3c8484600085614cb7565b614c738383836114ed565b614c7b611cec565b156114ed5760405162461bcd60e51b815260040180806020018281038252602b815260200180614fdc602b913960400191505060405180910390fd5b606082471015614cf85760405162461bcd60e51b81526004018080602001828103825260268152602001806151b36026913960400191505060405180910390fd5b614d0185614c53565b614d52576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310614d915780518252601f199092019160209182019101614d72565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114614df3576040519150601f19603f3d011682016040523d82523d6000602084013e614df8565b606091505b5091509150614e08828286614e13565b979650505050505050565b60608315614e22575081613d3f565b825115614e325782518084602001fd5b60405162461bcd60e51b815260206004820181815284516024840152845185939192839260440191908501908083836000831561266757818101518382015260200161264f565b60405180606001604052806000815260200160006001600160a01b03168152602001606081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10614ee457805160ff1916838001178555614f11565b82800160010185558215614f11579182015b82811115614f11578251825591602001919060010190614ef6565b506127e7929150614f7e565b60405180606001604052806060815260200160008152602001600081525090565b50805460018160011615610100020316600290046000825580601f10614f645750611a59565b601f016020900490600052602060002090810190611a5991905b6113b291905b808211156127e75760008155600101614f8456fe4678426173654368696c6454756e6e656c3a20494e56414c49445f53454e444552456e756d657261626c655365743a20696e646578206f7574206f6620626f756e64734552433732315061757361626c653a20746f6b656e207472616e73666572207768696c6520706175736564416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e744678426173654368696c6454756e6e656c3a20494e56414c49445f53454e4445525f46524f4d5f524f4f544552433732313a207472616e7366657220746f206e6f6e20455243373231526563656976657220696d706c656d656e7465724d6574615472616e73616374696f6e2875696e74323536206e6f6e63652c616464726573732066726f6d2c62797465732066756e6374696f6e5369676e6174757265294f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373516d5764316d6e374475477978394279664e6571437367645355734a5a316372616769746761796773714476456d4765726d696e6174696f6e2073746172747320323032312d30342d31325431363a30303a30305a4552433732315072657365744d696e7465725061757365724175746f49643a206d75737420686176652070617573657220726f6c6520746f2070617573654552433732313a207472616e7366657220746f20746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c4f6e6c7920746865204f776e65722063616e20776174657220612043727970744f72636869642e4552433732313a206f70657261746f7220717565727920666f72206e6f6e6578697374656e7420746f6b656e416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b654368696c644552433732313a20494e56414c49445f544f4b454e5f4f574e4552204e61746976654d6574615472616e73616374696f6e3a20494e56414c49445f5349474e45524552433732313a20617070726f76652063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f76656420666f7220616c6c4552433732313a2062616c616e636520717565727920666f7220746865207a65726f20616464726573734552433732313a206f776e657220717565727920666f72206e6f6e6578697374656e7420746f6b656e45746865722076616c75652073656e742069732062656c6f7720746865207072696365456e756d657261626c654d61703a20696e646578206f7574206f6620626f756e6473536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774552433732313a20617070726f76656420717565727920666f72206e6f6e6578697374656e7420746f6b656e4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65724552433732313a207472616e73666572206f6620746f6b656e2074686174206973206e6f74206f776e5369676e657220616e64207369676e617475726520646f206e6f74206d61746368596f752063616e20706c616e74206d696e696d756d20312c206d6178696d756d2032302043727970744f7263686964734552433732313a20617070726f76616c20746f2063757272656e74206f776e6572446561642043727970744f7263686964732063616e6e6f74206265207472616e736665727265644552433732313a207472616e736665722063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f7665644f6e6c7920746865204f776e65722063616e206765726d696e61746520612043727970744f72636869642e4552433732315072657365744d696e7465725061757365724175746f49643a206d7573742068617665206d696e74657220726f6c6520746f206d696e744552433732314275726e61626c653a2063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f7665644552433732315072657365744d696e7465725061757365724175746f49643a206d75737420686176652070617573657220726f6c6520746f20756e70617573654678426173654368696c6454756e6e656c3a20524f4f545f54554e4e454c5f414c52454144595f534554416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220e290e661f06b099131748d4903ab89ac02e7e4c155b3877ae9cfb4be903ad42964736f6c63430006060033", + "devdoc": { + "methods": { + "approve(address,uint256)": { + "details": "See {IERC721-approve}." + }, + "balanceOf(address)": { + "details": "See {IERC721-balanceOf}." + }, + "baseURI()": { + "details": "Returns the base URI set via {_setBaseURI}. This will be automatically added as a prefix in {tokenURI} to each token's URI, or to the token ID if no specific URI is set for that token ID." + }, + "burn(uint256)": { + "details": "Burns `tokenId`. See {ERC721-_burn}. * Requirements: * - The caller must own `tokenId` or be an approved operator." + }, + "deposit(address,bytes)": { + "details": "Should be callable only by ChildChainManager Should handle deposit by minting the required tokenId for user Make sure minting is done only by this function", + "params": { + "depositData": "abi encoded tokenId", + "user": "user address for whom deposit is being done" + } + }, + "encodeTokenMetadata(uint256)": { + "params": { + "tokenId": "Token for which URI to be fetched" + } + }, + "getApproved(uint256)": { + "details": "See {IERC721-getApproved}." + }, + "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." + }, + "hasRole(bytes32,address)": { + "details": "Returns `true` if `account` has been granted `role`." + }, + "isApprovedForAll(address,address)": { + "details": "See {IERC721-isApprovedForAll}." + }, + "mint(address)": { + "details": "Creates a new token for `to`. Its token ID will be automatically assigned (and available on the emitted {IERC721-Transfer} event), and the token URI autogenerated based on the base URI passed at construction. * See {ERC721-_mint}. * Requirements: * - the caller must have the `MINTER_ROLE`." + }, + "name()": { + "details": "See {IERC721Metadata-name}." + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "ownerOf(uint256)": { + "details": "See {IERC721-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." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. * NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "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 granted `role`, emits a {RoleRevoked} event. * Requirements: * - the caller must be `account`." + }, + "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." + }, + "safeTransferFrom(address,address,uint256)": { + "details": "See {IERC721-safeTransferFrom}." + }, + "safeTransferFrom(address,address,uint256,bytes)": { + "details": "See {IERC721-safeTransferFrom}." + }, + "setApprovalForAll(address,bool)": { + "details": "See {IERC721-setApprovalForAll}." + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}. * Time complexity O(1), guaranteed to always use less than 30 000 gas." + }, + "symbol()": { + "details": "See {IERC721Metadata-symbol}." + }, + "tokenByIndex(uint256)": { + "details": "See {IERC721Enumerable-tokenByIndex}." + }, + "tokenOfOwnerByIndex(address,uint256)": { + "details": "See {IERC721Enumerable-tokenOfOwnerByIndex}." + }, + "totalSupply()": { + "details": "See {IERC721Enumerable-totalSupply}." + }, + "transferFrom(address,address,uint256)": { + "details": "See {IERC721-transferFrom}." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "unpause()": { + "details": "Unpauses all token transfers. * See {ERC721Pausable} and {Pausable-_unpause}. * Requirements: * - the caller must have the `PAUSER_ROLE`." + }, + "withdraw()": { + "details": "Withdraw ether from this contract (Callable by owner only)" + }, + "withdraw(uint256)": { + "details": "Should burn user's token. This transaction will be verified when exiting on root chain", + "params": { + "tokenId": "tokenId to withdraw" + } + }, + "withdrawBatch(uint256[])": { + "details": "Should burn user's tokens. This transaction will be verified when exiting on root chain", + "params": { + "tokenIds": "tokenId list to withdraw" + } + }, + "withdrawWithMetadata(uint256)": { + "details": "Should handle withraw by burning user's token. * This transaction will be verified when exiting on root chain", + "params": { + "tokenId": "tokenId to withdraw" + } + } + } + }, + "userdoc": { + "methods": { + "deposit(address,bytes)": { + "notice": "called when token is deposited on root chain" + }, + "encodeTokenMetadata(uint256)": { + "notice": "This method is supposed to be called by client when withdrawing token with metadata and pass return value of this function as second paramter of `withdrawWithMetadata` method * It can be overridden by clients to encode data in a different form, which needs to be decoded back by them correctly during exiting" + }, + "withdraw(uint256)": { + "notice": "called when user wants to withdraw token back to root chain" + }, + "withdrawBatch(uint256[])": { + "notice": "called when user wants to withdraw multiple tokens back to root chain" + }, + "withdrawWithMetadata(uint256)": { + "notice": "called when user wants to withdraw token back to root chain with arbitrary metadata" + } + } + }, + "storageLayout": { + "storage": [ + { + "astId": 549, + "contract": "contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol:CryptOrchidERC721Child", + "label": "_roles", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_struct(RoleData)545_storage)" + }, + { + "astId": 932, + "contract": "contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol:CryptOrchidERC721Child", + "label": "_supportedInterfaces", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes4,t_bool)" + }, + { + "astId": 3555, + "contract": "contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol:CryptOrchidERC721Child", + "label": "_holderTokens", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_struct(UintSet)6038_storage)" + }, + { + "astId": 3557, + "contract": "contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol:CryptOrchidERC721Child", + "label": "_tokenOwners", + "offset": 0, + "slot": "3", + "type": "t_struct(UintToAddressMap)5415_storage" + }, + { + "astId": 3561, + "contract": "contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol:CryptOrchidERC721Child", + "label": "_tokenApprovals", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_uint256,t_address)" + }, + { + "astId": 3567, + "contract": "contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol:CryptOrchidERC721Child", + "label": "_operatorApprovals", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_address,t_mapping(t_address,t_bool))" + }, + { + "astId": 3569, + "contract": "contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol:CryptOrchidERC721Child", + "label": "_name", + "offset": 0, + "slot": "7", + "type": "t_string_storage" + }, + { + "astId": 3571, + "contract": "contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol:CryptOrchidERC721Child", + "label": "_symbol", + "offset": 0, + "slot": "8", + "type": "t_string_storage" + }, + { + "astId": 3575, + "contract": "contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol:CryptOrchidERC721Child", + "label": "_tokenURIs", + "offset": 0, + "slot": "9", + "type": "t_mapping(t_uint256,t_string_storage)" + }, + { + "astId": 3577, + "contract": "contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol:CryptOrchidERC721Child", + "label": "_baseURI", + "offset": 0, + "slot": "10", + "type": "t_string_storage" + }, + { + "astId": 6151, + "contract": "contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol:CryptOrchidERC721Child", + "label": "_paused", + "offset": 0, + "slot": "11", + "type": "t_bool" + }, + { + "astId": 1374, + "contract": "contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol:CryptOrchidERC721Child", + "label": "_tokenIdTracker", + "offset": 0, + "slot": "12", + "type": "t_struct(Counter)5041_storage" + }, + { + "astId": 817, + "contract": "contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol:CryptOrchidERC721Child", + "label": "_owner", + "offset": 0, + "slot": "13", + "type": "t_address" + }, + { + "astId": 8425, + "contract": "contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol:CryptOrchidERC721Child", + "label": "cryptorchids", + "offset": 0, + "slot": "14", + "type": "t_mapping(t_uint256,t_struct(CryptOrchid)8421_storage)" + }, + { + "astId": 8433, + "contract": "contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol:CryptOrchidERC721Child", + "label": "saleStarted", + "offset": 0, + "slot": "15", + "type": "t_bool" + }, + { + "astId": 8436, + "contract": "contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol:CryptOrchidERC721Child", + "label": "growingStarted", + "offset": 1, + "slot": "15", + "type": "t_bool" + }, + { + "astId": 8470, + "contract": "contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol:CryptOrchidERC721Child", + "label": "limits", + "offset": 0, + "slot": "16", + "type": "t_array(t_uint16)10_storage" + }, + { + "astId": 8485, + "contract": "contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol:CryptOrchidERC721Child", + "label": "genum", + "offset": 0, + "slot": "17", + "type": "t_array(t_string_storage)10_storage" + }, + { + "astId": 8500, + "contract": "contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol:CryptOrchidERC721Child", + "label": "speciesIPFSConstant", + "offset": 0, + "slot": "27", + "type": "t_array(t_string_storage)10_storage" + }, + { + "astId": 8515, + "contract": "contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol:CryptOrchidERC721Child", + "label": "deadSpeciesIPFSConstant", + "offset": 0, + "slot": "37", + "type": "t_array(t_string_storage)10_storage" + }, + { + "astId": 8517, + "contract": "contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol:CryptOrchidERC721Child", + "label": "_tokenIds", + "offset": 0, + "slot": "47", + "type": "t_struct(Counter)5041_storage" + }, + { + "astId": 8521, + "contract": "contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol:CryptOrchidERC721Child", + "label": "requestToToken", + "offset": 0, + "slot": "48", + "type": "t_mapping(t_bytes32,t_uint256)" + }, + { + "astId": 8525, + "contract": "contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol:CryptOrchidERC721Child", + "label": "speciesIPFS", + "offset": 0, + "slot": "49", + "type": "t_mapping(t_bytes32,t_string_storage)" + }, + { + "astId": 8529, + "contract": "contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol:CryptOrchidERC721Child", + "label": "deadSpeciesIPFS", + "offset": 0, + "slot": "50", + "type": "t_mapping(t_bytes32,t_string_storage)" + }, + { + "astId": 11967, + "contract": "contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol:CryptOrchidERC721Child", + "label": "_revertMsg", + "offset": 0, + "slot": "51", + "type": "t_string_storage" + }, + { + "astId": 12159, + "contract": "contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol:CryptOrchidERC721Child", + "label": "inited", + "offset": 0, + "slot": "52", + "type": "t_bool" + }, + { + "astId": 12066, + "contract": "contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol:CryptOrchidERC721Child", + "label": "domainSeperator", + "offset": 0, + "slot": "53", + "type": "t_bytes32" + }, + { + "astId": 12205, + "contract": "contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol:CryptOrchidERC721Child", + "label": "nonces", + "offset": 0, + "slot": "54", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 19156, + "contract": "contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol:CryptOrchidERC721Child", + "label": "fxChild", + "offset": 0, + "slot": "55", + "type": "t_address" + }, + { + "astId": 19158, + "contract": "contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol:CryptOrchidERC721Child", + "label": "fxRootTunnel", + "offset": 0, + "slot": "56", + "type": "t_address" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_array(t_string_storage)10_storage": { + "base": "t_string_storage", + "encoding": "inplace", + "label": "string[10]", + "numberOfBytes": "320" + }, + "t_array(t_struct(MapEntry)5089_storage)dyn_storage": { + "base": "t_struct(MapEntry)5089_storage", + "encoding": "dynamic_array", + "label": "struct EnumerableMap.MapEntry[]", + "numberOfBytes": "32" + }, + "t_array(t_uint16)10_storage": { + "base": "t_uint16", + "encoding": "inplace", + "label": "uint16[10]", + "numberOfBytes": "32" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_bytes4": { + "encoding": "inplace", + "label": "bytes4", + "numberOfBytes": "4" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_mapping(t_address,t_bool))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => bool))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_bool)" + }, + "t_mapping(t_address,t_struct(UintSet)6038_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct EnumerableSet.UintSet)", + "numberOfBytes": "32", + "value": "t_struct(UintSet)6038_storage" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_bytes32,t_string_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => string)", + "numberOfBytes": "32", + "value": "t_string_storage" + }, + "t_mapping(t_bytes32,t_struct(RoleData)545_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct AccessControl.RoleData)", + "numberOfBytes": "32", + "value": "t_struct(RoleData)545_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_bytes4,t_bool)": { + "encoding": "mapping", + "key": "t_bytes4", + "label": "mapping(bytes4 => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_uint256,t_address)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_uint256,t_string_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => string)", + "numberOfBytes": "32", + "value": "t_string_storage" + }, + "t_mapping(t_uint256,t_struct(CryptOrchid)8421_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => struct CryptOrchidGoerli.CryptOrchid)", + "numberOfBytes": "32", + "value": "t_struct(CryptOrchid)8421_storage" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(AddressSet)5917_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.AddressSet", + "members": [ + { + "astId": 5916, + "contract": "contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol:CryptOrchidERC721Child", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)5652_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Counter)5041_storage": { + "encoding": "inplace", + "label": "struct Counters.Counter", + "members": [ + { + "astId": 5040, + "contract": "contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol:CryptOrchidERC721Child", + "label": "_value", + "offset": 0, + "slot": "0", + "type": "t_uint256" + } + ], + "numberOfBytes": "32" + }, + "t_struct(CryptOrchid)8421_storage": { + "encoding": "inplace", + "label": "struct CryptOrchidGoerli.CryptOrchid", + "members": [ + { + "astId": 8416, + "contract": "contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol:CryptOrchidERC721Child", + "label": "species", + "offset": 0, + "slot": "0", + "type": "t_string_storage" + }, + { + "astId": 8418, + "contract": "contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol:CryptOrchidERC721Child", + "label": "plantedAt", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 8420, + "contract": "contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol:CryptOrchidERC721Child", + "label": "waterLevel", + "offset": 0, + "slot": "2", + "type": "t_uint256" + } + ], + "numberOfBytes": "96" + }, + "t_struct(Map)5097_storage": { + "encoding": "inplace", + "label": "struct EnumerableMap.Map", + "members": [ + { + "astId": 5092, + "contract": "contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol:CryptOrchidERC721Child", + "label": "_entries", + "offset": 0, + "slot": "0", + "type": "t_array(t_struct(MapEntry)5089_storage)dyn_storage" + }, + { + "astId": 5096, + "contract": "contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol:CryptOrchidERC721Child", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(MapEntry)5089_storage": { + "encoding": "inplace", + "label": "struct EnumerableMap.MapEntry", + "members": [ + { + "astId": 5086, + "contract": "contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol:CryptOrchidERC721Child", + "label": "_key", + "offset": 0, + "slot": "0", + "type": "t_bytes32" + }, + { + "astId": 5088, + "contract": "contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol:CryptOrchidERC721Child", + "label": "_value", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ], + "numberOfBytes": "64" + }, + "t_struct(RoleData)545_storage": { + "encoding": "inplace", + "label": "struct AccessControl.RoleData", + "members": [ + { + "astId": 542, + "contract": "contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol:CryptOrchidERC721Child", + "label": "members", + "offset": 0, + "slot": "0", + "type": "t_struct(AddressSet)5917_storage" + }, + { + "astId": 544, + "contract": "contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol:CryptOrchidERC721Child", + "label": "adminRole", + "offset": 0, + "slot": "2", + "type": "t_bytes32" + } + ], + "numberOfBytes": "96" + }, + "t_struct(Set)5652_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 5647, + "contract": "contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol:CryptOrchidERC721Child", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 5651, + "contract": "contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol:CryptOrchidERC721Child", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(UintSet)6038_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.UintSet", + "members": [ + { + "astId": 6037, + "contract": "contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol:CryptOrchidERC721Child", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)5652_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(UintToAddressMap)5415_storage": { + "encoding": "inplace", + "label": "struct EnumerableMap.UintToAddressMap", + "members": [ + { + "astId": 5414, + "contract": "contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol:CryptOrchidERC721Child", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Map)5097_storage" + } + ], + "numberOfBytes": "64" + }, + "t_uint16": { + "encoding": "inplace", + "label": "uint16", + "numberOfBytes": "2" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/mumbai/solcInputs/4f9b70493defebe2f15081e93e9ddfbb.json b/deployments/mumbai/solcInputs/4f9b70493defebe2f15081e93e9ddfbb.json new file mode 100644 index 0000000..7c1e048 --- /dev/null +++ b/deployments/mumbai/solcInputs/4f9b70493defebe2f15081e93e9ddfbb.json @@ -0,0 +1,359 @@ +{ + "language": "Solidity", + "sources": { + "contracts/Coupon/Coupon.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.6 <0.9.0;\n\nimport \"@openzeppelin/contracts/math/SafeMath.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@chainlink/contracts/src/v0.6/VRFConsumerBase.sol\";\nimport \"../Interfaces/ERC721.sol\";\nimport \"../Libraries/CurrentTime.sol\";\n\ncontract Coupon is Ownable, VRFConsumerBase, CurrentTime {\n using SafeMath for uint256;\n mapping(uint256 => bool) internal redemptions;\n mapping(address => uint256) public addressEntriesCount;\n\n uint256 public constant PROMOTION_END = 1622520000;\n uint256 internal constant REBATE_AMOUNT = 20000000000000000;\n uint256 internal constant MINT_FLOOR = 40000000000000000;\n\n uint256 public promotionStart;\n address public cryptorchidsERC721;\n\n uint256 public drawingEntriesCount;\n uint256 public pot;\n address[] internal drawingEntries;\n bytes32 internal randomWinnerRequestId;\n bool public winnerRequested;\n address public winner;\n\n bytes32 internal keyHash;\n uint256 internal vrfFee;\n address public VRFCoordinator;\n address public LinkToken;\n\n constructor(\n address cryptorchidsAddress,\n address _VRFCoordinator,\n address _LinkToken,\n bytes32 _keyhash\n ) public payable VRFConsumerBase(_VRFCoordinator, _LinkToken) {\n VRFCoordinator = _VRFCoordinator;\n LinkToken = _LinkToken;\n keyHash = _keyhash;\n vrfFee = 2000000000000000000; // 2 LINK\n cryptorchidsERC721 = cryptorchidsAddress;\n promotionStart = block.timestamp;\n }\n\n /** Public function for whether the promotion is open. The promotion is only\n * open if the contract balance is greater than the currentRebate. Displayed\n * on CryptOrchids nursery for transparency.\n * @dev\n * @return bool Whether promotion is open for entries.\n */\n function promotionOpen() public view returns (bool) {\n if (currentTime() > PROMOTION_END) return false;\n if (pot > address(this).balance + currentRebate()) return false;\n if (currentRebate() > address(this).balance) return false;\n\n return true;\n }\n\n /** Check rebate value and eligible tokens. Tokens are valid if they are planted\n * after this contract is deployed, alive, and not yet redeemed.\n * @dev calls public functions on the CryptOrchids contract to build\n * an array of eligible token IDs and a rebate amount.\n * @return eligibleTokens uint256[] Uncompacted array of 0s and eligible token IDs\n * @return rebateAmount uint256 Eligible tokens * currentRebate\n */\n function checkEligibility()\n public\n view\n returns (\n uint256[] memory eligibleTokens,\n uint256 rebateAmount,\n uint256 count\n )\n {\n require(promotionOpen(), \"Promotion over\");\n\n uint256 _rebateAmount = 0;\n uint256 tokenCount = ERC721(cryptorchidsERC721).balanceOf(msg.sender);\n uint256[] memory _eligibleTokens = new uint256[](tokenCount);\n\n for (uint256 index = 0; index < tokenCount; index++) {\n uint256 tokenId = ERC721(cryptorchidsERC721).tokenOfOwnerByIndex(msg.sender, index);\n bool flowering = ERC721(cryptorchidsERC721).flowering(tokenId);\n (, uint256 plantedAt, , ) = ERC721(cryptorchidsERC721).getTokenMetadata(tokenId);\n\n if (redemptions[tokenId] != true && flowering && plantedAt > promotionStart) {\n _eligibleTokens[index] = tokenId;\n _rebateAmount += tokenRebate(tokenId);\n count += 1;\n }\n }\n\n if (_rebateAmount > safeBalance()) {\n uint256[] memory empty = new uint256[](0);\n return (empty, _rebateAmount, uint256(0));\n }\n return (_eligibleTokens, _rebateAmount, count);\n }\n\n /** Claim ETH for valid tokens. Check for valid tokens before claming.\n * @dev calls checkEligibility and sets all eligibleTokens as redeemed.\n * Then transfers caller rebateAmount.\n */\n function redeem() public virtual returns (uint256) {\n require(currentTime() < PROMOTION_END, \"Promotion over\");\n (uint256[] memory redeeming, uint256 rebateAmount, ) = checkEligibility();\n require(safeBalance() >= rebateAmount, \"COC:rdm:paused\");\n\n for (uint256 index = 0; index < redeeming.length - 1; index++) {\n uint256 tokenId = redeeming[index];\n if (tokenId > 0) redemptions[tokenId] = true;\n }\n\n payable(msg.sender).transfer(rebateAmount);\n\n return rebateAmount;\n }\n\n /** Redeem tokens for entries in drawing.\n * @dev Adds address to drawingEntries, increments entriesCount, and\n * increases pot for each eligible token, while marking each token redeemed.\n */\n function enter() public virtual {\n require(currentTime() < PROMOTION_END, \"Promotion over\");\n (uint256[] memory redeeming, uint256 rebateAmount, uint256 count) = checkEligibility();\n\n require(safeBalance() >= rebateAmount, \"COC:enr:paused\");\n\n for (uint256 index = 0; index < redeeming.length; index++) {\n uint256 tokenId = redeeming[index];\n if (tokenId > 0) {\n redemptions[tokenId] = true;\n drawingEntriesCount += 1;\n addressEntriesCount[msg.sender] += 1;\n drawingEntries.push(address(msg.sender));\n pot += tokenRebate(tokenId);\n }\n }\n }\n\n /** Current rebate amount for new, mintable token. Based on CryptOrchids current price,\n * the ramping rebate is intended to address the regrettable FOMO ramp pricing.\n * Starts at 0.02ETH, and increases with inverse correlation to price ramp to\n * offer effectively straight 0.04 ETH for seeds.\n * @dev calls CryptOrchids.currentPrice and finds difference with MINT_FLOOR to return rebate.\n */\n function currentRebate() public view returns (uint256) {\n uint256 currentPrice = ERC721(cryptorchidsERC721).currentPrice();\n\n if (currentPrice == MINT_FLOOR) return REBATE_AMOUNT;\n\n return currentPrice - MINT_FLOOR;\n }\n\n /** Redeemable rebate amount for existing token. Based on the price the token was sold at,\n * this prevents a seed holder from redeeming a seed for more than it was purchased for.\n * @dev Copies currentPrice and returns rebate amount for tokenId\n */\n function tokenRebate(uint256 tokenId) public view returns (uint256) {\n if (tokenId > 9900) {\n return 1000000000000000000 - MINT_FLOOR; // 9900+: 0.960 ETH\n } else if (tokenId > 9500) {\n return 640000000000000000 - MINT_FLOOR; // 9500-9500: 0.60 ETH\n } else if (tokenId > 7500) {\n return 320000000000000000 - MINT_FLOOR; // 7500-9500: 0.28 ETH\n } else if (tokenId > 3500) {\n return 160000000000000000 - MINT_FLOOR; // 3500-7500: 0.12 ETH\n } else if (tokenId > 1500) {\n return 80000000000000000 - MINT_FLOOR; // 1500-3500: 0.04 ETH\n } else if (tokenId > 500) {\n return 60000000000000000 - MINT_FLOOR; // 500-1500: 0.02 ETH\n } else {\n return REBATE_AMOUNT; // 0 - 500 0.02 ETH\n }\n }\n\n /** Current count of rebates available as determined by safeBalance and currentRebate\n */\n function rebatesAvailable() public view returns (uint256) {\n return SafeMath.div(safeBalance(), currentRebate());\n }\n\n /** Current rebate amount for eligible token. Based on CryptOrchids current price,\n * the ramping rebate is intended to address the regrettable FOMO ramp pricing.\n * Starts at 0.02ETH,\n * @dev calls CryptOrchids.currentPrice and finds difference to .\n * Then transfers caller rebateAmount.\n */\n function safeBalance() internal view returns (uint256) {\n return address(this).balance - pot;\n }\n\n function selectWinner(uint256 userProvidedSeed) public virtual {\n require(currentTime() > PROMOTION_END, \"COC:wW:promotion running\");\n require(randomWinnerRequestId[0] == 0, \"COC:wW:winner requested\");\n require(LINK.balanceOf(address(this)) >= vrfFee, \"COC:sW:no LINK\");\n\n randomWinnerRequestId = requestRandomness(keyHash, vrfFee, userProvidedSeed);\n }\n\n function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override {\n require(requestId == randomWinnerRequestId, \"COC:fR:invalid request ID\");\n uint256 winnerIndex = SafeMath.mod(randomness, drawingEntriesCount);\n winner = drawingEntries[winnerIndex];\n }\n\n /** Winner may withdraw ether from the contract once the promotion is over.\n *\n */\n function withdrawWinner() public {\n require(currentTime() > PROMOTION_END, \"COC:wW:promotion running\");\n require(msg.sender == winner, \"COC:wW:not winner\");\n uint256 txAmount = pot;\n pot = 0;\n payable(msg.sender).transfer(txAmount);\n }\n\n /** Withdraw ether from this contract once the promotion is over.\n * @dev Transfer remaining balance to owner if after PROMOTION_END.\n *\n */\n function withdrawUnclaimed() public onlyOwner {\n require(currentTime() > PROMOTION_END, \"COC:wU:promotion running\");\n require(pot == 0, \"COC:wU:winnings unclaimed\");\n\n uint256 balance = address(this).balance;\n payable(msg.sender).transfer(balance);\n }\n\n receive() external payable {}\n}\n" + }, + "@openzeppelin/contracts/math/SafeMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\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 uint256 c = a + b;\n if (c < a) return (false, 0);\n return (true, c);\n }\n\n /**\n * @dev Returns the substraction 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 if (b > a) return (false, 0);\n return (true, a - b);\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 // 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 * @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 if (b == 0) return (false, 0);\n return (true, a / b);\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 if (b == 0) return (false, 0);\n return (true, a % b);\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 uint256 c = a + b;\n require(c >= a, \"SafeMath: addition overflow\");\n return c;\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 require(b <= a, \"SafeMath: subtraction overflow\");\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 if (a == 0) return 0;\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n return c;\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. 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) internal pure returns (uint256) {\n require(b > 0, \"SafeMath: division by zero\");\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 require(b > 0, \"SafeMath: modulo by zero\");\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 require(b <= a, errorMessage);\n return a - b;\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\n * message unnecessarily. For custom revert reasons use {tryDiv}.\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 require(b > 0, errorMessage);\n return a / b;\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 require(b > 0, errorMessage);\n return a % b;\n }\n}\n" + }, + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"../utils/Context.sol\";\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor () internal {\n address msgSender = _msgSender();\n _owner = msgSender;\n emit OwnershipTransferred(address(0), msgSender);\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n emit OwnershipTransferred(_owner, address(0));\n _owner = address(0);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n emit OwnershipTransferred(_owner, newOwner);\n _owner = newOwner;\n }\n}\n" + }, + "@chainlink/contracts/src/v0.6/VRFConsumerBase.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.0;\n\nimport \"./vendor/SafeMathChainlink.sol\";\n\nimport \"./interfaces/LinkTokenInterface.sol\";\n\nimport \"./VRFRequestIDBase.sol\";\n\n/** ****************************************************************************\n * @notice Interface for contracts using VRF randomness\n * *****************************************************************************\n * @dev PURPOSE\n *\n * @dev Reggie the Random Oracle (not his real job) wants to provide randomness\n * @dev to Vera the verifier in such a way that Vera can be sure he's not\n * @dev making his output up to suit himself. Reggie provides Vera a public key\n * @dev to which he knows the secret key. Each time Vera provides a seed to\n * @dev Reggie, he gives back a value which is computed completely\n * @dev deterministically from the seed and the secret key.\n *\n * @dev Reggie provides a proof by which Vera can verify that the output was\n * @dev correctly computed once Reggie tells it to her, but without that proof,\n * @dev the output is indistinguishable to her from a uniform random sample\n * @dev from the output space.\n *\n * @dev The purpose of this contract is to make it easy for unrelated contracts\n * @dev to talk to Vera the verifier about the work Reggie is doing, to provide\n * @dev simple access to a verifiable source of randomness.\n * *****************************************************************************\n * @dev USAGE\n *\n * @dev Calling contracts must inherit from VRFConsumerBase, and can\n * @dev initialize VRFConsumerBase's attributes in their constructor as\n * @dev shown:\n *\n * @dev contract VRFConsumer {\n * @dev constuctor(, address _vrfCoordinator, address _link)\n * @dev VRFConsumerBase(_vrfCoordinator, _link) public {\n * @dev \n * @dev }\n * @dev }\n *\n * @dev The oracle will have given you an ID for the VRF keypair they have\n * @dev committed to (let's call it keyHash), and have told you the minimum LINK\n * @dev price for VRF service. Make sure your contract has sufficient LINK, and\n * @dev call requestRandomness(keyHash, fee, seed), where seed is the input you\n * @dev want to generate randomness from.\n *\n * @dev Once the VRFCoordinator has received and validated the oracle's response\n * @dev to your request, it will call your contract's fulfillRandomness method.\n *\n * @dev The randomness argument to fulfillRandomness is the actual random value\n * @dev generated from your seed.\n *\n * @dev The requestId argument is generated from the keyHash and the seed by\n * @dev makeRequestId(keyHash, seed). If your contract could have concurrent\n * @dev requests open, you can use the requestId to track which seed is\n * @dev associated with which randomness. See VRFRequestIDBase.sol for more\n * @dev details. (See \"SECURITY CONSIDERATIONS\" for principles to keep in mind,\n * @dev if your contract could have multiple requests in flight simultaneously.)\n *\n * @dev Colliding `requestId`s are cryptographically impossible as long as seeds\n * @dev differ. (Which is critical to making unpredictable randomness! See the\n * @dev next section.)\n *\n * *****************************************************************************\n * @dev SECURITY CONSIDERATIONS\n *\n * @dev A method with the ability to call your fulfillRandomness method directly\n * @dev could spoof a VRF response with any random value, so it's critical that\n * @dev it cannot be directly called by anything other than this base contract\n * @dev (specifically, by the VRFConsumerBase.rawFulfillRandomness method).\n *\n * @dev For your users to trust that your contract's random behavior is free\n * @dev from malicious interference, it's best if you can write it so that all\n * @dev behaviors implied by a VRF response are executed *during* your\n * @dev fulfillRandomness method. If your contract must store the response (or\n * @dev anything derived from it) and use it later, you must ensure that any\n * @dev user-significant behavior which depends on that stored value cannot be\n * @dev manipulated by a subsequent VRF request.\n *\n * @dev Similarly, both miners and the VRF oracle itself have some influence\n * @dev over the order in which VRF responses appear on the blockchain, so if\n * @dev your contract could have multiple VRF requests in flight simultaneously,\n * @dev you must ensure that the order in which the VRF responses arrive cannot\n * @dev be used to manipulate your contract's user-significant behavior.\n *\n * @dev Since the ultimate input to the VRF is mixed with the block hash of the\n * @dev block in which the request is made, user-provided seeds have no impact\n * @dev on its economic security properties. They are only included for API\n * @dev compatability with previous versions of this contract.\n *\n * @dev Since the block hash of the block which contains the requestRandomness\n * @dev call is mixed into the input to the VRF *last*, a sufficiently powerful\n * @dev miner could, in principle, fork the blockchain to evict the block\n * @dev containing the request, forcing the request to be included in a\n * @dev different block with a different hash, and therefore a different input\n * @dev to the VRF. However, such an attack would incur a substantial economic\n * @dev cost. This cost scales with the number of blocks the VRF oracle waits\n * @dev until it calls responds to a request.\n */\nabstract contract VRFConsumerBase is VRFRequestIDBase {\n\n using SafeMathChainlink for uint256;\n\n /**\n * @notice fulfillRandomness handles the VRF response. Your contract must\n * @notice implement it. See \"SECURITY CONSIDERATIONS\" above for important\n * @notice principles to keep in mind when implementing your fulfillRandomness\n * @notice method.\n *\n * @dev VRFConsumerBase expects its subcontracts to have a method with this\n * @dev signature, and will call it once it has verified the proof\n * @dev associated with the randomness. (It is triggered via a call to\n * @dev rawFulfillRandomness, below.)\n *\n * @param requestId The Id initially returned by requestRandomness\n * @param randomness the VRF output\n */\n function fulfillRandomness(bytes32 requestId, uint256 randomness)\n internal virtual;\n\n /**\n * @notice requestRandomness initiates a request for VRF output given _seed\n *\n * @dev The fulfillRandomness method receives the output, once it's provided\n * @dev by the Oracle, and verified by the vrfCoordinator.\n *\n * @dev The _keyHash must already be registered with the VRFCoordinator, and\n * @dev the _fee must exceed the fee specified during registration of the\n * @dev _keyHash.\n *\n * @dev The _seed parameter is vestigial, and is kept only for API\n * @dev compatibility with older versions. It can't *hurt* to mix in some of\n * @dev your own randomness, here, but it's not necessary because the VRF\n * @dev oracle will mix the hash of the block containing your request into the\n * @dev VRF seed it ultimately uses.\n *\n * @param _keyHash ID of public key against which randomness is generated\n * @param _fee The amount of LINK to send with the request\n * @param _seed seed mixed into the input of the VRF.\n *\n * @return requestId unique ID for this request\n *\n * @dev The returned requestId can be used to distinguish responses to\n * @dev concurrent requests. It is passed as the first argument to\n * @dev fulfillRandomness.\n */\n function requestRandomness(bytes32 _keyHash, uint256 _fee, uint256 _seed)\n internal returns (bytes32 requestId)\n {\n LINK.transferAndCall(vrfCoordinator, _fee, abi.encode(_keyHash, _seed));\n // This is the seed passed to VRFCoordinator. The oracle will mix this with\n // the hash of the block containing this request to obtain the seed/input\n // which is finally passed to the VRF cryptographic machinery.\n uint256 vRFSeed = makeVRFInputSeed(_keyHash, _seed, address(this), nonces[_keyHash]);\n // nonces[_keyHash] must stay in sync with\n // VRFCoordinator.nonces[_keyHash][this], which was incremented by the above\n // successful LINK.transferAndCall (in VRFCoordinator.randomnessRequest).\n // This provides protection against the user repeating their input seed,\n // which would result in a predictable/duplicate output, if multiple such\n // requests appeared in the same block.\n nonces[_keyHash] = nonces[_keyHash].add(1);\n return makeRequestId(_keyHash, vRFSeed);\n }\n\n LinkTokenInterface immutable internal LINK;\n address immutable private vrfCoordinator;\n\n // Nonces for each VRF key from which randomness has been requested.\n //\n // Must stay in sync with VRFCoordinator[_keyHash][this]\n mapping(bytes32 /* keyHash */ => uint256 /* nonce */) private nonces;\n\n /**\n * @param _vrfCoordinator address of VRFCoordinator contract\n * @param _link address of LINK token contract\n *\n * @dev https://docs.chain.link/docs/link-token-contracts\n */\n constructor(address _vrfCoordinator, address _link) public {\n vrfCoordinator = _vrfCoordinator;\n LINK = LinkTokenInterface(_link);\n }\n\n // rawFulfillRandomness is called by VRFCoordinator when it receives a valid VRF\n // proof. rawFulfillRandomness then calls fulfillRandomness, after validating\n // the origin of the call\n function rawFulfillRandomness(bytes32 requestId, uint256 randomness) external {\n require(msg.sender == vrfCoordinator, \"Only VRFCoordinator can fulfill\");\n fulfillRandomness(requestId, randomness);\n }\n}\n" + }, + "contracts/Interfaces/ERC721.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.6 <0.9.0;\n\ninterface ERC721 {\n enum Stage {Unsold, Seed, Flower, Dead}\n\n struct CryptOrchid {\n string species;\n uint256 plantedAt;\n uint256 waterLevel;\n }\n\n /// @dev This emits when ownership of any NFT changes by any mechanism.\n /// This event emits when NFTs are created (`from` == 0) and destroyed\n /// (`to` == 0). Exception: during contract creation, any number of NFTs\n /// may be created and assigned without emitting Transfer. At the time of\n /// any transfer, the approved address for that NFT (if any) is reset to none.\n event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId);\n\n /// @dev This emits when the approved address for an NFT is changed or\n /// reaffirmed. The zero address indicates there is no approved address.\n /// When a Transfer event emits, this also indicates that the approved\n /// address for that NFT (if any) is reset to none.\n event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId);\n\n /// @dev This emits when an operator is enabled or disabled for an owner.\n /// The operator can manage all NFTs of the owner.\n event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved);\n\n /// @notice Count all NFTs assigned to an owner\n /// @dev NFTs assigned to the zero address are considered invalid, and this\n /// function throws for queries about the zero address.\n /// @param _owner An address for whom to query the balance\n /// @return The number of NFTs owned by `_owner`, possibly zero\n function balanceOf(address _owner) external view returns (uint256);\n\n /// @notice Find the owner of an NFT\n /// @dev NFTs assigned to zero address are considered invalid, and queries\n /// about them do throw.\n /// @param _tokenId The identifier for an NFT\n /// @return The address of the owner of the NFT\n function ownerOf(uint256 _tokenId) external view returns (address);\n\n /// @notice Transfers the ownership of an NFT from one address to another address\n /// @dev Throws unless `msg.sender` is the current owner, an authorized\n /// operator, or the approved address for this NFT. Throws if `_from` is\n /// not the current owner. Throws if `_to` is the zero address. Throws if\n /// `_tokenId` is not a valid NFT. When transfer is complete, this function\n /// checks if `_to` is a smart contract (code size > 0). If so, it calls\n /// `onERC721Received` on `_to` and throws if the return value is not\n /// `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`.\n /// @param _from The current owner of the NFT\n /// @param _to The new owner\n /// @param _tokenId The NFT to transfer\n /// @param data Additional data with no specified format, sent in call to `_to`\n function safeTransferFrom(\n address _from,\n address _to,\n uint256 _tokenId,\n bytes calldata data\n ) external payable;\n\n /// @notice Transfers the ownership of an NFT from one address to another address\n /// @dev This works identically to the other function with an extra data parameter,\n /// except this function just sets data to \"\".\n /// @param _from The current owner of the NFT\n /// @param _to The new owner\n /// @param _tokenId The NFT to transfer\n function safeTransferFrom(\n address _from,\n address _to,\n uint256 _tokenId\n ) external payable;\n\n /// @notice Transfer ownership of an NFT -- THE CALLER IS RESPONSIBLE\n /// TO CONFIRM THAT `_to` IS CAPABLE OF RECEIVING NFTS OR ELSE\n /// THEY MAY BE PERMANENTLY LOST\n /// @dev Throws unless `msg.sender` is the current owner, an authorized\n /// operator, or the approved address for this NFT. Throws if `_from` is\n /// not the current owner. Throws if `_to` is the zero address. Throws if\n /// `_tokenId` is not a valid NFT.\n /// @param _from The current owner of the NFT\n /// @param _to The new owner\n /// @param _tokenId The NFT to transfer\n function transferFrom(\n address _from,\n address _to,\n uint256 _tokenId\n ) external payable;\n\n /// @notice Change or reaffirm the approved address for an NFT\n /// @dev The zero address indicates there is no approved address.\n /// Throws unless `msg.sender` is the current NFT owner, or an authorized\n /// operator of the current owner.\n /// @param _approved The new approved NFT controller\n /// @param _tokenId The NFT to approve\n function approve(address _approved, uint256 _tokenId) external payable;\n\n /// @notice Enable or disable approval for a third party (\"operator\") to manage\n /// all of `msg.sender`'s assets\n /// @dev Emits the ApprovalForAll event. The contract MUST allow\n /// multiple operators per owner.\n /// @param _operator Address to add to the set of authorized operators\n /// @param _approved True if the operator is approved, false to revoke approval\n function setApprovalForAll(address _operator, bool _approved) external;\n\n /// @notice Get the approved address for a single NFT\n /// @dev Throws if `_tokenId` is not a valid NFT.\n /// @param _tokenId The NFT to find the approved address for\n /// @return The approved address for this NFT, or the zero address if there is none\n function getApproved(uint256 _tokenId) external view returns (address);\n\n /// @notice Query if an address is an authorized operator for another address\n /// @param _owner The address that owns the NFTs\n /// @param _operator The address that acts on behalf of the owner\n /// @return True if `_operator` is an approved operator for `_owner`, false otherwise\n function isApprovedForAll(address _owner, address _operator) external view returns (bool);\n\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 tokenId);\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 function flowering(uint256 tokenId) external view returns (bool);\n\n function currentPrice() external view returns (uint256 price);\n\n function getTokenMetadata(uint256 tokenId)\n external\n view\n returns (\n string memory,\n uint256,\n uint256,\n Stage\n );\n}\n" + }, + "contracts/Libraries/CurrentTime.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.6 <0.9.0;\n\ncontract CurrentTime {\n function currentTime() internal view virtual returns (uint256) {\n return block.timestamp;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <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 GSN 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 payable) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes memory) {\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\n return msg.data;\n }\n}\n" + }, + "@chainlink/contracts/src/v0.6/vendor/SafeMathChainlink.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.0;\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeMathChainlink {\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 * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, \"SafeMath: addition overflow\");\n\n return c;\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 * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n require(b <= a, \"SafeMath: subtraction overflow\");\n uint256 c = a - b;\n\n return c;\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 * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\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-solidity/pull/522\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts 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 * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // Solidity only automatically asserts when dividing by 0\n require(b > 0, \"SafeMath: division by zero\");\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n\n return c;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts 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 * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n require(b != 0, \"SafeMath: modulo by zero\");\n return a % b;\n }\n}\n" + }, + "@chainlink/contracts/src/v0.6/interfaces/LinkTokenInterface.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.0;\n\ninterface LinkTokenInterface {\n function allowance(address owner, address spender) external view returns (uint256 remaining);\n function approve(address spender, uint256 value) external returns (bool success);\n function balanceOf(address owner) external view returns (uint256 balance);\n function decimals() external view returns (uint8 decimalPlaces);\n function decreaseApproval(address spender, uint256 addedValue) external returns (bool success);\n function increaseApproval(address spender, uint256 subtractedValue) external;\n function name() external view returns (string memory tokenName);\n function symbol() external view returns (string memory tokenSymbol);\n function totalSupply() external view returns (uint256 totalTokensIssued);\n function transfer(address to, uint256 value) external returns (bool success);\n function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool success);\n function transferFrom(address from, address to, uint256 value) external returns (bool success);\n}\n" + }, + "@chainlink/contracts/src/v0.6/VRFRequestIDBase.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.0;\n\ncontract VRFRequestIDBase {\n\n /**\n * @notice returns the seed which is actually input to the VRF coordinator\n *\n * @dev To prevent repetition of VRF output due to repetition of the\n * @dev user-supplied seed, that seed is combined in a hash with the\n * @dev user-specific nonce, and the address of the consuming contract. The\n * @dev risk of repetition is mostly mitigated by inclusion of a blockhash in\n * @dev the final seed, but the nonce does protect against repetition in\n * @dev requests which are included in a single block.\n *\n * @param _userSeed VRF seed input provided by user\n * @param _requester Address of the requesting contract\n * @param _nonce User-specific nonce at the time of the request\n */\n function makeVRFInputSeed(bytes32 _keyHash, uint256 _userSeed,\n address _requester, uint256 _nonce)\n internal pure returns (uint256)\n {\n return uint256(keccak256(abi.encode(_keyHash, _userSeed, _requester, _nonce)));\n }\n\n /**\n * @notice Returns the id for this request\n * @param _keyHash The serviceAgreement ID to be used for this request\n * @param _vRFInputSeed The seed to be passed directly to the VRF\n * @return The id for this request\n *\n * @dev Note that _vRFInputSeed is not the seed passed by the consuming\n * @dev contract, but the one generated by makeVRFInputSeed\n */\n function makeRequestId(\n bytes32 _keyHash, uint256 _vRFInputSeed) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(_keyHash, _vRFInputSeed));\n }\n}\n" + }, + "contracts/test/CouponMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.6 <0.9.0;\n\nimport \"../Coupon/Coupon.sol\";\n\n// DEBUG\n\nimport \"hardhat/console.sol\";\n\ncontract CouponMock is Coupon {\n event Redemption(address account, uint256 rebate);\n event RequestedRandomness(bytes32 requestId);\n\n uint256 internal secondsToAdd = 0;\n\n constructor(\n address cryptorchidsAddress,\n address _VRFCoordinator,\n address _LinkToken,\n bytes32 _keyhash\n ) public payable Coupon(cryptorchidsAddress, _VRFCoordinator, _LinkToken, _keyhash) {}\n\n /**\n * @dev calls checkEligibility and sets all eligibleTokens as redeemed.\n * Then transfers caller rebateAmount.\n */\n function redeem() public virtual override returns (uint256) {\n uint256 rebateAmount = super.redeem();\n emit Redemption(msg.sender, rebateAmount);\n return rebateAmount;\n }\n\n function selectWinner(uint256 userProvidedSeed) public override {\n super.selectWinner(userProvidedSeed);\n emit RequestedRandomness(randomWinnerRequestId);\n }\n\n function timeTravel(uint256 s) public {\n secondsToAdd = s;\n }\n\n function currentTime() internal view virtual override returns (uint256) {\n return block.timestamp + secondsToAdd;\n }\n}\n" + }, + "hardhat/console.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >= 0.4.22 <0.9.0;\n\nlibrary console {\n\taddress constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\n\n\tfunction _sendLogPayload(bytes memory payload) private view {\n\t\tuint256 payloadLength = payload.length;\n\t\taddress consoleAddress = CONSOLE_ADDRESS;\n\t\tassembly {\n\t\t\tlet payloadStart := add(payload, 32)\n\t\t\tlet r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\n\t\t}\n\t}\n\n\tfunction log() internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log()\"));\n\t}\n\n\tfunction logInt(int p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(int)\", p0));\n\t}\n\n\tfunction logUint(uint p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n\t}\n\n\tfunction logString(string memory p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n\t}\n\n\tfunction logBool(bool p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n\t}\n\n\tfunction logAddress(address p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n\t}\n\n\tfunction logBytes(bytes memory p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes)\", p0));\n\t}\n\n\tfunction logBytes1(bytes1 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes1)\", p0));\n\t}\n\n\tfunction logBytes2(bytes2 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes2)\", p0));\n\t}\n\n\tfunction logBytes3(bytes3 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes3)\", p0));\n\t}\n\n\tfunction logBytes4(bytes4 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes4)\", p0));\n\t}\n\n\tfunction logBytes5(bytes5 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes5)\", p0));\n\t}\n\n\tfunction logBytes6(bytes6 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes6)\", p0));\n\t}\n\n\tfunction logBytes7(bytes7 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes7)\", p0));\n\t}\n\n\tfunction logBytes8(bytes8 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes8)\", p0));\n\t}\n\n\tfunction logBytes9(bytes9 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes9)\", p0));\n\t}\n\n\tfunction logBytes10(bytes10 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes10)\", p0));\n\t}\n\n\tfunction logBytes11(bytes11 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes11)\", p0));\n\t}\n\n\tfunction logBytes12(bytes12 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes12)\", p0));\n\t}\n\n\tfunction logBytes13(bytes13 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes13)\", p0));\n\t}\n\n\tfunction logBytes14(bytes14 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes14)\", p0));\n\t}\n\n\tfunction logBytes15(bytes15 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes15)\", p0));\n\t}\n\n\tfunction logBytes16(bytes16 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes16)\", p0));\n\t}\n\n\tfunction logBytes17(bytes17 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes17)\", p0));\n\t}\n\n\tfunction logBytes18(bytes18 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes18)\", p0));\n\t}\n\n\tfunction logBytes19(bytes19 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes19)\", p0));\n\t}\n\n\tfunction logBytes20(bytes20 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes20)\", p0));\n\t}\n\n\tfunction logBytes21(bytes21 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes21)\", p0));\n\t}\n\n\tfunction logBytes22(bytes22 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes22)\", p0));\n\t}\n\n\tfunction logBytes23(bytes23 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes23)\", p0));\n\t}\n\n\tfunction logBytes24(bytes24 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes24)\", p0));\n\t}\n\n\tfunction logBytes25(bytes25 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes25)\", p0));\n\t}\n\n\tfunction logBytes26(bytes26 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes26)\", p0));\n\t}\n\n\tfunction logBytes27(bytes27 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes27)\", p0));\n\t}\n\n\tfunction logBytes28(bytes28 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes28)\", p0));\n\t}\n\n\tfunction logBytes29(bytes29 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes29)\", p0));\n\t}\n\n\tfunction logBytes30(bytes30 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes30)\", p0));\n\t}\n\n\tfunction logBytes31(bytes31 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes31)\", p0));\n\t}\n\n\tfunction logBytes32(bytes32 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes32)\", p0));\n\t}\n\n\tfunction log(uint p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n\t}\n\n\tfunction log(string memory p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n\t}\n\n\tfunction log(bool p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n\t}\n\n\tfunction log(address p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n\t}\n\n\tfunction log(uint p0, uint p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint)\", p0, p1));\n\t}\n\n\tfunction log(uint p0, string memory p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string)\", p0, p1));\n\t}\n\n\tfunction log(uint p0, bool p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool)\", p0, p1));\n\t}\n\n\tfunction log(uint p0, address p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address)\", p0, p1));\n\t}\n\n\tfunction log(string memory p0, uint p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint)\", p0, p1));\n\t}\n\n\tfunction log(string memory p0, string memory p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n\t}\n\n\tfunction log(string memory p0, bool p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool)\", p0, p1));\n\t}\n\n\tfunction log(string memory p0, address p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address)\", p0, p1));\n\t}\n\n\tfunction log(bool p0, uint p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint)\", p0, p1));\n\t}\n\n\tfunction log(bool p0, string memory p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string)\", p0, p1));\n\t}\n\n\tfunction log(bool p0, bool p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool)\", p0, p1));\n\t}\n\n\tfunction log(bool p0, address p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address)\", p0, p1));\n\t}\n\n\tfunction log(address p0, uint p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint)\", p0, p1));\n\t}\n\n\tfunction log(address p0, string memory p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string)\", p0, p1));\n\t}\n\n\tfunction log(address p0, bool p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool)\", p0, p1));\n\t}\n\n\tfunction log(address p0, address p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address)\", p0, p1));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, address p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, address p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, uint p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, bool p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, address p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, address p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, address p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,address)\", p0, p1, p2, p3));\n\t}\n\n}\n" + }, + "contracts/test/CurrentTimeMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.6 <0.9.0;\n\nimport \"../Libraries/CurrentTime.sol\";\n\ncontract CurrentTimeMock is CurrentTime {\n uint256 internal secondsToAdd = 0;\n}\n" + }, + "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol": { + "content": "// SPDX-License-Identifier: MIT\n\n// NB: this is only meant to deploy to goerli, where chainlink VRF is unavailable.\n// goerli connects to polygon mumbai, which is what we need to test PoS bridging.\n// Deploy scripts prevent other contracts from goerli deploy, and this contract from\n// anything other than goerlui\npragma solidity >=0.6.6 <0.9.0;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts/math/SafeMath.sol\";\nimport \"@openzeppelin/contracts/presets/ERC721PresetMinterPauserAutoId.sol\";\nimport \"@openzeppelin/contracts/utils/Counters.sol\";\nimport \"../Libraries/CurrentTime.sol\";\n\ncontract CryptOrchidGoerli is ERC721PresetMinterPauserAutoId, Ownable, CurrentTime {\n using SafeMath for uint256;\n using Strings for string;\n using Counters for Counters.Counter;\n\n struct CryptOrchid {\n string species;\n uint256 plantedAt;\n uint256 waterLevel;\n }\n mapping(uint256 => CryptOrchid) public cryptorchids;\n\n enum Stage {Unsold, Seed, Flower, Dead}\n\n bool internal saleStarted = false;\n bool internal growingStarted = false;\n\n uint256 public constant MAX_CRYPTORCHIDS = 10000;\n uint256 public constant GROWTH_CYCLE = 604800; // 7 days\n uint256 public constant WATERING_WINDOW = 10800; // 3 hours\n uint256 internal constant MAX_TIMESTAMP = 2**256 - 1;\n string internal constant GRANUM_IPFS = \"QmWd1mn7DuGyx9ByfNeqCsgdSUsJZ1cragitgaygsqDvEm\";\n\n uint16[10] private limits = [0, 3074, 6074, 8074, 9074, 9574, 9824, 9924, 9974, 9999];\n string[10] private genum = [\n \"shenzhenica orchidaceae\",\n \"phalaenopsis micholitzii\",\n \"guarianthe aurantiaca\",\n \"vanda coerulea\",\n \"cypripedium calceolus\",\n \"paphiopedilum vietnamense\",\n \"miltonia kayasimae\",\n \"platanthera azorica\",\n \"dendrophylax lindenii\",\n \"paphiopedilum rothschildianum\"\n ];\n\n string[10] private speciesIPFSConstant = [\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/shenzhenica-orchidaceae.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/phalaenopsis-micholitzii.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/guarianthe-aurantiaca.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/vanda-coerulea.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/cypripedium-calceolus.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/paphiopedilum-vietnamense.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/miltonia-kayasimae.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/platanthera-azorica.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/dendrophylax-lindenii.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/paphiopedilum-rothschildianum.json\"\n ];\n\n string[10] private deadSpeciesIPFSConstant = [\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/shenzhenica-orchidaceae.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/phalaenopsis-micholitzii.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/guarianthe-aurantiaca.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/vanda-coerulea.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/cypripedium-calceolus.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/paphiopedilum-vietnamense.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/miltonia-kayasimae.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/platanthera-azorica.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/dendrophylax-lindenii.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/paphiopedilum-rothschildianum.json\"\n ];\n\n Counters.Counter private _tokenIds;\n\n mapping(bytes32 => uint256) public requestToToken;\n mapping(bytes32 => string) private speciesIPFS;\n mapping(bytes32 => string) private deadSpeciesIPFS;\n\n constructor() public payable ERC721PresetMinterPauserAutoId(\"CryptOrchids\", \"ORCHD\", \"ipfs://\") {\n for (uint256 index = 0; index < genum.length; index++) {\n speciesIPFS[keccak256(abi.encode(genum[index]))] = speciesIPFSConstant[index];\n deadSpeciesIPFS[keccak256(abi.encode(genum[index]))] = deadSpeciesIPFSConstant[index];\n }\n }\n\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\n (string memory species, , , ) = getTokenMetadata(tokenId);\n\n if (growthStage(tokenId) == Stage.Seed) {\n return string(abi.encodePacked(baseURI(), GRANUM_IPFS));\n }\n\n if (growthStage(tokenId) == Stage.Flower) {\n return string(abi.encodePacked(baseURI(), speciesIPFS[keccak256(abi.encode(species))]));\n }\n\n return string(abi.encodePacked(baseURI(), deadSpeciesIPFS[keccak256(abi.encode(species))]));\n }\n\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 tokenId\n ) internal virtual override {\n require(address(0) == to || alive(tokenId), \"Dead CryptOrchids cannot be transferred\");\n super._beforeTokenTransfer(from, to, tokenId);\n }\n\n function currentPrice() public view returns (uint256 price) {\n uint256 currentSupply = totalSupply();\n if (currentSupply >= 9900) {\n return 1000000000000000000; // 9900+: 1.00 ETH\n } else if (currentSupply >= 9500) {\n return 640000000000000000; // 9500-9500: 0.64 ETH\n } else if (currentSupply >= 7500) {\n return 320000000000000000; // 7500-9500: 0.32 ETH\n } else if (currentSupply >= 3500) {\n return 160000000000000000; // 3500-7500: 0.16 ETH\n } else if (currentSupply >= 1500) {\n return 80000000000000000; // 1500-3500: 0.08 ETH\n } else if (currentSupply >= 500) {\n return 60000000000000000; // 500-1500: 0.06 ETH\n } else {\n return 40000000000000000; // 0 - 500 0.04 ETH\n }\n }\n\n function startSale() public onlyOwner {\n saleStarted = true;\n }\n\n function startGrowing() public onlyOwner {\n growingStarted = true;\n }\n\n /**\n * @dev Withdraw ether from this contract (Callable by owner only)\n */\n function withdraw() public onlyOwner {\n uint256 balance = address(this).balance;\n msg.sender.transfer(balance);\n }\n\n receive() external payable {}\n\n function webMint(uint256 units) public payable {\n require(saleStarted, \"The Nursery is closed\");\n require(units <= MAX_CRYPTORCHIDS - totalSupply(), \"Not enough bulbs left\");\n require(totalSupply() < MAX_CRYPTORCHIDS, \"Sale has already ended\");\n require(units > 0 && units <= 20, \"You can plant minimum 1, maximum 20 CryptOrchids\");\n require(SafeMath.add(totalSupply(), units) <= MAX_CRYPTORCHIDS, \"Exceeds MAX_CRYPTORCHIDS\");\n require(msg.value >= SafeMath.mul(currentPrice(), units), \"Ether value sent is below the price\");\n\n for (uint256 i = 0; i < units; i++) {\n _tokenIds.increment();\n uint256 newItemId = _tokenIds.current();\n cryptorchids[newItemId] = CryptOrchid({species: \"granum\", plantedAt: MAX_TIMESTAMP, waterLevel: 0});\n _safeMint(msg.sender, newItemId);\n }\n }\n\n function germinate(uint256 tokenId, uint256 userProvidedSeed) public {\n require(growingStarted, \"Germination starts 2021-04-12T16:00:00Z\");\n require(_isApprovedOrOwner(_msgSender(), tokenId), \"Only the Owner can germinate a CryptOrchid.\");\n _requestRandom(tokenId, userProvidedSeed);\n }\n\n function _requestRandom(uint256 tokenId, uint256 userProvidedSeed) internal returns (bytes32 requestId) {\n uint256 pseudoRand = uint256(keccak256(abi.encodePacked(block.timestamp, block.difficulty, userProvidedSeed)));\n fulfillRandomness(tokenId, pseudoRand);\n }\n\n function fulfillRandomness(uint256 tokenId, uint256 randomness) internal {\n CryptOrchid storage orchid = cryptorchids[tokenId];\n string memory species = pickSpecies(SafeMath.mod(randomness, 10000));\n orchid.species = species;\n orchid.plantedAt = currentTime();\n address tokenOwner = ownerOf(tokenId);\n }\n\n function alive(uint256 tokenId) public view returns (bool) {\n return growthStage(tokenId) != Stage.Dead;\n }\n\n function flowering(uint256 tokenId) public view returns (bool) {\n return growthStage(tokenId) == Stage.Flower;\n }\n\n function growthStage(uint256 tokenId) public view returns (Stage) {\n CryptOrchid memory orchid = cryptorchids[tokenId];\n if (orchid.plantedAt == 0) return Stage.Unsold;\n if (orchid.plantedAt == MAX_TIMESTAMP) return Stage.Seed;\n uint256 currentWaterLevel = orchid.waterLevel;\n uint256 elapsed = currentTime() - orchid.plantedAt;\n uint256 fullCycles = SafeMath.div(uint256(elapsed), GROWTH_CYCLE);\n uint256 modulo = SafeMath.mod(elapsed, GROWTH_CYCLE);\n\n if (currentWaterLevel == fullCycles) {\n return Stage.Flower;\n }\n\n if (SafeMath.add(currentWaterLevel, 1) == fullCycles && modulo < WATERING_WINDOW) {\n return Stage.Flower;\n }\n\n return Stage.Dead;\n }\n\n function water(uint256 tokenId) public {\n require(_isApprovedOrOwner(_msgSender(), tokenId), \"Only the Owner can water a CryptOrchid.\");\n\n if (!alive(tokenId)) {\n return;\n }\n\n CryptOrchid storage orchid = cryptorchids[tokenId];\n\n uint256 wateringLevel = orchid.waterLevel;\n uint256 elapsed = currentTime() - orchid.plantedAt;\n uint256 fullCycles = SafeMath.div(uint256(elapsed), GROWTH_CYCLE);\n\n if (wateringLevel > fullCycles) {\n return;\n }\n\n uint256 newWaterLevel = SafeMath.add(wateringLevel, 1);\n orchid.waterLevel = newWaterLevel;\n }\n\n function getTokenMetadata(uint256 tokenId)\n public\n view\n returns (\n string memory,\n uint256,\n uint256,\n Stage\n )\n {\n return (\n cryptorchids[tokenId].species,\n cryptorchids[tokenId].plantedAt,\n cryptorchids[tokenId].waterLevel,\n growthStage(tokenId)\n );\n }\n\n /**\n * @notice Pick species for random number index\n * @param randomIndex uint256\n * @return species string\n */\n function pickSpecies(uint256 randomIndex) private view returns (string memory) {\n for (uint256 i = 0; i < 10; i++) {\n if (randomIndex <= limits[i]) {\n return genum[i];\n }\n }\n }\n}\n" + }, + "@openzeppelin/contracts/presets/ERC721PresetMinterPauserAutoId.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"../access/AccessControl.sol\";\nimport \"../utils/Context.sol\";\nimport \"../utils/Counters.sol\";\nimport \"../token/ERC721/ERC721.sol\";\nimport \"../token/ERC721/ERC721Burnable.sol\";\nimport \"../token/ERC721/ERC721Pausable.sol\";\n\n/**\n * @dev {ERC721} token, including:\n *\n * - ability for holders to burn (destroy) their tokens\n * - a minter role that allows for token minting (creation)\n * - a pauser role that allows to stop all token transfers\n * - token ID and URI autogeneration\n *\n * This contract uses {AccessControl} to lock permissioned functions using the\n * different roles - head to its documentation for details.\n *\n * The account that deploys the contract will be granted the minter and pauser\n * roles, as well as the default admin role, which will let it grant both minter\n * and pauser roles to other accounts.\n */\ncontract ERC721PresetMinterPauserAutoId is Context, AccessControl, ERC721Burnable, ERC721Pausable {\n using Counters for Counters.Counter;\n\n bytes32 public constant MINTER_ROLE = keccak256(\"MINTER_ROLE\");\n bytes32 public constant PAUSER_ROLE = keccak256(\"PAUSER_ROLE\");\n\n Counters.Counter private _tokenIdTracker;\n\n /**\n * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE` and `PAUSER_ROLE` to the\n * account that deploys the contract.\n *\n * Token URIs will be autogenerated based on `baseURI` and their token IDs.\n * See {ERC721-tokenURI}.\n */\n constructor(string memory name, string memory symbol, string memory baseURI) public ERC721(name, symbol) {\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n\n _setupRole(MINTER_ROLE, _msgSender());\n _setupRole(PAUSER_ROLE, _msgSender());\n\n _setBaseURI(baseURI);\n }\n\n /**\n * @dev Creates a new token for `to`. Its token ID will be automatically\n * assigned (and available on the emitted {IERC721-Transfer} event), and the token\n * URI autogenerated based on the base URI passed at construction.\n *\n * See {ERC721-_mint}.\n *\n * Requirements:\n *\n * - the caller must have the `MINTER_ROLE`.\n */\n function mint(address to) public virtual {\n require(hasRole(MINTER_ROLE, _msgSender()), \"ERC721PresetMinterPauserAutoId: must have minter role to mint\");\n\n // We cannot just use balanceOf to create the new tokenId because tokens\n // can be burned (destroyed), so we need a separate counter.\n _mint(to, _tokenIdTracker.current());\n _tokenIdTracker.increment();\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() public virtual {\n require(hasRole(PAUSER_ROLE, _msgSender()), \"ERC721PresetMinterPauserAutoId: must have pauser role to pause\");\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() public virtual {\n require(hasRole(PAUSER_ROLE, _msgSender()), \"ERC721PresetMinterPauserAutoId: must have pauser role to unpause\");\n _unpause();\n }\n\n function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override(ERC721, ERC721Pausable) {\n super._beforeTokenTransfer(from, to, tokenId);\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Counters.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"../math/SafeMath.sol\";\n\n/**\n * @title Counters\n * @author Matt Condon (@shrugs)\n * @dev Provides counters that can only be incremented or decremented by one. This can be used e.g. to track the number\n * of elements in a mapping, issuing ERC721 ids, or counting request ids.\n *\n * Include with `using Counters for Counters.Counter;`\n * Since it is not possible to overflow a 256 bit integer with increments of one, `increment` can skip the {SafeMath}\n * overflow check, thereby saving gas. This does assume however correct usage, in that the underlying `_value` is never\n * directly accessed.\n */\nlibrary Counters {\n using SafeMath for uint256;\n\n struct Counter {\n // This variable should never be directly accessed by users of the library: interactions must be restricted to\n // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\n // this feature: see https://github.com/ethereum/solidity/issues/4637\n uint256 _value; // default: 0\n }\n\n function current(Counter storage counter) internal view returns (uint256) {\n return counter._value;\n }\n\n function increment(Counter storage counter) internal {\n // The {SafeMath} overflow check can be skipped here, see the comment at the top\n counter._value += 1;\n }\n\n function decrement(Counter storage counter) internal {\n counter._value = counter._value.sub(1);\n }\n}\n" + }, + "@openzeppelin/contracts/access/AccessControl.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"../utils/EnumerableSet.sol\";\nimport \"../utils/Address.sol\";\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module that allows children to implement role-based access\n * control mechanisms.\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 * ```\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 * ```\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.\n */\nabstract contract AccessControl is Context {\n using EnumerableSet for EnumerableSet.AddressSet;\n using Address for address;\n\n struct RoleData {\n EnumerableSet.AddressSet 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 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 {_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) public view returns (bool) {\n return _roles[role].members.contains(account);\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 returns (uint256) {\n return _roles[role].members.length();\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 returns (address) {\n return _roles[role].members.at(index);\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 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 function grantRole(bytes32 role, address account) public virtual {\n require(hasRole(_roles[role].adminRole, _msgSender()), \"AccessControl: sender must be an admin to grant\");\n\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 function revokeRole(bytes32 role, address account) public virtual {\n require(hasRole(_roles[role].adminRole, _msgSender()), \"AccessControl: sender must be an admin to revoke\");\n\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 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) public virtual {\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 * [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 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 emit RoleAdminChanged(role, _roles[role].adminRole, adminRole);\n _roles[role].adminRole = adminRole;\n }\n\n function _grantRole(bytes32 role, address account) private {\n if (_roles[role].members.add(account)) {\n emit RoleGranted(role, account, _msgSender());\n }\n }\n\n function _revokeRole(bytes32 role, address account) private {\n if (_roles[role].members.remove(account)) {\n emit RoleRevoked(role, account, _msgSender());\n }\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/ERC721.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"../../utils/Context.sol\";\nimport \"./IERC721.sol\";\nimport \"./IERC721Metadata.sol\";\nimport \"./IERC721Enumerable.sol\";\nimport \"./IERC721Receiver.sol\";\nimport \"../../introspection/ERC165.sol\";\nimport \"../../math/SafeMath.sol\";\nimport \"../../utils/Address.sol\";\nimport \"../../utils/EnumerableSet.sol\";\nimport \"../../utils/EnumerableMap.sol\";\nimport \"../../utils/Strings.sol\";\n\n/**\n * @title ERC721 Non-Fungible Token Standard basic implementation\n * @dev see https://eips.ethereum.org/EIPS/eip-721\n */\ncontract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {\n using SafeMath for uint256;\n using Address for address;\n using EnumerableSet for EnumerableSet.UintSet;\n using EnumerableMap for EnumerableMap.UintToAddressMap;\n using Strings for uint256;\n\n // Equals to `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`\n // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector`\n bytes4 private constant _ERC721_RECEIVED = 0x150b7a02;\n\n // Mapping from holder address to their (enumerable) set of owned tokens\n mapping (address => EnumerableSet.UintSet) private _holderTokens;\n\n // Enumerable mapping from token ids to their owners\n EnumerableMap.UintToAddressMap private _tokenOwners;\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 // Token name\n string private _name;\n\n // Token symbol\n string private _symbol;\n\n // Optional mapping for token URIs\n mapping (uint256 => string) private _tokenURIs;\n\n // Base URI\n string private _baseURI;\n\n /*\n * bytes4(keccak256('balanceOf(address)')) == 0x70a08231\n * bytes4(keccak256('ownerOf(uint256)')) == 0x6352211e\n * bytes4(keccak256('approve(address,uint256)')) == 0x095ea7b3\n * bytes4(keccak256('getApproved(uint256)')) == 0x081812fc\n * bytes4(keccak256('setApprovalForAll(address,bool)')) == 0xa22cb465\n * bytes4(keccak256('isApprovedForAll(address,address)')) == 0xe985e9c5\n * bytes4(keccak256('transferFrom(address,address,uint256)')) == 0x23b872dd\n * bytes4(keccak256('safeTransferFrom(address,address,uint256)')) == 0x42842e0e\n * bytes4(keccak256('safeTransferFrom(address,address,uint256,bytes)')) == 0xb88d4fde\n *\n * => 0x70a08231 ^ 0x6352211e ^ 0x095ea7b3 ^ 0x081812fc ^\n * 0xa22cb465 ^ 0xe985e9c5 ^ 0x23b872dd ^ 0x42842e0e ^ 0xb88d4fde == 0x80ac58cd\n */\n bytes4 private constant _INTERFACE_ID_ERC721 = 0x80ac58cd;\n\n /*\n * bytes4(keccak256('name()')) == 0x06fdde03\n * bytes4(keccak256('symbol()')) == 0x95d89b41\n * bytes4(keccak256('tokenURI(uint256)')) == 0xc87b56dd\n *\n * => 0x06fdde03 ^ 0x95d89b41 ^ 0xc87b56dd == 0x5b5e139f\n */\n bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x5b5e139f;\n\n /*\n * bytes4(keccak256('totalSupply()')) == 0x18160ddd\n * bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) == 0x2f745c59\n * bytes4(keccak256('tokenByIndex(uint256)')) == 0x4f6ccce7\n *\n * => 0x18160ddd ^ 0x2f745c59 ^ 0x4f6ccce7 == 0x780e9d63\n */\n bytes4 private constant _INTERFACE_ID_ERC721_ENUMERABLE = 0x780e9d63;\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_) public {\n _name = name_;\n _symbol = symbol_;\n\n // register the supported interfaces to conform to ERC721 via ERC165\n _registerInterface(_INTERFACE_ID_ERC721);\n _registerInterface(_INTERFACE_ID_ERC721_METADATA);\n _registerInterface(_INTERFACE_ID_ERC721_ENUMERABLE);\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: balance query for the zero address\");\n return _holderTokens[owner].length();\n }\n\n /**\n * @dev See {IERC721-ownerOf}.\n */\n function ownerOf(uint256 tokenId) public view virtual override returns (address) {\n return _tokenOwners.get(tokenId, \"ERC721: owner query for nonexistent token\");\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 require(_exists(tokenId), \"ERC721Metadata: URI query for nonexistent token\");\n\n string memory _tokenURI = _tokenURIs[tokenId];\n string memory base = baseURI();\n\n // If there is no base URI, return the token URI.\n if (bytes(base).length == 0) {\n return _tokenURI;\n }\n // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked).\n if (bytes(_tokenURI).length > 0) {\n return string(abi.encodePacked(base, _tokenURI));\n }\n // If there is a baseURI but no tokenURI, concatenate the tokenID to the baseURI.\n return string(abi.encodePacked(base, tokenId.toString()));\n }\n\n /**\n * @dev Returns the base URI set via {_setBaseURI}. This will be\n * automatically added as a prefix in {tokenURI} to each token's URI, or\n * to the token ID if no specific URI is set for that token ID.\n */\n function baseURI() public view virtual returns (string memory) {\n return _baseURI;\n }\n\n /**\n * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.\n */\n function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {\n return _holderTokens[owner].at(index);\n }\n\n /**\n * @dev See {IERC721Enumerable-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n // _tokenOwners are indexed by tokenIds, so .length() returns the number of tokenIds\n return _tokenOwners.length();\n }\n\n /**\n * @dev See {IERC721Enumerable-tokenByIndex}.\n */\n function tokenByIndex(uint256 index) public view virtual override returns (uint256) {\n (uint256 tokenId, ) = _tokenOwners.at(index);\n return tokenId;\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(_msgSender() == owner || ERC721.isApprovedForAll(owner, _msgSender()),\n \"ERC721: approve caller is not owner nor 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 require(_exists(tokenId), \"ERC721: approved query for nonexistent token\");\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 require(operator != _msgSender(), \"ERC721: approve to caller\");\n\n _operatorApprovals[_msgSender()][operator] = approved;\n emit ApprovalForAll(_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: transfer caller is not owner nor 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: transfer caller is not owner nor 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 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 _tokenOwners.contains(tokenId);\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 require(_exists(tokenId), \"ERC721: operator query for nonexistent token\");\n address owner = ERC721.ownerOf(tokenId);\n return (spender == owner || getApproved(tokenId) == spender || ERC721.isApprovedForAll(owner, spender));\n }\n\n /**\n * @dev Safely mints `tokenId` and transfers it to `to`.\n *\n * Requirements:\n d*\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(_checkOnERC721Received(address(0), to, tokenId, _data), \"ERC721: transfer to non ERC721Receiver implementer\");\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);\n\n _holderTokens[to].add(tokenId);\n\n _tokenOwners.set(tokenId, to);\n\n emit Transfer(address(0), to, tokenId);\n }\n\n /**\n * @dev Destroys `tokenId`.\n * The approval is cleared when the token is burned.\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); // internal owner\n\n _beforeTokenTransfer(owner, address(0), tokenId);\n\n // Clear approvals\n _approve(address(0), tokenId);\n\n // Clear metadata (if any)\n if (bytes(_tokenURIs[tokenId]).length != 0) {\n delete _tokenURIs[tokenId];\n }\n\n _holderTokens[owner].remove(tokenId);\n\n _tokenOwners.remove(tokenId);\n\n emit Transfer(owner, address(0), tokenId);\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 of token that is not own\"); // internal owner\n require(to != address(0), \"ERC721: transfer to the zero address\");\n\n _beforeTokenTransfer(from, to, tokenId);\n\n // Clear approvals from the previous owner\n _approve(address(0), tokenId);\n\n _holderTokens[from].remove(tokenId);\n _holderTokens[to].add(tokenId);\n\n _tokenOwners.set(tokenId, to);\n\n emit Transfer(from, to, tokenId);\n }\n\n /**\n * @dev Sets `_tokenURI` as the tokenURI of `tokenId`.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual {\n require(_exists(tokenId), \"ERC721Metadata: URI set of nonexistent token\");\n _tokenURIs[tokenId] = _tokenURI;\n }\n\n /**\n * @dev Internal function to set the base URI for all token IDs. It is\n * automatically added as a prefix to the value returned in {tokenURI},\n * or to the token ID if {tokenURI} is empty.\n */\n function _setBaseURI(string memory baseURI_) internal virtual {\n _baseURI = baseURI_;\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(address from, address to, uint256 tokenId, bytes memory _data)\n private returns (bool)\n {\n if (!to.isContract()) {\n return true;\n }\n bytes memory returndata = to.functionCall(abi.encodeWithSelector(\n IERC721Receiver(to).onERC721Received.selector,\n _msgSender(),\n from,\n tokenId,\n _data\n ), \"ERC721: transfer to non ERC721Receiver implementer\");\n bytes4 retval = abi.decode(returndata, (bytes4));\n return (retval == _ERC721_RECEIVED);\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); // internal owner\n }\n\n /**\n * @dev Hook that is called before any token transfer. This includes minting\n * and burning.\n *\n * Calling conditions:\n *\n * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be\n * transferred to `to`.\n * - When `from` is zero, `tokenId` will be minted for `to`.\n * - When `to` is zero, ``from``'s `tokenId` will be burned.\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\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 tokenId) internal virtual { }\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/ERC721Burnable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"../../utils/Context.sol\";\nimport \"./ERC721.sol\";\n\n/**\n * @title ERC721 Burnable Token\n * @dev ERC721 Token that can be irreversibly 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), \"ERC721Burnable: caller is not owner nor approved\");\n _burn(tokenId);\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/ERC721Pausable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"./ERC721.sol\";\nimport \"../../utils/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 */\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(address from, address to, uint256 tokenId) internal virtual override {\n super._beforeTokenTransfer(from, to, tokenId);\n\n require(!paused(), \"ERC721Pausable: token transfer while paused\");\n }\n}\n" + }, + "@openzeppelin/contracts/utils/EnumerableSet.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <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 * ```\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 */\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\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) { // 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 // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs\n // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\n\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] = toDeleteIndex + 1; // All indexes are 1-based\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 require(set._values.length > index, \"EnumerableSet: index out of bounds\");\n return set._values[index];\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 // 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 // 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 on 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" + }, + "@openzeppelin/contracts/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.2 <0.8.0;\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 */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n uint256 size;\n // solhint-disable-next-line no-inline-assembly\n assembly { size := extcodesize(account) }\n return size > 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://diligence.consensys.net/posts/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.5.11/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 // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\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 functionCall(target, data, \"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(address target, bytes memory data, string memory errorMessage) 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(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n require(isContract(target), \"Address: call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = target.call{ value: value }(data);\n return _verifyCallResult(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(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\n require(isContract(target), \"Address: static call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = target.staticcall(data);\n return _verifyCallResult(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(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\n require(isContract(target), \"Address: delegate call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return _verifyCallResult(success, returndata, errorMessage);\n }\n\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {\n if (success) {\n return returndata;\n } else {\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\n // solhint-disable-next-line no-inline-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}\n" + }, + "@openzeppelin/contracts/token/ERC721/IERC721.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.2 <0.8.0;\n\nimport \"../../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`, 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 be 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: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\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 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 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 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 /**\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" + }, + "@openzeppelin/contracts/token/ERC721/IERC721Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.2 <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 /**\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" + }, + "@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.2 <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 /**\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 tokenId);\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" + }, + "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <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 `IERC721.onERC721Received.selector`.\n */\n function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) external returns (bytes4);\n}\n" + }, + "@openzeppelin/contracts/introspection/ERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts may inherit from this and call {_registerInterface} to declare\n * their support of an interface.\n */\nabstract contract ERC165 is IERC165 {\n /*\n * bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7\n */\n bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7;\n\n /**\n * @dev Mapping of interface ids to whether or not it's supported.\n */\n mapping(bytes4 => bool) private _supportedInterfaces;\n\n constructor () internal {\n // Derived contracts need only register support for their own interfaces,\n // we register support for ERC165 itself here\n _registerInterface(_INTERFACE_ID_ERC165);\n }\n\n /**\n * @dev See {IERC165-supportsInterface}.\n *\n * Time complexity O(1), guaranteed to always use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return _supportedInterfaces[interfaceId];\n }\n\n /**\n * @dev Registers the contract as an implementer of the interface defined by\n * `interfaceId`. Support of the actual ERC165 interface is automatic and\n * registering its interface id is not required.\n *\n * See {IERC165-supportsInterface}.\n *\n * Requirements:\n *\n * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`).\n */\n function _registerInterface(bytes4 interfaceId) internal virtual {\n require(interfaceId != 0xffffffff, \"ERC165: invalid interface id\");\n _supportedInterfaces[interfaceId] = true;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/EnumerableMap.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\n/**\n * @dev Library for managing an enumerable variant of Solidity's\n * https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]\n * type.\n *\n * Maps have the following properties:\n *\n * - Entries are added, removed, and checked for existence in constant time\n * (O(1)).\n * - Entries are enumerated in O(n). No guarantees are made on the ordering.\n *\n * ```\n * contract Example {\n * // Add the library methods\n * using EnumerableMap for EnumerableMap.UintToAddressMap;\n *\n * // Declare a set state variable\n * EnumerableMap.UintToAddressMap private myMap;\n * }\n * ```\n *\n * As of v3.0.0, only maps of type `uint256 -> address` (`UintToAddressMap`) are\n * supported.\n */\nlibrary EnumerableMap {\n // To implement this library for multiple types with as little code\n // repetition as possible, we write it in terms of a generic Map type with\n // bytes32 keys and values.\n // The Map implementation uses private functions, and user-facing\n // implementations (such as Uint256ToAddressMap) are just wrappers around\n // the underlying Map.\n // This means that we can only create new EnumerableMaps for types that fit\n // in bytes32.\n\n struct MapEntry {\n bytes32 _key;\n bytes32 _value;\n }\n\n struct Map {\n // Storage of map keys and values\n MapEntry[] _entries;\n\n // Position of the entry defined by a key in the `entries` array, plus 1\n // because index 0 means a key is not in the map.\n mapping (bytes32 => uint256) _indexes;\n }\n\n /**\n * @dev Adds a key-value pair to a map, or updates the value for an existing\n * key. O(1).\n *\n * Returns true if the key was added to the map, that is if it was not\n * already present.\n */\n function _set(Map storage map, bytes32 key, bytes32 value) private returns (bool) {\n // We read and store the key's index to prevent multiple reads from the same storage slot\n uint256 keyIndex = map._indexes[key];\n\n if (keyIndex == 0) { // Equivalent to !contains(map, key)\n map._entries.push(MapEntry({ _key: key, _value: value }));\n // The entry is stored at length-1, but we add 1 to all indexes\n // and use 0 as a sentinel value\n map._indexes[key] = map._entries.length;\n return true;\n } else {\n map._entries[keyIndex - 1]._value = value;\n return false;\n }\n }\n\n /**\n * @dev Removes a key-value pair from a map. O(1).\n *\n * Returns true if the key was removed from the map, that is if it was present.\n */\n function _remove(Map storage map, bytes32 key) private returns (bool) {\n // We read and store the key's index to prevent multiple reads from the same storage slot\n uint256 keyIndex = map._indexes[key];\n\n if (keyIndex != 0) { // Equivalent to contains(map, key)\n // To delete a key-value pair from the _entries array in O(1), we swap the entry to delete with the last one\n // in the array, and then remove the last entry (sometimes called as 'swap and pop').\n // This modifies the order of the array, as noted in {at}.\n\n uint256 toDeleteIndex = keyIndex - 1;\n uint256 lastIndex = map._entries.length - 1;\n\n // When the entry to delete is the last one, the swap operation is unnecessary. However, since this occurs\n // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\n\n MapEntry storage lastEntry = map._entries[lastIndex];\n\n // Move the last entry to the index where the entry to delete is\n map._entries[toDeleteIndex] = lastEntry;\n // Update the index for the moved entry\n map._indexes[lastEntry._key] = toDeleteIndex + 1; // All indexes are 1-based\n\n // Delete the slot where the moved entry was stored\n map._entries.pop();\n\n // Delete the index for the deleted slot\n delete map._indexes[key];\n\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * @dev Returns true if the key is in the map. O(1).\n */\n function _contains(Map storage map, bytes32 key) private view returns (bool) {\n return map._indexes[key] != 0;\n }\n\n /**\n * @dev Returns the number of key-value pairs in the map. O(1).\n */\n function _length(Map storage map) private view returns (uint256) {\n return map._entries.length;\n }\n\n /**\n * @dev Returns the key-value pair stored at position `index` in the map. O(1).\n *\n * Note that there are no guarantees on the ordering of entries inside the\n * array, and it may change when more entries are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function _at(Map storage map, uint256 index) private view returns (bytes32, bytes32) {\n require(map._entries.length > index, \"EnumerableMap: index out of bounds\");\n\n MapEntry storage entry = map._entries[index];\n return (entry._key, entry._value);\n }\n\n /**\n * @dev Tries to returns the value associated with `key`. O(1).\n * Does not revert if `key` is not in the map.\n */\n function _tryGet(Map storage map, bytes32 key) private view returns (bool, bytes32) {\n uint256 keyIndex = map._indexes[key];\n if (keyIndex == 0) return (false, 0); // Equivalent to contains(map, key)\n return (true, map._entries[keyIndex - 1]._value); // All indexes are 1-based\n }\n\n /**\n * @dev Returns the value associated with `key`. O(1).\n *\n * Requirements:\n *\n * - `key` must be in the map.\n */\n function _get(Map storage map, bytes32 key) private view returns (bytes32) {\n uint256 keyIndex = map._indexes[key];\n require(keyIndex != 0, \"EnumerableMap: nonexistent key\"); // Equivalent to contains(map, key)\n return map._entries[keyIndex - 1]._value; // All indexes are 1-based\n }\n\n /**\n * @dev Same as {_get}, with a custom error message when `key` is not in the map.\n *\n * CAUTION: This function is deprecated because it requires allocating memory for the error\n * message unnecessarily. For custom revert reasons use {_tryGet}.\n */\n function _get(Map storage map, bytes32 key, string memory errorMessage) private view returns (bytes32) {\n uint256 keyIndex = map._indexes[key];\n require(keyIndex != 0, errorMessage); // Equivalent to contains(map, key)\n return map._entries[keyIndex - 1]._value; // All indexes are 1-based\n }\n\n // UintToAddressMap\n\n struct UintToAddressMap {\n Map _inner;\n }\n\n /**\n * @dev Adds a key-value pair to a map, or updates the value for an existing\n * key. O(1).\n *\n * Returns true if the key was added to the map, that is if it was not\n * already present.\n */\n function set(UintToAddressMap storage map, uint256 key, address value) internal returns (bool) {\n return _set(map._inner, bytes32(key), bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the key was removed from the map, that is if it was present.\n */\n function remove(UintToAddressMap storage map, uint256 key) internal returns (bool) {\n return _remove(map._inner, bytes32(key));\n }\n\n /**\n * @dev Returns true if the key is in the map. O(1).\n */\n function contains(UintToAddressMap storage map, uint256 key) internal view returns (bool) {\n return _contains(map._inner, bytes32(key));\n }\n\n /**\n * @dev Returns the number of elements in the map. O(1).\n */\n function length(UintToAddressMap storage map) internal view returns (uint256) {\n return _length(map._inner);\n }\n\n /**\n * @dev Returns the element stored at position `index` in the set. O(1).\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(UintToAddressMap storage map, uint256 index) internal view returns (uint256, address) {\n (bytes32 key, bytes32 value) = _at(map._inner, index);\n return (uint256(key), address(uint160(uint256(value))));\n }\n\n /**\n * @dev Tries to returns the value associated with `key`. O(1).\n * Does not revert if `key` is not in the map.\n *\n * _Available since v3.4._\n */\n function tryGet(UintToAddressMap storage map, uint256 key) internal view returns (bool, address) {\n (bool success, bytes32 value) = _tryGet(map._inner, bytes32(key));\n return (success, address(uint160(uint256(value))));\n }\n\n /**\n * @dev Returns the value associated with `key`. O(1).\n *\n * Requirements:\n *\n * - `key` must be in the map.\n */\n function get(UintToAddressMap storage map, uint256 key) internal view returns (address) {\n return address(uint160(uint256(_get(map._inner, bytes32(key)))));\n }\n\n /**\n * @dev Same as {get}, with a custom error message when `key` is not in the map.\n *\n * CAUTION: This function is deprecated because it requires allocating memory for the error\n * message unnecessarily. For custom revert reasons use {tryGet}.\n */\n function get(UintToAddressMap storage map, uint256 key, string memory errorMessage) internal view returns (address) {\n return address(uint160(uint256(_get(map._inner, bytes32(key), errorMessage))));\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n /**\n * @dev Converts a `uint256` to its ASCII `string` representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n // Inspired by OraclizeAPI's implementation - MIT licence\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n if (value == 0) {\n return \"0\";\n }\n uint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n bytes memory buffer = new bytes(digits);\n uint256 index = digits - 1;\n temp = value;\n while (temp != 0) {\n buffer[index--] = bytes1(uint8(48 + temp % 10));\n temp /= 10;\n }\n return string(buffer);\n }\n}\n" + }, + "@openzeppelin/contracts/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <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" + }, + "@openzeppelin/contracts/utils/Pausable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"./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 () internal {\n _paused = false;\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 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 require(!paused(), \"Pausable: paused\");\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 require(paused(), \"Pausable: not paused\");\n _;\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" + }, + "contracts/Libraries/matic/tunnel/BaseRootTunnel.sol": { + "content": "pragma solidity ^0.6.6;\n\n\nimport {SafeMath} from \"@openzeppelin/contracts/math/SafeMath.sol\";\n\nimport {AccessControlMixin} from \"../common/AccessControlMixin.sol\";\nimport {IStateSender} from \"../root/StateSender/IStateSender.sol\";\nimport {RLPReader} from \"../lib/RLPReader.sol\";\nimport {MerklePatriciaProof} from \"../lib/MerklePatriciaProof.sol\";\nimport {ICheckpointManager} from \"../root/ICheckpointManager.sol\";\nimport {RLPReader} from \"../lib/RLPReader.sol\";\nimport {Merkle} from \"../lib/Merkle.sol\";\n\nabstract contract BaseRootTunnel is AccessControlMixin {\n using RLPReader for bytes;\n using RLPReader for RLPReader.RLPItem;\n using Merkle for bytes32;\n using SafeMath for uint256;\n\n // keccak256(MessageSent(bytes))\n bytes32 public constant SEND_MESSAGE_EVENT_SIG = 0x8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036;\n\n // state sender contract\n IStateSender public stateSender;\n // root chain manager\n ICheckpointManager public checkpointManager;\n // child tunnel contract which receives and sends messages \n address public childTunnel;\n // storage to avoid duplicate exits\n mapping(bytes32 => bool) public processedExits;\n\n constructor() internal {\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\n _setupContractId(\"RootTunnel\");\n }\n\n /**\n * @notice Set the state sender, callable only by admins\n * @dev This should be the state sender from plasma contracts\n * It is used to send bytes from root to child chain\n * @param newStateSender address of state sender contract\n */\n function setStateSender(address newStateSender)\n external\n only(DEFAULT_ADMIN_ROLE)\n {\n stateSender = IStateSender(newStateSender);\n }\n\n /**\n * @notice Set the checkpoint manager, callable only by admins\n * @dev This should be the plasma contract responsible for keeping track of checkpoints\n * @param newCheckpointManager address of checkpoint manager contract\n */\n function setCheckpointManager(address newCheckpointManager)\n external\n only(DEFAULT_ADMIN_ROLE)\n {\n checkpointManager = ICheckpointManager(newCheckpointManager);\n }\n\n /**\n * @notice Set the child chain tunnel, callable only by admins\n * @dev This should be the contract responsible to receive data bytes on child chain\n * @param newChildTunnel address of child tunnel contract\n */\n function setChildTunnel(address newChildTunnel)\n external\n only(DEFAULT_ADMIN_ROLE)\n {\n require(newChildTunnel != address(0x0), \"RootTunnel: INVALID_CHILD_TUNNEL_ADDRESS\");\n childTunnel = newChildTunnel;\n }\n\n /**\n * @notice Send bytes message to Child Tunnel\n * @param message bytes message that will be sent to Child Tunnel\n * some message examples -\n * abi.encode(tokenId);\n * abi.encode(tokenId, tokenMetadata);\n * abi.encode(messageType, messageData);\n */\n function _sendMessageToChild(bytes memory message) internal {\n stateSender.syncState(childTunnel, message);\n }\n\n function _validateAndExtractMessage(bytes memory inputData) internal returns (bytes memory) {\n RLPReader.RLPItem[] memory inputDataRLPList = inputData\n .toRlpItem()\n .toList();\n\n // checking if exit has already been processed\n // unique exit is identified using hash of (blockNumber, branchMask, receiptLogIndex)\n bytes32 exitHash = keccak256(\n abi.encodePacked(\n inputDataRLPList[2].toUint(), // blockNumber\n // first 2 nibbles are dropped while generating nibble array\n // this allows branch masks that are valid but bypass exitHash check (changing first 2 nibbles only)\n // so converting to nibble array and then hashing it\n MerklePatriciaProof._getNibbleArray(inputDataRLPList[8].toBytes()), // branchMask\n inputDataRLPList[9].toUint() // receiptLogIndex\n )\n );\n require(\n processedExits[exitHash] == false,\n \"RootTunnel: EXIT_ALREADY_PROCESSED\"\n );\n processedExits[exitHash] = true;\n\n RLPReader.RLPItem[] memory receiptRLPList = inputDataRLPList[6]\n .toBytes()\n .toRlpItem()\n .toList();\n RLPReader.RLPItem memory logRLP = receiptRLPList[3]\n .toList()[\n inputDataRLPList[9].toUint() // receiptLogIndex\n ];\n\n RLPReader.RLPItem[] memory logRLPList = logRLP.toList();\n \n // check child tunnel\n require(childTunnel == RLPReader.toAddress(logRLPList[0]), \"RootTunnel: INVALID_CHILD_TUNNEL\");\n\n // verify receipt inclusion\n require(\n MerklePatriciaProof.verify(\n inputDataRLPList[6].toBytes(), // receipt\n inputDataRLPList[8].toBytes(), // branchMask\n inputDataRLPList[7].toBytes(), // receiptProof\n bytes32(inputDataRLPList[5].toUint()) // receiptRoot\n ),\n \"RootTunnel: INVALID_RECEIPT_PROOF\"\n );\n\n // verify checkpoint inclusion\n _checkBlockMembershipInCheckpoint(\n inputDataRLPList[2].toUint(), // blockNumber\n inputDataRLPList[3].toUint(), // blockTime\n bytes32(inputDataRLPList[4].toUint()), // txRoot\n bytes32(inputDataRLPList[5].toUint()), // receiptRoot\n inputDataRLPList[0].toUint(), // headerNumber\n inputDataRLPList[1].toBytes() // blockProof\n );\n\n RLPReader.RLPItem[] memory logTopicRLPList = logRLPList[1].toList(); // topics\n\n require(\n bytes32(logTopicRLPList[0].toUint()) == SEND_MESSAGE_EVENT_SIG, // topic0 is event sig\n \"RootTunnel: INVALID_SIGNATURE\"\n );\n\n // received message data\n bytes memory receivedData = logRLPList[2].toBytes();\n (bytes memory message) = abi.decode(receivedData, (bytes)); // event decodes params again, so decoding bytes to get message\n return message;\n }\n\n function _checkBlockMembershipInCheckpoint(\n uint256 blockNumber,\n uint256 blockTime,\n bytes32 txRoot,\n bytes32 receiptRoot,\n uint256 headerNumber,\n bytes memory blockProof\n ) private view returns (uint256) {\n (\n bytes32 headerRoot,\n uint256 startBlock,\n ,\n uint256 createdAt,\n\n ) = checkpointManager.headerBlocks(headerNumber);\n\n require(\n keccak256(\n abi.encodePacked(blockNumber, blockTime, txRoot, receiptRoot)\n )\n .checkMembership(\n blockNumber.sub(startBlock),\n headerRoot,\n blockProof\n ),\n \"RootTunnel: INVALID_HEADER\"\n );\n return createdAt;\n }\n\n /**\n * @notice receive message from L2 to L1, validated by proof\n * @dev This function verifies if the transaction actually happened on child chain\n *\n * @param inputData RLP encoded data of the reference tx containing following list of fields\n * 0 - headerNumber - Checkpoint header block number containing the reference tx\n * 1 - blockProof - Proof that the block header (in the child chain) is a leaf in the submitted merkle root\n * 2 - blockNumber - Block number containing the reference tx on child chain\n * 3 - blockTime - Reference tx block time\n * 4 - txRoot - Transactions root of block\n * 5 - receiptRoot - Receipts root of block\n * 6 - receipt - Receipt of the reference transaction\n * 7 - receiptProof - Merkle proof of the reference receipt\n * 8 - branchMask - 32 bits denoting the path of receipt in merkle tree\n * 9 - receiptLogIndex - Log Index to read from the receipt\n */\n function receiveMessage(bytes memory inputData) public virtual {\n bytes memory message = _validateAndExtractMessage(inputData);\n _processMessageFromChild(message);\n }\n\n /**\n * @notice Process message received from Child Tunnel\n * @dev function needs to be implemented to handle message as per requirement\n * This is called by onStateReceive function.\n * Since it is called via a system call, any event will not be emitted during its execution.\n * @param message bytes message that was sent from Child Tunnel\n */\n function _processMessageFromChild(bytes memory message) virtual internal;\n}\n" + }, + "contracts/Libraries/matic/common/AccessControlMixin.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {AccessControl} from \"@openzeppelin/contracts/access/AccessControl.sol\";\n\ncontract AccessControlMixin is AccessControl {\n string private _revertMsg;\n function _setupContractId(string memory contractId) internal {\n _revertMsg = string(abi.encodePacked(contractId, \": INSUFFICIENT_PERMISSIONS\"));\n }\n\n modifier only(bytes32 role) {\n require(\n hasRole(role, _msgSender()),\n _revertMsg\n );\n _;\n }\n}\n" + }, + "contracts/Libraries/matic/root/StateSender/IStateSender.sol": { + "content": "pragma solidity 0.6.6;\n\ninterface IStateSender {\n function syncState(address receiver, bytes calldata data) external;\n}\n" + }, + "contracts/Libraries/matic/lib/RLPReader.sol": { + "content": "/*\n * @author Hamdi Allam hamdi.allam97@gmail.com\n * Please reach out with any questions or concerns\n * https://github.com/hamdiallam/Solidity-RLP/blob/e681e25a376dbd5426b509380bc03446f05d0f97/contracts/RLPReader.sol\n */\npragma solidity 0.6.6;\n\nlibrary RLPReader {\n uint8 constant STRING_SHORT_START = 0x80;\n uint8 constant STRING_LONG_START = 0xb8;\n uint8 constant LIST_SHORT_START = 0xc0;\n uint8 constant LIST_LONG_START = 0xf8;\n uint8 constant WORD_SIZE = 32;\n\n struct RLPItem {\n uint256 len;\n uint256 memPtr;\n }\n\n /*\n * @param item RLP encoded bytes\n */\n function toRlpItem(bytes memory item)\n internal\n pure\n returns (RLPItem memory)\n {\n require(item.length > 0, \"RLPReader: INVALID_BYTES_LENGTH\");\n uint256 memPtr;\n assembly {\n memPtr := add(item, 0x20)\n }\n\n return RLPItem(item.length, memPtr);\n }\n\n /*\n * @param item RLP encoded list in bytes\n */\n function toList(RLPItem memory item)\n internal\n pure\n returns (RLPItem[] memory)\n {\n require(isList(item), \"RLPReader: ITEM_NOT_LIST\");\n\n uint256 items = numItems(item);\n RLPItem[] memory result = new RLPItem[](items);\n uint256 listLength = _itemLength(item.memPtr);\n require(listLength == item.len, \"RLPReader: LIST_DECODED_LENGTH_MISMATCH\");\n\n uint256 memPtr = item.memPtr + _payloadOffset(item.memPtr);\n uint256 dataLen;\n for (uint256 i = 0; i < items; i++) {\n dataLen = _itemLength(memPtr);\n result[i] = RLPItem(dataLen, memPtr);\n memPtr = memPtr + dataLen;\n }\n\n return result;\n }\n\n // @return indicator whether encoded payload is a list. negate this function call for isData.\n function isList(RLPItem memory item) internal pure returns (bool) {\n uint8 byte0;\n uint256 memPtr = item.memPtr;\n assembly {\n byte0 := byte(0, mload(memPtr))\n }\n\n if (byte0 < LIST_SHORT_START) return false;\n return true;\n }\n\n /** RLPItem conversions into data types **/\n\n // @returns raw rlp encoding in bytes\n function toRlpBytes(RLPItem memory item)\n internal\n pure\n returns (bytes memory)\n {\n bytes memory result = new bytes(item.len);\n\n uint256 ptr;\n assembly {\n ptr := add(0x20, result)\n }\n\n copy(item.memPtr, ptr, item.len);\n return result;\n }\n\n function toAddress(RLPItem memory item) internal pure returns (address) {\n require(!isList(item), \"RLPReader: DECODING_LIST_AS_ADDRESS\");\n // 1 byte for the length prefix\n require(item.len == 21, \"RLPReader: INVALID_ADDRESS_LENGTH\");\n\n return address(toUint(item));\n }\n\n function toUint(RLPItem memory item) internal pure returns (uint256) {\n require(!isList(item), \"RLPReader: DECODING_LIST_AS_UINT\");\n require(item.len <= 33, \"RLPReader: INVALID_UINT_LENGTH\");\n\n uint256 itemLength = _itemLength(item.memPtr);\n require(itemLength == item.len, \"RLPReader: UINT_DECODED_LENGTH_MISMATCH\");\n\n uint256 offset = _payloadOffset(item.memPtr);\n uint256 len = item.len - offset;\n uint256 result;\n uint256 memPtr = item.memPtr + offset;\n assembly {\n result := mload(memPtr)\n\n // shfit to the correct location if neccesary\n if lt(len, 32) {\n result := div(result, exp(256, sub(32, len)))\n }\n }\n\n return result;\n }\n\n // enforces 32 byte length\n function toUintStrict(RLPItem memory item) internal pure returns (uint256) {\n uint256 itemLength = _itemLength(item.memPtr);\n require(itemLength == item.len, \"RLPReader: UINT_STRICT_DECODED_LENGTH_MISMATCH\");\n // one byte prefix\n require(item.len == 33, \"RLPReader: INVALID_UINT_STRICT_LENGTH\");\n\n uint256 result;\n uint256 memPtr = item.memPtr + 1;\n assembly {\n result := mload(memPtr)\n }\n\n return result;\n }\n\n function toBytes(RLPItem memory item) internal pure returns (bytes memory) {\n uint256 listLength = _itemLength(item.memPtr);\n require(listLength == item.len, \"RLPReader: BYTES_DECODED_LENGTH_MISMATCH\");\n uint256 offset = _payloadOffset(item.memPtr);\n\n uint256 len = item.len - offset; // data length\n bytes memory result = new bytes(len);\n\n uint256 destPtr;\n assembly {\n destPtr := add(0x20, result)\n }\n\n copy(item.memPtr + offset, destPtr, len);\n return result;\n }\n\n /*\n * Private Helpers\n */\n\n // @return number of payload items inside an encoded list.\n function numItems(RLPItem memory item) private pure returns (uint256) {\n // add `isList` check if `item` is expected to be passsed without a check from calling function\n // require(isList(item), \"RLPReader: NUM_ITEMS_NOT_LIST\");\n\n uint256 count = 0;\n uint256 currPtr = item.memPtr + _payloadOffset(item.memPtr);\n uint256 endPtr = item.memPtr + item.len;\n while (currPtr < endPtr) {\n currPtr = currPtr + _itemLength(currPtr); // skip over an item\n require(currPtr <= endPtr, \"RLPReader: NUM_ITEMS_DECODED_LENGTH_MISMATCH\");\n count++;\n }\n\n return count;\n }\n\n // @return entire rlp item byte length\n function _itemLength(uint256 memPtr) private pure returns (uint256) {\n uint256 itemLen;\n uint256 byte0;\n assembly {\n byte0 := byte(0, mload(memPtr))\n }\n\n if (byte0 < STRING_SHORT_START) itemLen = 1;\n else if (byte0 < STRING_LONG_START)\n itemLen = byte0 - STRING_SHORT_START + 1;\n else if (byte0 < LIST_SHORT_START) {\n assembly {\n let byteLen := sub(byte0, 0xb7) // # of bytes the actual length is\n memPtr := add(memPtr, 1) // skip over the first byte\n\n /* 32 byte word size */\n let dataLen := div(mload(memPtr), exp(256, sub(32, byteLen))) // right shifting to get the len\n itemLen := add(dataLen, add(byteLen, 1))\n }\n } else if (byte0 < LIST_LONG_START) {\n itemLen = byte0 - LIST_SHORT_START + 1;\n } else {\n assembly {\n let byteLen := sub(byte0, 0xf7)\n memPtr := add(memPtr, 1)\n\n let dataLen := div(mload(memPtr), exp(256, sub(32, byteLen))) // right shifting to the correct length\n itemLen := add(dataLen, add(byteLen, 1))\n }\n }\n\n return itemLen;\n }\n\n // @return number of bytes until the data\n function _payloadOffset(uint256 memPtr) private pure returns (uint256) {\n uint256 byte0;\n assembly {\n byte0 := byte(0, mload(memPtr))\n }\n\n if (byte0 < STRING_SHORT_START) return 0;\n else if (\n byte0 < STRING_LONG_START ||\n (byte0 >= LIST_SHORT_START && byte0 < LIST_LONG_START)\n ) return 1;\n else if (byte0 < LIST_SHORT_START)\n // being explicit\n return byte0 - (STRING_LONG_START - 1) + 1;\n else return byte0 - (LIST_LONG_START - 1) + 1;\n }\n\n /*\n * @param src Pointer to source\n * @param dest Pointer to destination\n * @param len Amount of memory to copy from the source\n */\n function copy(\n uint256 src,\n uint256 dest,\n uint256 len\n ) private pure {\n if (len == 0) return;\n\n // copy as many word sizes as possible\n for (; len >= WORD_SIZE; len -= WORD_SIZE) {\n assembly {\n mstore(dest, mload(src))\n }\n\n src += WORD_SIZE;\n dest += WORD_SIZE;\n }\n\n // left over bytes. Mask is used to remove unwanted bytes from the word\n uint256 mask = 256**(WORD_SIZE - len) - 1;\n assembly {\n let srcpart := and(mload(src), not(mask)) // zero out src\n let destpart := and(mload(dest), mask) // retrieve the bytes\n mstore(dest, or(destpart, srcpart))\n }\n }\n}\n" + }, + "contracts/Libraries/matic/lib/MerklePatriciaProof.sol": { + "content": "/*\n * @title MerklePatriciaVerifier\n * @author Sam Mayo (sammayo888@gmail.com)\n *\n * @dev Library for verifing merkle patricia proofs.\n */\npragma solidity 0.6.6;\n\nimport {RLPReader} from \"./RLPReader.sol\";\n\nlibrary MerklePatriciaProof {\n /*\n * @dev Verifies a merkle patricia proof.\n * @param value The terminating value in the trie.\n * @param encodedPath The path in the trie leading to value.\n * @param rlpParentNodes The rlp encoded stack of nodes.\n * @param root The root hash of the trie.\n * @return The boolean validity of the proof.\n */\n function verify(\n bytes memory value,\n bytes memory encodedPath,\n bytes memory rlpParentNodes,\n bytes32 root\n ) internal pure returns (bool) {\n RLPReader.RLPItem memory item = RLPReader.toRlpItem(rlpParentNodes);\n RLPReader.RLPItem[] memory parentNodes = RLPReader.toList(item);\n\n bytes memory currentNode;\n RLPReader.RLPItem[] memory currentNodeList;\n\n bytes32 nodeKey = root;\n uint256 pathPtr = 0;\n\n bytes memory path = _getNibbleArray(encodedPath);\n if (path.length == 0) {\n return false;\n }\n\n for (uint256 i = 0; i < parentNodes.length; i++) {\n if (pathPtr > path.length) {\n return false;\n }\n\n currentNode = RLPReader.toRlpBytes(parentNodes[i]);\n if (nodeKey != keccak256(currentNode)) {\n return false;\n }\n currentNodeList = RLPReader.toList(parentNodes[i]);\n\n if (currentNodeList.length == 17) {\n if (pathPtr == path.length) {\n if (\n keccak256(RLPReader.toBytes(currentNodeList[16])) ==\n keccak256(value)\n ) {\n return true;\n } else {\n return false;\n }\n }\n\n uint8 nextPathNibble = uint8(path[pathPtr]);\n if (nextPathNibble > 16) {\n return false;\n }\n nodeKey = bytes32(\n RLPReader.toUintStrict(currentNodeList[nextPathNibble])\n );\n pathPtr += 1;\n } else if (currentNodeList.length == 2) {\n uint256 traversed = _nibblesToTraverse(\n RLPReader.toBytes(currentNodeList[0]),\n path,\n pathPtr\n );\n if (pathPtr + traversed == path.length) {\n //leaf node\n if (\n keccak256(RLPReader.toBytes(currentNodeList[1])) ==\n keccak256(value)\n ) {\n return true;\n } else {\n return false;\n }\n }\n\n //extension node\n if (traversed == 0) {\n return false;\n }\n\n pathPtr += traversed;\n nodeKey = bytes32(RLPReader.toUintStrict(currentNodeList[1]));\n } else {\n return false;\n }\n }\n }\n\n function _nibblesToTraverse(\n bytes memory encodedPartialPath,\n bytes memory path,\n uint256 pathPtr\n ) private pure returns (uint256) {\n uint256 len = 0;\n // encodedPartialPath has elements that are each two hex characters (1 byte), but partialPath\n // and slicedPath have elements that are each one hex character (1 nibble)\n bytes memory partialPath = _getNibbleArray(encodedPartialPath);\n bytes memory slicedPath = new bytes(partialPath.length);\n\n // pathPtr counts nibbles in path\n // partialPath.length is a number of nibbles\n for (uint256 i = pathPtr; i < pathPtr + partialPath.length; i++) {\n bytes1 pathNibble = path[i];\n slicedPath[i - pathPtr] = pathNibble;\n }\n\n if (keccak256(partialPath) == keccak256(slicedPath)) {\n len = partialPath.length;\n } else {\n len = 0;\n }\n return len;\n }\n\n // bytes b must be hp encoded\n function _getNibbleArray(bytes memory b)\n internal\n pure\n returns (bytes memory)\n {\n bytes memory nibbles = \"\";\n if (b.length > 0) {\n uint8 offset;\n uint8 hpNibble = uint8(_getNthNibbleOfBytes(0, b));\n if (hpNibble == 1 || hpNibble == 3) {\n nibbles = new bytes(b.length * 2 - 1);\n bytes1 oddNibble = _getNthNibbleOfBytes(1, b);\n nibbles[0] = oddNibble;\n offset = 1;\n } else {\n nibbles = new bytes(b.length * 2 - 2);\n offset = 0;\n }\n\n for (uint256 i = offset; i < nibbles.length; i++) {\n nibbles[i] = _getNthNibbleOfBytes(i - offset + 2, b);\n }\n }\n return nibbles;\n }\n\n function _getNthNibbleOfBytes(uint256 n, bytes memory str)\n private\n pure\n returns (bytes1)\n {\n return\n bytes1(\n n % 2 == 0 ? uint8(str[n / 2]) / 0x10 : uint8(str[n / 2]) % 0x10\n );\n }\n}\n" + }, + "contracts/Libraries/matic/root/ICheckpointManager.sol": { + "content": "pragma solidity 0.6.6;\n\ncontract ICheckpointManager {\n struct HeaderBlock {\n bytes32 root;\n uint256 start;\n uint256 end;\n uint256 createdAt;\n address proposer;\n }\n\n /**\n * @notice mapping of checkpoint header numbers to block details\n * @dev These checkpoints are submited by plasma contracts\n */\n mapping(uint256 => HeaderBlock) public headerBlocks;\n}\n" + }, + "contracts/Libraries/matic/lib/Merkle.sol": { + "content": "pragma solidity 0.6.6;\n\nlibrary Merkle {\n function checkMembership(\n bytes32 leaf,\n uint256 index,\n bytes32 rootHash,\n bytes memory proof\n ) internal pure returns (bool) {\n require(proof.length % 32 == 0, \"Invalid proof length\");\n uint256 proofHeight = proof.length / 32;\n // Proof of size n means, height of the tree is n+1.\n // In a tree of height n+1, max #leafs possible is 2 ^ n\n require(index < 2 ** proofHeight, \"Leaf index is too big\");\n\n bytes32 proofElement;\n bytes32 computedHash = leaf;\n for (uint256 i = 32; i <= proof.length; i += 32) {\n assembly {\n proofElement := mload(add(proof, i))\n }\n\n if (index % 2 == 0) {\n computedHash = keccak256(\n abi.encodePacked(computedHash, proofElement)\n );\n } else {\n computedHash = keccak256(\n abi.encodePacked(proofElement, computedHash)\n );\n }\n\n index = index / 2;\n }\n return computedHash == rootHash;\n }\n}\n" + }, + "contracts/Libraries/matic/tunnel/RootTunnel.sol": { + "content": "pragma solidity ^0.6.6;\n\nimport {BaseRootTunnel} from \"./BaseRootTunnel.sol\";\n\n\ncontract RootTunnel is BaseRootTunnel {\n function _processMessageFromChild(bytes memory message) internal override {\n // implement your core logic here\n }\n}\n" + }, + "contracts/Libraries/matic/root/RootChainManager/RootChainManager.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {SafeMath} from \"@openzeppelin/contracts/math/SafeMath.sol\";\nimport {IRootChainManager} from \"./IRootChainManager.sol\";\nimport {RootChainManagerStorage} from \"./RootChainManagerStorage.sol\";\nimport {IStateSender} from \"../StateSender/IStateSender.sol\";\nimport {ICheckpointManager} from \"../ICheckpointManager.sol\";\nimport {RLPReader} from \"../../lib/RLPReader.sol\";\nimport {MerklePatriciaProof} from \"../../lib/MerklePatriciaProof.sol\";\nimport {Merkle} from \"../../lib/Merkle.sol\";\nimport {ITokenPredicate} from \"../TokenPredicates/ITokenPredicate.sol\";\nimport {Initializable} from \"../../common/Initializable.sol\";\nimport {NativeMetaTransaction} from \"../../common/NativeMetaTransaction.sol\";\nimport {AccessControl} from \"@openzeppelin/contracts/access/AccessControl.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\nimport {ContextMixin} from \"../../common/ContextMixin.sol\";\n\ncontract RootChainManager is\n IRootChainManager,\n Initializable,\n AccessControl, // included to match old storage layout while upgrading\n RootChainManagerStorage, // created to match old storage layout while upgrading\n AccessControlMixin,\n NativeMetaTransaction,\n ContextMixin\n{\n using RLPReader for bytes;\n using RLPReader for RLPReader.RLPItem;\n using Merkle for bytes32;\n using SafeMath for uint256;\n\n // maybe DEPOSIT and MAP_TOKEN can be reduced to bytes4\n bytes32 public constant DEPOSIT = keccak256(\"DEPOSIT\");\n bytes32 public constant MAP_TOKEN = keccak256(\"MAP_TOKEN\");\n address public constant ETHER_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n bytes32 public constant MAPPER_ROLE = keccak256(\"MAPPER_ROLE\");\n\n function _msgSender()\n internal\n override\n view\n returns (address payable sender)\n {\n return ContextMixin.msgSender();\n }\n\n /**\n * @notice Deposit ether by directly sending to the contract\n * The account sending ether receives WETH on child chain\n */\n receive() external payable {\n _depositEtherFor(_msgSender());\n }\n\n /**\n * @notice Initialize the contract after it has been proxified\n * @dev meant to be called once immediately after deployment\n * @param _owner the account that should be granted admin role\n */\n function initialize(\n address _owner\n )\n external\n initializer\n {\n _initializeEIP712(\"RootChainManager\");\n _setupContractId(\"RootChainManager\");\n _setupRole(DEFAULT_ADMIN_ROLE, _owner);\n _setupRole(MAPPER_ROLE, _owner);\n }\n\n // adding seperate function setupContractId since initialize is already called with old implementation\n function setupContractId()\n external\n only(DEFAULT_ADMIN_ROLE)\n {\n _setupContractId(\"RootChainManager\");\n }\n\n // adding seperate function initializeEIP712 since initialize is already called with old implementation\n function initializeEIP712()\n external\n only(DEFAULT_ADMIN_ROLE)\n {\n _setDomainSeperator(\"RootChainManager\");\n }\n\n /**\n * @notice Set the state sender, callable only by admins\n * @dev This should be the state sender from plasma contracts\n * It is used to send bytes from root to child chain\n * @param newStateSender address of state sender contract\n */\n function setStateSender(address newStateSender)\n external\n only(DEFAULT_ADMIN_ROLE)\n {\n _stateSender = IStateSender(newStateSender);\n }\n\n /**\n * @notice Get the address of contract set as state sender\n * @return The address of state sender contract\n */\n function stateSenderAddress() external view returns (address) {\n return address(_stateSender);\n }\n\n /**\n * @notice Set the checkpoint manager, callable only by admins\n * @dev This should be the plasma contract responsible for keeping track of checkpoints\n * @param newCheckpointManager address of checkpoint manager contract\n */\n function setCheckpointManager(address newCheckpointManager)\n external\n only(DEFAULT_ADMIN_ROLE)\n {\n _checkpointManager = ICheckpointManager(newCheckpointManager);\n }\n\n /**\n * @notice Get the address of contract set as checkpoint manager\n * @return The address of checkpoint manager contract\n */\n function checkpointManagerAddress() external view returns (address) {\n return address(_checkpointManager);\n }\n\n /**\n * @notice Set the child chain manager, callable only by admins\n * @dev This should be the contract responsible to receive deposit bytes on child chain\n * @param newChildChainManager address of child chain manager contract\n */\n function setChildChainManagerAddress(address newChildChainManager)\n external\n only(DEFAULT_ADMIN_ROLE)\n {\n require(newChildChainManager != address(0x0), \"RootChainManager: INVALID_CHILD_CHAIN_ADDRESS\");\n childChainManagerAddress = newChildChainManager;\n }\n\n /**\n * @notice Register a token predicate address against its type, callable only by mappers\n * @dev A predicate is a contract responsible to process the token specific logic while locking or exiting tokens\n * @param tokenType bytes32 unique identifier for the token type\n * @param predicateAddress address of token predicate address\n */\n function registerPredicate(bytes32 tokenType, address predicateAddress)\n external\n override\n only(DEFAULT_ADMIN_ROLE)\n {\n typeToPredicate[tokenType] = predicateAddress;\n emit PredicateRegistered(tokenType, predicateAddress);\n }\n\n /**\n * @notice Map a token to enable its movement via the PoS Portal, callable only by mappers\n * @param rootToken address of token on root chain\n * @param childToken address of token on child chain\n * @param tokenType bytes32 unique identifier for the token type\n */\n function mapToken(\n address rootToken,\n address childToken,\n bytes32 tokenType\n ) external override only(MAPPER_ROLE) {\n // explicit check if token is already mapped to avoid accidental remaps\n require(\n rootToChildToken[rootToken] == address(0) &&\n childToRootToken[childToken] == address(0),\n \"RootChainManager: ALREADY_MAPPED\"\n );\n _mapToken(rootToken, childToken, tokenType);\n }\n\n /**\n * @notice Clean polluted token mapping\n * @param rootToken address of token on root chain. Since rename token was introduced later stage, \n * clean method is used to clean pollulated mapping\n */\n function cleanMapToken(\n address rootToken,\n address childToken\n ) external override only(DEFAULT_ADMIN_ROLE) {\n rootToChildToken[rootToken] = address(0);\n childToRootToken[childToken] = address(0);\n tokenToType[rootToken] = bytes32(0);\n\n emit TokenMapped(rootToken, childToken, tokenToType[rootToken]);\n }\n\n /**\n * @notice Remap a token that has already been mapped, properly cleans up old mapping\n * Callable only by mappers\n * @param rootToken address of token on root chain\n * @param childToken address of token on child chain\n * @param tokenType bytes32 unique identifier for the token type\n */\n function remapToken(\n address rootToken,\n address childToken,\n bytes32 tokenType\n ) external override only(DEFAULT_ADMIN_ROLE) {\n // cleanup old mapping\n address oldChildToken = rootToChildToken[rootToken];\n address oldRootToken = childToRootToken[childToken];\n\n if (rootToChildToken[oldRootToken] != address(0)) {\n rootToChildToken[oldRootToken] = address(0);\n tokenToType[oldRootToken] = bytes32(0);\n }\n\n if (childToRootToken[oldChildToken] != address(0)) {\n childToRootToken[oldChildToken] = address(0);\n }\n\n _mapToken(rootToken, childToken, tokenType);\n }\n\n function _mapToken(\n address rootToken,\n address childToken,\n bytes32 tokenType\n ) private {\n require(\n typeToPredicate[tokenType] != address(0x0),\n \"RootChainManager: TOKEN_TYPE_NOT_SUPPORTED\"\n );\n\n rootToChildToken[rootToken] = childToken;\n childToRootToken[childToken] = rootToken;\n tokenToType[rootToken] = tokenType;\n\n emit TokenMapped(rootToken, childToken, tokenType);\n\n bytes memory syncData = abi.encode(rootToken, childToken, tokenType);\n _stateSender.syncState(\n childChainManagerAddress,\n abi.encode(MAP_TOKEN, syncData)\n );\n }\n\n /**\n * @notice Move ether from root to child chain, accepts ether transfer\n * Keep in mind this ether cannot be used to pay gas on child chain\n * Use Matic tokens deposited using plasma mechanism for that\n * @param user address of account that should receive WETH on child chain\n */\n function depositEtherFor(address user) external override payable {\n _depositEtherFor(user);\n }\n\n /**\n * @notice Move tokens from root to child chain\n * @dev This mechanism supports arbitrary tokens as long as its predicate has been registered and the token is mapped\n * @param user address of account that should receive this deposit on child chain\n * @param rootToken address of token that is being deposited\n * @param depositData bytes data that is sent to predicate and child token contracts to handle deposit\n */\n function depositFor(\n address user,\n address rootToken,\n bytes calldata depositData\n ) external override {\n require(\n rootToken != ETHER_ADDRESS,\n \"RootChainManager: INVALID_ROOT_TOKEN\"\n );\n _depositFor(user, rootToken, depositData);\n }\n\n function _depositEtherFor(address user) private {\n bytes memory depositData = abi.encode(msg.value);\n _depositFor(user, ETHER_ADDRESS, depositData);\n\n // payable(typeToPredicate[tokenToType[ETHER_ADDRESS]]).transfer(msg.value);\n // transfer doesn't work as expected when receiving contract is proxified so using call\n (bool success, /* bytes memory data */) = typeToPredicate[tokenToType[ETHER_ADDRESS]].call{value: msg.value}(\"\");\n if (!success) {\n revert(\"RootChainManager: ETHER_TRANSFER_FAILED\");\n }\n }\n\n function _depositFor(\n address user,\n address rootToken,\n bytes memory depositData\n ) private {\n bytes32 tokenType = tokenToType[rootToken];\n require(\n rootToChildToken[rootToken] != address(0x0) &&\n tokenType != 0,\n \"RootChainManager: TOKEN_NOT_MAPPED\"\n );\n address predicateAddress = typeToPredicate[tokenType];\n require(\n predicateAddress != address(0),\n \"RootChainManager: INVALID_TOKEN_TYPE\"\n );\n require(\n user != address(0),\n \"RootChainManager: INVALID_USER\"\n );\n\n ITokenPredicate(predicateAddress).lockTokens(\n _msgSender(),\n user,\n rootToken,\n depositData\n );\n bytes memory syncData = abi.encode(user, rootToken, depositData);\n _stateSender.syncState(\n childChainManagerAddress,\n abi.encode(DEPOSIT, syncData)\n );\n }\n\n /**\n * @notice exit tokens by providing proof\n * @dev This function verifies if the transaction actually happened on child chain\n * the transaction log is then sent to token predicate to handle it accordingly\n *\n * @param inputData RLP encoded data of the reference tx containing following list of fields\n * 0 - headerNumber - Checkpoint header block number containing the reference tx\n * 1 - blockProof - Proof that the block header (in the child chain) is a leaf in the submitted merkle root\n * 2 - blockNumber - Block number containing the reference tx on child chain\n * 3 - blockTime - Reference tx block time\n * 4 - txRoot - Transactions root of block\n * 5 - receiptRoot - Receipts root of block\n * 6 - receipt - Receipt of the reference transaction\n * 7 - receiptProof - Merkle proof of the reference receipt\n * 8 - branchMask - 32 bits denoting the path of receipt in merkle tree\n * 9 - receiptLogIndex - Log Index to read from the receipt\n */\n function exit(bytes calldata inputData) external override {\n RLPReader.RLPItem[] memory inputDataRLPList = inputData\n .toRlpItem()\n .toList();\n\n // checking if exit has already been processed\n // unique exit is identified using hash of (blockNumber, branchMask, receiptLogIndex)\n bytes32 exitHash = keccak256(\n abi.encodePacked(\n inputDataRLPList[2].toUint(), // blockNumber\n // first 2 nibbles are dropped while generating nibble array\n // this allows branch masks that are valid but bypass exitHash check (changing first 2 nibbles only)\n // so converting to nibble array and then hashing it\n MerklePatriciaProof._getNibbleArray(inputDataRLPList[8].toBytes()), // branchMask\n inputDataRLPList[9].toUint() // receiptLogIndex\n )\n );\n require(\n processedExits[exitHash] == false,\n \"RootChainManager: EXIT_ALREADY_PROCESSED\"\n );\n processedExits[exitHash] = true;\n\n RLPReader.RLPItem[] memory receiptRLPList = inputDataRLPList[6]\n .toBytes()\n .toRlpItem()\n .toList();\n RLPReader.RLPItem memory logRLP = receiptRLPList[3]\n .toList()[\n inputDataRLPList[9].toUint() // receiptLogIndex\n ];\n\n address childToken = RLPReader.toAddress(logRLP.toList()[0]); // log emitter address field\n // log should be emmited only by the child token\n address rootToken = childToRootToken[childToken];\n require(\n rootToken != address(0),\n \"RootChainManager: TOKEN_NOT_MAPPED\"\n );\n\n address predicateAddress = typeToPredicate[\n tokenToType[rootToken]\n ];\n\n // branch mask can be maximum 32 bits\n require(\n inputDataRLPList[8].toUint() &\n 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000 ==\n 0,\n \"RootChainManager: INVALID_BRANCH_MASK\"\n );\n\n // verify receipt inclusion\n require(\n MerklePatriciaProof.verify(\n inputDataRLPList[6].toBytes(), // receipt\n inputDataRLPList[8].toBytes(), // branchMask\n inputDataRLPList[7].toBytes(), // receiptProof\n bytes32(inputDataRLPList[5].toUint()) // receiptRoot\n ),\n \"RootChainManager: INVALID_PROOF\"\n );\n\n // verify checkpoint inclusion\n _checkBlockMembershipInCheckpoint(\n inputDataRLPList[2].toUint(), // blockNumber\n inputDataRLPList[3].toUint(), // blockTime\n bytes32(inputDataRLPList[4].toUint()), // txRoot\n bytes32(inputDataRLPList[5].toUint()), // receiptRoot\n inputDataRLPList[0].toUint(), // headerNumber\n inputDataRLPList[1].toBytes() // blockProof\n );\n\n ITokenPredicate(predicateAddress).exitTokens(\n _msgSender(),\n rootToken,\n logRLP.toRlpBytes()\n );\n }\n\n function _checkBlockMembershipInCheckpoint(\n uint256 blockNumber,\n uint256 blockTime,\n bytes32 txRoot,\n bytes32 receiptRoot,\n uint256 headerNumber,\n bytes memory blockProof\n ) private view returns (uint256) {\n (\n bytes32 headerRoot,\n uint256 startBlock,\n ,\n uint256 createdAt,\n\n ) = _checkpointManager.headerBlocks(headerNumber);\n\n require(\n keccak256(\n abi.encodePacked(blockNumber, blockTime, txRoot, receiptRoot)\n )\n .checkMembership(\n blockNumber.sub(startBlock),\n headerRoot,\n blockProof\n ),\n \"RootChainManager: INVALID_HEADER\"\n );\n return createdAt;\n }\n}\n" + }, + "contracts/Libraries/matic/root/RootChainManager/IRootChainManager.sol": { + "content": "pragma solidity 0.6.6;\n\ninterface IRootChainManager {\n event TokenMapped(\n address indexed rootToken,\n address indexed childToken,\n bytes32 indexed tokenType\n );\n\n event PredicateRegistered(\n bytes32 indexed tokenType,\n address indexed predicateAddress\n );\n\n function registerPredicate(bytes32 tokenType, address predicateAddress)\n external;\n\n function mapToken(\n address rootToken,\n address childToken,\n bytes32 tokenType\n ) external;\n\n function cleanMapToken(\n address rootToken,\n address childToken\n ) external;\n\n function remapToken(\n address rootToken,\n address childToken,\n bytes32 tokenType\n ) external;\n\n function depositEtherFor(address user) external payable;\n\n function depositFor(\n address user,\n address rootToken,\n bytes calldata depositData\n ) external;\n\n function exit(bytes calldata inputData) external;\n}\n" + }, + "contracts/Libraries/matic/root/RootChainManager/RootChainManagerStorage.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {IStateSender} from \"../StateSender/IStateSender.sol\";\nimport {ICheckpointManager} from \"../ICheckpointManager.sol\";\n\nabstract contract RootChainManagerStorage {\n mapping(bytes32 => address) public typeToPredicate;\n mapping(address => address) public rootToChildToken;\n mapping(address => address) public childToRootToken;\n mapping(address => bytes32) public tokenToType;\n mapping(bytes32 => bool) public processedExits;\n IStateSender internal _stateSender;\n ICheckpointManager internal _checkpointManager;\n address public childChainManagerAddress;\n}\n" + }, + "contracts/Libraries/matic/root/TokenPredicates/ITokenPredicate.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {RLPReader} from \"../../lib/RLPReader.sol\";\n\n/// @title Token predicate interface for all pos portal predicates\n/// @notice Abstract interface that defines methods for custom predicates\ninterface ITokenPredicate {\n\n /**\n * @notice Deposit tokens into pos portal\n * @dev When `depositor` deposits tokens into pos portal, tokens get locked into predicate contract.\n * @param depositor Address who wants to deposit tokens\n * @param depositReceiver Address (address) who wants to receive tokens on side chain\n * @param rootToken Token which gets deposited\n * @param depositData Extra data for deposit (amount for ERC20, token id for ERC721 etc.) [ABI encoded]\n */\n function lockTokens(\n address depositor,\n address depositReceiver,\n address rootToken,\n bytes calldata depositData\n ) external;\n\n /**\n * @notice Validates and processes exit while withdraw process\n * @dev Validates exit log emitted on sidechain. Reverts if validation fails.\n * @dev Processes withdraw based on custom logic. Example: transfer ERC20/ERC721, mint ERC721 if mintable withdraw\n * @param sender Address\n * @param rootToken Token which gets withdrawn\n * @param logRLPList Valid sidechain log for data like amount, token id etc.\n */\n function exitTokens(\n address sender,\n address rootToken,\n bytes calldata logRLPList\n ) external;\n}\n" + }, + "contracts/Libraries/matic/common/Initializable.sol": { + "content": "pragma solidity 0.6.6;\n\ncontract Initializable {\n bool inited = false;\n\n modifier initializer() {\n require(!inited, \"already inited\");\n _;\n inited = true;\n }\n}\n" + }, + "contracts/Libraries/matic/common/NativeMetaTransaction.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {SafeMath} from \"@openzeppelin/contracts/math/SafeMath.sol\";\nimport {EIP712Base} from \"./EIP712Base.sol\";\n\ncontract NativeMetaTransaction is EIP712Base {\n using SafeMath for uint256;\n bytes32 private constant META_TRANSACTION_TYPEHASH = keccak256(\n bytes(\n \"MetaTransaction(uint256 nonce,address from,bytes functionSignature)\"\n )\n );\n event MetaTransactionExecuted(\n address userAddress,\n address payable relayerAddress,\n bytes functionSignature\n );\n mapping(address => uint256) nonces;\n\n /*\n * Meta transaction structure.\n * No point of including value field here as if user is doing value transfer then he has the funds to pay for gas\n * He should call the desired function directly in that case.\n */\n struct MetaTransaction {\n uint256 nonce;\n address from;\n bytes functionSignature;\n }\n\n function executeMetaTransaction(\n address userAddress,\n bytes memory functionSignature,\n bytes32 sigR,\n bytes32 sigS,\n uint8 sigV\n ) public payable returns (bytes memory) {\n MetaTransaction memory metaTx = MetaTransaction({\n nonce: nonces[userAddress],\n from: userAddress,\n functionSignature: functionSignature\n });\n\n require(\n verify(userAddress, metaTx, sigR, sigS, sigV),\n \"Signer and signature do not match\"\n );\n\n // increase nonce for user (to avoid re-use)\n nonces[userAddress] = nonces[userAddress].add(1);\n\n emit MetaTransactionExecuted(\n userAddress,\n msg.sender,\n functionSignature\n );\n\n // Append userAddress and relayer address at the end to extract it from calling context\n (bool success, bytes memory returnData) = address(this).call(\n abi.encodePacked(functionSignature, userAddress)\n );\n require(success, \"Function call not successful\");\n\n return returnData;\n }\n\n function hashMetaTransaction(MetaTransaction memory metaTx)\n internal\n pure\n returns (bytes32)\n {\n return\n keccak256(\n abi.encode(\n META_TRANSACTION_TYPEHASH,\n metaTx.nonce,\n metaTx.from,\n keccak256(metaTx.functionSignature)\n )\n );\n }\n\n function getNonce(address user) public view returns (uint256 nonce) {\n nonce = nonces[user];\n }\n\n function verify(\n address signer,\n MetaTransaction memory metaTx,\n bytes32 sigR,\n bytes32 sigS,\n uint8 sigV\n ) internal view returns (bool) {\n require(signer != address(0), \"NativeMetaTransaction: INVALID_SIGNER\");\n return\n signer ==\n ecrecover(\n toTypedMessageHash(hashMetaTransaction(metaTx)),\n sigV,\n sigR,\n sigS\n );\n }\n}\n" + }, + "contracts/Libraries/matic/common/ContextMixin.sol": { + "content": "pragma solidity 0.6.6;\n\nabstract contract ContextMixin {\n function msgSender()\n internal\n view\n returns (address payable sender)\n {\n if (msg.sender == address(this)) {\n bytes memory array = msg.data;\n uint256 index = msg.data.length;\n assembly {\n // Load the 32 bytes word from memory with the address on the lower 20 bytes, and mask those.\n sender := and(\n mload(add(array, index)),\n 0xffffffffffffffffffffffffffffffffffffffff\n )\n }\n } else {\n sender = msg.sender;\n }\n return sender;\n }\n}\n" + }, + "contracts/Libraries/matic/common/EIP712Base.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {Initializable} from \"./Initializable.sol\";\n\ncontract EIP712Base is Initializable {\n struct EIP712Domain {\n string name;\n string version;\n address verifyingContract;\n bytes32 salt;\n }\n\n string constant public ERC712_VERSION = \"1\";\n\n bytes32 internal constant EIP712_DOMAIN_TYPEHASH = keccak256(\n bytes(\n \"EIP712Domain(string name,string version,address verifyingContract,bytes32 salt)\"\n )\n );\n bytes32 internal domainSeperator;\n\n // supposed to be called once while initializing.\n // one of the contractsa that inherits this contract follows proxy pattern\n // so it is not possible to do this in a constructor\n function _initializeEIP712(\n string memory name\n )\n internal\n initializer\n {\n _setDomainSeperator(name);\n }\n\n function _setDomainSeperator(string memory name) internal {\n domainSeperator = keccak256(\n abi.encode(\n EIP712_DOMAIN_TYPEHASH,\n keccak256(bytes(name)),\n keccak256(bytes(ERC712_VERSION)),\n address(this),\n bytes32(getChainId())\n )\n );\n }\n\n function getDomainSeperator() public view returns (bytes32) {\n return domainSeperator;\n }\n\n function getChainId() public pure returns (uint256) {\n uint256 id;\n assembly {\n id := chainid()\n }\n return id;\n }\n\n /**\n * Accept message hash and returns hash message in EIP712 compatible form\n * So that it can be used to recover signer from signature signed using EIP712 formatted data\n * https://eips.ethereum.org/EIPS/eip-712\n * \"\\\\x19\" makes the encoding deterministic\n * \"\\\\x01\" is the version byte to make it compatible to EIP-191\n */\n function toTypedMessageHash(bytes32 messageHash)\n internal\n view\n returns (bytes32)\n {\n return\n keccak256(\n abi.encodePacked(\"\\x19\\x01\", getDomainSeperator(), messageHash)\n );\n }\n}\n" + }, + "contracts/Libraries/matic/root/RootToken/DummyMintableERC721.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {ERC721} from \"@openzeppelin/contracts/token/ERC721/ERC721.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\nimport {NativeMetaTransaction} from \"../../common/NativeMetaTransaction.sol\";\nimport {IMintableERC721} from \"./IMintableERC721.sol\";\nimport {ContextMixin} from \"../../common/ContextMixin.sol\";\n\ncontract DummyMintableERC721 is\n ERC721,\n AccessControlMixin,\n NativeMetaTransaction,\n IMintableERC721,\n ContextMixin\n{\n bytes32 public constant PREDICATE_ROLE = keccak256(\"PREDICATE_ROLE\");\n constructor(string memory name_, string memory symbol_)\n public\n ERC721(name_, symbol_)\n {\n _setupContractId(\"DummyMintableERC721\");\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n _setupRole(PREDICATE_ROLE, _msgSender());\n _initializeEIP712(name_);\n }\n\n function _msgSender()\n internal\n override\n view\n returns (address payable sender)\n {\n return ContextMixin.msgSender();\n }\n\n /**\n * @dev See {IMintableERC721-mint}.\n */\n function mint(address user, uint256 tokenId) external override only(PREDICATE_ROLE) {\n _mint(user, tokenId);\n }\n\n /**\n * If you're attempting to bring metadata associated with token\n * from L2 to L1, you must implement this method, to be invoked\n * when minting token back on L1, during exit\n */\n function setTokenMetadata(uint256 tokenId, bytes memory data) internal virtual {\n // This function should decode metadata obtained from L2\n // and attempt to set it for this `tokenId`\n //\n // Following is just a default implementation, feel\n // free to define your own encoding/ decoding scheme\n // for L2 -> L1 token metadata transfer\n string memory uri = abi.decode(data, (string));\n\n _setTokenURI(tokenId, uri);\n }\n\n /**\n * @dev See {IMintableERC721-mint}.\n * \n * If you're attempting to bring metadata associated with token\n * from L2 to L1, you must implement this method\n */\n function mint(address user, uint256 tokenId, bytes calldata metaData) external override only(PREDICATE_ROLE) {\n _mint(user, tokenId);\n\n setTokenMetadata(tokenId, metaData);\n }\n\n\n /**\n * @dev See {IMintableERC721-exists}.\n */\n function exists(uint256 tokenId) external view override returns (bool) {\n return _exists(tokenId);\n }\n}\n" + }, + "contracts/Libraries/matic/root/RootToken/IMintableERC721.sol": { + "content": "import {IERC721} from \"@openzeppelin/contracts/token/ERC721/IERC721.sol\";\n\npragma solidity 0.6.6;\n\ninterface IMintableERC721 is IERC721 {\n /**\n * @notice called by predicate contract to mint tokens while withdrawing\n * @dev Should be callable only by MintableERC721Predicate\n * Make sure minting is done only by this function\n * @param user user address for whom token is being minted\n * @param tokenId tokenId being minted\n */\n function mint(address user, uint256 tokenId) external;\n\n /**\n * @notice called by predicate contract to mint tokens while withdrawing with metadata from L2\n * @dev Should be callable only by MintableERC721Predicate\n * Make sure minting is only done either by this function/ 👆\n * @param user user address for whom token is being minted\n * @param tokenId tokenId being minted\n * @param metaData Associated token metadata, to be decoded & set using `setTokenMetadata`\n *\n * Note : If you're interested in taking token metadata from L2 to L1 during exit, you must\n * implement this method\n */\n function mint(address user, uint256 tokenId, bytes calldata metaData) external;\n\n /**\n * @notice check if token already exists, return true if it does exist\n * @dev this check will be used by the predicate to determine if the token needs to be minted or transfered\n * @param tokenId tokenId being checked\n */\n function exists(uint256 tokenId) external view returns (bool);\n}\n" + }, + "contracts/Libraries/matic/root/TokenPredicates/MintableERC721Predicate.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {IERC721Receiver} from \"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\nimport {RLPReader} from \"../../lib/RLPReader.sol\";\nimport {IMintableERC721} from \"../RootToken/IMintableERC721.sol\";\nimport {ITokenPredicate} from \"./ITokenPredicate.sol\";\nimport {Initializable} from \"../../common/Initializable.sol\";\n\ncontract MintableERC721Predicate is ITokenPredicate, AccessControlMixin, Initializable, IERC721Receiver {\n using RLPReader for bytes;\n using RLPReader for RLPReader.RLPItem;\n\n // keccak256(\"MANAGER_ROLE\")\n bytes32 public constant MANAGER_ROLE = 0x241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b08;\n // keccak256(\"MintableERC721\")\n bytes32 public constant TOKEN_TYPE = 0xd4392723c111fcb98b073fe55873efb447bcd23cd3e49ec9ea2581930cd01ddc;\n // keccak256(\"Transfer(address,address,uint256)\")\n bytes32 public constant TRANSFER_EVENT_SIG = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef;\n // keccak256(\"WithdrawnBatch(address,uint256[])\")\n bytes32 public constant WITHDRAW_BATCH_EVENT_SIG = 0xf871896b17e9cb7a64941c62c188a4f5c621b86800e3d15452ece01ce56073df;\n // keccak256(\"TransferWithMetadata(address,address,uint256,bytes)\")\n bytes32 public constant TRANSFER_WITH_METADATA_EVENT_SIG = 0xf94915c6d1fd521cee85359239227480c7e8776d7caf1fc3bacad5c269b66a14;\n\n // limit batching of tokens due to gas limit restrictions\n uint256 public constant BATCH_LIMIT = 20;\n\n event LockedMintableERC721(\n address indexed depositor,\n address indexed depositReceiver,\n address indexed rootToken,\n uint256 tokenId\n );\n\n event LockedMintableERC721Batch(\n address indexed depositor,\n address indexed depositReceiver,\n address indexed rootToken,\n uint256[] tokenIds\n );\n\n constructor() public {}\n\n function initialize(address _owner) external initializer {\n _setupContractId(\"MintableERC721Predicate\");\n _setupRole(DEFAULT_ADMIN_ROLE, _owner);\n _setupRole(MANAGER_ROLE, _owner);\n }\n\n /**\n * @notice accepts safe ERC721 transfer\n */\n function onERC721Received(\n address,\n address,\n uint256,\n bytes calldata\n )\n external\n override\n returns (bytes4)\n {\n return IERC721Receiver.onERC721Received.selector;\n }\n\n /**\n * @notice Lock ERC721 token(s) for deposit, callable only by manager\n * @param depositor Address who wants to deposit token\n * @param depositReceiver Address (address) who wants to receive token on child chain\n * @param rootToken Token which gets deposited\n * @param depositData ABI encoded tokenId(s). It's possible to deposit batch of tokens.\n */\n function lockTokens(\n address depositor,\n address depositReceiver,\n address rootToken,\n bytes calldata depositData\n )\n external\n override\n only(MANAGER_ROLE)\n {\n\n // Locking single ERC721 token\n if (depositData.length == 32) {\n\n uint256 tokenId = abi.decode(depositData, (uint256));\n\n // Emitting event that single token is getting locked in predicate\n emit LockedMintableERC721(depositor, depositReceiver, rootToken, tokenId);\n\n // Transferring token to this address, which will be\n // released when attempted to be unlocked\n IMintableERC721(rootToken).safeTransferFrom(depositor, address(this), tokenId);\n\n } else {\n // Locking a set a ERC721 token(s)\n\n uint256[] memory tokenIds = abi.decode(depositData, (uint256[]));\n\n // Emitting event that a set of ERC721 tokens are getting lockec\n // in this predicate contract\n emit LockedMintableERC721Batch(depositor, depositReceiver, rootToken, tokenIds);\n\n // These many tokens are attempted to be deposited\n // by user\n uint256 length = tokenIds.length;\n require(length <= BATCH_LIMIT, \"MintableERC721Predicate: EXCEEDS_BATCH_LIMIT\");\n\n // Iteratively trying to transfer ERC721 token\n // to this predicate address\n for (uint256 i; i < length; i++) {\n\n IMintableERC721(rootToken).safeTransferFrom(depositor, address(this), tokenIds[i]);\n\n }\n\n }\n\n }\n\n /**\n * @notice Validates log signature, from and to address\n * then checks if token already exists on root chain\n * if token exits then transfers it to withdrawer\n * if token doesn't exit then it is minted\n * callable only by manager\n * @param rootToken Token which gets withdrawn\n * @param log Valid ERC721 burn log from child chain\n */\n function exitTokens(\n address,\n address rootToken,\n bytes memory log\n )\n public\n override\n only(MANAGER_ROLE)\n {\n RLPReader.RLPItem[] memory logRLPList = log.toRlpItem().toList();\n RLPReader.RLPItem[] memory logTopicRLPList = logRLPList[1].toList(); // topics\n\n // If it's a simple exit ( with out metadata coming from L2 to L1 )\n if(bytes32(logTopicRLPList[0].toUint()) == TRANSFER_EVENT_SIG) {\n\n address withdrawer = address(logTopicRLPList[1].toUint()); // topic1 is from address\n\n require(\n address(logTopicRLPList[2].toUint()) == address(0), // topic2 is to address\n \"MintableERC721Predicate: INVALID_RECEIVER\"\n );\n\n IMintableERC721 token = IMintableERC721(rootToken);\n\n uint256 tokenId = logTopicRLPList[3].toUint(); // topic3 is tokenId field\n if (token.exists(tokenId)) {\n token.safeTransferFrom(\n address(this),\n withdrawer,\n tokenId\n );\n } else {\n token.mint(withdrawer, tokenId);\n }\n\n } else if (bytes32(logTopicRLPList[0].toUint()) == WITHDRAW_BATCH_EVENT_SIG) { // topic0 is event sig\n // If it's a simple batch exit, where a set of\n // ERC721s were burnt in child chain with event signature\n // looking like `WithdrawnBatch(address indexed user, uint256[] tokenIds);`\n //\n // @note This doesn't allow transfer of metadata cross chain\n // For that check below `else if` block\n\n address withdrawer = address(logTopicRLPList[1].toUint()); // topic1 is from address\n\n // RLP encoded tokenId list\n bytes memory logData = logRLPList[2].toBytes();\n\n (uint256[] memory tokenIds) = abi.decode(logData, (uint256[]));\n uint256 length = tokenIds.length;\n\n IMintableERC721 token = IMintableERC721(rootToken);\n\n for (uint256 i; i < length; i++) {\n\n uint256 tokenId = tokenIds[i];\n\n // Check if token exists or not\n //\n // If does, transfer token to withdrawer\n if (token.exists(tokenId)) {\n token.safeTransferFrom(\n address(this),\n withdrawer,\n tokenId\n );\n } else {\n // If token was minted on L2\n // we'll mint it here, on L1, during\n // exiting from L2\n token.mint(withdrawer, tokenId);\n }\n\n }\n\n } else if (bytes32(logTopicRLPList[0].toUint()) == TRANSFER_WITH_METADATA_EVENT_SIG) { \n // If this is NFT exit with metadata i.e. URI 👆\n //\n // Note: If your token is only minted in L2, you can exit\n // it with metadata. But if it was minted on L1, it'll be\n // simply transferred to withdrawer address. And in that case,\n // it's lot better to exit with `Transfer(address,address,uint256)`\n // i.e. calling `withdraw` method on L2 contract\n // event signature proof, which is defined under first `if` clause\n //\n // If you've called `withdrawWithMetadata`, you should submit\n // proof of event signature `TransferWithMetadata(address,address,uint256,bytes)`\n\n address withdrawer = address(logTopicRLPList[1].toUint()); // topic1 is from address\n\n require(\n address(logTopicRLPList[2].toUint()) == address(0), // topic2 is to address\n \"MintableERC721Predicate: INVALID_RECEIVER\"\n );\n\n IMintableERC721 token = IMintableERC721(rootToken);\n\n uint256 tokenId = logTopicRLPList[3].toUint(); // topic3 is tokenId field\n if (token.exists(tokenId)) {\n token.safeTransferFrom(\n address(this),\n withdrawer,\n tokenId\n );\n } else {\n // Minting with metadata received from L2 i.e. emitted\n // by event `TransferWithMetadata` during burning\n bytes memory logData = logRLPList[2].toBytes();\n bytes memory metaData = abi.decode(logData, (bytes));\n \n token.mint(withdrawer, tokenId, metaData);\n }\n\n } else {\n // Attempting to exit with some event signature from L2, which is\n // not ( yet ) supported by L1 exit manager\n revert(\"MintableERC721Predicate: INVALID_SIGNATURE\");\n }\n \n }\n}\n" + }, + "contracts/Libraries/matic/test/ProxyTestImplStorageLayoutChange.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {Initializable} from \"../common/Initializable.sol\";\n\ncontract ProxyTestImplStorageLayoutChange is Initializable {\n uint256 public b;\n uint256 public a;\n}\n" + }, + "contracts/Libraries/matic/test/ProxyTestImpl.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {Initializable} from \"../common/Initializable.sol\";\n\ncontract ProxyTestImpl is Initializable {\n uint256 public a = 1;\n uint256 public b = 2;\n uint256 public ctorInit;\n\n constructor() public {\n ctorInit = 3;\n }\n\n function init() public initializer {\n a = 1;\n b = 2;\n }\n}\n" + }, + "contracts/Libraries/matic/root/TokenPredicates/MintableERC20Predicate.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {IMintableERC20} from \"../RootToken/IMintableERC20.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\nimport {RLPReader} from \"../../lib/RLPReader.sol\";\nimport {ITokenPredicate} from \"./ITokenPredicate.sol\";\nimport {Initializable} from \"../../common/Initializable.sol\";\n\ncontract MintableERC20Predicate is\n ITokenPredicate,\n AccessControlMixin,\n Initializable\n{\n using RLPReader for bytes;\n using RLPReader for RLPReader.RLPItem;\n\n bytes32 public constant MANAGER_ROLE = keccak256(\"MANAGER_ROLE\");\n bytes32 public constant TOKEN_TYPE = keccak256(\"MintableERC20\");\n bytes32 public constant TRANSFER_EVENT_SIG = keccak256(\n \"Transfer(address,address,uint256)\"\n );\n\n event LockedMintableERC20(\n address indexed depositor,\n address indexed depositReceiver,\n address indexed rootToken,\n uint256 amount\n );\n\n constructor() public {}\n\n function initialize(address _owner) external initializer {\n _setupContractId(\"MintableERC20Predicate\");\n _setupRole(DEFAULT_ADMIN_ROLE, _owner);\n _setupRole(MANAGER_ROLE, _owner);\n }\n\n /**\n * @notice Lock ERC20 tokens for deposit, callable only by manager\n * @param depositor Address who wants to deposit tokens\n * @param depositReceiver Address (address) who wants to receive tokens on child chain\n * @param rootToken Token which gets deposited\n * @param depositData ABI encoded amount\n */\n function lockTokens(\n address depositor,\n address depositReceiver,\n address rootToken,\n bytes calldata depositData\n ) external override only(MANAGER_ROLE) {\n uint256 amount = abi.decode(depositData, (uint256));\n\n emit LockedMintableERC20(depositor, depositReceiver, rootToken, amount);\n IMintableERC20(rootToken).transferFrom(\n depositor,\n address(this),\n amount\n );\n }\n\n /**\n * @notice Validates log signature, from and to address\n * then sends the correct amount to withdrawer\n * callable only by manager\n * @param rootToken Token which gets withdrawn\n * @param log Valid ERC20 burn log from child chain\n */\n function exitTokens(\n address,\n address rootToken,\n bytes memory log\n ) public override only(MANAGER_ROLE) {\n RLPReader.RLPItem[] memory logRLPList = log.toRlpItem().toList();\n RLPReader.RLPItem[] memory logTopicRLPList = logRLPList[1].toList(); // topics\n\n require(\n bytes32(logTopicRLPList[0].toUint()) == TRANSFER_EVENT_SIG, // topic0 is `Transfer` event sig\n \"MintableERC20Predicate: INVALID_SIGNATURE\"\n );\n\n address withdrawer = address(logTopicRLPList[1].toUint()); // topic1 is `from` address\n\n require(\n address(logTopicRLPList[2].toUint()) == address(0), // topic2 is `to` address\n \"MintableERC20Predicate: INVALID_RECEIVER\"\n );\n\n IMintableERC20 token = IMintableERC20(rootToken);\n\n uint256 tokenBalance = token.balanceOf(address(this));\n uint256 amount = logRLPList[2].toUint();\n\n // Checking whether MintableERC20Predicate has enough balance\n // to transfer `amount` to withdrawer or not\n //\n // If no, it'll mint those extra tokens & transfer `amount`\n // to withdrawer\n if (tokenBalance < amount) {\n token.mint(address(this), amount - tokenBalance);\n }\n\n token.transfer(withdrawer, amount);\n }\n}\n" + }, + "contracts/Libraries/matic/root/RootToken/IMintableERC20.sol": { + "content": "import {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\npragma solidity 0.6.6;\n\ninterface IMintableERC20 is IERC20 {\n /**\n * @notice called by predicate contract to mint tokens while withdrawing\n * @dev Should be callable only by MintableERC20Predicate\n * Make sure minting is done only by this function\n * @param user user address for whom token is being minted\n * @param amount amount of token being minted\n */\n function mint(address user, uint256 amount) external;\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n" + }, + "contracts/Libraries/matic/root/TokenPredicates/MintableERC1155Predicate.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {IMintableERC1155} from \"../RootToken/IMintableERC1155.sol\";\nimport {\n ERC1155Receiver\n} from \"@openzeppelin/contracts/token/ERC1155/ERC1155Receiver.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\nimport {RLPReader} from \"../../lib/RLPReader.sol\";\nimport {ITokenPredicate} from \"./ITokenPredicate.sol\";\nimport {Initializable} from \"../../common/Initializable.sol\";\n\ncontract MintableERC1155Predicate is\n ITokenPredicate,\n ERC1155Receiver,\n AccessControlMixin,\n Initializable\n{\n using RLPReader for bytes;\n using RLPReader for RLPReader.RLPItem;\n\n bytes32 public constant MANAGER_ROLE = keccak256(\"MANAGER_ROLE\");\n bytes32 public constant TOKEN_TYPE = keccak256(\"MintableERC1155\");\n\n bytes32 public constant TRANSFER_SINGLE_EVENT_SIG = keccak256(\n \"TransferSingle(address,address,address,uint256,uint256)\"\n );\n bytes32 public constant TRANSFER_BATCH_EVENT_SIG = keccak256(\n \"TransferBatch(address,address,address,uint256[],uint256[])\"\n );\n\n event LockedBatchMintableERC1155(\n address indexed depositor,\n address indexed depositReceiver,\n address indexed rootToken,\n uint256[] ids,\n uint256[] amounts\n );\n\n constructor() public {}\n\n function initialize(address _owner) external initializer {\n _setupContractId(\"MintableERC1155Predicate\");\n _setupRole(DEFAULT_ADMIN_ROLE, _owner);\n _setupRole(MANAGER_ROLE, _owner);\n }\n\n /**\n * @notice rejects single transfer\n */\n function onERC1155Received(\n address,\n address,\n uint256,\n uint256,\n bytes calldata\n ) external override returns (bytes4) {\n return 0;\n }\n\n /**\n * @notice accepts batch transfer\n */\n function onERC1155BatchReceived(\n address,\n address,\n uint256[] calldata,\n uint256[] calldata,\n bytes calldata\n ) external override returns (bytes4) {\n return ERC1155Receiver(0).onERC1155BatchReceived.selector;\n }\n\n /**\n * @notice Lock ERC1155 tokens for deposit, callable only by manager\n * @param depositor Address who wants to deposit tokens\n * @param depositReceiver Address (address) who wants to receive tokens on child chain\n * @param rootToken Token which gets deposited\n * @param depositData ABI encoded id array and amount array\n */\n function lockTokens(\n address depositor,\n address depositReceiver,\n address rootToken,\n bytes calldata depositData\n ) external override only(MANAGER_ROLE) {\n // forcing batch deposit since supporting both single and batch deposit introduces too much complexity\n (\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n ) = abi.decode(depositData, (uint256[], uint256[], bytes));\n\n emit LockedBatchMintableERC1155(\n depositor,\n depositReceiver,\n rootToken,\n ids,\n amounts\n );\n IMintableERC1155(rootToken).safeBatchTransferFrom(\n depositor,\n address(this),\n ids,\n amounts,\n data\n );\n }\n \n // Used when attempting to exit with single token, single amount/ id is converted into\n // slice of amounts/ ids\n // Generally size is going to be `1` i.e. single element array, but it's kept generic\n function makeArrayWithValue(uint256 val, uint size) internal pure returns(uint256[] memory) {\n require(\n size > 0,\n \"MintableERC1155Predicate: Invalid resulting array length\"\n );\n\n uint256[] memory vals = new uint256[](size);\n\n for (uint256 i = 0; i < size; i++) {\n vals[i] = val;\n }\n\n return vals;\n }\n\n /**\n * @notice Creates an array of `size` by repeating provided address,\n * to be required for passing to batch balance checking function of ERC1155 tokens.\n * @param addr Address to be repeated `size` times in resulting array\n * @param size Size of resulting array\n */\n function makeArrayWithAddress(address addr, uint256 size)\n internal\n pure\n returns (address[] memory)\n {\n require(\n addr != address(0),\n \"MintableERC1155Predicate: Invalid address\"\n );\n require(\n size > 0,\n \"MintableERC1155Predicate: Invalid resulting array length\"\n );\n\n address[] memory addresses = new address[](size);\n\n for (uint256 i = 0; i < size; i++) {\n addresses[i] = addr;\n }\n\n return addresses;\n }\n\n /**\n * @notice Calculates amount of tokens to be minted, by subtracting available\n * token balances from amount of tokens to be exited\n * @param tokenBalances Token balances this contract holds for some ordered token ids\n * @param amountsToBeExited Amount of tokens being exited\n */\n function calculateAmountsToBeMinted(\n uint256[] memory tokenBalances,\n uint256[] memory amountsToBeExited\n ) internal pure returns (uint256[] memory) {\n require(\n tokenBalances.length == amountsToBeExited.length,\n \"MintableERC1155Predicate: Array length mismatch found\"\n );\n\n uint256[] memory toBeMintedAmounts = new uint256[](\n tokenBalances.length\n );\n\n // Iteratively calculating amounts of token to be minted\n //\n // Please note, in some cases it can be 0, but that will not\n // be a problem, due to implementation of mint logic for ERC1155\n for (uint256 i = 0; i < tokenBalances.length; i++) {\n if (tokenBalances[i] < amountsToBeExited[i]) {\n toBeMintedAmounts[i] = amountsToBeExited[i] - tokenBalances[i];\n }\n }\n\n return toBeMintedAmounts;\n }\n\n /**\n * @notice Validates log signature, from and to address\n * then sends the correct tokenId, amount to withdrawer\n * callable only by manager\n * @param rootToken Token which gets withdrawn\n * @param log Valid ERC1155 TransferSingle burn or TransferBatch burn log from child chain\n */\n function exitTokens(\n address,\n address rootToken,\n bytes memory log\n ) public override only(MANAGER_ROLE) {\n RLPReader.RLPItem[] memory logRLPList = log.toRlpItem().toList();\n RLPReader.RLPItem[] memory logTopicRLPList = logRLPList[1].toList(); // topics\n bytes memory logData = logRLPList[2].toBytes();\n\n address withdrawer = address(logTopicRLPList[2].toUint()); // topic2 is from address\n\n require(\n address(logTopicRLPList[3].toUint()) == address(0), // topic3 is to address\n \"MintableERC1155Predicate: INVALID_RECEIVER\"\n );\n\n if (bytes32(logTopicRLPList[0].toUint()) == TRANSFER_SINGLE_EVENT_SIG) {\n // topic0 is event sig\n (uint256 id, uint256 amount) = abi.decode(\n logData,\n (uint256, uint256)\n );\n\n IMintableERC1155 token = IMintableERC1155(rootToken);\n // Currently locked tokens for `id` in this contract\n uint256 tokenBalance = token.balanceOf(address(this), id);\n\n // Checking whether MintableERC1155 contract has enough\n // tokens locked in to transfer to withdrawer, if not\n // it'll mint those tokens for this contract and return\n // safely transfer those to withdrawer\n if (tokenBalance < amount) {\n // @notice We could have done `mint`, but that would require\n // us implementing `onERC1155Received`, which we avoid intentionally\n // for sake of only supporting batch deposit.\n //\n // Which is why this transfer is wrapped as single element batch minting\n token.mintBatch(address(this), \n makeArrayWithValue(id, 1), \n makeArrayWithValue(amount - tokenBalance, 1), \n bytes(\"\"));\n }\n\n token.safeTransferFrom(\n address(this),\n withdrawer,\n id,\n amount,\n bytes(\"\")\n );\n } else if (\n bytes32(logTopicRLPList[0].toUint()) == TRANSFER_BATCH_EVENT_SIG\n ) {\n (uint256[] memory ids, uint256[] memory amounts) = abi.decode(\n logData,\n (uint256[], uint256[])\n );\n\n IMintableERC1155 token = IMintableERC1155(rootToken);\n\n token.mintBatch(\n address(this),\n ids,\n calculateAmountsToBeMinted(\n token.balanceOfBatch(\n makeArrayWithAddress(address(this), ids.length),\n ids\n ),\n amounts\n ),\n bytes(\"\")\n );\n\n IMintableERC1155(rootToken).safeBatchTransferFrom(\n address(this),\n withdrawer,\n ids,\n amounts,\n bytes(\"\")\n );\n } else {\n revert(\"MintableERC1155Predicate: INVALID_WITHDRAW_SIG\");\n }\n }\n}\n" + }, + "contracts/Libraries/matic/root/RootToken/IMintableERC1155.sol": { + "content": "import {IERC1155} from \"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\";\n\npragma solidity 0.6.6;\n\ninterface IMintableERC1155 is IERC1155 {\n /**\n * @notice Creates `amount` tokens of token type `id`, and assigns them to `account`.\n * @dev Should be callable only by MintableERC1155Predicate\n * Make sure minting is done only by this function\n * @param account user address for whom token is being minted\n * @param id token which is being minted\n * @param amount amount of token being minted\n * @param data extra byte data to be accompanied with minted tokens\n */\n function mint(address account, uint256 id, uint256 amount, bytes calldata data) external;\n\n /**\n * @notice Batched version of singular token minting, where\n * for each token in `ids` respective amount to be minted from `amounts`\n * array, for address `to`.\n * @dev Should be callable only by MintableERC1155Predicate\n * Make sure minting is done only by this function\n * @param to user address for whom token is being minted\n * @param ids tokens which are being minted\n * @param amounts amount of each token being minted\n * @param data extra byte data to be accompanied with minted tokens\n */\n function mintBatch(address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data) external;\n}\n" + }, + "@openzeppelin/contracts/token/ERC1155/ERC1155Receiver.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"./IERC1155Receiver.sol\";\nimport \"../../introspection/ERC165.sol\";\n\n/**\n * @dev _Available since v3.1._\n */\nabstract contract ERC1155Receiver is ERC165, IERC1155Receiver {\n constructor() internal {\n _registerInterface(\n ERC1155Receiver(address(0)).onERC1155Received.selector ^\n ERC1155Receiver(address(0)).onERC1155BatchReceived.selector\n );\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC1155/IERC1155.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.2 <0.8.0;\n\nimport \"../../introspection/IERC165.sol\";\n\n/**\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\n *\n * _Available since v3.1._\n */\ninterface IERC1155 is IERC165 {\n /**\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\n */\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\n\n /**\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\n * transfers.\n */\n event TransferBatch(address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values);\n\n /**\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\n * `approved`.\n */\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\n\n /**\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\n *\n * If an {URI} event was emitted for `id`, the standard\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\n * returned by {IERC1155MetadataURI-uri}.\n */\n event URI(string value, uint256 indexed id);\n\n /**\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function balanceOf(address account, uint256 id) external view returns (uint256);\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\n *\n * Requirements:\n *\n * - `accounts` and `ids` must have the same length.\n */\n function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory);\n\n /**\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\n *\n * Emits an {ApprovalForAll} event.\n *\n * Requirements:\n *\n * - `operator` cannot be the caller.\n */\n function setApprovalForAll(address operator, bool approved) external;\n\n /**\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\n *\n * See {setApprovalForAll}.\n */\n function isApprovedForAll(address account, address operator) external view returns (bool);\n\n /**\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\n *\n * Emits a {TransferSingle} event.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}.\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\n * acceptance magic value.\n */\n function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\n *\n * Emits a {TransferBatch} event.\n *\n * Requirements:\n *\n * - `ids` and `amounts` must have the same length.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\n * acceptance magic value.\n */\n function safeBatchTransferFrom(address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data) external;\n}\n" + }, + "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"../../introspection/IERC165.sol\";\n\n/**\n * _Available since v3.1._\n */\ninterface IERC1155Receiver is IERC165 {\n\n /**\n @dev Handles the receipt of a single ERC1155 token type. This function is\n called at the end of a `safeTransferFrom` after the balance has been updated.\n To accept the transfer, this must return\n `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))`\n (i.e. 0xf23a6e61, or its own function selector).\n @param operator The address which initiated the transfer (i.e. msg.sender)\n @param from The address which previously owned the token\n @param id The ID of the token being transferred\n @param value The amount of tokens being transferred\n @param data Additional data with no specified format\n @return `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))` if transfer is allowed\n */\n function onERC1155Received(\n address operator,\n address from,\n uint256 id,\n uint256 value,\n bytes calldata data\n )\n external\n returns(bytes4);\n\n /**\n @dev Handles the receipt of a multiple ERC1155 token types. This function\n is called at the end of a `safeBatchTransferFrom` after the balances have\n been updated. To accept the transfer(s), this must return\n `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))`\n (i.e. 0xbc197c81, or its own function selector).\n @param operator The address which initiated the batch transfer (i.e. msg.sender)\n @param from The address which previously owned the token\n @param ids An array containing ids of each token being transferred (order and length must match values array)\n @param values An array containing amounts of each token being transferred (order and length must match ids array)\n @param data Additional data with no specified format\n @return `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))` if transfer is allowed\n */\n function onERC1155BatchReceived(\n address operator,\n address from,\n uint256[] calldata ids,\n uint256[] calldata values,\n bytes calldata data\n )\n external\n returns(bytes4);\n}\n" + }, + "contracts/Libraries/matic/test/MerklePatriciaTest.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {MerklePatriciaProof} from \"../lib/MerklePatriciaProof.sol\";\nimport {RLPReader} from \"../lib/RLPReader.sol\";\n\ncontract MerklePatriciaTest {\n using RLPReader for bytes;\n using RLPReader for RLPReader.RLPItem;\n\n function verify(uint receiptRoot, bytes calldata receipt, bytes calldata receiptProof, bytes calldata branchMask) external pure returns(bool) {\n\n return MerklePatriciaProof.verify(\n receipt, // receipt\n branchMask, // branchMask\n receiptProof, // receiptProof\n bytes32(receiptRoot) // receiptRoot\n );\n }\n}\n" + }, + "contracts/Libraries/matic/root/TokenPredicates/EtherPredicate.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\nimport {RLPReader} from \"../../lib/RLPReader.sol\";\nimport {ITokenPredicate} from \"./ITokenPredicate.sol\";\nimport {Initializable} from \"../../common/Initializable.sol\";\n\ncontract EtherPredicate is ITokenPredicate, AccessControlMixin, Initializable {\n using RLPReader for bytes;\n using RLPReader for RLPReader.RLPItem;\n\n bytes32 public constant MANAGER_ROLE = keccak256(\"MANAGER_ROLE\");\n bytes32 public constant TOKEN_TYPE = keccak256(\"Ether\");\n bytes32 public constant TRANSFER_EVENT_SIG = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef;\n\n event LockedEther(\n address indexed depositor,\n address indexed depositReceiver,\n uint256 amount\n );\n\n event ExitedEther(\n address indexed exitor,\n uint256 amount\n );\n\n constructor() public {}\n\n function initialize(address _owner) external initializer {\n _setupContractId(\"EtherPredicate\");\n _setupRole(DEFAULT_ADMIN_ROLE, _owner);\n _setupRole(MANAGER_ROLE, _owner);\n }\n\n /**\n * @notice Receive Ether to lock for deposit, callable only by manager\n */\n receive() external payable only(MANAGER_ROLE) {}\n\n /**\n * @notice handle ether lock, callable only by manager\n * @param depositor Address who wants to deposit tokens\n * @param depositReceiver Address (address) who wants to receive tokens on child chain\n * @param depositData ABI encoded amount\n */\n function lockTokens(\n address depositor,\n address depositReceiver,\n address,\n bytes calldata depositData\n )\n external\n override\n only(MANAGER_ROLE)\n {\n uint256 amount = abi.decode(depositData, (uint256));\n emit LockedEther(depositor, depositReceiver, amount);\n }\n\n /**\n * @notice Validates log signature, from and to address\n * then sends the correct amount to withdrawer\n * callable only by manager\n * @param log Valid ERC20 burn log from child chain\n */\n function exitTokens(\n address,\n address,\n bytes memory log\n )\n public\n override\n only(MANAGER_ROLE)\n {\n RLPReader.RLPItem[] memory logRLPList = log.toRlpItem().toList();\n RLPReader.RLPItem[] memory logTopicRLPList = logRLPList[1].toList(); // topics\n\n require(\n bytes32(logTopicRLPList[0].toUint()) == TRANSFER_EVENT_SIG, // topic0 is event sig\n \"EtherPredicate: INVALID_SIGNATURE\"\n );\n\n address withdrawer = address(logTopicRLPList[1].toUint()); // topic1 is from address\n\n require(\n address(logTopicRLPList[2].toUint()) == address(0), // topic2 is to address\n \"EtherPredicate: INVALID_RECEIVER\"\n );\n\n emit ExitedEther(withdrawer, logRLPList[2].toUint());\n\n payable(withdrawer).transfer(logRLPList[2].toUint());\n }\n}\n" + }, + "contracts/Libraries/matic/tunnel/BaseChildTunnel.sol": { + "content": "pragma solidity 0.6.6;\n\n\nimport {AccessControlMixin} from \"../common/AccessControlMixin.sol\";\n\n/**\n* @notice Mock child tunnel contract to receive and send message from L2\n*/\nabstract contract BaseChildTunnel is AccessControlMixin {\n bytes32 public constant STATE_SYNCER_ROLE = keccak256(\"STATE_SYNCER_ROLE\");\n\n // MessageTunnel on L1 will get data from this event\n event MessageSent(bytes message);\n\n constructor() internal {\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\n _setupRole(STATE_SYNCER_ROLE, 0x0000000000000000000000000000000000001001);\n _setupContractId(\"ChildTunnel\");\n }\n\n /**\n * @notice Receive state sync from matic contracts\n * @dev This method will be called by Matic chain internally.\n * This is executed without transaction using a system call.\n */\n function onStateReceive(uint256, bytes memory message) public only(STATE_SYNCER_ROLE) {\n _processMessageFromRoot(message);\n }\n\n /**\n * @notice Emit message that can be received on Root Tunnel\n * @dev Call the internal function when need to emit message\n * @param message bytes message that will be sent to Root Tunnel\n * some message examples -\n * abi.encode(tokenId);\n * abi.encode(tokenId, tokenMetadata);\n * abi.encode(messageType, messageData);\n */\n function _sendMessageToRoot(bytes memory message) internal {\n emit MessageSent(message);\n }\n\n /**\n * @notice Process message received from Root Tunnel\n * @dev function needs to be implemented to handle message as per requirement\n * This is called by onStateReceive function.\n * Since it is called via a system call, any event will not be emitted during its execution.\n * @param message bytes message that was sent from Root Tunnel\n */\n function _processMessageFromRoot(bytes memory message) virtual internal;\n}\n" + }, + "contracts/Libraries/matic/tunnel/ChildTunnel.sol": { + "content": "pragma solidity ^0.6.6;\n\nimport {BaseChildTunnel} from \"./BaseChildTunnel.sol\";\n\n\ncontract ChildTunnel is BaseChildTunnel {\n function _processMessageFromRoot(bytes memory message) internal override {\n // implement your core logic here\n }\n}\n" + }, + "contracts/Libraries/matic/test/TestChildTunnel.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {BaseChildTunnel} from \"../tunnel/BaseChildTunnel.sol\";\n\ncontract TestChildTunnel is BaseChildTunnel {\n uint256 public number;\n\n bytes32 public constant TYPE1 = keccak256(\"TYPE1\");\n bytes32 public constant TYPE2 = keccak256(\"TYPE2\");\n\n function _processMessageFromRoot(bytes memory message) internal override {\n (bytes32 syncType, uint256 n) = abi.decode(\n message,\n (bytes32, uint256)\n );\n\n if (TYPE1 == syncType) {\n number = number + n; // add\n } else if (TYPE2 == syncType) {\n number = number - n; // sub\n }\n }\n\n function sendMessage(bytes calldata message) external {\n _sendMessageToRoot(message);\n }\n}\n" + }, + "contracts/Libraries/matic/root/TokenPredicates/ERC721Predicate.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {IRootERC721} from \"../RootToken/IRootERC721.sol\";\nimport {IERC721Receiver} from \"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\";\nimport {RLPReader} from \"../../lib/RLPReader.sol\";\nimport {ITokenPredicate} from \"./ITokenPredicate.sol\";\nimport {Initializable} from \"../../common/Initializable.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\n\ncontract ERC721Predicate is ITokenPredicate, AccessControlMixin, Initializable, IERC721Receiver {\n using RLPReader for bytes;\n using RLPReader for RLPReader.RLPItem;\n\n bytes32 public constant MANAGER_ROLE = keccak256(\"MANAGER_ROLE\");\n bytes32 public constant TOKEN_TYPE = keccak256(\"ERC721\");\n // keccak256(\"Transfer(address,address,uint256)\")\n bytes32 public constant TRANSFER_EVENT_SIG = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef;\n // keccak256(\"WithdrawnBatch(address,uint256[])\")\n bytes32 public constant WITHDRAW_BATCH_EVENT_SIG = 0xf871896b17e9cb7a64941c62c188a4f5c621b86800e3d15452ece01ce56073df;\n // keccak256(\"TransferWithMetadata(address,address,uint256,bytes)\")\n bytes32 public constant TRANSFER_WITH_METADATA_EVENT_SIG = 0xf94915c6d1fd521cee85359239227480c7e8776d7caf1fc3bacad5c269b66a14;\n\n // limit batching of tokens due to gas limit restrictions\n uint256 public constant BATCH_LIMIT = 20;\n\n event LockedERC721(\n address indexed depositor,\n address indexed depositReceiver,\n address indexed rootToken,\n uint256 tokenId\n );\n event LockedERC721Batch(\n address indexed depositor,\n address indexed depositReceiver,\n address indexed rootToken,\n uint256[] tokenIds\n );\n\n constructor() public {}\n\n function initialize(address _owner) external initializer {\n _setupContractId(\"ERC721Predicate\");\n _setupRole(DEFAULT_ADMIN_ROLE, _owner);\n _setupRole(MANAGER_ROLE, _owner);\n }\n\n /**\n * @notice accepts safe ERC721 transfer\n */\n function onERC721Received(\n address,\n address,\n uint256,\n bytes calldata\n )\n external\n override\n returns (bytes4)\n {\n return IERC721Receiver.onERC721Received.selector;\n }\n\n /**\n * @notice Lock ERC721 tokens for deposit, callable only by manager\n * @param depositor Address who wants to deposit token\n * @param depositReceiver Address (address) who wants to receive token on child chain\n * @param rootToken Token which gets deposited\n * @param depositData ABI encoded tokenId\n */\n function lockTokens(\n address depositor,\n address depositReceiver,\n address rootToken,\n bytes calldata depositData\n )\n external\n override\n only(MANAGER_ROLE)\n {\n // deposit single\n if (depositData.length == 32) {\n uint256 tokenId = abi.decode(depositData, (uint256));\n emit LockedERC721(depositor, depositReceiver, rootToken, tokenId);\n IRootERC721(rootToken).safeTransferFrom(depositor, address(this), tokenId);\n\n // deposit batch\n } else {\n uint256[] memory tokenIds = abi.decode(depositData, (uint256[]));\n emit LockedERC721Batch(depositor, depositReceiver, rootToken, tokenIds);\n uint256 length = tokenIds.length;\n require(length <= BATCH_LIMIT, \"ERC721Predicate: EXCEEDS_BATCH_LIMIT\");\n for (uint256 i; i < length; i++) {\n IRootERC721(rootToken).safeTransferFrom(depositor, address(this), tokenIds[i]);\n }\n }\n }\n\n /**\n * @notice Validates log signature, from and to address\n * then sends the correct tokenId to withdrawer\n * callable only by manager\n * @param rootToken Token which gets withdrawn\n * @param log Valid ERC721 burn log from child chain\n */\n function exitTokens(\n address,\n address rootToken,\n bytes memory log\n )\n public\n override\n only(MANAGER_ROLE)\n {\n RLPReader.RLPItem[] memory logRLPList = log.toRlpItem().toList();\n RLPReader.RLPItem[] memory logTopicRLPList = logRLPList[1].toList(); // topics\n address withdrawer = address(logTopicRLPList[1].toUint()); // topic1 is from address\n\n if (bytes32(logTopicRLPList[0].toUint()) == TRANSFER_EVENT_SIG) { // topic0 is event sig\n require(\n address(logTopicRLPList[2].toUint()) == address(0), // topic2 is to address\n \"ERC721Predicate: INVALID_RECEIVER\"\n );\n\n IRootERC721(rootToken).safeTransferFrom(\n address(this),\n withdrawer,\n logTopicRLPList[3].toUint() // topic3 is tokenId field\n );\n\n } else if (bytes32(logTopicRLPList[0].toUint()) == WITHDRAW_BATCH_EVENT_SIG) { // topic0 is event sig\n bytes memory logData = logRLPList[2].toBytes();\n (uint256[] memory tokenIds) = abi.decode(logData, (uint256[])); // data is tokenId list\n uint256 length = tokenIds.length;\n for (uint256 i; i < length; i++) {\n IRootERC721(rootToken).safeTransferFrom(address(this), withdrawer, tokenIds[i]);\n }\n\n } else if (bytes32(logTopicRLPList[0].toUint()) == TRANSFER_WITH_METADATA_EVENT_SIG) { \n // If this is when NFT exit is done with arbitrary metadata on L2\n\n require(\n address(logTopicRLPList[2].toUint()) == address(0), // topic2 is to address\n \"ERC721Predicate: INVALID_RECEIVER\"\n );\n\n IRootERC721 token = IRootERC721(rootToken);\n uint256 tokenId = logTopicRLPList[3].toUint(); // topic3 is tokenId field\n\n token.safeTransferFrom(address(this), withdrawer, tokenId);\n // This function will be invoked for passing arbitrary\n // metadata, obtained from event emitted in L2, to\n // L1 ERC721, so that it can decode & do further processing\n //\n // @note Make sure you've implemented this method\n // if you're interested in exiting with metadata\n bytes memory logData = logRLPList[2].toBytes();\n bytes memory metaData = abi.decode(logData, (bytes));\n\n token.setTokenMetadata(tokenId, metaData);\n\n } else {\n revert(\"ERC721Predicate: INVALID_SIGNATURE\");\n }\n }\n}\n" + }, + "contracts/Libraries/matic/root/RootToken/IRootERC721.sol": { + "content": "import {IERC721} from \"@openzeppelin/contracts/token/ERC721/IERC721.sol\";\n\npragma solidity 0.6.6;\n\ninterface IRootERC721 is IERC721 {\n\n // Make sure you implement this method is root ERC721\n // contract when you're interested in transferring\n // metadata from L2 to L1\n function setTokenMetadata(uint256 tokenId, bytes calldata data) external;\n\n}\n" + }, + "contracts/Libraries/matic/root/RootToken/DummyERC721.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {ERC721} from \"@openzeppelin/contracts/token/ERC721/ERC721.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\nimport {NativeMetaTransaction} from \"../../common/NativeMetaTransaction.sol\";\nimport {IRootERC721} from \"./IRootERC721.sol\";\nimport {ContextMixin} from \"../../common/ContextMixin.sol\";\n\ncontract DummyERC721 is\n ERC721,\n AccessControlMixin,\n NativeMetaTransaction,\n IRootERC721,\n ContextMixin\n{\n bytes32 public constant PREDICATE_ROLE = keccak256(\"PREDICATE_ROLE\");\n constructor(string memory name_, string memory symbol_)\n public\n ERC721(name_, symbol_)\n {\n _setupContractId(\"DummyERC721\");\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n _setupRole(PREDICATE_ROLE, _msgSender());\n _initializeEIP712(name_);\n }\n\n function mint(uint256 tokenId) public {\n _mint(_msgSender(), tokenId);\n }\n\n /**\n * If you're attempting to bring metadata associated with token\n * from L2 to L1, you must implement this method\n *\n * To be invoked when attempting to exit ERC721 with metadata from L2\n *\n * `data` is nothing but arbitrary byte array which\n * is brought in L1, by event emitted in L2, during withdraw\n *\n * Make sure this method is always callable by Predicate contract\n * who will invoke it when attempting to exit with metadata\n */\n function setTokenMetadata(uint256 tokenId, bytes calldata data) external override only(PREDICATE_ROLE) {\n // This function should decode metadata obtained from L2\n // and attempt to set it for this `tokenId`\n //\n // Following is just a default implementation, feel\n // free to define your own encoding/ decoding scheme\n // for L2 -> L1 token metadata transfer\n string memory uri = abi.decode(data, (string));\n\n _setTokenURI(tokenId, uri);\n }\n\n function _msgSender()\n internal\n override\n view\n returns (address payable sender)\n {\n return ContextMixin.msgSender();\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC1155/ERC1155.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"./IERC1155.sol\";\nimport \"./IERC1155MetadataURI.sol\";\nimport \"./IERC1155Receiver.sol\";\nimport \"../../utils/Context.sol\";\nimport \"../../introspection/ERC165.sol\";\nimport \"../../math/SafeMath.sol\";\nimport \"../../utils/Address.sol\";\n\n/**\n *\n * @dev Implementation of the basic standard multi-token.\n * See https://eips.ethereum.org/EIPS/eip-1155\n * Originally based on code by Enjin: https://github.com/enjin/erc-1155\n *\n * _Available since v3.1._\n */\ncontract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {\n using SafeMath for uint256;\n using Address for address;\n\n // Mapping from token ID to account balances\n mapping (uint256 => mapping(address => uint256)) private _balances;\n\n // Mapping from account to operator approvals\n mapping (address => mapping(address => bool)) private _operatorApprovals;\n\n // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json\n string private _uri;\n\n /*\n * bytes4(keccak256('balanceOf(address,uint256)')) == 0x00fdd58e\n * bytes4(keccak256('balanceOfBatch(address[],uint256[])')) == 0x4e1273f4\n * bytes4(keccak256('setApprovalForAll(address,bool)')) == 0xa22cb465\n * bytes4(keccak256('isApprovedForAll(address,address)')) == 0xe985e9c5\n * bytes4(keccak256('safeTransferFrom(address,address,uint256,uint256,bytes)')) == 0xf242432a\n * bytes4(keccak256('safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)')) == 0x2eb2c2d6\n *\n * => 0x00fdd58e ^ 0x4e1273f4 ^ 0xa22cb465 ^\n * 0xe985e9c5 ^ 0xf242432a ^ 0x2eb2c2d6 == 0xd9b67a26\n */\n bytes4 private constant _INTERFACE_ID_ERC1155 = 0xd9b67a26;\n\n /*\n * bytes4(keccak256('uri(uint256)')) == 0x0e89341c\n */\n bytes4 private constant _INTERFACE_ID_ERC1155_METADATA_URI = 0x0e89341c;\n\n /**\n * @dev See {_setURI}.\n */\n constructor (string memory uri_) public {\n _setURI(uri_);\n\n // register the supported interfaces to conform to ERC1155 via ERC165\n _registerInterface(_INTERFACE_ID_ERC1155);\n\n // register the supported interfaces to conform to ERC1155MetadataURI via ERC165\n _registerInterface(_INTERFACE_ID_ERC1155_METADATA_URI);\n }\n\n /**\n * @dev See {IERC1155MetadataURI-uri}.\n *\n * This implementation returns the same URI for *all* token types. It relies\n * on the token type ID substitution mechanism\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\n *\n * Clients calling this function must replace the `\\{id\\}` substring with the\n * actual token type ID.\n */\n function uri(uint256) external view virtual override returns (string memory) {\n return _uri;\n }\n\n /**\n * @dev See {IERC1155-balanceOf}.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {\n require(account != address(0), \"ERC1155: balance query for the zero address\");\n return _balances[id][account];\n }\n\n /**\n * @dev See {IERC1155-balanceOfBatch}.\n *\n * Requirements:\n *\n * - `accounts` and `ids` must have the same length.\n */\n function balanceOfBatch(\n address[] memory accounts,\n uint256[] memory ids\n )\n public\n view\n virtual\n override\n returns (uint256[] memory)\n {\n require(accounts.length == ids.length, \"ERC1155: accounts and ids length mismatch\");\n\n uint256[] memory batchBalances = new uint256[](accounts.length);\n\n for (uint256 i = 0; i < accounts.length; ++i) {\n batchBalances[i] = balanceOf(accounts[i], ids[i]);\n }\n\n return batchBalances;\n }\n\n /**\n * @dev See {IERC1155-setApprovalForAll}.\n */\n function setApprovalForAll(address operator, bool approved) public virtual override {\n require(_msgSender() != operator, \"ERC1155: setting approval status for self\");\n\n _operatorApprovals[_msgSender()][operator] = approved;\n emit ApprovalForAll(_msgSender(), operator, approved);\n }\n\n /**\n * @dev See {IERC1155-isApprovedForAll}.\n */\n function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {\n return _operatorApprovals[account][operator];\n }\n\n /**\n * @dev See {IERC1155-safeTransferFrom}.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 id,\n uint256 amount,\n bytes memory data\n )\n public\n virtual\n override\n {\n require(to != address(0), \"ERC1155: transfer to the zero address\");\n require(\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\n \"ERC1155: caller is not owner nor approved\"\n );\n\n address operator = _msgSender();\n\n _beforeTokenTransfer(operator, from, to, _asSingletonArray(id), _asSingletonArray(amount), data);\n\n _balances[id][from] = _balances[id][from].sub(amount, \"ERC1155: insufficient balance for transfer\");\n _balances[id][to] = _balances[id][to].add(amount);\n\n emit TransferSingle(operator, from, to, id, amount);\n\n _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);\n }\n\n /**\n * @dev See {IERC1155-safeBatchTransferFrom}.\n */\n function safeBatchTransferFrom(\n address from,\n address to,\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n )\n public\n virtual\n override\n {\n require(ids.length == amounts.length, \"ERC1155: ids and amounts length mismatch\");\n require(to != address(0), \"ERC1155: transfer to the zero address\");\n require(\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\n \"ERC1155: transfer caller is not owner nor approved\"\n );\n\n address operator = _msgSender();\n\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\n\n for (uint256 i = 0; i < ids.length; ++i) {\n uint256 id = ids[i];\n uint256 amount = amounts[i];\n\n _balances[id][from] = _balances[id][from].sub(\n amount,\n \"ERC1155: insufficient balance for transfer\"\n );\n _balances[id][to] = _balances[id][to].add(amount);\n }\n\n emit TransferBatch(operator, from, to, ids, amounts);\n\n _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);\n }\n\n /**\n * @dev Sets a new URI for all token types, by relying on the token type ID\n * substitution mechanism\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\n *\n * By this mechanism, any occurrence of the `\\{id\\}` substring in either the\n * URI or any of the amounts in the JSON file at said URI will be replaced by\n * clients with the token type ID.\n *\n * For example, the `https://token-cdn-domain/\\{id\\}.json` URI would be\n * interpreted by clients as\n * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`\n * for token type ID 0x4cce0.\n *\n * See {uri}.\n *\n * Because these URIs cannot be meaningfully represented by the {URI} event,\n * this function emits no events.\n */\n function _setURI(string memory newuri) internal virtual {\n _uri = newuri;\n }\n\n /**\n * @dev Creates `amount` tokens of token type `id`, and assigns them to `account`.\n *\n * Emits a {TransferSingle} event.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n * - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\n * acceptance magic value.\n */\n function _mint(address account, uint256 id, uint256 amount, bytes memory data) internal virtual {\n require(account != address(0), \"ERC1155: mint to the zero address\");\n\n address operator = _msgSender();\n\n _beforeTokenTransfer(operator, address(0), account, _asSingletonArray(id), _asSingletonArray(amount), data);\n\n _balances[id][account] = _balances[id][account].add(amount);\n emit TransferSingle(operator, address(0), account, id, amount);\n\n _doSafeTransferAcceptanceCheck(operator, address(0), account, id, amount, data);\n }\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.\n *\n * Requirements:\n *\n * - `ids` and `amounts` must have the same length.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\n * acceptance magic value.\n */\n function _mintBatch(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) internal virtual {\n require(to != address(0), \"ERC1155: mint to the zero address\");\n require(ids.length == amounts.length, \"ERC1155: ids and amounts length mismatch\");\n\n address operator = _msgSender();\n\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\n\n for (uint i = 0; i < ids.length; i++) {\n _balances[ids[i]][to] = amounts[i].add(_balances[ids[i]][to]);\n }\n\n emit TransferBatch(operator, address(0), to, ids, amounts);\n\n _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);\n }\n\n /**\n * @dev Destroys `amount` tokens of token type `id` from `account`\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens of token type `id`.\n */\n function _burn(address account, uint256 id, uint256 amount) internal virtual {\n require(account != address(0), \"ERC1155: burn from the zero address\");\n\n address operator = _msgSender();\n\n _beforeTokenTransfer(operator, account, address(0), _asSingletonArray(id), _asSingletonArray(amount), \"\");\n\n _balances[id][account] = _balances[id][account].sub(\n amount,\n \"ERC1155: burn amount exceeds balance\"\n );\n\n emit TransferSingle(operator, account, address(0), id, amount);\n }\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.\n *\n * Requirements:\n *\n * - `ids` and `amounts` must have the same length.\n */\n function _burnBatch(address account, uint256[] memory ids, uint256[] memory amounts) internal virtual {\n require(account != address(0), \"ERC1155: burn from the zero address\");\n require(ids.length == amounts.length, \"ERC1155: ids and amounts length mismatch\");\n\n address operator = _msgSender();\n\n _beforeTokenTransfer(operator, account, address(0), ids, amounts, \"\");\n\n for (uint i = 0; i < ids.length; i++) {\n _balances[ids[i]][account] = _balances[ids[i]][account].sub(\n amounts[i],\n \"ERC1155: burn amount exceeds balance\"\n );\n }\n\n emit TransferBatch(operator, account, address(0), ids, amounts);\n }\n\n /**\n * @dev Hook that is called before any token transfer. This includes minting\n * and burning, as well as batched variants.\n *\n * The same hook is called on both single and batched variants. For single\n * transfers, the length of the `id` and `amount` arrays will be 1.\n *\n * Calling conditions (for each `id` and `amount` pair):\n *\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * of token type `id` will be transferred to `to`.\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\n * for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\n * will be burned.\n * - `from` and `to` are never both zero.\n * - `ids` and `amounts` have the same, non-zero length.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(\n address operator,\n address from,\n address to,\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n )\n internal\n virtual\n { }\n\n function _doSafeTransferAcceptanceCheck(\n address operator,\n address from,\n address to,\n uint256 id,\n uint256 amount,\n bytes memory data\n )\n private\n {\n if (to.isContract()) {\n try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {\n if (response != IERC1155Receiver(to).onERC1155Received.selector) {\n revert(\"ERC1155: ERC1155Receiver rejected tokens\");\n }\n } catch Error(string memory reason) {\n revert(reason);\n } catch {\n revert(\"ERC1155: transfer to non ERC1155Receiver implementer\");\n }\n }\n }\n\n function _doSafeBatchTransferAcceptanceCheck(\n address operator,\n address from,\n address to,\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n )\n private\n {\n if (to.isContract()) {\n try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (bytes4 response) {\n if (response != IERC1155Receiver(to).onERC1155BatchReceived.selector) {\n revert(\"ERC1155: ERC1155Receiver rejected tokens\");\n }\n } catch Error(string memory reason) {\n revert(reason);\n } catch {\n revert(\"ERC1155: transfer to non ERC1155Receiver implementer\");\n }\n }\n }\n\n function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {\n uint256[] memory array = new uint256[](1);\n array[0] = element;\n\n return array;\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC1155/IERC1155MetadataURI.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.2 <0.8.0;\n\nimport \"./IERC1155.sol\";\n\n/**\n * @dev Interface of the optional ERC1155MetadataExtension interface, as defined\n * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].\n *\n * _Available since v3.1._\n */\ninterface IERC1155MetadataURI is IERC1155 {\n /**\n * @dev Returns the URI for token type `id`.\n *\n * If the `\\{id\\}` substring is present in the URI, it must be replaced by\n * clients with the actual token type ID.\n */\n function uri(uint256 id) external view returns (string memory);\n}\n" + }, + "contracts/Libraries/matic/root/RootToken/DummyMintableERC1155.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {ERC1155} from \"@openzeppelin/contracts/token/ERC1155/ERC1155.sol\";\nimport {IMintableERC1155} from \"./IMintableERC1155.sol\";\nimport {NativeMetaTransaction} from \"../../common/NativeMetaTransaction.sol\";\nimport {ContextMixin} from \"../../common/ContextMixin.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\n\ncontract DummyMintableERC1155 is\n ERC1155,\n AccessControlMixin,\n NativeMetaTransaction,\n ContextMixin,\n IMintableERC1155\n{\n bytes32 public constant PREDICATE_ROLE = keccak256(\"PREDICATE_ROLE\");\n\n constructor(string memory uri_) public ERC1155(uri_) {\n _setupContractId(\"DummyMintableERC1155\");\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n _setupRole(PREDICATE_ROLE, _msgSender());\n\n _initializeEIP712(uri_);\n }\n\n function mint(\n address account,\n uint256 id,\n uint256 amount,\n bytes calldata data\n ) external override only(PREDICATE_ROLE) {\n _mint(account, id, amount, data);\n }\n\n function mintBatch(\n address to,\n uint256[] calldata ids,\n uint256[] calldata amounts,\n bytes calldata data\n ) external override only(PREDICATE_ROLE) {\n _mintBatch(to, ids, amounts, data);\n }\n\n function _msgSender()\n internal\n override\n view\n returns (address payable sender)\n {\n return ContextMixin.msgSender();\n }\n}\n" + }, + "contracts/Libraries/matic/root/RootToken/DummyMintableERC20.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {ERC20} from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport {IMintableERC20} from \"./IMintableERC20.sol\";\nimport {NativeMetaTransaction} from \"../../common/NativeMetaTransaction.sol\";\nimport {ContextMixin} from \"../../common/ContextMixin.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\n\ncontract DummyMintableERC20 is\n ERC20,\n AccessControlMixin,\n NativeMetaTransaction,\n ContextMixin,\n IMintableERC20\n{\n bytes32 public constant PREDICATE_ROLE = keccak256(\"PREDICATE_ROLE\");\n\n constructor(string memory name_, string memory symbol_)\n public\n ERC20(name_, symbol_)\n {\n _setupContractId(\"DummyMintableERC20\");\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n _setupRole(PREDICATE_ROLE, _msgSender());\n\n _mint(_msgSender(), 10**10 * (10**18));\n _initializeEIP712(name_);\n }\n\n /**\n * @dev See {IMintableERC20-mint}.\n */\n function mint(address user, uint256 amount) external override only(PREDICATE_ROLE) {\n _mint(user, amount);\n }\n\n function _msgSender()\n internal\n override\n view\n returns (address payable sender)\n {\n return ContextMixin.msgSender();\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"../../utils/Context.sol\";\nimport \"./IERC20.sol\";\nimport \"../../math/SafeMath.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * We have followed general OpenZeppelin guidelines: functions revert instead\n * of returning `false` on failure. This behavior is nonetheless conventional\n * and does not conflict with the expectations of ERC20 applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20 is Context, IERC20 {\n using SafeMath for uint256;\n\n mapping (address => uint256) private _balances;\n\n mapping (address => mapping (address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n uint8 private _decimals;\n\n /**\n * @dev Sets the values for {name} and {symbol}, initializes {decimals} with\n * a default value of 18.\n *\n * To select a different value for {decimals}, use {_setupDecimals}.\n *\n * All three of these values are immutable: they can only be set once during\n * construction.\n */\n constructor (string memory name_, string memory symbol_) public {\n _name = name_;\n _symbol = symbol_;\n _decimals = 18;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5,05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\n * called.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual returns (uint8) {\n return _decimals;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `recipient` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * Requirements:\n *\n * - `sender` and `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n * - the caller must have allowance for ``sender``'s tokens of at least\n * `amount`.\n */\n function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \"ERC20: transfer amount exceeds allowance\"));\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \"ERC20: decreased allowance below zero\"));\n return true;\n }\n\n /**\n * @dev Moves tokens `amount` from `sender` to `recipient`.\n *\n * This is internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `sender` cannot be the zero address.\n * - `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n */\n function _transfer(address sender, address recipient, uint256 amount) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(sender, recipient, amount);\n\n _balances[sender] = _balances[sender].sub(amount, \"ERC20: transfer amount exceeds balance\");\n _balances[recipient] = _balances[recipient].add(amount);\n emit Transfer(sender, recipient, amount);\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n * the total supply.\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n */\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply = _totalSupply.add(amount);\n _balances[account] = _balances[account].add(amount);\n emit Transfer(address(0), account, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the\n * total supply.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens.\n */\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n _balances[account] = _balances[account].sub(amount, \"ERC20: burn amount exceeds balance\");\n _totalSupply = _totalSupply.sub(amount);\n emit Transfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(address owner, address spender, uint256 amount) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Sets {decimals} to a value other than the default one of 18.\n *\n * WARNING: This function should only be called from the constructor. Most\n * applications that interact with token contracts will not expect\n * {decimals} to ever change, and may work incorrectly if it does.\n */\n function _setupDecimals(uint8 decimals_) internal virtual {\n _decimals = decimals_;\n }\n\n /**\n * @dev Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * will be to transferred to `to`.\n * - when `from` is zero, `amount` tokens will be minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n * - `from` and `to` are never both 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 amount) internal virtual { }\n}\n" + }, + "contracts/Libraries/matic/test/PotatoMigration/RootPotatoMigrator.sol": { + "content": "pragma solidity 0.6.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"../../root/StateSender/IStateSender.sol\";\nimport \"../../root/RootChainManager/IRootChainManager.sol\";\n\n// This contract enables deposit and plant deom single tx on ethereum chain\n// First potatoes are transferred to this contract\n// Then they are deposited to ChildPotatoMigrator contract\n// Then a custom state sync is sent to ChildPotatoMigrator, using this the potatoes will be planted on matic chain\ncontract RootPotatoMigrator {\n IStateSender stateSender;\n IERC20 potato;\n IRootChainManager rootChainManager;\n address erc20Predicate;\n address childPotatoMigrator;\n\n constructor(\n address stateSender_,\n address potato_,\n address rootChainManager_,\n address erc20Predicate_,\n address childPotatoMigrator_\n ) public {\n stateSender = IStateSender(stateSender_);\n potato = IERC20(potato_);\n rootChainManager = IRootChainManager(rootChainManager_);\n erc20Predicate = erc20Predicate_;\n childPotatoMigrator = childPotatoMigrator_;\n }\n\n function plantOnChildFarm(uint amount) external {\n potato.transferFrom(\n msg.sender,\n address(this),\n amount\n );\n\n potato.approve(erc20Predicate, amount);\n\n rootChainManager.depositFor(\n childPotatoMigrator,\n address(potato),\n abi.encode(amount)\n );\n\n stateSender.syncState(\n childPotatoMigrator,\n abi.encode(msg.sender, amount)\n );\n }\n}\n" + }, + "contracts/Libraries/matic/root/StateSender/DummyStateSender.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {IStateSender} from \"../StateSender/IStateSender.sol\";\n\n/**\n* @notice Dummy State Sender contract to simulate plasma state sender while testing\n*/\ncontract DummyStateSender is IStateSender {\n /**\n * @notice Event emitted when when syncState is called\n * @dev Heimdall bridge listens to this event and sends the data to receiver contract on child chain\n * @param id Id of the sync, increamented for each event in case of actual state sender contract\n * @param contractAddress the contract receiving data on child chain\n * @param data bytes data to be sent\n */\n event StateSynced(\n uint256 indexed id,\n address indexed contractAddress,\n bytes data\n );\n\n /**\n * @notice called to send data to child chain\n * @dev sender and receiver contracts need to be registered in case of actual state sender contract\n * @param receiver the contract receiving data on child chain\n * @param data bytes data to be sent\n */\n function syncState(address receiver, bytes calldata data) external override {\n emit StateSynced(1, receiver, data);\n }\n}\n" + }, + "contracts/Libraries/matic/root/MockCheckpointManager.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {SafeMath} from \"@openzeppelin/contracts/math/SafeMath.sol\";\nimport {ICheckpointManager} from \"./ICheckpointManager.sol\";\n\n/**\n* @notice Mock Checkpoint Manager contract to simulate plasma checkpoints while testing\n*/\ncontract MockCheckpointManager is ICheckpointManager {\n using SafeMath for uint256;\n\n uint256 public currentCheckpointNumber = 0;\n\n function setCheckpoint(bytes32 rootHash, uint256 start, uint256 end) public {\n HeaderBlock memory headerBlock = HeaderBlock({\n root: rootHash,\n start: start,\n end: end,\n createdAt: now,\n proposer: msg.sender\n });\n\n currentCheckpointNumber = currentCheckpointNumber.add(1);\n headerBlocks[currentCheckpointNumber] = headerBlock;\n }\n}\n" + }, + "contracts/Libraries/matic/test/PotatoMigration/ChildPotatoMigrator.sol": { + "content": "pragma solidity 0.6.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"../../child/IStateReceiver.sol\";\nimport \"./ChildPotatoFarm.sol\";\n\n// This contract receives the deposit of potatoes from pos bridge\n// then plants the potatoes for user using custom state sync\ncontract ChildPotatoMigrator is IStateReceiver {\n IERC20 potato;\n ChildPotatoFarm farm;\n constructor(address potato_, address farm_) public {\n potato = IERC20(potato_);\n farm = ChildPotatoFarm(farm_);\n }\n\n function onStateReceive(uint, bytes calldata data) external override {\n (address user, uint amount) = abi.decode(data, (address, uint));\n potato.approve(address(farm), amount);\n farm.plantFor(user, amount);\n }\n}\n" + }, + "contracts/Libraries/matic/child/IStateReceiver.sol": { + "content": "pragma solidity 0.6.6;\n\ninterface IStateReceiver {\n function onStateReceive(uint256 id, bytes calldata data) external;\n}\n" + }, + "contracts/Libraries/matic/test/PotatoMigration/ChildPotatoFarm.sol": { + "content": "pragma solidity 0.6.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\n// This is where potatoes are planted to earn harvest\ncontract ChildPotatoFarm {\n IERC20 potato;\n mapping(address => uint) public plantedAmount;\n\n constructor(address potato_) public {\n potato = IERC20(potato_);\n }\n\n function plantFor(address user, uint amount) external {\n plantedAmount[user] += amount;\n potato.transferFrom(msg.sender, address(this), amount);\n }\n}\n" + }, + "contracts/Libraries/matic/child/ChildChainManager/ChildChainManager.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {IChildChainManager} from \"./IChildChainManager.sol\";\nimport {IChildToken} from \"../ChildToken/IChildToken.sol\";\nimport {Initializable} from \"../../common/Initializable.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\nimport {IStateReceiver} from \"../IStateReceiver.sol\";\n\n\ncontract ChildChainManager is\n IChildChainManager,\n Initializable,\n AccessControlMixin,\n IStateReceiver\n{\n bytes32 public constant DEPOSIT = keccak256(\"DEPOSIT\");\n bytes32 public constant MAP_TOKEN = keccak256(\"MAP_TOKEN\");\n bytes32 public constant MAPPER_ROLE = keccak256(\"MAPPER_ROLE\");\n bytes32 public constant STATE_SYNCER_ROLE = keccak256(\"STATE_SYNCER_ROLE\");\n\n mapping(address => address) public rootToChildToken;\n mapping(address => address) public childToRootToken;\n\n function initialize(address _owner) external initializer {\n _setupContractId(\"ChildChainManager\");\n _setupRole(DEFAULT_ADMIN_ROLE, _owner);\n _setupRole(MAPPER_ROLE, _owner);\n _setupRole(STATE_SYNCER_ROLE, _owner);\n }\n\n /**\n * @notice Map a token to enable its movement via the PoS Portal, callable only by mappers\n * Normally mapping should happen automatically using state sync\n * This function should be used only while initial deployment when state sync is not registrered or if it fails\n * @param rootToken address of token on root chain\n * @param childToken address of token on child chain\n */\n function mapToken(address rootToken, address childToken)\n external\n override\n only(MAPPER_ROLE)\n {\n _mapToken(rootToken, childToken);\n }\n\n /**\n * @notice Receive state sync data from root chain, only callable by state syncer\n * @dev state syncing mechanism is used for both depositing tokens and mapping them\n * @param data bytes data from RootChainManager contract\n * `data` is made up of bytes32 `syncType` and bytes `syncData`\n * `syncType` determines if it is deposit or token mapping\n * in case of token mapping, `syncData` is encoded address `rootToken`, address `childToken` and bytes32 `tokenType`\n * in case of deposit, `syncData` is encoded address `user`, address `rootToken` and bytes `depositData`\n * `depositData` is token specific data (amount in case of ERC20). It is passed as is to child token\n */\n function onStateReceive(uint256, bytes calldata data)\n external\n override\n only(STATE_SYNCER_ROLE)\n {\n (bytes32 syncType, bytes memory syncData) = abi.decode(\n data,\n (bytes32, bytes)\n );\n\n if (syncType == DEPOSIT) {\n _syncDeposit(syncData);\n } else if (syncType == MAP_TOKEN) {\n (address rootToken, address childToken, ) = abi.decode(\n syncData,\n (address, address, bytes32)\n );\n _mapToken(rootToken, childToken);\n } else {\n revert(\"ChildChainManager: INVALID_SYNC_TYPE\");\n }\n }\n\n /**\n * @notice Clean polluted token mapping\n * @param rootToken address of token on root chain. Since rename token was introduced later stage,\n * clean method is used to clean pollulated mapping\n */\n function cleanMapToken(\n address rootToken,\n address childToken\n ) external override only(MAPPER_ROLE) {\n rootToChildToken[rootToken] = address(0);\n childToRootToken[childToken] = address(0);\n\n emit TokenMapped(rootToken, childToken);\n }\n\n function _mapToken(address rootToken, address childToken) private {\n address oldChildToken = rootToChildToken[rootToken];\n address oldRootToken = childToRootToken[childToken];\n\n if (rootToChildToken[oldRootToken] != address(0)) {\n rootToChildToken[oldRootToken] = address(0);\n }\n\n if (childToRootToken[oldChildToken] != address(0)) {\n childToRootToken[oldChildToken] = address(0);\n }\n\n rootToChildToken[rootToken] = childToken;\n childToRootToken[childToken] = rootToken;\n\n emit TokenMapped(rootToken, childToken);\n }\n\n function _syncDeposit(bytes memory syncData) private {\n (address user, address rootToken, bytes memory depositData) = abi\n .decode(syncData, (address, address, bytes));\n address childTokenAddress = rootToChildToken[rootToken];\n require(\n childTokenAddress != address(0x0),\n \"ChildChainManager: TOKEN_NOT_MAPPED\"\n );\n IChildToken childTokenContract = IChildToken(childTokenAddress);\n childTokenContract.deposit(user, depositData);\n }\n}\n" + }, + "contracts/Libraries/matic/child/ChildChainManager/IChildChainManager.sol": { + "content": "pragma solidity 0.6.6;\n\ninterface IChildChainManager {\n event TokenMapped(address indexed rootToken, address indexed childToken);\n\n function mapToken(address rootToken, address childToken) external;\n function cleanMapToken(address rootToken, address childToken) external;\n}\n" + }, + "contracts/Libraries/matic/child/ChildToken/IChildToken.sol": { + "content": "pragma solidity 0.6.6;\n\ninterface IChildToken {\n function deposit(address user, bytes calldata depositData) external;\n}\n" + }, + "contracts/Libraries/matic/child/ChildToken/UpgradeableChildERC20/UChildERC20.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {ERC20} from \"./ERC20.sol\";\nimport {AccessControlMixin} from \"../../../common/AccessControlMixin.sol\";\nimport {IChildToken} from \"../IChildToken.sol\";\nimport {NativeMetaTransaction} from \"../../../common/NativeMetaTransaction.sol\";\nimport {ContextMixin} from \"../../../common/ContextMixin.sol\";\n\n\ncontract UChildERC20 is\n ERC20,\n IChildToken,\n AccessControlMixin,\n NativeMetaTransaction,\n ContextMixin\n{\n bytes32 public constant DEPOSITOR_ROLE = keccak256(\"DEPOSITOR_ROLE\");\n\n constructor() public ERC20(\"\", \"\") {}\n\n /**\n * @notice Initialize the contract after it has been proxified\n * @dev meant to be called once immediately after deployment\n */\n function initialize(\n string calldata name_,\n string calldata symbol_,\n uint8 decimals_,\n address childChainManager\n )\n external\n initializer\n {\n setName(name_);\n setSymbol(symbol_);\n setDecimals(decimals_);\n _setupContractId(string(abi.encodePacked(\"Child\", symbol_)));\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n _setupRole(DEPOSITOR_ROLE, childChainManager);\n _initializeEIP712(name_);\n }\n\n // This is to support Native meta transactions\n // never use msg.sender directly, use _msgSender() instead\n function _msgSender()\n internal\n override\n view\n returns (address payable sender)\n {\n return ContextMixin.msgSender();\n }\n\n function changeName(string calldata name_) external only(DEFAULT_ADMIN_ROLE) {\n setName(name_);\n _setDomainSeperator(name_);\n }\n\n /**\n * @notice called when token is deposited on root chain\n * @dev Should be callable only by ChildChainManager\n * Should handle deposit by minting the required amount for user\n * Make sure minting is done only by this function\n * @param user user address for whom deposit is being done\n * @param depositData abi encoded amount\n */\n function deposit(address user, bytes calldata depositData)\n external\n override\n only(DEPOSITOR_ROLE)\n {\n uint256 amount = abi.decode(depositData, (uint256));\n _mint(user, amount);\n }\n\n /**\n * @notice called when user wants to withdraw tokens back to root chain\n * @dev Should burn user's tokens. This transaction will be verified when exiting on root chain\n * @param amount amount of tokens to withdraw\n */\n function withdraw(uint256 amount) external {\n _burn(_msgSender(), amount);\n }\n}\n" + }, + "contracts/Libraries/matic/child/ChildToken/UpgradeableChildERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.6.0;\n\n\nimport \"@openzeppelin/contracts/GSN/Context.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"@openzeppelin/contracts/math/SafeMath.sol\";\nimport \"@openzeppelin/contracts/utils/Address.sol\";\n\n/**\n * Modified openzeppelin implemtation to add setters for name, symbol and decimals.\n * This was needed because the variables cannot be set in constructor as the contract is upgradeable.\n */\n\n/**\n * @dev openzeppelin Implementation of the {IERC20} interface.\n *\n * Modified to add setters for name, symbol and decimals. This was needed\n * because\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * We have followed general OpenZeppelin guidelines: functions revert instead\n * of returning `false` on failure. This behavior is nonetheless conventional\n * and does not conflict with the expectations of ERC20 applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20 is Context, IERC20 {\n using SafeMath for uint256;\n using Address for address;\n\n mapping (address => uint256) private _balances;\n\n mapping (address => mapping (address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n uint8 private _decimals;\n\n /**\n * @dev Sets the values for {name} and {symbol}, initializes {decimals} with\n * a default value of 18.\n *\n * To select a different value for {decimals}, use {_setupDecimals}.\n *\n * All three of these values are immutable: they can only be set once during\n * construction.\n */\n constructor (string memory name, string memory symbol) public {\n _name = name;\n _symbol = symbol;\n _decimals = 18;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view returns (string memory) {\n return _name;\n }\n\n function setName(string memory newName) internal {\n _name = newName;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function setSymbol(string memory newSymbol) internal {\n _symbol = newSymbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5,05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\n * called.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n function setDecimals(uint8 newDecimals) internal {\n _decimals = newDecimals;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `recipient` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20};\n *\n * Requirements:\n * - `sender` and `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n * - the caller must have allowance for ``sender``'s tokens of at least\n * `amount`.\n */\n function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \"ERC20: transfer amount exceeds allowance\"));\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \"ERC20: decreased allowance below zero\"));\n return true;\n }\n\n /**\n * @dev Moves tokens `amount` from `sender` to `recipient`.\n *\n * This is internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `sender` cannot be the zero address.\n * - `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n */\n function _transfer(address sender, address recipient, uint256 amount) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(sender, recipient, amount);\n\n _balances[sender] = _balances[sender].sub(amount, \"ERC20: transfer amount exceeds balance\");\n _balances[recipient] = _balances[recipient].add(amount);\n emit Transfer(sender, recipient, amount);\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n * the total supply.\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * Requirements\n *\n * - `to` cannot be the zero address.\n */\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply = _totalSupply.add(amount);\n _balances[account] = _balances[account].add(amount);\n emit Transfer(address(0), account, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the\n * total supply.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * Requirements\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens.\n */\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n _balances[account] = _balances[account].sub(amount, \"ERC20: burn amount exceeds balance\");\n _totalSupply = _totalSupply.sub(amount);\n emit Transfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.\n *\n * This is internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(address owner, address spender, uint256 amount) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Sets {decimals} to a value other than the default one of 18.\n *\n * WARNING: This function should only be called from the constructor. Most\n * applications that interact with token contracts will not expect\n * {decimals} to ever change, and may work incorrectly if it does.\n */\n function _setupDecimals(uint8 decimals_) internal {\n _decimals = decimals_;\n }\n\n /**\n * @dev Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * will be to transferred to `to`.\n * - when `from` is zero, `amount` tokens will be minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n * - `from` and `to` are never both 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 amount) internal virtual { }\n}\n" + }, + "@openzeppelin/contracts/GSN/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"../utils/Context.sol\";\n" + }, + "contracts/Libraries/matic/test/TestUChildERC20.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {UChildERC20} from \"../child/ChildToken/UpgradeableChildERC20/UChildERC20.sol\";\n\ncontract TestUChildERC20 is UChildERC20 {\n function magic() external pure returns (string memory) {\n return \"magic\";\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/SafeERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"./IERC20.sol\";\nimport \"../../math/SafeMath.sol\";\nimport \"../../utils/Address.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using SafeMath for uint256;\n using Address for address;\n\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n /**\n * @dev Deprecated. This function has issues similar to the ones found in\n * {IERC20-approve}, and its usage is discouraged.\n *\n * Whenever possible, use {safeIncreaseAllowance} and\n * {safeDecreaseAllowance} instead.\n */\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n // solhint-disable-next-line max-line-length\n require((value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \"SafeERC20: decreased allowance below zero\");\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\n // the target address contains contract code and also asserts for success in the low-level call.\n\n bytes memory returndata = address(token).functionCall(data, \"SafeERC20: low-level call failed\");\n if (returndata.length > 0) { // Return data is optional\n // solhint-disable-next-line max-line-length\n require(abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n }\n}\n" + }, + "contracts/Libraries/matic/root/TokenPredicates/ERC20Predicate.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {SafeERC20} from \"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\nimport {RLPReader} from \"../../lib/RLPReader.sol\";\nimport {ITokenPredicate} from \"./ITokenPredicate.sol\";\nimport {Initializable} from \"../../common/Initializable.sol\";\n\ncontract ERC20Predicate is ITokenPredicate, AccessControlMixin, Initializable {\n using RLPReader for bytes;\n using RLPReader for RLPReader.RLPItem;\n using SafeERC20 for IERC20;\n\n bytes32 public constant MANAGER_ROLE = keccak256(\"MANAGER_ROLE\");\n bytes32 public constant TOKEN_TYPE = keccak256(\"ERC20\");\n bytes32 public constant TRANSFER_EVENT_SIG = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef;\n\n event LockedERC20(\n address indexed depositor,\n address indexed depositReceiver,\n address indexed rootToken,\n uint256 amount\n );\n\n constructor() public {}\n\n function initialize(address _owner) external initializer {\n _setupContractId(\"ERC20Predicate\");\n _setupRole(DEFAULT_ADMIN_ROLE, _owner);\n _setupRole(MANAGER_ROLE, _owner);\n }\n\n /**\n * @notice Lock ERC20 tokens for deposit, callable only by manager\n * @param depositor Address who wants to deposit tokens\n * @param depositReceiver Address (address) who wants to receive tokens on child chain\n * @param rootToken Token which gets deposited\n * @param depositData ABI encoded amount\n */\n function lockTokens(\n address depositor,\n address depositReceiver,\n address rootToken,\n bytes calldata depositData\n )\n external\n override\n only(MANAGER_ROLE)\n {\n uint256 amount = abi.decode(depositData, (uint256));\n emit LockedERC20(depositor, depositReceiver, rootToken, amount);\n IERC20(rootToken).safeTransferFrom(depositor, address(this), amount);\n }\n\n /**\n * @notice Validates log signature, from and to address\n * then sends the correct amount to withdrawer\n * callable only by manager\n * @param rootToken Token which gets withdrawn\n * @param log Valid ERC20 burn log from child chain\n */\n function exitTokens(\n address,\n address rootToken,\n bytes memory log\n )\n public\n override\n only(MANAGER_ROLE)\n {\n RLPReader.RLPItem[] memory logRLPList = log.toRlpItem().toList();\n RLPReader.RLPItem[] memory logTopicRLPList = logRLPList[1].toList(); // topics\n\n require(\n bytes32(logTopicRLPList[0].toUint()) == TRANSFER_EVENT_SIG, // topic0 is event sig\n \"ERC20Predicate: INVALID_SIGNATURE\"\n );\n\n address withdrawer = address(logTopicRLPList[1].toUint()); // topic1 is from address\n\n require(\n address(logTopicRLPList[2].toUint()) == address(0), // topic2 is to address\n \"ERC20Predicate: INVALID_RECEIVER\"\n );\n\n IERC20(rootToken).safeTransfer(\n withdrawer,\n logRLPList[2].toUint() // log data field\n );\n }\n}\n" + }, + "contracts/test/MockLink.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\n\nabstract contract ERC677Receiver {\n function onTokenTransfer(\n address _sender,\n uint256 _value,\n bytes memory _data\n ) public virtual;\n}\n\ncontract MockLink is ERC20 {\n event Transfer(address indexed from, address indexed to, uint256 value, bytes data);\n\n constructor() public ERC20(\"MockLink\", \"LINK\") {\n _mint(msg.sender, 100 * 10**18);\n }\n\n function transferAndCall(\n address _to,\n uint256 _value,\n bytes memory _data\n ) public virtual returns (bool success) {\n super.transfer(_to, _value);\n emit Transfer(msg.sender, _to, _value, _data);\n if (isContract(_to)) {\n contractFallback(_to, _value, _data);\n }\n return true;\n }\n\n function isContract(address _addr) private view returns (bool hasCode) {\n uint256 length;\n assembly {\n length := extcodesize(_addr)\n }\n return length > 0;\n }\n\n function contractFallback(\n address _to,\n uint256 _value,\n bytes memory _data\n ) private {\n ERC677Receiver receiver = ERC677Receiver(_to);\n receiver.onTokenTransfer(msg.sender, _value, _data);\n }\n}\n" + }, + "contracts/Libraries/matic/test/PotatoMigration/RootPotatoToken.sol": { + "content": "pragma solidity 0.6.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\n\n// These are the potatoes on Ethereum chain\ncontract RootPotatoToken is ERC20 {\n constructor() public ERC20(\"Potato\", \"PTT\") {}\n\n function mint(uint256 amount) public {\n _mint(msg.sender, amount);\n }\n}\n" + }, + "contracts/Libraries/matic/root/RootToken/DummyERC20.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {ERC20} from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport {NativeMetaTransaction} from \"../../common/NativeMetaTransaction.sol\";\nimport {ContextMixin} from \"../../common/ContextMixin.sol\";\n\ncontract DummyERC20 is\n ERC20,\n NativeMetaTransaction,\n ContextMixin\n{\n constructor(string memory name_, string memory symbol_)\n public\n ERC20(name_, symbol_)\n {\n uint256 amount = 10**10 * (10**18);\n _mint(_msgSender(), amount);\n _initializeEIP712(name_);\n }\n\n function mint(uint256 amount) public {\n _mint(_msgSender(), amount);\n }\n\n function _msgSender()\n internal\n override\n view\n returns (address payable sender)\n {\n return ContextMixin.msgSender();\n }\n}\n" + }, + "contracts/Libraries/matic/child/ChildToken/ChildMintableERC20.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {ERC20} from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\nimport {IChildToken} from \"./IChildToken.sol\";\nimport {NativeMetaTransaction} from \"../../common/NativeMetaTransaction.sol\";\nimport {ContextMixin} from \"../../common/ContextMixin.sol\";\n\n\ncontract ChildMintableERC20 is\n ERC20,\n IChildToken,\n AccessControlMixin,\n NativeMetaTransaction,\n ContextMixin\n{\n bytes32 public constant DEPOSITOR_ROLE = keccak256(\"DEPOSITOR_ROLE\");\n\n constructor(\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address childChainManager\n ) public ERC20(name_, symbol_) {\n _setupContractId(\"ChildMintableERC20\");\n _setupDecimals(decimals_);\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n _setupRole(DEPOSITOR_ROLE, childChainManager);\n _initializeEIP712(name_);\n }\n\n // This is to support Native meta transactions\n // never use msg.sender directly, use _msgSender() instead\n function _msgSender()\n internal\n override\n view\n returns (address payable sender)\n {\n return ContextMixin.msgSender();\n }\n\n /**\n * @notice called when token is deposited on root chain\n * @dev Should be callable only by ChildChainManager\n * Should handle deposit by minting the required amount for user\n * Make sure minting is done only by this function\n * @param user user address for whom deposit is being done\n * @param depositData abi encoded amount\n */\n function deposit(address user, bytes calldata depositData)\n external\n override\n only(DEPOSITOR_ROLE)\n {\n uint256 amount = abi.decode(depositData, (uint256));\n _mint(user, amount);\n }\n\n /**\n * @notice called when user wants to withdraw tokens back to root chain\n * @dev Should burn user's tokens. This transaction will be verified when exiting on root chain\n * @param amount amount of tokens to withdraw\n */\n function withdraw(uint256 amount) external {\n _burn(_msgSender(), amount);\n }\n\n /**\n * @notice Example function to handle minting tokens on matic chain\n * @dev Minting can be done as per requirement,\n * This implementation allows only admin to mint tokens but it can be changed as per requirement\n * @param user user for whom tokens are being minted\n * @param amount amount of token to mint\n */\n function mint(address user, uint256 amount) public only(DEFAULT_ADMIN_ROLE) {\n _mint(user, amount);\n }\n}\n" + }, + "contracts/Libraries/matic/child/ChildToken/ChildERC20.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {ERC20} from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\nimport {IChildToken} from \"./IChildToken.sol\";\nimport {NativeMetaTransaction} from \"../../common/NativeMetaTransaction.sol\";\nimport {ContextMixin} from \"../../common/ContextMixin.sol\";\n\n\ncontract ChildERC20 is\n ERC20,\n IChildToken,\n AccessControlMixin,\n NativeMetaTransaction,\n ContextMixin\n{\n bytes32 public constant DEPOSITOR_ROLE = keccak256(\"DEPOSITOR_ROLE\");\n\n constructor(\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address childChainManager\n ) public ERC20(name_, symbol_) {\n _setupContractId(\"ChildERC20\");\n _setupDecimals(decimals_);\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n _setupRole(DEPOSITOR_ROLE, childChainManager);\n _initializeEIP712(name_);\n }\n\n // This is to support Native meta transactions\n // never use msg.sender directly, use _msgSender() instead\n function _msgSender()\n internal\n override\n view\n returns (address payable sender)\n {\n return ContextMixin.msgSender();\n }\n\n /**\n * @notice called when token is deposited on root chain\n * @dev Should be callable only by ChildChainManager\n * Should handle deposit by minting the required amount for user\n * Make sure minting is done only by this function\n * @param user user address for whom deposit is being done\n * @param depositData abi encoded amount\n */\n function deposit(address user, bytes calldata depositData)\n external\n override\n only(DEPOSITOR_ROLE)\n {\n uint256 amount = abi.decode(depositData, (uint256));\n _mint(user, amount);\n }\n\n /**\n * @notice called when user wants to withdraw tokens back to root chain\n * @dev Should burn user's tokens. This transaction will be verified when exiting on root chain\n * @param amount amount of tokens to withdraw\n */\n function withdraw(uint256 amount) external {\n _burn(_msgSender(), amount);\n }\n}\n" + }, + "contracts/Libraries/matic/test/PotatoMigration/ChildPotatoToken.sol": { + "content": "pragma solidity 0.6.6;\n\nimport \"../../child/ChildToken/ChildERC20.sol\";\n\n// These are the potatoes on Matic chain\ncontract ChildPotatoToken is ChildERC20 {\n constructor(address childChainManager) public ChildERC20(\"Potato\", \"PTT\", 18, childChainManager) {}\n}\n" + }, + "contracts/Libraries/matic/child/ChildToken/MaticWETH.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {ChildERC20} from \"./ChildERC20.sol\";\n\ncontract MaticWETH is ChildERC20 {\n constructor(address childChainManager) public ChildERC20(\"Wrapped Ether\", \"WETH\", 18, childChainManager) {}\n}\n" + }, + "contracts/CryptOrchidERC721/CryptOrchidERC721.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.6 <0.9.0;\n\nimport \"@chainlink/contracts/src/v0.6/VRFConsumerBase.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts/presets/ERC721PresetMinterPauserAutoId.sol\";\nimport \"@openzeppelin/contracts/utils/Counters.sol\";\nimport \"../Libraries/CurrentTime.sol\";\n\ncontract CryptOrchidERC721 is ERC721PresetMinterPauserAutoId, Ownable, VRFConsumerBase, CurrentTime {\n using SafeMathChainlink for uint256;\n using Strings for string;\n using Counters for Counters.Counter;\n\n struct CryptOrchid {\n string species;\n uint256 plantedAt;\n uint256 waterLevel;\n }\n mapping(uint256 => CryptOrchid) public cryptorchids;\n\n enum Stage {Unsold, Seed, Flower, Dead}\n\n bool internal saleStarted = false;\n bool internal growingStarted = false;\n\n uint256 public constant MAX_CRYPTORCHIDS = 10000;\n uint256 public constant GROWTH_CYCLE = 604800; // 7 days\n uint256 public constant WATERING_WINDOW = 10800; // 3 hours\n uint256 internal constant MAX_TIMESTAMP = 2**256 - 1;\n string internal constant GRANUM_IPFS = \"QmWd1mn7DuGyx9ByfNeqCsgdSUsJZ1cragitgaygsqDvEm\";\n\n uint16[10] private limits = [0, 3074, 6074, 8074, 9074, 9574, 9824, 9924, 9974, 9999];\n string[10] private genum = [\n \"shenzhenica orchidaceae\",\n \"phalaenopsis micholitzii\",\n \"guarianthe aurantiaca\",\n \"vanda coerulea\",\n \"cypripedium calceolus\",\n \"paphiopedilum vietnamense\",\n \"miltonia kayasimae\",\n \"platanthera azorica\",\n \"dendrophylax lindenii\",\n \"paphiopedilum rothschildianum\"\n ];\n\n string[10] private speciesIPFSConstant = [\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/shenzhenica-orchidaceae.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/phalaenopsis-micholitzii.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/guarianthe-aurantiaca.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/vanda-coerulea.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/cypripedium-calceolus.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/paphiopedilum-vietnamense.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/miltonia-kayasimae.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/platanthera-azorica.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/dendrophylax-lindenii.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/paphiopedilum-rothschildianum.json\"\n ];\n\n string[10] private deadSpeciesIPFSConstant = [\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/shenzhenica-orchidaceae.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/phalaenopsis-micholitzii.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/guarianthe-aurantiaca.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/vanda-coerulea.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/cypripedium-calceolus.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/paphiopedilum-vietnamense.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/miltonia-kayasimae.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/platanthera-azorica.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/dendrophylax-lindenii.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/paphiopedilum-rothschildianum.json\"\n ];\n\n Counters.Counter private _tokenIds;\n\n bytes32 internal keyHash;\n uint256 internal vrfFee;\n uint256 public randomResult;\n address public VRFCoordinator;\n address public LinkToken;\n\n event RequestedRandomness(bytes32 requestId);\n event Planted(uint256 tokenId, string latinSpecies, uint256 timestamp, address tokenOwner);\n event Watered(uint256 tokenId, uint256 waterLevel);\n event Killed(uint256 tokenId);\n\n mapping(bytes32 => uint256) public requestToToken;\n mapping(bytes32 => string) private speciesIPFS;\n mapping(bytes32 => string) private deadSpeciesIPFS;\n\n constructor(\n address _VRFCoordinator,\n address _LinkToken,\n bytes32 _keyhash\n )\n public\n payable\n VRFConsumerBase(_VRFCoordinator, _LinkToken)\n ERC721PresetMinterPauserAutoId(\"CryptOrchids\", \"ORCHD\", \"ipfs://\")\n {\n VRFCoordinator = _VRFCoordinator;\n LinkToken = _LinkToken;\n keyHash = _keyhash;\n vrfFee = 2000000000000000000; // 2 LINK\n\n for (uint256 index = 0; index < genum.length; index++) {\n speciesIPFS[keccak256(abi.encode(genum[index]))] = speciesIPFSConstant[index];\n deadSpeciesIPFS[keccak256(abi.encode(genum[index]))] = deadSpeciesIPFSConstant[index];\n }\n }\n\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\n (string memory species, , , ) = getTokenMetadata(tokenId);\n\n if (growthStage(tokenId) == Stage.Seed) {\n return string(abi.encodePacked(baseURI(), GRANUM_IPFS));\n }\n\n if (growthStage(tokenId) == Stage.Flower) {\n return string(abi.encodePacked(baseURI(), speciesIPFS[keccak256(abi.encode(species))]));\n }\n\n return string(abi.encodePacked(baseURI(), deadSpeciesIPFS[keccak256(abi.encode(species))]));\n }\n\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 tokenId\n ) internal virtual override {\n require(address(0) == to || alive(tokenId), \"Dead CryptOrchids cannot be transferred\");\n super._beforeTokenTransfer(from, to, tokenId);\n }\n\n function currentPrice() public view returns (uint256 price) {\n uint256 currentSupply = totalSupply();\n if (currentSupply >= 9900) {\n return 1000000000000000000; // 9900+: 1.00 ETH\n } else if (currentSupply >= 9500) {\n return 640000000000000000; // 9500-9500: 0.64 ETH\n } else if (currentSupply >= 7500) {\n return 320000000000000000; // 7500-9500: 0.32 ETH\n } else if (currentSupply >= 3500) {\n return 160000000000000000; // 3500-7500: 0.16 ETH\n } else if (currentSupply >= 1500) {\n return 80000000000000000; // 1500-3500: 0.08 ETH\n } else if (currentSupply >= 500) {\n return 60000000000000000; // 500-1500: 0.06 ETH\n } else {\n return 40000000000000000; // 0 - 500 0.04 ETH\n }\n }\n\n function startSale() public onlyOwner {\n saleStarted = true;\n }\n\n function startGrowing() public onlyOwner {\n growingStarted = true;\n }\n\n /**\n * @dev Withdraw ether from this contract (Callable by owner only)\n */\n function withdraw() public onlyOwner {\n uint256 balance = address(this).balance;\n msg.sender.transfer(balance);\n }\n\n receive() external payable {}\n\n function webMint(uint256 units) public payable {\n require(saleStarted, \"The Nursery is closed\");\n require(units <= MAX_CRYPTORCHIDS - totalSupply(), \"Not enough bulbs left\");\n require(totalSupply() < MAX_CRYPTORCHIDS, \"Sale has already ended\");\n require(units > 0 && units <= 20, \"You can plant minimum 1, maximum 20 CryptOrchids\");\n require(SafeMathChainlink.add(totalSupply(), units) <= MAX_CRYPTORCHIDS, \"Exceeds MAX_CRYPTORCHIDS\");\n require(msg.value >= SafeMathChainlink.mul(currentPrice(), units), \"Ether value sent is below the price\");\n\n for (uint256 i = 0; i < units; i++) {\n _tokenIds.increment();\n uint256 newItemId = _tokenIds.current();\n cryptorchids[newItemId] = CryptOrchid({species: \"granum\", plantedAt: MAX_TIMESTAMP, waterLevel: 0});\n _safeMint(msg.sender, newItemId);\n }\n }\n\n function germinate(uint256 tokenId, uint256 userProvidedSeed) public {\n require(growingStarted, \"Germination starts 2021-04-12T16:00:00Z\");\n require(_isApprovedOrOwner(_msgSender(), tokenId), \"Only the Owner can germinate a CryptOrchid.\");\n _requestRandom(tokenId, userProvidedSeed);\n }\n\n function _requestRandom(uint256 tokenId, uint256 userProvidedSeed) internal returns (bytes32 requestId) {\n require(LINK.balanceOf(address(this)) >= vrfFee, \"Not enough LINK - germination unavailable\");\n requestId = requestRandomness(keyHash, vrfFee, userProvidedSeed);\n requestToToken[requestId] = tokenId;\n emit RequestedRandomness(requestId);\n }\n\n function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override {\n uint256 tokenId = requestToToken[requestId];\n CryptOrchid storage orchid = cryptorchids[tokenId];\n string memory species = pickSpecies(SafeMathChainlink.mod(randomness, 10000));\n orchid.species = species;\n orchid.plantedAt = currentTime();\n address tokenOwner = ownerOf(tokenId);\n emit Planted(tokenId, species, currentTime(), tokenOwner);\n }\n\n function alive(uint256 tokenId) public view returns (bool) {\n return growthStage(tokenId) != Stage.Dead;\n }\n\n function flowering(uint256 tokenId) public view returns (bool) {\n return growthStage(tokenId) == Stage.Flower;\n }\n\n function growthStage(uint256 tokenId) public view returns (Stage) {\n CryptOrchid memory orchid = cryptorchids[tokenId];\n if (orchid.plantedAt == 0) return Stage.Unsold;\n if (orchid.plantedAt == MAX_TIMESTAMP) return Stage.Seed;\n uint256 currentWaterLevel = orchid.waterLevel;\n uint256 elapsed = currentTime() - orchid.plantedAt;\n uint256 fullCycles = SafeMathChainlink.div(uint256(elapsed), GROWTH_CYCLE);\n uint256 modulo = SafeMathChainlink.mod(elapsed, GROWTH_CYCLE);\n\n if (currentWaterLevel == fullCycles) {\n return Stage.Flower;\n }\n\n if (SafeMathChainlink.add(currentWaterLevel, 1) == fullCycles && modulo < WATERING_WINDOW) {\n return Stage.Flower;\n }\n\n return Stage.Dead;\n }\n\n function water(uint256 tokenId) public {\n require(_isApprovedOrOwner(_msgSender(), tokenId), \"Only the Owner can water a CryptOrchid.\");\n\n if (!alive(tokenId)) {\n emit Killed(tokenId);\n return;\n }\n\n CryptOrchid storage orchid = cryptorchids[tokenId];\n\n uint256 wateringLevel = orchid.waterLevel;\n uint256 elapsed = currentTime() - orchid.plantedAt;\n uint256 fullCycles = SafeMathChainlink.div(uint256(elapsed), GROWTH_CYCLE);\n\n if (wateringLevel > fullCycles) {\n emit Killed(tokenId);\n return;\n }\n\n uint256 newWaterLevel = SafeMathChainlink.add(wateringLevel, 1);\n orchid.waterLevel = newWaterLevel;\n\n emit Watered(tokenId, newWaterLevel);\n }\n\n function compost(uint256 tokenId) public {\n require(_isApprovedOrOwner(_msgSender(), tokenId), \"Only the Owner can compost a CryptOrchid.\");\n\n burn(tokenId);\n }\n\n function getTokenMetadata(uint256 tokenId)\n public\n view\n returns (\n string memory,\n uint256,\n uint256,\n Stage\n )\n {\n return (\n cryptorchids[tokenId].species,\n cryptorchids[tokenId].plantedAt,\n cryptorchids[tokenId].waterLevel,\n growthStage(tokenId)\n );\n }\n\n function heartbeat(uint256 tokenId) public {\n if (growthStage(tokenId) == Stage.Dead) {\n emit Killed(tokenId);\n }\n }\n\n /**\n * @notice Pick species for random number index\n * @param randomIndex uint256\n * @return species string\n */\n function pickSpecies(uint256 randomIndex) private view returns (string memory) {\n for (uint256 i = 0; i < 10; i++) {\n if (randomIndex <= limits[i]) {\n return genum[i];\n }\n }\n }\n}\n" + }, + "contracts/test/CryptorchidsMock.sol": { + "content": "pragma solidity >=0.6.6 <0.9.0;\n// import \"hardhat/console.sol\";\n\nimport \"../CryptOrchidERC721/CryptOrchidERC721.sol\";\n\ncontract CryptOrchidsMock is CryptOrchidERC721 {\n uint256 internal secondsToAdd = 0;\n\n constructor(\n address _VRFCoordinator,\n address _LinkToken,\n bytes32 _keyhash\n ) public CryptOrchidERC721(_VRFCoordinator, _LinkToken, _keyhash) {}\n\n function timeTravel(uint256 s) public {\n secondsToAdd = s;\n }\n\n function currentTime() internal view virtual override returns (uint256) {\n return block.timestamp + secondsToAdd;\n }\n}\n" + }, + "@chainlink/contracts/src/v0.6/tests/VRFCoordinatorMock.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.6.6;\n\nimport \"../interfaces/LinkTokenInterface.sol\";\nimport \"../VRFConsumerBase.sol\";\n\ncontract VRFCoordinatorMock {\n\n LinkTokenInterface public LINK;\n\n event RandomnessRequest(address indexed sender, bytes32 indexed keyHash, uint256 indexed seed);\n\n constructor(address linkAddress) public {\n LINK = LinkTokenInterface(linkAddress);\n }\n\n function onTokenTransfer(address sender, uint256 fee, bytes memory _data)\n public\n onlyLINK\n {\n (bytes32 keyHash, uint256 seed) = abi.decode(_data, (bytes32, uint256));\n emit RandomnessRequest(sender, keyHash, seed);\n }\n\n function callBackWithRandomness(\n bytes32 requestId,\n uint256 randomness,\n address consumerContract\n ) public {\n VRFConsumerBase v;\n bytes memory resp = abi.encodeWithSelector(v.rawFulfillRandomness.selector, requestId, randomness);\n uint256 b = 206000;\n require(gasleft() >= b, \"not enough gas for consumer\");\n (bool success,) = consumerContract.call(resp);\n }\n\n modifier onlyLINK() {\n require(msg.sender == address(LINK), \"Must use LINK token\");\n _;\n }\n}" + }, + "contracts/test/VRFCoordinatorMock.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.0;\n\nimport \"@chainlink/contracts/src/v0.6/tests/VRFCoordinatorMock.sol\";\n" + }, + "contracts/Libraries/matic/child/ChildToken/DappTokens/UChildDAI.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {UChildERC20} from \"../UpgradeableChildERC20/UChildERC20.sol\";\n\ncontract UChildDAI is UChildERC20 {\n // bytes32 public constant PERMIT_TYPEHASH = keccak256(\"Permit(address holder,address spender,uint256 nonce,uint256 expiry,bool allowed)\");\n bytes32 public constant PERMIT_TYPEHASH = 0xea2aa0a1be11a07ed86d755c93467f4f82362b452371d1ba94d1715123511acb;\n\n // --- Alias ---\n function push(address usr, uint wad) external {\n transferFrom(msg.sender, usr, wad);\n }\n function pull(address usr, uint wad) external {\n transferFrom(usr, msg.sender, wad);\n }\n function move(address src, address dst, uint wad) external {\n transferFrom(src, dst, wad);\n }\n\n // --- Approve by signature ---\n function permit(\n address holder,\n address spender,\n uint256 nonce,\n uint256 expiry,\n bool allowed,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external {\n bytes32 digest = keccak256(\n abi.encodePacked(\n \"\\x19\\x01\",\n getDomainSeperator(),\n keccak256(\n abi.encode(\n PERMIT_TYPEHASH,\n holder,\n spender,\n nonce,\n expiry,\n allowed\n )\n )\n ));\n\n require(holder == ecrecover(digest, v, r, s), \"UChildDAI: INVALID-PERMIT\");\n require(expiry == 0 || now <= expiry, \"UChildDAI: PERMIT-EXPIRED\");\n require(nonce == nonces[holder]++, \"UChildDAI: INVALID-NONCE\");\n require(msg.sender != address(this), \"UChildDAI: PERMIT_META_TX_DISABLED\");\n uint wad = allowed ? uint(-1) : 0;\n _approve(holder, spender, wad);\n }\n}\n" + }, + "contracts/Libraries/matic/child/ChildToken/ChildMintableERC721.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {ERC721} from \"@openzeppelin/contracts/token/ERC721/ERC721.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\nimport {IChildToken} from \"./IChildToken.sol\";\nimport {NativeMetaTransaction} from \"../../common/NativeMetaTransaction.sol\";\nimport {ContextMixin} from \"../../common/ContextMixin.sol\";\n\n\ncontract ChildMintableERC721 is\n ERC721,\n IChildToken,\n AccessControlMixin,\n NativeMetaTransaction,\n ContextMixin\n{\n bytes32 public constant DEPOSITOR_ROLE = keccak256(\"DEPOSITOR_ROLE\");\n mapping (uint256 => bool) public withdrawnTokens;\n\n // limit batching of tokens due to gas limit restrictions\n uint256 public constant BATCH_LIMIT = 20;\n\n event WithdrawnBatch(address indexed user, uint256[] tokenIds);\n event TransferWithMetadata(address indexed from, address indexed to, uint256 indexed tokenId, bytes metaData);\n\n constructor(\n string memory name_,\n string memory symbol_,\n address childChainManager\n ) public ERC721(name_, symbol_) {\n _setupContractId(\"ChildMintableERC721\");\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n _setupRole(DEPOSITOR_ROLE, childChainManager);\n _initializeEIP712(name_);\n }\n\n // This is to support Native meta transactions\n // never use msg.sender directly, use _msgSender() instead\n function _msgSender()\n internal\n override\n view\n returns (address payable sender)\n {\n return ContextMixin.msgSender();\n }\n\n /**\n * @notice called when token is deposited on root chain\n * @dev Should be callable only by ChildChainManager\n * Should handle deposit by minting the required tokenId(s) for user\n * Should set `withdrawnTokens` mapping to `false` for the tokenId being deposited\n * Minting can also be done by other functions\n * @param user user address for whom deposit is being done\n * @param depositData abi encoded tokenIds. Batch deposit also supported.\n */\n function deposit(address user, bytes calldata depositData)\n external\n override\n only(DEPOSITOR_ROLE)\n {\n\n // deposit single\n if (depositData.length == 32) {\n uint256 tokenId = abi.decode(depositData, (uint256));\n withdrawnTokens[tokenId] = false;\n _mint(user, tokenId);\n\n // deposit batch\n } else {\n uint256[] memory tokenIds = abi.decode(depositData, (uint256[]));\n uint256 length = tokenIds.length;\n for (uint256 i; i < length; i++) {\n withdrawnTokens[tokenIds[i]] = false;\n _mint(user, tokenIds[i]);\n }\n }\n\n }\n\n /**\n * @notice called when user wants to withdraw token back to root chain\n * @dev Should handle withraw by burning user's token.\n * Should set `withdrawnTokens` mapping to `true` for the tokenId being withdrawn\n * This transaction will be verified when exiting on root chain\n * @param tokenId tokenId to withdraw\n */\n function withdraw(uint256 tokenId) external {\n require(_msgSender() == ownerOf(tokenId), \"ChildMintableERC721: INVALID_TOKEN_OWNER\");\n withdrawnTokens[tokenId] = true;\n _burn(tokenId);\n }\n\n /**\n * @notice called when user wants to withdraw multiple tokens back to root chain\n * @dev Should burn user's tokens. This transaction will be verified when exiting on root chain\n * @param tokenIds tokenId list to withdraw\n */\n function withdrawBatch(uint256[] calldata tokenIds) external {\n\n uint256 length = tokenIds.length;\n require(length <= BATCH_LIMIT, \"ChildMintableERC721: EXCEEDS_BATCH_LIMIT\");\n\n // Iteratively burn ERC721 tokens, for performing\n // batch withdraw\n for (uint256 i; i < length; i++) {\n\n uint256 tokenId = tokenIds[i];\n\n require(_msgSender() == ownerOf(tokenId), string(abi.encodePacked(\"ChildMintableERC721: INVALID_TOKEN_OWNER \", tokenId)));\n withdrawnTokens[tokenId] = true;\n _burn(tokenId);\n\n }\n\n // At last emit this event, which will be used\n // in MintableERC721 predicate contract on L1\n // while verifying burn proof\n emit WithdrawnBatch(_msgSender(), tokenIds);\n\n }\n\n /**\n * @notice called when user wants to withdraw token back to root chain with token URI\n * @dev Should handle withraw by burning user's token.\n * Should set `withdrawnTokens` mapping to `true` for the tokenId being withdrawn\n * This transaction will be verified when exiting on root chain\n *\n * @param tokenId tokenId to withdraw\n */\n function withdrawWithMetadata(uint256 tokenId) external {\n\n require(_msgSender() == ownerOf(tokenId), \"ChildMintableERC721: INVALID_TOKEN_OWNER\");\n withdrawnTokens[tokenId] = true;\n\n // Encoding metadata associated with tokenId & emitting event\n emit TransferWithMetadata(ownerOf(tokenId), address(0), tokenId, this.encodeTokenMetadata(tokenId));\n\n _burn(tokenId);\n\n }\n\n /**\n * @notice This method is supposed to be called by client when withdrawing token with metadata\n * and pass return value of this function as second paramter of `withdrawWithMetadata` method\n *\n * It can be overridden by clients to encode data in a different form, which needs to\n * be decoded back by them correctly during exiting\n *\n * @param tokenId Token for which URI to be fetched\n */\n function encodeTokenMetadata(uint256 tokenId) external view virtual returns (bytes memory) {\n\n // You're always free to change this default implementation\n // and pack more data in byte array which can be decoded back\n // in L1\n return abi.encode(tokenURI(tokenId));\n\n }\n\n /**\n * @notice Example function to handle minting tokens on matic chain\n * @dev Minting can be done as per requirement,\n * This implementation allows only admin to mint tokens but it can be changed as per requirement\n * Should verify if token is withdrawn by checking `withdrawnTokens` mapping\n * @param user user for whom tokens are being minted\n * @param tokenId tokenId to mint\n */\n function mint(address user, uint256 tokenId) public only(DEFAULT_ADMIN_ROLE) {\n require(!withdrawnTokens[tokenId], \"ChildMintableERC721: TOKEN_EXISTS_ON_ROOT_CHAIN\");\n _mint(user, tokenId);\n }\n}\n" + }, + "contracts/Libraries/matic/child/ChildToken/ChildMintableERC1155.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {ERC1155} from \"@openzeppelin/contracts/token/ERC1155/ERC1155.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\nimport {IChildToken} from \"./IChildToken.sol\";\nimport {NativeMetaTransaction} from \"../../common/NativeMetaTransaction.sol\";\nimport {ContextMixin} from \"../../common/ContextMixin.sol\";\n\ncontract ChildMintableERC1155 is\n ERC1155,\n IChildToken,\n AccessControlMixin,\n NativeMetaTransaction,\n ContextMixin\n{\n bytes32 public constant DEPOSITOR_ROLE = keccak256(\"DEPOSITOR_ROLE\");\n\n constructor(string memory uri_, address childChainManager)\n public\n ERC1155(uri_)\n {\n _setupContractId(\"ChildMintableERC1155\");\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n _setupRole(DEPOSITOR_ROLE, childChainManager);\n _initializeEIP712(uri_);\n }\n\n // This is to support Native meta transactions\n // never use msg.sender directly, use _msgSender() instead\n function _msgSender()\n internal\n override\n view\n returns (address payable sender)\n {\n return ContextMixin.msgSender();\n }\n\n /**\n * @notice called when tokens are deposited on root chain\n * @dev Should be callable only by ChildChainManager\n * Should handle deposit by minting the required tokens for user\n * Make sure minting is done only by this function\n * @param user user address for whom deposit is being done\n * @param depositData abi encoded ids array and amounts array\n */\n function deposit(address user, bytes calldata depositData)\n external\n override\n only(DEPOSITOR_ROLE)\n {\n (\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n ) = abi.decode(depositData, (uint256[], uint256[], bytes));\n\n require(\n user != address(0),\n \"ChildMintableERC1155: INVALID_DEPOSIT_USER\"\n );\n\n _mintBatch(user, ids, amounts, data);\n }\n\n /**\n * @notice called when user wants to withdraw single token back to root chain\n * @dev Should burn user's tokens. This transaction will be verified when exiting on root chain\n * @param id id to withdraw\n * @param amount amount to withdraw\n */\n function withdrawSingle(uint256 id, uint256 amount) external {\n _burn(_msgSender(), id, amount);\n }\n\n /**\n * @notice called when user wants to batch withdraw tokens back to root chain\n * @dev Should burn user's tokens. This transaction will be verified when exiting on root chain\n * @param ids ids to withdraw\n * @param amounts amounts to withdraw\n */\n function withdrawBatch(uint256[] calldata ids, uint256[] calldata amounts)\n external\n {\n _burnBatch(_msgSender(), ids, amounts);\n }\n\n /**\n * @notice See definition of `_mint` in ERC1155 contract\n * @dev This implementation only allows admins to mint tokens\n * but can be changed as per requirement\n */\n function mint(\n address account,\n uint256 id,\n uint256 amount,\n bytes calldata data\n ) external only(DEFAULT_ADMIN_ROLE) {\n _mint(account, id, amount, data);\n }\n\n /**\n * @notice See definition of `_mintBatch` in ERC1155 contract\n * @dev This implementation only allows admins to mint tokens\n * but can be changed as per requirement\n */\n function mintBatch(\n address to,\n uint256[] calldata ids,\n uint256[] calldata amounts,\n bytes calldata data\n ) external only(DEFAULT_ADMIN_ROLE) {\n _mintBatch(to, ids, amounts, data);\n }\n}\n" + }, + "contracts/Libraries/matic/child/ChildToken/ChildERC721.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {ERC721} from \"@openzeppelin/contracts/token/ERC721/ERC721.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\nimport {IChildToken} from \"./IChildToken.sol\";\nimport {NativeMetaTransaction} from \"../../common/NativeMetaTransaction.sol\";\nimport {ContextMixin} from \"../../common/ContextMixin.sol\";\n\ncontract ChildERC721 is\n ERC721,\n IChildToken,\n AccessControlMixin,\n NativeMetaTransaction,\n ContextMixin\n{\n bytes32 public constant DEPOSITOR_ROLE = keccak256(\"DEPOSITOR_ROLE\");\n\n // limit batching of tokens due to gas limit restrictions\n uint256 public constant BATCH_LIMIT = 20;\n\n event WithdrawnBatch(address indexed user, uint256[] tokenIds);\n event TransferWithMetadata(address indexed from, address indexed to, uint256 indexed tokenId, bytes metaData);\n\n constructor(\n string memory name_,\n string memory symbol_,\n address childChainManager\n ) public ERC721(name_, symbol_) {\n _setupContractId(\"ChildERC721\");\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n _setupRole(DEPOSITOR_ROLE, childChainManager);\n _initializeEIP712(name_);\n }\n\n // This is to support Native meta transactions\n // never use msg.sender directly, use _msgSender() instead\n function _msgSender()\n internal\n override\n view\n returns (address payable sender)\n {\n return ContextMixin.msgSender();\n }\n\n /**\n * @notice called when token is deposited on root chain\n * @dev Should be callable only by ChildChainManager\n * Should handle deposit by minting the required tokenId for user\n * Make sure minting is done only by this function\n * @param user user address for whom deposit is being done\n * @param depositData abi encoded tokenId\n */\n function deposit(address user, bytes calldata depositData)\n external\n override\n only(DEPOSITOR_ROLE)\n {\n // deposit single\n if (depositData.length == 32) {\n uint256 tokenId = abi.decode(depositData, (uint256));\n _mint(user, tokenId);\n\n // deposit batch\n } else {\n uint256[] memory tokenIds = abi.decode(depositData, (uint256[]));\n uint256 length = tokenIds.length;\n for (uint256 i; i < length; i++) {\n _mint(user, tokenIds[i]);\n }\n }\n }\n\n /**\n * @notice called when user wants to withdraw token back to root chain\n * @dev Should burn user's token. This transaction will be verified when exiting on root chain\n * @param tokenId tokenId to withdraw\n */\n function withdraw(uint256 tokenId) external {\n require(_msgSender() == ownerOf(tokenId), \"ChildERC721: INVALID_TOKEN_OWNER\");\n _burn(tokenId);\n }\n\n /**\n * @notice called when user wants to withdraw multiple tokens back to root chain\n * @dev Should burn user's tokens. This transaction will be verified when exiting on root chain\n * @param tokenIds tokenId list to withdraw\n */\n function withdrawBatch(uint256[] calldata tokenIds) external {\n uint256 length = tokenIds.length;\n require(length <= BATCH_LIMIT, \"ChildERC721: EXCEEDS_BATCH_LIMIT\");\n for (uint256 i; i < length; i++) {\n uint256 tokenId = tokenIds[i];\n require(_msgSender() == ownerOf(tokenId), string(abi.encodePacked(\"ChildERC721: INVALID_TOKEN_OWNER \", tokenId)));\n _burn(tokenId);\n }\n emit WithdrawnBatch(_msgSender(), tokenIds);\n }\n\n /**\n * @notice called when user wants to withdraw token back to root chain with arbitrary metadata\n * @dev Should handle withraw by burning user's token.\n * \n * This transaction will be verified when exiting on root chain\n *\n * @param tokenId tokenId to withdraw\n */\n function withdrawWithMetadata(uint256 tokenId) external {\n\n require(_msgSender() == ownerOf(tokenId), \"ChildERC721: INVALID_TOKEN_OWNER\");\n\n // Encoding metadata associated with tokenId & emitting event\n emit TransferWithMetadata(_msgSender(), address(0), tokenId, this.encodeTokenMetadata(tokenId));\n\n _burn(tokenId);\n\n }\n\n /**\n * @notice This method is supposed to be called by client when withdrawing token with metadata\n * and pass return value of this function as second paramter of `withdrawWithMetadata` method\n *\n * It can be overridden by clients to encode data in a different form, which needs to\n * be decoded back by them correctly during exiting\n *\n * @param tokenId Token for which URI to be fetched\n */\n function encodeTokenMetadata(uint256 tokenId) external view virtual returns (bytes memory) {\n\n // You're always free to change this default implementation\n // and pack more data in byte array which can be decoded back\n // in L1\n return abi.encode(tokenURI(tokenId));\n\n }\n}\n" + }, + "contracts/Libraries/matic/child/ChildToken/ChildERC1155.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {ERC1155} from \"@openzeppelin/contracts/token/ERC1155/ERC1155.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\nimport {IChildToken} from \"./IChildToken.sol\";\nimport {NativeMetaTransaction} from \"../../common/NativeMetaTransaction.sol\";\nimport {ContextMixin} from \"../../common/ContextMixin.sol\";\n\ncontract ChildERC1155 is\n ERC1155,\n IChildToken,\n AccessControlMixin,\n NativeMetaTransaction,\n ContextMixin\n{\n bytes32 public constant DEPOSITOR_ROLE = keccak256(\"DEPOSITOR_ROLE\");\n\n constructor(string memory uri_, address childChainManager)\n public\n ERC1155(uri_)\n {\n _setupContractId(\"ChildERC1155\");\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n _setupRole(DEPOSITOR_ROLE, childChainManager);\n _initializeEIP712(uri_);\n }\n\n // This is to support Native meta transactions\n // never use msg.sender directly, use _msgSender() instead\n function _msgSender()\n internal\n override\n view\n returns (address payable sender)\n {\n return ContextMixin.msgSender();\n }\n\n /**\n * @notice called when tokens are deposited on root chain\n * @dev Should be callable only by ChildChainManager\n * Should handle deposit by minting the required tokens for user\n * Make sure minting is done only by this function\n * @param user user address for whom deposit is being done\n * @param depositData abi encoded ids array and amounts array\n */\n function deposit(address user, bytes calldata depositData)\n external\n override\n only(DEPOSITOR_ROLE)\n {\n (\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n ) = abi.decode(depositData, (uint256[], uint256[], bytes));\n require(user != address(0x0), \"ChildERC1155: INVALID_DEPOSIT_USER\");\n _mintBatch(user, ids, amounts, data);\n }\n\n /**\n * @notice called when user wants to withdraw single token back to root chain\n * @dev Should burn user's tokens. This transaction will be verified when exiting on root chain\n * @param id id to withdraw\n * @param amount amount to withdraw\n */\n function withdrawSingle(uint256 id, uint256 amount) external {\n _burn(_msgSender(), id, amount);\n }\n\n /**\n * @notice called when user wants to batch withdraw tokens back to root chain\n * @dev Should burn user's tokens. This transaction will be verified when exiting on root chain\n * @param ids ids to withdraw\n * @param amounts amounts to withdraw\n */\n function withdrawBatch(uint256[] calldata ids, uint256[] calldata amounts)\n external\n {\n _burnBatch(_msgSender(), ids, amounts);\n }\n}\n" + }, + "contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.6 <0.9.0;\n\nimport {CryptOrchidGoerli} from \"../CryptOrchidGoerli/CryptOrchidGoerli.sol\";\nimport {AccessControlMixin} from \"../Libraries/matic/common/AccessControlMixin.sol\";\nimport {IChildToken} from \"../Libraries/matic/child/ChildToken/IChildToken.sol\";\nimport {NativeMetaTransaction} from \"../Libraries/matic/common/NativeMetaTransaction.sol\";\nimport {ContextMixin} from \"../Libraries/matic/common/ContextMixin.sol\";\nimport {FxBaseChildTunnel} from \"../Libraries/tunnel/FxBaseChildTunnel.sol\";\n\ncontract CryptOrchidERC721Child is\n CryptOrchidGoerli,\n IChildToken,\n AccessControlMixin,\n NativeMetaTransaction,\n ContextMixin,\n FxBaseChildTunnel\n{\n bytes32 public constant DEPOSITOR_ROLE = keccak256(\"DEPOSITOR_ROLE\");\n\n // limit batching of tokens due to gas limit restrictions\n uint256 public constant BATCH_LIMIT = 20;\n\n event WithdrawnBatch(address indexed user, uint256[] tokenIds);\n event TransferWithMetadata(address indexed from, address indexed to, uint256 indexed tokenId, bytes metaData);\n\n constructor(address childChainManager, address _fxChild) public CryptOrchidGoerli() FxBaseChildTunnel(_fxChild) {\n _setupContractId(\"CryptOrchidERC721Child\");\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n _setupRole(DEPOSITOR_ROLE, childChainManager);\n _initializeEIP712(\"CryptOrchids\");\n }\n\n // This is to support Native meta transactions\n // never use msg.sender directly, use _msgSender() instead\n function _msgSender() internal view override returns (address payable sender) {\n return ContextMixin.msgSender();\n }\n\n /**\n * @notice called when token is deposited on root chain\n * @dev Should be callable only by ChildChainManager\n * Should handle deposit by minting the required tokenId for user\n * Make sure minting is done only by this function\n * @param user user address for whom deposit is being done\n * @param depositData abi encoded tokenId\n */\n function deposit(address user, bytes calldata depositData) external override only(DEPOSITOR_ROLE) {\n // deposit single\n if (depositData.length == 32) {\n uint256 tokenId = abi.decode(depositData, (uint256));\n _mint(user, tokenId);\n\n // deposit batch\n } else {\n uint256[] memory tokenIds = abi.decode(depositData, (uint256[]));\n uint256 length = tokenIds.length;\n for (uint256 i; i < length; i++) {\n _mint(user, tokenIds[i]);\n }\n }\n }\n\n /**\n * @notice called when user wants to withdraw token back to root chain\n * @dev Should burn user's token. This transaction will be verified when exiting on root chain\n * @param tokenId tokenId to withdraw\n */\n function withdraw(uint256 tokenId) external {\n require(_msgSender() == ownerOf(tokenId), \"ChildERC721: INVALID_TOKEN_OWNER\");\n _burn(tokenId);\n }\n\n /**\n * @notice called when user wants to withdraw multiple tokens back to root chain\n * @dev Should burn user's tokens. This transaction will be verified when exiting on root chain\n * @param tokenIds tokenId list to withdraw\n */\n function withdrawBatch(uint256[] calldata tokenIds) external {\n uint256 length = tokenIds.length;\n require(length <= BATCH_LIMIT, \"ChildERC721: EXCEEDS_BATCH_LIMIT\");\n for (uint256 i; i < length; i++) {\n uint256 tokenId = tokenIds[i];\n require(\n _msgSender() == ownerOf(tokenId),\n string(abi.encodePacked(\"ChildERC721: INVALID_TOKEN_OWNER \", tokenId))\n );\n _burn(tokenId);\n }\n emit WithdrawnBatch(_msgSender(), tokenIds);\n }\n\n /**\n * @notice called when user wants to withdraw token back to root chain with arbitrary metadata\n * @dev Should handle withraw by burning user's token.\n *\n * This transaction will be verified when exiting on root chain\n *\n * @param tokenId tokenId to withdraw\n */\n function withdrawWithMetadata(uint256 tokenId) external {\n require(_msgSender() == ownerOf(tokenId), \"ChildERC721: INVALID_TOKEN_OWNER\");\n\n // Encoding metadata associated with tokenId & emitting event\n emit TransferWithMetadata(_msgSender(), address(0), tokenId, this.encodeTokenMetadata(tokenId));\n\n _burn(tokenId);\n }\n\n /**\n * @notice This method is supposed to be called by client when withdrawing token with metadata\n * and pass return value of this function as second paramter of `withdrawWithMetadata` method\n *\n * It can be overridden by clients to encode data in a different form, which needs to\n * be decoded back by them correctly during exiting\n *\n * @param tokenId Token for which URI to be fetched\n */\n function encodeTokenMetadata(uint256 tokenId) external view virtual returns (bytes memory) {\n // You're always free to change this default implementation\n // and pack more data in byte array which can be decoded back\n // in L1\n return abi.encode(tokenURI(tokenId));\n }\n\n function _processMessageFromRoot(\n uint256 stateId,\n address sender,\n bytes memory data\n ) internal override validateSender(sender) {\n (string memory species, uint256 plantedAt, uint256 waterLevel, uint256 tokenId) = abi.decode(\n data,\n (string, uint256, uint256, uint256)\n );\n cryptorchids[tokenId] = CryptOrchid({species: species, plantedAt: plantedAt, waterLevel: waterLevel});\n }\n\n function sendMessageToRoot(bytes memory message) public {\n _sendMessageToRoot(message);\n }\n}\n" + }, + "contracts/Libraries/tunnel/FxBaseChildTunnel.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.6 <0.9.0;\n\n// IFxMessageProcessor represents interface to process message\ninterface IFxMessageProcessor {\n function processMessageFromRoot(\n uint256 stateId,\n address rootMessageSender,\n bytes calldata data\n ) external;\n}\n\n/**\n * @notice Mock child tunnel contract to receive and send message from L2\n */\nabstract contract FxBaseChildTunnel is IFxMessageProcessor {\n // MessageTunnel on L1 will get data from this event\n event MessageSent(bytes message);\n\n // fx child\n address public fxChild;\n\n // fx root tunnel\n address public fxRootTunnel;\n\n constructor(address _fxChild) internal {\n fxChild = _fxChild;\n }\n\n // Sender must be fxRootTunnel in case of ERC20 tunnel\n modifier validateSender(address sender) {\n require(sender == fxRootTunnel, \"FxBaseChildTunnel: INVALID_SENDER_FROM_ROOT\");\n _;\n }\n\n // set fxRootTunnel if not set already\n function setFxRootTunnel(address _fxRootTunnel) public {\n require(fxRootTunnel == address(0x0), \"FxBaseChildTunnel: ROOT_TUNNEL_ALREADY_SET\");\n fxRootTunnel = _fxRootTunnel;\n }\n\n function processMessageFromRoot(\n uint256 stateId,\n address rootMessageSender,\n bytes memory data\n ) public override {\n require(msg.sender == fxChild, \"FxBaseChildTunnel: INVALID_SENDER\");\n _processMessageFromRoot(stateId, rootMessageSender, data);\n }\n\n /**\n * @notice Emit message that can be received on Root Tunnel\n * @dev Call the internal function when need to emit message\n * @param message bytes message that will be sent to Root Tunnel\n * some message examples -\n * abi.encode(tokenId);\n * abi.encode(tokenId, tokenMetadata);\n * abi.encode(messageType, messageData);\n */\n function _sendMessageToRoot(bytes memory message) internal {\n emit MessageSent(message);\n }\n\n /**\n * @notice Process message received from Root Tunnel\n * @dev function needs to be implemented to handle message as per requirement\n * This is called by onStateReceive function.\n * Since it is called via a system call, any event will not be emitted during its execution.\n * @param stateId unique state id\n * @param sender root message sender\n * @param message bytes message that was sent from Root Tunnel\n */\n function _processMessageFromRoot(\n uint256 stateId,\n address sender,\n bytes memory message\n ) internal virtual;\n}\n" + }, + "contracts/Libraries/matic/root/RootToken/DummyERC1155.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {ERC1155} from \"@openzeppelin/contracts/token/ERC1155/ERC1155.sol\";\nimport {NativeMetaTransaction} from \"../../common/NativeMetaTransaction.sol\";\nimport {ContextMixin} from \"../../common/ContextMixin.sol\";\n\ncontract DummyERC1155 is\n ERC1155,\n NativeMetaTransaction,\n ContextMixin\n{\n constructor(string memory uri_)\n public\n ERC1155(uri_)\n {\n _initializeEIP712(uri_);\n }\n\n function mint(address account, uint256 id, uint256 amount) public {\n _mint(account, id, amount, bytes(\"\"));\n }\n\n function _msgSender()\n internal\n override\n view\n returns (address payable sender)\n {\n return ContextMixin.msgSender();\n }\n}\n" + }, + "contracts/Libraries/matic/root/TokenPredicates/ERC1155Predicate.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {IERC1155} from \"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\";\nimport {ERC1155Receiver} from \"@openzeppelin/contracts/token/ERC1155/ERC1155Receiver.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\nimport {RLPReader} from \"../../lib/RLPReader.sol\";\nimport {ITokenPredicate} from \"./ITokenPredicate.sol\";\nimport {Initializable} from \"../../common/Initializable.sol\";\n\ncontract ERC1155Predicate is ITokenPredicate, ERC1155Receiver, AccessControlMixin, Initializable {\n using RLPReader for bytes;\n using RLPReader for RLPReader.RLPItem;\n\n bytes32 public constant MANAGER_ROLE = keccak256(\"MANAGER_ROLE\");\n bytes32 public constant TOKEN_TYPE = keccak256(\"ERC1155\");\n\n // keccak256(\"TransferSingle(address,address,address,uint256,uint256)\")\n bytes32 public constant TRANSFER_SINGLE_EVENT_SIG = 0xc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62;\n // keccak256(\"TransferBatch(address,address,address,uint256[],uint256[])\")\n bytes32 public constant TRANSFER_BATCH_EVENT_SIG = 0x4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb;\n\n event LockedBatchERC1155(\n address indexed depositor,\n address indexed depositReceiver,\n address indexed rootToken,\n uint256[] ids,\n uint256[] amounts\n );\n\n constructor() public {}\n\n function initialize(address _owner) external initializer {\n _setupContractId(\"ERC1155Predicate\");\n _setupRole(DEFAULT_ADMIN_ROLE, _owner);\n _setupRole(MANAGER_ROLE, _owner);\n }\n\n /**\n * @notice rejects single transfer\n */\n function onERC1155Received(\n address,\n address,\n uint256,\n uint256,\n bytes calldata\n ) external override returns (bytes4) {\n return 0;\n }\n\n /**\n * @notice accepts batch transfer\n */\n function onERC1155BatchReceived(\n address,\n address,\n uint256[] calldata,\n uint256[] calldata,\n bytes calldata\n ) external override returns (bytes4) {\n return ERC1155Receiver(0).onERC1155BatchReceived.selector;\n }\n\n /**\n * @notice Lock ERC1155 tokens for deposit, callable only by manager\n * @param depositor Address who wants to deposit tokens\n * @param depositReceiver Address (address) who wants to receive tokens on child chain\n * @param rootToken Token which gets deposited\n * @param depositData ABI encoded id array and amount array\n */\n function lockTokens(\n address depositor,\n address depositReceiver,\n address rootToken,\n bytes calldata depositData\n )\n external\n override\n only(MANAGER_ROLE)\n {\n // forcing batch deposit since supporting both single and batch deposit introduces too much complexity\n (\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n ) = abi.decode(depositData, (uint256[], uint256[], bytes));\n emit LockedBatchERC1155(\n depositor,\n depositReceiver,\n rootToken,\n ids,\n amounts\n );\n IERC1155(rootToken).safeBatchTransferFrom(\n depositor,\n address(this),\n ids,\n amounts,\n data\n );\n }\n\n /**\n * @notice Validates log signature, from and to address\n * then sends the correct tokenId, amount to withdrawer\n * callable only by manager\n * @param rootToken Token which gets withdrawn\n * @param log Valid ERC1155 TransferSingle burn or TransferBatch burn log from child chain\n */\n function exitTokens(\n address,\n address rootToken,\n bytes memory log\n )\n public\n override\n only(MANAGER_ROLE)\n {\n RLPReader.RLPItem[] memory logRLPList = log.toRlpItem().toList();\n RLPReader.RLPItem[] memory logTopicRLPList = logRLPList[1].toList(); // topics\n bytes memory logData = logRLPList[2].toBytes();\n\n address withdrawer = address(logTopicRLPList[2].toUint()); // topic2 is from address\n\n require(\n address(logTopicRLPList[3].toUint()) == address(0), // topic3 is to address\n \"ERC1155Predicate: INVALID_RECEIVER\"\n );\n\n if (bytes32(logTopicRLPList[0].toUint()) == TRANSFER_SINGLE_EVENT_SIG) { // topic0 is event sig\n (uint256 id, uint256 amount) = abi.decode(\n logData,\n (uint256, uint256)\n );\n IERC1155(rootToken).safeTransferFrom(\n address(this),\n withdrawer,\n id,\n amount,\n bytes(\"\")\n );\n } else if (bytes32(logTopicRLPList[0].toUint()) == TRANSFER_BATCH_EVENT_SIG) {\n (uint256[] memory ids, uint256[] memory amounts) = abi.decode(\n logData,\n (uint256[], uint256[])\n );\n IERC1155(rootToken).safeBatchTransferFrom(\n address(this),\n withdrawer,\n ids,\n amounts,\n bytes(\"\")\n );\n } else {\n revert(\"ERC1155Predicate: INVALID_WITHDRAW_SIG\");\n }\n }\n}\n" + }, + "contracts/Libraries/matic/test/TestRootTunnel.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {BaseRootTunnel} from \"../tunnel/BaseRootTunnel.sol\";\n\ncontract TestRootTunnel is BaseRootTunnel {\n uint256 public receivedNumber;\n\n event MessageReceivedFromChild(uint256);\n\n function _processMessageFromChild(bytes memory message) internal override {\n (uint256 n) = abi.decode(message, (uint256));\n emit MessageReceivedFromChild(n);\n receivedNumber = n;\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/deployments/mumbai/solcInputs/961814ba080324d595a4e1c93377123d.json b/deployments/mumbai/solcInputs/961814ba080324d595a4e1c93377123d.json new file mode 100644 index 0000000..148ec95 --- /dev/null +++ b/deployments/mumbai/solcInputs/961814ba080324d595a4e1c93377123d.json @@ -0,0 +1,359 @@ +{ + "language": "Solidity", + "sources": { + "contracts/Coupon/Coupon.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.6 <0.9.0;\n\nimport \"@openzeppelin/contracts/math/SafeMath.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@chainlink/contracts/src/v0.6/VRFConsumerBase.sol\";\nimport \"../Interfaces/ERC721.sol\";\nimport \"../Libraries/CurrentTime.sol\";\n\ncontract Coupon is Ownable, VRFConsumerBase, CurrentTime {\n using SafeMath for uint256;\n mapping(uint256 => bool) internal redemptions;\n mapping(address => uint256) public addressEntriesCount;\n\n uint256 public constant PROMOTION_END = 1622520000;\n uint256 internal constant REBATE_AMOUNT = 20000000000000000;\n uint256 internal constant MINT_FLOOR = 40000000000000000;\n\n uint256 public promotionStart;\n address public cryptorchidsERC721;\n\n uint256 public drawingEntriesCount;\n uint256 public pot;\n address[] internal drawingEntries;\n bytes32 internal randomWinnerRequestId;\n bool public winnerRequested;\n address public winner;\n\n bytes32 internal keyHash;\n uint256 internal vrfFee;\n address public VRFCoordinator;\n address public LinkToken;\n\n constructor(\n address cryptorchidsAddress,\n address _VRFCoordinator,\n address _LinkToken,\n bytes32 _keyhash\n ) public payable VRFConsumerBase(_VRFCoordinator, _LinkToken) {\n VRFCoordinator = _VRFCoordinator;\n LinkToken = _LinkToken;\n keyHash = _keyhash;\n vrfFee = 2000000000000000000; // 2 LINK\n cryptorchidsERC721 = cryptorchidsAddress;\n promotionStart = block.timestamp;\n }\n\n /** Public function for whether the promotion is open. The promotion is only\n * open if the contract balance is greater than the currentRebate. Displayed\n * on CryptOrchids nursery for transparency.\n * @dev\n * @return bool Whether promotion is open for entries.\n */\n function promotionOpen() public view returns (bool) {\n if (currentTime() > PROMOTION_END) return false;\n if (pot > address(this).balance + currentRebate()) return false;\n if (currentRebate() > address(this).balance) return false;\n\n return true;\n }\n\n /** Check rebate value and eligible tokens. Tokens are valid if they are planted\n * after this contract is deployed, alive, and not yet redeemed.\n * @dev calls public functions on the CryptOrchids contract to build\n * an array of eligible token IDs and a rebate amount.\n * @return eligibleTokens uint256[] Uncompacted array of 0s and eligible token IDs\n * @return rebateAmount uint256 Eligible tokens * currentRebate\n */\n function checkEligibility()\n public\n view\n returns (\n uint256[] memory eligibleTokens,\n uint256 rebateAmount,\n uint256 count\n )\n {\n require(promotionOpen(), \"Promotion over\");\n\n uint256 _rebateAmount = 0;\n uint256 tokenCount = ERC721(cryptorchidsERC721).balanceOf(msg.sender);\n uint256[] memory _eligibleTokens = new uint256[](tokenCount);\n\n for (uint256 index = 0; index < tokenCount; index++) {\n uint256 tokenId = ERC721(cryptorchidsERC721).tokenOfOwnerByIndex(msg.sender, index);\n bool flowering = ERC721(cryptorchidsERC721).flowering(tokenId);\n (, uint256 plantedAt, , ) = ERC721(cryptorchidsERC721).getTokenMetadata(tokenId);\n\n if (redemptions[tokenId] != true && flowering && plantedAt > promotionStart) {\n _eligibleTokens[index] = tokenId;\n _rebateAmount += tokenRebate(tokenId);\n count += 1;\n }\n }\n\n if (_rebateAmount > safeBalance()) {\n uint256[] memory empty = new uint256[](0);\n return (empty, _rebateAmount, uint256(0));\n }\n return (_eligibleTokens, _rebateAmount, count);\n }\n\n /** Claim ETH for valid tokens. Check for valid tokens before claming.\n * @dev calls checkEligibility and sets all eligibleTokens as redeemed.\n * Then transfers caller rebateAmount.\n */\n function redeem() public virtual returns (uint256) {\n require(currentTime() < PROMOTION_END, \"Promotion over\");\n (uint256[] memory redeeming, uint256 rebateAmount, ) = checkEligibility();\n require(safeBalance() >= rebateAmount, \"COC:rdm:paused\");\n\n for (uint256 index = 0; index < redeeming.length - 1; index++) {\n uint256 tokenId = redeeming[index];\n if (tokenId > 0) redemptions[tokenId] = true;\n }\n\n payable(msg.sender).transfer(rebateAmount);\n\n return rebateAmount;\n }\n\n /** Redeem tokens for entries in drawing.\n * @dev Adds address to drawingEntries, increments entriesCount, and\n * increases pot for each eligible token, while marking each token redeemed.\n */\n function enter() public virtual {\n require(currentTime() < PROMOTION_END, \"Promotion over\");\n (uint256[] memory redeeming, uint256 rebateAmount, uint256 count) = checkEligibility();\n\n require(safeBalance() >= rebateAmount, \"COC:enr:paused\");\n\n for (uint256 index = 0; index < redeeming.length; index++) {\n uint256 tokenId = redeeming[index];\n if (tokenId > 0) {\n redemptions[tokenId] = true;\n drawingEntriesCount += 1;\n addressEntriesCount[msg.sender] += 1;\n drawingEntries.push(address(msg.sender));\n pot += tokenRebate(tokenId);\n }\n }\n }\n\n /** Current rebate amount for new, mintable token. Based on CryptOrchids current price,\n * the ramping rebate is intended to address the regrettable FOMO ramp pricing.\n * Starts at 0.02ETH, and increases with inverse correlation to price ramp to\n * offer effectively straight 0.04 ETH for seeds.\n * @dev calls CryptOrchids.currentPrice and finds difference with MINT_FLOOR to return rebate.\n */\n function currentRebate() public view returns (uint256) {\n uint256 currentPrice = ERC721(cryptorchidsERC721).currentPrice();\n\n if (currentPrice == MINT_FLOOR) return REBATE_AMOUNT;\n\n return currentPrice - MINT_FLOOR;\n }\n\n /** Redeemable rebate amount for existing token. Based on the price the token was sold at,\n * this prevents a seed holder from redeeming a seed for more than it was purchased for.\n * @dev Copies currentPrice and returns rebate amount for tokenId\n */\n function tokenRebate(uint256 tokenId) public view returns (uint256) {\n if (tokenId > 9900) {\n return 1000000000000000000 - MINT_FLOOR; // 9900+: 0.960 ETH\n } else if (tokenId > 9500) {\n return 640000000000000000 - MINT_FLOOR; // 9500-9500: 0.60 ETH\n } else if (tokenId > 7500) {\n return 320000000000000000 - MINT_FLOOR; // 7500-9500: 0.28 ETH\n } else if (tokenId > 3500) {\n return 160000000000000000 - MINT_FLOOR; // 3500-7500: 0.12 ETH\n } else if (tokenId > 1500) {\n return 80000000000000000 - MINT_FLOOR; // 1500-3500: 0.04 ETH\n } else if (tokenId > 500) {\n return 60000000000000000 - MINT_FLOOR; // 500-1500: 0.02 ETH\n } else {\n return REBATE_AMOUNT; // 0 - 500 0.02 ETH\n }\n }\n\n /** Current count of rebates available as determined by safeBalance and currentRebate\n */\n function rebatesAvailable() public view returns (uint256) {\n return SafeMath.div(safeBalance(), currentRebate());\n }\n\n /** Current rebate amount for eligible token. Based on CryptOrchids current price,\n * the ramping rebate is intended to address the regrettable FOMO ramp pricing.\n * Starts at 0.02ETH,\n * @dev calls CryptOrchids.currentPrice and finds difference to .\n * Then transfers caller rebateAmount.\n */\n function safeBalance() internal view returns (uint256) {\n return address(this).balance - pot;\n }\n\n function selectWinner(uint256 userProvidedSeed) public virtual {\n require(currentTime() > PROMOTION_END, \"COC:wW:promotion running\");\n require(randomWinnerRequestId[0] == 0, \"COC:wW:winner requested\");\n require(LINK.balanceOf(address(this)) >= vrfFee, \"COC:sW:no LINK\");\n\n randomWinnerRequestId = requestRandomness(keyHash, vrfFee, userProvidedSeed);\n }\n\n function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override {\n require(requestId == randomWinnerRequestId, \"COC:fR:invalid request ID\");\n uint256 winnerIndex = SafeMath.mod(randomness, drawingEntriesCount);\n winner = drawingEntries[winnerIndex];\n }\n\n /** Winner may withdraw ether from the contract once the promotion is over.\n *\n */\n function withdrawWinner() public {\n require(currentTime() > PROMOTION_END, \"COC:wW:promotion running\");\n require(msg.sender == winner, \"COC:wW:not winner\");\n uint256 txAmount = pot;\n pot = 0;\n payable(msg.sender).transfer(txAmount);\n }\n\n /** Withdraw ether from this contract once the promotion is over.\n * @dev Transfer remaining balance to owner if after PROMOTION_END.\n *\n */\n function withdrawUnclaimed() public onlyOwner {\n require(currentTime() > PROMOTION_END, \"COC:wU:promotion running\");\n require(pot == 0, \"COC:wU:winnings unclaimed\");\n\n uint256 balance = address(this).balance;\n payable(msg.sender).transfer(balance);\n }\n\n receive() external payable {}\n}\n" + }, + "@openzeppelin/contracts/math/SafeMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\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 uint256 c = a + b;\n if (c < a) return (false, 0);\n return (true, c);\n }\n\n /**\n * @dev Returns the substraction 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 if (b > a) return (false, 0);\n return (true, a - b);\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 // 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 * @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 if (b == 0) return (false, 0);\n return (true, a / b);\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 if (b == 0) return (false, 0);\n return (true, a % b);\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 uint256 c = a + b;\n require(c >= a, \"SafeMath: addition overflow\");\n return c;\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 require(b <= a, \"SafeMath: subtraction overflow\");\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 if (a == 0) return 0;\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n return c;\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. 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) internal pure returns (uint256) {\n require(b > 0, \"SafeMath: division by zero\");\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 require(b > 0, \"SafeMath: modulo by zero\");\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 require(b <= a, errorMessage);\n return a - b;\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\n * message unnecessarily. For custom revert reasons use {tryDiv}.\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 require(b > 0, errorMessage);\n return a / b;\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 require(b > 0, errorMessage);\n return a % b;\n }\n}\n" + }, + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"../utils/Context.sol\";\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor () internal {\n address msgSender = _msgSender();\n _owner = msgSender;\n emit OwnershipTransferred(address(0), msgSender);\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n emit OwnershipTransferred(_owner, address(0));\n _owner = address(0);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n emit OwnershipTransferred(_owner, newOwner);\n _owner = newOwner;\n }\n}\n" + }, + "@chainlink/contracts/src/v0.6/VRFConsumerBase.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.0;\n\nimport \"./vendor/SafeMathChainlink.sol\";\n\nimport \"./interfaces/LinkTokenInterface.sol\";\n\nimport \"./VRFRequestIDBase.sol\";\n\n/** ****************************************************************************\n * @notice Interface for contracts using VRF randomness\n * *****************************************************************************\n * @dev PURPOSE\n *\n * @dev Reggie the Random Oracle (not his real job) wants to provide randomness\n * @dev to Vera the verifier in such a way that Vera can be sure he's not\n * @dev making his output up to suit himself. Reggie provides Vera a public key\n * @dev to which he knows the secret key. Each time Vera provides a seed to\n * @dev Reggie, he gives back a value which is computed completely\n * @dev deterministically from the seed and the secret key.\n *\n * @dev Reggie provides a proof by which Vera can verify that the output was\n * @dev correctly computed once Reggie tells it to her, but without that proof,\n * @dev the output is indistinguishable to her from a uniform random sample\n * @dev from the output space.\n *\n * @dev The purpose of this contract is to make it easy for unrelated contracts\n * @dev to talk to Vera the verifier about the work Reggie is doing, to provide\n * @dev simple access to a verifiable source of randomness.\n * *****************************************************************************\n * @dev USAGE\n *\n * @dev Calling contracts must inherit from VRFConsumerBase, and can\n * @dev initialize VRFConsumerBase's attributes in their constructor as\n * @dev shown:\n *\n * @dev contract VRFConsumer {\n * @dev constuctor(, address _vrfCoordinator, address _link)\n * @dev VRFConsumerBase(_vrfCoordinator, _link) public {\n * @dev \n * @dev }\n * @dev }\n *\n * @dev The oracle will have given you an ID for the VRF keypair they have\n * @dev committed to (let's call it keyHash), and have told you the minimum LINK\n * @dev price for VRF service. Make sure your contract has sufficient LINK, and\n * @dev call requestRandomness(keyHash, fee, seed), where seed is the input you\n * @dev want to generate randomness from.\n *\n * @dev Once the VRFCoordinator has received and validated the oracle's response\n * @dev to your request, it will call your contract's fulfillRandomness method.\n *\n * @dev The randomness argument to fulfillRandomness is the actual random value\n * @dev generated from your seed.\n *\n * @dev The requestId argument is generated from the keyHash and the seed by\n * @dev makeRequestId(keyHash, seed). If your contract could have concurrent\n * @dev requests open, you can use the requestId to track which seed is\n * @dev associated with which randomness. See VRFRequestIDBase.sol for more\n * @dev details. (See \"SECURITY CONSIDERATIONS\" for principles to keep in mind,\n * @dev if your contract could have multiple requests in flight simultaneously.)\n *\n * @dev Colliding `requestId`s are cryptographically impossible as long as seeds\n * @dev differ. (Which is critical to making unpredictable randomness! See the\n * @dev next section.)\n *\n * *****************************************************************************\n * @dev SECURITY CONSIDERATIONS\n *\n * @dev A method with the ability to call your fulfillRandomness method directly\n * @dev could spoof a VRF response with any random value, so it's critical that\n * @dev it cannot be directly called by anything other than this base contract\n * @dev (specifically, by the VRFConsumerBase.rawFulfillRandomness method).\n *\n * @dev For your users to trust that your contract's random behavior is free\n * @dev from malicious interference, it's best if you can write it so that all\n * @dev behaviors implied by a VRF response are executed *during* your\n * @dev fulfillRandomness method. If your contract must store the response (or\n * @dev anything derived from it) and use it later, you must ensure that any\n * @dev user-significant behavior which depends on that stored value cannot be\n * @dev manipulated by a subsequent VRF request.\n *\n * @dev Similarly, both miners and the VRF oracle itself have some influence\n * @dev over the order in which VRF responses appear on the blockchain, so if\n * @dev your contract could have multiple VRF requests in flight simultaneously,\n * @dev you must ensure that the order in which the VRF responses arrive cannot\n * @dev be used to manipulate your contract's user-significant behavior.\n *\n * @dev Since the ultimate input to the VRF is mixed with the block hash of the\n * @dev block in which the request is made, user-provided seeds have no impact\n * @dev on its economic security properties. They are only included for API\n * @dev compatability with previous versions of this contract.\n *\n * @dev Since the block hash of the block which contains the requestRandomness\n * @dev call is mixed into the input to the VRF *last*, a sufficiently powerful\n * @dev miner could, in principle, fork the blockchain to evict the block\n * @dev containing the request, forcing the request to be included in a\n * @dev different block with a different hash, and therefore a different input\n * @dev to the VRF. However, such an attack would incur a substantial economic\n * @dev cost. This cost scales with the number of blocks the VRF oracle waits\n * @dev until it calls responds to a request.\n */\nabstract contract VRFConsumerBase is VRFRequestIDBase {\n\n using SafeMathChainlink for uint256;\n\n /**\n * @notice fulfillRandomness handles the VRF response. Your contract must\n * @notice implement it. See \"SECURITY CONSIDERATIONS\" above for important\n * @notice principles to keep in mind when implementing your fulfillRandomness\n * @notice method.\n *\n * @dev VRFConsumerBase expects its subcontracts to have a method with this\n * @dev signature, and will call it once it has verified the proof\n * @dev associated with the randomness. (It is triggered via a call to\n * @dev rawFulfillRandomness, below.)\n *\n * @param requestId The Id initially returned by requestRandomness\n * @param randomness the VRF output\n */\n function fulfillRandomness(bytes32 requestId, uint256 randomness)\n internal virtual;\n\n /**\n * @notice requestRandomness initiates a request for VRF output given _seed\n *\n * @dev The fulfillRandomness method receives the output, once it's provided\n * @dev by the Oracle, and verified by the vrfCoordinator.\n *\n * @dev The _keyHash must already be registered with the VRFCoordinator, and\n * @dev the _fee must exceed the fee specified during registration of the\n * @dev _keyHash.\n *\n * @dev The _seed parameter is vestigial, and is kept only for API\n * @dev compatibility with older versions. It can't *hurt* to mix in some of\n * @dev your own randomness, here, but it's not necessary because the VRF\n * @dev oracle will mix the hash of the block containing your request into the\n * @dev VRF seed it ultimately uses.\n *\n * @param _keyHash ID of public key against which randomness is generated\n * @param _fee The amount of LINK to send with the request\n * @param _seed seed mixed into the input of the VRF.\n *\n * @return requestId unique ID for this request\n *\n * @dev The returned requestId can be used to distinguish responses to\n * @dev concurrent requests. It is passed as the first argument to\n * @dev fulfillRandomness.\n */\n function requestRandomness(bytes32 _keyHash, uint256 _fee, uint256 _seed)\n internal returns (bytes32 requestId)\n {\n LINK.transferAndCall(vrfCoordinator, _fee, abi.encode(_keyHash, _seed));\n // This is the seed passed to VRFCoordinator. The oracle will mix this with\n // the hash of the block containing this request to obtain the seed/input\n // which is finally passed to the VRF cryptographic machinery.\n uint256 vRFSeed = makeVRFInputSeed(_keyHash, _seed, address(this), nonces[_keyHash]);\n // nonces[_keyHash] must stay in sync with\n // VRFCoordinator.nonces[_keyHash][this], which was incremented by the above\n // successful LINK.transferAndCall (in VRFCoordinator.randomnessRequest).\n // This provides protection against the user repeating their input seed,\n // which would result in a predictable/duplicate output, if multiple such\n // requests appeared in the same block.\n nonces[_keyHash] = nonces[_keyHash].add(1);\n return makeRequestId(_keyHash, vRFSeed);\n }\n\n LinkTokenInterface immutable internal LINK;\n address immutable private vrfCoordinator;\n\n // Nonces for each VRF key from which randomness has been requested.\n //\n // Must stay in sync with VRFCoordinator[_keyHash][this]\n mapping(bytes32 /* keyHash */ => uint256 /* nonce */) private nonces;\n\n /**\n * @param _vrfCoordinator address of VRFCoordinator contract\n * @param _link address of LINK token contract\n *\n * @dev https://docs.chain.link/docs/link-token-contracts\n */\n constructor(address _vrfCoordinator, address _link) public {\n vrfCoordinator = _vrfCoordinator;\n LINK = LinkTokenInterface(_link);\n }\n\n // rawFulfillRandomness is called by VRFCoordinator when it receives a valid VRF\n // proof. rawFulfillRandomness then calls fulfillRandomness, after validating\n // the origin of the call\n function rawFulfillRandomness(bytes32 requestId, uint256 randomness) external {\n require(msg.sender == vrfCoordinator, \"Only VRFCoordinator can fulfill\");\n fulfillRandomness(requestId, randomness);\n }\n}\n" + }, + "contracts/Interfaces/ERC721.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.6 <0.9.0;\n\ninterface ERC721 {\n enum Stage {Unsold, Seed, Flower, Dead}\n\n struct CryptOrchid {\n string species;\n uint256 plantedAt;\n uint256 waterLevel;\n }\n\n /// @dev This emits when ownership of any NFT changes by any mechanism.\n /// This event emits when NFTs are created (`from` == 0) and destroyed\n /// (`to` == 0). Exception: during contract creation, any number of NFTs\n /// may be created and assigned without emitting Transfer. At the time of\n /// any transfer, the approved address for that NFT (if any) is reset to none.\n event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId);\n\n /// @dev This emits when the approved address for an NFT is changed or\n /// reaffirmed. The zero address indicates there is no approved address.\n /// When a Transfer event emits, this also indicates that the approved\n /// address for that NFT (if any) is reset to none.\n event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId);\n\n /// @dev This emits when an operator is enabled or disabled for an owner.\n /// The operator can manage all NFTs of the owner.\n event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved);\n\n /// @notice Count all NFTs assigned to an owner\n /// @dev NFTs assigned to the zero address are considered invalid, and this\n /// function throws for queries about the zero address.\n /// @param _owner An address for whom to query the balance\n /// @return The number of NFTs owned by `_owner`, possibly zero\n function balanceOf(address _owner) external view returns (uint256);\n\n /// @notice Find the owner of an NFT\n /// @dev NFTs assigned to zero address are considered invalid, and queries\n /// about them do throw.\n /// @param _tokenId The identifier for an NFT\n /// @return The address of the owner of the NFT\n function ownerOf(uint256 _tokenId) external view returns (address);\n\n /// @notice Transfers the ownership of an NFT from one address to another address\n /// @dev Throws unless `msg.sender` is the current owner, an authorized\n /// operator, or the approved address for this NFT. Throws if `_from` is\n /// not the current owner. Throws if `_to` is the zero address. Throws if\n /// `_tokenId` is not a valid NFT. When transfer is complete, this function\n /// checks if `_to` is a smart contract (code size > 0). If so, it calls\n /// `onERC721Received` on `_to` and throws if the return value is not\n /// `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`.\n /// @param _from The current owner of the NFT\n /// @param _to The new owner\n /// @param _tokenId The NFT to transfer\n /// @param data Additional data with no specified format, sent in call to `_to`\n function safeTransferFrom(\n address _from,\n address _to,\n uint256 _tokenId,\n bytes calldata data\n ) external payable;\n\n /// @notice Transfers the ownership of an NFT from one address to another address\n /// @dev This works identically to the other function with an extra data parameter,\n /// except this function just sets data to \"\".\n /// @param _from The current owner of the NFT\n /// @param _to The new owner\n /// @param _tokenId The NFT to transfer\n function safeTransferFrom(\n address _from,\n address _to,\n uint256 _tokenId\n ) external payable;\n\n /// @notice Transfer ownership of an NFT -- THE CALLER IS RESPONSIBLE\n /// TO CONFIRM THAT `_to` IS CAPABLE OF RECEIVING NFTS OR ELSE\n /// THEY MAY BE PERMANENTLY LOST\n /// @dev Throws unless `msg.sender` is the current owner, an authorized\n /// operator, or the approved address for this NFT. Throws if `_from` is\n /// not the current owner. Throws if `_to` is the zero address. Throws if\n /// `_tokenId` is not a valid NFT.\n /// @param _from The current owner of the NFT\n /// @param _to The new owner\n /// @param _tokenId The NFT to transfer\n function transferFrom(\n address _from,\n address _to,\n uint256 _tokenId\n ) external payable;\n\n /// @notice Change or reaffirm the approved address for an NFT\n /// @dev The zero address indicates there is no approved address.\n /// Throws unless `msg.sender` is the current NFT owner, or an authorized\n /// operator of the current owner.\n /// @param _approved The new approved NFT controller\n /// @param _tokenId The NFT to approve\n function approve(address _approved, uint256 _tokenId) external payable;\n\n /// @notice Enable or disable approval for a third party (\"operator\") to manage\n /// all of `msg.sender`'s assets\n /// @dev Emits the ApprovalForAll event. The contract MUST allow\n /// multiple operators per owner.\n /// @param _operator Address to add to the set of authorized operators\n /// @param _approved True if the operator is approved, false to revoke approval\n function setApprovalForAll(address _operator, bool _approved) external;\n\n /// @notice Get the approved address for a single NFT\n /// @dev Throws if `_tokenId` is not a valid NFT.\n /// @param _tokenId The NFT to find the approved address for\n /// @return The approved address for this NFT, or the zero address if there is none\n function getApproved(uint256 _tokenId) external view returns (address);\n\n /// @notice Query if an address is an authorized operator for another address\n /// @param _owner The address that owns the NFTs\n /// @param _operator The address that acts on behalf of the owner\n /// @return True if `_operator` is an approved operator for `_owner`, false otherwise\n function isApprovedForAll(address _owner, address _operator) external view returns (bool);\n\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 tokenId);\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 function flowering(uint256 tokenId) external view returns (bool);\n\n function currentPrice() external view returns (uint256 price);\n\n function getTokenMetadata(uint256 tokenId)\n external\n view\n returns (\n string memory,\n uint256,\n uint256,\n Stage\n );\n}\n" + }, + "contracts/Libraries/CurrentTime.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.6 <0.9.0;\n\ncontract CurrentTime {\n function currentTime() internal view virtual returns (uint256) {\n return block.timestamp;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <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 GSN 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 payable) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes memory) {\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\n return msg.data;\n }\n}\n" + }, + "@chainlink/contracts/src/v0.6/vendor/SafeMathChainlink.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.0;\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeMathChainlink {\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 * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, \"SafeMath: addition overflow\");\n\n return c;\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 * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n require(b <= a, \"SafeMath: subtraction overflow\");\n uint256 c = a - b;\n\n return c;\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 * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\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-solidity/pull/522\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts 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 * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // Solidity only automatically asserts when dividing by 0\n require(b > 0, \"SafeMath: division by zero\");\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n\n return c;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts 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 * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n require(b != 0, \"SafeMath: modulo by zero\");\n return a % b;\n }\n}\n" + }, + "@chainlink/contracts/src/v0.6/interfaces/LinkTokenInterface.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.0;\n\ninterface LinkTokenInterface {\n function allowance(address owner, address spender) external view returns (uint256 remaining);\n function approve(address spender, uint256 value) external returns (bool success);\n function balanceOf(address owner) external view returns (uint256 balance);\n function decimals() external view returns (uint8 decimalPlaces);\n function decreaseApproval(address spender, uint256 addedValue) external returns (bool success);\n function increaseApproval(address spender, uint256 subtractedValue) external;\n function name() external view returns (string memory tokenName);\n function symbol() external view returns (string memory tokenSymbol);\n function totalSupply() external view returns (uint256 totalTokensIssued);\n function transfer(address to, uint256 value) external returns (bool success);\n function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool success);\n function transferFrom(address from, address to, uint256 value) external returns (bool success);\n}\n" + }, + "@chainlink/contracts/src/v0.6/VRFRequestIDBase.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.0;\n\ncontract VRFRequestIDBase {\n\n /**\n * @notice returns the seed which is actually input to the VRF coordinator\n *\n * @dev To prevent repetition of VRF output due to repetition of the\n * @dev user-supplied seed, that seed is combined in a hash with the\n * @dev user-specific nonce, and the address of the consuming contract. The\n * @dev risk of repetition is mostly mitigated by inclusion of a blockhash in\n * @dev the final seed, but the nonce does protect against repetition in\n * @dev requests which are included in a single block.\n *\n * @param _userSeed VRF seed input provided by user\n * @param _requester Address of the requesting contract\n * @param _nonce User-specific nonce at the time of the request\n */\n function makeVRFInputSeed(bytes32 _keyHash, uint256 _userSeed,\n address _requester, uint256 _nonce)\n internal pure returns (uint256)\n {\n return uint256(keccak256(abi.encode(_keyHash, _userSeed, _requester, _nonce)));\n }\n\n /**\n * @notice Returns the id for this request\n * @param _keyHash The serviceAgreement ID to be used for this request\n * @param _vRFInputSeed The seed to be passed directly to the VRF\n * @return The id for this request\n *\n * @dev Note that _vRFInputSeed is not the seed passed by the consuming\n * @dev contract, but the one generated by makeVRFInputSeed\n */\n function makeRequestId(\n bytes32 _keyHash, uint256 _vRFInputSeed) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(_keyHash, _vRFInputSeed));\n }\n}\n" + }, + "contracts/test/CouponMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.6 <0.9.0;\n\nimport \"../Coupon/Coupon.sol\";\n\n// DEBUG\n\nimport \"hardhat/console.sol\";\n\ncontract CouponMock is Coupon {\n event Redemption(address account, uint256 rebate);\n event RequestedRandomness(bytes32 requestId);\n\n uint256 internal secondsToAdd = 0;\n\n constructor(\n address cryptorchidsAddress,\n address _VRFCoordinator,\n address _LinkToken,\n bytes32 _keyhash\n ) public payable Coupon(cryptorchidsAddress, _VRFCoordinator, _LinkToken, _keyhash) {}\n\n /**\n * @dev calls checkEligibility and sets all eligibleTokens as redeemed.\n * Then transfers caller rebateAmount.\n */\n function redeem() public virtual override returns (uint256) {\n uint256 rebateAmount = super.redeem();\n emit Redemption(msg.sender, rebateAmount);\n return rebateAmount;\n }\n\n function selectWinner(uint256 userProvidedSeed) public override {\n super.selectWinner(userProvidedSeed);\n emit RequestedRandomness(randomWinnerRequestId);\n }\n\n function timeTravel(uint256 s) public {\n secondsToAdd = s;\n }\n\n function currentTime() internal view virtual override returns (uint256) {\n return block.timestamp + secondsToAdd;\n }\n}\n" + }, + "hardhat/console.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >= 0.4.22 <0.9.0;\n\nlibrary console {\n\taddress constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\n\n\tfunction _sendLogPayload(bytes memory payload) private view {\n\t\tuint256 payloadLength = payload.length;\n\t\taddress consoleAddress = CONSOLE_ADDRESS;\n\t\tassembly {\n\t\t\tlet payloadStart := add(payload, 32)\n\t\t\tlet r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\n\t\t}\n\t}\n\n\tfunction log() internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log()\"));\n\t}\n\n\tfunction logInt(int p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(int)\", p0));\n\t}\n\n\tfunction logUint(uint p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n\t}\n\n\tfunction logString(string memory p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n\t}\n\n\tfunction logBool(bool p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n\t}\n\n\tfunction logAddress(address p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n\t}\n\n\tfunction logBytes(bytes memory p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes)\", p0));\n\t}\n\n\tfunction logBytes1(bytes1 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes1)\", p0));\n\t}\n\n\tfunction logBytes2(bytes2 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes2)\", p0));\n\t}\n\n\tfunction logBytes3(bytes3 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes3)\", p0));\n\t}\n\n\tfunction logBytes4(bytes4 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes4)\", p0));\n\t}\n\n\tfunction logBytes5(bytes5 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes5)\", p0));\n\t}\n\n\tfunction logBytes6(bytes6 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes6)\", p0));\n\t}\n\n\tfunction logBytes7(bytes7 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes7)\", p0));\n\t}\n\n\tfunction logBytes8(bytes8 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes8)\", p0));\n\t}\n\n\tfunction logBytes9(bytes9 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes9)\", p0));\n\t}\n\n\tfunction logBytes10(bytes10 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes10)\", p0));\n\t}\n\n\tfunction logBytes11(bytes11 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes11)\", p0));\n\t}\n\n\tfunction logBytes12(bytes12 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes12)\", p0));\n\t}\n\n\tfunction logBytes13(bytes13 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes13)\", p0));\n\t}\n\n\tfunction logBytes14(bytes14 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes14)\", p0));\n\t}\n\n\tfunction logBytes15(bytes15 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes15)\", p0));\n\t}\n\n\tfunction logBytes16(bytes16 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes16)\", p0));\n\t}\n\n\tfunction logBytes17(bytes17 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes17)\", p0));\n\t}\n\n\tfunction logBytes18(bytes18 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes18)\", p0));\n\t}\n\n\tfunction logBytes19(bytes19 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes19)\", p0));\n\t}\n\n\tfunction logBytes20(bytes20 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes20)\", p0));\n\t}\n\n\tfunction logBytes21(bytes21 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes21)\", p0));\n\t}\n\n\tfunction logBytes22(bytes22 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes22)\", p0));\n\t}\n\n\tfunction logBytes23(bytes23 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes23)\", p0));\n\t}\n\n\tfunction logBytes24(bytes24 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes24)\", p0));\n\t}\n\n\tfunction logBytes25(bytes25 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes25)\", p0));\n\t}\n\n\tfunction logBytes26(bytes26 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes26)\", p0));\n\t}\n\n\tfunction logBytes27(bytes27 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes27)\", p0));\n\t}\n\n\tfunction logBytes28(bytes28 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes28)\", p0));\n\t}\n\n\tfunction logBytes29(bytes29 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes29)\", p0));\n\t}\n\n\tfunction logBytes30(bytes30 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes30)\", p0));\n\t}\n\n\tfunction logBytes31(bytes31 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes31)\", p0));\n\t}\n\n\tfunction logBytes32(bytes32 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes32)\", p0));\n\t}\n\n\tfunction log(uint p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n\t}\n\n\tfunction log(string memory p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n\t}\n\n\tfunction log(bool p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n\t}\n\n\tfunction log(address p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n\t}\n\n\tfunction log(uint p0, uint p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint)\", p0, p1));\n\t}\n\n\tfunction log(uint p0, string memory p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string)\", p0, p1));\n\t}\n\n\tfunction log(uint p0, bool p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool)\", p0, p1));\n\t}\n\n\tfunction log(uint p0, address p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address)\", p0, p1));\n\t}\n\n\tfunction log(string memory p0, uint p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint)\", p0, p1));\n\t}\n\n\tfunction log(string memory p0, string memory p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n\t}\n\n\tfunction log(string memory p0, bool p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool)\", p0, p1));\n\t}\n\n\tfunction log(string memory p0, address p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address)\", p0, p1));\n\t}\n\n\tfunction log(bool p0, uint p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint)\", p0, p1));\n\t}\n\n\tfunction log(bool p0, string memory p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string)\", p0, p1));\n\t}\n\n\tfunction log(bool p0, bool p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool)\", p0, p1));\n\t}\n\n\tfunction log(bool p0, address p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address)\", p0, p1));\n\t}\n\n\tfunction log(address p0, uint p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint)\", p0, p1));\n\t}\n\n\tfunction log(address p0, string memory p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string)\", p0, p1));\n\t}\n\n\tfunction log(address p0, bool p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool)\", p0, p1));\n\t}\n\n\tfunction log(address p0, address p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address)\", p0, p1));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, address p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, address p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, uint p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, bool p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, address p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, address p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, address p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,address)\", p0, p1, p2, p3));\n\t}\n\n}\n" + }, + "contracts/test/CurrentTimeMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.6 <0.9.0;\n\nimport \"../Libraries/CurrentTime.sol\";\n\ncontract CurrentTimeMock is CurrentTime {\n uint256 internal secondsToAdd = 0;\n}\n" + }, + "contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol": { + "content": "// SPDX-License-Identifier: MIT\n\n// NB: this is only meant to deploy to goerli, where chainlink VRF is unavailable.\n// goerli connects to polygon mumbai, which is what we need to test PoS bridging.\n// Deploy scripts prevent other contracts from goerli deploy, and this contract from\n// anything other than goerlui\npragma solidity >=0.6.6 <0.9.0;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts/math/SafeMath.sol\";\nimport \"@openzeppelin/contracts/presets/ERC721PresetMinterPauserAutoId.sol\";\nimport \"@openzeppelin/contracts/utils/Counters.sol\";\nimport \"../Libraries/CurrentTime.sol\";\n\ncontract CryptOrchidGoerli is ERC721PresetMinterPauserAutoId, Ownable, CurrentTime {\n using SafeMath for uint256;\n using Strings for string;\n using Counters for Counters.Counter;\n\n struct CryptOrchid {\n string species;\n uint256 plantedAt;\n uint256 waterLevel;\n }\n mapping(uint256 => CryptOrchid) public cryptorchids;\n\n enum Stage {Unsold, Seed, Flower, Dead}\n\n bool internal saleStarted = false;\n bool internal growingStarted = false;\n\n uint256 public constant MAX_CRYPTORCHIDS = 10000;\n uint256 public constant GROWTH_CYCLE = 604800; // 7 days\n uint256 public constant WATERING_WINDOW = 10800; // 3 hours\n uint256 internal constant MAX_TIMESTAMP = 2**256 - 1;\n string internal constant GRANUM_IPFS = \"QmWd1mn7DuGyx9ByfNeqCsgdSUsJZ1cragitgaygsqDvEm\";\n\n uint16[10] private limits = [0, 3074, 6074, 8074, 9074, 9574, 9824, 9924, 9974, 9999];\n string[10] private genum = [\n \"shenzhenica orchidaceae\",\n \"phalaenopsis micholitzii\",\n \"guarianthe aurantiaca\",\n \"vanda coerulea\",\n \"cypripedium calceolus\",\n \"paphiopedilum vietnamense\",\n \"miltonia kayasimae\",\n \"platanthera azorica\",\n \"dendrophylax lindenii\",\n \"paphiopedilum rothschildianum\"\n ];\n\n string[10] private speciesIPFSConstant = [\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/shenzhenica-orchidaceae.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/phalaenopsis-micholitzii.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/guarianthe-aurantiaca.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/vanda-coerulea.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/cypripedium-calceolus.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/paphiopedilum-vietnamense.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/miltonia-kayasimae.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/platanthera-azorica.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/dendrophylax-lindenii.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/paphiopedilum-rothschildianum.json\"\n ];\n\n string[10] private deadSpeciesIPFSConstant = [\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/shenzhenica-orchidaceae.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/phalaenopsis-micholitzii.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/guarianthe-aurantiaca.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/vanda-coerulea.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/cypripedium-calceolus.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/paphiopedilum-vietnamense.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/miltonia-kayasimae.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/platanthera-azorica.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/dendrophylax-lindenii.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/paphiopedilum-rothschildianum.json\"\n ];\n\n Counters.Counter private _tokenIds;\n\n mapping(bytes32 => uint256) public requestToToken;\n mapping(bytes32 => string) private speciesIPFS;\n mapping(bytes32 => string) private deadSpeciesIPFS;\n\n constructor() public payable ERC721PresetMinterPauserAutoId(\"CryptOrchids\", \"ORCHD\", \"ipfs://\") {\n for (uint256 index = 0; index < genum.length; index++) {\n speciesIPFS[keccak256(abi.encode(genum[index]))] = speciesIPFSConstant[index];\n deadSpeciesIPFS[keccak256(abi.encode(genum[index]))] = deadSpeciesIPFSConstant[index];\n }\n }\n\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\n (string memory species, , , ) = getTokenMetadata(tokenId);\n\n if (growthStage(tokenId) == Stage.Seed) {\n return string(abi.encodePacked(baseURI(), GRANUM_IPFS));\n }\n\n if (growthStage(tokenId) == Stage.Flower) {\n return string(abi.encodePacked(baseURI(), speciesIPFS[keccak256(abi.encode(species))]));\n }\n\n return string(abi.encodePacked(baseURI(), deadSpeciesIPFS[keccak256(abi.encode(species))]));\n }\n\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 tokenId\n ) internal virtual override {\n require(address(0) == to || alive(tokenId), \"Dead CryptOrchids cannot be transferred\");\n super._beforeTokenTransfer(from, to, tokenId);\n }\n\n function currentPrice() public view returns (uint256 price) {\n uint256 currentSupply = totalSupply();\n if (currentSupply >= 9900) {\n return 1000000000000000000; // 9900+: 1.00 ETH\n } else if (currentSupply >= 9500) {\n return 640000000000000000; // 9500-9500: 0.64 ETH\n } else if (currentSupply >= 7500) {\n return 320000000000000000; // 7500-9500: 0.32 ETH\n } else if (currentSupply >= 3500) {\n return 160000000000000000; // 3500-7500: 0.16 ETH\n } else if (currentSupply >= 1500) {\n return 80000000000000000; // 1500-3500: 0.08 ETH\n } else if (currentSupply >= 500) {\n return 60000000000000000; // 500-1500: 0.06 ETH\n } else {\n return 40000000000000000; // 0 - 500 0.04 ETH\n }\n }\n\n function startSale() public onlyOwner {\n saleStarted = true;\n }\n\n function startGrowing() public onlyOwner {\n growingStarted = true;\n }\n\n /**\n * @dev Withdraw ether from this contract (Callable by owner only)\n */\n function withdraw() public onlyOwner {\n uint256 balance = address(this).balance;\n msg.sender.transfer(balance);\n }\n\n receive() external payable {}\n\n function webMint(uint256 units) public payable {\n require(saleStarted, \"The Nursery is closed\");\n require(units <= MAX_CRYPTORCHIDS - totalSupply(), \"Not enough bulbs left\");\n require(totalSupply() < MAX_CRYPTORCHIDS, \"Sale has already ended\");\n require(units > 0 && units <= 20, \"You can plant minimum 1, maximum 20 CryptOrchids\");\n require(SafeMath.add(totalSupply(), units) <= MAX_CRYPTORCHIDS, \"Exceeds MAX_CRYPTORCHIDS\");\n require(msg.value >= SafeMath.mul(currentPrice(), units), \"Ether value sent is below the price\");\n\n for (uint256 i = 0; i < units; i++) {\n _tokenIds.increment();\n uint256 newItemId = _tokenIds.current();\n cryptorchids[newItemId] = CryptOrchid({species: \"granum\", plantedAt: MAX_TIMESTAMP, waterLevel: 0});\n _safeMint(msg.sender, newItemId);\n }\n }\n\n function germinate(uint256 tokenId, uint256 userProvidedSeed) public {\n require(growingStarted, \"Germination starts 2021-04-12T16:00:00Z\");\n require(_isApprovedOrOwner(_msgSender(), tokenId), \"Only the Owner can germinate a CryptOrchid.\");\n _requestRandom(tokenId, userProvidedSeed);\n }\n\n function _requestRandom(uint256 tokenId, uint256 userProvidedSeed) internal returns (bytes32 requestId) {\n uint256 pseudoRand = uint256(keccak256(abi.encodePacked(block.timestamp, block.difficulty, userProvidedSeed)));\n fulfillRandomness(tokenId, pseudoRand);\n }\n\n function fulfillRandomness(uint256 tokenId, uint256 randomness) internal {\n CryptOrchid storage orchid = cryptorchids[tokenId];\n string memory species = pickSpecies(SafeMath.mod(randomness, 10000));\n orchid.species = species;\n orchid.plantedAt = currentTime();\n address tokenOwner = ownerOf(tokenId);\n }\n\n function alive(uint256 tokenId) public view returns (bool) {\n return growthStage(tokenId) != Stage.Dead;\n }\n\n function flowering(uint256 tokenId) public view returns (bool) {\n return growthStage(tokenId) == Stage.Flower;\n }\n\n function growthStage(uint256 tokenId) public view returns (Stage) {\n CryptOrchid memory orchid = cryptorchids[tokenId];\n if (orchid.plantedAt == 0) return Stage.Unsold;\n if (orchid.plantedAt == MAX_TIMESTAMP) return Stage.Seed;\n uint256 currentWaterLevel = orchid.waterLevel;\n uint256 elapsed = currentTime() - orchid.plantedAt;\n uint256 fullCycles = SafeMath.div(uint256(elapsed), GROWTH_CYCLE);\n uint256 modulo = SafeMath.mod(elapsed, GROWTH_CYCLE);\n\n if (currentWaterLevel == fullCycles) {\n return Stage.Flower;\n }\n\n if (SafeMath.add(currentWaterLevel, 1) == fullCycles && modulo < WATERING_WINDOW) {\n return Stage.Flower;\n }\n\n return Stage.Dead;\n }\n\n function water(uint256 tokenId) public {\n require(_isApprovedOrOwner(_msgSender(), tokenId), \"Only the Owner can water a CryptOrchid.\");\n\n if (!alive(tokenId)) {\n return;\n }\n\n CryptOrchid storage orchid = cryptorchids[tokenId];\n\n uint256 wateringLevel = orchid.waterLevel;\n uint256 elapsed = currentTime() - orchid.plantedAt;\n uint256 fullCycles = SafeMath.div(uint256(elapsed), GROWTH_CYCLE);\n\n if (wateringLevel > fullCycles) {\n return;\n }\n\n uint256 newWaterLevel = SafeMath.add(wateringLevel, 1);\n orchid.waterLevel = newWaterLevel;\n }\n\n function getTokenMetadata(uint256 tokenId)\n public\n view\n returns (\n string memory,\n uint256,\n uint256,\n Stage\n )\n {\n return (\n cryptorchids[tokenId].species,\n cryptorchids[tokenId].plantedAt,\n cryptorchids[tokenId].waterLevel,\n growthStage(tokenId)\n );\n }\n\n /**\n * @notice Pick species for random number index\n * @param randomIndex uint256\n * @return species string\n */\n function pickSpecies(uint256 randomIndex) private view returns (string memory) {\n for (uint256 i = 0; i < 10; i++) {\n if (randomIndex <= limits[i]) {\n return genum[i];\n }\n }\n }\n}\n" + }, + "@openzeppelin/contracts/presets/ERC721PresetMinterPauserAutoId.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"../access/AccessControl.sol\";\nimport \"../utils/Context.sol\";\nimport \"../utils/Counters.sol\";\nimport \"../token/ERC721/ERC721.sol\";\nimport \"../token/ERC721/ERC721Burnable.sol\";\nimport \"../token/ERC721/ERC721Pausable.sol\";\n\n/**\n * @dev {ERC721} token, including:\n *\n * - ability for holders to burn (destroy) their tokens\n * - a minter role that allows for token minting (creation)\n * - a pauser role that allows to stop all token transfers\n * - token ID and URI autogeneration\n *\n * This contract uses {AccessControl} to lock permissioned functions using the\n * different roles - head to its documentation for details.\n *\n * The account that deploys the contract will be granted the minter and pauser\n * roles, as well as the default admin role, which will let it grant both minter\n * and pauser roles to other accounts.\n */\ncontract ERC721PresetMinterPauserAutoId is Context, AccessControl, ERC721Burnable, ERC721Pausable {\n using Counters for Counters.Counter;\n\n bytes32 public constant MINTER_ROLE = keccak256(\"MINTER_ROLE\");\n bytes32 public constant PAUSER_ROLE = keccak256(\"PAUSER_ROLE\");\n\n Counters.Counter private _tokenIdTracker;\n\n /**\n * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE` and `PAUSER_ROLE` to the\n * account that deploys the contract.\n *\n * Token URIs will be autogenerated based on `baseURI` and their token IDs.\n * See {ERC721-tokenURI}.\n */\n constructor(string memory name, string memory symbol, string memory baseURI) public ERC721(name, symbol) {\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n\n _setupRole(MINTER_ROLE, _msgSender());\n _setupRole(PAUSER_ROLE, _msgSender());\n\n _setBaseURI(baseURI);\n }\n\n /**\n * @dev Creates a new token for `to`. Its token ID will be automatically\n * assigned (and available on the emitted {IERC721-Transfer} event), and the token\n * URI autogenerated based on the base URI passed at construction.\n *\n * See {ERC721-_mint}.\n *\n * Requirements:\n *\n * - the caller must have the `MINTER_ROLE`.\n */\n function mint(address to) public virtual {\n require(hasRole(MINTER_ROLE, _msgSender()), \"ERC721PresetMinterPauserAutoId: must have minter role to mint\");\n\n // We cannot just use balanceOf to create the new tokenId because tokens\n // can be burned (destroyed), so we need a separate counter.\n _mint(to, _tokenIdTracker.current());\n _tokenIdTracker.increment();\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() public virtual {\n require(hasRole(PAUSER_ROLE, _msgSender()), \"ERC721PresetMinterPauserAutoId: must have pauser role to pause\");\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() public virtual {\n require(hasRole(PAUSER_ROLE, _msgSender()), \"ERC721PresetMinterPauserAutoId: must have pauser role to unpause\");\n _unpause();\n }\n\n function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override(ERC721, ERC721Pausable) {\n super._beforeTokenTransfer(from, to, tokenId);\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Counters.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"../math/SafeMath.sol\";\n\n/**\n * @title Counters\n * @author Matt Condon (@shrugs)\n * @dev Provides counters that can only be incremented or decremented by one. This can be used e.g. to track the number\n * of elements in a mapping, issuing ERC721 ids, or counting request ids.\n *\n * Include with `using Counters for Counters.Counter;`\n * Since it is not possible to overflow a 256 bit integer with increments of one, `increment` can skip the {SafeMath}\n * overflow check, thereby saving gas. This does assume however correct usage, in that the underlying `_value` is never\n * directly accessed.\n */\nlibrary Counters {\n using SafeMath for uint256;\n\n struct Counter {\n // This variable should never be directly accessed by users of the library: interactions must be restricted to\n // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\n // this feature: see https://github.com/ethereum/solidity/issues/4637\n uint256 _value; // default: 0\n }\n\n function current(Counter storage counter) internal view returns (uint256) {\n return counter._value;\n }\n\n function increment(Counter storage counter) internal {\n // The {SafeMath} overflow check can be skipped here, see the comment at the top\n counter._value += 1;\n }\n\n function decrement(Counter storage counter) internal {\n counter._value = counter._value.sub(1);\n }\n}\n" + }, + "@openzeppelin/contracts/access/AccessControl.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"../utils/EnumerableSet.sol\";\nimport \"../utils/Address.sol\";\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module that allows children to implement role-based access\n * control mechanisms.\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 * ```\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 * ```\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.\n */\nabstract contract AccessControl is Context {\n using EnumerableSet for EnumerableSet.AddressSet;\n using Address for address;\n\n struct RoleData {\n EnumerableSet.AddressSet 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 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 {_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) public view returns (bool) {\n return _roles[role].members.contains(account);\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 returns (uint256) {\n return _roles[role].members.length();\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 returns (address) {\n return _roles[role].members.at(index);\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 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 function grantRole(bytes32 role, address account) public virtual {\n require(hasRole(_roles[role].adminRole, _msgSender()), \"AccessControl: sender must be an admin to grant\");\n\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 function revokeRole(bytes32 role, address account) public virtual {\n require(hasRole(_roles[role].adminRole, _msgSender()), \"AccessControl: sender must be an admin to revoke\");\n\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 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) public virtual {\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 * [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 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 emit RoleAdminChanged(role, _roles[role].adminRole, adminRole);\n _roles[role].adminRole = adminRole;\n }\n\n function _grantRole(bytes32 role, address account) private {\n if (_roles[role].members.add(account)) {\n emit RoleGranted(role, account, _msgSender());\n }\n }\n\n function _revokeRole(bytes32 role, address account) private {\n if (_roles[role].members.remove(account)) {\n emit RoleRevoked(role, account, _msgSender());\n }\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/ERC721.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"../../utils/Context.sol\";\nimport \"./IERC721.sol\";\nimport \"./IERC721Metadata.sol\";\nimport \"./IERC721Enumerable.sol\";\nimport \"./IERC721Receiver.sol\";\nimport \"../../introspection/ERC165.sol\";\nimport \"../../math/SafeMath.sol\";\nimport \"../../utils/Address.sol\";\nimport \"../../utils/EnumerableSet.sol\";\nimport \"../../utils/EnumerableMap.sol\";\nimport \"../../utils/Strings.sol\";\n\n/**\n * @title ERC721 Non-Fungible Token Standard basic implementation\n * @dev see https://eips.ethereum.org/EIPS/eip-721\n */\ncontract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {\n using SafeMath for uint256;\n using Address for address;\n using EnumerableSet for EnumerableSet.UintSet;\n using EnumerableMap for EnumerableMap.UintToAddressMap;\n using Strings for uint256;\n\n // Equals to `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`\n // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector`\n bytes4 private constant _ERC721_RECEIVED = 0x150b7a02;\n\n // Mapping from holder address to their (enumerable) set of owned tokens\n mapping (address => EnumerableSet.UintSet) private _holderTokens;\n\n // Enumerable mapping from token ids to their owners\n EnumerableMap.UintToAddressMap private _tokenOwners;\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 // Token name\n string private _name;\n\n // Token symbol\n string private _symbol;\n\n // Optional mapping for token URIs\n mapping (uint256 => string) private _tokenURIs;\n\n // Base URI\n string private _baseURI;\n\n /*\n * bytes4(keccak256('balanceOf(address)')) == 0x70a08231\n * bytes4(keccak256('ownerOf(uint256)')) == 0x6352211e\n * bytes4(keccak256('approve(address,uint256)')) == 0x095ea7b3\n * bytes4(keccak256('getApproved(uint256)')) == 0x081812fc\n * bytes4(keccak256('setApprovalForAll(address,bool)')) == 0xa22cb465\n * bytes4(keccak256('isApprovedForAll(address,address)')) == 0xe985e9c5\n * bytes4(keccak256('transferFrom(address,address,uint256)')) == 0x23b872dd\n * bytes4(keccak256('safeTransferFrom(address,address,uint256)')) == 0x42842e0e\n * bytes4(keccak256('safeTransferFrom(address,address,uint256,bytes)')) == 0xb88d4fde\n *\n * => 0x70a08231 ^ 0x6352211e ^ 0x095ea7b3 ^ 0x081812fc ^\n * 0xa22cb465 ^ 0xe985e9c5 ^ 0x23b872dd ^ 0x42842e0e ^ 0xb88d4fde == 0x80ac58cd\n */\n bytes4 private constant _INTERFACE_ID_ERC721 = 0x80ac58cd;\n\n /*\n * bytes4(keccak256('name()')) == 0x06fdde03\n * bytes4(keccak256('symbol()')) == 0x95d89b41\n * bytes4(keccak256('tokenURI(uint256)')) == 0xc87b56dd\n *\n * => 0x06fdde03 ^ 0x95d89b41 ^ 0xc87b56dd == 0x5b5e139f\n */\n bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x5b5e139f;\n\n /*\n * bytes4(keccak256('totalSupply()')) == 0x18160ddd\n * bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) == 0x2f745c59\n * bytes4(keccak256('tokenByIndex(uint256)')) == 0x4f6ccce7\n *\n * => 0x18160ddd ^ 0x2f745c59 ^ 0x4f6ccce7 == 0x780e9d63\n */\n bytes4 private constant _INTERFACE_ID_ERC721_ENUMERABLE = 0x780e9d63;\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_) public {\n _name = name_;\n _symbol = symbol_;\n\n // register the supported interfaces to conform to ERC721 via ERC165\n _registerInterface(_INTERFACE_ID_ERC721);\n _registerInterface(_INTERFACE_ID_ERC721_METADATA);\n _registerInterface(_INTERFACE_ID_ERC721_ENUMERABLE);\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: balance query for the zero address\");\n return _holderTokens[owner].length();\n }\n\n /**\n * @dev See {IERC721-ownerOf}.\n */\n function ownerOf(uint256 tokenId) public view virtual override returns (address) {\n return _tokenOwners.get(tokenId, \"ERC721: owner query for nonexistent token\");\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 require(_exists(tokenId), \"ERC721Metadata: URI query for nonexistent token\");\n\n string memory _tokenURI = _tokenURIs[tokenId];\n string memory base = baseURI();\n\n // If there is no base URI, return the token URI.\n if (bytes(base).length == 0) {\n return _tokenURI;\n }\n // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked).\n if (bytes(_tokenURI).length > 0) {\n return string(abi.encodePacked(base, _tokenURI));\n }\n // If there is a baseURI but no tokenURI, concatenate the tokenID to the baseURI.\n return string(abi.encodePacked(base, tokenId.toString()));\n }\n\n /**\n * @dev Returns the base URI set via {_setBaseURI}. This will be\n * automatically added as a prefix in {tokenURI} to each token's URI, or\n * to the token ID if no specific URI is set for that token ID.\n */\n function baseURI() public view virtual returns (string memory) {\n return _baseURI;\n }\n\n /**\n * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.\n */\n function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {\n return _holderTokens[owner].at(index);\n }\n\n /**\n * @dev See {IERC721Enumerable-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n // _tokenOwners are indexed by tokenIds, so .length() returns the number of tokenIds\n return _tokenOwners.length();\n }\n\n /**\n * @dev See {IERC721Enumerable-tokenByIndex}.\n */\n function tokenByIndex(uint256 index) public view virtual override returns (uint256) {\n (uint256 tokenId, ) = _tokenOwners.at(index);\n return tokenId;\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(_msgSender() == owner || ERC721.isApprovedForAll(owner, _msgSender()),\n \"ERC721: approve caller is not owner nor 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 require(_exists(tokenId), \"ERC721: approved query for nonexistent token\");\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 require(operator != _msgSender(), \"ERC721: approve to caller\");\n\n _operatorApprovals[_msgSender()][operator] = approved;\n emit ApprovalForAll(_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: transfer caller is not owner nor 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: transfer caller is not owner nor 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 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 _tokenOwners.contains(tokenId);\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 require(_exists(tokenId), \"ERC721: operator query for nonexistent token\");\n address owner = ERC721.ownerOf(tokenId);\n return (spender == owner || getApproved(tokenId) == spender || ERC721.isApprovedForAll(owner, spender));\n }\n\n /**\n * @dev Safely mints `tokenId` and transfers it to `to`.\n *\n * Requirements:\n d*\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(_checkOnERC721Received(address(0), to, tokenId, _data), \"ERC721: transfer to non ERC721Receiver implementer\");\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);\n\n _holderTokens[to].add(tokenId);\n\n _tokenOwners.set(tokenId, to);\n\n emit Transfer(address(0), to, tokenId);\n }\n\n /**\n * @dev Destroys `tokenId`.\n * The approval is cleared when the token is burned.\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); // internal owner\n\n _beforeTokenTransfer(owner, address(0), tokenId);\n\n // Clear approvals\n _approve(address(0), tokenId);\n\n // Clear metadata (if any)\n if (bytes(_tokenURIs[tokenId]).length != 0) {\n delete _tokenURIs[tokenId];\n }\n\n _holderTokens[owner].remove(tokenId);\n\n _tokenOwners.remove(tokenId);\n\n emit Transfer(owner, address(0), tokenId);\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 of token that is not own\"); // internal owner\n require(to != address(0), \"ERC721: transfer to the zero address\");\n\n _beforeTokenTransfer(from, to, tokenId);\n\n // Clear approvals from the previous owner\n _approve(address(0), tokenId);\n\n _holderTokens[from].remove(tokenId);\n _holderTokens[to].add(tokenId);\n\n _tokenOwners.set(tokenId, to);\n\n emit Transfer(from, to, tokenId);\n }\n\n /**\n * @dev Sets `_tokenURI` as the tokenURI of `tokenId`.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual {\n require(_exists(tokenId), \"ERC721Metadata: URI set of nonexistent token\");\n _tokenURIs[tokenId] = _tokenURI;\n }\n\n /**\n * @dev Internal function to set the base URI for all token IDs. It is\n * automatically added as a prefix to the value returned in {tokenURI},\n * or to the token ID if {tokenURI} is empty.\n */\n function _setBaseURI(string memory baseURI_) internal virtual {\n _baseURI = baseURI_;\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(address from, address to, uint256 tokenId, bytes memory _data)\n private returns (bool)\n {\n if (!to.isContract()) {\n return true;\n }\n bytes memory returndata = to.functionCall(abi.encodeWithSelector(\n IERC721Receiver(to).onERC721Received.selector,\n _msgSender(),\n from,\n tokenId,\n _data\n ), \"ERC721: transfer to non ERC721Receiver implementer\");\n bytes4 retval = abi.decode(returndata, (bytes4));\n return (retval == _ERC721_RECEIVED);\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); // internal owner\n }\n\n /**\n * @dev Hook that is called before any token transfer. This includes minting\n * and burning.\n *\n * Calling conditions:\n *\n * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be\n * transferred to `to`.\n * - When `from` is zero, `tokenId` will be minted for `to`.\n * - When `to` is zero, ``from``'s `tokenId` will be burned.\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\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 tokenId) internal virtual { }\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/ERC721Burnable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"../../utils/Context.sol\";\nimport \"./ERC721.sol\";\n\n/**\n * @title ERC721 Burnable Token\n * @dev ERC721 Token that can be irreversibly 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), \"ERC721Burnable: caller is not owner nor approved\");\n _burn(tokenId);\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/ERC721Pausable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"./ERC721.sol\";\nimport \"../../utils/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 */\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(address from, address to, uint256 tokenId) internal virtual override {\n super._beforeTokenTransfer(from, to, tokenId);\n\n require(!paused(), \"ERC721Pausable: token transfer while paused\");\n }\n}\n" + }, + "@openzeppelin/contracts/utils/EnumerableSet.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <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 * ```\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 */\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\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) { // 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 // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs\n // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\n\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] = toDeleteIndex + 1; // All indexes are 1-based\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 require(set._values.length > index, \"EnumerableSet: index out of bounds\");\n return set._values[index];\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 // 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 // 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 on 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" + }, + "@openzeppelin/contracts/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.2 <0.8.0;\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 */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n uint256 size;\n // solhint-disable-next-line no-inline-assembly\n assembly { size := extcodesize(account) }\n return size > 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://diligence.consensys.net/posts/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.5.11/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 // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\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 functionCall(target, data, \"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(address target, bytes memory data, string memory errorMessage) 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(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n require(isContract(target), \"Address: call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = target.call{ value: value }(data);\n return _verifyCallResult(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(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\n require(isContract(target), \"Address: static call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = target.staticcall(data);\n return _verifyCallResult(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(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\n require(isContract(target), \"Address: delegate call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return _verifyCallResult(success, returndata, errorMessage);\n }\n\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {\n if (success) {\n return returndata;\n } else {\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\n // solhint-disable-next-line no-inline-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}\n" + }, + "@openzeppelin/contracts/token/ERC721/IERC721.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.2 <0.8.0;\n\nimport \"../../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`, 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 be 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: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\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 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 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 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 /**\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" + }, + "@openzeppelin/contracts/token/ERC721/IERC721Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.2 <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 /**\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" + }, + "@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.2 <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 /**\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 tokenId);\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" + }, + "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <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 `IERC721.onERC721Received.selector`.\n */\n function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) external returns (bytes4);\n}\n" + }, + "@openzeppelin/contracts/introspection/ERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts may inherit from this and call {_registerInterface} to declare\n * their support of an interface.\n */\nabstract contract ERC165 is IERC165 {\n /*\n * bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7\n */\n bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7;\n\n /**\n * @dev Mapping of interface ids to whether or not it's supported.\n */\n mapping(bytes4 => bool) private _supportedInterfaces;\n\n constructor () internal {\n // Derived contracts need only register support for their own interfaces,\n // we register support for ERC165 itself here\n _registerInterface(_INTERFACE_ID_ERC165);\n }\n\n /**\n * @dev See {IERC165-supportsInterface}.\n *\n * Time complexity O(1), guaranteed to always use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return _supportedInterfaces[interfaceId];\n }\n\n /**\n * @dev Registers the contract as an implementer of the interface defined by\n * `interfaceId`. Support of the actual ERC165 interface is automatic and\n * registering its interface id is not required.\n *\n * See {IERC165-supportsInterface}.\n *\n * Requirements:\n *\n * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`).\n */\n function _registerInterface(bytes4 interfaceId) internal virtual {\n require(interfaceId != 0xffffffff, \"ERC165: invalid interface id\");\n _supportedInterfaces[interfaceId] = true;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/EnumerableMap.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\n/**\n * @dev Library for managing an enumerable variant of Solidity's\n * https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]\n * type.\n *\n * Maps have the following properties:\n *\n * - Entries are added, removed, and checked for existence in constant time\n * (O(1)).\n * - Entries are enumerated in O(n). No guarantees are made on the ordering.\n *\n * ```\n * contract Example {\n * // Add the library methods\n * using EnumerableMap for EnumerableMap.UintToAddressMap;\n *\n * // Declare a set state variable\n * EnumerableMap.UintToAddressMap private myMap;\n * }\n * ```\n *\n * As of v3.0.0, only maps of type `uint256 -> address` (`UintToAddressMap`) are\n * supported.\n */\nlibrary EnumerableMap {\n // To implement this library for multiple types with as little code\n // repetition as possible, we write it in terms of a generic Map type with\n // bytes32 keys and values.\n // The Map implementation uses private functions, and user-facing\n // implementations (such as Uint256ToAddressMap) are just wrappers around\n // the underlying Map.\n // This means that we can only create new EnumerableMaps for types that fit\n // in bytes32.\n\n struct MapEntry {\n bytes32 _key;\n bytes32 _value;\n }\n\n struct Map {\n // Storage of map keys and values\n MapEntry[] _entries;\n\n // Position of the entry defined by a key in the `entries` array, plus 1\n // because index 0 means a key is not in the map.\n mapping (bytes32 => uint256) _indexes;\n }\n\n /**\n * @dev Adds a key-value pair to a map, or updates the value for an existing\n * key. O(1).\n *\n * Returns true if the key was added to the map, that is if it was not\n * already present.\n */\n function _set(Map storage map, bytes32 key, bytes32 value) private returns (bool) {\n // We read and store the key's index to prevent multiple reads from the same storage slot\n uint256 keyIndex = map._indexes[key];\n\n if (keyIndex == 0) { // Equivalent to !contains(map, key)\n map._entries.push(MapEntry({ _key: key, _value: value }));\n // The entry is stored at length-1, but we add 1 to all indexes\n // and use 0 as a sentinel value\n map._indexes[key] = map._entries.length;\n return true;\n } else {\n map._entries[keyIndex - 1]._value = value;\n return false;\n }\n }\n\n /**\n * @dev Removes a key-value pair from a map. O(1).\n *\n * Returns true if the key was removed from the map, that is if it was present.\n */\n function _remove(Map storage map, bytes32 key) private returns (bool) {\n // We read and store the key's index to prevent multiple reads from the same storage slot\n uint256 keyIndex = map._indexes[key];\n\n if (keyIndex != 0) { // Equivalent to contains(map, key)\n // To delete a key-value pair from the _entries array in O(1), we swap the entry to delete with the last one\n // in the array, and then remove the last entry (sometimes called as 'swap and pop').\n // This modifies the order of the array, as noted in {at}.\n\n uint256 toDeleteIndex = keyIndex - 1;\n uint256 lastIndex = map._entries.length - 1;\n\n // When the entry to delete is the last one, the swap operation is unnecessary. However, since this occurs\n // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\n\n MapEntry storage lastEntry = map._entries[lastIndex];\n\n // Move the last entry to the index where the entry to delete is\n map._entries[toDeleteIndex] = lastEntry;\n // Update the index for the moved entry\n map._indexes[lastEntry._key] = toDeleteIndex + 1; // All indexes are 1-based\n\n // Delete the slot where the moved entry was stored\n map._entries.pop();\n\n // Delete the index for the deleted slot\n delete map._indexes[key];\n\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * @dev Returns true if the key is in the map. O(1).\n */\n function _contains(Map storage map, bytes32 key) private view returns (bool) {\n return map._indexes[key] != 0;\n }\n\n /**\n * @dev Returns the number of key-value pairs in the map. O(1).\n */\n function _length(Map storage map) private view returns (uint256) {\n return map._entries.length;\n }\n\n /**\n * @dev Returns the key-value pair stored at position `index` in the map. O(1).\n *\n * Note that there are no guarantees on the ordering of entries inside the\n * array, and it may change when more entries are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function _at(Map storage map, uint256 index) private view returns (bytes32, bytes32) {\n require(map._entries.length > index, \"EnumerableMap: index out of bounds\");\n\n MapEntry storage entry = map._entries[index];\n return (entry._key, entry._value);\n }\n\n /**\n * @dev Tries to returns the value associated with `key`. O(1).\n * Does not revert if `key` is not in the map.\n */\n function _tryGet(Map storage map, bytes32 key) private view returns (bool, bytes32) {\n uint256 keyIndex = map._indexes[key];\n if (keyIndex == 0) return (false, 0); // Equivalent to contains(map, key)\n return (true, map._entries[keyIndex - 1]._value); // All indexes are 1-based\n }\n\n /**\n * @dev Returns the value associated with `key`. O(1).\n *\n * Requirements:\n *\n * - `key` must be in the map.\n */\n function _get(Map storage map, bytes32 key) private view returns (bytes32) {\n uint256 keyIndex = map._indexes[key];\n require(keyIndex != 0, \"EnumerableMap: nonexistent key\"); // Equivalent to contains(map, key)\n return map._entries[keyIndex - 1]._value; // All indexes are 1-based\n }\n\n /**\n * @dev Same as {_get}, with a custom error message when `key` is not in the map.\n *\n * CAUTION: This function is deprecated because it requires allocating memory for the error\n * message unnecessarily. For custom revert reasons use {_tryGet}.\n */\n function _get(Map storage map, bytes32 key, string memory errorMessage) private view returns (bytes32) {\n uint256 keyIndex = map._indexes[key];\n require(keyIndex != 0, errorMessage); // Equivalent to contains(map, key)\n return map._entries[keyIndex - 1]._value; // All indexes are 1-based\n }\n\n // UintToAddressMap\n\n struct UintToAddressMap {\n Map _inner;\n }\n\n /**\n * @dev Adds a key-value pair to a map, or updates the value for an existing\n * key. O(1).\n *\n * Returns true if the key was added to the map, that is if it was not\n * already present.\n */\n function set(UintToAddressMap storage map, uint256 key, address value) internal returns (bool) {\n return _set(map._inner, bytes32(key), bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the key was removed from the map, that is if it was present.\n */\n function remove(UintToAddressMap storage map, uint256 key) internal returns (bool) {\n return _remove(map._inner, bytes32(key));\n }\n\n /**\n * @dev Returns true if the key is in the map. O(1).\n */\n function contains(UintToAddressMap storage map, uint256 key) internal view returns (bool) {\n return _contains(map._inner, bytes32(key));\n }\n\n /**\n * @dev Returns the number of elements in the map. O(1).\n */\n function length(UintToAddressMap storage map) internal view returns (uint256) {\n return _length(map._inner);\n }\n\n /**\n * @dev Returns the element stored at position `index` in the set. O(1).\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(UintToAddressMap storage map, uint256 index) internal view returns (uint256, address) {\n (bytes32 key, bytes32 value) = _at(map._inner, index);\n return (uint256(key), address(uint160(uint256(value))));\n }\n\n /**\n * @dev Tries to returns the value associated with `key`. O(1).\n * Does not revert if `key` is not in the map.\n *\n * _Available since v3.4._\n */\n function tryGet(UintToAddressMap storage map, uint256 key) internal view returns (bool, address) {\n (bool success, bytes32 value) = _tryGet(map._inner, bytes32(key));\n return (success, address(uint160(uint256(value))));\n }\n\n /**\n * @dev Returns the value associated with `key`. O(1).\n *\n * Requirements:\n *\n * - `key` must be in the map.\n */\n function get(UintToAddressMap storage map, uint256 key) internal view returns (address) {\n return address(uint160(uint256(_get(map._inner, bytes32(key)))));\n }\n\n /**\n * @dev Same as {get}, with a custom error message when `key` is not in the map.\n *\n * CAUTION: This function is deprecated because it requires allocating memory for the error\n * message unnecessarily. For custom revert reasons use {tryGet}.\n */\n function get(UintToAddressMap storage map, uint256 key, string memory errorMessage) internal view returns (address) {\n return address(uint160(uint256(_get(map._inner, bytes32(key), errorMessage))));\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n /**\n * @dev Converts a `uint256` to its ASCII `string` representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n // Inspired by OraclizeAPI's implementation - MIT licence\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n if (value == 0) {\n return \"0\";\n }\n uint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n bytes memory buffer = new bytes(digits);\n uint256 index = digits - 1;\n temp = value;\n while (temp != 0) {\n buffer[index--] = bytes1(uint8(48 + temp % 10));\n temp /= 10;\n }\n return string(buffer);\n }\n}\n" + }, + "@openzeppelin/contracts/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <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" + }, + "@openzeppelin/contracts/utils/Pausable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"./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 () internal {\n _paused = false;\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 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 require(!paused(), \"Pausable: paused\");\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 require(paused(), \"Pausable: not paused\");\n _;\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" + }, + "contracts/Libraries/matic/tunnel/BaseRootTunnel.sol": { + "content": "pragma solidity ^0.6.6;\n\n\nimport {SafeMath} from \"@openzeppelin/contracts/math/SafeMath.sol\";\n\nimport {AccessControlMixin} from \"../common/AccessControlMixin.sol\";\nimport {IStateSender} from \"../root/StateSender/IStateSender.sol\";\nimport {RLPReader} from \"../lib/RLPReader.sol\";\nimport {MerklePatriciaProof} from \"../lib/MerklePatriciaProof.sol\";\nimport {ICheckpointManager} from \"../root/ICheckpointManager.sol\";\nimport {RLPReader} from \"../lib/RLPReader.sol\";\nimport {Merkle} from \"../lib/Merkle.sol\";\n\nabstract contract BaseRootTunnel is AccessControlMixin {\n using RLPReader for bytes;\n using RLPReader for RLPReader.RLPItem;\n using Merkle for bytes32;\n using SafeMath for uint256;\n\n // keccak256(MessageSent(bytes))\n bytes32 public constant SEND_MESSAGE_EVENT_SIG = 0x8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036;\n\n // state sender contract\n IStateSender public stateSender;\n // root chain manager\n ICheckpointManager public checkpointManager;\n // child tunnel contract which receives and sends messages \n address public childTunnel;\n // storage to avoid duplicate exits\n mapping(bytes32 => bool) public processedExits;\n\n constructor() internal {\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\n _setupContractId(\"RootTunnel\");\n }\n\n /**\n * @notice Set the state sender, callable only by admins\n * @dev This should be the state sender from plasma contracts\n * It is used to send bytes from root to child chain\n * @param newStateSender address of state sender contract\n */\n function setStateSender(address newStateSender)\n external\n only(DEFAULT_ADMIN_ROLE)\n {\n stateSender = IStateSender(newStateSender);\n }\n\n /**\n * @notice Set the checkpoint manager, callable only by admins\n * @dev This should be the plasma contract responsible for keeping track of checkpoints\n * @param newCheckpointManager address of checkpoint manager contract\n */\n function setCheckpointManager(address newCheckpointManager)\n external\n only(DEFAULT_ADMIN_ROLE)\n {\n checkpointManager = ICheckpointManager(newCheckpointManager);\n }\n\n /**\n * @notice Set the child chain tunnel, callable only by admins\n * @dev This should be the contract responsible to receive data bytes on child chain\n * @param newChildTunnel address of child tunnel contract\n */\n function setChildTunnel(address newChildTunnel)\n external\n only(DEFAULT_ADMIN_ROLE)\n {\n require(newChildTunnel != address(0x0), \"RootTunnel: INVALID_CHILD_TUNNEL_ADDRESS\");\n childTunnel = newChildTunnel;\n }\n\n /**\n * @notice Send bytes message to Child Tunnel\n * @param message bytes message that will be sent to Child Tunnel\n * some message examples -\n * abi.encode(tokenId);\n * abi.encode(tokenId, tokenMetadata);\n * abi.encode(messageType, messageData);\n */\n function _sendMessageToChild(bytes memory message) internal {\n stateSender.syncState(childTunnel, message);\n }\n\n function _validateAndExtractMessage(bytes memory inputData) internal returns (bytes memory) {\n RLPReader.RLPItem[] memory inputDataRLPList = inputData\n .toRlpItem()\n .toList();\n\n // checking if exit has already been processed\n // unique exit is identified using hash of (blockNumber, branchMask, receiptLogIndex)\n bytes32 exitHash = keccak256(\n abi.encodePacked(\n inputDataRLPList[2].toUint(), // blockNumber\n // first 2 nibbles are dropped while generating nibble array\n // this allows branch masks that are valid but bypass exitHash check (changing first 2 nibbles only)\n // so converting to nibble array and then hashing it\n MerklePatriciaProof._getNibbleArray(inputDataRLPList[8].toBytes()), // branchMask\n inputDataRLPList[9].toUint() // receiptLogIndex\n )\n );\n require(\n processedExits[exitHash] == false,\n \"RootTunnel: EXIT_ALREADY_PROCESSED\"\n );\n processedExits[exitHash] = true;\n\n RLPReader.RLPItem[] memory receiptRLPList = inputDataRLPList[6]\n .toBytes()\n .toRlpItem()\n .toList();\n RLPReader.RLPItem memory logRLP = receiptRLPList[3]\n .toList()[\n inputDataRLPList[9].toUint() // receiptLogIndex\n ];\n\n RLPReader.RLPItem[] memory logRLPList = logRLP.toList();\n \n // check child tunnel\n require(childTunnel == RLPReader.toAddress(logRLPList[0]), \"RootTunnel: INVALID_CHILD_TUNNEL\");\n\n // verify receipt inclusion\n require(\n MerklePatriciaProof.verify(\n inputDataRLPList[6].toBytes(), // receipt\n inputDataRLPList[8].toBytes(), // branchMask\n inputDataRLPList[7].toBytes(), // receiptProof\n bytes32(inputDataRLPList[5].toUint()) // receiptRoot\n ),\n \"RootTunnel: INVALID_RECEIPT_PROOF\"\n );\n\n // verify checkpoint inclusion\n _checkBlockMembershipInCheckpoint(\n inputDataRLPList[2].toUint(), // blockNumber\n inputDataRLPList[3].toUint(), // blockTime\n bytes32(inputDataRLPList[4].toUint()), // txRoot\n bytes32(inputDataRLPList[5].toUint()), // receiptRoot\n inputDataRLPList[0].toUint(), // headerNumber\n inputDataRLPList[1].toBytes() // blockProof\n );\n\n RLPReader.RLPItem[] memory logTopicRLPList = logRLPList[1].toList(); // topics\n\n require(\n bytes32(logTopicRLPList[0].toUint()) == SEND_MESSAGE_EVENT_SIG, // topic0 is event sig\n \"RootTunnel: INVALID_SIGNATURE\"\n );\n\n // received message data\n bytes memory receivedData = logRLPList[2].toBytes();\n (bytes memory message) = abi.decode(receivedData, (bytes)); // event decodes params again, so decoding bytes to get message\n return message;\n }\n\n function _checkBlockMembershipInCheckpoint(\n uint256 blockNumber,\n uint256 blockTime,\n bytes32 txRoot,\n bytes32 receiptRoot,\n uint256 headerNumber,\n bytes memory blockProof\n ) private view returns (uint256) {\n (\n bytes32 headerRoot,\n uint256 startBlock,\n ,\n uint256 createdAt,\n\n ) = checkpointManager.headerBlocks(headerNumber);\n\n require(\n keccak256(\n abi.encodePacked(blockNumber, blockTime, txRoot, receiptRoot)\n )\n .checkMembership(\n blockNumber.sub(startBlock),\n headerRoot,\n blockProof\n ),\n \"RootTunnel: INVALID_HEADER\"\n );\n return createdAt;\n }\n\n /**\n * @notice receive message from L2 to L1, validated by proof\n * @dev This function verifies if the transaction actually happened on child chain\n *\n * @param inputData RLP encoded data of the reference tx containing following list of fields\n * 0 - headerNumber - Checkpoint header block number containing the reference tx\n * 1 - blockProof - Proof that the block header (in the child chain) is a leaf in the submitted merkle root\n * 2 - blockNumber - Block number containing the reference tx on child chain\n * 3 - blockTime - Reference tx block time\n * 4 - txRoot - Transactions root of block\n * 5 - receiptRoot - Receipts root of block\n * 6 - receipt - Receipt of the reference transaction\n * 7 - receiptProof - Merkle proof of the reference receipt\n * 8 - branchMask - 32 bits denoting the path of receipt in merkle tree\n * 9 - receiptLogIndex - Log Index to read from the receipt\n */\n function receiveMessage(bytes memory inputData) public virtual {\n bytes memory message = _validateAndExtractMessage(inputData);\n _processMessageFromChild(message);\n }\n\n /**\n * @notice Process message received from Child Tunnel\n * @dev function needs to be implemented to handle message as per requirement\n * This is called by onStateReceive function.\n * Since it is called via a system call, any event will not be emitted during its execution.\n * @param message bytes message that was sent from Child Tunnel\n */\n function _processMessageFromChild(bytes memory message) virtual internal;\n}\n" + }, + "contracts/Libraries/matic/common/AccessControlMixin.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {AccessControl} from \"@openzeppelin/contracts/access/AccessControl.sol\";\n\ncontract AccessControlMixin is AccessControl {\n string private _revertMsg;\n function _setupContractId(string memory contractId) internal {\n _revertMsg = string(abi.encodePacked(contractId, \": INSUFFICIENT_PERMISSIONS\"));\n }\n\n modifier only(bytes32 role) {\n require(\n hasRole(role, _msgSender()),\n _revertMsg\n );\n _;\n }\n}\n" + }, + "contracts/Libraries/matic/root/StateSender/IStateSender.sol": { + "content": "pragma solidity 0.6.6;\n\ninterface IStateSender {\n function syncState(address receiver, bytes calldata data) external;\n}\n" + }, + "contracts/Libraries/matic/lib/RLPReader.sol": { + "content": "/*\n * @author Hamdi Allam hamdi.allam97@gmail.com\n * Please reach out with any questions or concerns\n * https://github.com/hamdiallam/Solidity-RLP/blob/e681e25a376dbd5426b509380bc03446f05d0f97/contracts/RLPReader.sol\n */\npragma solidity 0.6.6;\n\nlibrary RLPReader {\n uint8 constant STRING_SHORT_START = 0x80;\n uint8 constant STRING_LONG_START = 0xb8;\n uint8 constant LIST_SHORT_START = 0xc0;\n uint8 constant LIST_LONG_START = 0xf8;\n uint8 constant WORD_SIZE = 32;\n\n struct RLPItem {\n uint256 len;\n uint256 memPtr;\n }\n\n /*\n * @param item RLP encoded bytes\n */\n function toRlpItem(bytes memory item)\n internal\n pure\n returns (RLPItem memory)\n {\n require(item.length > 0, \"RLPReader: INVALID_BYTES_LENGTH\");\n uint256 memPtr;\n assembly {\n memPtr := add(item, 0x20)\n }\n\n return RLPItem(item.length, memPtr);\n }\n\n /*\n * @param item RLP encoded list in bytes\n */\n function toList(RLPItem memory item)\n internal\n pure\n returns (RLPItem[] memory)\n {\n require(isList(item), \"RLPReader: ITEM_NOT_LIST\");\n\n uint256 items = numItems(item);\n RLPItem[] memory result = new RLPItem[](items);\n uint256 listLength = _itemLength(item.memPtr);\n require(listLength == item.len, \"RLPReader: LIST_DECODED_LENGTH_MISMATCH\");\n\n uint256 memPtr = item.memPtr + _payloadOffset(item.memPtr);\n uint256 dataLen;\n for (uint256 i = 0; i < items; i++) {\n dataLen = _itemLength(memPtr);\n result[i] = RLPItem(dataLen, memPtr);\n memPtr = memPtr + dataLen;\n }\n\n return result;\n }\n\n // @return indicator whether encoded payload is a list. negate this function call for isData.\n function isList(RLPItem memory item) internal pure returns (bool) {\n uint8 byte0;\n uint256 memPtr = item.memPtr;\n assembly {\n byte0 := byte(0, mload(memPtr))\n }\n\n if (byte0 < LIST_SHORT_START) return false;\n return true;\n }\n\n /** RLPItem conversions into data types **/\n\n // @returns raw rlp encoding in bytes\n function toRlpBytes(RLPItem memory item)\n internal\n pure\n returns (bytes memory)\n {\n bytes memory result = new bytes(item.len);\n\n uint256 ptr;\n assembly {\n ptr := add(0x20, result)\n }\n\n copy(item.memPtr, ptr, item.len);\n return result;\n }\n\n function toAddress(RLPItem memory item) internal pure returns (address) {\n require(!isList(item), \"RLPReader: DECODING_LIST_AS_ADDRESS\");\n // 1 byte for the length prefix\n require(item.len == 21, \"RLPReader: INVALID_ADDRESS_LENGTH\");\n\n return address(toUint(item));\n }\n\n function toUint(RLPItem memory item) internal pure returns (uint256) {\n require(!isList(item), \"RLPReader: DECODING_LIST_AS_UINT\");\n require(item.len <= 33, \"RLPReader: INVALID_UINT_LENGTH\");\n\n uint256 itemLength = _itemLength(item.memPtr);\n require(itemLength == item.len, \"RLPReader: UINT_DECODED_LENGTH_MISMATCH\");\n\n uint256 offset = _payloadOffset(item.memPtr);\n uint256 len = item.len - offset;\n uint256 result;\n uint256 memPtr = item.memPtr + offset;\n assembly {\n result := mload(memPtr)\n\n // shfit to the correct location if neccesary\n if lt(len, 32) {\n result := div(result, exp(256, sub(32, len)))\n }\n }\n\n return result;\n }\n\n // enforces 32 byte length\n function toUintStrict(RLPItem memory item) internal pure returns (uint256) {\n uint256 itemLength = _itemLength(item.memPtr);\n require(itemLength == item.len, \"RLPReader: UINT_STRICT_DECODED_LENGTH_MISMATCH\");\n // one byte prefix\n require(item.len == 33, \"RLPReader: INVALID_UINT_STRICT_LENGTH\");\n\n uint256 result;\n uint256 memPtr = item.memPtr + 1;\n assembly {\n result := mload(memPtr)\n }\n\n return result;\n }\n\n function toBytes(RLPItem memory item) internal pure returns (bytes memory) {\n uint256 listLength = _itemLength(item.memPtr);\n require(listLength == item.len, \"RLPReader: BYTES_DECODED_LENGTH_MISMATCH\");\n uint256 offset = _payloadOffset(item.memPtr);\n\n uint256 len = item.len - offset; // data length\n bytes memory result = new bytes(len);\n\n uint256 destPtr;\n assembly {\n destPtr := add(0x20, result)\n }\n\n copy(item.memPtr + offset, destPtr, len);\n return result;\n }\n\n /*\n * Private Helpers\n */\n\n // @return number of payload items inside an encoded list.\n function numItems(RLPItem memory item) private pure returns (uint256) {\n // add `isList` check if `item` is expected to be passsed without a check from calling function\n // require(isList(item), \"RLPReader: NUM_ITEMS_NOT_LIST\");\n\n uint256 count = 0;\n uint256 currPtr = item.memPtr + _payloadOffset(item.memPtr);\n uint256 endPtr = item.memPtr + item.len;\n while (currPtr < endPtr) {\n currPtr = currPtr + _itemLength(currPtr); // skip over an item\n require(currPtr <= endPtr, \"RLPReader: NUM_ITEMS_DECODED_LENGTH_MISMATCH\");\n count++;\n }\n\n return count;\n }\n\n // @return entire rlp item byte length\n function _itemLength(uint256 memPtr) private pure returns (uint256) {\n uint256 itemLen;\n uint256 byte0;\n assembly {\n byte0 := byte(0, mload(memPtr))\n }\n\n if (byte0 < STRING_SHORT_START) itemLen = 1;\n else if (byte0 < STRING_LONG_START)\n itemLen = byte0 - STRING_SHORT_START + 1;\n else if (byte0 < LIST_SHORT_START) {\n assembly {\n let byteLen := sub(byte0, 0xb7) // # of bytes the actual length is\n memPtr := add(memPtr, 1) // skip over the first byte\n\n /* 32 byte word size */\n let dataLen := div(mload(memPtr), exp(256, sub(32, byteLen))) // right shifting to get the len\n itemLen := add(dataLen, add(byteLen, 1))\n }\n } else if (byte0 < LIST_LONG_START) {\n itemLen = byte0 - LIST_SHORT_START + 1;\n } else {\n assembly {\n let byteLen := sub(byte0, 0xf7)\n memPtr := add(memPtr, 1)\n\n let dataLen := div(mload(memPtr), exp(256, sub(32, byteLen))) // right shifting to the correct length\n itemLen := add(dataLen, add(byteLen, 1))\n }\n }\n\n return itemLen;\n }\n\n // @return number of bytes until the data\n function _payloadOffset(uint256 memPtr) private pure returns (uint256) {\n uint256 byte0;\n assembly {\n byte0 := byte(0, mload(memPtr))\n }\n\n if (byte0 < STRING_SHORT_START) return 0;\n else if (\n byte0 < STRING_LONG_START ||\n (byte0 >= LIST_SHORT_START && byte0 < LIST_LONG_START)\n ) return 1;\n else if (byte0 < LIST_SHORT_START)\n // being explicit\n return byte0 - (STRING_LONG_START - 1) + 1;\n else return byte0 - (LIST_LONG_START - 1) + 1;\n }\n\n /*\n * @param src Pointer to source\n * @param dest Pointer to destination\n * @param len Amount of memory to copy from the source\n */\n function copy(\n uint256 src,\n uint256 dest,\n uint256 len\n ) private pure {\n if (len == 0) return;\n\n // copy as many word sizes as possible\n for (; len >= WORD_SIZE; len -= WORD_SIZE) {\n assembly {\n mstore(dest, mload(src))\n }\n\n src += WORD_SIZE;\n dest += WORD_SIZE;\n }\n\n // left over bytes. Mask is used to remove unwanted bytes from the word\n uint256 mask = 256**(WORD_SIZE - len) - 1;\n assembly {\n let srcpart := and(mload(src), not(mask)) // zero out src\n let destpart := and(mload(dest), mask) // retrieve the bytes\n mstore(dest, or(destpart, srcpart))\n }\n }\n}\n" + }, + "contracts/Libraries/matic/lib/MerklePatriciaProof.sol": { + "content": "/*\n * @title MerklePatriciaVerifier\n * @author Sam Mayo (sammayo888@gmail.com)\n *\n * @dev Library for verifing merkle patricia proofs.\n */\npragma solidity 0.6.6;\n\nimport {RLPReader} from \"./RLPReader.sol\";\n\nlibrary MerklePatriciaProof {\n /*\n * @dev Verifies a merkle patricia proof.\n * @param value The terminating value in the trie.\n * @param encodedPath The path in the trie leading to value.\n * @param rlpParentNodes The rlp encoded stack of nodes.\n * @param root The root hash of the trie.\n * @return The boolean validity of the proof.\n */\n function verify(\n bytes memory value,\n bytes memory encodedPath,\n bytes memory rlpParentNodes,\n bytes32 root\n ) internal pure returns (bool) {\n RLPReader.RLPItem memory item = RLPReader.toRlpItem(rlpParentNodes);\n RLPReader.RLPItem[] memory parentNodes = RLPReader.toList(item);\n\n bytes memory currentNode;\n RLPReader.RLPItem[] memory currentNodeList;\n\n bytes32 nodeKey = root;\n uint256 pathPtr = 0;\n\n bytes memory path = _getNibbleArray(encodedPath);\n if (path.length == 0) {\n return false;\n }\n\n for (uint256 i = 0; i < parentNodes.length; i++) {\n if (pathPtr > path.length) {\n return false;\n }\n\n currentNode = RLPReader.toRlpBytes(parentNodes[i]);\n if (nodeKey != keccak256(currentNode)) {\n return false;\n }\n currentNodeList = RLPReader.toList(parentNodes[i]);\n\n if (currentNodeList.length == 17) {\n if (pathPtr == path.length) {\n if (\n keccak256(RLPReader.toBytes(currentNodeList[16])) ==\n keccak256(value)\n ) {\n return true;\n } else {\n return false;\n }\n }\n\n uint8 nextPathNibble = uint8(path[pathPtr]);\n if (nextPathNibble > 16) {\n return false;\n }\n nodeKey = bytes32(\n RLPReader.toUintStrict(currentNodeList[nextPathNibble])\n );\n pathPtr += 1;\n } else if (currentNodeList.length == 2) {\n uint256 traversed = _nibblesToTraverse(\n RLPReader.toBytes(currentNodeList[0]),\n path,\n pathPtr\n );\n if (pathPtr + traversed == path.length) {\n //leaf node\n if (\n keccak256(RLPReader.toBytes(currentNodeList[1])) ==\n keccak256(value)\n ) {\n return true;\n } else {\n return false;\n }\n }\n\n //extension node\n if (traversed == 0) {\n return false;\n }\n\n pathPtr += traversed;\n nodeKey = bytes32(RLPReader.toUintStrict(currentNodeList[1]));\n } else {\n return false;\n }\n }\n }\n\n function _nibblesToTraverse(\n bytes memory encodedPartialPath,\n bytes memory path,\n uint256 pathPtr\n ) private pure returns (uint256) {\n uint256 len = 0;\n // encodedPartialPath has elements that are each two hex characters (1 byte), but partialPath\n // and slicedPath have elements that are each one hex character (1 nibble)\n bytes memory partialPath = _getNibbleArray(encodedPartialPath);\n bytes memory slicedPath = new bytes(partialPath.length);\n\n // pathPtr counts nibbles in path\n // partialPath.length is a number of nibbles\n for (uint256 i = pathPtr; i < pathPtr + partialPath.length; i++) {\n bytes1 pathNibble = path[i];\n slicedPath[i - pathPtr] = pathNibble;\n }\n\n if (keccak256(partialPath) == keccak256(slicedPath)) {\n len = partialPath.length;\n } else {\n len = 0;\n }\n return len;\n }\n\n // bytes b must be hp encoded\n function _getNibbleArray(bytes memory b)\n internal\n pure\n returns (bytes memory)\n {\n bytes memory nibbles = \"\";\n if (b.length > 0) {\n uint8 offset;\n uint8 hpNibble = uint8(_getNthNibbleOfBytes(0, b));\n if (hpNibble == 1 || hpNibble == 3) {\n nibbles = new bytes(b.length * 2 - 1);\n bytes1 oddNibble = _getNthNibbleOfBytes(1, b);\n nibbles[0] = oddNibble;\n offset = 1;\n } else {\n nibbles = new bytes(b.length * 2 - 2);\n offset = 0;\n }\n\n for (uint256 i = offset; i < nibbles.length; i++) {\n nibbles[i] = _getNthNibbleOfBytes(i - offset + 2, b);\n }\n }\n return nibbles;\n }\n\n function _getNthNibbleOfBytes(uint256 n, bytes memory str)\n private\n pure\n returns (bytes1)\n {\n return\n bytes1(\n n % 2 == 0 ? uint8(str[n / 2]) / 0x10 : uint8(str[n / 2]) % 0x10\n );\n }\n}\n" + }, + "contracts/Libraries/matic/root/ICheckpointManager.sol": { + "content": "pragma solidity 0.6.6;\n\ncontract ICheckpointManager {\n struct HeaderBlock {\n bytes32 root;\n uint256 start;\n uint256 end;\n uint256 createdAt;\n address proposer;\n }\n\n /**\n * @notice mapping of checkpoint header numbers to block details\n * @dev These checkpoints are submited by plasma contracts\n */\n mapping(uint256 => HeaderBlock) public headerBlocks;\n}\n" + }, + "contracts/Libraries/matic/lib/Merkle.sol": { + "content": "pragma solidity 0.6.6;\n\nlibrary Merkle {\n function checkMembership(\n bytes32 leaf,\n uint256 index,\n bytes32 rootHash,\n bytes memory proof\n ) internal pure returns (bool) {\n require(proof.length % 32 == 0, \"Invalid proof length\");\n uint256 proofHeight = proof.length / 32;\n // Proof of size n means, height of the tree is n+1.\n // In a tree of height n+1, max #leafs possible is 2 ^ n\n require(index < 2 ** proofHeight, \"Leaf index is too big\");\n\n bytes32 proofElement;\n bytes32 computedHash = leaf;\n for (uint256 i = 32; i <= proof.length; i += 32) {\n assembly {\n proofElement := mload(add(proof, i))\n }\n\n if (index % 2 == 0) {\n computedHash = keccak256(\n abi.encodePacked(computedHash, proofElement)\n );\n } else {\n computedHash = keccak256(\n abi.encodePacked(proofElement, computedHash)\n );\n }\n\n index = index / 2;\n }\n return computedHash == rootHash;\n }\n}\n" + }, + "contracts/Libraries/matic/tunnel/RootTunnel.sol": { + "content": "pragma solidity ^0.6.6;\n\nimport {BaseRootTunnel} from \"./BaseRootTunnel.sol\";\n\n\ncontract RootTunnel is BaseRootTunnel {\n function _processMessageFromChild(bytes memory message) internal override {\n // implement your core logic here\n }\n}\n" + }, + "contracts/Libraries/matic/root/RootChainManager/RootChainManager.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {SafeMath} from \"@openzeppelin/contracts/math/SafeMath.sol\";\nimport {IRootChainManager} from \"./IRootChainManager.sol\";\nimport {RootChainManagerStorage} from \"./RootChainManagerStorage.sol\";\nimport {IStateSender} from \"../StateSender/IStateSender.sol\";\nimport {ICheckpointManager} from \"../ICheckpointManager.sol\";\nimport {RLPReader} from \"../../lib/RLPReader.sol\";\nimport {MerklePatriciaProof} from \"../../lib/MerklePatriciaProof.sol\";\nimport {Merkle} from \"../../lib/Merkle.sol\";\nimport {ITokenPredicate} from \"../TokenPredicates/ITokenPredicate.sol\";\nimport {Initializable} from \"../../common/Initializable.sol\";\nimport {NativeMetaTransaction} from \"../../common/NativeMetaTransaction.sol\";\nimport {AccessControl} from \"@openzeppelin/contracts/access/AccessControl.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\nimport {ContextMixin} from \"../../common/ContextMixin.sol\";\n\ncontract RootChainManager is\n IRootChainManager,\n Initializable,\n AccessControl, // included to match old storage layout while upgrading\n RootChainManagerStorage, // created to match old storage layout while upgrading\n AccessControlMixin,\n NativeMetaTransaction,\n ContextMixin\n{\n using RLPReader for bytes;\n using RLPReader for RLPReader.RLPItem;\n using Merkle for bytes32;\n using SafeMath for uint256;\n\n // maybe DEPOSIT and MAP_TOKEN can be reduced to bytes4\n bytes32 public constant DEPOSIT = keccak256(\"DEPOSIT\");\n bytes32 public constant MAP_TOKEN = keccak256(\"MAP_TOKEN\");\n address public constant ETHER_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n bytes32 public constant MAPPER_ROLE = keccak256(\"MAPPER_ROLE\");\n\n function _msgSender()\n internal\n override\n view\n returns (address payable sender)\n {\n return ContextMixin.msgSender();\n }\n\n /**\n * @notice Deposit ether by directly sending to the contract\n * The account sending ether receives WETH on child chain\n */\n receive() external payable {\n _depositEtherFor(_msgSender());\n }\n\n /**\n * @notice Initialize the contract after it has been proxified\n * @dev meant to be called once immediately after deployment\n * @param _owner the account that should be granted admin role\n */\n function initialize(\n address _owner\n )\n external\n initializer\n {\n _initializeEIP712(\"RootChainManager\");\n _setupContractId(\"RootChainManager\");\n _setupRole(DEFAULT_ADMIN_ROLE, _owner);\n _setupRole(MAPPER_ROLE, _owner);\n }\n\n // adding seperate function setupContractId since initialize is already called with old implementation\n function setupContractId()\n external\n only(DEFAULT_ADMIN_ROLE)\n {\n _setupContractId(\"RootChainManager\");\n }\n\n // adding seperate function initializeEIP712 since initialize is already called with old implementation\n function initializeEIP712()\n external\n only(DEFAULT_ADMIN_ROLE)\n {\n _setDomainSeperator(\"RootChainManager\");\n }\n\n /**\n * @notice Set the state sender, callable only by admins\n * @dev This should be the state sender from plasma contracts\n * It is used to send bytes from root to child chain\n * @param newStateSender address of state sender contract\n */\n function setStateSender(address newStateSender)\n external\n only(DEFAULT_ADMIN_ROLE)\n {\n _stateSender = IStateSender(newStateSender);\n }\n\n /**\n * @notice Get the address of contract set as state sender\n * @return The address of state sender contract\n */\n function stateSenderAddress() external view returns (address) {\n return address(_stateSender);\n }\n\n /**\n * @notice Set the checkpoint manager, callable only by admins\n * @dev This should be the plasma contract responsible for keeping track of checkpoints\n * @param newCheckpointManager address of checkpoint manager contract\n */\n function setCheckpointManager(address newCheckpointManager)\n external\n only(DEFAULT_ADMIN_ROLE)\n {\n _checkpointManager = ICheckpointManager(newCheckpointManager);\n }\n\n /**\n * @notice Get the address of contract set as checkpoint manager\n * @return The address of checkpoint manager contract\n */\n function checkpointManagerAddress() external view returns (address) {\n return address(_checkpointManager);\n }\n\n /**\n * @notice Set the child chain manager, callable only by admins\n * @dev This should be the contract responsible to receive deposit bytes on child chain\n * @param newChildChainManager address of child chain manager contract\n */\n function setChildChainManagerAddress(address newChildChainManager)\n external\n only(DEFAULT_ADMIN_ROLE)\n {\n require(newChildChainManager != address(0x0), \"RootChainManager: INVALID_CHILD_CHAIN_ADDRESS\");\n childChainManagerAddress = newChildChainManager;\n }\n\n /**\n * @notice Register a token predicate address against its type, callable only by mappers\n * @dev A predicate is a contract responsible to process the token specific logic while locking or exiting tokens\n * @param tokenType bytes32 unique identifier for the token type\n * @param predicateAddress address of token predicate address\n */\n function registerPredicate(bytes32 tokenType, address predicateAddress)\n external\n override\n only(DEFAULT_ADMIN_ROLE)\n {\n typeToPredicate[tokenType] = predicateAddress;\n emit PredicateRegistered(tokenType, predicateAddress);\n }\n\n /**\n * @notice Map a token to enable its movement via the PoS Portal, callable only by mappers\n * @param rootToken address of token on root chain\n * @param childToken address of token on child chain\n * @param tokenType bytes32 unique identifier for the token type\n */\n function mapToken(\n address rootToken,\n address childToken,\n bytes32 tokenType\n ) external override only(MAPPER_ROLE) {\n // explicit check if token is already mapped to avoid accidental remaps\n require(\n rootToChildToken[rootToken] == address(0) &&\n childToRootToken[childToken] == address(0),\n \"RootChainManager: ALREADY_MAPPED\"\n );\n _mapToken(rootToken, childToken, tokenType);\n }\n\n /**\n * @notice Clean polluted token mapping\n * @param rootToken address of token on root chain. Since rename token was introduced later stage, \n * clean method is used to clean pollulated mapping\n */\n function cleanMapToken(\n address rootToken,\n address childToken\n ) external override only(DEFAULT_ADMIN_ROLE) {\n rootToChildToken[rootToken] = address(0);\n childToRootToken[childToken] = address(0);\n tokenToType[rootToken] = bytes32(0);\n\n emit TokenMapped(rootToken, childToken, tokenToType[rootToken]);\n }\n\n /**\n * @notice Remap a token that has already been mapped, properly cleans up old mapping\n * Callable only by mappers\n * @param rootToken address of token on root chain\n * @param childToken address of token on child chain\n * @param tokenType bytes32 unique identifier for the token type\n */\n function remapToken(\n address rootToken,\n address childToken,\n bytes32 tokenType\n ) external override only(DEFAULT_ADMIN_ROLE) {\n // cleanup old mapping\n address oldChildToken = rootToChildToken[rootToken];\n address oldRootToken = childToRootToken[childToken];\n\n if (rootToChildToken[oldRootToken] != address(0)) {\n rootToChildToken[oldRootToken] = address(0);\n tokenToType[oldRootToken] = bytes32(0);\n }\n\n if (childToRootToken[oldChildToken] != address(0)) {\n childToRootToken[oldChildToken] = address(0);\n }\n\n _mapToken(rootToken, childToken, tokenType);\n }\n\n function _mapToken(\n address rootToken,\n address childToken,\n bytes32 tokenType\n ) private {\n require(\n typeToPredicate[tokenType] != address(0x0),\n \"RootChainManager: TOKEN_TYPE_NOT_SUPPORTED\"\n );\n\n rootToChildToken[rootToken] = childToken;\n childToRootToken[childToken] = rootToken;\n tokenToType[rootToken] = tokenType;\n\n emit TokenMapped(rootToken, childToken, tokenType);\n\n bytes memory syncData = abi.encode(rootToken, childToken, tokenType);\n _stateSender.syncState(\n childChainManagerAddress,\n abi.encode(MAP_TOKEN, syncData)\n );\n }\n\n /**\n * @notice Move ether from root to child chain, accepts ether transfer\n * Keep in mind this ether cannot be used to pay gas on child chain\n * Use Matic tokens deposited using plasma mechanism for that\n * @param user address of account that should receive WETH on child chain\n */\n function depositEtherFor(address user) external override payable {\n _depositEtherFor(user);\n }\n\n /**\n * @notice Move tokens from root to child chain\n * @dev This mechanism supports arbitrary tokens as long as its predicate has been registered and the token is mapped\n * @param user address of account that should receive this deposit on child chain\n * @param rootToken address of token that is being deposited\n * @param depositData bytes data that is sent to predicate and child token contracts to handle deposit\n */\n function depositFor(\n address user,\n address rootToken,\n bytes calldata depositData\n ) external override {\n require(\n rootToken != ETHER_ADDRESS,\n \"RootChainManager: INVALID_ROOT_TOKEN\"\n );\n _depositFor(user, rootToken, depositData);\n }\n\n function _depositEtherFor(address user) private {\n bytes memory depositData = abi.encode(msg.value);\n _depositFor(user, ETHER_ADDRESS, depositData);\n\n // payable(typeToPredicate[tokenToType[ETHER_ADDRESS]]).transfer(msg.value);\n // transfer doesn't work as expected when receiving contract is proxified so using call\n (bool success, /* bytes memory data */) = typeToPredicate[tokenToType[ETHER_ADDRESS]].call{value: msg.value}(\"\");\n if (!success) {\n revert(\"RootChainManager: ETHER_TRANSFER_FAILED\");\n }\n }\n\n function _depositFor(\n address user,\n address rootToken,\n bytes memory depositData\n ) private {\n bytes32 tokenType = tokenToType[rootToken];\n require(\n rootToChildToken[rootToken] != address(0x0) &&\n tokenType != 0,\n \"RootChainManager: TOKEN_NOT_MAPPED\"\n );\n address predicateAddress = typeToPredicate[tokenType];\n require(\n predicateAddress != address(0),\n \"RootChainManager: INVALID_TOKEN_TYPE\"\n );\n require(\n user != address(0),\n \"RootChainManager: INVALID_USER\"\n );\n\n ITokenPredicate(predicateAddress).lockTokens(\n _msgSender(),\n user,\n rootToken,\n depositData\n );\n bytes memory syncData = abi.encode(user, rootToken, depositData);\n _stateSender.syncState(\n childChainManagerAddress,\n abi.encode(DEPOSIT, syncData)\n );\n }\n\n /**\n * @notice exit tokens by providing proof\n * @dev This function verifies if the transaction actually happened on child chain\n * the transaction log is then sent to token predicate to handle it accordingly\n *\n * @param inputData RLP encoded data of the reference tx containing following list of fields\n * 0 - headerNumber - Checkpoint header block number containing the reference tx\n * 1 - blockProof - Proof that the block header (in the child chain) is a leaf in the submitted merkle root\n * 2 - blockNumber - Block number containing the reference tx on child chain\n * 3 - blockTime - Reference tx block time\n * 4 - txRoot - Transactions root of block\n * 5 - receiptRoot - Receipts root of block\n * 6 - receipt - Receipt of the reference transaction\n * 7 - receiptProof - Merkle proof of the reference receipt\n * 8 - branchMask - 32 bits denoting the path of receipt in merkle tree\n * 9 - receiptLogIndex - Log Index to read from the receipt\n */\n function exit(bytes calldata inputData) external override {\n RLPReader.RLPItem[] memory inputDataRLPList = inputData\n .toRlpItem()\n .toList();\n\n // checking if exit has already been processed\n // unique exit is identified using hash of (blockNumber, branchMask, receiptLogIndex)\n bytes32 exitHash = keccak256(\n abi.encodePacked(\n inputDataRLPList[2].toUint(), // blockNumber\n // first 2 nibbles are dropped while generating nibble array\n // this allows branch masks that are valid but bypass exitHash check (changing first 2 nibbles only)\n // so converting to nibble array and then hashing it\n MerklePatriciaProof._getNibbleArray(inputDataRLPList[8].toBytes()), // branchMask\n inputDataRLPList[9].toUint() // receiptLogIndex\n )\n );\n require(\n processedExits[exitHash] == false,\n \"RootChainManager: EXIT_ALREADY_PROCESSED\"\n );\n processedExits[exitHash] = true;\n\n RLPReader.RLPItem[] memory receiptRLPList = inputDataRLPList[6]\n .toBytes()\n .toRlpItem()\n .toList();\n RLPReader.RLPItem memory logRLP = receiptRLPList[3]\n .toList()[\n inputDataRLPList[9].toUint() // receiptLogIndex\n ];\n\n address childToken = RLPReader.toAddress(logRLP.toList()[0]); // log emitter address field\n // log should be emmited only by the child token\n address rootToken = childToRootToken[childToken];\n require(\n rootToken != address(0),\n \"RootChainManager: TOKEN_NOT_MAPPED\"\n );\n\n address predicateAddress = typeToPredicate[\n tokenToType[rootToken]\n ];\n\n // branch mask can be maximum 32 bits\n require(\n inputDataRLPList[8].toUint() &\n 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000 ==\n 0,\n \"RootChainManager: INVALID_BRANCH_MASK\"\n );\n\n // verify receipt inclusion\n require(\n MerklePatriciaProof.verify(\n inputDataRLPList[6].toBytes(), // receipt\n inputDataRLPList[8].toBytes(), // branchMask\n inputDataRLPList[7].toBytes(), // receiptProof\n bytes32(inputDataRLPList[5].toUint()) // receiptRoot\n ),\n \"RootChainManager: INVALID_PROOF\"\n );\n\n // verify checkpoint inclusion\n _checkBlockMembershipInCheckpoint(\n inputDataRLPList[2].toUint(), // blockNumber\n inputDataRLPList[3].toUint(), // blockTime\n bytes32(inputDataRLPList[4].toUint()), // txRoot\n bytes32(inputDataRLPList[5].toUint()), // receiptRoot\n inputDataRLPList[0].toUint(), // headerNumber\n inputDataRLPList[1].toBytes() // blockProof\n );\n\n ITokenPredicate(predicateAddress).exitTokens(\n _msgSender(),\n rootToken,\n logRLP.toRlpBytes()\n );\n }\n\n function _checkBlockMembershipInCheckpoint(\n uint256 blockNumber,\n uint256 blockTime,\n bytes32 txRoot,\n bytes32 receiptRoot,\n uint256 headerNumber,\n bytes memory blockProof\n ) private view returns (uint256) {\n (\n bytes32 headerRoot,\n uint256 startBlock,\n ,\n uint256 createdAt,\n\n ) = _checkpointManager.headerBlocks(headerNumber);\n\n require(\n keccak256(\n abi.encodePacked(blockNumber, blockTime, txRoot, receiptRoot)\n )\n .checkMembership(\n blockNumber.sub(startBlock),\n headerRoot,\n blockProof\n ),\n \"RootChainManager: INVALID_HEADER\"\n );\n return createdAt;\n }\n}\n" + }, + "contracts/Libraries/matic/root/RootChainManager/IRootChainManager.sol": { + "content": "pragma solidity 0.6.6;\n\ninterface IRootChainManager {\n event TokenMapped(\n address indexed rootToken,\n address indexed childToken,\n bytes32 indexed tokenType\n );\n\n event PredicateRegistered(\n bytes32 indexed tokenType,\n address indexed predicateAddress\n );\n\n function registerPredicate(bytes32 tokenType, address predicateAddress)\n external;\n\n function mapToken(\n address rootToken,\n address childToken,\n bytes32 tokenType\n ) external;\n\n function cleanMapToken(\n address rootToken,\n address childToken\n ) external;\n\n function remapToken(\n address rootToken,\n address childToken,\n bytes32 tokenType\n ) external;\n\n function depositEtherFor(address user) external payable;\n\n function depositFor(\n address user,\n address rootToken,\n bytes calldata depositData\n ) external;\n\n function exit(bytes calldata inputData) external;\n}\n" + }, + "contracts/Libraries/matic/root/RootChainManager/RootChainManagerStorage.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {IStateSender} from \"../StateSender/IStateSender.sol\";\nimport {ICheckpointManager} from \"../ICheckpointManager.sol\";\n\nabstract contract RootChainManagerStorage {\n mapping(bytes32 => address) public typeToPredicate;\n mapping(address => address) public rootToChildToken;\n mapping(address => address) public childToRootToken;\n mapping(address => bytes32) public tokenToType;\n mapping(bytes32 => bool) public processedExits;\n IStateSender internal _stateSender;\n ICheckpointManager internal _checkpointManager;\n address public childChainManagerAddress;\n}\n" + }, + "contracts/Libraries/matic/root/TokenPredicates/ITokenPredicate.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {RLPReader} from \"../../lib/RLPReader.sol\";\n\n/// @title Token predicate interface for all pos portal predicates\n/// @notice Abstract interface that defines methods for custom predicates\ninterface ITokenPredicate {\n\n /**\n * @notice Deposit tokens into pos portal\n * @dev When `depositor` deposits tokens into pos portal, tokens get locked into predicate contract.\n * @param depositor Address who wants to deposit tokens\n * @param depositReceiver Address (address) who wants to receive tokens on side chain\n * @param rootToken Token which gets deposited\n * @param depositData Extra data for deposit (amount for ERC20, token id for ERC721 etc.) [ABI encoded]\n */\n function lockTokens(\n address depositor,\n address depositReceiver,\n address rootToken,\n bytes calldata depositData\n ) external;\n\n /**\n * @notice Validates and processes exit while withdraw process\n * @dev Validates exit log emitted on sidechain. Reverts if validation fails.\n * @dev Processes withdraw based on custom logic. Example: transfer ERC20/ERC721, mint ERC721 if mintable withdraw\n * @param sender Address\n * @param rootToken Token which gets withdrawn\n * @param logRLPList Valid sidechain log for data like amount, token id etc.\n */\n function exitTokens(\n address sender,\n address rootToken,\n bytes calldata logRLPList\n ) external;\n}\n" + }, + "contracts/Libraries/matic/common/Initializable.sol": { + "content": "pragma solidity 0.6.6;\n\ncontract Initializable {\n bool inited = false;\n\n modifier initializer() {\n require(!inited, \"already inited\");\n _;\n inited = true;\n }\n}\n" + }, + "contracts/Libraries/matic/common/NativeMetaTransaction.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {SafeMath} from \"@openzeppelin/contracts/math/SafeMath.sol\";\nimport {EIP712Base} from \"./EIP712Base.sol\";\n\ncontract NativeMetaTransaction is EIP712Base {\n using SafeMath for uint256;\n bytes32 private constant META_TRANSACTION_TYPEHASH = keccak256(\n bytes(\n \"MetaTransaction(uint256 nonce,address from,bytes functionSignature)\"\n )\n );\n event MetaTransactionExecuted(\n address userAddress,\n address payable relayerAddress,\n bytes functionSignature\n );\n mapping(address => uint256) nonces;\n\n /*\n * Meta transaction structure.\n * No point of including value field here as if user is doing value transfer then he has the funds to pay for gas\n * He should call the desired function directly in that case.\n */\n struct MetaTransaction {\n uint256 nonce;\n address from;\n bytes functionSignature;\n }\n\n function executeMetaTransaction(\n address userAddress,\n bytes memory functionSignature,\n bytes32 sigR,\n bytes32 sigS,\n uint8 sigV\n ) public payable returns (bytes memory) {\n MetaTransaction memory metaTx = MetaTransaction({\n nonce: nonces[userAddress],\n from: userAddress,\n functionSignature: functionSignature\n });\n\n require(\n verify(userAddress, metaTx, sigR, sigS, sigV),\n \"Signer and signature do not match\"\n );\n\n // increase nonce for user (to avoid re-use)\n nonces[userAddress] = nonces[userAddress].add(1);\n\n emit MetaTransactionExecuted(\n userAddress,\n msg.sender,\n functionSignature\n );\n\n // Append userAddress and relayer address at the end to extract it from calling context\n (bool success, bytes memory returnData) = address(this).call(\n abi.encodePacked(functionSignature, userAddress)\n );\n require(success, \"Function call not successful\");\n\n return returnData;\n }\n\n function hashMetaTransaction(MetaTransaction memory metaTx)\n internal\n pure\n returns (bytes32)\n {\n return\n keccak256(\n abi.encode(\n META_TRANSACTION_TYPEHASH,\n metaTx.nonce,\n metaTx.from,\n keccak256(metaTx.functionSignature)\n )\n );\n }\n\n function getNonce(address user) public view returns (uint256 nonce) {\n nonce = nonces[user];\n }\n\n function verify(\n address signer,\n MetaTransaction memory metaTx,\n bytes32 sigR,\n bytes32 sigS,\n uint8 sigV\n ) internal view returns (bool) {\n require(signer != address(0), \"NativeMetaTransaction: INVALID_SIGNER\");\n return\n signer ==\n ecrecover(\n toTypedMessageHash(hashMetaTransaction(metaTx)),\n sigV,\n sigR,\n sigS\n );\n }\n}\n" + }, + "contracts/Libraries/matic/common/ContextMixin.sol": { + "content": "pragma solidity 0.6.6;\n\nabstract contract ContextMixin {\n function msgSender()\n internal\n view\n returns (address payable sender)\n {\n if (msg.sender == address(this)) {\n bytes memory array = msg.data;\n uint256 index = msg.data.length;\n assembly {\n // Load the 32 bytes word from memory with the address on the lower 20 bytes, and mask those.\n sender := and(\n mload(add(array, index)),\n 0xffffffffffffffffffffffffffffffffffffffff\n )\n }\n } else {\n sender = msg.sender;\n }\n return sender;\n }\n}\n" + }, + "contracts/Libraries/matic/common/EIP712Base.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {Initializable} from \"./Initializable.sol\";\n\ncontract EIP712Base is Initializable {\n struct EIP712Domain {\n string name;\n string version;\n address verifyingContract;\n bytes32 salt;\n }\n\n string constant public ERC712_VERSION = \"1\";\n\n bytes32 internal constant EIP712_DOMAIN_TYPEHASH = keccak256(\n bytes(\n \"EIP712Domain(string name,string version,address verifyingContract,bytes32 salt)\"\n )\n );\n bytes32 internal domainSeperator;\n\n // supposed to be called once while initializing.\n // one of the contractsa that inherits this contract follows proxy pattern\n // so it is not possible to do this in a constructor\n function _initializeEIP712(\n string memory name\n )\n internal\n initializer\n {\n _setDomainSeperator(name);\n }\n\n function _setDomainSeperator(string memory name) internal {\n domainSeperator = keccak256(\n abi.encode(\n EIP712_DOMAIN_TYPEHASH,\n keccak256(bytes(name)),\n keccak256(bytes(ERC712_VERSION)),\n address(this),\n bytes32(getChainId())\n )\n );\n }\n\n function getDomainSeperator() public view returns (bytes32) {\n return domainSeperator;\n }\n\n function getChainId() public pure returns (uint256) {\n uint256 id;\n assembly {\n id := chainid()\n }\n return id;\n }\n\n /**\n * Accept message hash and returns hash message in EIP712 compatible form\n * So that it can be used to recover signer from signature signed using EIP712 formatted data\n * https://eips.ethereum.org/EIPS/eip-712\n * \"\\\\x19\" makes the encoding deterministic\n * \"\\\\x01\" is the version byte to make it compatible to EIP-191\n */\n function toTypedMessageHash(bytes32 messageHash)\n internal\n view\n returns (bytes32)\n {\n return\n keccak256(\n abi.encodePacked(\"\\x19\\x01\", getDomainSeperator(), messageHash)\n );\n }\n}\n" + }, + "contracts/Libraries/matic/root/RootToken/DummyMintableERC721.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {ERC721} from \"@openzeppelin/contracts/token/ERC721/ERC721.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\nimport {NativeMetaTransaction} from \"../../common/NativeMetaTransaction.sol\";\nimport {IMintableERC721} from \"./IMintableERC721.sol\";\nimport {ContextMixin} from \"../../common/ContextMixin.sol\";\n\ncontract DummyMintableERC721 is\n ERC721,\n AccessControlMixin,\n NativeMetaTransaction,\n IMintableERC721,\n ContextMixin\n{\n bytes32 public constant PREDICATE_ROLE = keccak256(\"PREDICATE_ROLE\");\n constructor(string memory name_, string memory symbol_)\n public\n ERC721(name_, symbol_)\n {\n _setupContractId(\"DummyMintableERC721\");\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n _setupRole(PREDICATE_ROLE, _msgSender());\n _initializeEIP712(name_);\n }\n\n function _msgSender()\n internal\n override\n view\n returns (address payable sender)\n {\n return ContextMixin.msgSender();\n }\n\n /**\n * @dev See {IMintableERC721-mint}.\n */\n function mint(address user, uint256 tokenId) external override only(PREDICATE_ROLE) {\n _mint(user, tokenId);\n }\n\n /**\n * If you're attempting to bring metadata associated with token\n * from L2 to L1, you must implement this method, to be invoked\n * when minting token back on L1, during exit\n */\n function setTokenMetadata(uint256 tokenId, bytes memory data) internal virtual {\n // This function should decode metadata obtained from L2\n // and attempt to set it for this `tokenId`\n //\n // Following is just a default implementation, feel\n // free to define your own encoding/ decoding scheme\n // for L2 -> L1 token metadata transfer\n string memory uri = abi.decode(data, (string));\n\n _setTokenURI(tokenId, uri);\n }\n\n /**\n * @dev See {IMintableERC721-mint}.\n * \n * If you're attempting to bring metadata associated with token\n * from L2 to L1, you must implement this method\n */\n function mint(address user, uint256 tokenId, bytes calldata metaData) external override only(PREDICATE_ROLE) {\n _mint(user, tokenId);\n\n setTokenMetadata(tokenId, metaData);\n }\n\n\n /**\n * @dev See {IMintableERC721-exists}.\n */\n function exists(uint256 tokenId) external view override returns (bool) {\n return _exists(tokenId);\n }\n}\n" + }, + "contracts/Libraries/matic/root/RootToken/IMintableERC721.sol": { + "content": "import {IERC721} from \"@openzeppelin/contracts/token/ERC721/IERC721.sol\";\n\npragma solidity 0.6.6;\n\ninterface IMintableERC721 is IERC721 {\n /**\n * @notice called by predicate contract to mint tokens while withdrawing\n * @dev Should be callable only by MintableERC721Predicate\n * Make sure minting is done only by this function\n * @param user user address for whom token is being minted\n * @param tokenId tokenId being minted\n */\n function mint(address user, uint256 tokenId) external;\n\n /**\n * @notice called by predicate contract to mint tokens while withdrawing with metadata from L2\n * @dev Should be callable only by MintableERC721Predicate\n * Make sure minting is only done either by this function/ 👆\n * @param user user address for whom token is being minted\n * @param tokenId tokenId being minted\n * @param metaData Associated token metadata, to be decoded & set using `setTokenMetadata`\n *\n * Note : If you're interested in taking token metadata from L2 to L1 during exit, you must\n * implement this method\n */\n function mint(address user, uint256 tokenId, bytes calldata metaData) external;\n\n /**\n * @notice check if token already exists, return true if it does exist\n * @dev this check will be used by the predicate to determine if the token needs to be minted or transfered\n * @param tokenId tokenId being checked\n */\n function exists(uint256 tokenId) external view returns (bool);\n}\n" + }, + "contracts/Libraries/matic/root/TokenPredicates/MintableERC721Predicate.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {IERC721Receiver} from \"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\nimport {RLPReader} from \"../../lib/RLPReader.sol\";\nimport {IMintableERC721} from \"../RootToken/IMintableERC721.sol\";\nimport {ITokenPredicate} from \"./ITokenPredicate.sol\";\nimport {Initializable} from \"../../common/Initializable.sol\";\n\ncontract MintableERC721Predicate is ITokenPredicate, AccessControlMixin, Initializable, IERC721Receiver {\n using RLPReader for bytes;\n using RLPReader for RLPReader.RLPItem;\n\n // keccak256(\"MANAGER_ROLE\")\n bytes32 public constant MANAGER_ROLE = 0x241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b08;\n // keccak256(\"MintableERC721\")\n bytes32 public constant TOKEN_TYPE = 0xd4392723c111fcb98b073fe55873efb447bcd23cd3e49ec9ea2581930cd01ddc;\n // keccak256(\"Transfer(address,address,uint256)\")\n bytes32 public constant TRANSFER_EVENT_SIG = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef;\n // keccak256(\"WithdrawnBatch(address,uint256[])\")\n bytes32 public constant WITHDRAW_BATCH_EVENT_SIG = 0xf871896b17e9cb7a64941c62c188a4f5c621b86800e3d15452ece01ce56073df;\n // keccak256(\"TransferWithMetadata(address,address,uint256,bytes)\")\n bytes32 public constant TRANSFER_WITH_METADATA_EVENT_SIG = 0xf94915c6d1fd521cee85359239227480c7e8776d7caf1fc3bacad5c269b66a14;\n\n // limit batching of tokens due to gas limit restrictions\n uint256 public constant BATCH_LIMIT = 20;\n\n event LockedMintableERC721(\n address indexed depositor,\n address indexed depositReceiver,\n address indexed rootToken,\n uint256 tokenId\n );\n\n event LockedMintableERC721Batch(\n address indexed depositor,\n address indexed depositReceiver,\n address indexed rootToken,\n uint256[] tokenIds\n );\n\n constructor() public {}\n\n function initialize(address _owner) external initializer {\n _setupContractId(\"MintableERC721Predicate\");\n _setupRole(DEFAULT_ADMIN_ROLE, _owner);\n _setupRole(MANAGER_ROLE, _owner);\n }\n\n /**\n * @notice accepts safe ERC721 transfer\n */\n function onERC721Received(\n address,\n address,\n uint256,\n bytes calldata\n )\n external\n override\n returns (bytes4)\n {\n return IERC721Receiver.onERC721Received.selector;\n }\n\n /**\n * @notice Lock ERC721 token(s) for deposit, callable only by manager\n * @param depositor Address who wants to deposit token\n * @param depositReceiver Address (address) who wants to receive token on child chain\n * @param rootToken Token which gets deposited\n * @param depositData ABI encoded tokenId(s). It's possible to deposit batch of tokens.\n */\n function lockTokens(\n address depositor,\n address depositReceiver,\n address rootToken,\n bytes calldata depositData\n )\n external\n override\n only(MANAGER_ROLE)\n {\n\n // Locking single ERC721 token\n if (depositData.length == 32) {\n\n uint256 tokenId = abi.decode(depositData, (uint256));\n\n // Emitting event that single token is getting locked in predicate\n emit LockedMintableERC721(depositor, depositReceiver, rootToken, tokenId);\n\n // Transferring token to this address, which will be\n // released when attempted to be unlocked\n IMintableERC721(rootToken).safeTransferFrom(depositor, address(this), tokenId);\n\n } else {\n // Locking a set a ERC721 token(s)\n\n uint256[] memory tokenIds = abi.decode(depositData, (uint256[]));\n\n // Emitting event that a set of ERC721 tokens are getting lockec\n // in this predicate contract\n emit LockedMintableERC721Batch(depositor, depositReceiver, rootToken, tokenIds);\n\n // These many tokens are attempted to be deposited\n // by user\n uint256 length = tokenIds.length;\n require(length <= BATCH_LIMIT, \"MintableERC721Predicate: EXCEEDS_BATCH_LIMIT\");\n\n // Iteratively trying to transfer ERC721 token\n // to this predicate address\n for (uint256 i; i < length; i++) {\n\n IMintableERC721(rootToken).safeTransferFrom(depositor, address(this), tokenIds[i]);\n\n }\n\n }\n\n }\n\n /**\n * @notice Validates log signature, from and to address\n * then checks if token already exists on root chain\n * if token exits then transfers it to withdrawer\n * if token doesn't exit then it is minted\n * callable only by manager\n * @param rootToken Token which gets withdrawn\n * @param log Valid ERC721 burn log from child chain\n */\n function exitTokens(\n address,\n address rootToken,\n bytes memory log\n )\n public\n override\n only(MANAGER_ROLE)\n {\n RLPReader.RLPItem[] memory logRLPList = log.toRlpItem().toList();\n RLPReader.RLPItem[] memory logTopicRLPList = logRLPList[1].toList(); // topics\n\n // If it's a simple exit ( with out metadata coming from L2 to L1 )\n if(bytes32(logTopicRLPList[0].toUint()) == TRANSFER_EVENT_SIG) {\n\n address withdrawer = address(logTopicRLPList[1].toUint()); // topic1 is from address\n\n require(\n address(logTopicRLPList[2].toUint()) == address(0), // topic2 is to address\n \"MintableERC721Predicate: INVALID_RECEIVER\"\n );\n\n IMintableERC721 token = IMintableERC721(rootToken);\n\n uint256 tokenId = logTopicRLPList[3].toUint(); // topic3 is tokenId field\n if (token.exists(tokenId)) {\n token.safeTransferFrom(\n address(this),\n withdrawer,\n tokenId\n );\n } else {\n token.mint(withdrawer, tokenId);\n }\n\n } else if (bytes32(logTopicRLPList[0].toUint()) == WITHDRAW_BATCH_EVENT_SIG) { // topic0 is event sig\n // If it's a simple batch exit, where a set of\n // ERC721s were burnt in child chain with event signature\n // looking like `WithdrawnBatch(address indexed user, uint256[] tokenIds);`\n //\n // @note This doesn't allow transfer of metadata cross chain\n // For that check below `else if` block\n\n address withdrawer = address(logTopicRLPList[1].toUint()); // topic1 is from address\n\n // RLP encoded tokenId list\n bytes memory logData = logRLPList[2].toBytes();\n\n (uint256[] memory tokenIds) = abi.decode(logData, (uint256[]));\n uint256 length = tokenIds.length;\n\n IMintableERC721 token = IMintableERC721(rootToken);\n\n for (uint256 i; i < length; i++) {\n\n uint256 tokenId = tokenIds[i];\n\n // Check if token exists or not\n //\n // If does, transfer token to withdrawer\n if (token.exists(tokenId)) {\n token.safeTransferFrom(\n address(this),\n withdrawer,\n tokenId\n );\n } else {\n // If token was minted on L2\n // we'll mint it here, on L1, during\n // exiting from L2\n token.mint(withdrawer, tokenId);\n }\n\n }\n\n } else if (bytes32(logTopicRLPList[0].toUint()) == TRANSFER_WITH_METADATA_EVENT_SIG) { \n // If this is NFT exit with metadata i.e. URI 👆\n //\n // Note: If your token is only minted in L2, you can exit\n // it with metadata. But if it was minted on L1, it'll be\n // simply transferred to withdrawer address. And in that case,\n // it's lot better to exit with `Transfer(address,address,uint256)`\n // i.e. calling `withdraw` method on L2 contract\n // event signature proof, which is defined under first `if` clause\n //\n // If you've called `withdrawWithMetadata`, you should submit\n // proof of event signature `TransferWithMetadata(address,address,uint256,bytes)`\n\n address withdrawer = address(logTopicRLPList[1].toUint()); // topic1 is from address\n\n require(\n address(logTopicRLPList[2].toUint()) == address(0), // topic2 is to address\n \"MintableERC721Predicate: INVALID_RECEIVER\"\n );\n\n IMintableERC721 token = IMintableERC721(rootToken);\n\n uint256 tokenId = logTopicRLPList[3].toUint(); // topic3 is tokenId field\n if (token.exists(tokenId)) {\n token.safeTransferFrom(\n address(this),\n withdrawer,\n tokenId\n );\n } else {\n // Minting with metadata received from L2 i.e. emitted\n // by event `TransferWithMetadata` during burning\n bytes memory logData = logRLPList[2].toBytes();\n bytes memory metaData = abi.decode(logData, (bytes));\n \n token.mint(withdrawer, tokenId, metaData);\n }\n\n } else {\n // Attempting to exit with some event signature from L2, which is\n // not ( yet ) supported by L1 exit manager\n revert(\"MintableERC721Predicate: INVALID_SIGNATURE\");\n }\n \n }\n}\n" + }, + "contracts/Libraries/matic/test/ProxyTestImplStorageLayoutChange.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {Initializable} from \"../common/Initializable.sol\";\n\ncontract ProxyTestImplStorageLayoutChange is Initializable {\n uint256 public b;\n uint256 public a;\n}\n" + }, + "contracts/Libraries/matic/test/ProxyTestImpl.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {Initializable} from \"../common/Initializable.sol\";\n\ncontract ProxyTestImpl is Initializable {\n uint256 public a = 1;\n uint256 public b = 2;\n uint256 public ctorInit;\n\n constructor() public {\n ctorInit = 3;\n }\n\n function init() public initializer {\n a = 1;\n b = 2;\n }\n}\n" + }, + "contracts/Libraries/matic/root/TokenPredicates/MintableERC20Predicate.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {IMintableERC20} from \"../RootToken/IMintableERC20.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\nimport {RLPReader} from \"../../lib/RLPReader.sol\";\nimport {ITokenPredicate} from \"./ITokenPredicate.sol\";\nimport {Initializable} from \"../../common/Initializable.sol\";\n\ncontract MintableERC20Predicate is\n ITokenPredicate,\n AccessControlMixin,\n Initializable\n{\n using RLPReader for bytes;\n using RLPReader for RLPReader.RLPItem;\n\n bytes32 public constant MANAGER_ROLE = keccak256(\"MANAGER_ROLE\");\n bytes32 public constant TOKEN_TYPE = keccak256(\"MintableERC20\");\n bytes32 public constant TRANSFER_EVENT_SIG = keccak256(\n \"Transfer(address,address,uint256)\"\n );\n\n event LockedMintableERC20(\n address indexed depositor,\n address indexed depositReceiver,\n address indexed rootToken,\n uint256 amount\n );\n\n constructor() public {}\n\n function initialize(address _owner) external initializer {\n _setupContractId(\"MintableERC20Predicate\");\n _setupRole(DEFAULT_ADMIN_ROLE, _owner);\n _setupRole(MANAGER_ROLE, _owner);\n }\n\n /**\n * @notice Lock ERC20 tokens for deposit, callable only by manager\n * @param depositor Address who wants to deposit tokens\n * @param depositReceiver Address (address) who wants to receive tokens on child chain\n * @param rootToken Token which gets deposited\n * @param depositData ABI encoded amount\n */\n function lockTokens(\n address depositor,\n address depositReceiver,\n address rootToken,\n bytes calldata depositData\n ) external override only(MANAGER_ROLE) {\n uint256 amount = abi.decode(depositData, (uint256));\n\n emit LockedMintableERC20(depositor, depositReceiver, rootToken, amount);\n IMintableERC20(rootToken).transferFrom(\n depositor,\n address(this),\n amount\n );\n }\n\n /**\n * @notice Validates log signature, from and to address\n * then sends the correct amount to withdrawer\n * callable only by manager\n * @param rootToken Token which gets withdrawn\n * @param log Valid ERC20 burn log from child chain\n */\n function exitTokens(\n address,\n address rootToken,\n bytes memory log\n ) public override only(MANAGER_ROLE) {\n RLPReader.RLPItem[] memory logRLPList = log.toRlpItem().toList();\n RLPReader.RLPItem[] memory logTopicRLPList = logRLPList[1].toList(); // topics\n\n require(\n bytes32(logTopicRLPList[0].toUint()) == TRANSFER_EVENT_SIG, // topic0 is `Transfer` event sig\n \"MintableERC20Predicate: INVALID_SIGNATURE\"\n );\n\n address withdrawer = address(logTopicRLPList[1].toUint()); // topic1 is `from` address\n\n require(\n address(logTopicRLPList[2].toUint()) == address(0), // topic2 is `to` address\n \"MintableERC20Predicate: INVALID_RECEIVER\"\n );\n\n IMintableERC20 token = IMintableERC20(rootToken);\n\n uint256 tokenBalance = token.balanceOf(address(this));\n uint256 amount = logRLPList[2].toUint();\n\n // Checking whether MintableERC20Predicate has enough balance\n // to transfer `amount` to withdrawer or not\n //\n // If no, it'll mint those extra tokens & transfer `amount`\n // to withdrawer\n if (tokenBalance < amount) {\n token.mint(address(this), amount - tokenBalance);\n }\n\n token.transfer(withdrawer, amount);\n }\n}\n" + }, + "contracts/Libraries/matic/root/RootToken/IMintableERC20.sol": { + "content": "import {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\npragma solidity 0.6.6;\n\ninterface IMintableERC20 is IERC20 {\n /**\n * @notice called by predicate contract to mint tokens while withdrawing\n * @dev Should be callable only by MintableERC20Predicate\n * Make sure minting is done only by this function\n * @param user user address for whom token is being minted\n * @param amount amount of token being minted\n */\n function mint(address user, uint256 amount) external;\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n" + }, + "contracts/Libraries/matic/root/TokenPredicates/MintableERC1155Predicate.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {IMintableERC1155} from \"../RootToken/IMintableERC1155.sol\";\nimport {\n ERC1155Receiver\n} from \"@openzeppelin/contracts/token/ERC1155/ERC1155Receiver.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\nimport {RLPReader} from \"../../lib/RLPReader.sol\";\nimport {ITokenPredicate} from \"./ITokenPredicate.sol\";\nimport {Initializable} from \"../../common/Initializable.sol\";\n\ncontract MintableERC1155Predicate is\n ITokenPredicate,\n ERC1155Receiver,\n AccessControlMixin,\n Initializable\n{\n using RLPReader for bytes;\n using RLPReader for RLPReader.RLPItem;\n\n bytes32 public constant MANAGER_ROLE = keccak256(\"MANAGER_ROLE\");\n bytes32 public constant TOKEN_TYPE = keccak256(\"MintableERC1155\");\n\n bytes32 public constant TRANSFER_SINGLE_EVENT_SIG = keccak256(\n \"TransferSingle(address,address,address,uint256,uint256)\"\n );\n bytes32 public constant TRANSFER_BATCH_EVENT_SIG = keccak256(\n \"TransferBatch(address,address,address,uint256[],uint256[])\"\n );\n\n event LockedBatchMintableERC1155(\n address indexed depositor,\n address indexed depositReceiver,\n address indexed rootToken,\n uint256[] ids,\n uint256[] amounts\n );\n\n constructor() public {}\n\n function initialize(address _owner) external initializer {\n _setupContractId(\"MintableERC1155Predicate\");\n _setupRole(DEFAULT_ADMIN_ROLE, _owner);\n _setupRole(MANAGER_ROLE, _owner);\n }\n\n /**\n * @notice rejects single transfer\n */\n function onERC1155Received(\n address,\n address,\n uint256,\n uint256,\n bytes calldata\n ) external override returns (bytes4) {\n return 0;\n }\n\n /**\n * @notice accepts batch transfer\n */\n function onERC1155BatchReceived(\n address,\n address,\n uint256[] calldata,\n uint256[] calldata,\n bytes calldata\n ) external override returns (bytes4) {\n return ERC1155Receiver(0).onERC1155BatchReceived.selector;\n }\n\n /**\n * @notice Lock ERC1155 tokens for deposit, callable only by manager\n * @param depositor Address who wants to deposit tokens\n * @param depositReceiver Address (address) who wants to receive tokens on child chain\n * @param rootToken Token which gets deposited\n * @param depositData ABI encoded id array and amount array\n */\n function lockTokens(\n address depositor,\n address depositReceiver,\n address rootToken,\n bytes calldata depositData\n ) external override only(MANAGER_ROLE) {\n // forcing batch deposit since supporting both single and batch deposit introduces too much complexity\n (\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n ) = abi.decode(depositData, (uint256[], uint256[], bytes));\n\n emit LockedBatchMintableERC1155(\n depositor,\n depositReceiver,\n rootToken,\n ids,\n amounts\n );\n IMintableERC1155(rootToken).safeBatchTransferFrom(\n depositor,\n address(this),\n ids,\n amounts,\n data\n );\n }\n \n // Used when attempting to exit with single token, single amount/ id is converted into\n // slice of amounts/ ids\n // Generally size is going to be `1` i.e. single element array, but it's kept generic\n function makeArrayWithValue(uint256 val, uint size) internal pure returns(uint256[] memory) {\n require(\n size > 0,\n \"MintableERC1155Predicate: Invalid resulting array length\"\n );\n\n uint256[] memory vals = new uint256[](size);\n\n for (uint256 i = 0; i < size; i++) {\n vals[i] = val;\n }\n\n return vals;\n }\n\n /**\n * @notice Creates an array of `size` by repeating provided address,\n * to be required for passing to batch balance checking function of ERC1155 tokens.\n * @param addr Address to be repeated `size` times in resulting array\n * @param size Size of resulting array\n */\n function makeArrayWithAddress(address addr, uint256 size)\n internal\n pure\n returns (address[] memory)\n {\n require(\n addr != address(0),\n \"MintableERC1155Predicate: Invalid address\"\n );\n require(\n size > 0,\n \"MintableERC1155Predicate: Invalid resulting array length\"\n );\n\n address[] memory addresses = new address[](size);\n\n for (uint256 i = 0; i < size; i++) {\n addresses[i] = addr;\n }\n\n return addresses;\n }\n\n /**\n * @notice Calculates amount of tokens to be minted, by subtracting available\n * token balances from amount of tokens to be exited\n * @param tokenBalances Token balances this contract holds for some ordered token ids\n * @param amountsToBeExited Amount of tokens being exited\n */\n function calculateAmountsToBeMinted(\n uint256[] memory tokenBalances,\n uint256[] memory amountsToBeExited\n ) internal pure returns (uint256[] memory) {\n require(\n tokenBalances.length == amountsToBeExited.length,\n \"MintableERC1155Predicate: Array length mismatch found\"\n );\n\n uint256[] memory toBeMintedAmounts = new uint256[](\n tokenBalances.length\n );\n\n // Iteratively calculating amounts of token to be minted\n //\n // Please note, in some cases it can be 0, but that will not\n // be a problem, due to implementation of mint logic for ERC1155\n for (uint256 i = 0; i < tokenBalances.length; i++) {\n if (tokenBalances[i] < amountsToBeExited[i]) {\n toBeMintedAmounts[i] = amountsToBeExited[i] - tokenBalances[i];\n }\n }\n\n return toBeMintedAmounts;\n }\n\n /**\n * @notice Validates log signature, from and to address\n * then sends the correct tokenId, amount to withdrawer\n * callable only by manager\n * @param rootToken Token which gets withdrawn\n * @param log Valid ERC1155 TransferSingle burn or TransferBatch burn log from child chain\n */\n function exitTokens(\n address,\n address rootToken,\n bytes memory log\n ) public override only(MANAGER_ROLE) {\n RLPReader.RLPItem[] memory logRLPList = log.toRlpItem().toList();\n RLPReader.RLPItem[] memory logTopicRLPList = logRLPList[1].toList(); // topics\n bytes memory logData = logRLPList[2].toBytes();\n\n address withdrawer = address(logTopicRLPList[2].toUint()); // topic2 is from address\n\n require(\n address(logTopicRLPList[3].toUint()) == address(0), // topic3 is to address\n \"MintableERC1155Predicate: INVALID_RECEIVER\"\n );\n\n if (bytes32(logTopicRLPList[0].toUint()) == TRANSFER_SINGLE_EVENT_SIG) {\n // topic0 is event sig\n (uint256 id, uint256 amount) = abi.decode(\n logData,\n (uint256, uint256)\n );\n\n IMintableERC1155 token = IMintableERC1155(rootToken);\n // Currently locked tokens for `id` in this contract\n uint256 tokenBalance = token.balanceOf(address(this), id);\n\n // Checking whether MintableERC1155 contract has enough\n // tokens locked in to transfer to withdrawer, if not\n // it'll mint those tokens for this contract and return\n // safely transfer those to withdrawer\n if (tokenBalance < amount) {\n // @notice We could have done `mint`, but that would require\n // us implementing `onERC1155Received`, which we avoid intentionally\n // for sake of only supporting batch deposit.\n //\n // Which is why this transfer is wrapped as single element batch minting\n token.mintBatch(address(this), \n makeArrayWithValue(id, 1), \n makeArrayWithValue(amount - tokenBalance, 1), \n bytes(\"\"));\n }\n\n token.safeTransferFrom(\n address(this),\n withdrawer,\n id,\n amount,\n bytes(\"\")\n );\n } else if (\n bytes32(logTopicRLPList[0].toUint()) == TRANSFER_BATCH_EVENT_SIG\n ) {\n (uint256[] memory ids, uint256[] memory amounts) = abi.decode(\n logData,\n (uint256[], uint256[])\n );\n\n IMintableERC1155 token = IMintableERC1155(rootToken);\n\n token.mintBatch(\n address(this),\n ids,\n calculateAmountsToBeMinted(\n token.balanceOfBatch(\n makeArrayWithAddress(address(this), ids.length),\n ids\n ),\n amounts\n ),\n bytes(\"\")\n );\n\n IMintableERC1155(rootToken).safeBatchTransferFrom(\n address(this),\n withdrawer,\n ids,\n amounts,\n bytes(\"\")\n );\n } else {\n revert(\"MintableERC1155Predicate: INVALID_WITHDRAW_SIG\");\n }\n }\n}\n" + }, + "contracts/Libraries/matic/root/RootToken/IMintableERC1155.sol": { + "content": "import {IERC1155} from \"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\";\n\npragma solidity 0.6.6;\n\ninterface IMintableERC1155 is IERC1155 {\n /**\n * @notice Creates `amount` tokens of token type `id`, and assigns them to `account`.\n * @dev Should be callable only by MintableERC1155Predicate\n * Make sure minting is done only by this function\n * @param account user address for whom token is being minted\n * @param id token which is being minted\n * @param amount amount of token being minted\n * @param data extra byte data to be accompanied with minted tokens\n */\n function mint(address account, uint256 id, uint256 amount, bytes calldata data) external;\n\n /**\n * @notice Batched version of singular token minting, where\n * for each token in `ids` respective amount to be minted from `amounts`\n * array, for address `to`.\n * @dev Should be callable only by MintableERC1155Predicate\n * Make sure minting is done only by this function\n * @param to user address for whom token is being minted\n * @param ids tokens which are being minted\n * @param amounts amount of each token being minted\n * @param data extra byte data to be accompanied with minted tokens\n */\n function mintBatch(address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data) external;\n}\n" + }, + "@openzeppelin/contracts/token/ERC1155/ERC1155Receiver.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"./IERC1155Receiver.sol\";\nimport \"../../introspection/ERC165.sol\";\n\n/**\n * @dev _Available since v3.1._\n */\nabstract contract ERC1155Receiver is ERC165, IERC1155Receiver {\n constructor() internal {\n _registerInterface(\n ERC1155Receiver(address(0)).onERC1155Received.selector ^\n ERC1155Receiver(address(0)).onERC1155BatchReceived.selector\n );\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC1155/IERC1155.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.2 <0.8.0;\n\nimport \"../../introspection/IERC165.sol\";\n\n/**\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\n *\n * _Available since v3.1._\n */\ninterface IERC1155 is IERC165 {\n /**\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\n */\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\n\n /**\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\n * transfers.\n */\n event TransferBatch(address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values);\n\n /**\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\n * `approved`.\n */\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\n\n /**\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\n *\n * If an {URI} event was emitted for `id`, the standard\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\n * returned by {IERC1155MetadataURI-uri}.\n */\n event URI(string value, uint256 indexed id);\n\n /**\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function balanceOf(address account, uint256 id) external view returns (uint256);\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\n *\n * Requirements:\n *\n * - `accounts` and `ids` must have the same length.\n */\n function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory);\n\n /**\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\n *\n * Emits an {ApprovalForAll} event.\n *\n * Requirements:\n *\n * - `operator` cannot be the caller.\n */\n function setApprovalForAll(address operator, bool approved) external;\n\n /**\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\n *\n * See {setApprovalForAll}.\n */\n function isApprovedForAll(address account, address operator) external view returns (bool);\n\n /**\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\n *\n * Emits a {TransferSingle} event.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}.\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\n * acceptance magic value.\n */\n function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\n *\n * Emits a {TransferBatch} event.\n *\n * Requirements:\n *\n * - `ids` and `amounts` must have the same length.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\n * acceptance magic value.\n */\n function safeBatchTransferFrom(address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data) external;\n}\n" + }, + "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"../../introspection/IERC165.sol\";\n\n/**\n * _Available since v3.1._\n */\ninterface IERC1155Receiver is IERC165 {\n\n /**\n @dev Handles the receipt of a single ERC1155 token type. This function is\n called at the end of a `safeTransferFrom` after the balance has been updated.\n To accept the transfer, this must return\n `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))`\n (i.e. 0xf23a6e61, or its own function selector).\n @param operator The address which initiated the transfer (i.e. msg.sender)\n @param from The address which previously owned the token\n @param id The ID of the token being transferred\n @param value The amount of tokens being transferred\n @param data Additional data with no specified format\n @return `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))` if transfer is allowed\n */\n function onERC1155Received(\n address operator,\n address from,\n uint256 id,\n uint256 value,\n bytes calldata data\n )\n external\n returns(bytes4);\n\n /**\n @dev Handles the receipt of a multiple ERC1155 token types. This function\n is called at the end of a `safeBatchTransferFrom` after the balances have\n been updated. To accept the transfer(s), this must return\n `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))`\n (i.e. 0xbc197c81, or its own function selector).\n @param operator The address which initiated the batch transfer (i.e. msg.sender)\n @param from The address which previously owned the token\n @param ids An array containing ids of each token being transferred (order and length must match values array)\n @param values An array containing amounts of each token being transferred (order and length must match ids array)\n @param data Additional data with no specified format\n @return `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))` if transfer is allowed\n */\n function onERC1155BatchReceived(\n address operator,\n address from,\n uint256[] calldata ids,\n uint256[] calldata values,\n bytes calldata data\n )\n external\n returns(bytes4);\n}\n" + }, + "contracts/Libraries/matic/test/MerklePatriciaTest.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {MerklePatriciaProof} from \"../lib/MerklePatriciaProof.sol\";\nimport {RLPReader} from \"../lib/RLPReader.sol\";\n\ncontract MerklePatriciaTest {\n using RLPReader for bytes;\n using RLPReader for RLPReader.RLPItem;\n\n function verify(uint receiptRoot, bytes calldata receipt, bytes calldata receiptProof, bytes calldata branchMask) external pure returns(bool) {\n\n return MerklePatriciaProof.verify(\n receipt, // receipt\n branchMask, // branchMask\n receiptProof, // receiptProof\n bytes32(receiptRoot) // receiptRoot\n );\n }\n}\n" + }, + "contracts/Libraries/matic/root/TokenPredicates/EtherPredicate.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\nimport {RLPReader} from \"../../lib/RLPReader.sol\";\nimport {ITokenPredicate} from \"./ITokenPredicate.sol\";\nimport {Initializable} from \"../../common/Initializable.sol\";\n\ncontract EtherPredicate is ITokenPredicate, AccessControlMixin, Initializable {\n using RLPReader for bytes;\n using RLPReader for RLPReader.RLPItem;\n\n bytes32 public constant MANAGER_ROLE = keccak256(\"MANAGER_ROLE\");\n bytes32 public constant TOKEN_TYPE = keccak256(\"Ether\");\n bytes32 public constant TRANSFER_EVENT_SIG = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef;\n\n event LockedEther(\n address indexed depositor,\n address indexed depositReceiver,\n uint256 amount\n );\n\n event ExitedEther(\n address indexed exitor,\n uint256 amount\n );\n\n constructor() public {}\n\n function initialize(address _owner) external initializer {\n _setupContractId(\"EtherPredicate\");\n _setupRole(DEFAULT_ADMIN_ROLE, _owner);\n _setupRole(MANAGER_ROLE, _owner);\n }\n\n /**\n * @notice Receive Ether to lock for deposit, callable only by manager\n */\n receive() external payable only(MANAGER_ROLE) {}\n\n /**\n * @notice handle ether lock, callable only by manager\n * @param depositor Address who wants to deposit tokens\n * @param depositReceiver Address (address) who wants to receive tokens on child chain\n * @param depositData ABI encoded amount\n */\n function lockTokens(\n address depositor,\n address depositReceiver,\n address,\n bytes calldata depositData\n )\n external\n override\n only(MANAGER_ROLE)\n {\n uint256 amount = abi.decode(depositData, (uint256));\n emit LockedEther(depositor, depositReceiver, amount);\n }\n\n /**\n * @notice Validates log signature, from and to address\n * then sends the correct amount to withdrawer\n * callable only by manager\n * @param log Valid ERC20 burn log from child chain\n */\n function exitTokens(\n address,\n address,\n bytes memory log\n )\n public\n override\n only(MANAGER_ROLE)\n {\n RLPReader.RLPItem[] memory logRLPList = log.toRlpItem().toList();\n RLPReader.RLPItem[] memory logTopicRLPList = logRLPList[1].toList(); // topics\n\n require(\n bytes32(logTopicRLPList[0].toUint()) == TRANSFER_EVENT_SIG, // topic0 is event sig\n \"EtherPredicate: INVALID_SIGNATURE\"\n );\n\n address withdrawer = address(logTopicRLPList[1].toUint()); // topic1 is from address\n\n require(\n address(logTopicRLPList[2].toUint()) == address(0), // topic2 is to address\n \"EtherPredicate: INVALID_RECEIVER\"\n );\n\n emit ExitedEther(withdrawer, logRLPList[2].toUint());\n\n payable(withdrawer).transfer(logRLPList[2].toUint());\n }\n}\n" + }, + "contracts/Libraries/matic/tunnel/BaseChildTunnel.sol": { + "content": "pragma solidity 0.6.6;\n\n\nimport {AccessControlMixin} from \"../common/AccessControlMixin.sol\";\n\n/**\n* @notice Mock child tunnel contract to receive and send message from L2\n*/\nabstract contract BaseChildTunnel is AccessControlMixin {\n bytes32 public constant STATE_SYNCER_ROLE = keccak256(\"STATE_SYNCER_ROLE\");\n\n // MessageTunnel on L1 will get data from this event\n event MessageSent(bytes message);\n\n constructor() internal {\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\n _setupRole(STATE_SYNCER_ROLE, 0x0000000000000000000000000000000000001001);\n _setupContractId(\"ChildTunnel\");\n }\n\n /**\n * @notice Receive state sync from matic contracts\n * @dev This method will be called by Matic chain internally.\n * This is executed without transaction using a system call.\n */\n function onStateReceive(uint256, bytes memory message) public only(STATE_SYNCER_ROLE) {\n _processMessageFromRoot(message);\n }\n\n /**\n * @notice Emit message that can be received on Root Tunnel\n * @dev Call the internal function when need to emit message\n * @param message bytes message that will be sent to Root Tunnel\n * some message examples -\n * abi.encode(tokenId);\n * abi.encode(tokenId, tokenMetadata);\n * abi.encode(messageType, messageData);\n */\n function _sendMessageToRoot(bytes memory message) internal {\n emit MessageSent(message);\n }\n\n /**\n * @notice Process message received from Root Tunnel\n * @dev function needs to be implemented to handle message as per requirement\n * This is called by onStateReceive function.\n * Since it is called via a system call, any event will not be emitted during its execution.\n * @param message bytes message that was sent from Root Tunnel\n */\n function _processMessageFromRoot(bytes memory message) virtual internal;\n}\n" + }, + "contracts/Libraries/matic/tunnel/ChildTunnel.sol": { + "content": "pragma solidity ^0.6.6;\n\nimport {BaseChildTunnel} from \"./BaseChildTunnel.sol\";\n\n\ncontract ChildTunnel is BaseChildTunnel {\n function _processMessageFromRoot(bytes memory message) internal override {\n // implement your core logic here\n }\n}\n" + }, + "contracts/Libraries/matic/test/TestChildTunnel.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {BaseChildTunnel} from \"../tunnel/BaseChildTunnel.sol\";\n\ncontract TestChildTunnel is BaseChildTunnel {\n uint256 public number;\n\n bytes32 public constant TYPE1 = keccak256(\"TYPE1\");\n bytes32 public constant TYPE2 = keccak256(\"TYPE2\");\n\n function _processMessageFromRoot(bytes memory message) internal override {\n (bytes32 syncType, uint256 n) = abi.decode(\n message,\n (bytes32, uint256)\n );\n\n if (TYPE1 == syncType) {\n number = number + n; // add\n } else if (TYPE2 == syncType) {\n number = number - n; // sub\n }\n }\n\n function sendMessage(bytes calldata message) external {\n _sendMessageToRoot(message);\n }\n}\n" + }, + "contracts/Libraries/matic/root/TokenPredicates/ERC721Predicate.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {IRootERC721} from \"../RootToken/IRootERC721.sol\";\nimport {IERC721Receiver} from \"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\";\nimport {RLPReader} from \"../../lib/RLPReader.sol\";\nimport {ITokenPredicate} from \"./ITokenPredicate.sol\";\nimport {Initializable} from \"../../common/Initializable.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\n\ncontract ERC721Predicate is ITokenPredicate, AccessControlMixin, Initializable, IERC721Receiver {\n using RLPReader for bytes;\n using RLPReader for RLPReader.RLPItem;\n\n bytes32 public constant MANAGER_ROLE = keccak256(\"MANAGER_ROLE\");\n bytes32 public constant TOKEN_TYPE = keccak256(\"ERC721\");\n // keccak256(\"Transfer(address,address,uint256)\")\n bytes32 public constant TRANSFER_EVENT_SIG = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef;\n // keccak256(\"WithdrawnBatch(address,uint256[])\")\n bytes32 public constant WITHDRAW_BATCH_EVENT_SIG = 0xf871896b17e9cb7a64941c62c188a4f5c621b86800e3d15452ece01ce56073df;\n // keccak256(\"TransferWithMetadata(address,address,uint256,bytes)\")\n bytes32 public constant TRANSFER_WITH_METADATA_EVENT_SIG = 0xf94915c6d1fd521cee85359239227480c7e8776d7caf1fc3bacad5c269b66a14;\n\n // limit batching of tokens due to gas limit restrictions\n uint256 public constant BATCH_LIMIT = 20;\n\n event LockedERC721(\n address indexed depositor,\n address indexed depositReceiver,\n address indexed rootToken,\n uint256 tokenId\n );\n event LockedERC721Batch(\n address indexed depositor,\n address indexed depositReceiver,\n address indexed rootToken,\n uint256[] tokenIds\n );\n\n constructor() public {}\n\n function initialize(address _owner) external initializer {\n _setupContractId(\"ERC721Predicate\");\n _setupRole(DEFAULT_ADMIN_ROLE, _owner);\n _setupRole(MANAGER_ROLE, _owner);\n }\n\n /**\n * @notice accepts safe ERC721 transfer\n */\n function onERC721Received(\n address,\n address,\n uint256,\n bytes calldata\n )\n external\n override\n returns (bytes4)\n {\n return IERC721Receiver.onERC721Received.selector;\n }\n\n /**\n * @notice Lock ERC721 tokens for deposit, callable only by manager\n * @param depositor Address who wants to deposit token\n * @param depositReceiver Address (address) who wants to receive token on child chain\n * @param rootToken Token which gets deposited\n * @param depositData ABI encoded tokenId\n */\n function lockTokens(\n address depositor,\n address depositReceiver,\n address rootToken,\n bytes calldata depositData\n )\n external\n override\n only(MANAGER_ROLE)\n {\n // deposit single\n if (depositData.length == 32) {\n uint256 tokenId = abi.decode(depositData, (uint256));\n emit LockedERC721(depositor, depositReceiver, rootToken, tokenId);\n IRootERC721(rootToken).safeTransferFrom(depositor, address(this), tokenId);\n\n // deposit batch\n } else {\n uint256[] memory tokenIds = abi.decode(depositData, (uint256[]));\n emit LockedERC721Batch(depositor, depositReceiver, rootToken, tokenIds);\n uint256 length = tokenIds.length;\n require(length <= BATCH_LIMIT, \"ERC721Predicate: EXCEEDS_BATCH_LIMIT\");\n for (uint256 i; i < length; i++) {\n IRootERC721(rootToken).safeTransferFrom(depositor, address(this), tokenIds[i]);\n }\n }\n }\n\n /**\n * @notice Validates log signature, from and to address\n * then sends the correct tokenId to withdrawer\n * callable only by manager\n * @param rootToken Token which gets withdrawn\n * @param log Valid ERC721 burn log from child chain\n */\n function exitTokens(\n address,\n address rootToken,\n bytes memory log\n )\n public\n override\n only(MANAGER_ROLE)\n {\n RLPReader.RLPItem[] memory logRLPList = log.toRlpItem().toList();\n RLPReader.RLPItem[] memory logTopicRLPList = logRLPList[1].toList(); // topics\n address withdrawer = address(logTopicRLPList[1].toUint()); // topic1 is from address\n\n if (bytes32(logTopicRLPList[0].toUint()) == TRANSFER_EVENT_SIG) { // topic0 is event sig\n require(\n address(logTopicRLPList[2].toUint()) == address(0), // topic2 is to address\n \"ERC721Predicate: INVALID_RECEIVER\"\n );\n\n IRootERC721(rootToken).safeTransferFrom(\n address(this),\n withdrawer,\n logTopicRLPList[3].toUint() // topic3 is tokenId field\n );\n\n } else if (bytes32(logTopicRLPList[0].toUint()) == WITHDRAW_BATCH_EVENT_SIG) { // topic0 is event sig\n bytes memory logData = logRLPList[2].toBytes();\n (uint256[] memory tokenIds) = abi.decode(logData, (uint256[])); // data is tokenId list\n uint256 length = tokenIds.length;\n for (uint256 i; i < length; i++) {\n IRootERC721(rootToken).safeTransferFrom(address(this), withdrawer, tokenIds[i]);\n }\n\n } else if (bytes32(logTopicRLPList[0].toUint()) == TRANSFER_WITH_METADATA_EVENT_SIG) { \n // If this is when NFT exit is done with arbitrary metadata on L2\n\n require(\n address(logTopicRLPList[2].toUint()) == address(0), // topic2 is to address\n \"ERC721Predicate: INVALID_RECEIVER\"\n );\n\n IRootERC721 token = IRootERC721(rootToken);\n uint256 tokenId = logTopicRLPList[3].toUint(); // topic3 is tokenId field\n\n token.safeTransferFrom(address(this), withdrawer, tokenId);\n // This function will be invoked for passing arbitrary\n // metadata, obtained from event emitted in L2, to\n // L1 ERC721, so that it can decode & do further processing\n //\n // @note Make sure you've implemented this method\n // if you're interested in exiting with metadata\n bytes memory logData = logRLPList[2].toBytes();\n bytes memory metaData = abi.decode(logData, (bytes));\n\n token.setTokenMetadata(tokenId, metaData);\n\n } else {\n revert(\"ERC721Predicate: INVALID_SIGNATURE\");\n }\n }\n}\n" + }, + "contracts/Libraries/matic/root/RootToken/IRootERC721.sol": { + "content": "import {IERC721} from \"@openzeppelin/contracts/token/ERC721/IERC721.sol\";\n\npragma solidity 0.6.6;\n\ninterface IRootERC721 is IERC721 {\n\n // Make sure you implement this method is root ERC721\n // contract when you're interested in transferring\n // metadata from L2 to L1\n function setTokenMetadata(uint256 tokenId, bytes calldata data) external;\n\n}\n" + }, + "contracts/Libraries/matic/root/RootToken/DummyERC721.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {ERC721} from \"@openzeppelin/contracts/token/ERC721/ERC721.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\nimport {NativeMetaTransaction} from \"../../common/NativeMetaTransaction.sol\";\nimport {IRootERC721} from \"./IRootERC721.sol\";\nimport {ContextMixin} from \"../../common/ContextMixin.sol\";\n\ncontract DummyERC721 is\n ERC721,\n AccessControlMixin,\n NativeMetaTransaction,\n IRootERC721,\n ContextMixin\n{\n bytes32 public constant PREDICATE_ROLE = keccak256(\"PREDICATE_ROLE\");\n constructor(string memory name_, string memory symbol_)\n public\n ERC721(name_, symbol_)\n {\n _setupContractId(\"DummyERC721\");\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n _setupRole(PREDICATE_ROLE, _msgSender());\n _initializeEIP712(name_);\n }\n\n function mint(uint256 tokenId) public {\n _mint(_msgSender(), tokenId);\n }\n\n /**\n * If you're attempting to bring metadata associated with token\n * from L2 to L1, you must implement this method\n *\n * To be invoked when attempting to exit ERC721 with metadata from L2\n *\n * `data` is nothing but arbitrary byte array which\n * is brought in L1, by event emitted in L2, during withdraw\n *\n * Make sure this method is always callable by Predicate contract\n * who will invoke it when attempting to exit with metadata\n */\n function setTokenMetadata(uint256 tokenId, bytes calldata data) external override only(PREDICATE_ROLE) {\n // This function should decode metadata obtained from L2\n // and attempt to set it for this `tokenId`\n //\n // Following is just a default implementation, feel\n // free to define your own encoding/ decoding scheme\n // for L2 -> L1 token metadata transfer\n string memory uri = abi.decode(data, (string));\n\n _setTokenURI(tokenId, uri);\n }\n\n function _msgSender()\n internal\n override\n view\n returns (address payable sender)\n {\n return ContextMixin.msgSender();\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC1155/ERC1155.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"./IERC1155.sol\";\nimport \"./IERC1155MetadataURI.sol\";\nimport \"./IERC1155Receiver.sol\";\nimport \"../../utils/Context.sol\";\nimport \"../../introspection/ERC165.sol\";\nimport \"../../math/SafeMath.sol\";\nimport \"../../utils/Address.sol\";\n\n/**\n *\n * @dev Implementation of the basic standard multi-token.\n * See https://eips.ethereum.org/EIPS/eip-1155\n * Originally based on code by Enjin: https://github.com/enjin/erc-1155\n *\n * _Available since v3.1._\n */\ncontract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {\n using SafeMath for uint256;\n using Address for address;\n\n // Mapping from token ID to account balances\n mapping (uint256 => mapping(address => uint256)) private _balances;\n\n // Mapping from account to operator approvals\n mapping (address => mapping(address => bool)) private _operatorApprovals;\n\n // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json\n string private _uri;\n\n /*\n * bytes4(keccak256('balanceOf(address,uint256)')) == 0x00fdd58e\n * bytes4(keccak256('balanceOfBatch(address[],uint256[])')) == 0x4e1273f4\n * bytes4(keccak256('setApprovalForAll(address,bool)')) == 0xa22cb465\n * bytes4(keccak256('isApprovedForAll(address,address)')) == 0xe985e9c5\n * bytes4(keccak256('safeTransferFrom(address,address,uint256,uint256,bytes)')) == 0xf242432a\n * bytes4(keccak256('safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)')) == 0x2eb2c2d6\n *\n * => 0x00fdd58e ^ 0x4e1273f4 ^ 0xa22cb465 ^\n * 0xe985e9c5 ^ 0xf242432a ^ 0x2eb2c2d6 == 0xd9b67a26\n */\n bytes4 private constant _INTERFACE_ID_ERC1155 = 0xd9b67a26;\n\n /*\n * bytes4(keccak256('uri(uint256)')) == 0x0e89341c\n */\n bytes4 private constant _INTERFACE_ID_ERC1155_METADATA_URI = 0x0e89341c;\n\n /**\n * @dev See {_setURI}.\n */\n constructor (string memory uri_) public {\n _setURI(uri_);\n\n // register the supported interfaces to conform to ERC1155 via ERC165\n _registerInterface(_INTERFACE_ID_ERC1155);\n\n // register the supported interfaces to conform to ERC1155MetadataURI via ERC165\n _registerInterface(_INTERFACE_ID_ERC1155_METADATA_URI);\n }\n\n /**\n * @dev See {IERC1155MetadataURI-uri}.\n *\n * This implementation returns the same URI for *all* token types. It relies\n * on the token type ID substitution mechanism\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\n *\n * Clients calling this function must replace the `\\{id\\}` substring with the\n * actual token type ID.\n */\n function uri(uint256) external view virtual override returns (string memory) {\n return _uri;\n }\n\n /**\n * @dev See {IERC1155-balanceOf}.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {\n require(account != address(0), \"ERC1155: balance query for the zero address\");\n return _balances[id][account];\n }\n\n /**\n * @dev See {IERC1155-balanceOfBatch}.\n *\n * Requirements:\n *\n * - `accounts` and `ids` must have the same length.\n */\n function balanceOfBatch(\n address[] memory accounts,\n uint256[] memory ids\n )\n public\n view\n virtual\n override\n returns (uint256[] memory)\n {\n require(accounts.length == ids.length, \"ERC1155: accounts and ids length mismatch\");\n\n uint256[] memory batchBalances = new uint256[](accounts.length);\n\n for (uint256 i = 0; i < accounts.length; ++i) {\n batchBalances[i] = balanceOf(accounts[i], ids[i]);\n }\n\n return batchBalances;\n }\n\n /**\n * @dev See {IERC1155-setApprovalForAll}.\n */\n function setApprovalForAll(address operator, bool approved) public virtual override {\n require(_msgSender() != operator, \"ERC1155: setting approval status for self\");\n\n _operatorApprovals[_msgSender()][operator] = approved;\n emit ApprovalForAll(_msgSender(), operator, approved);\n }\n\n /**\n * @dev See {IERC1155-isApprovedForAll}.\n */\n function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {\n return _operatorApprovals[account][operator];\n }\n\n /**\n * @dev See {IERC1155-safeTransferFrom}.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 id,\n uint256 amount,\n bytes memory data\n )\n public\n virtual\n override\n {\n require(to != address(0), \"ERC1155: transfer to the zero address\");\n require(\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\n \"ERC1155: caller is not owner nor approved\"\n );\n\n address operator = _msgSender();\n\n _beforeTokenTransfer(operator, from, to, _asSingletonArray(id), _asSingletonArray(amount), data);\n\n _balances[id][from] = _balances[id][from].sub(amount, \"ERC1155: insufficient balance for transfer\");\n _balances[id][to] = _balances[id][to].add(amount);\n\n emit TransferSingle(operator, from, to, id, amount);\n\n _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);\n }\n\n /**\n * @dev See {IERC1155-safeBatchTransferFrom}.\n */\n function safeBatchTransferFrom(\n address from,\n address to,\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n )\n public\n virtual\n override\n {\n require(ids.length == amounts.length, \"ERC1155: ids and amounts length mismatch\");\n require(to != address(0), \"ERC1155: transfer to the zero address\");\n require(\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\n \"ERC1155: transfer caller is not owner nor approved\"\n );\n\n address operator = _msgSender();\n\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\n\n for (uint256 i = 0; i < ids.length; ++i) {\n uint256 id = ids[i];\n uint256 amount = amounts[i];\n\n _balances[id][from] = _balances[id][from].sub(\n amount,\n \"ERC1155: insufficient balance for transfer\"\n );\n _balances[id][to] = _balances[id][to].add(amount);\n }\n\n emit TransferBatch(operator, from, to, ids, amounts);\n\n _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);\n }\n\n /**\n * @dev Sets a new URI for all token types, by relying on the token type ID\n * substitution mechanism\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\n *\n * By this mechanism, any occurrence of the `\\{id\\}` substring in either the\n * URI or any of the amounts in the JSON file at said URI will be replaced by\n * clients with the token type ID.\n *\n * For example, the `https://token-cdn-domain/\\{id\\}.json` URI would be\n * interpreted by clients as\n * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`\n * for token type ID 0x4cce0.\n *\n * See {uri}.\n *\n * Because these URIs cannot be meaningfully represented by the {URI} event,\n * this function emits no events.\n */\n function _setURI(string memory newuri) internal virtual {\n _uri = newuri;\n }\n\n /**\n * @dev Creates `amount` tokens of token type `id`, and assigns them to `account`.\n *\n * Emits a {TransferSingle} event.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n * - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\n * acceptance magic value.\n */\n function _mint(address account, uint256 id, uint256 amount, bytes memory data) internal virtual {\n require(account != address(0), \"ERC1155: mint to the zero address\");\n\n address operator = _msgSender();\n\n _beforeTokenTransfer(operator, address(0), account, _asSingletonArray(id), _asSingletonArray(amount), data);\n\n _balances[id][account] = _balances[id][account].add(amount);\n emit TransferSingle(operator, address(0), account, id, amount);\n\n _doSafeTransferAcceptanceCheck(operator, address(0), account, id, amount, data);\n }\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.\n *\n * Requirements:\n *\n * - `ids` and `amounts` must have the same length.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\n * acceptance magic value.\n */\n function _mintBatch(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) internal virtual {\n require(to != address(0), \"ERC1155: mint to the zero address\");\n require(ids.length == amounts.length, \"ERC1155: ids and amounts length mismatch\");\n\n address operator = _msgSender();\n\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\n\n for (uint i = 0; i < ids.length; i++) {\n _balances[ids[i]][to] = amounts[i].add(_balances[ids[i]][to]);\n }\n\n emit TransferBatch(operator, address(0), to, ids, amounts);\n\n _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);\n }\n\n /**\n * @dev Destroys `amount` tokens of token type `id` from `account`\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens of token type `id`.\n */\n function _burn(address account, uint256 id, uint256 amount) internal virtual {\n require(account != address(0), \"ERC1155: burn from the zero address\");\n\n address operator = _msgSender();\n\n _beforeTokenTransfer(operator, account, address(0), _asSingletonArray(id), _asSingletonArray(amount), \"\");\n\n _balances[id][account] = _balances[id][account].sub(\n amount,\n \"ERC1155: burn amount exceeds balance\"\n );\n\n emit TransferSingle(operator, account, address(0), id, amount);\n }\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.\n *\n * Requirements:\n *\n * - `ids` and `amounts` must have the same length.\n */\n function _burnBatch(address account, uint256[] memory ids, uint256[] memory amounts) internal virtual {\n require(account != address(0), \"ERC1155: burn from the zero address\");\n require(ids.length == amounts.length, \"ERC1155: ids and amounts length mismatch\");\n\n address operator = _msgSender();\n\n _beforeTokenTransfer(operator, account, address(0), ids, amounts, \"\");\n\n for (uint i = 0; i < ids.length; i++) {\n _balances[ids[i]][account] = _balances[ids[i]][account].sub(\n amounts[i],\n \"ERC1155: burn amount exceeds balance\"\n );\n }\n\n emit TransferBatch(operator, account, address(0), ids, amounts);\n }\n\n /**\n * @dev Hook that is called before any token transfer. This includes minting\n * and burning, as well as batched variants.\n *\n * The same hook is called on both single and batched variants. For single\n * transfers, the length of the `id` and `amount` arrays will be 1.\n *\n * Calling conditions (for each `id` and `amount` pair):\n *\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * of token type `id` will be transferred to `to`.\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\n * for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\n * will be burned.\n * - `from` and `to` are never both zero.\n * - `ids` and `amounts` have the same, non-zero length.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(\n address operator,\n address from,\n address to,\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n )\n internal\n virtual\n { }\n\n function _doSafeTransferAcceptanceCheck(\n address operator,\n address from,\n address to,\n uint256 id,\n uint256 amount,\n bytes memory data\n )\n private\n {\n if (to.isContract()) {\n try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {\n if (response != IERC1155Receiver(to).onERC1155Received.selector) {\n revert(\"ERC1155: ERC1155Receiver rejected tokens\");\n }\n } catch Error(string memory reason) {\n revert(reason);\n } catch {\n revert(\"ERC1155: transfer to non ERC1155Receiver implementer\");\n }\n }\n }\n\n function _doSafeBatchTransferAcceptanceCheck(\n address operator,\n address from,\n address to,\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n )\n private\n {\n if (to.isContract()) {\n try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (bytes4 response) {\n if (response != IERC1155Receiver(to).onERC1155BatchReceived.selector) {\n revert(\"ERC1155: ERC1155Receiver rejected tokens\");\n }\n } catch Error(string memory reason) {\n revert(reason);\n } catch {\n revert(\"ERC1155: transfer to non ERC1155Receiver implementer\");\n }\n }\n }\n\n function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {\n uint256[] memory array = new uint256[](1);\n array[0] = element;\n\n return array;\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC1155/IERC1155MetadataURI.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.2 <0.8.0;\n\nimport \"./IERC1155.sol\";\n\n/**\n * @dev Interface of the optional ERC1155MetadataExtension interface, as defined\n * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].\n *\n * _Available since v3.1._\n */\ninterface IERC1155MetadataURI is IERC1155 {\n /**\n * @dev Returns the URI for token type `id`.\n *\n * If the `\\{id\\}` substring is present in the URI, it must be replaced by\n * clients with the actual token type ID.\n */\n function uri(uint256 id) external view returns (string memory);\n}\n" + }, + "contracts/Libraries/matic/root/RootToken/DummyMintableERC1155.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {ERC1155} from \"@openzeppelin/contracts/token/ERC1155/ERC1155.sol\";\nimport {IMintableERC1155} from \"./IMintableERC1155.sol\";\nimport {NativeMetaTransaction} from \"../../common/NativeMetaTransaction.sol\";\nimport {ContextMixin} from \"../../common/ContextMixin.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\n\ncontract DummyMintableERC1155 is\n ERC1155,\n AccessControlMixin,\n NativeMetaTransaction,\n ContextMixin,\n IMintableERC1155\n{\n bytes32 public constant PREDICATE_ROLE = keccak256(\"PREDICATE_ROLE\");\n\n constructor(string memory uri_) public ERC1155(uri_) {\n _setupContractId(\"DummyMintableERC1155\");\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n _setupRole(PREDICATE_ROLE, _msgSender());\n\n _initializeEIP712(uri_);\n }\n\n function mint(\n address account,\n uint256 id,\n uint256 amount,\n bytes calldata data\n ) external override only(PREDICATE_ROLE) {\n _mint(account, id, amount, data);\n }\n\n function mintBatch(\n address to,\n uint256[] calldata ids,\n uint256[] calldata amounts,\n bytes calldata data\n ) external override only(PREDICATE_ROLE) {\n _mintBatch(to, ids, amounts, data);\n }\n\n function _msgSender()\n internal\n override\n view\n returns (address payable sender)\n {\n return ContextMixin.msgSender();\n }\n}\n" + }, + "contracts/Libraries/matic/root/RootToken/DummyMintableERC20.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {ERC20} from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport {IMintableERC20} from \"./IMintableERC20.sol\";\nimport {NativeMetaTransaction} from \"../../common/NativeMetaTransaction.sol\";\nimport {ContextMixin} from \"../../common/ContextMixin.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\n\ncontract DummyMintableERC20 is\n ERC20,\n AccessControlMixin,\n NativeMetaTransaction,\n ContextMixin,\n IMintableERC20\n{\n bytes32 public constant PREDICATE_ROLE = keccak256(\"PREDICATE_ROLE\");\n\n constructor(string memory name_, string memory symbol_)\n public\n ERC20(name_, symbol_)\n {\n _setupContractId(\"DummyMintableERC20\");\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n _setupRole(PREDICATE_ROLE, _msgSender());\n\n _mint(_msgSender(), 10**10 * (10**18));\n _initializeEIP712(name_);\n }\n\n /**\n * @dev See {IMintableERC20-mint}.\n */\n function mint(address user, uint256 amount) external override only(PREDICATE_ROLE) {\n _mint(user, amount);\n }\n\n function _msgSender()\n internal\n override\n view\n returns (address payable sender)\n {\n return ContextMixin.msgSender();\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"../../utils/Context.sol\";\nimport \"./IERC20.sol\";\nimport \"../../math/SafeMath.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * We have followed general OpenZeppelin guidelines: functions revert instead\n * of returning `false` on failure. This behavior is nonetheless conventional\n * and does not conflict with the expectations of ERC20 applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20 is Context, IERC20 {\n using SafeMath for uint256;\n\n mapping (address => uint256) private _balances;\n\n mapping (address => mapping (address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n uint8 private _decimals;\n\n /**\n * @dev Sets the values for {name} and {symbol}, initializes {decimals} with\n * a default value of 18.\n *\n * To select a different value for {decimals}, use {_setupDecimals}.\n *\n * All three of these values are immutable: they can only be set once during\n * construction.\n */\n constructor (string memory name_, string memory symbol_) public {\n _name = name_;\n _symbol = symbol_;\n _decimals = 18;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5,05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\n * called.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual returns (uint8) {\n return _decimals;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `recipient` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * Requirements:\n *\n * - `sender` and `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n * - the caller must have allowance for ``sender``'s tokens of at least\n * `amount`.\n */\n function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \"ERC20: transfer amount exceeds allowance\"));\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \"ERC20: decreased allowance below zero\"));\n return true;\n }\n\n /**\n * @dev Moves tokens `amount` from `sender` to `recipient`.\n *\n * This is internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `sender` cannot be the zero address.\n * - `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n */\n function _transfer(address sender, address recipient, uint256 amount) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(sender, recipient, amount);\n\n _balances[sender] = _balances[sender].sub(amount, \"ERC20: transfer amount exceeds balance\");\n _balances[recipient] = _balances[recipient].add(amount);\n emit Transfer(sender, recipient, amount);\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n * the total supply.\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n */\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply = _totalSupply.add(amount);\n _balances[account] = _balances[account].add(amount);\n emit Transfer(address(0), account, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the\n * total supply.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens.\n */\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n _balances[account] = _balances[account].sub(amount, \"ERC20: burn amount exceeds balance\");\n _totalSupply = _totalSupply.sub(amount);\n emit Transfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(address owner, address spender, uint256 amount) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Sets {decimals} to a value other than the default one of 18.\n *\n * WARNING: This function should only be called from the constructor. Most\n * applications that interact with token contracts will not expect\n * {decimals} to ever change, and may work incorrectly if it does.\n */\n function _setupDecimals(uint8 decimals_) internal virtual {\n _decimals = decimals_;\n }\n\n /**\n * @dev Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * will be to transferred to `to`.\n * - when `from` is zero, `amount` tokens will be minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n * - `from` and `to` are never both 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 amount) internal virtual { }\n}\n" + }, + "contracts/Libraries/matic/test/PotatoMigration/RootPotatoMigrator.sol": { + "content": "pragma solidity 0.6.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"../../root/StateSender/IStateSender.sol\";\nimport \"../../root/RootChainManager/IRootChainManager.sol\";\n\n// This contract enables deposit and plant deom single tx on ethereum chain\n// First potatoes are transferred to this contract\n// Then they are deposited to ChildPotatoMigrator contract\n// Then a custom state sync is sent to ChildPotatoMigrator, using this the potatoes will be planted on matic chain\ncontract RootPotatoMigrator {\n IStateSender stateSender;\n IERC20 potato;\n IRootChainManager rootChainManager;\n address erc20Predicate;\n address childPotatoMigrator;\n\n constructor(\n address stateSender_,\n address potato_,\n address rootChainManager_,\n address erc20Predicate_,\n address childPotatoMigrator_\n ) public {\n stateSender = IStateSender(stateSender_);\n potato = IERC20(potato_);\n rootChainManager = IRootChainManager(rootChainManager_);\n erc20Predicate = erc20Predicate_;\n childPotatoMigrator = childPotatoMigrator_;\n }\n\n function plantOnChildFarm(uint amount) external {\n potato.transferFrom(\n msg.sender,\n address(this),\n amount\n );\n\n potato.approve(erc20Predicate, amount);\n\n rootChainManager.depositFor(\n childPotatoMigrator,\n address(potato),\n abi.encode(amount)\n );\n\n stateSender.syncState(\n childPotatoMigrator,\n abi.encode(msg.sender, amount)\n );\n }\n}\n" + }, + "contracts/Libraries/matic/root/StateSender/DummyStateSender.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {IStateSender} from \"../StateSender/IStateSender.sol\";\n\n/**\n* @notice Dummy State Sender contract to simulate plasma state sender while testing\n*/\ncontract DummyStateSender is IStateSender {\n /**\n * @notice Event emitted when when syncState is called\n * @dev Heimdall bridge listens to this event and sends the data to receiver contract on child chain\n * @param id Id of the sync, increamented for each event in case of actual state sender contract\n * @param contractAddress the contract receiving data on child chain\n * @param data bytes data to be sent\n */\n event StateSynced(\n uint256 indexed id,\n address indexed contractAddress,\n bytes data\n );\n\n /**\n * @notice called to send data to child chain\n * @dev sender and receiver contracts need to be registered in case of actual state sender contract\n * @param receiver the contract receiving data on child chain\n * @param data bytes data to be sent\n */\n function syncState(address receiver, bytes calldata data) external override {\n emit StateSynced(1, receiver, data);\n }\n}\n" + }, + "contracts/Libraries/matic/root/MockCheckpointManager.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {SafeMath} from \"@openzeppelin/contracts/math/SafeMath.sol\";\nimport {ICheckpointManager} from \"./ICheckpointManager.sol\";\n\n/**\n* @notice Mock Checkpoint Manager contract to simulate plasma checkpoints while testing\n*/\ncontract MockCheckpointManager is ICheckpointManager {\n using SafeMath for uint256;\n\n uint256 public currentCheckpointNumber = 0;\n\n function setCheckpoint(bytes32 rootHash, uint256 start, uint256 end) public {\n HeaderBlock memory headerBlock = HeaderBlock({\n root: rootHash,\n start: start,\n end: end,\n createdAt: now,\n proposer: msg.sender\n });\n\n currentCheckpointNumber = currentCheckpointNumber.add(1);\n headerBlocks[currentCheckpointNumber] = headerBlock;\n }\n}\n" + }, + "contracts/Libraries/matic/test/PotatoMigration/ChildPotatoMigrator.sol": { + "content": "pragma solidity 0.6.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"../../child/IStateReceiver.sol\";\nimport \"./ChildPotatoFarm.sol\";\n\n// This contract receives the deposit of potatoes from pos bridge\n// then plants the potatoes for user using custom state sync\ncontract ChildPotatoMigrator is IStateReceiver {\n IERC20 potato;\n ChildPotatoFarm farm;\n constructor(address potato_, address farm_) public {\n potato = IERC20(potato_);\n farm = ChildPotatoFarm(farm_);\n }\n\n function onStateReceive(uint, bytes calldata data) external override {\n (address user, uint amount) = abi.decode(data, (address, uint));\n potato.approve(address(farm), amount);\n farm.plantFor(user, amount);\n }\n}\n" + }, + "contracts/Libraries/matic/child/IStateReceiver.sol": { + "content": "pragma solidity 0.6.6;\n\ninterface IStateReceiver {\n function onStateReceive(uint256 id, bytes calldata data) external;\n}\n" + }, + "contracts/Libraries/matic/test/PotatoMigration/ChildPotatoFarm.sol": { + "content": "pragma solidity 0.6.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\n// This is where potatoes are planted to earn harvest\ncontract ChildPotatoFarm {\n IERC20 potato;\n mapping(address => uint) public plantedAmount;\n\n constructor(address potato_) public {\n potato = IERC20(potato_);\n }\n\n function plantFor(address user, uint amount) external {\n plantedAmount[user] += amount;\n potato.transferFrom(msg.sender, address(this), amount);\n }\n}\n" + }, + "contracts/Libraries/matic/child/ChildChainManager/ChildChainManager.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {IChildChainManager} from \"./IChildChainManager.sol\";\nimport {IChildToken} from \"../ChildToken/IChildToken.sol\";\nimport {Initializable} from \"../../common/Initializable.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\nimport {IStateReceiver} from \"../IStateReceiver.sol\";\n\n\ncontract ChildChainManager is\n IChildChainManager,\n Initializable,\n AccessControlMixin,\n IStateReceiver\n{\n bytes32 public constant DEPOSIT = keccak256(\"DEPOSIT\");\n bytes32 public constant MAP_TOKEN = keccak256(\"MAP_TOKEN\");\n bytes32 public constant MAPPER_ROLE = keccak256(\"MAPPER_ROLE\");\n bytes32 public constant STATE_SYNCER_ROLE = keccak256(\"STATE_SYNCER_ROLE\");\n\n mapping(address => address) public rootToChildToken;\n mapping(address => address) public childToRootToken;\n\n function initialize(address _owner) external initializer {\n _setupContractId(\"ChildChainManager\");\n _setupRole(DEFAULT_ADMIN_ROLE, _owner);\n _setupRole(MAPPER_ROLE, _owner);\n _setupRole(STATE_SYNCER_ROLE, _owner);\n }\n\n /**\n * @notice Map a token to enable its movement via the PoS Portal, callable only by mappers\n * Normally mapping should happen automatically using state sync\n * This function should be used only while initial deployment when state sync is not registrered or if it fails\n * @param rootToken address of token on root chain\n * @param childToken address of token on child chain\n */\n function mapToken(address rootToken, address childToken)\n external\n override\n only(MAPPER_ROLE)\n {\n _mapToken(rootToken, childToken);\n }\n\n /**\n * @notice Receive state sync data from root chain, only callable by state syncer\n * @dev state syncing mechanism is used for both depositing tokens and mapping them\n * @param data bytes data from RootChainManager contract\n * `data` is made up of bytes32 `syncType` and bytes `syncData`\n * `syncType` determines if it is deposit or token mapping\n * in case of token mapping, `syncData` is encoded address `rootToken`, address `childToken` and bytes32 `tokenType`\n * in case of deposit, `syncData` is encoded address `user`, address `rootToken` and bytes `depositData`\n * `depositData` is token specific data (amount in case of ERC20). It is passed as is to child token\n */\n function onStateReceive(uint256, bytes calldata data)\n external\n override\n only(STATE_SYNCER_ROLE)\n {\n (bytes32 syncType, bytes memory syncData) = abi.decode(\n data,\n (bytes32, bytes)\n );\n\n if (syncType == DEPOSIT) {\n _syncDeposit(syncData);\n } else if (syncType == MAP_TOKEN) {\n (address rootToken, address childToken, ) = abi.decode(\n syncData,\n (address, address, bytes32)\n );\n _mapToken(rootToken, childToken);\n } else {\n revert(\"ChildChainManager: INVALID_SYNC_TYPE\");\n }\n }\n\n /**\n * @notice Clean polluted token mapping\n * @param rootToken address of token on root chain. Since rename token was introduced later stage,\n * clean method is used to clean pollulated mapping\n */\n function cleanMapToken(\n address rootToken,\n address childToken\n ) external override only(MAPPER_ROLE) {\n rootToChildToken[rootToken] = address(0);\n childToRootToken[childToken] = address(0);\n\n emit TokenMapped(rootToken, childToken);\n }\n\n function _mapToken(address rootToken, address childToken) private {\n address oldChildToken = rootToChildToken[rootToken];\n address oldRootToken = childToRootToken[childToken];\n\n if (rootToChildToken[oldRootToken] != address(0)) {\n rootToChildToken[oldRootToken] = address(0);\n }\n\n if (childToRootToken[oldChildToken] != address(0)) {\n childToRootToken[oldChildToken] = address(0);\n }\n\n rootToChildToken[rootToken] = childToken;\n childToRootToken[childToken] = rootToken;\n\n emit TokenMapped(rootToken, childToken);\n }\n\n function _syncDeposit(bytes memory syncData) private {\n (address user, address rootToken, bytes memory depositData) = abi\n .decode(syncData, (address, address, bytes));\n address childTokenAddress = rootToChildToken[rootToken];\n require(\n childTokenAddress != address(0x0),\n \"ChildChainManager: TOKEN_NOT_MAPPED\"\n );\n IChildToken childTokenContract = IChildToken(childTokenAddress);\n childTokenContract.deposit(user, depositData);\n }\n}\n" + }, + "contracts/Libraries/matic/child/ChildChainManager/IChildChainManager.sol": { + "content": "pragma solidity 0.6.6;\n\ninterface IChildChainManager {\n event TokenMapped(address indexed rootToken, address indexed childToken);\n\n function mapToken(address rootToken, address childToken) external;\n function cleanMapToken(address rootToken, address childToken) external;\n}\n" + }, + "contracts/Libraries/matic/child/ChildToken/IChildToken.sol": { + "content": "pragma solidity 0.6.6;\n\ninterface IChildToken {\n function deposit(address user, bytes calldata depositData) external;\n}\n" + }, + "contracts/Libraries/matic/child/ChildToken/UpgradeableChildERC20/UChildERC20.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {ERC20} from \"./ERC20.sol\";\nimport {AccessControlMixin} from \"../../../common/AccessControlMixin.sol\";\nimport {IChildToken} from \"../IChildToken.sol\";\nimport {NativeMetaTransaction} from \"../../../common/NativeMetaTransaction.sol\";\nimport {ContextMixin} from \"../../../common/ContextMixin.sol\";\n\n\ncontract UChildERC20 is\n ERC20,\n IChildToken,\n AccessControlMixin,\n NativeMetaTransaction,\n ContextMixin\n{\n bytes32 public constant DEPOSITOR_ROLE = keccak256(\"DEPOSITOR_ROLE\");\n\n constructor() public ERC20(\"\", \"\") {}\n\n /**\n * @notice Initialize the contract after it has been proxified\n * @dev meant to be called once immediately after deployment\n */\n function initialize(\n string calldata name_,\n string calldata symbol_,\n uint8 decimals_,\n address childChainManager\n )\n external\n initializer\n {\n setName(name_);\n setSymbol(symbol_);\n setDecimals(decimals_);\n _setupContractId(string(abi.encodePacked(\"Child\", symbol_)));\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n _setupRole(DEPOSITOR_ROLE, childChainManager);\n _initializeEIP712(name_);\n }\n\n // This is to support Native meta transactions\n // never use msg.sender directly, use _msgSender() instead\n function _msgSender()\n internal\n override\n view\n returns (address payable sender)\n {\n return ContextMixin.msgSender();\n }\n\n function changeName(string calldata name_) external only(DEFAULT_ADMIN_ROLE) {\n setName(name_);\n _setDomainSeperator(name_);\n }\n\n /**\n * @notice called when token is deposited on root chain\n * @dev Should be callable only by ChildChainManager\n * Should handle deposit by minting the required amount for user\n * Make sure minting is done only by this function\n * @param user user address for whom deposit is being done\n * @param depositData abi encoded amount\n */\n function deposit(address user, bytes calldata depositData)\n external\n override\n only(DEPOSITOR_ROLE)\n {\n uint256 amount = abi.decode(depositData, (uint256));\n _mint(user, amount);\n }\n\n /**\n * @notice called when user wants to withdraw tokens back to root chain\n * @dev Should burn user's tokens. This transaction will be verified when exiting on root chain\n * @param amount amount of tokens to withdraw\n */\n function withdraw(uint256 amount) external {\n _burn(_msgSender(), amount);\n }\n}\n" + }, + "contracts/Libraries/matic/child/ChildToken/UpgradeableChildERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.6.0;\n\n\nimport \"@openzeppelin/contracts/GSN/Context.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"@openzeppelin/contracts/math/SafeMath.sol\";\nimport \"@openzeppelin/contracts/utils/Address.sol\";\n\n/**\n * Modified openzeppelin implemtation to add setters for name, symbol and decimals.\n * This was needed because the variables cannot be set in constructor as the contract is upgradeable.\n */\n\n/**\n * @dev openzeppelin Implementation of the {IERC20} interface.\n *\n * Modified to add setters for name, symbol and decimals. This was needed\n * because\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * We have followed general OpenZeppelin guidelines: functions revert instead\n * of returning `false` on failure. This behavior is nonetheless conventional\n * and does not conflict with the expectations of ERC20 applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20 is Context, IERC20 {\n using SafeMath for uint256;\n using Address for address;\n\n mapping (address => uint256) private _balances;\n\n mapping (address => mapping (address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n uint8 private _decimals;\n\n /**\n * @dev Sets the values for {name} and {symbol}, initializes {decimals} with\n * a default value of 18.\n *\n * To select a different value for {decimals}, use {_setupDecimals}.\n *\n * All three of these values are immutable: they can only be set once during\n * construction.\n */\n constructor (string memory name, string memory symbol) public {\n _name = name;\n _symbol = symbol;\n _decimals = 18;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view returns (string memory) {\n return _name;\n }\n\n function setName(string memory newName) internal {\n _name = newName;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function setSymbol(string memory newSymbol) internal {\n _symbol = newSymbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5,05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\n * called.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n function setDecimals(uint8 newDecimals) internal {\n _decimals = newDecimals;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `recipient` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20};\n *\n * Requirements:\n * - `sender` and `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n * - the caller must have allowance for ``sender``'s tokens of at least\n * `amount`.\n */\n function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \"ERC20: transfer amount exceeds allowance\"));\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \"ERC20: decreased allowance below zero\"));\n return true;\n }\n\n /**\n * @dev Moves tokens `amount` from `sender` to `recipient`.\n *\n * This is internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `sender` cannot be the zero address.\n * - `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n */\n function _transfer(address sender, address recipient, uint256 amount) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(sender, recipient, amount);\n\n _balances[sender] = _balances[sender].sub(amount, \"ERC20: transfer amount exceeds balance\");\n _balances[recipient] = _balances[recipient].add(amount);\n emit Transfer(sender, recipient, amount);\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n * the total supply.\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * Requirements\n *\n * - `to` cannot be the zero address.\n */\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply = _totalSupply.add(amount);\n _balances[account] = _balances[account].add(amount);\n emit Transfer(address(0), account, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the\n * total supply.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * Requirements\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens.\n */\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n _balances[account] = _balances[account].sub(amount, \"ERC20: burn amount exceeds balance\");\n _totalSupply = _totalSupply.sub(amount);\n emit Transfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.\n *\n * This is internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(address owner, address spender, uint256 amount) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Sets {decimals} to a value other than the default one of 18.\n *\n * WARNING: This function should only be called from the constructor. Most\n * applications that interact with token contracts will not expect\n * {decimals} to ever change, and may work incorrectly if it does.\n */\n function _setupDecimals(uint8 decimals_) internal {\n _decimals = decimals_;\n }\n\n /**\n * @dev Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * will be to transferred to `to`.\n * - when `from` is zero, `amount` tokens will be minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n * - `from` and `to` are never both 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 amount) internal virtual { }\n}\n" + }, + "@openzeppelin/contracts/GSN/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"../utils/Context.sol\";\n" + }, + "contracts/Libraries/matic/test/TestUChildERC20.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {UChildERC20} from \"../child/ChildToken/UpgradeableChildERC20/UChildERC20.sol\";\n\ncontract TestUChildERC20 is UChildERC20 {\n function magic() external pure returns (string memory) {\n return \"magic\";\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/SafeERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"./IERC20.sol\";\nimport \"../../math/SafeMath.sol\";\nimport \"../../utils/Address.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using SafeMath for uint256;\n using Address for address;\n\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n /**\n * @dev Deprecated. This function has issues similar to the ones found in\n * {IERC20-approve}, and its usage is discouraged.\n *\n * Whenever possible, use {safeIncreaseAllowance} and\n * {safeDecreaseAllowance} instead.\n */\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n // solhint-disable-next-line max-line-length\n require((value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \"SafeERC20: decreased allowance below zero\");\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\n // the target address contains contract code and also asserts for success in the low-level call.\n\n bytes memory returndata = address(token).functionCall(data, \"SafeERC20: low-level call failed\");\n if (returndata.length > 0) { // Return data is optional\n // solhint-disable-next-line max-line-length\n require(abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n }\n}\n" + }, + "contracts/Libraries/matic/root/TokenPredicates/ERC20Predicate.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {SafeERC20} from \"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\nimport {RLPReader} from \"../../lib/RLPReader.sol\";\nimport {ITokenPredicate} from \"./ITokenPredicate.sol\";\nimport {Initializable} from \"../../common/Initializable.sol\";\n\ncontract ERC20Predicate is ITokenPredicate, AccessControlMixin, Initializable {\n using RLPReader for bytes;\n using RLPReader for RLPReader.RLPItem;\n using SafeERC20 for IERC20;\n\n bytes32 public constant MANAGER_ROLE = keccak256(\"MANAGER_ROLE\");\n bytes32 public constant TOKEN_TYPE = keccak256(\"ERC20\");\n bytes32 public constant TRANSFER_EVENT_SIG = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef;\n\n event LockedERC20(\n address indexed depositor,\n address indexed depositReceiver,\n address indexed rootToken,\n uint256 amount\n );\n\n constructor() public {}\n\n function initialize(address _owner) external initializer {\n _setupContractId(\"ERC20Predicate\");\n _setupRole(DEFAULT_ADMIN_ROLE, _owner);\n _setupRole(MANAGER_ROLE, _owner);\n }\n\n /**\n * @notice Lock ERC20 tokens for deposit, callable only by manager\n * @param depositor Address who wants to deposit tokens\n * @param depositReceiver Address (address) who wants to receive tokens on child chain\n * @param rootToken Token which gets deposited\n * @param depositData ABI encoded amount\n */\n function lockTokens(\n address depositor,\n address depositReceiver,\n address rootToken,\n bytes calldata depositData\n )\n external\n override\n only(MANAGER_ROLE)\n {\n uint256 amount = abi.decode(depositData, (uint256));\n emit LockedERC20(depositor, depositReceiver, rootToken, amount);\n IERC20(rootToken).safeTransferFrom(depositor, address(this), amount);\n }\n\n /**\n * @notice Validates log signature, from and to address\n * then sends the correct amount to withdrawer\n * callable only by manager\n * @param rootToken Token which gets withdrawn\n * @param log Valid ERC20 burn log from child chain\n */\n function exitTokens(\n address,\n address rootToken,\n bytes memory log\n )\n public\n override\n only(MANAGER_ROLE)\n {\n RLPReader.RLPItem[] memory logRLPList = log.toRlpItem().toList();\n RLPReader.RLPItem[] memory logTopicRLPList = logRLPList[1].toList(); // topics\n\n require(\n bytes32(logTopicRLPList[0].toUint()) == TRANSFER_EVENT_SIG, // topic0 is event sig\n \"ERC20Predicate: INVALID_SIGNATURE\"\n );\n\n address withdrawer = address(logTopicRLPList[1].toUint()); // topic1 is from address\n\n require(\n address(logTopicRLPList[2].toUint()) == address(0), // topic2 is to address\n \"ERC20Predicate: INVALID_RECEIVER\"\n );\n\n IERC20(rootToken).safeTransfer(\n withdrawer,\n logRLPList[2].toUint() // log data field\n );\n }\n}\n" + }, + "contracts/test/MockLink.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\n\nabstract contract ERC677Receiver {\n function onTokenTransfer(\n address _sender,\n uint256 _value,\n bytes memory _data\n ) public virtual;\n}\n\ncontract MockLink is ERC20 {\n event Transfer(address indexed from, address indexed to, uint256 value, bytes data);\n\n constructor() public ERC20(\"MockLink\", \"LINK\") {\n _mint(msg.sender, 100 * 10**18);\n }\n\n function transferAndCall(\n address _to,\n uint256 _value,\n bytes memory _data\n ) public virtual returns (bool success) {\n super.transfer(_to, _value);\n emit Transfer(msg.sender, _to, _value, _data);\n if (isContract(_to)) {\n contractFallback(_to, _value, _data);\n }\n return true;\n }\n\n function isContract(address _addr) private view returns (bool hasCode) {\n uint256 length;\n assembly {\n length := extcodesize(_addr)\n }\n return length > 0;\n }\n\n function contractFallback(\n address _to,\n uint256 _value,\n bytes memory _data\n ) private {\n ERC677Receiver receiver = ERC677Receiver(_to);\n receiver.onTokenTransfer(msg.sender, _value, _data);\n }\n}\n" + }, + "contracts/Libraries/matic/test/PotatoMigration/RootPotatoToken.sol": { + "content": "pragma solidity 0.6.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\n\n// These are the potatoes on Ethereum chain\ncontract RootPotatoToken is ERC20 {\n constructor() public ERC20(\"Potato\", \"PTT\") {}\n\n function mint(uint256 amount) public {\n _mint(msg.sender, amount);\n }\n}\n" + }, + "contracts/Libraries/matic/root/RootToken/DummyERC20.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {ERC20} from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport {NativeMetaTransaction} from \"../../common/NativeMetaTransaction.sol\";\nimport {ContextMixin} from \"../../common/ContextMixin.sol\";\n\ncontract DummyERC20 is\n ERC20,\n NativeMetaTransaction,\n ContextMixin\n{\n constructor(string memory name_, string memory symbol_)\n public\n ERC20(name_, symbol_)\n {\n uint256 amount = 10**10 * (10**18);\n _mint(_msgSender(), amount);\n _initializeEIP712(name_);\n }\n\n function mint(uint256 amount) public {\n _mint(_msgSender(), amount);\n }\n\n function _msgSender()\n internal\n override\n view\n returns (address payable sender)\n {\n return ContextMixin.msgSender();\n }\n}\n" + }, + "contracts/Libraries/matic/child/ChildToken/ChildMintableERC20.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {ERC20} from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\nimport {IChildToken} from \"./IChildToken.sol\";\nimport {NativeMetaTransaction} from \"../../common/NativeMetaTransaction.sol\";\nimport {ContextMixin} from \"../../common/ContextMixin.sol\";\n\n\ncontract ChildMintableERC20 is\n ERC20,\n IChildToken,\n AccessControlMixin,\n NativeMetaTransaction,\n ContextMixin\n{\n bytes32 public constant DEPOSITOR_ROLE = keccak256(\"DEPOSITOR_ROLE\");\n\n constructor(\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address childChainManager\n ) public ERC20(name_, symbol_) {\n _setupContractId(\"ChildMintableERC20\");\n _setupDecimals(decimals_);\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n _setupRole(DEPOSITOR_ROLE, childChainManager);\n _initializeEIP712(name_);\n }\n\n // This is to support Native meta transactions\n // never use msg.sender directly, use _msgSender() instead\n function _msgSender()\n internal\n override\n view\n returns (address payable sender)\n {\n return ContextMixin.msgSender();\n }\n\n /**\n * @notice called when token is deposited on root chain\n * @dev Should be callable only by ChildChainManager\n * Should handle deposit by minting the required amount for user\n * Make sure minting is done only by this function\n * @param user user address for whom deposit is being done\n * @param depositData abi encoded amount\n */\n function deposit(address user, bytes calldata depositData)\n external\n override\n only(DEPOSITOR_ROLE)\n {\n uint256 amount = abi.decode(depositData, (uint256));\n _mint(user, amount);\n }\n\n /**\n * @notice called when user wants to withdraw tokens back to root chain\n * @dev Should burn user's tokens. This transaction will be verified when exiting on root chain\n * @param amount amount of tokens to withdraw\n */\n function withdraw(uint256 amount) external {\n _burn(_msgSender(), amount);\n }\n\n /**\n * @notice Example function to handle minting tokens on matic chain\n * @dev Minting can be done as per requirement,\n * This implementation allows only admin to mint tokens but it can be changed as per requirement\n * @param user user for whom tokens are being minted\n * @param amount amount of token to mint\n */\n function mint(address user, uint256 amount) public only(DEFAULT_ADMIN_ROLE) {\n _mint(user, amount);\n }\n}\n" + }, + "contracts/Libraries/matic/child/ChildToken/ChildERC20.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {ERC20} from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\nimport {IChildToken} from \"./IChildToken.sol\";\nimport {NativeMetaTransaction} from \"../../common/NativeMetaTransaction.sol\";\nimport {ContextMixin} from \"../../common/ContextMixin.sol\";\n\n\ncontract ChildERC20 is\n ERC20,\n IChildToken,\n AccessControlMixin,\n NativeMetaTransaction,\n ContextMixin\n{\n bytes32 public constant DEPOSITOR_ROLE = keccak256(\"DEPOSITOR_ROLE\");\n\n constructor(\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address childChainManager\n ) public ERC20(name_, symbol_) {\n _setupContractId(\"ChildERC20\");\n _setupDecimals(decimals_);\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n _setupRole(DEPOSITOR_ROLE, childChainManager);\n _initializeEIP712(name_);\n }\n\n // This is to support Native meta transactions\n // never use msg.sender directly, use _msgSender() instead\n function _msgSender()\n internal\n override\n view\n returns (address payable sender)\n {\n return ContextMixin.msgSender();\n }\n\n /**\n * @notice called when token is deposited on root chain\n * @dev Should be callable only by ChildChainManager\n * Should handle deposit by minting the required amount for user\n * Make sure minting is done only by this function\n * @param user user address for whom deposit is being done\n * @param depositData abi encoded amount\n */\n function deposit(address user, bytes calldata depositData)\n external\n override\n only(DEPOSITOR_ROLE)\n {\n uint256 amount = abi.decode(depositData, (uint256));\n _mint(user, amount);\n }\n\n /**\n * @notice called when user wants to withdraw tokens back to root chain\n * @dev Should burn user's tokens. This transaction will be verified when exiting on root chain\n * @param amount amount of tokens to withdraw\n */\n function withdraw(uint256 amount) external {\n _burn(_msgSender(), amount);\n }\n}\n" + }, + "contracts/Libraries/matic/test/PotatoMigration/ChildPotatoToken.sol": { + "content": "pragma solidity 0.6.6;\n\nimport \"../../child/ChildToken/ChildERC20.sol\";\n\n// These are the potatoes on Matic chain\ncontract ChildPotatoToken is ChildERC20 {\n constructor(address childChainManager) public ChildERC20(\"Potato\", \"PTT\", 18, childChainManager) {}\n}\n" + }, + "contracts/Libraries/matic/child/ChildToken/MaticWETH.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {ChildERC20} from \"./ChildERC20.sol\";\n\ncontract MaticWETH is ChildERC20 {\n constructor(address childChainManager) public ChildERC20(\"Wrapped Ether\", \"WETH\", 18, childChainManager) {}\n}\n" + }, + "contracts/CryptOrchidERC721/CryptOrchidERC721.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.6 <0.9.0;\n\nimport \"@chainlink/contracts/src/v0.6/VRFConsumerBase.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts/presets/ERC721PresetMinterPauserAutoId.sol\";\nimport \"@openzeppelin/contracts/utils/Counters.sol\";\nimport \"../Libraries/CurrentTime.sol\";\n\ncontract CryptOrchidERC721 is ERC721PresetMinterPauserAutoId, Ownable, VRFConsumerBase, CurrentTime {\n using SafeMathChainlink for uint256;\n using Strings for string;\n using Counters for Counters.Counter;\n\n struct CryptOrchid {\n string species;\n uint256 plantedAt;\n uint256 waterLevel;\n }\n mapping(uint256 => CryptOrchid) public cryptorchids;\n\n enum Stage {Unsold, Seed, Flower, Dead}\n\n bool internal saleStarted = false;\n bool internal growingStarted = false;\n\n uint256 public constant MAX_CRYPTORCHIDS = 10000;\n uint256 public constant GROWTH_CYCLE = 604800; // 7 days\n uint256 public constant WATERING_WINDOW = 10800; // 3 hours\n uint256 internal constant MAX_TIMESTAMP = 2**256 - 1;\n string internal constant GRANUM_IPFS = \"QmWd1mn7DuGyx9ByfNeqCsgdSUsJZ1cragitgaygsqDvEm\";\n\n uint16[10] private limits = [0, 3074, 6074, 8074, 9074, 9574, 9824, 9924, 9974, 9999];\n string[10] private genum = [\n \"shenzhenica orchidaceae\",\n \"phalaenopsis micholitzii\",\n \"guarianthe aurantiaca\",\n \"vanda coerulea\",\n \"cypripedium calceolus\",\n \"paphiopedilum vietnamense\",\n \"miltonia kayasimae\",\n \"platanthera azorica\",\n \"dendrophylax lindenii\",\n \"paphiopedilum rothschildianum\"\n ];\n\n string[10] private speciesIPFSConstant = [\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/shenzhenica-orchidaceae.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/phalaenopsis-micholitzii.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/guarianthe-aurantiaca.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/vanda-coerulea.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/cypripedium-calceolus.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/paphiopedilum-vietnamense.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/miltonia-kayasimae.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/platanthera-azorica.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/dendrophylax-lindenii.json\",\n \"QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/paphiopedilum-rothschildianum.json\"\n ];\n\n string[10] private deadSpeciesIPFSConstant = [\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/shenzhenica-orchidaceae.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/phalaenopsis-micholitzii.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/guarianthe-aurantiaca.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/vanda-coerulea.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/cypripedium-calceolus.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/paphiopedilum-vietnamense.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/miltonia-kayasimae.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/platanthera-azorica.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/dendrophylax-lindenii.json\",\n \"QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/paphiopedilum-rothschildianum.json\"\n ];\n\n Counters.Counter private _tokenIds;\n\n bytes32 internal keyHash;\n uint256 internal vrfFee;\n uint256 public randomResult;\n address public VRFCoordinator;\n address public LinkToken;\n\n event RequestedRandomness(bytes32 requestId);\n event Planted(uint256 tokenId, string latinSpecies, uint256 timestamp, address tokenOwner);\n event Watered(uint256 tokenId, uint256 waterLevel);\n event Killed(uint256 tokenId);\n\n mapping(bytes32 => uint256) public requestToToken;\n mapping(bytes32 => string) private speciesIPFS;\n mapping(bytes32 => string) private deadSpeciesIPFS;\n\n constructor(\n address _VRFCoordinator,\n address _LinkToken,\n bytes32 _keyhash\n )\n public\n payable\n VRFConsumerBase(_VRFCoordinator, _LinkToken)\n ERC721PresetMinterPauserAutoId(\"CryptOrchids\", \"ORCHD\", \"ipfs://\")\n {\n VRFCoordinator = _VRFCoordinator;\n LinkToken = _LinkToken;\n keyHash = _keyhash;\n vrfFee = 2000000000000000000; // 2 LINK\n\n for (uint256 index = 0; index < genum.length; index++) {\n speciesIPFS[keccak256(abi.encode(genum[index]))] = speciesIPFSConstant[index];\n deadSpeciesIPFS[keccak256(abi.encode(genum[index]))] = deadSpeciesIPFSConstant[index];\n }\n }\n\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\n (string memory species, , , ) = getTokenMetadata(tokenId);\n\n if (growthStage(tokenId) == Stage.Seed) {\n return string(abi.encodePacked(baseURI(), GRANUM_IPFS));\n }\n\n if (growthStage(tokenId) == Stage.Flower) {\n return string(abi.encodePacked(baseURI(), speciesIPFS[keccak256(abi.encode(species))]));\n }\n\n return string(abi.encodePacked(baseURI(), deadSpeciesIPFS[keccak256(abi.encode(species))]));\n }\n\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 tokenId\n ) internal virtual override {\n require(address(0) == to || alive(tokenId), \"Dead CryptOrchids cannot be transferred\");\n super._beforeTokenTransfer(from, to, tokenId);\n }\n\n function currentPrice() public view returns (uint256 price) {\n uint256 currentSupply = totalSupply();\n if (currentSupply >= 9900) {\n return 1000000000000000000; // 9900+: 1.00 ETH\n } else if (currentSupply >= 9500) {\n return 640000000000000000; // 9500-9500: 0.64 ETH\n } else if (currentSupply >= 7500) {\n return 320000000000000000; // 7500-9500: 0.32 ETH\n } else if (currentSupply >= 3500) {\n return 160000000000000000; // 3500-7500: 0.16 ETH\n } else if (currentSupply >= 1500) {\n return 80000000000000000; // 1500-3500: 0.08 ETH\n } else if (currentSupply >= 500) {\n return 60000000000000000; // 500-1500: 0.06 ETH\n } else {\n return 40000000000000000; // 0 - 500 0.04 ETH\n }\n }\n\n function startSale() public onlyOwner {\n saleStarted = true;\n }\n\n function startGrowing() public onlyOwner {\n growingStarted = true;\n }\n\n /**\n * @dev Withdraw ether from this contract (Callable by owner only)\n */\n function withdraw() public onlyOwner {\n uint256 balance = address(this).balance;\n msg.sender.transfer(balance);\n }\n\n receive() external payable {}\n\n function webMint(uint256 units) public payable {\n require(saleStarted, \"The Nursery is closed\");\n require(units <= MAX_CRYPTORCHIDS - totalSupply(), \"Not enough bulbs left\");\n require(totalSupply() < MAX_CRYPTORCHIDS, \"Sale has already ended\");\n require(units > 0 && units <= 20, \"You can plant minimum 1, maximum 20 CryptOrchids\");\n require(SafeMathChainlink.add(totalSupply(), units) <= MAX_CRYPTORCHIDS, \"Exceeds MAX_CRYPTORCHIDS\");\n require(msg.value >= SafeMathChainlink.mul(currentPrice(), units), \"Ether value sent is below the price\");\n\n for (uint256 i = 0; i < units; i++) {\n _tokenIds.increment();\n uint256 newItemId = _tokenIds.current();\n cryptorchids[newItemId] = CryptOrchid({species: \"granum\", plantedAt: MAX_TIMESTAMP, waterLevel: 0});\n _safeMint(msg.sender, newItemId);\n }\n }\n\n function germinate(uint256 tokenId, uint256 userProvidedSeed) public {\n require(growingStarted, \"Germination starts 2021-04-12T16:00:00Z\");\n require(_isApprovedOrOwner(_msgSender(), tokenId), \"Only the Owner can germinate a CryptOrchid.\");\n _requestRandom(tokenId, userProvidedSeed);\n }\n\n function _requestRandom(uint256 tokenId, uint256 userProvidedSeed) internal returns (bytes32 requestId) {\n require(LINK.balanceOf(address(this)) >= vrfFee, \"Not enough LINK - germination unavailable\");\n requestId = requestRandomness(keyHash, vrfFee, userProvidedSeed);\n requestToToken[requestId] = tokenId;\n emit RequestedRandomness(requestId);\n }\n\n function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override {\n uint256 tokenId = requestToToken[requestId];\n CryptOrchid storage orchid = cryptorchids[tokenId];\n string memory species = pickSpecies(SafeMathChainlink.mod(randomness, 10000));\n orchid.species = species;\n orchid.plantedAt = currentTime();\n address tokenOwner = ownerOf(tokenId);\n emit Planted(tokenId, species, currentTime(), tokenOwner);\n }\n\n function alive(uint256 tokenId) public view returns (bool) {\n return growthStage(tokenId) != Stage.Dead;\n }\n\n function flowering(uint256 tokenId) public view returns (bool) {\n return growthStage(tokenId) == Stage.Flower;\n }\n\n function growthStage(uint256 tokenId) public view returns (Stage) {\n CryptOrchid memory orchid = cryptorchids[tokenId];\n if (orchid.plantedAt == 0) return Stage.Unsold;\n if (orchid.plantedAt == MAX_TIMESTAMP) return Stage.Seed;\n uint256 currentWaterLevel = orchid.waterLevel;\n uint256 elapsed = currentTime() - orchid.plantedAt;\n uint256 fullCycles = SafeMathChainlink.div(uint256(elapsed), GROWTH_CYCLE);\n uint256 modulo = SafeMathChainlink.mod(elapsed, GROWTH_CYCLE);\n\n if (currentWaterLevel == fullCycles) {\n return Stage.Flower;\n }\n\n if (SafeMathChainlink.add(currentWaterLevel, 1) == fullCycles && modulo < WATERING_WINDOW) {\n return Stage.Flower;\n }\n\n return Stage.Dead;\n }\n\n function water(uint256 tokenId) public {\n require(_isApprovedOrOwner(_msgSender(), tokenId), \"Only the Owner can water a CryptOrchid.\");\n\n if (!alive(tokenId)) {\n emit Killed(tokenId);\n return;\n }\n\n CryptOrchid storage orchid = cryptorchids[tokenId];\n\n uint256 wateringLevel = orchid.waterLevel;\n uint256 elapsed = currentTime() - orchid.plantedAt;\n uint256 fullCycles = SafeMathChainlink.div(uint256(elapsed), GROWTH_CYCLE);\n\n if (wateringLevel > fullCycles) {\n emit Killed(tokenId);\n return;\n }\n\n uint256 newWaterLevel = SafeMathChainlink.add(wateringLevel, 1);\n orchid.waterLevel = newWaterLevel;\n\n emit Watered(tokenId, newWaterLevel);\n }\n\n function compost(uint256 tokenId) public {\n require(_isApprovedOrOwner(_msgSender(), tokenId), \"Only the Owner can compost a CryptOrchid.\");\n\n burn(tokenId);\n }\n\n function getTokenMetadata(uint256 tokenId)\n public\n view\n returns (\n string memory,\n uint256,\n uint256,\n Stage\n )\n {\n return (\n cryptorchids[tokenId].species,\n cryptorchids[tokenId].plantedAt,\n cryptorchids[tokenId].waterLevel,\n growthStage(tokenId)\n );\n }\n\n function heartbeat(uint256 tokenId) public {\n if (growthStage(tokenId) == Stage.Dead) {\n emit Killed(tokenId);\n }\n }\n\n /**\n * @notice Pick species for random number index\n * @param randomIndex uint256\n * @return species string\n */\n function pickSpecies(uint256 randomIndex) private view returns (string memory) {\n for (uint256 i = 0; i < 10; i++) {\n if (randomIndex <= limits[i]) {\n return genum[i];\n }\n }\n }\n}\n" + }, + "contracts/test/CryptorchidsMock.sol": { + "content": "pragma solidity >=0.6.6 <0.9.0;\n// import \"hardhat/console.sol\";\n\nimport \"../CryptOrchidERC721/CryptOrchidERC721.sol\";\n\ncontract CryptOrchidsMock is CryptOrchidERC721 {\n uint256 internal secondsToAdd = 0;\n\n constructor(\n address _VRFCoordinator,\n address _LinkToken,\n bytes32 _keyhash\n ) public CryptOrchidERC721(_VRFCoordinator, _LinkToken, _keyhash) {}\n\n function timeTravel(uint256 s) public {\n secondsToAdd = s;\n }\n\n function currentTime() internal view virtual override returns (uint256) {\n return block.timestamp + secondsToAdd;\n }\n}\n" + }, + "@chainlink/contracts/src/v0.6/tests/VRFCoordinatorMock.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.6.6;\n\nimport \"../interfaces/LinkTokenInterface.sol\";\nimport \"../VRFConsumerBase.sol\";\n\ncontract VRFCoordinatorMock {\n\n LinkTokenInterface public LINK;\n\n event RandomnessRequest(address indexed sender, bytes32 indexed keyHash, uint256 indexed seed);\n\n constructor(address linkAddress) public {\n LINK = LinkTokenInterface(linkAddress);\n }\n\n function onTokenTransfer(address sender, uint256 fee, bytes memory _data)\n public\n onlyLINK\n {\n (bytes32 keyHash, uint256 seed) = abi.decode(_data, (bytes32, uint256));\n emit RandomnessRequest(sender, keyHash, seed);\n }\n\n function callBackWithRandomness(\n bytes32 requestId,\n uint256 randomness,\n address consumerContract\n ) public {\n VRFConsumerBase v;\n bytes memory resp = abi.encodeWithSelector(v.rawFulfillRandomness.selector, requestId, randomness);\n uint256 b = 206000;\n require(gasleft() >= b, \"not enough gas for consumer\");\n (bool success,) = consumerContract.call(resp);\n }\n\n modifier onlyLINK() {\n require(msg.sender == address(LINK), \"Must use LINK token\");\n _;\n }\n}" + }, + "contracts/test/VRFCoordinatorMock.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.0;\n\nimport \"@chainlink/contracts/src/v0.6/tests/VRFCoordinatorMock.sol\";\n" + }, + "contracts/Libraries/matic/child/ChildToken/DappTokens/UChildDAI.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {UChildERC20} from \"../UpgradeableChildERC20/UChildERC20.sol\";\n\ncontract UChildDAI is UChildERC20 {\n // bytes32 public constant PERMIT_TYPEHASH = keccak256(\"Permit(address holder,address spender,uint256 nonce,uint256 expiry,bool allowed)\");\n bytes32 public constant PERMIT_TYPEHASH = 0xea2aa0a1be11a07ed86d755c93467f4f82362b452371d1ba94d1715123511acb;\n\n // --- Alias ---\n function push(address usr, uint wad) external {\n transferFrom(msg.sender, usr, wad);\n }\n function pull(address usr, uint wad) external {\n transferFrom(usr, msg.sender, wad);\n }\n function move(address src, address dst, uint wad) external {\n transferFrom(src, dst, wad);\n }\n\n // --- Approve by signature ---\n function permit(\n address holder,\n address spender,\n uint256 nonce,\n uint256 expiry,\n bool allowed,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external {\n bytes32 digest = keccak256(\n abi.encodePacked(\n \"\\x19\\x01\",\n getDomainSeperator(),\n keccak256(\n abi.encode(\n PERMIT_TYPEHASH,\n holder,\n spender,\n nonce,\n expiry,\n allowed\n )\n )\n ));\n\n require(holder == ecrecover(digest, v, r, s), \"UChildDAI: INVALID-PERMIT\");\n require(expiry == 0 || now <= expiry, \"UChildDAI: PERMIT-EXPIRED\");\n require(nonce == nonces[holder]++, \"UChildDAI: INVALID-NONCE\");\n require(msg.sender != address(this), \"UChildDAI: PERMIT_META_TX_DISABLED\");\n uint wad = allowed ? uint(-1) : 0;\n _approve(holder, spender, wad);\n }\n}\n" + }, + "contracts/Libraries/matic/child/ChildToken/ChildMintableERC721.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {ERC721} from \"@openzeppelin/contracts/token/ERC721/ERC721.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\nimport {IChildToken} from \"./IChildToken.sol\";\nimport {NativeMetaTransaction} from \"../../common/NativeMetaTransaction.sol\";\nimport {ContextMixin} from \"../../common/ContextMixin.sol\";\n\n\ncontract ChildMintableERC721 is\n ERC721,\n IChildToken,\n AccessControlMixin,\n NativeMetaTransaction,\n ContextMixin\n{\n bytes32 public constant DEPOSITOR_ROLE = keccak256(\"DEPOSITOR_ROLE\");\n mapping (uint256 => bool) public withdrawnTokens;\n\n // limit batching of tokens due to gas limit restrictions\n uint256 public constant BATCH_LIMIT = 20;\n\n event WithdrawnBatch(address indexed user, uint256[] tokenIds);\n event TransferWithMetadata(address indexed from, address indexed to, uint256 indexed tokenId, bytes metaData);\n\n constructor(\n string memory name_,\n string memory symbol_,\n address childChainManager\n ) public ERC721(name_, symbol_) {\n _setupContractId(\"ChildMintableERC721\");\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n _setupRole(DEPOSITOR_ROLE, childChainManager);\n _initializeEIP712(name_);\n }\n\n // This is to support Native meta transactions\n // never use msg.sender directly, use _msgSender() instead\n function _msgSender()\n internal\n override\n view\n returns (address payable sender)\n {\n return ContextMixin.msgSender();\n }\n\n /**\n * @notice called when token is deposited on root chain\n * @dev Should be callable only by ChildChainManager\n * Should handle deposit by minting the required tokenId(s) for user\n * Should set `withdrawnTokens` mapping to `false` for the tokenId being deposited\n * Minting can also be done by other functions\n * @param user user address for whom deposit is being done\n * @param depositData abi encoded tokenIds. Batch deposit also supported.\n */\n function deposit(address user, bytes calldata depositData)\n external\n override\n only(DEPOSITOR_ROLE)\n {\n\n // deposit single\n if (depositData.length == 32) {\n uint256 tokenId = abi.decode(depositData, (uint256));\n withdrawnTokens[tokenId] = false;\n _mint(user, tokenId);\n\n // deposit batch\n } else {\n uint256[] memory tokenIds = abi.decode(depositData, (uint256[]));\n uint256 length = tokenIds.length;\n for (uint256 i; i < length; i++) {\n withdrawnTokens[tokenIds[i]] = false;\n _mint(user, tokenIds[i]);\n }\n }\n\n }\n\n /**\n * @notice called when user wants to withdraw token back to root chain\n * @dev Should handle withraw by burning user's token.\n * Should set `withdrawnTokens` mapping to `true` for the tokenId being withdrawn\n * This transaction will be verified when exiting on root chain\n * @param tokenId tokenId to withdraw\n */\n function withdraw(uint256 tokenId) external {\n require(_msgSender() == ownerOf(tokenId), \"ChildMintableERC721: INVALID_TOKEN_OWNER\");\n withdrawnTokens[tokenId] = true;\n _burn(tokenId);\n }\n\n /**\n * @notice called when user wants to withdraw multiple tokens back to root chain\n * @dev Should burn user's tokens. This transaction will be verified when exiting on root chain\n * @param tokenIds tokenId list to withdraw\n */\n function withdrawBatch(uint256[] calldata tokenIds) external {\n\n uint256 length = tokenIds.length;\n require(length <= BATCH_LIMIT, \"ChildMintableERC721: EXCEEDS_BATCH_LIMIT\");\n\n // Iteratively burn ERC721 tokens, for performing\n // batch withdraw\n for (uint256 i; i < length; i++) {\n\n uint256 tokenId = tokenIds[i];\n\n require(_msgSender() == ownerOf(tokenId), string(abi.encodePacked(\"ChildMintableERC721: INVALID_TOKEN_OWNER \", tokenId)));\n withdrawnTokens[tokenId] = true;\n _burn(tokenId);\n\n }\n\n // At last emit this event, which will be used\n // in MintableERC721 predicate contract on L1\n // while verifying burn proof\n emit WithdrawnBatch(_msgSender(), tokenIds);\n\n }\n\n /**\n * @notice called when user wants to withdraw token back to root chain with token URI\n * @dev Should handle withraw by burning user's token.\n * Should set `withdrawnTokens` mapping to `true` for the tokenId being withdrawn\n * This transaction will be verified when exiting on root chain\n *\n * @param tokenId tokenId to withdraw\n */\n function withdrawWithMetadata(uint256 tokenId) external {\n\n require(_msgSender() == ownerOf(tokenId), \"ChildMintableERC721: INVALID_TOKEN_OWNER\");\n withdrawnTokens[tokenId] = true;\n\n // Encoding metadata associated with tokenId & emitting event\n emit TransferWithMetadata(ownerOf(tokenId), address(0), tokenId, this.encodeTokenMetadata(tokenId));\n\n _burn(tokenId);\n\n }\n\n /**\n * @notice This method is supposed to be called by client when withdrawing token with metadata\n * and pass return value of this function as second paramter of `withdrawWithMetadata` method\n *\n * It can be overridden by clients to encode data in a different form, which needs to\n * be decoded back by them correctly during exiting\n *\n * @param tokenId Token for which URI to be fetched\n */\n function encodeTokenMetadata(uint256 tokenId) external view virtual returns (bytes memory) {\n\n // You're always free to change this default implementation\n // and pack more data in byte array which can be decoded back\n // in L1\n return abi.encode(tokenURI(tokenId));\n\n }\n\n /**\n * @notice Example function to handle minting tokens on matic chain\n * @dev Minting can be done as per requirement,\n * This implementation allows only admin to mint tokens but it can be changed as per requirement\n * Should verify if token is withdrawn by checking `withdrawnTokens` mapping\n * @param user user for whom tokens are being minted\n * @param tokenId tokenId to mint\n */\n function mint(address user, uint256 tokenId) public only(DEFAULT_ADMIN_ROLE) {\n require(!withdrawnTokens[tokenId], \"ChildMintableERC721: TOKEN_EXISTS_ON_ROOT_CHAIN\");\n _mint(user, tokenId);\n }\n}\n" + }, + "contracts/Libraries/matic/child/ChildToken/ChildMintableERC1155.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {ERC1155} from \"@openzeppelin/contracts/token/ERC1155/ERC1155.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\nimport {IChildToken} from \"./IChildToken.sol\";\nimport {NativeMetaTransaction} from \"../../common/NativeMetaTransaction.sol\";\nimport {ContextMixin} from \"../../common/ContextMixin.sol\";\n\ncontract ChildMintableERC1155 is\n ERC1155,\n IChildToken,\n AccessControlMixin,\n NativeMetaTransaction,\n ContextMixin\n{\n bytes32 public constant DEPOSITOR_ROLE = keccak256(\"DEPOSITOR_ROLE\");\n\n constructor(string memory uri_, address childChainManager)\n public\n ERC1155(uri_)\n {\n _setupContractId(\"ChildMintableERC1155\");\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n _setupRole(DEPOSITOR_ROLE, childChainManager);\n _initializeEIP712(uri_);\n }\n\n // This is to support Native meta transactions\n // never use msg.sender directly, use _msgSender() instead\n function _msgSender()\n internal\n override\n view\n returns (address payable sender)\n {\n return ContextMixin.msgSender();\n }\n\n /**\n * @notice called when tokens are deposited on root chain\n * @dev Should be callable only by ChildChainManager\n * Should handle deposit by minting the required tokens for user\n * Make sure minting is done only by this function\n * @param user user address for whom deposit is being done\n * @param depositData abi encoded ids array and amounts array\n */\n function deposit(address user, bytes calldata depositData)\n external\n override\n only(DEPOSITOR_ROLE)\n {\n (\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n ) = abi.decode(depositData, (uint256[], uint256[], bytes));\n\n require(\n user != address(0),\n \"ChildMintableERC1155: INVALID_DEPOSIT_USER\"\n );\n\n _mintBatch(user, ids, amounts, data);\n }\n\n /**\n * @notice called when user wants to withdraw single token back to root chain\n * @dev Should burn user's tokens. This transaction will be verified when exiting on root chain\n * @param id id to withdraw\n * @param amount amount to withdraw\n */\n function withdrawSingle(uint256 id, uint256 amount) external {\n _burn(_msgSender(), id, amount);\n }\n\n /**\n * @notice called when user wants to batch withdraw tokens back to root chain\n * @dev Should burn user's tokens. This transaction will be verified when exiting on root chain\n * @param ids ids to withdraw\n * @param amounts amounts to withdraw\n */\n function withdrawBatch(uint256[] calldata ids, uint256[] calldata amounts)\n external\n {\n _burnBatch(_msgSender(), ids, amounts);\n }\n\n /**\n * @notice See definition of `_mint` in ERC1155 contract\n * @dev This implementation only allows admins to mint tokens\n * but can be changed as per requirement\n */\n function mint(\n address account,\n uint256 id,\n uint256 amount,\n bytes calldata data\n ) external only(DEFAULT_ADMIN_ROLE) {\n _mint(account, id, amount, data);\n }\n\n /**\n * @notice See definition of `_mintBatch` in ERC1155 contract\n * @dev This implementation only allows admins to mint tokens\n * but can be changed as per requirement\n */\n function mintBatch(\n address to,\n uint256[] calldata ids,\n uint256[] calldata amounts,\n bytes calldata data\n ) external only(DEFAULT_ADMIN_ROLE) {\n _mintBatch(to, ids, amounts, data);\n }\n}\n" + }, + "contracts/Libraries/matic/child/ChildToken/ChildERC721.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {ERC721} from \"@openzeppelin/contracts/token/ERC721/ERC721.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\nimport {IChildToken} from \"./IChildToken.sol\";\nimport {NativeMetaTransaction} from \"../../common/NativeMetaTransaction.sol\";\nimport {ContextMixin} from \"../../common/ContextMixin.sol\";\n\ncontract ChildERC721 is\n ERC721,\n IChildToken,\n AccessControlMixin,\n NativeMetaTransaction,\n ContextMixin\n{\n bytes32 public constant DEPOSITOR_ROLE = keccak256(\"DEPOSITOR_ROLE\");\n\n // limit batching of tokens due to gas limit restrictions\n uint256 public constant BATCH_LIMIT = 20;\n\n event WithdrawnBatch(address indexed user, uint256[] tokenIds);\n event TransferWithMetadata(address indexed from, address indexed to, uint256 indexed tokenId, bytes metaData);\n\n constructor(\n string memory name_,\n string memory symbol_,\n address childChainManager\n ) public ERC721(name_, symbol_) {\n _setupContractId(\"ChildERC721\");\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n _setupRole(DEPOSITOR_ROLE, childChainManager);\n _initializeEIP712(name_);\n }\n\n // This is to support Native meta transactions\n // never use msg.sender directly, use _msgSender() instead\n function _msgSender()\n internal\n override\n view\n returns (address payable sender)\n {\n return ContextMixin.msgSender();\n }\n\n /**\n * @notice called when token is deposited on root chain\n * @dev Should be callable only by ChildChainManager\n * Should handle deposit by minting the required tokenId for user\n * Make sure minting is done only by this function\n * @param user user address for whom deposit is being done\n * @param depositData abi encoded tokenId\n */\n function deposit(address user, bytes calldata depositData)\n external\n override\n only(DEPOSITOR_ROLE)\n {\n // deposit single\n if (depositData.length == 32) {\n uint256 tokenId = abi.decode(depositData, (uint256));\n _mint(user, tokenId);\n\n // deposit batch\n } else {\n uint256[] memory tokenIds = abi.decode(depositData, (uint256[]));\n uint256 length = tokenIds.length;\n for (uint256 i; i < length; i++) {\n _mint(user, tokenIds[i]);\n }\n }\n }\n\n /**\n * @notice called when user wants to withdraw token back to root chain\n * @dev Should burn user's token. This transaction will be verified when exiting on root chain\n * @param tokenId tokenId to withdraw\n */\n function withdraw(uint256 tokenId) external {\n require(_msgSender() == ownerOf(tokenId), \"ChildERC721: INVALID_TOKEN_OWNER\");\n _burn(tokenId);\n }\n\n /**\n * @notice called when user wants to withdraw multiple tokens back to root chain\n * @dev Should burn user's tokens. This transaction will be verified when exiting on root chain\n * @param tokenIds tokenId list to withdraw\n */\n function withdrawBatch(uint256[] calldata tokenIds) external {\n uint256 length = tokenIds.length;\n require(length <= BATCH_LIMIT, \"ChildERC721: EXCEEDS_BATCH_LIMIT\");\n for (uint256 i; i < length; i++) {\n uint256 tokenId = tokenIds[i];\n require(_msgSender() == ownerOf(tokenId), string(abi.encodePacked(\"ChildERC721: INVALID_TOKEN_OWNER \", tokenId)));\n _burn(tokenId);\n }\n emit WithdrawnBatch(_msgSender(), tokenIds);\n }\n\n /**\n * @notice called when user wants to withdraw token back to root chain with arbitrary metadata\n * @dev Should handle withraw by burning user's token.\n * \n * This transaction will be verified when exiting on root chain\n *\n * @param tokenId tokenId to withdraw\n */\n function withdrawWithMetadata(uint256 tokenId) external {\n\n require(_msgSender() == ownerOf(tokenId), \"ChildERC721: INVALID_TOKEN_OWNER\");\n\n // Encoding metadata associated with tokenId & emitting event\n emit TransferWithMetadata(_msgSender(), address(0), tokenId, this.encodeTokenMetadata(tokenId));\n\n _burn(tokenId);\n\n }\n\n /**\n * @notice This method is supposed to be called by client when withdrawing token with metadata\n * and pass return value of this function as second paramter of `withdrawWithMetadata` method\n *\n * It can be overridden by clients to encode data in a different form, which needs to\n * be decoded back by them correctly during exiting\n *\n * @param tokenId Token for which URI to be fetched\n */\n function encodeTokenMetadata(uint256 tokenId) external view virtual returns (bytes memory) {\n\n // You're always free to change this default implementation\n // and pack more data in byte array which can be decoded back\n // in L1\n return abi.encode(tokenURI(tokenId));\n\n }\n}\n" + }, + "contracts/Libraries/matic/child/ChildToken/ChildERC1155.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {ERC1155} from \"@openzeppelin/contracts/token/ERC1155/ERC1155.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\nimport {IChildToken} from \"./IChildToken.sol\";\nimport {NativeMetaTransaction} from \"../../common/NativeMetaTransaction.sol\";\nimport {ContextMixin} from \"../../common/ContextMixin.sol\";\n\ncontract ChildERC1155 is\n ERC1155,\n IChildToken,\n AccessControlMixin,\n NativeMetaTransaction,\n ContextMixin\n{\n bytes32 public constant DEPOSITOR_ROLE = keccak256(\"DEPOSITOR_ROLE\");\n\n constructor(string memory uri_, address childChainManager)\n public\n ERC1155(uri_)\n {\n _setupContractId(\"ChildERC1155\");\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n _setupRole(DEPOSITOR_ROLE, childChainManager);\n _initializeEIP712(uri_);\n }\n\n // This is to support Native meta transactions\n // never use msg.sender directly, use _msgSender() instead\n function _msgSender()\n internal\n override\n view\n returns (address payable sender)\n {\n return ContextMixin.msgSender();\n }\n\n /**\n * @notice called when tokens are deposited on root chain\n * @dev Should be callable only by ChildChainManager\n * Should handle deposit by minting the required tokens for user\n * Make sure minting is done only by this function\n * @param user user address for whom deposit is being done\n * @param depositData abi encoded ids array and amounts array\n */\n function deposit(address user, bytes calldata depositData)\n external\n override\n only(DEPOSITOR_ROLE)\n {\n (\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n ) = abi.decode(depositData, (uint256[], uint256[], bytes));\n require(user != address(0x0), \"ChildERC1155: INVALID_DEPOSIT_USER\");\n _mintBatch(user, ids, amounts, data);\n }\n\n /**\n * @notice called when user wants to withdraw single token back to root chain\n * @dev Should burn user's tokens. This transaction will be verified when exiting on root chain\n * @param id id to withdraw\n * @param amount amount to withdraw\n */\n function withdrawSingle(uint256 id, uint256 amount) external {\n _burn(_msgSender(), id, amount);\n }\n\n /**\n * @notice called when user wants to batch withdraw tokens back to root chain\n * @dev Should burn user's tokens. This transaction will be verified when exiting on root chain\n * @param ids ids to withdraw\n * @param amounts amounts to withdraw\n */\n function withdrawBatch(uint256[] calldata ids, uint256[] calldata amounts)\n external\n {\n _burnBatch(_msgSender(), ids, amounts);\n }\n}\n" + }, + "contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.6 <0.9.0;\n\nimport {CryptOrchidGoerli} from \"../CryptOrchidGoerli/CryptOrchidGoerli.sol\";\nimport {AccessControlMixin} from \"../Libraries/matic/common/AccessControlMixin.sol\";\nimport {IChildToken} from \"../Libraries/matic/child/ChildToken/IChildToken.sol\";\nimport {NativeMetaTransaction} from \"../Libraries/matic/common/NativeMetaTransaction.sol\";\nimport {ContextMixin} from \"../Libraries/matic/common/ContextMixin.sol\";\nimport {FxBaseChildTunnel} from \"../Libraries/tunnel/FxBaseChildTunnel.sol\";\n\ncontract CryptOrchidERC721Child is\n CryptOrchidGoerli,\n IChildToken,\n AccessControlMixin,\n NativeMetaTransaction,\n ContextMixin,\n FxBaseChildTunnel\n{\n bytes32 public constant DEPOSITOR_ROLE = keccak256(\"DEPOSITOR_ROLE\");\n\n // limit batching of tokens due to gas limit restrictions\n uint256 public constant BATCH_LIMIT = 20;\n\n event WithdrawnBatch(address indexed user, uint256[] tokenIds);\n event TransferWithMetadata(address indexed from, address indexed to, uint256 indexed tokenId, bytes metaData);\n\n constructor(address childChainManager, address _fxChild) public CryptOrchidGoerli() FxBaseChildTunnel(_fxChild) {\n _setupContractId(\"CryptOrchidERC721Child\");\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n _setupRole(DEPOSITOR_ROLE, childChainManager);\n _initializeEIP712(\"CryptOrchids\");\n }\n\n // This is to support Native meta transactions\n // never use msg.sender directly, use _msgSender() instead\n function _msgSender() internal view override returns (address payable sender) {\n return ContextMixin.msgSender();\n }\n\n /**\n * @notice called when token is deposited on root chain\n * @dev Should be callable only by ChildChainManager\n * Should handle deposit by minting the required tokenId for user\n * Make sure minting is done only by this function\n * @param user user address for whom deposit is being done\n * @param depositData abi encoded tokenId\n */\n function deposit(address user, bytes calldata depositData) external override only(DEPOSITOR_ROLE) {\n // deposit single\n if (depositData.length == 32) {\n uint256 tokenId = abi.decode(depositData, (uint256));\n _mint(user, tokenId);\n\n // deposit batch\n } else {\n uint256[] memory tokenIds = abi.decode(depositData, (uint256[]));\n uint256 length = tokenIds.length;\n for (uint256 i; i < length; i++) {\n _mint(user, tokenIds[i]);\n }\n }\n }\n\n function _processMessageFromRoot(\n uint256 stateId,\n address sender,\n bytes memory data\n ) internal override validateSender(sender) {\n (string memory species, uint256 plantedAt, uint256 waterLevel, uint256 tokenId) = abi.decode(\n data,\n (string, uint256, uint256, uint256)\n );\n\n require(cryptorchids[tokenId].plantedAt == 0, \"Metdata already transferred\");\n\n cryptorchids[tokenId] = CryptOrchid({species: species, plantedAt: plantedAt, waterLevel: waterLevel});\n }\n\n function sendMessageToRoot(bytes memory message) public {\n _sendMessageToRoot(message);\n }\n}\n" + }, + "contracts/Libraries/tunnel/FxBaseChildTunnel.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.6 <0.9.0;\n\n// IFxMessageProcessor represents interface to process message\ninterface IFxMessageProcessor {\n function processMessageFromRoot(\n uint256 stateId,\n address rootMessageSender,\n bytes calldata data\n ) external;\n}\n\n/**\n * @notice Mock child tunnel contract to receive and send message from L2\n */\nabstract contract FxBaseChildTunnel is IFxMessageProcessor {\n // MessageTunnel on L1 will get data from this event\n event MessageSent(bytes message);\n\n // fx child\n address public fxChild;\n\n // fx root tunnel\n address public fxRootTunnel;\n\n constructor(address _fxChild) internal {\n fxChild = _fxChild;\n }\n\n // Sender must be fxRootTunnel in case of ERC20 tunnel\n modifier validateSender(address sender) {\n require(sender == fxRootTunnel, \"FxBaseChildTunnel: INVALID_SENDER_FROM_ROOT\");\n _;\n }\n\n // set fxRootTunnel if not set already\n function setFxRootTunnel(address _fxRootTunnel) public {\n require(fxRootTunnel == address(0x0), \"FxBaseChildTunnel: ROOT_TUNNEL_ALREADY_SET\");\n fxRootTunnel = _fxRootTunnel;\n }\n\n function processMessageFromRoot(\n uint256 stateId,\n address rootMessageSender,\n bytes memory data\n ) public override {\n require(msg.sender == fxChild, \"FxBaseChildTunnel: INVALID_SENDER\");\n _processMessageFromRoot(stateId, rootMessageSender, data);\n }\n\n /**\n * @notice Emit message that can be received on Root Tunnel\n * @dev Call the internal function when need to emit message\n * @param message bytes message that will be sent to Root Tunnel\n * some message examples -\n * abi.encode(tokenId);\n * abi.encode(tokenId, tokenMetadata);\n * abi.encode(messageType, messageData);\n */\n function _sendMessageToRoot(bytes memory message) internal {\n emit MessageSent(message);\n }\n\n /**\n * @notice Process message received from Root Tunnel\n * @dev function needs to be implemented to handle message as per requirement\n * This is called by onStateReceive function.\n * Since it is called via a system call, any event will not be emitted during its execution.\n * @param stateId unique state id\n * @param sender root message sender\n * @param message bytes message that was sent from Root Tunnel\n */\n function _processMessageFromRoot(\n uint256 stateId,\n address sender,\n bytes memory message\n ) internal virtual;\n}\n" + }, + "contracts/Libraries/matic/root/RootToken/DummyERC1155.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {ERC1155} from \"@openzeppelin/contracts/token/ERC1155/ERC1155.sol\";\nimport {NativeMetaTransaction} from \"../../common/NativeMetaTransaction.sol\";\nimport {ContextMixin} from \"../../common/ContextMixin.sol\";\n\ncontract DummyERC1155 is\n ERC1155,\n NativeMetaTransaction,\n ContextMixin\n{\n constructor(string memory uri_)\n public\n ERC1155(uri_)\n {\n _initializeEIP712(uri_);\n }\n\n function mint(address account, uint256 id, uint256 amount) public {\n _mint(account, id, amount, bytes(\"\"));\n }\n\n function _msgSender()\n internal\n override\n view\n returns (address payable sender)\n {\n return ContextMixin.msgSender();\n }\n}\n" + }, + "contracts/Libraries/matic/root/TokenPredicates/ERC1155Predicate.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {IERC1155} from \"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\";\nimport {ERC1155Receiver} from \"@openzeppelin/contracts/token/ERC1155/ERC1155Receiver.sol\";\nimport {AccessControlMixin} from \"../../common/AccessControlMixin.sol\";\nimport {RLPReader} from \"../../lib/RLPReader.sol\";\nimport {ITokenPredicate} from \"./ITokenPredicate.sol\";\nimport {Initializable} from \"../../common/Initializable.sol\";\n\ncontract ERC1155Predicate is ITokenPredicate, ERC1155Receiver, AccessControlMixin, Initializable {\n using RLPReader for bytes;\n using RLPReader for RLPReader.RLPItem;\n\n bytes32 public constant MANAGER_ROLE = keccak256(\"MANAGER_ROLE\");\n bytes32 public constant TOKEN_TYPE = keccak256(\"ERC1155\");\n\n // keccak256(\"TransferSingle(address,address,address,uint256,uint256)\")\n bytes32 public constant TRANSFER_SINGLE_EVENT_SIG = 0xc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62;\n // keccak256(\"TransferBatch(address,address,address,uint256[],uint256[])\")\n bytes32 public constant TRANSFER_BATCH_EVENT_SIG = 0x4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb;\n\n event LockedBatchERC1155(\n address indexed depositor,\n address indexed depositReceiver,\n address indexed rootToken,\n uint256[] ids,\n uint256[] amounts\n );\n\n constructor() public {}\n\n function initialize(address _owner) external initializer {\n _setupContractId(\"ERC1155Predicate\");\n _setupRole(DEFAULT_ADMIN_ROLE, _owner);\n _setupRole(MANAGER_ROLE, _owner);\n }\n\n /**\n * @notice rejects single transfer\n */\n function onERC1155Received(\n address,\n address,\n uint256,\n uint256,\n bytes calldata\n ) external override returns (bytes4) {\n return 0;\n }\n\n /**\n * @notice accepts batch transfer\n */\n function onERC1155BatchReceived(\n address,\n address,\n uint256[] calldata,\n uint256[] calldata,\n bytes calldata\n ) external override returns (bytes4) {\n return ERC1155Receiver(0).onERC1155BatchReceived.selector;\n }\n\n /**\n * @notice Lock ERC1155 tokens for deposit, callable only by manager\n * @param depositor Address who wants to deposit tokens\n * @param depositReceiver Address (address) who wants to receive tokens on child chain\n * @param rootToken Token which gets deposited\n * @param depositData ABI encoded id array and amount array\n */\n function lockTokens(\n address depositor,\n address depositReceiver,\n address rootToken,\n bytes calldata depositData\n )\n external\n override\n only(MANAGER_ROLE)\n {\n // forcing batch deposit since supporting both single and batch deposit introduces too much complexity\n (\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n ) = abi.decode(depositData, (uint256[], uint256[], bytes));\n emit LockedBatchERC1155(\n depositor,\n depositReceiver,\n rootToken,\n ids,\n amounts\n );\n IERC1155(rootToken).safeBatchTransferFrom(\n depositor,\n address(this),\n ids,\n amounts,\n data\n );\n }\n\n /**\n * @notice Validates log signature, from and to address\n * then sends the correct tokenId, amount to withdrawer\n * callable only by manager\n * @param rootToken Token which gets withdrawn\n * @param log Valid ERC1155 TransferSingle burn or TransferBatch burn log from child chain\n */\n function exitTokens(\n address,\n address rootToken,\n bytes memory log\n )\n public\n override\n only(MANAGER_ROLE)\n {\n RLPReader.RLPItem[] memory logRLPList = log.toRlpItem().toList();\n RLPReader.RLPItem[] memory logTopicRLPList = logRLPList[1].toList(); // topics\n bytes memory logData = logRLPList[2].toBytes();\n\n address withdrawer = address(logTopicRLPList[2].toUint()); // topic2 is from address\n\n require(\n address(logTopicRLPList[3].toUint()) == address(0), // topic3 is to address\n \"ERC1155Predicate: INVALID_RECEIVER\"\n );\n\n if (bytes32(logTopicRLPList[0].toUint()) == TRANSFER_SINGLE_EVENT_SIG) { // topic0 is event sig\n (uint256 id, uint256 amount) = abi.decode(\n logData,\n (uint256, uint256)\n );\n IERC1155(rootToken).safeTransferFrom(\n address(this),\n withdrawer,\n id,\n amount,\n bytes(\"\")\n );\n } else if (bytes32(logTopicRLPList[0].toUint()) == TRANSFER_BATCH_EVENT_SIG) {\n (uint256[] memory ids, uint256[] memory amounts) = abi.decode(\n logData,\n (uint256[], uint256[])\n );\n IERC1155(rootToken).safeBatchTransferFrom(\n address(this),\n withdrawer,\n ids,\n amounts,\n bytes(\"\")\n );\n } else {\n revert(\"ERC1155Predicate: INVALID_WITHDRAW_SIG\");\n }\n }\n}\n" + }, + "contracts/Libraries/matic/test/TestRootTunnel.sol": { + "content": "pragma solidity 0.6.6;\n\nimport {BaseRootTunnel} from \"../tunnel/BaseRootTunnel.sol\";\n\ncontract TestRootTunnel is BaseRootTunnel {\n uint256 public receivedNumber;\n\n event MessageReceivedFromChild(uint256);\n\n function _processMessageFromChild(bytes memory message) internal override {\n (uint256 n) = abi.decode(message, (uint256));\n emit MessageReceivedFromChild(n);\n receivedNumber = n;\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/flat.sol b/flat.sol new file mode 100644 index 0000000..ddd4062 --- /dev/null +++ b/flat.sol @@ -0,0 +1,3174 @@ +// Sources flattened with hardhat v2.3.0 https://hardhat.org + +// File @openzeppelin/contracts/utils/Context.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + +/* + * @dev Provides information about the current execution context, including the + * sender of the transaction and its data. While these are generally available + * via msg.sender and msg.data, they should not be accessed in such a direct + * manner, since when dealing with GSN meta-transactions the account sending and + * paying for execution may not be the actual sender (as far as an application + * is concerned). + * + * This contract is only required for intermediate, library-like contracts. + */ +abstract contract Context { + function _msgSender() internal view virtual returns (address payable) { + return msg.sender; + } + + function _msgData() internal view virtual returns (bytes memory) { + this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 + return msg.data; + } +} + + +// File @openzeppelin/contracts/access/Ownable.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + +/** + * @dev Contract module which provides a basic access control mechanism, where + * there is an account (an owner) that can be granted exclusive access to + * specific functions. + * + * By default, the owner account will be the one that deploys the contract. This + * can later be changed with {transferOwnership}. + * + * This module is used through inheritance. It will make available the modifier + * `onlyOwner`, which can be applied to your functions to restrict their use to + * the owner. + */ +abstract contract Ownable is Context { + address private _owner; + + event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); + + /** + * @dev Initializes the contract setting the deployer as the initial owner. + */ + constructor () internal { + address msgSender = _msgSender(); + _owner = msgSender; + emit OwnershipTransferred(address(0), msgSender); + } + + /** + * @dev Returns the address of the current owner. + */ + function owner() public view virtual returns (address) { + return _owner; + } + + /** + * @dev Throws if called by any account other than the owner. + */ + modifier onlyOwner() { + require(owner() == _msgSender(), "Ownable: caller is not the owner"); + _; + } + + /** + * @dev Leaves the contract without owner. It will not be possible to call + * `onlyOwner` functions anymore. Can only be called by the current owner. + * + * NOTE: Renouncing ownership will leave the contract without an owner, + * thereby removing any functionality that is only available to the owner. + */ + function renounceOwnership() public virtual onlyOwner { + emit OwnershipTransferred(_owner, address(0)); + _owner = address(0); + } + + /** + * @dev Transfers ownership of the contract to a new account (`newOwner`). + * Can only be called by the current owner. + */ + function transferOwnership(address newOwner) public virtual onlyOwner { + require(newOwner != address(0), "Ownable: new owner is the zero address"); + emit OwnershipTransferred(_owner, newOwner); + _owner = newOwner; + } +} + + +// File @openzeppelin/contracts/math/SafeMath.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + +/** + * @dev Wrappers over Solidity's arithmetic operations with added overflow + * checks. + * + * Arithmetic operations in Solidity wrap on overflow. This can easily result + * in bugs, because programmers usually assume that an overflow raises an + * error, which is the standard behavior in high level programming languages. + * `SafeMath` restores this intuition by reverting the transaction when an + * operation overflows. + * + * Using this library instead of the unchecked operations eliminates an entire + * class of bugs, so it's recommended to use it always. + */ +library SafeMath { + /** + * @dev Returns the addition of two unsigned integers, with an overflow flag. + * + * _Available since v3.4._ + */ + function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { + uint256 c = a + b; + if (c < a) return (false, 0); + return (true, c); + } + + /** + * @dev Returns the substraction of two unsigned integers, with an overflow flag. + * + * _Available since v3.4._ + */ + function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { + if (b > a) return (false, 0); + return (true, a - b); + } + + /** + * @dev Returns the multiplication of two unsigned integers, with an overflow flag. + * + * _Available since v3.4._ + */ + function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { + // Gas optimization: this is cheaper than requiring 'a' not being zero, but the + // benefit is lost if 'b' is also tested. + // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 + if (a == 0) return (true, 0); + uint256 c = a * b; + if (c / a != b) return (false, 0); + return (true, c); + } + + /** + * @dev Returns the division of two unsigned integers, with a division by zero flag. + * + * _Available since v3.4._ + */ + function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { + if (b == 0) return (false, 0); + return (true, a / b); + } + + /** + * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. + * + * _Available since v3.4._ + */ + function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { + if (b == 0) return (false, 0); + return (true, a % b); + } + + /** + * @dev Returns the addition of two unsigned integers, reverting on + * overflow. + * + * Counterpart to Solidity's `+` operator. + * + * Requirements: + * + * - Addition cannot overflow. + */ + function add(uint256 a, uint256 b) internal pure returns (uint256) { + uint256 c = a + b; + require(c >= a, "SafeMath: addition overflow"); + return c; + } + + /** + * @dev Returns the subtraction of two unsigned integers, reverting on + * overflow (when the result is negative). + * + * Counterpart to Solidity's `-` operator. + * + * Requirements: + * + * - Subtraction cannot overflow. + */ + function sub(uint256 a, uint256 b) internal pure returns (uint256) { + require(b <= a, "SafeMath: subtraction overflow"); + return a - b; + } + + /** + * @dev Returns the multiplication of two unsigned integers, reverting on + * overflow. + * + * Counterpart to Solidity's `*` operator. + * + * Requirements: + * + * - Multiplication cannot overflow. + */ + function mul(uint256 a, uint256 b) internal pure returns (uint256) { + if (a == 0) return 0; + uint256 c = a * b; + require(c / a == b, "SafeMath: multiplication overflow"); + return c; + } + + /** + * @dev Returns the integer division of two unsigned integers, reverting on + * division by zero. The result is rounded towards zero. + * + * Counterpart to Solidity's `/` operator. Note: this function uses a + * `revert` opcode (which leaves remaining gas untouched) while Solidity + * uses an invalid opcode to revert (consuming all remaining gas). + * + * Requirements: + * + * - The divisor cannot be zero. + */ + function div(uint256 a, uint256 b) internal pure returns (uint256) { + require(b > 0, "SafeMath: division by zero"); + return a / b; + } + + /** + * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), + * reverting when dividing by zero. + * + * Counterpart to Solidity's `%` operator. This function uses a `revert` + * opcode (which leaves remaining gas untouched) while Solidity uses an + * invalid opcode to revert (consuming all remaining gas). + * + * Requirements: + * + * - The divisor cannot be zero. + */ + function mod(uint256 a, uint256 b) internal pure returns (uint256) { + require(b > 0, "SafeMath: modulo by zero"); + return a % b; + } + + /** + * @dev Returns the subtraction of two unsigned integers, reverting with custom message on + * overflow (when the result is negative). + * + * CAUTION: This function is deprecated because it requires allocating memory for the error + * message unnecessarily. For custom revert reasons use {trySub}. + * + * Counterpart to Solidity's `-` operator. + * + * Requirements: + * + * - Subtraction cannot overflow. + */ + function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { + require(b <= a, errorMessage); + return a - b; + } + + /** + * @dev Returns the integer division of two unsigned integers, reverting with custom message on + * division by zero. The result is rounded towards zero. + * + * CAUTION: This function is deprecated because it requires allocating memory for the error + * message unnecessarily. For custom revert reasons use {tryDiv}. + * + * Counterpart to Solidity's `/` operator. Note: this function uses a + * `revert` opcode (which leaves remaining gas untouched) while Solidity + * uses an invalid opcode to revert (consuming all remaining gas). + * + * Requirements: + * + * - The divisor cannot be zero. + */ + function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { + require(b > 0, errorMessage); + return a / b; + } + + /** + * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), + * reverting with custom message when dividing by zero. + * + * CAUTION: This function is deprecated because it requires allocating memory for the error + * message unnecessarily. For custom revert reasons use {tryMod}. + * + * Counterpart to Solidity's `%` operator. This function uses a `revert` + * opcode (which leaves remaining gas untouched) while Solidity uses an + * invalid opcode to revert (consuming all remaining gas). + * + * Requirements: + * + * - The divisor cannot be zero. + */ + function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { + require(b > 0, errorMessage); + return a % b; + } +} + + +// File @openzeppelin/contracts/utils/EnumerableSet.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + +/** + * @dev Library for managing + * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive + * types. + * + * Sets have the following properties: + * + * - Elements are added, removed, and checked for existence in constant time + * (O(1)). + * - Elements are enumerated in O(n). No guarantees are made on the ordering. + * + * ``` + * contract Example { + * // Add the library methods + * using EnumerableSet for EnumerableSet.AddressSet; + * + * // Declare a set state variable + * EnumerableSet.AddressSet private mySet; + * } + * ``` + * + * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) + * and `uint256` (`UintSet`) are supported. + */ +library EnumerableSet { + // To implement this library for multiple types with as little code + // repetition as possible, we write it in terms of a generic Set type with + // bytes32 values. + // The Set implementation uses private functions, and user-facing + // implementations (such as AddressSet) are just wrappers around the + // underlying Set. + // This means that we can only create new EnumerableSets for types that fit + // in bytes32. + + struct Set { + // Storage of set values + bytes32[] _values; + + // Position of the value in the `values` array, plus 1 because index 0 + // means a value is not in the set. + mapping (bytes32 => uint256) _indexes; + } + + /** + * @dev Add a value to a set. O(1). + * + * Returns true if the value was added to the set, that is if it was not + * already present. + */ + function _add(Set storage set, bytes32 value) private returns (bool) { + if (!_contains(set, value)) { + set._values.push(value); + // The value is stored at length-1, but we add 1 to all indexes + // and use 0 as a sentinel value + set._indexes[value] = set._values.length; + return true; + } else { + return false; + } + } + + /** + * @dev Removes a value from a set. O(1). + * + * Returns true if the value was removed from the set, that is if it was + * present. + */ + function _remove(Set storage set, bytes32 value) private returns (bool) { + // We read and store the value's index to prevent multiple reads from the same storage slot + uint256 valueIndex = set._indexes[value]; + + if (valueIndex != 0) { // Equivalent to contains(set, value) + // To delete an element from the _values array in O(1), we swap the element to delete with the last one in + // the array, and then remove the last element (sometimes called as 'swap and pop'). + // This modifies the order of the array, as noted in {at}. + + uint256 toDeleteIndex = valueIndex - 1; + uint256 lastIndex = set._values.length - 1; + + // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs + // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement. + + bytes32 lastvalue = set._values[lastIndex]; + + // Move the last value to the index where the value to delete is + set._values[toDeleteIndex] = lastvalue; + // Update the index for the moved value + set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based + + // Delete the slot where the moved value was stored + set._values.pop(); + + // Delete the index for the deleted slot + delete set._indexes[value]; + + return true; + } else { + return false; + } + } + + /** + * @dev Returns true if the value is in the set. O(1). + */ + function _contains(Set storage set, bytes32 value) private view returns (bool) { + return set._indexes[value] != 0; + } + + /** + * @dev Returns the number of values on the set. O(1). + */ + function _length(Set storage set) private view returns (uint256) { + return set._values.length; + } + + /** + * @dev Returns the value stored at position `index` in the set. O(1). + * + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function _at(Set storage set, uint256 index) private view returns (bytes32) { + require(set._values.length > index, "EnumerableSet: index out of bounds"); + return set._values[index]; + } + + // Bytes32Set + + struct Bytes32Set { + Set _inner; + } + + /** + * @dev Add a value to a set. O(1). + * + * Returns true if the value was added to the set, that is if it was not + * already present. + */ + function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { + return _add(set._inner, value); + } + + /** + * @dev Removes a value from a set. O(1). + * + * Returns true if the value was removed from the set, that is if it was + * present. + */ + function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { + return _remove(set._inner, value); + } + + /** + * @dev Returns true if the value is in the set. O(1). + */ + function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { + return _contains(set._inner, value); + } + + /** + * @dev Returns the number of values in the set. O(1). + */ + function length(Bytes32Set storage set) internal view returns (uint256) { + return _length(set._inner); + } + + /** + * @dev Returns the value stored at position `index` in the set. O(1). + * + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { + return _at(set._inner, index); + } + + // AddressSet + + struct AddressSet { + Set _inner; + } + + /** + * @dev Add a value to a set. O(1). + * + * Returns true if the value was added to the set, that is if it was not + * already present. + */ + function add(AddressSet storage set, address value) internal returns (bool) { + return _add(set._inner, bytes32(uint256(uint160(value)))); + } + + /** + * @dev Removes a value from a set. O(1). + * + * Returns true if the value was removed from the set, that is if it was + * present. + */ + function remove(AddressSet storage set, address value) internal returns (bool) { + return _remove(set._inner, bytes32(uint256(uint160(value)))); + } + + /** + * @dev Returns true if the value is in the set. O(1). + */ + function contains(AddressSet storage set, address value) internal view returns (bool) { + return _contains(set._inner, bytes32(uint256(uint160(value)))); + } + + /** + * @dev Returns the number of values in the set. O(1). + */ + function length(AddressSet storage set) internal view returns (uint256) { + return _length(set._inner); + } + + /** + * @dev Returns the value stored at position `index` in the set. O(1). + * + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(AddressSet storage set, uint256 index) internal view returns (address) { + return address(uint160(uint256(_at(set._inner, index)))); + } + + + // UintSet + + struct UintSet { + Set _inner; + } + + /** + * @dev Add a value to a set. O(1). + * + * Returns true if the value was added to the set, that is if it was not + * already present. + */ + function add(UintSet storage set, uint256 value) internal returns (bool) { + return _add(set._inner, bytes32(value)); + } + + /** + * @dev Removes a value from a set. O(1). + * + * Returns true if the value was removed from the set, that is if it was + * present. + */ + function remove(UintSet storage set, uint256 value) internal returns (bool) { + return _remove(set._inner, bytes32(value)); + } + + /** + * @dev Returns true if the value is in the set. O(1). + */ + function contains(UintSet storage set, uint256 value) internal view returns (bool) { + return _contains(set._inner, bytes32(value)); + } + + /** + * @dev Returns the number of values on the set. O(1). + */ + function length(UintSet storage set) internal view returns (uint256) { + return _length(set._inner); + } + + /** + * @dev Returns the value stored at position `index` in the set. O(1). + * + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(UintSet storage set, uint256 index) internal view returns (uint256) { + return uint256(_at(set._inner, index)); + } +} + + +// File @openzeppelin/contracts/utils/Address.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.2 <0.8.0; + +/** + * @dev Collection of functions related to the address type + */ +library Address { + /** + * @dev Returns true if `account` is a contract. + * + * [IMPORTANT] + * ==== + * It is unsafe to assume that an address for which this function returns + * false is an externally-owned account (EOA) and not a contract. + * + * Among others, `isContract` will return false for the following + * types of addresses: + * + * - an externally-owned account + * - a contract in construction + * - an address where a contract will be created + * - an address where a contract lived, but was destroyed + * ==== + */ + function isContract(address account) internal view returns (bool) { + // This method relies on extcodesize, which returns 0 for contracts in + // construction, since the code is only stored at the end of the + // constructor execution. + + uint256 size; + // solhint-disable-next-line no-inline-assembly + assembly { size := extcodesize(account) } + return size > 0; + } + + /** + * @dev Replacement for Solidity's `transfer`: sends `amount` wei to + * `recipient`, forwarding all available gas and reverting on errors. + * + * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost + * of certain opcodes, possibly making contracts go over the 2300 gas limit + * imposed by `transfer`, making them unable to receive funds via + * `transfer`. {sendValue} removes this limitation. + * + * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. + * + * IMPORTANT: because control is transferred to `recipient`, care must be + * taken to not create reentrancy vulnerabilities. Consider using + * {ReentrancyGuard} or the + * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. + */ + function sendValue(address payable recipient, uint256 amount) internal { + require(address(this).balance >= amount, "Address: insufficient balance"); + + // solhint-disable-next-line avoid-low-level-calls, avoid-call-value + (bool success, ) = recipient.call{ value: amount }(""); + require(success, "Address: unable to send value, recipient may have reverted"); + } + + /** + * @dev Performs a Solidity function call using a low level `call`. A + * plain`call` is an unsafe replacement for a function call: use this + * function instead. + * + * If `target` reverts with a revert reason, it is bubbled up by this + * function (like regular Solidity function calls). + * + * Returns the raw returned data. To convert to the expected return value, + * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. + * + * Requirements: + * + * - `target` must be a contract. + * - calling `target` with `data` must not revert. + * + * _Available since v3.1._ + */ + function functionCall(address target, bytes memory data) internal returns (bytes memory) { + return functionCall(target, data, "Address: low-level call failed"); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with + * `errorMessage` as a fallback revert reason when `target` reverts. + * + * _Available since v3.1._ + */ + function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { + return functionCallWithValue(target, data, 0, errorMessage); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], + * but also transferring `value` wei to `target`. + * + * Requirements: + * + * - the calling contract must have an ETH balance of at least `value`. + * - the called Solidity function must be `payable`. + * + * _Available since v3.1._ + */ + function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { + return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); + } + + /** + * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but + * with `errorMessage` as a fallback revert reason when `target` reverts. + * + * _Available since v3.1._ + */ + function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { + require(address(this).balance >= value, "Address: insufficient balance for call"); + require(isContract(target), "Address: call to non-contract"); + + // solhint-disable-next-line avoid-low-level-calls + (bool success, bytes memory returndata) = target.call{ value: value }(data); + return _verifyCallResult(success, returndata, errorMessage); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], + * but performing a static call. + * + * _Available since v3.3._ + */ + function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { + return functionStaticCall(target, data, "Address: low-level static call failed"); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], + * but performing a static call. + * + * _Available since v3.3._ + */ + function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { + require(isContract(target), "Address: static call to non-contract"); + + // solhint-disable-next-line avoid-low-level-calls + (bool success, bytes memory returndata) = target.staticcall(data); + return _verifyCallResult(success, returndata, errorMessage); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], + * but performing a delegate call. + * + * _Available since v3.4._ + */ + function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { + return functionDelegateCall(target, data, "Address: low-level delegate call failed"); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], + * but performing a delegate call. + * + * _Available since v3.4._ + */ + function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { + require(isContract(target), "Address: delegate call to non-contract"); + + // solhint-disable-next-line avoid-low-level-calls + (bool success, bytes memory returndata) = target.delegatecall(data); + return _verifyCallResult(success, returndata, errorMessage); + } + + function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { + if (success) { + return returndata; + } else { + // Look for revert reason and bubble it up if present + if (returndata.length > 0) { + // The easiest way to bubble the revert reason is using memory via assembly + + // solhint-disable-next-line no-inline-assembly + assembly { + let returndata_size := mload(returndata) + revert(add(32, returndata), returndata_size) + } + } else { + revert(errorMessage); + } + } + } +} + + +// File @openzeppelin/contracts/access/AccessControl.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + + + +/** + * @dev Contract module that allows children to implement role-based access + * control mechanisms. + * + * Roles are referred to by their `bytes32` identifier. These should be exposed + * in the external API and be unique. The best way to achieve this is by + * using `public constant` hash digests: + * + * ``` + * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); + * ``` + * + * Roles can be used to represent a set of permissions. To restrict access to a + * function call, use {hasRole}: + * + * ``` + * function foo() public { + * require(hasRole(MY_ROLE, msg.sender)); + * ... + * } + * ``` + * + * Roles can be granted and revoked dynamically via the {grantRole} and + * {revokeRole} functions. Each role has an associated admin role, and only + * accounts that have a role's admin role can call {grantRole} and {revokeRole}. + * + * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means + * that only accounts with this role will be able to grant or revoke other + * roles. More complex role relationships can be created by using + * {_setRoleAdmin}. + * + * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to + * grant and revoke this role. Extra precautions should be taken to secure + * accounts that have been granted it. + */ +abstract contract AccessControl is Context { + using EnumerableSet for EnumerableSet.AddressSet; + using Address for address; + + struct RoleData { + EnumerableSet.AddressSet members; + bytes32 adminRole; + } + + mapping (bytes32 => RoleData) private _roles; + + bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; + + /** + * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` + * + * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite + * {RoleAdminChanged} not being emitted signaling this. + * + * _Available since v3.1._ + */ + event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); + + /** + * @dev Emitted when `account` is granted `role`. + * + * `sender` is the account that originated the contract call, an admin role + * bearer except when using {_setupRole}. + */ + event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); + + /** + * @dev Emitted when `account` is revoked `role`. + * + * `sender` is the account that originated the contract call: + * - if using `revokeRole`, it is the admin role bearer + * - if using `renounceRole`, it is the role bearer (i.e. `account`) + */ + event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); + + /** + * @dev Returns `true` if `account` has been granted `role`. + */ + function hasRole(bytes32 role, address account) public view returns (bool) { + return _roles[role].members.contains(account); + } + + /** + * @dev Returns the number of accounts that have `role`. Can be used + * together with {getRoleMember} to enumerate all bearers of a role. + */ + function getRoleMemberCount(bytes32 role) public view returns (uint256) { + return _roles[role].members.length(); + } + + /** + * @dev 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. + */ + function getRoleMember(bytes32 role, uint256 index) public view returns (address) { + return _roles[role].members.at(index); + } + + /** + * @dev Returns the admin role that controls `role`. See {grantRole} and + * {revokeRole}. + * + * To change a role's admin, use {_setRoleAdmin}. + */ + function getRoleAdmin(bytes32 role) public view returns (bytes32) { + return _roles[role].adminRole; + } + + /** + * @dev Grants `role` to `account`. + * + * If `account` had not been already granted `role`, emits a {RoleGranted} + * event. + * + * Requirements: + * + * - the caller must have ``role``'s admin role. + */ + function grantRole(bytes32 role, address account) public virtual { + require(hasRole(_roles[role].adminRole, _msgSender()), "AccessControl: sender must be an admin to grant"); + + _grantRole(role, account); + } + + /** + * @dev Revokes `role` from `account`. + * + * If `account` had been granted `role`, emits a {RoleRevoked} event. + * + * Requirements: + * + * - the caller must have ``role``'s admin role. + */ + function revokeRole(bytes32 role, address account) public virtual { + require(hasRole(_roles[role].adminRole, _msgSender()), "AccessControl: sender must be an admin to revoke"); + + _revokeRole(role, account); + } + + /** + * @dev Revokes `role` from the calling account. + * + * Roles are often managed via {grantRole} and {revokeRole}: this function's + * purpose is to provide a mechanism for accounts to lose their privileges + * if they are compromised (such as when a trusted device is misplaced). + * + * If the calling account had been granted `role`, emits a {RoleRevoked} + * event. + * + * Requirements: + * + * - the caller must be `account`. + */ + function renounceRole(bytes32 role, address account) public virtual { + require(account == _msgSender(), "AccessControl: can only renounce roles for self"); + + _revokeRole(role, account); + } + + /** + * @dev Grants `role` to `account`. + * + * If `account` had not been already granted `role`, emits a {RoleGranted} + * event. Note that unlike {grantRole}, this function doesn't perform any + * checks on the calling account. + * + * [WARNING] + * ==== + * This function should only be called from the constructor when setting + * up the initial roles for the system. + * + * Using this function in any other way is effectively circumventing the admin + * system imposed by {AccessControl}. + * ==== + */ + function _setupRole(bytes32 role, address account) internal virtual { + _grantRole(role, account); + } + + /** + * @dev Sets `adminRole` as ``role``'s admin role. + * + * Emits a {RoleAdminChanged} event. + */ + function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { + emit RoleAdminChanged(role, _roles[role].adminRole, adminRole); + _roles[role].adminRole = adminRole; + } + + function _grantRole(bytes32 role, address account) private { + if (_roles[role].members.add(account)) { + emit RoleGranted(role, account, _msgSender()); + } + } + + function _revokeRole(bytes32 role, address account) private { + if (_roles[role].members.remove(account)) { + emit RoleRevoked(role, account, _msgSender()); + } + } +} + + +// File @openzeppelin/contracts/utils/Counters.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + +/** + * @title Counters + * @author Matt Condon (@shrugs) + * @dev Provides counters that can only be incremented or decremented by one. This can be used e.g. to track the number + * of elements in a mapping, issuing ERC721 ids, or counting request ids. + * + * Include with `using Counters for Counters.Counter;` + * Since it is not possible to overflow a 256 bit integer with increments of one, `increment` can skip the {SafeMath} + * overflow check, thereby saving gas. This does assume however correct usage, in that the underlying `_value` is never + * directly accessed. + */ +library Counters { + using SafeMath for uint256; + + struct Counter { + // This variable should never be directly accessed by users of the library: interactions must be restricted to + // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add + // this feature: see https://github.com/ethereum/solidity/issues/4637 + uint256 _value; // default: 0 + } + + function current(Counter storage counter) internal view returns (uint256) { + return counter._value; + } + + function increment(Counter storage counter) internal { + // The {SafeMath} overflow check can be skipped here, see the comment at the top + counter._value += 1; + } + + function decrement(Counter storage counter) internal { + counter._value = counter._value.sub(1); + } +} + + +// File @openzeppelin/contracts/introspection/IERC165.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + +/** + * @dev Interface of the ERC165 standard, as defined in the + * https://eips.ethereum.org/EIPS/eip-165[EIP]. + * + * Implementers can declare support of contract interfaces, which can then be + * queried by others ({ERC165Checker}). + * + * For an implementation, see {ERC165}. + */ +interface IERC165 { + /** + * @dev Returns true if this contract implements the interface defined by + * `interfaceId`. See the corresponding + * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] + * to learn more about how these ids are created. + * + * This function call must use less than 30 000 gas. + */ + function supportsInterface(bytes4 interfaceId) external view returns (bool); +} + + +// File @openzeppelin/contracts/token/ERC721/IERC721.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.2 <0.8.0; + +/** + * @dev Required interface of an ERC721 compliant contract. + */ +interface IERC721 is IERC165 { + /** + * @dev Emitted when `tokenId` token is transferred from `from` to `to`. + */ + event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); + + /** + * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. + */ + event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); + + /** + * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. + */ + event ApprovalForAll(address indexed owner, address indexed operator, bool approved); + + /** + * @dev Returns the number of tokens in ``owner``'s account. + */ + function balanceOf(address owner) external view returns (uint256 balance); + + /** + * @dev Returns the owner of the `tokenId` token. + * + * Requirements: + * + * - `tokenId` must exist. + */ + function ownerOf(uint256 tokenId) external view returns (address owner); + + /** + * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients + * are aware of the ERC721 protocol to prevent tokens from being forever locked. + * + * Requirements: + * + * - `from` cannot be the zero address. + * - `to` cannot be the zero address. + * - `tokenId` token must exist and be owned by `from`. + * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. + * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. + * + * Emits a {Transfer} event. + */ + function safeTransferFrom(address from, address to, uint256 tokenId) external; + + /** + * @dev Transfers `tokenId` token from `from` to `to`. + * + * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. + * + * Requirements: + * + * - `from` cannot be the zero address. + * - `to` cannot be the zero address. + * - `tokenId` token must be owned by `from`. + * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. + * + * Emits a {Transfer} event. + */ + function transferFrom(address from, address to, uint256 tokenId) external; + + /** + * @dev Gives permission to `to` to transfer `tokenId` token to another account. + * The approval is cleared when the token is transferred. + * + * Only a single account can be approved at a time, so approving the zero address clears previous approvals. + * + * Requirements: + * + * - The caller must own the token or be an approved operator. + * - `tokenId` must exist. + * + * Emits an {Approval} event. + */ + function approve(address to, uint256 tokenId) external; + + /** + * @dev Returns the account approved for `tokenId` token. + * + * Requirements: + * + * - `tokenId` must exist. + */ + function getApproved(uint256 tokenId) external view returns (address operator); + + /** + * @dev Approve or remove `operator` as an operator for the caller. + * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. + * + * Requirements: + * + * - The `operator` cannot be the caller. + * + * Emits an {ApprovalForAll} event. + */ + function setApprovalForAll(address operator, bool _approved) external; + + /** + * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. + * + * See {setApprovalForAll} + */ + function isApprovedForAll(address owner, address operator) external view returns (bool); + + /** + * @dev Safely transfers `tokenId` token from `from` to `to`. + * + * Requirements: + * + * - `from` cannot be the zero address. + * - `to` cannot be the zero address. + * - `tokenId` token must exist and be owned by `from`. + * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. + * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. + * + * Emits a {Transfer} event. + */ + function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external; +} + + +// File @openzeppelin/contracts/token/ERC721/IERC721Metadata.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.2 <0.8.0; + +/** + * @title ERC-721 Non-Fungible Token Standard, optional metadata extension + * @dev See https://eips.ethereum.org/EIPS/eip-721 + */ +interface IERC721Metadata is IERC721 { + + /** + * @dev Returns the token collection name. + */ + function name() external view returns (string memory); + + /** + * @dev Returns the token collection symbol. + */ + function symbol() external view returns (string memory); + + /** + * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. + */ + function tokenURI(uint256 tokenId) external view returns (string memory); +} + + +// File @openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.2 <0.8.0; + +/** + * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension + * @dev See https://eips.ethereum.org/EIPS/eip-721 + */ +interface IERC721Enumerable is IERC721 { + + /** + * @dev Returns the total amount of tokens stored by the contract. + */ + function totalSupply() external view returns (uint256); + + /** + * @dev Returns a token ID owned by `owner` at a given `index` of its token list. + * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. + */ + function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); + + /** + * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. + * Use along with {totalSupply} to enumerate all tokens. + */ + function tokenByIndex(uint256 index) external view returns (uint256); +} + + +// File @openzeppelin/contracts/token/ERC721/IERC721Receiver.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + +/** + * @title ERC721 token receiver interface + * @dev Interface for any contract that wants to support safeTransfers + * from ERC721 asset contracts. + */ +interface IERC721Receiver { + /** + * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} + * by `operator` from `from`, this function is called. + * + * It must return its Solidity selector to confirm the token transfer. + * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. + * + * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. + */ + function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) external returns (bytes4); +} + + +// File @openzeppelin/contracts/introspection/ERC165.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + +/** + * @dev Implementation of the {IERC165} interface. + * + * Contracts may inherit from this and call {_registerInterface} to declare + * their support of an interface. + */ +abstract contract ERC165 is IERC165 { + /* + * bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7 + */ + bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7; + + /** + * @dev Mapping of interface ids to whether or not it's supported. + */ + mapping(bytes4 => bool) private _supportedInterfaces; + + constructor () internal { + // Derived contracts need only register support for their own interfaces, + // we register support for ERC165 itself here + _registerInterface(_INTERFACE_ID_ERC165); + } + + /** + * @dev See {IERC165-supportsInterface}. + * + * Time complexity O(1), guaranteed to always use less than 30 000 gas. + */ + function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { + return _supportedInterfaces[interfaceId]; + } + + /** + * @dev Registers the contract as an implementer of the interface defined by + * `interfaceId`. Support of the actual ERC165 interface is automatic and + * registering its interface id is not required. + * + * See {IERC165-supportsInterface}. + * + * Requirements: + * + * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`). + */ + function _registerInterface(bytes4 interfaceId) internal virtual { + require(interfaceId != 0xffffffff, "ERC165: invalid interface id"); + _supportedInterfaces[interfaceId] = true; + } +} + + +// File @openzeppelin/contracts/utils/EnumerableMap.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + +/** + * @dev Library for managing an enumerable variant of Solidity's + * https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`] + * type. + * + * Maps have the following properties: + * + * - Entries are added, removed, and checked for existence in constant time + * (O(1)). + * - Entries are enumerated in O(n). No guarantees are made on the ordering. + * + * ``` + * contract Example { + * // Add the library methods + * using EnumerableMap for EnumerableMap.UintToAddressMap; + * + * // Declare a set state variable + * EnumerableMap.UintToAddressMap private myMap; + * } + * ``` + * + * As of v3.0.0, only maps of type `uint256 -> address` (`UintToAddressMap`) are + * supported. + */ +library EnumerableMap { + // To implement this library for multiple types with as little code + // repetition as possible, we write it in terms of a generic Map type with + // bytes32 keys and values. + // The Map implementation uses private functions, and user-facing + // implementations (such as Uint256ToAddressMap) are just wrappers around + // the underlying Map. + // This means that we can only create new EnumerableMaps for types that fit + // in bytes32. + + struct MapEntry { + bytes32 _key; + bytes32 _value; + } + + struct Map { + // Storage of map keys and values + MapEntry[] _entries; + + // Position of the entry defined by a key in the `entries` array, plus 1 + // because index 0 means a key is not in the map. + mapping (bytes32 => uint256) _indexes; + } + + /** + * @dev Adds a key-value pair to a map, or updates the value for an existing + * key. O(1). + * + * Returns true if the key was added to the map, that is if it was not + * already present. + */ + function _set(Map storage map, bytes32 key, bytes32 value) private returns (bool) { + // We read and store the key's index to prevent multiple reads from the same storage slot + uint256 keyIndex = map._indexes[key]; + + if (keyIndex == 0) { // Equivalent to !contains(map, key) + map._entries.push(MapEntry({ _key: key, _value: value })); + // The entry is stored at length-1, but we add 1 to all indexes + // and use 0 as a sentinel value + map._indexes[key] = map._entries.length; + return true; + } else { + map._entries[keyIndex - 1]._value = value; + return false; + } + } + + /** + * @dev Removes a key-value pair from a map. O(1). + * + * Returns true if the key was removed from the map, that is if it was present. + */ + function _remove(Map storage map, bytes32 key) private returns (bool) { + // We read and store the key's index to prevent multiple reads from the same storage slot + uint256 keyIndex = map._indexes[key]; + + if (keyIndex != 0) { // Equivalent to contains(map, key) + // To delete a key-value pair from the _entries array in O(1), we swap the entry to delete with the last one + // in the array, and then remove the last entry (sometimes called as 'swap and pop'). + // This modifies the order of the array, as noted in {at}. + + uint256 toDeleteIndex = keyIndex - 1; + uint256 lastIndex = map._entries.length - 1; + + // When the entry to delete is the last one, the swap operation is unnecessary. However, since this occurs + // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement. + + MapEntry storage lastEntry = map._entries[lastIndex]; + + // Move the last entry to the index where the entry to delete is + map._entries[toDeleteIndex] = lastEntry; + // Update the index for the moved entry + map._indexes[lastEntry._key] = toDeleteIndex + 1; // All indexes are 1-based + + // Delete the slot where the moved entry was stored + map._entries.pop(); + + // Delete the index for the deleted slot + delete map._indexes[key]; + + return true; + } else { + return false; + } + } + + /** + * @dev Returns true if the key is in the map. O(1). + */ + function _contains(Map storage map, bytes32 key) private view returns (bool) { + return map._indexes[key] != 0; + } + + /** + * @dev Returns the number of key-value pairs in the map. O(1). + */ + function _length(Map storage map) private view returns (uint256) { + return map._entries.length; + } + + /** + * @dev Returns the key-value pair stored at position `index` in the map. O(1). + * + * Note that there are no guarantees on the ordering of entries inside the + * array, and it may change when more entries are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function _at(Map storage map, uint256 index) private view returns (bytes32, bytes32) { + require(map._entries.length > index, "EnumerableMap: index out of bounds"); + + MapEntry storage entry = map._entries[index]; + return (entry._key, entry._value); + } + + /** + * @dev Tries to returns the value associated with `key`. O(1). + * Does not revert if `key` is not in the map. + */ + function _tryGet(Map storage map, bytes32 key) private view returns (bool, bytes32) { + uint256 keyIndex = map._indexes[key]; + if (keyIndex == 0) return (false, 0); // Equivalent to contains(map, key) + return (true, map._entries[keyIndex - 1]._value); // All indexes are 1-based + } + + /** + * @dev Returns the value associated with `key`. O(1). + * + * Requirements: + * + * - `key` must be in the map. + */ + function _get(Map storage map, bytes32 key) private view returns (bytes32) { + uint256 keyIndex = map._indexes[key]; + require(keyIndex != 0, "EnumerableMap: nonexistent key"); // Equivalent to contains(map, key) + return map._entries[keyIndex - 1]._value; // All indexes are 1-based + } + + /** + * @dev Same as {_get}, with a custom error message when `key` is not in the map. + * + * CAUTION: This function is deprecated because it requires allocating memory for the error + * message unnecessarily. For custom revert reasons use {_tryGet}. + */ + function _get(Map storage map, bytes32 key, string memory errorMessage) private view returns (bytes32) { + uint256 keyIndex = map._indexes[key]; + require(keyIndex != 0, errorMessage); // Equivalent to contains(map, key) + return map._entries[keyIndex - 1]._value; // All indexes are 1-based + } + + // UintToAddressMap + + struct UintToAddressMap { + Map _inner; + } + + /** + * @dev Adds a key-value pair to a map, or updates the value for an existing + * key. O(1). + * + * Returns true if the key was added to the map, that is if it was not + * already present. + */ + function set(UintToAddressMap storage map, uint256 key, address value) internal returns (bool) { + return _set(map._inner, bytes32(key), bytes32(uint256(uint160(value)))); + } + + /** + * @dev Removes a value from a set. O(1). + * + * Returns true if the key was removed from the map, that is if it was present. + */ + function remove(UintToAddressMap storage map, uint256 key) internal returns (bool) { + return _remove(map._inner, bytes32(key)); + } + + /** + * @dev Returns true if the key is in the map. O(1). + */ + function contains(UintToAddressMap storage map, uint256 key) internal view returns (bool) { + return _contains(map._inner, bytes32(key)); + } + + /** + * @dev Returns the number of elements in the map. O(1). + */ + function length(UintToAddressMap storage map) internal view returns (uint256) { + return _length(map._inner); + } + + /** + * @dev Returns the element stored at position `index` in the set. O(1). + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(UintToAddressMap storage map, uint256 index) internal view returns (uint256, address) { + (bytes32 key, bytes32 value) = _at(map._inner, index); + return (uint256(key), address(uint160(uint256(value)))); + } + + /** + * @dev Tries to returns the value associated with `key`. O(1). + * Does not revert if `key` is not in the map. + * + * _Available since v3.4._ + */ + function tryGet(UintToAddressMap storage map, uint256 key) internal view returns (bool, address) { + (bool success, bytes32 value) = _tryGet(map._inner, bytes32(key)); + return (success, address(uint160(uint256(value)))); + } + + /** + * @dev Returns the value associated with `key`. O(1). + * + * Requirements: + * + * - `key` must be in the map. + */ + function get(UintToAddressMap storage map, uint256 key) internal view returns (address) { + return address(uint160(uint256(_get(map._inner, bytes32(key))))); + } + + /** + * @dev Same as {get}, with a custom error message when `key` is not in the map. + * + * CAUTION: This function is deprecated because it requires allocating memory for the error + * message unnecessarily. For custom revert reasons use {tryGet}. + */ + function get(UintToAddressMap storage map, uint256 key, string memory errorMessage) internal view returns (address) { + return address(uint160(uint256(_get(map._inner, bytes32(key), errorMessage)))); + } +} + + +// File @openzeppelin/contracts/utils/Strings.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + +/** + * @dev String operations. + */ +library Strings { + /** + * @dev Converts a `uint256` to its ASCII `string` representation. + */ + function toString(uint256 value) internal pure returns (string memory) { + // Inspired by OraclizeAPI's implementation - MIT licence + // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol + + if (value == 0) { + return "0"; + } + uint256 temp = value; + uint256 digits; + while (temp != 0) { + digits++; + temp /= 10; + } + bytes memory buffer = new bytes(digits); + uint256 index = digits - 1; + temp = value; + while (temp != 0) { + buffer[index--] = bytes1(uint8(48 + temp % 10)); + temp /= 10; + } + return string(buffer); + } +} + + +// File @openzeppelin/contracts/token/ERC721/ERC721.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + + + + + + + + + + + +/** + * @title ERC721 Non-Fungible Token Standard basic implementation + * @dev see https://eips.ethereum.org/EIPS/eip-721 + */ +contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { + using SafeMath for uint256; + using Address for address; + using EnumerableSet for EnumerableSet.UintSet; + using EnumerableMap for EnumerableMap.UintToAddressMap; + using Strings for uint256; + + // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` + // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector` + bytes4 private constant _ERC721_RECEIVED = 0x150b7a02; + + // Mapping from holder address to their (enumerable) set of owned tokens + mapping (address => EnumerableSet.UintSet) private _holderTokens; + + // Enumerable mapping from token ids to their owners + EnumerableMap.UintToAddressMap private _tokenOwners; + + // Mapping from token ID to approved address + mapping (uint256 => address) private _tokenApprovals; + + // Mapping from owner to operator approvals + mapping (address => mapping (address => bool)) private _operatorApprovals; + + // Token name + string private _name; + + // Token symbol + string private _symbol; + + // Optional mapping for token URIs + mapping (uint256 => string) private _tokenURIs; + + // Base URI + string private _baseURI; + + /* + * bytes4(keccak256('balanceOf(address)')) == 0x70a08231 + * bytes4(keccak256('ownerOf(uint256)')) == 0x6352211e + * bytes4(keccak256('approve(address,uint256)')) == 0x095ea7b3 + * bytes4(keccak256('getApproved(uint256)')) == 0x081812fc + * bytes4(keccak256('setApprovalForAll(address,bool)')) == 0xa22cb465 + * bytes4(keccak256('isApprovedForAll(address,address)')) == 0xe985e9c5 + * bytes4(keccak256('transferFrom(address,address,uint256)')) == 0x23b872dd + * bytes4(keccak256('safeTransferFrom(address,address,uint256)')) == 0x42842e0e + * bytes4(keccak256('safeTransferFrom(address,address,uint256,bytes)')) == 0xb88d4fde + * + * => 0x70a08231 ^ 0x6352211e ^ 0x095ea7b3 ^ 0x081812fc ^ + * 0xa22cb465 ^ 0xe985e9c5 ^ 0x23b872dd ^ 0x42842e0e ^ 0xb88d4fde == 0x80ac58cd + */ + bytes4 private constant _INTERFACE_ID_ERC721 = 0x80ac58cd; + + /* + * bytes4(keccak256('name()')) == 0x06fdde03 + * bytes4(keccak256('symbol()')) == 0x95d89b41 + * bytes4(keccak256('tokenURI(uint256)')) == 0xc87b56dd + * + * => 0x06fdde03 ^ 0x95d89b41 ^ 0xc87b56dd == 0x5b5e139f + */ + bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x5b5e139f; + + /* + * bytes4(keccak256('totalSupply()')) == 0x18160ddd + * bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) == 0x2f745c59 + * bytes4(keccak256('tokenByIndex(uint256)')) == 0x4f6ccce7 + * + * => 0x18160ddd ^ 0x2f745c59 ^ 0x4f6ccce7 == 0x780e9d63 + */ + bytes4 private constant _INTERFACE_ID_ERC721_ENUMERABLE = 0x780e9d63; + + /** + * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. + */ + constructor (string memory name_, string memory symbol_) public { + _name = name_; + _symbol = symbol_; + + // register the supported interfaces to conform to ERC721 via ERC165 + _registerInterface(_INTERFACE_ID_ERC721); + _registerInterface(_INTERFACE_ID_ERC721_METADATA); + _registerInterface(_INTERFACE_ID_ERC721_ENUMERABLE); + } + + /** + * @dev See {IERC721-balanceOf}. + */ + function balanceOf(address owner) public view virtual override returns (uint256) { + require(owner != address(0), "ERC721: balance query for the zero address"); + return _holderTokens[owner].length(); + } + + /** + * @dev See {IERC721-ownerOf}. + */ + function ownerOf(uint256 tokenId) public view virtual override returns (address) { + return _tokenOwners.get(tokenId, "ERC721: owner query for nonexistent token"); + } + + /** + * @dev See {IERC721Metadata-name}. + */ + function name() public view virtual override returns (string memory) { + return _name; + } + + /** + * @dev See {IERC721Metadata-symbol}. + */ + function symbol() public view virtual override returns (string memory) { + return _symbol; + } + + /** + * @dev See {IERC721Metadata-tokenURI}. + */ + function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { + require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); + + string memory _tokenURI = _tokenURIs[tokenId]; + string memory base = baseURI(); + + // If there is no base URI, return the token URI. + if (bytes(base).length == 0) { + return _tokenURI; + } + // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked). + if (bytes(_tokenURI).length > 0) { + return string(abi.encodePacked(base, _tokenURI)); + } + // If there is a baseURI but no tokenURI, concatenate the tokenID to the baseURI. + return string(abi.encodePacked(base, tokenId.toString())); + } + + /** + * @dev Returns the base URI set via {_setBaseURI}. This will be + * automatically added as a prefix in {tokenURI} to each token's URI, or + * to the token ID if no specific URI is set for that token ID. + */ + function baseURI() public view virtual returns (string memory) { + return _baseURI; + } + + /** + * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. + */ + function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { + return _holderTokens[owner].at(index); + } + + /** + * @dev See {IERC721Enumerable-totalSupply}. + */ + function totalSupply() public view virtual override returns (uint256) { + // _tokenOwners are indexed by tokenIds, so .length() returns the number of tokenIds + return _tokenOwners.length(); + } + + /** + * @dev See {IERC721Enumerable-tokenByIndex}. + */ + function tokenByIndex(uint256 index) public view virtual override returns (uint256) { + (uint256 tokenId, ) = _tokenOwners.at(index); + return tokenId; + } + + /** + * @dev See {IERC721-approve}. + */ + function approve(address to, uint256 tokenId) public virtual override { + address owner = ERC721.ownerOf(tokenId); + require(to != owner, "ERC721: approval to current owner"); + + require(_msgSender() == owner || ERC721.isApprovedForAll(owner, _msgSender()), + "ERC721: approve caller is not owner nor approved for all" + ); + + _approve(to, tokenId); + } + + /** + * @dev See {IERC721-getApproved}. + */ + function getApproved(uint256 tokenId) public view virtual override returns (address) { + require(_exists(tokenId), "ERC721: approved query for nonexistent token"); + + return _tokenApprovals[tokenId]; + } + + /** + * @dev See {IERC721-setApprovalForAll}. + */ + function setApprovalForAll(address operator, bool approved) public virtual override { + require(operator != _msgSender(), "ERC721: approve to caller"); + + _operatorApprovals[_msgSender()][operator] = approved; + emit ApprovalForAll(_msgSender(), operator, approved); + } + + /** + * @dev See {IERC721-isApprovedForAll}. + */ + function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { + return _operatorApprovals[owner][operator]; + } + + /** + * @dev See {IERC721-transferFrom}. + */ + function transferFrom(address from, address to, uint256 tokenId) public virtual override { + //solhint-disable-next-line max-line-length + require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); + + _transfer(from, to, tokenId); + } + + /** + * @dev See {IERC721-safeTransferFrom}. + */ + function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override { + safeTransferFrom(from, to, tokenId, ""); + } + + /** + * @dev See {IERC721-safeTransferFrom}. + */ + function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public virtual override { + require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); + _safeTransfer(from, to, tokenId, _data); + } + + /** + * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients + * are aware of the ERC721 protocol to prevent tokens from being forever locked. + * + * `_data` is additional data, it has no specified format and it is sent in call to `to`. + * + * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. + * implement alternative mechanisms to perform token transfer, such as signature-based. + * + * Requirements: + * + * - `from` cannot be the zero address. + * - `to` cannot be the zero address. + * - `tokenId` token must exist and be owned by `from`. + * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. + * + * Emits a {Transfer} event. + */ + function _safeTransfer(address from, address to, uint256 tokenId, bytes memory _data) internal virtual { + _transfer(from, to, tokenId); + require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); + } + + /** + * @dev Returns whether `tokenId` exists. + * + * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. + * + * Tokens start existing when they are minted (`_mint`), + * and stop existing when they are burned (`_burn`). + */ + function _exists(uint256 tokenId) internal view virtual returns (bool) { + return _tokenOwners.contains(tokenId); + } + + /** + * @dev Returns whether `spender` is allowed to manage `tokenId`. + * + * Requirements: + * + * - `tokenId` must exist. + */ + function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { + require(_exists(tokenId), "ERC721: operator query for nonexistent token"); + address owner = ERC721.ownerOf(tokenId); + return (spender == owner || getApproved(tokenId) == spender || ERC721.isApprovedForAll(owner, spender)); + } + + /** + * @dev Safely mints `tokenId` and transfers it to `to`. + * + * Requirements: + d* + * - `tokenId` must not exist. + * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. + * + * Emits a {Transfer} event. + */ + function _safeMint(address to, uint256 tokenId) internal virtual { + _safeMint(to, tokenId, ""); + } + + /** + * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is + * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. + */ + function _safeMint(address to, uint256 tokenId, bytes memory _data) internal virtual { + _mint(to, tokenId); + require(_checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); + } + + /** + * @dev Mints `tokenId` and transfers it to `to`. + * + * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible + * + * Requirements: + * + * - `tokenId` must not exist. + * - `to` cannot be the zero address. + * + * Emits a {Transfer} event. + */ + function _mint(address to, uint256 tokenId) internal virtual { + require(to != address(0), "ERC721: mint to the zero address"); + require(!_exists(tokenId), "ERC721: token already minted"); + + _beforeTokenTransfer(address(0), to, tokenId); + + _holderTokens[to].add(tokenId); + + _tokenOwners.set(tokenId, to); + + emit Transfer(address(0), to, tokenId); + } + + /** + * @dev Destroys `tokenId`. + * The approval is cleared when the token is burned. + * + * Requirements: + * + * - `tokenId` must exist. + * + * Emits a {Transfer} event. + */ + function _burn(uint256 tokenId) internal virtual { + address owner = ERC721.ownerOf(tokenId); // internal owner + + _beforeTokenTransfer(owner, address(0), tokenId); + + // Clear approvals + _approve(address(0), tokenId); + + // Clear metadata (if any) + if (bytes(_tokenURIs[tokenId]).length != 0) { + delete _tokenURIs[tokenId]; + } + + _holderTokens[owner].remove(tokenId); + + _tokenOwners.remove(tokenId); + + emit Transfer(owner, address(0), tokenId); + } + + /** + * @dev Transfers `tokenId` from `from` to `to`. + * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. + * + * Requirements: + * + * - `to` cannot be the zero address. + * - `tokenId` token must be owned by `from`. + * + * Emits a {Transfer} event. + */ + function _transfer(address from, address to, uint256 tokenId) internal virtual { + require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); // internal owner + require(to != address(0), "ERC721: transfer to the zero address"); + + _beforeTokenTransfer(from, to, tokenId); + + // Clear approvals from the previous owner + _approve(address(0), tokenId); + + _holderTokens[from].remove(tokenId); + _holderTokens[to].add(tokenId); + + _tokenOwners.set(tokenId, to); + + emit Transfer(from, to, tokenId); + } + + /** + * @dev Sets `_tokenURI` as the tokenURI of `tokenId`. + * + * Requirements: + * + * - `tokenId` must exist. + */ + function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual { + require(_exists(tokenId), "ERC721Metadata: URI set of nonexistent token"); + _tokenURIs[tokenId] = _tokenURI; + } + + /** + * @dev Internal function to set the base URI for all token IDs. It is + * automatically added as a prefix to the value returned in {tokenURI}, + * or to the token ID if {tokenURI} is empty. + */ + function _setBaseURI(string memory baseURI_) internal virtual { + _baseURI = baseURI_; + } + + /** + * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. + * The call is not executed if the target address is not a contract. + * + * @param from address representing the previous owner of the given token ID + * @param to target address that will receive the tokens + * @param tokenId uint256 ID of the token to be transferred + * @param _data bytes optional data to send along with the call + * @return bool whether the call correctly returned the expected magic value + */ + function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory _data) + private returns (bool) + { + if (!to.isContract()) { + return true; + } + bytes memory returndata = to.functionCall(abi.encodeWithSelector( + IERC721Receiver(to).onERC721Received.selector, + _msgSender(), + from, + tokenId, + _data + ), "ERC721: transfer to non ERC721Receiver implementer"); + bytes4 retval = abi.decode(returndata, (bytes4)); + return (retval == _ERC721_RECEIVED); + } + + /** + * @dev Approve `to` to operate on `tokenId` + * + * Emits an {Approval} event. + */ + function _approve(address to, uint256 tokenId) internal virtual { + _tokenApprovals[tokenId] = to; + emit Approval(ERC721.ownerOf(tokenId), to, tokenId); // internal owner + } + + /** + * @dev Hook that is called before any token transfer. This includes minting + * and burning. + * + * Calling conditions: + * + * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be + * transferred to `to`. + * - When `from` is zero, `tokenId` will be minted for `to`. + * - When `to` is zero, ``from``'s `tokenId` will be burned. + * - `from` cannot be the zero address. + * - `to` cannot be the zero address. + * + * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. + */ + function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual { } +} + + +// File @openzeppelin/contracts/token/ERC721/ERC721Burnable.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + + +/** + * @title ERC721 Burnable Token + * @dev ERC721 Token that can be irreversibly burned (destroyed). + */ +abstract contract ERC721Burnable is Context, ERC721 { + /** + * @dev Burns `tokenId`. See {ERC721-_burn}. + * + * Requirements: + * + * - The caller must own `tokenId` or be an approved operator. + */ + function burn(uint256 tokenId) public virtual { + //solhint-disable-next-line max-line-length + require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721Burnable: caller is not owner nor approved"); + _burn(tokenId); + } +} + + +// File @openzeppelin/contracts/utils/Pausable.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + +/** + * @dev Contract module which allows children to implement an emergency stop + * mechanism that can be triggered by an authorized account. + * + * This module is used through inheritance. It will make available the + * modifiers `whenNotPaused` and `whenPaused`, which can be applied to + * the functions of your contract. Note that they will not be pausable by + * simply including this module, only once the modifiers are put in place. + */ +abstract contract Pausable is Context { + /** + * @dev Emitted when the pause is triggered by `account`. + */ + event Paused(address account); + + /** + * @dev Emitted when the pause is lifted by `account`. + */ + event Unpaused(address account); + + bool private _paused; + + /** + * @dev Initializes the contract in unpaused state. + */ + constructor () internal { + _paused = false; + } + + /** + * @dev Returns true if the contract is paused, and false otherwise. + */ + function paused() public view virtual returns (bool) { + return _paused; + } + + /** + * @dev Modifier to make a function callable only when the contract is not paused. + * + * Requirements: + * + * - The contract must not be paused. + */ + modifier whenNotPaused() { + require(!paused(), "Pausable: paused"); + _; + } + + /** + * @dev Modifier to make a function callable only when the contract is paused. + * + * Requirements: + * + * - The contract must be paused. + */ + modifier whenPaused() { + require(paused(), "Pausable: not paused"); + _; + } + + /** + * @dev Triggers stopped state. + * + * Requirements: + * + * - The contract must not be paused. + */ + function _pause() internal virtual whenNotPaused { + _paused = true; + emit Paused(_msgSender()); + } + + /** + * @dev Returns to normal state. + * + * Requirements: + * + * - The contract must be paused. + */ + function _unpause() internal virtual whenPaused { + _paused = false; + emit Unpaused(_msgSender()); + } +} + + +// File @openzeppelin/contracts/token/ERC721/ERC721Pausable.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + + +/** + * @dev ERC721 token with pausable token transfers, minting and burning. + * + * Useful for scenarios such as preventing trades until the end of an evaluation + * period, or having an emergency switch for freezing all token transfers in the + * event of a large bug. + */ +abstract contract ERC721Pausable is ERC721, Pausable { + /** + * @dev See {ERC721-_beforeTokenTransfer}. + * + * Requirements: + * + * - the contract must not be paused. + */ + function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override { + super._beforeTokenTransfer(from, to, tokenId); + + require(!paused(), "ERC721Pausable: token transfer while paused"); + } +} + + +// File @openzeppelin/contracts/presets/ERC721PresetMinterPauserAutoId.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + + + + + + +/** + * @dev {ERC721} token, including: + * + * - ability for holders to burn (destroy) their tokens + * - a minter role that allows for token minting (creation) + * - a pauser role that allows to stop all token transfers + * - token ID and URI autogeneration + * + * This contract uses {AccessControl} to lock permissioned functions using the + * different roles - head to its documentation for details. + * + * The account that deploys the contract will be granted the minter and pauser + * roles, as well as the default admin role, which will let it grant both minter + * and pauser roles to other accounts. + */ +contract ERC721PresetMinterPauserAutoId is Context, AccessControl, ERC721Burnable, ERC721Pausable { + using Counters for Counters.Counter; + + bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); + bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); + + Counters.Counter private _tokenIdTracker; + + /** + * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE` and `PAUSER_ROLE` to the + * account that deploys the contract. + * + * Token URIs will be autogenerated based on `baseURI` and their token IDs. + * See {ERC721-tokenURI}. + */ + constructor(string memory name, string memory symbol, string memory baseURI) public ERC721(name, symbol) { + _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); + + _setupRole(MINTER_ROLE, _msgSender()); + _setupRole(PAUSER_ROLE, _msgSender()); + + _setBaseURI(baseURI); + } + + /** + * @dev Creates a new token for `to`. Its token ID will be automatically + * assigned (and available on the emitted {IERC721-Transfer} event), and the token + * URI autogenerated based on the base URI passed at construction. + * + * See {ERC721-_mint}. + * + * Requirements: + * + * - the caller must have the `MINTER_ROLE`. + */ + function mint(address to) public virtual { + require(hasRole(MINTER_ROLE, _msgSender()), "ERC721PresetMinterPauserAutoId: must have minter role to mint"); + + // We cannot just use balanceOf to create the new tokenId because tokens + // can be burned (destroyed), so we need a separate counter. + _mint(to, _tokenIdTracker.current()); + _tokenIdTracker.increment(); + } + + /** + * @dev Pauses all token transfers. + * + * See {ERC721Pausable} and {Pausable-_pause}. + * + * Requirements: + * + * - the caller must have the `PAUSER_ROLE`. + */ + function pause() public virtual { + require(hasRole(PAUSER_ROLE, _msgSender()), "ERC721PresetMinterPauserAutoId: must have pauser role to pause"); + _pause(); + } + + /** + * @dev Unpauses all token transfers. + * + * See {ERC721Pausable} and {Pausable-_unpause}. + * + * Requirements: + * + * - the caller must have the `PAUSER_ROLE`. + */ + function unpause() public virtual { + require(hasRole(PAUSER_ROLE, _msgSender()), "ERC721PresetMinterPauserAutoId: must have pauser role to unpause"); + _unpause(); + } + + function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override(ERC721, ERC721Pausable) { + super._beforeTokenTransfer(from, to, tokenId); + } +} + + +// File contracts/Libraries/CurrentTime.sol + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.6 <0.9.0; + +contract CurrentTime { + function currentTime() internal view virtual returns (uint256) { + return block.timestamp; + } +} + + +// File contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol + +// SPDX-License-Identifier: MIT + +// NB: this is only meant to deploy to goerli, where chainlink VRF is unavailable. +// goerli connects to polygon mumbai, which is what we need to test PoS bridging. +// Deploy scripts prevent other contracts from goerli deploy, and this contract from +// anything other than goerlui +pragma solidity >=0.6.6 <0.9.0; + + + + + +contract CryptOrchidGoerli is ERC721PresetMinterPauserAutoId, Ownable, CurrentTime { + using SafeMath for uint256; + using Strings for string; + using Counters for Counters.Counter; + + struct CryptOrchid { + string species; + uint256 plantedAt; + uint256 waterLevel; + } + mapping(uint256 => CryptOrchid) public cryptorchids; + + enum Stage {Unsold, Seed, Flower, Dead} + + bool internal saleStarted = false; + bool internal growingStarted = false; + + uint256 public constant MAX_CRYPTORCHIDS = 10000; + uint256 public constant GROWTH_CYCLE = 604800; // 7 days + uint256 public constant WATERING_WINDOW = 10800; // 3 hours + uint256 internal constant MAX_TIMESTAMP = 2**256 - 1; + string internal constant GRANUM_IPFS = "QmWd1mn7DuGyx9ByfNeqCsgdSUsJZ1cragitgaygsqDvEm"; + + uint16[10] private limits = [0, 3074, 6074, 8074, 9074, 9574, 9824, 9924, 9974, 9999]; + string[10] private genum = [ + "shenzhenica orchidaceae", + "phalaenopsis micholitzii", + "guarianthe aurantiaca", + "vanda coerulea", + "cypripedium calceolus", + "paphiopedilum vietnamense", + "miltonia kayasimae", + "platanthera azorica", + "dendrophylax lindenii", + "paphiopedilum rothschildianum" + ]; + + string[10] private speciesIPFSConstant = [ + "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/shenzhenica-orchidaceae.json", + "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/phalaenopsis-micholitzii.json", + "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/guarianthe-aurantiaca.json", + "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/vanda-coerulea.json", + "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/cypripedium-calceolus.json", + "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/paphiopedilum-vietnamense.json", + "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/miltonia-kayasimae.json", + "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/platanthera-azorica.json", + "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/dendrophylax-lindenii.json", + "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/paphiopedilum-rothschildianum.json" + ]; + + string[10] private deadSpeciesIPFSConstant = [ + "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/shenzhenica-orchidaceae.json", + "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/phalaenopsis-micholitzii.json", + "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/guarianthe-aurantiaca.json", + "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/vanda-coerulea.json", + "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/cypripedium-calceolus.json", + "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/paphiopedilum-vietnamense.json", + "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/miltonia-kayasimae.json", + "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/platanthera-azorica.json", + "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/dendrophylax-lindenii.json", + "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/paphiopedilum-rothschildianum.json" + ]; + + Counters.Counter private _tokenIds; + + mapping(bytes32 => uint256) public requestToToken; + mapping(bytes32 => string) private speciesIPFS; + mapping(bytes32 => string) private deadSpeciesIPFS; + + constructor() public payable ERC721PresetMinterPauserAutoId("CryptOrchids", "ORCHD", "ipfs://") { + for (uint256 index = 0; index < genum.length; index++) { + speciesIPFS[keccak256(abi.encode(genum[index]))] = speciesIPFSConstant[index]; + deadSpeciesIPFS[keccak256(abi.encode(genum[index]))] = deadSpeciesIPFSConstant[index]; + } + } + + function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { + (string memory species, , , ) = getTokenMetadata(tokenId); + + if (growthStage(tokenId) == Stage.Seed) { + return string(abi.encodePacked(baseURI(), GRANUM_IPFS)); + } + + if (growthStage(tokenId) == Stage.Flower) { + return string(abi.encodePacked(baseURI(), speciesIPFS[keccak256(abi.encode(species))])); + } + + return string(abi.encodePacked(baseURI(), deadSpeciesIPFS[keccak256(abi.encode(species))])); + } + + function _beforeTokenTransfer( + address from, + address to, + uint256 tokenId + ) internal virtual override { + require(address(0) == to || alive(tokenId), "Dead CryptOrchids cannot be transferred"); + super._beforeTokenTransfer(from, to, tokenId); + } + + function currentPrice() public view returns (uint256 price) { + uint256 currentSupply = totalSupply(); + if (currentSupply >= 9900) { + return 1000000000000000000; // 9900+: 1.00 ETH + } else if (currentSupply >= 9500) { + return 640000000000000000; // 9500-9500: 0.64 ETH + } else if (currentSupply >= 7500) { + return 320000000000000000; // 7500-9500: 0.32 ETH + } else if (currentSupply >= 3500) { + return 160000000000000000; // 3500-7500: 0.16 ETH + } else if (currentSupply >= 1500) { + return 80000000000000000; // 1500-3500: 0.08 ETH + } else if (currentSupply >= 500) { + return 60000000000000000; // 500-1500: 0.06 ETH + } else { + return 40000000000000000; // 0 - 500 0.04 ETH + } + } + + function startSale() public onlyOwner { + saleStarted = true; + } + + function startGrowing() public onlyOwner { + growingStarted = true; + } + + /** + * @dev Withdraw ether from this contract (Callable by owner only) + */ + function withdraw() public onlyOwner { + uint256 balance = address(this).balance; + msg.sender.transfer(balance); + } + + receive() external payable {} + + function webMint(uint256 units) public payable { + require(saleStarted, "The Nursery is closed"); + require(units <= MAX_CRYPTORCHIDS - totalSupply(), "Not enough bulbs left"); + require(totalSupply() < MAX_CRYPTORCHIDS, "Sale has already ended"); + require(units > 0 && units <= 20, "You can plant minimum 1, maximum 20 CryptOrchids"); + require(SafeMath.add(totalSupply(), units) <= MAX_CRYPTORCHIDS, "Exceeds MAX_CRYPTORCHIDS"); + require(msg.value >= SafeMath.mul(currentPrice(), units), "Ether value sent is below the price"); + + for (uint256 i = 0; i < units; i++) { + _tokenIds.increment(); + uint256 newItemId = _tokenIds.current(); + cryptorchids[newItemId] = CryptOrchid({species: "granum", plantedAt: MAX_TIMESTAMP, waterLevel: 0}); + _safeMint(msg.sender, newItemId); + } + } + + function germinate(uint256 tokenId, uint256 userProvidedSeed) public { + require(growingStarted, "Germination starts 2021-04-12T16:00:00Z"); + require(_isApprovedOrOwner(_msgSender(), tokenId), "Only the Owner can germinate a CryptOrchid."); + _requestRandom(tokenId, userProvidedSeed); + } + + function _requestRandom(uint256 tokenId, uint256 userProvidedSeed) internal returns (bytes32 requestId) { + uint256 pseudoRand = uint256(keccak256(abi.encodePacked(block.timestamp, block.difficulty, userProvidedSeed))); + fulfillRandomness(tokenId, pseudoRand); + } + + function fulfillRandomness(uint256 tokenId, uint256 randomness) internal { + CryptOrchid storage orchid = cryptorchids[tokenId]; + string memory species = pickSpecies(SafeMath.mod(randomness, 10000)); + orchid.species = species; + orchid.plantedAt = currentTime(); + address tokenOwner = ownerOf(tokenId); + } + + function alive(uint256 tokenId) public view returns (bool) { + return growthStage(tokenId) != Stage.Dead; + } + + function flowering(uint256 tokenId) public view returns (bool) { + return growthStage(tokenId) == Stage.Flower; + } + + function growthStage(uint256 tokenId) public view returns (Stage) { + CryptOrchid memory orchid = cryptorchids[tokenId]; + if (orchid.plantedAt == 0) return Stage.Unsold; + if (orchid.plantedAt == MAX_TIMESTAMP) return Stage.Seed; + uint256 currentWaterLevel = orchid.waterLevel; + uint256 elapsed = currentTime() - orchid.plantedAt; + uint256 fullCycles = SafeMath.div(uint256(elapsed), GROWTH_CYCLE); + uint256 modulo = SafeMath.mod(elapsed, GROWTH_CYCLE); + + if (currentWaterLevel == fullCycles) { + return Stage.Flower; + } + + if (SafeMath.add(currentWaterLevel, 1) == fullCycles && modulo < WATERING_WINDOW) { + return Stage.Flower; + } + + return Stage.Dead; + } + + function water(uint256 tokenId) public { + require(_isApprovedOrOwner(_msgSender(), tokenId), "Only the Owner can water a CryptOrchid."); + + if (!alive(tokenId)) { + return; + } + + CryptOrchid storage orchid = cryptorchids[tokenId]; + + uint256 wateringLevel = orchid.waterLevel; + uint256 elapsed = currentTime() - orchid.plantedAt; + uint256 fullCycles = SafeMath.div(uint256(elapsed), GROWTH_CYCLE); + + if (wateringLevel > fullCycles) { + return; + } + + uint256 newWaterLevel = SafeMath.add(wateringLevel, 1); + orchid.waterLevel = newWaterLevel; + } + + function getTokenMetadata(uint256 tokenId) + public + view + returns ( + string memory, + uint256, + uint256, + Stage + ) + { + return ( + cryptorchids[tokenId].species, + cryptorchids[tokenId].plantedAt, + cryptorchids[tokenId].waterLevel, + growthStage(tokenId) + ); + } + + /** + * @notice Pick species for random number index + * @param randomIndex uint256 + * @return species string + */ + function pickSpecies(uint256 randomIndex) private view returns (string memory) { + for (uint256 i = 0; i < 10; i++) { + if (randomIndex <= limits[i]) { + return genum[i]; + } + } + } +} + + +// File contracts/Libraries/matic/common/AccessControlMixin.sol + +pragma solidity 0.6.6; + +contract AccessControlMixin is AccessControl { + string private _revertMsg; + function _setupContractId(string memory contractId) internal { + _revertMsg = string(abi.encodePacked(contractId, ": INSUFFICIENT_PERMISSIONS")); + } + + modifier only(bytes32 role) { + require( + hasRole(role, _msgSender()), + _revertMsg + ); + _; + } +} + + +// File contracts/Libraries/matic/child/ChildToken/IChildToken.sol + +pragma solidity 0.6.6; + +interface IChildToken { + function deposit(address user, bytes calldata depositData) external; +} + + +// File contracts/Libraries/matic/common/Initializable.sol + +pragma solidity 0.6.6; + +contract Initializable { + bool inited = false; + + modifier initializer() { + require(!inited, "already inited"); + _; + inited = true; + } +} + + +// File contracts/Libraries/matic/common/EIP712Base.sol + +pragma solidity 0.6.6; + +contract EIP712Base is Initializable { + struct EIP712Domain { + string name; + string version; + address verifyingContract; + bytes32 salt; + } + + string constant public ERC712_VERSION = "1"; + + bytes32 internal constant EIP712_DOMAIN_TYPEHASH = keccak256( + bytes( + "EIP712Domain(string name,string version,address verifyingContract,bytes32 salt)" + ) + ); + bytes32 internal domainSeperator; + + // supposed to be called once while initializing. + // one of the contractsa that inherits this contract follows proxy pattern + // so it is not possible to do this in a constructor + function _initializeEIP712( + string memory name + ) + internal + initializer + { + _setDomainSeperator(name); + } + + function _setDomainSeperator(string memory name) internal { + domainSeperator = keccak256( + abi.encode( + EIP712_DOMAIN_TYPEHASH, + keccak256(bytes(name)), + keccak256(bytes(ERC712_VERSION)), + address(this), + bytes32(getChainId()) + ) + ); + } + + function getDomainSeperator() public view returns (bytes32) { + return domainSeperator; + } + + function getChainId() public pure returns (uint256) { + uint256 id; + assembly { + id := chainid() + } + return id; + } + + /** + * Accept message hash and returns hash message in EIP712 compatible form + * So that it can be used to recover signer from signature signed using EIP712 formatted data + * https://eips.ethereum.org/EIPS/eip-712 + * "\\x19" makes the encoding deterministic + * "\\x01" is the version byte to make it compatible to EIP-191 + */ + function toTypedMessageHash(bytes32 messageHash) + internal + view + returns (bytes32) + { + return + keccak256( + abi.encodePacked("\x19\x01", getDomainSeperator(), messageHash) + ); + } +} + + +// File contracts/Libraries/matic/common/NativeMetaTransaction.sol + +pragma solidity 0.6.6; + + +contract NativeMetaTransaction is EIP712Base { + using SafeMath for uint256; + bytes32 private constant META_TRANSACTION_TYPEHASH = keccak256( + bytes( + "MetaTransaction(uint256 nonce,address from,bytes functionSignature)" + ) + ); + event MetaTransactionExecuted( + address userAddress, + address payable relayerAddress, + bytes functionSignature + ); + mapping(address => uint256) nonces; + + /* + * Meta transaction structure. + * No point of including value field here as if user is doing value transfer then he has the funds to pay for gas + * He should call the desired function directly in that case. + */ + struct MetaTransaction { + uint256 nonce; + address from; + bytes functionSignature; + } + + function executeMetaTransaction( + address userAddress, + bytes memory functionSignature, + bytes32 sigR, + bytes32 sigS, + uint8 sigV + ) public payable returns (bytes memory) { + MetaTransaction memory metaTx = MetaTransaction({ + nonce: nonces[userAddress], + from: userAddress, + functionSignature: functionSignature + }); + + require( + verify(userAddress, metaTx, sigR, sigS, sigV), + "Signer and signature do not match" + ); + + // increase nonce for user (to avoid re-use) + nonces[userAddress] = nonces[userAddress].add(1); + + emit MetaTransactionExecuted( + userAddress, + msg.sender, + functionSignature + ); + + // Append userAddress and relayer address at the end to extract it from calling context + (bool success, bytes memory returnData) = address(this).call( + abi.encodePacked(functionSignature, userAddress) + ); + require(success, "Function call not successful"); + + return returnData; + } + + function hashMetaTransaction(MetaTransaction memory metaTx) + internal + pure + returns (bytes32) + { + return + keccak256( + abi.encode( + META_TRANSACTION_TYPEHASH, + metaTx.nonce, + metaTx.from, + keccak256(metaTx.functionSignature) + ) + ); + } + + function getNonce(address user) public view returns (uint256 nonce) { + nonce = nonces[user]; + } + + function verify( + address signer, + MetaTransaction memory metaTx, + bytes32 sigR, + bytes32 sigS, + uint8 sigV + ) internal view returns (bool) { + require(signer != address(0), "NativeMetaTransaction: INVALID_SIGNER"); + return + signer == + ecrecover( + toTypedMessageHash(hashMetaTransaction(metaTx)), + sigV, + sigR, + sigS + ); + } +} + + +// File contracts/Libraries/matic/common/ContextMixin.sol + +pragma solidity 0.6.6; + +abstract contract ContextMixin { + function msgSender() + internal + view + returns (address payable sender) + { + if (msg.sender == address(this)) { + bytes memory array = msg.data; + uint256 index = msg.data.length; + assembly { + // Load the 32 bytes word from memory with the address on the lower 20 bytes, and mask those. + sender := and( + mload(add(array, index)), + 0xffffffffffffffffffffffffffffffffffffffff + ) + } + } else { + sender = msg.sender; + } + return sender; + } +} + + +// File contracts/Libraries/tunnel/FxBaseChildTunnel.sol + +// SPDX-License-Identifier: MIT +pragma solidity >=0.6.6 <0.9.0; + +// IFxMessageProcessor represents interface to process message +interface IFxMessageProcessor { + function processMessageFromRoot( + uint256 stateId, + address rootMessageSender, + bytes calldata data + ) external; +} + +/** + * @notice Mock child tunnel contract to receive and send message from L2 + */ +abstract contract FxBaseChildTunnel is IFxMessageProcessor { + // MessageTunnel on L1 will get data from this event + event MessageSent(bytes message); + + // fx child + address public fxChild; + + // fx root tunnel + address public fxRootTunnel; + + constructor(address _fxChild) internal { + fxChild = _fxChild; + } + + // Sender must be fxRootTunnel in case of ERC20 tunnel + modifier validateSender(address sender) { + require(sender == fxRootTunnel, "FxBaseChildTunnel: INVALID_SENDER_FROM_ROOT"); + _; + } + + // set fxRootTunnel if not set already + function setFxRootTunnel(address _fxRootTunnel) public { + require(fxRootTunnel == address(0x0), "FxBaseChildTunnel: ROOT_TUNNEL_ALREADY_SET"); + fxRootTunnel = _fxRootTunnel; + } + + function processMessageFromRoot( + uint256 stateId, + address rootMessageSender, + bytes memory data + ) public override { + require(msg.sender == fxChild, "FxBaseChildTunnel: INVALID_SENDER"); + _processMessageFromRoot(stateId, rootMessageSender, data); + } + + /** + * @notice Emit message that can be received on Root Tunnel + * @dev Call the internal function when need to emit message + * @param message bytes message that will be sent to Root Tunnel + * some message examples - + * abi.encode(tokenId); + * abi.encode(tokenId, tokenMetadata); + * abi.encode(messageType, messageData); + */ + function _sendMessageToRoot(bytes memory message) internal { + emit MessageSent(message); + } + + /** + * @notice Process message received from Root Tunnel + * @dev function needs to be implemented to handle message as per requirement + * This is called by onStateReceive function. + * Since it is called via a system call, any event will not be emitted during its execution. + * @param stateId unique state id + * @param sender root message sender + * @param message bytes message that was sent from Root Tunnel + */ + function _processMessageFromRoot( + uint256 stateId, + address sender, + bytes memory message + ) internal virtual; +} + + +// File contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.6 <0.9.0; + + + + + + +contract CryptOrchidERC721Child is + CryptOrchidGoerli, + IChildToken, + AccessControlMixin, + NativeMetaTransaction, + ContextMixin, + FxBaseChildTunnel +{ + bytes32 public constant DEPOSITOR_ROLE = keccak256("DEPOSITOR_ROLE"); + + // limit batching of tokens due to gas limit restrictions + uint256 public constant BATCH_LIMIT = 20; + + event WithdrawnBatch(address indexed user, uint256[] tokenIds); + event TransferWithMetadata(address indexed from, address indexed to, uint256 indexed tokenId, bytes metaData); + + constructor(address childChainManager, address _fxChild) public CryptOrchidGoerli() FxBaseChildTunnel(_fxChild) { + _setupContractId("CryptOrchidERC721Child"); + _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); + _setupRole(DEPOSITOR_ROLE, childChainManager); + _initializeEIP712("CryptOrchids"); + } + + // This is to support Native meta transactions + // never use msg.sender directly, use _msgSender() instead + function _msgSender() internal view override returns (address payable sender) { + return ContextMixin.msgSender(); + } + + /** + * @notice called when token is deposited on root chain + * @dev Should be callable only by ChildChainManager + * Should handle deposit by minting the required tokenId for user + * Make sure minting is done only by this function + * @param user user address for whom deposit is being done + * @param depositData abi encoded tokenId + */ + function deposit(address user, bytes calldata depositData) external override only(DEPOSITOR_ROLE) { + // deposit single + if (depositData.length == 32) { + uint256 tokenId = abi.decode(depositData, (uint256)); + _mint(user, tokenId); + + // deposit batch + } else { + uint256[] memory tokenIds = abi.decode(depositData, (uint256[])); + uint256 length = tokenIds.length; + for (uint256 i; i < length; i++) { + _mint(user, tokenIds[i]); + } + } + } + + /** + * @notice called when user wants to withdraw token back to root chain + * @dev Should burn user's token. This transaction will be verified when exiting on root chain + * @param tokenId tokenId to withdraw + */ + function withdraw(uint256 tokenId) external { + require(_msgSender() == ownerOf(tokenId), "ChildERC721: INVALID_TOKEN_OWNER"); + _burn(tokenId); + } + + /** + * @notice called when user wants to withdraw multiple tokens back to root chain + * @dev Should burn user's tokens. This transaction will be verified when exiting on root chain + * @param tokenIds tokenId list to withdraw + */ + function withdrawBatch(uint256[] calldata tokenIds) external { + uint256 length = tokenIds.length; + require(length <= BATCH_LIMIT, "ChildERC721: EXCEEDS_BATCH_LIMIT"); + for (uint256 i; i < length; i++) { + uint256 tokenId = tokenIds[i]; + require( + _msgSender() == ownerOf(tokenId), + string(abi.encodePacked("ChildERC721: INVALID_TOKEN_OWNER ", tokenId)) + ); + _burn(tokenId); + } + emit WithdrawnBatch(_msgSender(), tokenIds); + } + + /** + * @notice called when user wants to withdraw token back to root chain with arbitrary metadata + * @dev Should handle withraw by burning user's token. + * + * This transaction will be verified when exiting on root chain + * + * @param tokenId tokenId to withdraw + */ + function withdrawWithMetadata(uint256 tokenId) external { + require(_msgSender() == ownerOf(tokenId), "ChildERC721: INVALID_TOKEN_OWNER"); + + // Encoding metadata associated with tokenId & emitting event + emit TransferWithMetadata(_msgSender(), address(0), tokenId, this.encodeTokenMetadata(tokenId)); + + _burn(tokenId); + } + + /** + * @notice This method is supposed to be called by client when withdrawing token with metadata + * and pass return value of this function as second paramter of `withdrawWithMetadata` method + * + * It can be overridden by clients to encode data in a different form, which needs to + * be decoded back by them correctly during exiting + * + * @param tokenId Token for which URI to be fetched + */ + function encodeTokenMetadata(uint256 tokenId) external view virtual returns (bytes memory) { + // You're always free to change this default implementation + // and pack more data in byte array which can be decoded back + // in L1 + return abi.encode(tokenURI(tokenId)); + } + + function _processMessageFromRoot( + uint256 stateId, + address sender, + bytes memory data + ) internal override validateSender(sender) { + (string memory species, uint256 plantedAt, uint256 waterLevel, uint256 tokenId) = abi.decode( + data, + (string, uint256, uint256, uint256) + ); + cryptorchids[tokenId] = CryptOrchid({species: species, plantedAt: plantedAt, waterLevel: waterLevel}); + } + + function sendMessageToRoot(bytes memory message) public { + _sendMessageToRoot(message); + } +} diff --git a/flat/CryptOrchidERC721Child_flat.sol b/flat/CryptOrchidERC721Child_flat.sol new file mode 100644 index 0000000..7038e7b --- /dev/null +++ b/flat/CryptOrchidERC721Child_flat.sol @@ -0,0 +1,638 @@ +pragma solidity 0.6.6; + +contract Initializable { + bool inited = false; + + modifier initializer() { + require(!inited, "already inited"); + _; + inited = true; + } +} +// SPDX-License-Identifier: MIT + + + +contract CurrentTime { + function currentTime() internal view virtual returns (uint256) { + return block.timestamp; + } +} + + +abstract contract ContextMixin { + function msgSender() + internal + view + returns (address payable sender) + { + if (msg.sender == address(this)) { + bytes memory array = msg.data; + uint256 index = msg.data.length; + assembly { + // Load the 32 bytes word from memory with the address on the lower 20 bytes, and mask those. + sender := and( + mload(add(array, index)), + 0xffffffffffffffffffffffffffffffffffffffff + ) + } + } else { + sender = msg.sender; + } + return sender; + } +} + + +interface IChildToken { + function deposit(address user, bytes calldata depositData) external; +} + + + + + + +// NB: this is only meant to deploy to goerli, where chainlink VRF is unavailable. +// goerli connects to polygon mumbai, which is what we need to test PoS bridging. +// Deploy scripts prevent other contracts from goerli deploy, and this contract from +// anything other than goerlui + + + + + + + + +contract CryptOrchidGoerli is ERC721PresetMinterPauserAutoId, Ownable, CurrentTime { + using SafeMath for uint256; + using Strings for string; + using Counters for Counters.Counter; + + struct CryptOrchid { + string species; + uint256 plantedAt; + uint256 waterLevel; + } + mapping(uint256 => CryptOrchid) public cryptorchids; + + enum Stage {Unsold, Seed, Flower, Dead} + + bool internal saleStarted = false; + bool internal growingStarted = false; + + uint256 public constant MAX_CRYPTORCHIDS = 10000; + uint256 public constant GROWTH_CYCLE = 604800; // 7 days + uint256 public constant WATERING_WINDOW = 10800; // 3 hours + uint256 internal constant MAX_TIMESTAMP = 2**256 - 1; + string internal constant GRANUM_IPFS = "QmWd1mn7DuGyx9ByfNeqCsgdSUsJZ1cragitgaygsqDvEm"; + + uint16[10] private limits = [0, 3074, 6074, 8074, 9074, 9574, 9824, 9924, 9974, 9999]; + string[10] private genum = [ + "shenzhenica orchidaceae", + "phalaenopsis micholitzii", + "guarianthe aurantiaca", + "vanda coerulea", + "cypripedium calceolus", + "paphiopedilum vietnamense", + "miltonia kayasimae", + "platanthera azorica", + "dendrophylax lindenii", + "paphiopedilum rothschildianum" + ]; + + string[10] private speciesIPFSConstant = [ + "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/shenzhenica-orchidaceae.json", + "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/phalaenopsis-micholitzii.json", + "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/guarianthe-aurantiaca.json", + "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/vanda-coerulea.json", + "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/cypripedium-calceolus.json", + "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/paphiopedilum-vietnamense.json", + "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/miltonia-kayasimae.json", + "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/platanthera-azorica.json", + "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/dendrophylax-lindenii.json", + "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/paphiopedilum-rothschildianum.json" + ]; + + string[10] private deadSpeciesIPFSConstant = [ + "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/shenzhenica-orchidaceae.json", + "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/phalaenopsis-micholitzii.json", + "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/guarianthe-aurantiaca.json", + "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/vanda-coerulea.json", + "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/cypripedium-calceolus.json", + "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/paphiopedilum-vietnamense.json", + "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/miltonia-kayasimae.json", + "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/platanthera-azorica.json", + "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/dendrophylax-lindenii.json", + "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/paphiopedilum-rothschildianum.json" + ]; + + Counters.Counter private _tokenIds; + + mapping(bytes32 => uint256) public requestToToken; + mapping(bytes32 => string) private speciesIPFS; + mapping(bytes32 => string) private deadSpeciesIPFS; + + constructor() public payable ERC721PresetMinterPauserAutoId("CryptOrchids", "ORCHD", "ipfs://") { + for (uint256 index = 0; index < genum.length; index++) { + speciesIPFS[keccak256(abi.encode(genum[index]))] = speciesIPFSConstant[index]; + deadSpeciesIPFS[keccak256(abi.encode(genum[index]))] = deadSpeciesIPFSConstant[index]; + } + } + + function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { + (string memory species, , , ) = getTokenMetadata(tokenId); + + if (growthStage(tokenId) == Stage.Seed) { + return string(abi.encodePacked(baseURI(), GRANUM_IPFS)); + } + + if (growthStage(tokenId) == Stage.Flower) { + return string(abi.encodePacked(baseURI(), speciesIPFS[keccak256(abi.encode(species))])); + } + + return string(abi.encodePacked(baseURI(), deadSpeciesIPFS[keccak256(abi.encode(species))])); + } + + function _beforeTokenTransfer( + address from, + address to, + uint256 tokenId + ) internal virtual override { + require(address(0) == to || alive(tokenId), "Dead CryptOrchids cannot be transferred"); + super._beforeTokenTransfer(from, to, tokenId); + } + + function currentPrice() public view returns (uint256 price) { + uint256 currentSupply = totalSupply(); + if (currentSupply >= 9900) { + return 1000000000000000000; // 9900+: 1.00 ETH + } else if (currentSupply >= 9500) { + return 640000000000000000; // 9500-9500: 0.64 ETH + } else if (currentSupply >= 7500) { + return 320000000000000000; // 7500-9500: 0.32 ETH + } else if (currentSupply >= 3500) { + return 160000000000000000; // 3500-7500: 0.16 ETH + } else if (currentSupply >= 1500) { + return 80000000000000000; // 1500-3500: 0.08 ETH + } else if (currentSupply >= 500) { + return 60000000000000000; // 500-1500: 0.06 ETH + } else { + return 40000000000000000; // 0 - 500 0.04 ETH + } + } + + function startSale() public onlyOwner { + saleStarted = true; + } + + function startGrowing() public onlyOwner { + growingStarted = true; + } + + /** + * @dev Withdraw ether from this contract (Callable by owner only) + */ + function withdraw() public onlyOwner { + uint256 balance = address(this).balance; + msg.sender.transfer(balance); + } + + receive() external payable {} + + function webMint(uint256 units) public payable { + require(saleStarted, "The Nursery is closed"); + require(units <= MAX_CRYPTORCHIDS - totalSupply(), "Not enough bulbs left"); + require(totalSupply() < MAX_CRYPTORCHIDS, "Sale has already ended"); + require(units > 0 && units <= 20, "You can plant minimum 1, maximum 20 CryptOrchids"); + require(SafeMath.add(totalSupply(), units) <= MAX_CRYPTORCHIDS, "Exceeds MAX_CRYPTORCHIDS"); + require(msg.value >= SafeMath.mul(currentPrice(), units), "Ether value sent is below the price"); + + for (uint256 i = 0; i < units; i++) { + _tokenIds.increment(); + uint256 newItemId = _tokenIds.current(); + cryptorchids[newItemId] = CryptOrchid({species: "granum", plantedAt: MAX_TIMESTAMP, waterLevel: 0}); + _safeMint(msg.sender, newItemId); + } + } + + function germinate(uint256 tokenId, uint256 userProvidedSeed) public { + require(growingStarted, "Germination starts 2021-04-12T16:00:00Z"); + require(_isApprovedOrOwner(_msgSender(), tokenId), "Only the Owner can germinate a CryptOrchid."); + _requestRandom(tokenId, userProvidedSeed); + } + + function _requestRandom(uint256 tokenId, uint256 userProvidedSeed) internal returns (bytes32 requestId) { + uint256 pseudoRand = uint256(keccak256(abi.encodePacked(block.timestamp, block.difficulty, userProvidedSeed))); + fulfillRandomness(tokenId, pseudoRand); + } + + function fulfillRandomness(uint256 tokenId, uint256 randomness) internal { + CryptOrchid storage orchid = cryptorchids[tokenId]; + string memory species = pickSpecies(SafeMath.mod(randomness, 10000)); + orchid.species = species; + orchid.plantedAt = currentTime(); + address tokenOwner = ownerOf(tokenId); + } + + function alive(uint256 tokenId) public view returns (bool) { + return growthStage(tokenId) != Stage.Dead; + } + + function flowering(uint256 tokenId) public view returns (bool) { + return growthStage(tokenId) == Stage.Flower; + } + + function growthStage(uint256 tokenId) public view returns (Stage) { + CryptOrchid memory orchid = cryptorchids[tokenId]; + if (orchid.plantedAt == 0) return Stage.Unsold; + if (orchid.plantedAt == MAX_TIMESTAMP) return Stage.Seed; + uint256 currentWaterLevel = orchid.waterLevel; + uint256 elapsed = currentTime() - orchid.plantedAt; + uint256 fullCycles = SafeMath.div(uint256(elapsed), GROWTH_CYCLE); + uint256 modulo = SafeMath.mod(elapsed, GROWTH_CYCLE); + + if (currentWaterLevel == fullCycles) { + return Stage.Flower; + } + + if (SafeMath.add(currentWaterLevel, 1) == fullCycles && modulo < WATERING_WINDOW) { + return Stage.Flower; + } + + return Stage.Dead; + } + + function water(uint256 tokenId) public { + require(_isApprovedOrOwner(_msgSender(), tokenId), "Only the Owner can water a CryptOrchid."); + + if (!alive(tokenId)) { + return; + } + + CryptOrchid storage orchid = cryptorchids[tokenId]; + + uint256 wateringLevel = orchid.waterLevel; + uint256 elapsed = currentTime() - orchid.plantedAt; + uint256 fullCycles = SafeMath.div(uint256(elapsed), GROWTH_CYCLE); + + if (wateringLevel > fullCycles) { + return; + } + + uint256 newWaterLevel = SafeMath.add(wateringLevel, 1); + orchid.waterLevel = newWaterLevel; + } + + function getTokenMetadata(uint256 tokenId) + public + view + returns ( + string memory, + uint256, + uint256, + Stage + ) + { + return ( + cryptorchids[tokenId].species, + cryptorchids[tokenId].plantedAt, + cryptorchids[tokenId].waterLevel, + growthStage(tokenId) + ); + } + + /** + * @notice Pick species for random number index + * @param randomIndex uint256 + * @return species string + */ + function pickSpecies(uint256 randomIndex) private view returns (string memory) { + for (uint256 i = 0; i < 10; i++) { + if (randomIndex <= limits[i]) { + return genum[i]; + } + } + } +} + + + + + +contract AccessControlMixin is AccessControl { + string private _revertMsg; + function _setupContractId(string memory contractId) internal { + _revertMsg = string(abi.encodePacked(contractId, ": INSUFFICIENT_PERMISSIONS")); + } + + modifier only(bytes32 role) { + require( + hasRole(role, _msgSender()), + _revertMsg + ); + _; + } +} + + + + + + + + + +contract EIP712Base is Initializable { + struct EIP712Domain { + string name; + string version; + address verifyingContract; + bytes32 salt; + } + + string constant public ERC712_VERSION = "1"; + + bytes32 internal constant EIP712_DOMAIN_TYPEHASH = keccak256( + bytes( + "EIP712Domain(string name,string version,address verifyingContract,bytes32 salt)" + ) + ); + bytes32 internal domainSeperator; + + // supposed to be called once while initializing. + // one of the contractsa that inherits this contract follows proxy pattern + // so it is not possible to do this in a constructor + function _initializeEIP712( + string memory name + ) + internal + initializer + { + _setDomainSeperator(name); + } + + function _setDomainSeperator(string memory name) internal { + domainSeperator = keccak256( + abi.encode( + EIP712_DOMAIN_TYPEHASH, + keccak256(bytes(name)), + keccak256(bytes(ERC712_VERSION)), + address(this), + bytes32(getChainId()) + ) + ); + } + + function getDomainSeperator() public view returns (bytes32) { + return domainSeperator; + } + + function getChainId() public pure returns (uint256) { + uint256 id; + assembly { + id := chainid() + } + return id; + } + + /** + * Accept message hash and returns hash message in EIP712 compatible form + * So that it can be used to recover signer from signature signed using EIP712 formatted data + * https://eips.ethereum.org/EIPS/eip-712 + * "\\x19" makes the encoding deterministic + * "\\x01" is the version byte to make it compatible to EIP-191 + */ + function toTypedMessageHash(bytes32 messageHash) + internal + view + returns (bytes32) + { + return + keccak256( + abi.encodePacked("\x19\x01", getDomainSeperator(), messageHash) + ); + } +} + + +contract NativeMetaTransaction is EIP712Base { + using SafeMath for uint256; + bytes32 private constant META_TRANSACTION_TYPEHASH = keccak256( + bytes( + "MetaTransaction(uint256 nonce,address from,bytes functionSignature)" + ) + ); + event MetaTransactionExecuted( + address userAddress, + address payable relayerAddress, + bytes functionSignature + ); + mapping(address => uint256) nonces; + + /* + * Meta transaction structure. + * No point of including value field here as if user is doing value transfer then he has the funds to pay for gas + * He should call the desired function directly in that case. + */ + struct MetaTransaction { + uint256 nonce; + address from; + bytes functionSignature; + } + + function executeMetaTransaction( + address userAddress, + bytes memory functionSignature, + bytes32 sigR, + bytes32 sigS, + uint8 sigV + ) public payable returns (bytes memory) { + MetaTransaction memory metaTx = MetaTransaction({ + nonce: nonces[userAddress], + from: userAddress, + functionSignature: functionSignature + }); + + require( + verify(userAddress, metaTx, sigR, sigS, sigV), + "Signer and signature do not match" + ); + + // increase nonce for user (to avoid re-use) + nonces[userAddress] = nonces[userAddress].add(1); + + emit MetaTransactionExecuted( + userAddress, + msg.sender, + functionSignature + ); + + // Append userAddress and relayer address at the end to extract it from calling context + (bool success, bytes memory returnData) = address(this).call( + abi.encodePacked(functionSignature, userAddress) + ); + require(success, "Function call not successful"); + + return returnData; + } + + function hashMetaTransaction(MetaTransaction memory metaTx) + internal + pure + returns (bytes32) + { + return + keccak256( + abi.encode( + META_TRANSACTION_TYPEHASH, + metaTx.nonce, + metaTx.from, + keccak256(metaTx.functionSignature) + ) + ); + } + + function getNonce(address user) public view returns (uint256 nonce) { + nonce = nonces[user]; + } + + function verify( + address signer, + MetaTransaction memory metaTx, + bytes32 sigR, + bytes32 sigS, + uint8 sigV + ) internal view returns (bool) { + require(signer != address(0), "NativeMetaTransaction: INVALID_SIGNER"); + return + signer == + ecrecover( + toTypedMessageHash(hashMetaTransaction(metaTx)), + sigV, + sigR, + sigS + ); + } +} + + + +contract CryptOrchidERC721Child is + CryptOrchidGoerli, + IChildToken, + AccessControlMixin, + NativeMetaTransaction, + ContextMixin +{ + bytes32 public constant DEPOSITOR_ROLE = keccak256("DEPOSITOR_ROLE"); + + // limit batching of tokens due to gas limit restrictions + uint256 public constant BATCH_LIMIT = 20; + + event WithdrawnBatch(address indexed user, uint256[] tokenIds); + event TransferWithMetadata(address indexed from, address indexed to, uint256 indexed tokenId, bytes metaData); + + constructor(address childChainManager) public CryptOrchidGoerli() { + _setupContractId("CryptOrchidERC721Child"); + _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); + _setupRole(DEPOSITOR_ROLE, childChainManager); + _initializeEIP712("CryptOrchids"); + } + + // This is to support Native meta transactions + // never use msg.sender directly, use _msgSender() instead + function _msgSender() internal view override returns (address payable sender) { + return ContextMixin.msgSender(); + } + + /** + * @notice called when token is deposited on root chain + * @dev Should be callable only by ChildChainManager + * Should handle deposit by minting the required tokenId for user + * Make sure minting is done only by this function + * @param user user address for whom deposit is being done + * @param depositData abi encoded tokenId + */ + function deposit(address user, bytes calldata depositData) external override only(DEPOSITOR_ROLE) { + // deposit single + if (depositData.length == 32) { + uint256 tokenId = abi.decode(depositData, (uint256)); + _mint(user, tokenId); + + // deposit batch + } else { + uint256[] memory tokenIds = abi.decode(depositData, (uint256[])); + uint256 length = tokenIds.length; + for (uint256 i; i < length; i++) { + _mint(user, tokenIds[i]); + } + } + } + + /** + * @notice called when user wants to withdraw token back to root chain + * @dev Should burn user's token. This transaction will be verified when exiting on root chain + * @param tokenId tokenId to withdraw + */ + function withdraw(uint256 tokenId) external { + require(_msgSender() == ownerOf(tokenId), "ChildERC721: INVALID_TOKEN_OWNER"); + _burn(tokenId); + } + + /** + * @notice called when user wants to withdraw multiple tokens back to root chain + * @dev Should burn user's tokens. This transaction will be verified when exiting on root chain + * @param tokenIds tokenId list to withdraw + */ + function withdrawBatch(uint256[] calldata tokenIds) external { + uint256 length = tokenIds.length; + require(length <= BATCH_LIMIT, "ChildERC721: EXCEEDS_BATCH_LIMIT"); + for (uint256 i; i < length; i++) { + uint256 tokenId = tokenIds[i]; + require( + _msgSender() == ownerOf(tokenId), + string(abi.encodePacked("ChildERC721: INVALID_TOKEN_OWNER ", tokenId)) + ); + _burn(tokenId); + } + emit WithdrawnBatch(_msgSender(), tokenIds); + } + + /** + * @notice called when user wants to withdraw token back to root chain with arbitrary metadata + * @dev Should handle withraw by burning user's token. + * + * This transaction will be verified when exiting on root chain + * + * @param tokenId tokenId to withdraw + */ + function withdrawWithMetadata(uint256 tokenId) external { + require(_msgSender() == ownerOf(tokenId), "ChildERC721: INVALID_TOKEN_OWNER"); + + // Encoding metadata associated with tokenId & emitting event + emit TransferWithMetadata(_msgSender(), address(0), tokenId, this.encodeTokenMetadata(tokenId)); + + _burn(tokenId); + } + + /** + * @notice This method is supposed to be called by client when withdrawing token with metadata + * and pass return value of this function as second paramter of `withdrawWithMetadata` method + * + * It can be overridden by clients to encode data in a different form, which needs to + * be decoded back by them correctly during exiting + * + * @param tokenId Token for which URI to be fetched + */ + function encodeTokenMetadata(uint256 tokenId) external view virtual returns (bytes memory) { + // You're always free to change this default implementation + // and pack more data in byte array which can be decoded back + // in L1 + return abi.encode(tokenURI(tokenId)); + } +} + + + diff --git a/flat/hardhat.sol b/flat/hardhat.sol new file mode 100644 index 0000000..9098d21 --- /dev/null +++ b/flat/hardhat.sol @@ -0,0 +1,3074 @@ +// Sources flattened with hardhat v2.1.2 https://hardhat.org + +// File @openzeppelin/contracts/utils/Context.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + +/* + * @dev Provides information about the current execution context, including the + * sender of the transaction and its data. While these are generally available + * via msg.sender and msg.data, they should not be accessed in such a direct + * manner, since when dealing with GSN meta-transactions the account sending and + * paying for execution may not be the actual sender (as far as an application + * is concerned). + * + * This contract is only required for intermediate, library-like contracts. + */ +abstract contract Context { + function _msgSender() internal view virtual returns (address payable) { + return msg.sender; + } + + function _msgData() internal view virtual returns (bytes memory) { + this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 + return msg.data; + } +} + + +// File @openzeppelin/contracts/access/Ownable.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + +/** + * @dev Contract module which provides a basic access control mechanism, where + * there is an account (an owner) that can be granted exclusive access to + * specific functions. + * + * By default, the owner account will be the one that deploys the contract. This + * can later be changed with {transferOwnership}. + * + * This module is used through inheritance. It will make available the modifier + * `onlyOwner`, which can be applied to your functions to restrict their use to + * the owner. + */ +abstract contract Ownable is Context { + address private _owner; + + event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); + + /** + * @dev Initializes the contract setting the deployer as the initial owner. + */ + constructor () internal { + address msgSender = _msgSender(); + _owner = msgSender; + emit OwnershipTransferred(address(0), msgSender); + } + + /** + * @dev Returns the address of the current owner. + */ + function owner() public view virtual returns (address) { + return _owner; + } + + /** + * @dev Throws if called by any account other than the owner. + */ + modifier onlyOwner() { + require(owner() == _msgSender(), "Ownable: caller is not the owner"); + _; + } + + /** + * @dev Leaves the contract without owner. It will not be possible to call + * `onlyOwner` functions anymore. Can only be called by the current owner. + * + * NOTE: Renouncing ownership will leave the contract without an owner, + * thereby removing any functionality that is only available to the owner. + */ + function renounceOwnership() public virtual onlyOwner { + emit OwnershipTransferred(_owner, address(0)); + _owner = address(0); + } + + /** + * @dev Transfers ownership of the contract to a new account (`newOwner`). + * Can only be called by the current owner. + */ + function transferOwnership(address newOwner) public virtual onlyOwner { + require(newOwner != address(0), "Ownable: new owner is the zero address"); + emit OwnershipTransferred(_owner, newOwner); + _owner = newOwner; + } +} + + +// File @openzeppelin/contracts/math/SafeMath.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + +/** + * @dev Wrappers over Solidity's arithmetic operations with added overflow + * checks. + * + * Arithmetic operations in Solidity wrap on overflow. This can easily result + * in bugs, because programmers usually assume that an overflow raises an + * error, which is the standard behavior in high level programming languages. + * `SafeMath` restores this intuition by reverting the transaction when an + * operation overflows. + * + * Using this library instead of the unchecked operations eliminates an entire + * class of bugs, so it's recommended to use it always. + */ +library SafeMath { + /** + * @dev Returns the addition of two unsigned integers, with an overflow flag. + * + * _Available since v3.4._ + */ + function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { + uint256 c = a + b; + if (c < a) return (false, 0); + return (true, c); + } + + /** + * @dev Returns the substraction of two unsigned integers, with an overflow flag. + * + * _Available since v3.4._ + */ + function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { + if (b > a) return (false, 0); + return (true, a - b); + } + + /** + * @dev Returns the multiplication of two unsigned integers, with an overflow flag. + * + * _Available since v3.4._ + */ + function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { + // Gas optimization: this is cheaper than requiring 'a' not being zero, but the + // benefit is lost if 'b' is also tested. + // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 + if (a == 0) return (true, 0); + uint256 c = a * b; + if (c / a != b) return (false, 0); + return (true, c); + } + + /** + * @dev Returns the division of two unsigned integers, with a division by zero flag. + * + * _Available since v3.4._ + */ + function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { + if (b == 0) return (false, 0); + return (true, a / b); + } + + /** + * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. + * + * _Available since v3.4._ + */ + function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { + if (b == 0) return (false, 0); + return (true, a % b); + } + + /** + * @dev Returns the addition of two unsigned integers, reverting on + * overflow. + * + * Counterpart to Solidity's `+` operator. + * + * Requirements: + * + * - Addition cannot overflow. + */ + function add(uint256 a, uint256 b) internal pure returns (uint256) { + uint256 c = a + b; + require(c >= a, "SafeMath: addition overflow"); + return c; + } + + /** + * @dev Returns the subtraction of two unsigned integers, reverting on + * overflow (when the result is negative). + * + * Counterpart to Solidity's `-` operator. + * + * Requirements: + * + * - Subtraction cannot overflow. + */ + function sub(uint256 a, uint256 b) internal pure returns (uint256) { + require(b <= a, "SafeMath: subtraction overflow"); + return a - b; + } + + /** + * @dev Returns the multiplication of two unsigned integers, reverting on + * overflow. + * + * Counterpart to Solidity's `*` operator. + * + * Requirements: + * + * - Multiplication cannot overflow. + */ + function mul(uint256 a, uint256 b) internal pure returns (uint256) { + if (a == 0) return 0; + uint256 c = a * b; + require(c / a == b, "SafeMath: multiplication overflow"); + return c; + } + + /** + * @dev Returns the integer division of two unsigned integers, reverting on + * division by zero. The result is rounded towards zero. + * + * Counterpart to Solidity's `/` operator. Note: this function uses a + * `revert` opcode (which leaves remaining gas untouched) while Solidity + * uses an invalid opcode to revert (consuming all remaining gas). + * + * Requirements: + * + * - The divisor cannot be zero. + */ + function div(uint256 a, uint256 b) internal pure returns (uint256) { + require(b > 0, "SafeMath: division by zero"); + return a / b; + } + + /** + * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), + * reverting when dividing by zero. + * + * Counterpart to Solidity's `%` operator. This function uses a `revert` + * opcode (which leaves remaining gas untouched) while Solidity uses an + * invalid opcode to revert (consuming all remaining gas). + * + * Requirements: + * + * - The divisor cannot be zero. + */ + function mod(uint256 a, uint256 b) internal pure returns (uint256) { + require(b > 0, "SafeMath: modulo by zero"); + return a % b; + } + + /** + * @dev Returns the subtraction of two unsigned integers, reverting with custom message on + * overflow (when the result is negative). + * + * CAUTION: This function is deprecated because it requires allocating memory for the error + * message unnecessarily. For custom revert reasons use {trySub}. + * + * Counterpart to Solidity's `-` operator. + * + * Requirements: + * + * - Subtraction cannot overflow. + */ + function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { + require(b <= a, errorMessage); + return a - b; + } + + /** + * @dev Returns the integer division of two unsigned integers, reverting with custom message on + * division by zero. The result is rounded towards zero. + * + * CAUTION: This function is deprecated because it requires allocating memory for the error + * message unnecessarily. For custom revert reasons use {tryDiv}. + * + * Counterpart to Solidity's `/` operator. Note: this function uses a + * `revert` opcode (which leaves remaining gas untouched) while Solidity + * uses an invalid opcode to revert (consuming all remaining gas). + * + * Requirements: + * + * - The divisor cannot be zero. + */ + function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { + require(b > 0, errorMessage); + return a / b; + } + + /** + * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), + * reverting with custom message when dividing by zero. + * + * CAUTION: This function is deprecated because it requires allocating memory for the error + * message unnecessarily. For custom revert reasons use {tryMod}. + * + * Counterpart to Solidity's `%` operator. This function uses a `revert` + * opcode (which leaves remaining gas untouched) while Solidity uses an + * invalid opcode to revert (consuming all remaining gas). + * + * Requirements: + * + * - The divisor cannot be zero. + */ + function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { + require(b > 0, errorMessage); + return a % b; + } +} + + +// File @openzeppelin/contracts/utils/EnumerableSet.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + +/** + * @dev Library for managing + * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive + * types. + * + * Sets have the following properties: + * + * - Elements are added, removed, and checked for existence in constant time + * (O(1)). + * - Elements are enumerated in O(n). No guarantees are made on the ordering. + * + * ``` + * contract Example { + * // Add the library methods + * using EnumerableSet for EnumerableSet.AddressSet; + * + * // Declare a set state variable + * EnumerableSet.AddressSet private mySet; + * } + * ``` + * + * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) + * and `uint256` (`UintSet`) are supported. + */ +library EnumerableSet { + // To implement this library for multiple types with as little code + // repetition as possible, we write it in terms of a generic Set type with + // bytes32 values. + // The Set implementation uses private functions, and user-facing + // implementations (such as AddressSet) are just wrappers around the + // underlying Set. + // This means that we can only create new EnumerableSets for types that fit + // in bytes32. + + struct Set { + // Storage of set values + bytes32[] _values; + + // Position of the value in the `values` array, plus 1 because index 0 + // means a value is not in the set. + mapping (bytes32 => uint256) _indexes; + } + + /** + * @dev Add a value to a set. O(1). + * + * Returns true if the value was added to the set, that is if it was not + * already present. + */ + function _add(Set storage set, bytes32 value) private returns (bool) { + if (!_contains(set, value)) { + set._values.push(value); + // The value is stored at length-1, but we add 1 to all indexes + // and use 0 as a sentinel value + set._indexes[value] = set._values.length; + return true; + } else { + return false; + } + } + + /** + * @dev Removes a value from a set. O(1). + * + * Returns true if the value was removed from the set, that is if it was + * present. + */ + function _remove(Set storage set, bytes32 value) private returns (bool) { + // We read and store the value's index to prevent multiple reads from the same storage slot + uint256 valueIndex = set._indexes[value]; + + if (valueIndex != 0) { // Equivalent to contains(set, value) + // To delete an element from the _values array in O(1), we swap the element to delete with the last one in + // the array, and then remove the last element (sometimes called as 'swap and pop'). + // This modifies the order of the array, as noted in {at}. + + uint256 toDeleteIndex = valueIndex - 1; + uint256 lastIndex = set._values.length - 1; + + // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs + // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement. + + bytes32 lastvalue = set._values[lastIndex]; + + // Move the last value to the index where the value to delete is + set._values[toDeleteIndex] = lastvalue; + // Update the index for the moved value + set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based + + // Delete the slot where the moved value was stored + set._values.pop(); + + // Delete the index for the deleted slot + delete set._indexes[value]; + + return true; + } else { + return false; + } + } + + /** + * @dev Returns true if the value is in the set. O(1). + */ + function _contains(Set storage set, bytes32 value) private view returns (bool) { + return set._indexes[value] != 0; + } + + /** + * @dev Returns the number of values on the set. O(1). + */ + function _length(Set storage set) private view returns (uint256) { + return set._values.length; + } + + /** + * @dev Returns the value stored at position `index` in the set. O(1). + * + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function _at(Set storage set, uint256 index) private view returns (bytes32) { + require(set._values.length > index, "EnumerableSet: index out of bounds"); + return set._values[index]; + } + + // Bytes32Set + + struct Bytes32Set { + Set _inner; + } + + /** + * @dev Add a value to a set. O(1). + * + * Returns true if the value was added to the set, that is if it was not + * already present. + */ + function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { + return _add(set._inner, value); + } + + /** + * @dev Removes a value from a set. O(1). + * + * Returns true if the value was removed from the set, that is if it was + * present. + */ + function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { + return _remove(set._inner, value); + } + + /** + * @dev Returns true if the value is in the set. O(1). + */ + function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { + return _contains(set._inner, value); + } + + /** + * @dev Returns the number of values in the set. O(1). + */ + function length(Bytes32Set storage set) internal view returns (uint256) { + return _length(set._inner); + } + + /** + * @dev Returns the value stored at position `index` in the set. O(1). + * + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { + return _at(set._inner, index); + } + + // AddressSet + + struct AddressSet { + Set _inner; + } + + /** + * @dev Add a value to a set. O(1). + * + * Returns true if the value was added to the set, that is if it was not + * already present. + */ + function add(AddressSet storage set, address value) internal returns (bool) { + return _add(set._inner, bytes32(uint256(uint160(value)))); + } + + /** + * @dev Removes a value from a set. O(1). + * + * Returns true if the value was removed from the set, that is if it was + * present. + */ + function remove(AddressSet storage set, address value) internal returns (bool) { + return _remove(set._inner, bytes32(uint256(uint160(value)))); + } + + /** + * @dev Returns true if the value is in the set. O(1). + */ + function contains(AddressSet storage set, address value) internal view returns (bool) { + return _contains(set._inner, bytes32(uint256(uint160(value)))); + } + + /** + * @dev Returns the number of values in the set. O(1). + */ + function length(AddressSet storage set) internal view returns (uint256) { + return _length(set._inner); + } + + /** + * @dev Returns the value stored at position `index` in the set. O(1). + * + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(AddressSet storage set, uint256 index) internal view returns (address) { + return address(uint160(uint256(_at(set._inner, index)))); + } + + + // UintSet + + struct UintSet { + Set _inner; + } + + /** + * @dev Add a value to a set. O(1). + * + * Returns true if the value was added to the set, that is if it was not + * already present. + */ + function add(UintSet storage set, uint256 value) internal returns (bool) { + return _add(set._inner, bytes32(value)); + } + + /** + * @dev Removes a value from a set. O(1). + * + * Returns true if the value was removed from the set, that is if it was + * present. + */ + function remove(UintSet storage set, uint256 value) internal returns (bool) { + return _remove(set._inner, bytes32(value)); + } + + /** + * @dev Returns true if the value is in the set. O(1). + */ + function contains(UintSet storage set, uint256 value) internal view returns (bool) { + return _contains(set._inner, bytes32(value)); + } + + /** + * @dev Returns the number of values on the set. O(1). + */ + function length(UintSet storage set) internal view returns (uint256) { + return _length(set._inner); + } + + /** + * @dev Returns the value stored at position `index` in the set. O(1). + * + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(UintSet storage set, uint256 index) internal view returns (uint256) { + return uint256(_at(set._inner, index)); + } +} + + +// File @openzeppelin/contracts/utils/Address.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.2 <0.8.0; + +/** + * @dev Collection of functions related to the address type + */ +library Address { + /** + * @dev Returns true if `account` is a contract. + * + * [IMPORTANT] + * ==== + * It is unsafe to assume that an address for which this function returns + * false is an externally-owned account (EOA) and not a contract. + * + * Among others, `isContract` will return false for the following + * types of addresses: + * + * - an externally-owned account + * - a contract in construction + * - an address where a contract will be created + * - an address where a contract lived, but was destroyed + * ==== + */ + function isContract(address account) internal view returns (bool) { + // This method relies on extcodesize, which returns 0 for contracts in + // construction, since the code is only stored at the end of the + // constructor execution. + + uint256 size; + // solhint-disable-next-line no-inline-assembly + assembly { size := extcodesize(account) } + return size > 0; + } + + /** + * @dev Replacement for Solidity's `transfer`: sends `amount` wei to + * `recipient`, forwarding all available gas and reverting on errors. + * + * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost + * of certain opcodes, possibly making contracts go over the 2300 gas limit + * imposed by `transfer`, making them unable to receive funds via + * `transfer`. {sendValue} removes this limitation. + * + * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. + * + * IMPORTANT: because control is transferred to `recipient`, care must be + * taken to not create reentrancy vulnerabilities. Consider using + * {ReentrancyGuard} or the + * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. + */ + function sendValue(address payable recipient, uint256 amount) internal { + require(address(this).balance >= amount, "Address: insufficient balance"); + + // solhint-disable-next-line avoid-low-level-calls, avoid-call-value + (bool success, ) = recipient.call{ value: amount }(""); + require(success, "Address: unable to send value, recipient may have reverted"); + } + + /** + * @dev Performs a Solidity function call using a low level `call`. A + * plain`call` is an unsafe replacement for a function call: use this + * function instead. + * + * If `target` reverts with a revert reason, it is bubbled up by this + * function (like regular Solidity function calls). + * + * Returns the raw returned data. To convert to the expected return value, + * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. + * + * Requirements: + * + * - `target` must be a contract. + * - calling `target` with `data` must not revert. + * + * _Available since v3.1._ + */ + function functionCall(address target, bytes memory data) internal returns (bytes memory) { + return functionCall(target, data, "Address: low-level call failed"); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with + * `errorMessage` as a fallback revert reason when `target` reverts. + * + * _Available since v3.1._ + */ + function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { + return functionCallWithValue(target, data, 0, errorMessage); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], + * but also transferring `value` wei to `target`. + * + * Requirements: + * + * - the calling contract must have an ETH balance of at least `value`. + * - the called Solidity function must be `payable`. + * + * _Available since v3.1._ + */ + function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { + return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); + } + + /** + * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but + * with `errorMessage` as a fallback revert reason when `target` reverts. + * + * _Available since v3.1._ + */ + function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { + require(address(this).balance >= value, "Address: insufficient balance for call"); + require(isContract(target), "Address: call to non-contract"); + + // solhint-disable-next-line avoid-low-level-calls + (bool success, bytes memory returndata) = target.call{ value: value }(data); + return _verifyCallResult(success, returndata, errorMessage); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], + * but performing a static call. + * + * _Available since v3.3._ + */ + function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { + return functionStaticCall(target, data, "Address: low-level static call failed"); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], + * but performing a static call. + * + * _Available since v3.3._ + */ + function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { + require(isContract(target), "Address: static call to non-contract"); + + // solhint-disable-next-line avoid-low-level-calls + (bool success, bytes memory returndata) = target.staticcall(data); + return _verifyCallResult(success, returndata, errorMessage); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], + * but performing a delegate call. + * + * _Available since v3.4._ + */ + function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { + return functionDelegateCall(target, data, "Address: low-level delegate call failed"); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], + * but performing a delegate call. + * + * _Available since v3.4._ + */ + function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { + require(isContract(target), "Address: delegate call to non-contract"); + + // solhint-disable-next-line avoid-low-level-calls + (bool success, bytes memory returndata) = target.delegatecall(data); + return _verifyCallResult(success, returndata, errorMessage); + } + + function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { + if (success) { + return returndata; + } else { + // Look for revert reason and bubble it up if present + if (returndata.length > 0) { + // The easiest way to bubble the revert reason is using memory via assembly + + // solhint-disable-next-line no-inline-assembly + assembly { + let returndata_size := mload(returndata) + revert(add(32, returndata), returndata_size) + } + } else { + revert(errorMessage); + } + } + } +} + + +// File @openzeppelin/contracts/access/AccessControl.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + + + +/** + * @dev Contract module that allows children to implement role-based access + * control mechanisms. + * + * Roles are referred to by their `bytes32` identifier. These should be exposed + * in the external API and be unique. The best way to achieve this is by + * using `public constant` hash digests: + * + * ``` + * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); + * ``` + * + * Roles can be used to represent a set of permissions. To restrict access to a + * function call, use {hasRole}: + * + * ``` + * function foo() public { + * require(hasRole(MY_ROLE, msg.sender)); + * ... + * } + * ``` + * + * Roles can be granted and revoked dynamically via the {grantRole} and + * {revokeRole} functions. Each role has an associated admin role, and only + * accounts that have a role's admin role can call {grantRole} and {revokeRole}. + * + * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means + * that only accounts with this role will be able to grant or revoke other + * roles. More complex role relationships can be created by using + * {_setRoleAdmin}. + * + * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to + * grant and revoke this role. Extra precautions should be taken to secure + * accounts that have been granted it. + */ +abstract contract AccessControl is Context { + using EnumerableSet for EnumerableSet.AddressSet; + using Address for address; + + struct RoleData { + EnumerableSet.AddressSet members; + bytes32 adminRole; + } + + mapping (bytes32 => RoleData) private _roles; + + bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; + + /** + * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` + * + * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite + * {RoleAdminChanged} not being emitted signaling this. + * + * _Available since v3.1._ + */ + event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); + + /** + * @dev Emitted when `account` is granted `role`. + * + * `sender` is the account that originated the contract call, an admin role + * bearer except when using {_setupRole}. + */ + event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); + + /** + * @dev Emitted when `account` is revoked `role`. + * + * `sender` is the account that originated the contract call: + * - if using `revokeRole`, it is the admin role bearer + * - if using `renounceRole`, it is the role bearer (i.e. `account`) + */ + event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); + + /** + * @dev Returns `true` if `account` has been granted `role`. + */ + function hasRole(bytes32 role, address account) public view returns (bool) { + return _roles[role].members.contains(account); + } + + /** + * @dev Returns the number of accounts that have `role`. Can be used + * together with {getRoleMember} to enumerate all bearers of a role. + */ + function getRoleMemberCount(bytes32 role) public view returns (uint256) { + return _roles[role].members.length(); + } + + /** + * @dev 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. + */ + function getRoleMember(bytes32 role, uint256 index) public view returns (address) { + return _roles[role].members.at(index); + } + + /** + * @dev Returns the admin role that controls `role`. See {grantRole} and + * {revokeRole}. + * + * To change a role's admin, use {_setRoleAdmin}. + */ + function getRoleAdmin(bytes32 role) public view returns (bytes32) { + return _roles[role].adminRole; + } + + /** + * @dev Grants `role` to `account`. + * + * If `account` had not been already granted `role`, emits a {RoleGranted} + * event. + * + * Requirements: + * + * - the caller must have ``role``'s admin role. + */ + function grantRole(bytes32 role, address account) public virtual { + require(hasRole(_roles[role].adminRole, _msgSender()), "AccessControl: sender must be an admin to grant"); + + _grantRole(role, account); + } + + /** + * @dev Revokes `role` from `account`. + * + * If `account` had been granted `role`, emits a {RoleRevoked} event. + * + * Requirements: + * + * - the caller must have ``role``'s admin role. + */ + function revokeRole(bytes32 role, address account) public virtual { + require(hasRole(_roles[role].adminRole, _msgSender()), "AccessControl: sender must be an admin to revoke"); + + _revokeRole(role, account); + } + + /** + * @dev Revokes `role` from the calling account. + * + * Roles are often managed via {grantRole} and {revokeRole}: this function's + * purpose is to provide a mechanism for accounts to lose their privileges + * if they are compromised (such as when a trusted device is misplaced). + * + * If the calling account had been granted `role`, emits a {RoleRevoked} + * event. + * + * Requirements: + * + * - the caller must be `account`. + */ + function renounceRole(bytes32 role, address account) public virtual { + require(account == _msgSender(), "AccessControl: can only renounce roles for self"); + + _revokeRole(role, account); + } + + /** + * @dev Grants `role` to `account`. + * + * If `account` had not been already granted `role`, emits a {RoleGranted} + * event. Note that unlike {grantRole}, this function doesn't perform any + * checks on the calling account. + * + * [WARNING] + * ==== + * This function should only be called from the constructor when setting + * up the initial roles for the system. + * + * Using this function in any other way is effectively circumventing the admin + * system imposed by {AccessControl}. + * ==== + */ + function _setupRole(bytes32 role, address account) internal virtual { + _grantRole(role, account); + } + + /** + * @dev Sets `adminRole` as ``role``'s admin role. + * + * Emits a {RoleAdminChanged} event. + */ + function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { + emit RoleAdminChanged(role, _roles[role].adminRole, adminRole); + _roles[role].adminRole = adminRole; + } + + function _grantRole(bytes32 role, address account) private { + if (_roles[role].members.add(account)) { + emit RoleGranted(role, account, _msgSender()); + } + } + + function _revokeRole(bytes32 role, address account) private { + if (_roles[role].members.remove(account)) { + emit RoleRevoked(role, account, _msgSender()); + } + } +} + + +// File @openzeppelin/contracts/utils/Counters.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + +/** + * @title Counters + * @author Matt Condon (@shrugs) + * @dev Provides counters that can only be incremented or decremented by one. This can be used e.g. to track the number + * of elements in a mapping, issuing ERC721 ids, or counting request ids. + * + * Include with `using Counters for Counters.Counter;` + * Since it is not possible to overflow a 256 bit integer with increments of one, `increment` can skip the {SafeMath} + * overflow check, thereby saving gas. This does assume however correct usage, in that the underlying `_value` is never + * directly accessed. + */ +library Counters { + using SafeMath for uint256; + + struct Counter { + // This variable should never be directly accessed by users of the library: interactions must be restricted to + // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add + // this feature: see https://github.com/ethereum/solidity/issues/4637 + uint256 _value; // default: 0 + } + + function current(Counter storage counter) internal view returns (uint256) { + return counter._value; + } + + function increment(Counter storage counter) internal { + // The {SafeMath} overflow check can be skipped here, see the comment at the top + counter._value += 1; + } + + function decrement(Counter storage counter) internal { + counter._value = counter._value.sub(1); + } +} + + +// File @openzeppelin/contracts/introspection/IERC165.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + +/** + * @dev Interface of the ERC165 standard, as defined in the + * https://eips.ethereum.org/EIPS/eip-165[EIP]. + * + * Implementers can declare support of contract interfaces, which can then be + * queried by others ({ERC165Checker}). + * + * For an implementation, see {ERC165}. + */ +interface IERC165 { + /** + * @dev Returns true if this contract implements the interface defined by + * `interfaceId`. See the corresponding + * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] + * to learn more about how these ids are created. + * + * This function call must use less than 30 000 gas. + */ + function supportsInterface(bytes4 interfaceId) external view returns (bool); +} + + +// File @openzeppelin/contracts/token/ERC721/IERC721.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.2 <0.8.0; + +/** + * @dev Required interface of an ERC721 compliant contract. + */ +interface IERC721 is IERC165 { + /** + * @dev Emitted when `tokenId` token is transferred from `from` to `to`. + */ + event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); + + /** + * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. + */ + event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); + + /** + * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. + */ + event ApprovalForAll(address indexed owner, address indexed operator, bool approved); + + /** + * @dev Returns the number of tokens in ``owner``'s account. + */ + function balanceOf(address owner) external view returns (uint256 balance); + + /** + * @dev Returns the owner of the `tokenId` token. + * + * Requirements: + * + * - `tokenId` must exist. + */ + function ownerOf(uint256 tokenId) external view returns (address owner); + + /** + * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients + * are aware of the ERC721 protocol to prevent tokens from being forever locked. + * + * Requirements: + * + * - `from` cannot be the zero address. + * - `to` cannot be the zero address. + * - `tokenId` token must exist and be owned by `from`. + * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. + * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. + * + * Emits a {Transfer} event. + */ + function safeTransferFrom(address from, address to, uint256 tokenId) external; + + /** + * @dev Transfers `tokenId` token from `from` to `to`. + * + * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. + * + * Requirements: + * + * - `from` cannot be the zero address. + * - `to` cannot be the zero address. + * - `tokenId` token must be owned by `from`. + * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. + * + * Emits a {Transfer} event. + */ + function transferFrom(address from, address to, uint256 tokenId) external; + + /** + * @dev Gives permission to `to` to transfer `tokenId` token to another account. + * The approval is cleared when the token is transferred. + * + * Only a single account can be approved at a time, so approving the zero address clears previous approvals. + * + * Requirements: + * + * - The caller must own the token or be an approved operator. + * - `tokenId` must exist. + * + * Emits an {Approval} event. + */ + function approve(address to, uint256 tokenId) external; + + /** + * @dev Returns the account approved for `tokenId` token. + * + * Requirements: + * + * - `tokenId` must exist. + */ + function getApproved(uint256 tokenId) external view returns (address operator); + + /** + * @dev Approve or remove `operator` as an operator for the caller. + * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. + * + * Requirements: + * + * - The `operator` cannot be the caller. + * + * Emits an {ApprovalForAll} event. + */ + function setApprovalForAll(address operator, bool _approved) external; + + /** + * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. + * + * See {setApprovalForAll} + */ + function isApprovedForAll(address owner, address operator) external view returns (bool); + + /** + * @dev Safely transfers `tokenId` token from `from` to `to`. + * + * Requirements: + * + * - `from` cannot be the zero address. + * - `to` cannot be the zero address. + * - `tokenId` token must exist and be owned by `from`. + * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. + * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. + * + * Emits a {Transfer} event. + */ + function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external; +} + + +// File @openzeppelin/contracts/token/ERC721/IERC721Metadata.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.2 <0.8.0; + +/** + * @title ERC-721 Non-Fungible Token Standard, optional metadata extension + * @dev See https://eips.ethereum.org/EIPS/eip-721 + */ +interface IERC721Metadata is IERC721 { + + /** + * @dev Returns the token collection name. + */ + function name() external view returns (string memory); + + /** + * @dev Returns the token collection symbol. + */ + function symbol() external view returns (string memory); + + /** + * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. + */ + function tokenURI(uint256 tokenId) external view returns (string memory); +} + + +// File @openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.2 <0.8.0; + +/** + * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension + * @dev See https://eips.ethereum.org/EIPS/eip-721 + */ +interface IERC721Enumerable is IERC721 { + + /** + * @dev Returns the total amount of tokens stored by the contract. + */ + function totalSupply() external view returns (uint256); + + /** + * @dev Returns a token ID owned by `owner` at a given `index` of its token list. + * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. + */ + function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); + + /** + * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. + * Use along with {totalSupply} to enumerate all tokens. + */ + function tokenByIndex(uint256 index) external view returns (uint256); +} + + +// File @openzeppelin/contracts/token/ERC721/IERC721Receiver.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + +/** + * @title ERC721 token receiver interface + * @dev Interface for any contract that wants to support safeTransfers + * from ERC721 asset contracts. + */ +interface IERC721Receiver { + /** + * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} + * by `operator` from `from`, this function is called. + * + * It must return its Solidity selector to confirm the token transfer. + * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. + * + * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. + */ + function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) external returns (bytes4); +} + + +// File @openzeppelin/contracts/introspection/ERC165.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + +/** + * @dev Implementation of the {IERC165} interface. + * + * Contracts may inherit from this and call {_registerInterface} to declare + * their support of an interface. + */ +abstract contract ERC165 is IERC165 { + /* + * bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7 + */ + bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7; + + /** + * @dev Mapping of interface ids to whether or not it's supported. + */ + mapping(bytes4 => bool) private _supportedInterfaces; + + constructor () internal { + // Derived contracts need only register support for their own interfaces, + // we register support for ERC165 itself here + _registerInterface(_INTERFACE_ID_ERC165); + } + + /** + * @dev See {IERC165-supportsInterface}. + * + * Time complexity O(1), guaranteed to always use less than 30 000 gas. + */ + function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { + return _supportedInterfaces[interfaceId]; + } + + /** + * @dev Registers the contract as an implementer of the interface defined by + * `interfaceId`. Support of the actual ERC165 interface is automatic and + * registering its interface id is not required. + * + * See {IERC165-supportsInterface}. + * + * Requirements: + * + * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`). + */ + function _registerInterface(bytes4 interfaceId) internal virtual { + require(interfaceId != 0xffffffff, "ERC165: invalid interface id"); + _supportedInterfaces[interfaceId] = true; + } +} + + +// File @openzeppelin/contracts/utils/EnumerableMap.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + +/** + * @dev Library for managing an enumerable variant of Solidity's + * https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`] + * type. + * + * Maps have the following properties: + * + * - Entries are added, removed, and checked for existence in constant time + * (O(1)). + * - Entries are enumerated in O(n). No guarantees are made on the ordering. + * + * ``` + * contract Example { + * // Add the library methods + * using EnumerableMap for EnumerableMap.UintToAddressMap; + * + * // Declare a set state variable + * EnumerableMap.UintToAddressMap private myMap; + * } + * ``` + * + * As of v3.0.0, only maps of type `uint256 -> address` (`UintToAddressMap`) are + * supported. + */ +library EnumerableMap { + // To implement this library for multiple types with as little code + // repetition as possible, we write it in terms of a generic Map type with + // bytes32 keys and values. + // The Map implementation uses private functions, and user-facing + // implementations (such as Uint256ToAddressMap) are just wrappers around + // the underlying Map. + // This means that we can only create new EnumerableMaps for types that fit + // in bytes32. + + struct MapEntry { + bytes32 _key; + bytes32 _value; + } + + struct Map { + // Storage of map keys and values + MapEntry[] _entries; + + // Position of the entry defined by a key in the `entries` array, plus 1 + // because index 0 means a key is not in the map. + mapping (bytes32 => uint256) _indexes; + } + + /** + * @dev Adds a key-value pair to a map, or updates the value for an existing + * key. O(1). + * + * Returns true if the key was added to the map, that is if it was not + * already present. + */ + function _set(Map storage map, bytes32 key, bytes32 value) private returns (bool) { + // We read and store the key's index to prevent multiple reads from the same storage slot + uint256 keyIndex = map._indexes[key]; + + if (keyIndex == 0) { // Equivalent to !contains(map, key) + map._entries.push(MapEntry({ _key: key, _value: value })); + // The entry is stored at length-1, but we add 1 to all indexes + // and use 0 as a sentinel value + map._indexes[key] = map._entries.length; + return true; + } else { + map._entries[keyIndex - 1]._value = value; + return false; + } + } + + /** + * @dev Removes a key-value pair from a map. O(1). + * + * Returns true if the key was removed from the map, that is if it was present. + */ + function _remove(Map storage map, bytes32 key) private returns (bool) { + // We read and store the key's index to prevent multiple reads from the same storage slot + uint256 keyIndex = map._indexes[key]; + + if (keyIndex != 0) { // Equivalent to contains(map, key) + // To delete a key-value pair from the _entries array in O(1), we swap the entry to delete with the last one + // in the array, and then remove the last entry (sometimes called as 'swap and pop'). + // This modifies the order of the array, as noted in {at}. + + uint256 toDeleteIndex = keyIndex - 1; + uint256 lastIndex = map._entries.length - 1; + + // When the entry to delete is the last one, the swap operation is unnecessary. However, since this occurs + // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement. + + MapEntry storage lastEntry = map._entries[lastIndex]; + + // Move the last entry to the index where the entry to delete is + map._entries[toDeleteIndex] = lastEntry; + // Update the index for the moved entry + map._indexes[lastEntry._key] = toDeleteIndex + 1; // All indexes are 1-based + + // Delete the slot where the moved entry was stored + map._entries.pop(); + + // Delete the index for the deleted slot + delete map._indexes[key]; + + return true; + } else { + return false; + } + } + + /** + * @dev Returns true if the key is in the map. O(1). + */ + function _contains(Map storage map, bytes32 key) private view returns (bool) { + return map._indexes[key] != 0; + } + + /** + * @dev Returns the number of key-value pairs in the map. O(1). + */ + function _length(Map storage map) private view returns (uint256) { + return map._entries.length; + } + + /** + * @dev Returns the key-value pair stored at position `index` in the map. O(1). + * + * Note that there are no guarantees on the ordering of entries inside the + * array, and it may change when more entries are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function _at(Map storage map, uint256 index) private view returns (bytes32, bytes32) { + require(map._entries.length > index, "EnumerableMap: index out of bounds"); + + MapEntry storage entry = map._entries[index]; + return (entry._key, entry._value); + } + + /** + * @dev Tries to returns the value associated with `key`. O(1). + * Does not revert if `key` is not in the map. + */ + function _tryGet(Map storage map, bytes32 key) private view returns (bool, bytes32) { + uint256 keyIndex = map._indexes[key]; + if (keyIndex == 0) return (false, 0); // Equivalent to contains(map, key) + return (true, map._entries[keyIndex - 1]._value); // All indexes are 1-based + } + + /** + * @dev Returns the value associated with `key`. O(1). + * + * Requirements: + * + * - `key` must be in the map. + */ + function _get(Map storage map, bytes32 key) private view returns (bytes32) { + uint256 keyIndex = map._indexes[key]; + require(keyIndex != 0, "EnumerableMap: nonexistent key"); // Equivalent to contains(map, key) + return map._entries[keyIndex - 1]._value; // All indexes are 1-based + } + + /** + * @dev Same as {_get}, with a custom error message when `key` is not in the map. + * + * CAUTION: This function is deprecated because it requires allocating memory for the error + * message unnecessarily. For custom revert reasons use {_tryGet}. + */ + function _get(Map storage map, bytes32 key, string memory errorMessage) private view returns (bytes32) { + uint256 keyIndex = map._indexes[key]; + require(keyIndex != 0, errorMessage); // Equivalent to contains(map, key) + return map._entries[keyIndex - 1]._value; // All indexes are 1-based + } + + // UintToAddressMap + + struct UintToAddressMap { + Map _inner; + } + + /** + * @dev Adds a key-value pair to a map, or updates the value for an existing + * key. O(1). + * + * Returns true if the key was added to the map, that is if it was not + * already present. + */ + function set(UintToAddressMap storage map, uint256 key, address value) internal returns (bool) { + return _set(map._inner, bytes32(key), bytes32(uint256(uint160(value)))); + } + + /** + * @dev Removes a value from a set. O(1). + * + * Returns true if the key was removed from the map, that is if it was present. + */ + function remove(UintToAddressMap storage map, uint256 key) internal returns (bool) { + return _remove(map._inner, bytes32(key)); + } + + /** + * @dev Returns true if the key is in the map. O(1). + */ + function contains(UintToAddressMap storage map, uint256 key) internal view returns (bool) { + return _contains(map._inner, bytes32(key)); + } + + /** + * @dev Returns the number of elements in the map. O(1). + */ + function length(UintToAddressMap storage map) internal view returns (uint256) { + return _length(map._inner); + } + + /** + * @dev Returns the element stored at position `index` in the set. O(1). + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(UintToAddressMap storage map, uint256 index) internal view returns (uint256, address) { + (bytes32 key, bytes32 value) = _at(map._inner, index); + return (uint256(key), address(uint160(uint256(value)))); + } + + /** + * @dev Tries to returns the value associated with `key`. O(1). + * Does not revert if `key` is not in the map. + * + * _Available since v3.4._ + */ + function tryGet(UintToAddressMap storage map, uint256 key) internal view returns (bool, address) { + (bool success, bytes32 value) = _tryGet(map._inner, bytes32(key)); + return (success, address(uint160(uint256(value)))); + } + + /** + * @dev Returns the value associated with `key`. O(1). + * + * Requirements: + * + * - `key` must be in the map. + */ + function get(UintToAddressMap storage map, uint256 key) internal view returns (address) { + return address(uint160(uint256(_get(map._inner, bytes32(key))))); + } + + /** + * @dev Same as {get}, with a custom error message when `key` is not in the map. + * + * CAUTION: This function is deprecated because it requires allocating memory for the error + * message unnecessarily. For custom revert reasons use {tryGet}. + */ + function get(UintToAddressMap storage map, uint256 key, string memory errorMessage) internal view returns (address) { + return address(uint160(uint256(_get(map._inner, bytes32(key), errorMessage)))); + } +} + + +// File @openzeppelin/contracts/utils/Strings.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + +/** + * @dev String operations. + */ +library Strings { + /** + * @dev Converts a `uint256` to its ASCII `string` representation. + */ + function toString(uint256 value) internal pure returns (string memory) { + // Inspired by OraclizeAPI's implementation - MIT licence + // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol + + if (value == 0) { + return "0"; + } + uint256 temp = value; + uint256 digits; + while (temp != 0) { + digits++; + temp /= 10; + } + bytes memory buffer = new bytes(digits); + uint256 index = digits - 1; + temp = value; + while (temp != 0) { + buffer[index--] = bytes1(uint8(48 + temp % 10)); + temp /= 10; + } + return string(buffer); + } +} + + +// File @openzeppelin/contracts/token/ERC721/ERC721.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + + + + + + + + + + + +/** + * @title ERC721 Non-Fungible Token Standard basic implementation + * @dev see https://eips.ethereum.org/EIPS/eip-721 + */ +contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { + using SafeMath for uint256; + using Address for address; + using EnumerableSet for EnumerableSet.UintSet; + using EnumerableMap for EnumerableMap.UintToAddressMap; + using Strings for uint256; + + // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` + // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector` + bytes4 private constant _ERC721_RECEIVED = 0x150b7a02; + + // Mapping from holder address to their (enumerable) set of owned tokens + mapping (address => EnumerableSet.UintSet) private _holderTokens; + + // Enumerable mapping from token ids to their owners + EnumerableMap.UintToAddressMap private _tokenOwners; + + // Mapping from token ID to approved address + mapping (uint256 => address) private _tokenApprovals; + + // Mapping from owner to operator approvals + mapping (address => mapping (address => bool)) private _operatorApprovals; + + // Token name + string private _name; + + // Token symbol + string private _symbol; + + // Optional mapping for token URIs + mapping (uint256 => string) private _tokenURIs; + + // Base URI + string private _baseURI; + + /* + * bytes4(keccak256('balanceOf(address)')) == 0x70a08231 + * bytes4(keccak256('ownerOf(uint256)')) == 0x6352211e + * bytes4(keccak256('approve(address,uint256)')) == 0x095ea7b3 + * bytes4(keccak256('getApproved(uint256)')) == 0x081812fc + * bytes4(keccak256('setApprovalForAll(address,bool)')) == 0xa22cb465 + * bytes4(keccak256('isApprovedForAll(address,address)')) == 0xe985e9c5 + * bytes4(keccak256('transferFrom(address,address,uint256)')) == 0x23b872dd + * bytes4(keccak256('safeTransferFrom(address,address,uint256)')) == 0x42842e0e + * bytes4(keccak256('safeTransferFrom(address,address,uint256,bytes)')) == 0xb88d4fde + * + * => 0x70a08231 ^ 0x6352211e ^ 0x095ea7b3 ^ 0x081812fc ^ + * 0xa22cb465 ^ 0xe985e9c5 ^ 0x23b872dd ^ 0x42842e0e ^ 0xb88d4fde == 0x80ac58cd + */ + bytes4 private constant _INTERFACE_ID_ERC721 = 0x80ac58cd; + + /* + * bytes4(keccak256('name()')) == 0x06fdde03 + * bytes4(keccak256('symbol()')) == 0x95d89b41 + * bytes4(keccak256('tokenURI(uint256)')) == 0xc87b56dd + * + * => 0x06fdde03 ^ 0x95d89b41 ^ 0xc87b56dd == 0x5b5e139f + */ + bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x5b5e139f; + + /* + * bytes4(keccak256('totalSupply()')) == 0x18160ddd + * bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) == 0x2f745c59 + * bytes4(keccak256('tokenByIndex(uint256)')) == 0x4f6ccce7 + * + * => 0x18160ddd ^ 0x2f745c59 ^ 0x4f6ccce7 == 0x780e9d63 + */ + bytes4 private constant _INTERFACE_ID_ERC721_ENUMERABLE = 0x780e9d63; + + /** + * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. + */ + constructor (string memory name_, string memory symbol_) public { + _name = name_; + _symbol = symbol_; + + // register the supported interfaces to conform to ERC721 via ERC165 + _registerInterface(_INTERFACE_ID_ERC721); + _registerInterface(_INTERFACE_ID_ERC721_METADATA); + _registerInterface(_INTERFACE_ID_ERC721_ENUMERABLE); + } + + /** + * @dev See {IERC721-balanceOf}. + */ + function balanceOf(address owner) public view virtual override returns (uint256) { + require(owner != address(0), "ERC721: balance query for the zero address"); + return _holderTokens[owner].length(); + } + + /** + * @dev See {IERC721-ownerOf}. + */ + function ownerOf(uint256 tokenId) public view virtual override returns (address) { + return _tokenOwners.get(tokenId, "ERC721: owner query for nonexistent token"); + } + + /** + * @dev See {IERC721Metadata-name}. + */ + function name() public view virtual override returns (string memory) { + return _name; + } + + /** + * @dev See {IERC721Metadata-symbol}. + */ + function symbol() public view virtual override returns (string memory) { + return _symbol; + } + + /** + * @dev See {IERC721Metadata-tokenURI}. + */ + function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { + require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); + + string memory _tokenURI = _tokenURIs[tokenId]; + string memory base = baseURI(); + + // If there is no base URI, return the token URI. + if (bytes(base).length == 0) { + return _tokenURI; + } + // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked). + if (bytes(_tokenURI).length > 0) { + return string(abi.encodePacked(base, _tokenURI)); + } + // If there is a baseURI but no tokenURI, concatenate the tokenID to the baseURI. + return string(abi.encodePacked(base, tokenId.toString())); + } + + /** + * @dev Returns the base URI set via {_setBaseURI}. This will be + * automatically added as a prefix in {tokenURI} to each token's URI, or + * to the token ID if no specific URI is set for that token ID. + */ + function baseURI() public view virtual returns (string memory) { + return _baseURI; + } + + /** + * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. + */ + function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { + return _holderTokens[owner].at(index); + } + + /** + * @dev See {IERC721Enumerable-totalSupply}. + */ + function totalSupply() public view virtual override returns (uint256) { + // _tokenOwners are indexed by tokenIds, so .length() returns the number of tokenIds + return _tokenOwners.length(); + } + + /** + * @dev See {IERC721Enumerable-tokenByIndex}. + */ + function tokenByIndex(uint256 index) public view virtual override returns (uint256) { + (uint256 tokenId, ) = _tokenOwners.at(index); + return tokenId; + } + + /** + * @dev See {IERC721-approve}. + */ + function approve(address to, uint256 tokenId) public virtual override { + address owner = ERC721.ownerOf(tokenId); + require(to != owner, "ERC721: approval to current owner"); + + require(_msgSender() == owner || ERC721.isApprovedForAll(owner, _msgSender()), + "ERC721: approve caller is not owner nor approved for all" + ); + + _approve(to, tokenId); + } + + /** + * @dev See {IERC721-getApproved}. + */ + function getApproved(uint256 tokenId) public view virtual override returns (address) { + require(_exists(tokenId), "ERC721: approved query for nonexistent token"); + + return _tokenApprovals[tokenId]; + } + + /** + * @dev See {IERC721-setApprovalForAll}. + */ + function setApprovalForAll(address operator, bool approved) public virtual override { + require(operator != _msgSender(), "ERC721: approve to caller"); + + _operatorApprovals[_msgSender()][operator] = approved; + emit ApprovalForAll(_msgSender(), operator, approved); + } + + /** + * @dev See {IERC721-isApprovedForAll}. + */ + function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { + return _operatorApprovals[owner][operator]; + } + + /** + * @dev See {IERC721-transferFrom}. + */ + function transferFrom(address from, address to, uint256 tokenId) public virtual override { + //solhint-disable-next-line max-line-length + require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); + + _transfer(from, to, tokenId); + } + + /** + * @dev See {IERC721-safeTransferFrom}. + */ + function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override { + safeTransferFrom(from, to, tokenId, ""); + } + + /** + * @dev See {IERC721-safeTransferFrom}. + */ + function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public virtual override { + require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); + _safeTransfer(from, to, tokenId, _data); + } + + /** + * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients + * are aware of the ERC721 protocol to prevent tokens from being forever locked. + * + * `_data` is additional data, it has no specified format and it is sent in call to `to`. + * + * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. + * implement alternative mechanisms to perform token transfer, such as signature-based. + * + * Requirements: + * + * - `from` cannot be the zero address. + * - `to` cannot be the zero address. + * - `tokenId` token must exist and be owned by `from`. + * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. + * + * Emits a {Transfer} event. + */ + function _safeTransfer(address from, address to, uint256 tokenId, bytes memory _data) internal virtual { + _transfer(from, to, tokenId); + require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); + } + + /** + * @dev Returns whether `tokenId` exists. + * + * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. + * + * Tokens start existing when they are minted (`_mint`), + * and stop existing when they are burned (`_burn`). + */ + function _exists(uint256 tokenId) internal view virtual returns (bool) { + return _tokenOwners.contains(tokenId); + } + + /** + * @dev Returns whether `spender` is allowed to manage `tokenId`. + * + * Requirements: + * + * - `tokenId` must exist. + */ + function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { + require(_exists(tokenId), "ERC721: operator query for nonexistent token"); + address owner = ERC721.ownerOf(tokenId); + return (spender == owner || getApproved(tokenId) == spender || ERC721.isApprovedForAll(owner, spender)); + } + + /** + * @dev Safely mints `tokenId` and transfers it to `to`. + * + * Requirements: + d* + * - `tokenId` must not exist. + * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. + * + * Emits a {Transfer} event. + */ + function _safeMint(address to, uint256 tokenId) internal virtual { + _safeMint(to, tokenId, ""); + } + + /** + * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is + * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. + */ + function _safeMint(address to, uint256 tokenId, bytes memory _data) internal virtual { + _mint(to, tokenId); + require(_checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); + } + + /** + * @dev Mints `tokenId` and transfers it to `to`. + * + * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible + * + * Requirements: + * + * - `tokenId` must not exist. + * - `to` cannot be the zero address. + * + * Emits a {Transfer} event. + */ + function _mint(address to, uint256 tokenId) internal virtual { + require(to != address(0), "ERC721: mint to the zero address"); + require(!_exists(tokenId), "ERC721: token already minted"); + + _beforeTokenTransfer(address(0), to, tokenId); + + _holderTokens[to].add(tokenId); + + _tokenOwners.set(tokenId, to); + + emit Transfer(address(0), to, tokenId); + } + + /** + * @dev Destroys `tokenId`. + * The approval is cleared when the token is burned. + * + * Requirements: + * + * - `tokenId` must exist. + * + * Emits a {Transfer} event. + */ + function _burn(uint256 tokenId) internal virtual { + address owner = ERC721.ownerOf(tokenId); // internal owner + + _beforeTokenTransfer(owner, address(0), tokenId); + + // Clear approvals + _approve(address(0), tokenId); + + // Clear metadata (if any) + if (bytes(_tokenURIs[tokenId]).length != 0) { + delete _tokenURIs[tokenId]; + } + + _holderTokens[owner].remove(tokenId); + + _tokenOwners.remove(tokenId); + + emit Transfer(owner, address(0), tokenId); + } + + /** + * @dev Transfers `tokenId` from `from` to `to`. + * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. + * + * Requirements: + * + * - `to` cannot be the zero address. + * - `tokenId` token must be owned by `from`. + * + * Emits a {Transfer} event. + */ + function _transfer(address from, address to, uint256 tokenId) internal virtual { + require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); // internal owner + require(to != address(0), "ERC721: transfer to the zero address"); + + _beforeTokenTransfer(from, to, tokenId); + + // Clear approvals from the previous owner + _approve(address(0), tokenId); + + _holderTokens[from].remove(tokenId); + _holderTokens[to].add(tokenId); + + _tokenOwners.set(tokenId, to); + + emit Transfer(from, to, tokenId); + } + + /** + * @dev Sets `_tokenURI` as the tokenURI of `tokenId`. + * + * Requirements: + * + * - `tokenId` must exist. + */ + function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual { + require(_exists(tokenId), "ERC721Metadata: URI set of nonexistent token"); + _tokenURIs[tokenId] = _tokenURI; + } + + /** + * @dev Internal function to set the base URI for all token IDs. It is + * automatically added as a prefix to the value returned in {tokenURI}, + * or to the token ID if {tokenURI} is empty. + */ + function _setBaseURI(string memory baseURI_) internal virtual { + _baseURI = baseURI_; + } + + /** + * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. + * The call is not executed if the target address is not a contract. + * + * @param from address representing the previous owner of the given token ID + * @param to target address that will receive the tokens + * @param tokenId uint256 ID of the token to be transferred + * @param _data bytes optional data to send along with the call + * @return bool whether the call correctly returned the expected magic value + */ + function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory _data) + private returns (bool) + { + if (!to.isContract()) { + return true; + } + bytes memory returndata = to.functionCall(abi.encodeWithSelector( + IERC721Receiver(to).onERC721Received.selector, + _msgSender(), + from, + tokenId, + _data + ), "ERC721: transfer to non ERC721Receiver implementer"); + bytes4 retval = abi.decode(returndata, (bytes4)); + return (retval == _ERC721_RECEIVED); + } + + /** + * @dev Approve `to` to operate on `tokenId` + * + * Emits an {Approval} event. + */ + function _approve(address to, uint256 tokenId) internal virtual { + _tokenApprovals[tokenId] = to; + emit Approval(ERC721.ownerOf(tokenId), to, tokenId); // internal owner + } + + /** + * @dev Hook that is called before any token transfer. This includes minting + * and burning. + * + * Calling conditions: + * + * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be + * transferred to `to`. + * - When `from` is zero, `tokenId` will be minted for `to`. + * - When `to` is zero, ``from``'s `tokenId` will be burned. + * - `from` cannot be the zero address. + * - `to` cannot be the zero address. + * + * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. + */ + function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual { } +} + + +// File @openzeppelin/contracts/token/ERC721/ERC721Burnable.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + + +/** + * @title ERC721 Burnable Token + * @dev ERC721 Token that can be irreversibly burned (destroyed). + */ +abstract contract ERC721Burnable is Context, ERC721 { + /** + * @dev Burns `tokenId`. See {ERC721-_burn}. + * + * Requirements: + * + * - The caller must own `tokenId` or be an approved operator. + */ + function burn(uint256 tokenId) public virtual { + //solhint-disable-next-line max-line-length + require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721Burnable: caller is not owner nor approved"); + _burn(tokenId); + } +} + + +// File @openzeppelin/contracts/utils/Pausable.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + +/** + * @dev Contract module which allows children to implement an emergency stop + * mechanism that can be triggered by an authorized account. + * + * This module is used through inheritance. It will make available the + * modifiers `whenNotPaused` and `whenPaused`, which can be applied to + * the functions of your contract. Note that they will not be pausable by + * simply including this module, only once the modifiers are put in place. + */ +abstract contract Pausable is Context { + /** + * @dev Emitted when the pause is triggered by `account`. + */ + event Paused(address account); + + /** + * @dev Emitted when the pause is lifted by `account`. + */ + event Unpaused(address account); + + bool private _paused; + + /** + * @dev Initializes the contract in unpaused state. + */ + constructor () internal { + _paused = false; + } + + /** + * @dev Returns true if the contract is paused, and false otherwise. + */ + function paused() public view virtual returns (bool) { + return _paused; + } + + /** + * @dev Modifier to make a function callable only when the contract is not paused. + * + * Requirements: + * + * - The contract must not be paused. + */ + modifier whenNotPaused() { + require(!paused(), "Pausable: paused"); + _; + } + + /** + * @dev Modifier to make a function callable only when the contract is paused. + * + * Requirements: + * + * - The contract must be paused. + */ + modifier whenPaused() { + require(paused(), "Pausable: not paused"); + _; + } + + /** + * @dev Triggers stopped state. + * + * Requirements: + * + * - The contract must not be paused. + */ + function _pause() internal virtual whenNotPaused { + _paused = true; + emit Paused(_msgSender()); + } + + /** + * @dev Returns to normal state. + * + * Requirements: + * + * - The contract must be paused. + */ + function _unpause() internal virtual whenPaused { + _paused = false; + emit Unpaused(_msgSender()); + } +} + + +// File @openzeppelin/contracts/token/ERC721/ERC721Pausable.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + + +/** + * @dev ERC721 token with pausable token transfers, minting and burning. + * + * Useful for scenarios such as preventing trades until the end of an evaluation + * period, or having an emergency switch for freezing all token transfers in the + * event of a large bug. + */ +abstract contract ERC721Pausable is ERC721, Pausable { + /** + * @dev See {ERC721-_beforeTokenTransfer}. + * + * Requirements: + * + * - the contract must not be paused. + */ + function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override { + super._beforeTokenTransfer(from, to, tokenId); + + require(!paused(), "ERC721Pausable: token transfer while paused"); + } +} + + +// File @openzeppelin/contracts/presets/ERC721PresetMinterPauserAutoId.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + + + + + + +/** + * @dev {ERC721} token, including: + * + * - ability for holders to burn (destroy) their tokens + * - a minter role that allows for token minting (creation) + * - a pauser role that allows to stop all token transfers + * - token ID and URI autogeneration + * + * This contract uses {AccessControl} to lock permissioned functions using the + * different roles - head to its documentation for details. + * + * The account that deploys the contract will be granted the minter and pauser + * roles, as well as the default admin role, which will let it grant both minter + * and pauser roles to other accounts. + */ +contract ERC721PresetMinterPauserAutoId is Context, AccessControl, ERC721Burnable, ERC721Pausable { + using Counters for Counters.Counter; + + bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); + bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); + + Counters.Counter private _tokenIdTracker; + + /** + * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE` and `PAUSER_ROLE` to the + * account that deploys the contract. + * + * Token URIs will be autogenerated based on `baseURI` and their token IDs. + * See {ERC721-tokenURI}. + */ + constructor(string memory name, string memory symbol, string memory baseURI) public ERC721(name, symbol) { + _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); + + _setupRole(MINTER_ROLE, _msgSender()); + _setupRole(PAUSER_ROLE, _msgSender()); + + _setBaseURI(baseURI); + } + + /** + * @dev Creates a new token for `to`. Its token ID will be automatically + * assigned (and available on the emitted {IERC721-Transfer} event), and the token + * URI autogenerated based on the base URI passed at construction. + * + * See {ERC721-_mint}. + * + * Requirements: + * + * - the caller must have the `MINTER_ROLE`. + */ + function mint(address to) public virtual { + require(hasRole(MINTER_ROLE, _msgSender()), "ERC721PresetMinterPauserAutoId: must have minter role to mint"); + + // We cannot just use balanceOf to create the new tokenId because tokens + // can be burned (destroyed), so we need a separate counter. + _mint(to, _tokenIdTracker.current()); + _tokenIdTracker.increment(); + } + + /** + * @dev Pauses all token transfers. + * + * See {ERC721Pausable} and {Pausable-_pause}. + * + * Requirements: + * + * - the caller must have the `PAUSER_ROLE`. + */ + function pause() public virtual { + require(hasRole(PAUSER_ROLE, _msgSender()), "ERC721PresetMinterPauserAutoId: must have pauser role to pause"); + _pause(); + } + + /** + * @dev Unpauses all token transfers. + * + * See {ERC721Pausable} and {Pausable-_unpause}. + * + * Requirements: + * + * - the caller must have the `PAUSER_ROLE`. + */ + function unpause() public virtual { + require(hasRole(PAUSER_ROLE, _msgSender()), "ERC721PresetMinterPauserAutoId: must have pauser role to unpause"); + _unpause(); + } + + function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override(ERC721, ERC721Pausable) { + super._beforeTokenTransfer(from, to, tokenId); + } +} + + +// File contracts/Libraries/CurrentTime.sol + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.6 <0.9.0; + +contract CurrentTime { + function currentTime() internal view virtual returns (uint256) { + return block.timestamp; + } +} + + +// File contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol + +// SPDX-License-Identifier: MIT + +// NB: this is only meant to deploy to goerli, where chainlink VRF is unavailable. +// goerli connects to polygon mumbai, which is what we need to test PoS bridging. +// Deploy scripts prevent other contracts from goerli deploy, and this contract from +// anything other than goerlui +pragma solidity >=0.6.6 <0.9.0; + + + + + +contract CryptOrchidGoerli is ERC721PresetMinterPauserAutoId, Ownable, CurrentTime { + using SafeMath for uint256; + using Strings for string; + using Counters for Counters.Counter; + + struct CryptOrchid { + string species; + uint256 plantedAt; + uint256 waterLevel; + } + mapping(uint256 => CryptOrchid) public cryptorchids; + + enum Stage {Unsold, Seed, Flower, Dead} + + bool internal saleStarted = false; + bool internal growingStarted = false; + + uint256 public constant MAX_CRYPTORCHIDS = 10000; + uint256 public constant GROWTH_CYCLE = 604800; // 7 days + uint256 public constant WATERING_WINDOW = 10800; // 3 hours + uint256 internal constant MAX_TIMESTAMP = 2**256 - 1; + string internal constant GRANUM_IPFS = "QmWd1mn7DuGyx9ByfNeqCsgdSUsJZ1cragitgaygsqDvEm"; + + uint16[10] private limits = [0, 3074, 6074, 8074, 9074, 9574, 9824, 9924, 9974, 9999]; + string[10] private genum = [ + "shenzhenica orchidaceae", + "phalaenopsis micholitzii", + "guarianthe aurantiaca", + "vanda coerulea", + "cypripedium calceolus", + "paphiopedilum vietnamense", + "miltonia kayasimae", + "platanthera azorica", + "dendrophylax lindenii", + "paphiopedilum rothschildianum" + ]; + + string[10] private speciesIPFSConstant = [ + "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/shenzhenica-orchidaceae.json", + "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/phalaenopsis-micholitzii.json", + "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/guarianthe-aurantiaca.json", + "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/vanda-coerulea.json", + "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/cypripedium-calceolus.json", + "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/paphiopedilum-vietnamense.json", + "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/miltonia-kayasimae.json", + "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/platanthera-azorica.json", + "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/dendrophylax-lindenii.json", + "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/paphiopedilum-rothschildianum.json" + ]; + + string[10] private deadSpeciesIPFSConstant = [ + "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/shenzhenica-orchidaceae.json", + "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/phalaenopsis-micholitzii.json", + "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/guarianthe-aurantiaca.json", + "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/vanda-coerulea.json", + "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/cypripedium-calceolus.json", + "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/paphiopedilum-vietnamense.json", + "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/miltonia-kayasimae.json", + "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/platanthera-azorica.json", + "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/dendrophylax-lindenii.json", + "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/paphiopedilum-rothschildianum.json" + ]; + + Counters.Counter private _tokenIds; + + mapping(bytes32 => uint256) public requestToToken; + mapping(bytes32 => string) private speciesIPFS; + mapping(bytes32 => string) private deadSpeciesIPFS; + + constructor() public payable ERC721PresetMinterPauserAutoId("CryptOrchids", "ORCHD", "ipfs://") { + for (uint256 index = 0; index < genum.length; index++) { + speciesIPFS[keccak256(abi.encode(genum[index]))] = speciesIPFSConstant[index]; + deadSpeciesIPFS[keccak256(abi.encode(genum[index]))] = deadSpeciesIPFSConstant[index]; + } + } + + function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { + (string memory species, , , ) = getTokenMetadata(tokenId); + + if (growthStage(tokenId) == Stage.Seed) { + return string(abi.encodePacked(baseURI(), GRANUM_IPFS)); + } + + if (growthStage(tokenId) == Stage.Flower) { + return string(abi.encodePacked(baseURI(), speciesIPFS[keccak256(abi.encode(species))])); + } + + return string(abi.encodePacked(baseURI(), deadSpeciesIPFS[keccak256(abi.encode(species))])); + } + + function _beforeTokenTransfer( + address from, + address to, + uint256 tokenId + ) internal virtual override { + require(address(0) == to || alive(tokenId), "Dead CryptOrchids cannot be transferred"); + super._beforeTokenTransfer(from, to, tokenId); + } + + function currentPrice() public view returns (uint256 price) { + uint256 currentSupply = totalSupply(); + if (currentSupply >= 9900) { + return 1000000000000000000; // 9900+: 1.00 ETH + } else if (currentSupply >= 9500) { + return 640000000000000000; // 9500-9500: 0.64 ETH + } else if (currentSupply >= 7500) { + return 320000000000000000; // 7500-9500: 0.32 ETH + } else if (currentSupply >= 3500) { + return 160000000000000000; // 3500-7500: 0.16 ETH + } else if (currentSupply >= 1500) { + return 80000000000000000; // 1500-3500: 0.08 ETH + } else if (currentSupply >= 500) { + return 60000000000000000; // 500-1500: 0.06 ETH + } else { + return 40000000000000000; // 0 - 500 0.04 ETH + } + } + + function startSale() public onlyOwner { + saleStarted = true; + } + + function startGrowing() public onlyOwner { + growingStarted = true; + } + + /** + * @dev Withdraw ether from this contract (Callable by owner only) + */ + function withdraw() public onlyOwner { + uint256 balance = address(this).balance; + msg.sender.transfer(balance); + } + + receive() external payable {} + + function webMint(uint256 units) public payable { + require(saleStarted, "The Nursery is closed"); + require(units <= MAX_CRYPTORCHIDS - totalSupply(), "Not enough bulbs left"); + require(totalSupply() < MAX_CRYPTORCHIDS, "Sale has already ended"); + require(units > 0 && units <= 20, "You can plant minimum 1, maximum 20 CryptOrchids"); + require(SafeMath.add(totalSupply(), units) <= MAX_CRYPTORCHIDS, "Exceeds MAX_CRYPTORCHIDS"); + require(msg.value >= SafeMath.mul(currentPrice(), units), "Ether value sent is below the price"); + + for (uint256 i = 0; i < units; i++) { + _tokenIds.increment(); + uint256 newItemId = _tokenIds.current(); + cryptorchids[newItemId] = CryptOrchid({species: "granum", plantedAt: MAX_TIMESTAMP, waterLevel: 0}); + _safeMint(msg.sender, newItemId); + } + } + + function germinate(uint256 tokenId, uint256 userProvidedSeed) public { + require(growingStarted, "Germination starts 2021-04-12T16:00:00Z"); + require(_isApprovedOrOwner(_msgSender(), tokenId), "Only the Owner can germinate a CryptOrchid."); + _requestRandom(tokenId, userProvidedSeed); + } + + function _requestRandom(uint256 tokenId, uint256 userProvidedSeed) internal returns (bytes32 requestId) { + uint256 pseudoRand = uint256(keccak256(abi.encodePacked(block.timestamp, block.difficulty, userProvidedSeed))); + fulfillRandomness(tokenId, pseudoRand); + } + + function fulfillRandomness(uint256 tokenId, uint256 randomness) internal { + CryptOrchid storage orchid = cryptorchids[tokenId]; + string memory species = pickSpecies(SafeMath.mod(randomness, 10000)); + orchid.species = species; + orchid.plantedAt = currentTime(); + address tokenOwner = ownerOf(tokenId); + } + + function alive(uint256 tokenId) public view returns (bool) { + return growthStage(tokenId) != Stage.Dead; + } + + function flowering(uint256 tokenId) public view returns (bool) { + return growthStage(tokenId) == Stage.Flower; + } + + function growthStage(uint256 tokenId) public view returns (Stage) { + CryptOrchid memory orchid = cryptorchids[tokenId]; + if (orchid.plantedAt == 0) return Stage.Unsold; + if (orchid.plantedAt == MAX_TIMESTAMP) return Stage.Seed; + uint256 currentWaterLevel = orchid.waterLevel; + uint256 elapsed = currentTime() - orchid.plantedAt; + uint256 fullCycles = SafeMath.div(uint256(elapsed), GROWTH_CYCLE); + uint256 modulo = SafeMath.mod(elapsed, GROWTH_CYCLE); + + if (currentWaterLevel == fullCycles) { + return Stage.Flower; + } + + if (SafeMath.add(currentWaterLevel, 1) == fullCycles && modulo < WATERING_WINDOW) { + return Stage.Flower; + } + + return Stage.Dead; + } + + function water(uint256 tokenId) public { + require(_isApprovedOrOwner(_msgSender(), tokenId), "Only the Owner can water a CryptOrchid."); + + if (!alive(tokenId)) { + return; + } + + CryptOrchid storage orchid = cryptorchids[tokenId]; + + uint256 wateringLevel = orchid.waterLevel; + uint256 elapsed = currentTime() - orchid.plantedAt; + uint256 fullCycles = SafeMath.div(uint256(elapsed), GROWTH_CYCLE); + + if (wateringLevel > fullCycles) { + return; + } + + uint256 newWaterLevel = SafeMath.add(wateringLevel, 1); + orchid.waterLevel = newWaterLevel; + } + + function getTokenMetadata(uint256 tokenId) + public + view + returns ( + string memory, + uint256, + uint256, + Stage + ) + { + return ( + cryptorchids[tokenId].species, + cryptorchids[tokenId].plantedAt, + cryptorchids[tokenId].waterLevel, + growthStage(tokenId) + ); + } + + /** + * @notice Pick species for random number index + * @param randomIndex uint256 + * @return species string + */ + function pickSpecies(uint256 randomIndex) private view returns (string memory) { + for (uint256 i = 0; i < 10; i++) { + if (randomIndex <= limits[i]) { + return genum[i]; + } + } + } +} + + +// File contracts/Libraries/matic/common/AccessControlMixin.sol + +pragma solidity 0.6.6; + +contract AccessControlMixin is AccessControl { + string private _revertMsg; + function _setupContractId(string memory contractId) internal { + _revertMsg = string(abi.encodePacked(contractId, ": INSUFFICIENT_PERMISSIONS")); + } + + modifier only(bytes32 role) { + require( + hasRole(role, _msgSender()), + _revertMsg + ); + _; + } +} + + +// File contracts/Libraries/matic/child/ChildToken/IChildToken.sol + +pragma solidity 0.6.6; + +interface IChildToken { + function deposit(address user, bytes calldata depositData) external; +} + + +// File contracts/Libraries/matic/common/Initializable.sol + +pragma solidity 0.6.6; + +contract Initializable { + bool inited = false; + + modifier initializer() { + require(!inited, "already inited"); + _; + inited = true; + } +} + + +// File contracts/Libraries/matic/common/EIP712Base.sol + +pragma solidity 0.6.6; + +contract EIP712Base is Initializable { + struct EIP712Domain { + string name; + string version; + address verifyingContract; + bytes32 salt; + } + + string constant public ERC712_VERSION = "1"; + + bytes32 internal constant EIP712_DOMAIN_TYPEHASH = keccak256( + bytes( + "EIP712Domain(string name,string version,address verifyingContract,bytes32 salt)" + ) + ); + bytes32 internal domainSeperator; + + // supposed to be called once while initializing. + // one of the contractsa that inherits this contract follows proxy pattern + // so it is not possible to do this in a constructor + function _initializeEIP712( + string memory name + ) + internal + initializer + { + _setDomainSeperator(name); + } + + function _setDomainSeperator(string memory name) internal { + domainSeperator = keccak256( + abi.encode( + EIP712_DOMAIN_TYPEHASH, + keccak256(bytes(name)), + keccak256(bytes(ERC712_VERSION)), + address(this), + bytes32(getChainId()) + ) + ); + } + + function getDomainSeperator() public view returns (bytes32) { + return domainSeperator; + } + + function getChainId() public pure returns (uint256) { + uint256 id; + assembly { + id := chainid() + } + return id; + } + + /** + * Accept message hash and returns hash message in EIP712 compatible form + * So that it can be used to recover signer from signature signed using EIP712 formatted data + * https://eips.ethereum.org/EIPS/eip-712 + * "\\x19" makes the encoding deterministic + * "\\x01" is the version byte to make it compatible to EIP-191 + */ + function toTypedMessageHash(bytes32 messageHash) + internal + view + returns (bytes32) + { + return + keccak256( + abi.encodePacked("\x19\x01", getDomainSeperator(), messageHash) + ); + } +} + + +// File contracts/Libraries/matic/common/NativeMetaTransaction.sol + +pragma solidity 0.6.6; + + +contract NativeMetaTransaction is EIP712Base { + using SafeMath for uint256; + bytes32 private constant META_TRANSACTION_TYPEHASH = keccak256( + bytes( + "MetaTransaction(uint256 nonce,address from,bytes functionSignature)" + ) + ); + event MetaTransactionExecuted( + address userAddress, + address payable relayerAddress, + bytes functionSignature + ); + mapping(address => uint256) nonces; + + /* + * Meta transaction structure. + * No point of including value field here as if user is doing value transfer then he has the funds to pay for gas + * He should call the desired function directly in that case. + */ + struct MetaTransaction { + uint256 nonce; + address from; + bytes functionSignature; + } + + function executeMetaTransaction( + address userAddress, + bytes memory functionSignature, + bytes32 sigR, + bytes32 sigS, + uint8 sigV + ) public payable returns (bytes memory) { + MetaTransaction memory metaTx = MetaTransaction({ + nonce: nonces[userAddress], + from: userAddress, + functionSignature: functionSignature + }); + + require( + verify(userAddress, metaTx, sigR, sigS, sigV), + "Signer and signature do not match" + ); + + // increase nonce for user (to avoid re-use) + nonces[userAddress] = nonces[userAddress].add(1); + + emit MetaTransactionExecuted( + userAddress, + msg.sender, + functionSignature + ); + + // Append userAddress and relayer address at the end to extract it from calling context + (bool success, bytes memory returnData) = address(this).call( + abi.encodePacked(functionSignature, userAddress) + ); + require(success, "Function call not successful"); + + return returnData; + } + + function hashMetaTransaction(MetaTransaction memory metaTx) + internal + pure + returns (bytes32) + { + return + keccak256( + abi.encode( + META_TRANSACTION_TYPEHASH, + metaTx.nonce, + metaTx.from, + keccak256(metaTx.functionSignature) + ) + ); + } + + function getNonce(address user) public view returns (uint256 nonce) { + nonce = nonces[user]; + } + + function verify( + address signer, + MetaTransaction memory metaTx, + bytes32 sigR, + bytes32 sigS, + uint8 sigV + ) internal view returns (bool) { + require(signer != address(0), "NativeMetaTransaction: INVALID_SIGNER"); + return + signer == + ecrecover( + toTypedMessageHash(hashMetaTransaction(metaTx)), + sigV, + sigR, + sigS + ); + } +} + + +// File contracts/Libraries/matic/common/ContextMixin.sol + +pragma solidity 0.6.6; + +abstract contract ContextMixin { + function msgSender() + internal + view + returns (address payable sender) + { + if (msg.sender == address(this)) { + bytes memory array = msg.data; + uint256 index = msg.data.length; + assembly { + // Load the 32 bytes word from memory with the address on the lower 20 bytes, and mask those. + sender := and( + mload(add(array, index)), + 0xffffffffffffffffffffffffffffffffffffffff + ) + } + } else { + sender = msg.sender; + } + return sender; + } +} + + +// File contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.6 <0.9.0; + + + + + +contract CryptOrchidERC721Child is + CryptOrchidGoerli, + IChildToken, + AccessControlMixin, + NativeMetaTransaction, + ContextMixin +{ + bytes32 public constant DEPOSITOR_ROLE = keccak256("DEPOSITOR_ROLE"); + + // limit batching of tokens due to gas limit restrictions + uint256 public constant BATCH_LIMIT = 20; + + event WithdrawnBatch(address indexed user, uint256[] tokenIds); + event TransferWithMetadata(address indexed from, address indexed to, uint256 indexed tokenId, bytes metaData); + + constructor(address childChainManager) public CryptOrchidGoerli() { + _setupContractId("CryptOrchidERC721Child"); + _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); + _setupRole(DEPOSITOR_ROLE, childChainManager); + _initializeEIP712("CryptOrchids"); + } + + // This is to support Native meta transactions + // never use msg.sender directly, use _msgSender() instead + function _msgSender() internal view override returns (address payable sender) { + return ContextMixin.msgSender(); + } + + /** + * @notice called when token is deposited on root chain + * @dev Should be callable only by ChildChainManager + * Should handle deposit by minting the required tokenId for user + * Make sure minting is done only by this function + * @param user user address for whom deposit is being done + * @param depositData abi encoded tokenId + */ + function deposit(address user, bytes calldata depositData) external override only(DEPOSITOR_ROLE) { + // deposit single + if (depositData.length == 32) { + uint256 tokenId = abi.decode(depositData, (uint256)); + _mint(user, tokenId); + + // deposit batch + } else { + uint256[] memory tokenIds = abi.decode(depositData, (uint256[])); + uint256 length = tokenIds.length; + for (uint256 i; i < length; i++) { + _mint(user, tokenIds[i]); + } + } + } + + /** + * @notice called when user wants to withdraw token back to root chain + * @dev Should burn user's token. This transaction will be verified when exiting on root chain + * @param tokenId tokenId to withdraw + */ + function withdraw(uint256 tokenId) external { + require(_msgSender() == ownerOf(tokenId), "ChildERC721: INVALID_TOKEN_OWNER"); + _burn(tokenId); + } + + /** + * @notice called when user wants to withdraw multiple tokens back to root chain + * @dev Should burn user's tokens. This transaction will be verified when exiting on root chain + * @param tokenIds tokenId list to withdraw + */ + function withdrawBatch(uint256[] calldata tokenIds) external { + uint256 length = tokenIds.length; + require(length <= BATCH_LIMIT, "ChildERC721: EXCEEDS_BATCH_LIMIT"); + for (uint256 i; i < length; i++) { + uint256 tokenId = tokenIds[i]; + require( + _msgSender() == ownerOf(tokenId), + string(abi.encodePacked("ChildERC721: INVALID_TOKEN_OWNER ", tokenId)) + ); + _burn(tokenId); + } + emit WithdrawnBatch(_msgSender(), tokenIds); + } + + /** + * @notice called when user wants to withdraw token back to root chain with arbitrary metadata + * @dev Should handle withraw by burning user's token. + * + * This transaction will be verified when exiting on root chain + * + * @param tokenId tokenId to withdraw + */ + function withdrawWithMetadata(uint256 tokenId) external { + require(_msgSender() == ownerOf(tokenId), "ChildERC721: INVALID_TOKEN_OWNER"); + + // Encoding metadata associated with tokenId & emitting event + emit TransferWithMetadata(_msgSender(), address(0), tokenId, this.encodeTokenMetadata(tokenId)); + + _burn(tokenId); + } + + /** + * @notice This method is supposed to be called by client when withdrawing token with metadata + * and pass return value of this function as second paramter of `withdrawWithMetadata` method + * + * It can be overridden by clients to encode data in a different form, which needs to + * be decoded back by them correctly during exiting + * + * @param tokenId Token for which URI to be fetched + */ + function encodeTokenMetadata(uint256 tokenId) external view virtual returns (bytes memory) { + // You're always free to change this default implementation + // and pack more data in byte array which can be decoded back + // in L1 + return abi.encode(tokenURI(tokenId)); + } +} diff --git a/flatt.sol b/flatt.sol new file mode 100644 index 0000000..e146970 --- /dev/null +++ b/flatt.sol @@ -0,0 +1,3179 @@ +// Sources flattened with hardhat v2.1.2 https://hardhat.org + +// File @openzeppelin/contracts/utils/Context.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + +/* + * @dev Provides information about the current execution context, including the + * sender of the transaction and its data. While these are generally available + * via msg.sender and msg.data, they should not be accessed in such a direct + * manner, since when dealing with GSN meta-transactions the account sending and + * paying for execution may not be the actual sender (as far as an application + * is concerned). + * + * This contract is only required for intermediate, library-like contracts. + */ +abstract contract Context { + function _msgSender() internal view virtual returns (address payable) { + return msg.sender; + } + + function _msgData() internal view virtual returns (bytes memory) { + this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 + return msg.data; + } +} + +// File @openzeppelin/contracts/access/Ownable.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + +/** + * @dev Contract module which provides a basic access control mechanism, where + * there is an account (an owner) that can be granted exclusive access to + * specific functions. + * + * By default, the owner account will be the one that deploys the contract. This + * can later be changed with {transferOwnership}. + * + * This module is used through inheritance. It will make available the modifier + * `onlyOwner`, which can be applied to your functions to restrict their use to + * the owner. + */ +abstract contract Ownable is Context { + address private _owner; + + event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); + + /** + * @dev Initializes the contract setting the deployer as the initial owner. + */ + constructor() internal { + address msgSender = _msgSender(); + _owner = msgSender; + emit OwnershipTransferred(address(0), msgSender); + } + + /** + * @dev Returns the address of the current owner. + */ + function owner() public view virtual returns (address) { + return _owner; + } + + /** + * @dev Throws if called by any account other than the owner. + */ + modifier onlyOwner() { + require(owner() == _msgSender(), "Ownable: caller is not the owner"); + _; + } + + /** + * @dev Leaves the contract without owner. It will not be possible to call + * `onlyOwner` functions anymore. Can only be called by the current owner. + * + * NOTE: Renouncing ownership will leave the contract without an owner, + * thereby removing any functionality that is only available to the owner. + */ + function renounceOwnership() public virtual onlyOwner { + emit OwnershipTransferred(_owner, address(0)); + _owner = address(0); + } + + /** + * @dev Transfers ownership of the contract to a new account (`newOwner`). + * Can only be called by the current owner. + */ + function transferOwnership(address newOwner) public virtual onlyOwner { + require(newOwner != address(0), "Ownable: new owner is the zero address"); + emit OwnershipTransferred(_owner, newOwner); + _owner = newOwner; + } +} + +// File @openzeppelin/contracts/math/SafeMath.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + +/** + * @dev Wrappers over Solidity's arithmetic operations with added overflow + * checks. + * + * Arithmetic operations in Solidity wrap on overflow. This can easily result + * in bugs, because programmers usually assume that an overflow raises an + * error, which is the standard behavior in high level programming languages. + * `SafeMath` restores this intuition by reverting the transaction when an + * operation overflows. + * + * Using this library instead of the unchecked operations eliminates an entire + * class of bugs, so it's recommended to use it always. + */ +library SafeMath { + /** + * @dev Returns the addition of two unsigned integers, with an overflow flag. + * + * _Available since v3.4._ + */ + function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { + uint256 c = a + b; + if (c < a) return (false, 0); + return (true, c); + } + + /** + * @dev Returns the substraction of two unsigned integers, with an overflow flag. + * + * _Available since v3.4._ + */ + function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { + if (b > a) return (false, 0); + return (true, a - b); + } + + /** + * @dev Returns the multiplication of two unsigned integers, with an overflow flag. + * + * _Available since v3.4._ + */ + function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { + // Gas optimization: this is cheaper than requiring 'a' not being zero, but the + // benefit is lost if 'b' is also tested. + // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 + if (a == 0) return (true, 0); + uint256 c = a * b; + if (c / a != b) return (false, 0); + return (true, c); + } + + /** + * @dev Returns the division of two unsigned integers, with a division by zero flag. + * + * _Available since v3.4._ + */ + function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { + if (b == 0) return (false, 0); + return (true, a / b); + } + + /** + * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. + * + * _Available since v3.4._ + */ + function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { + if (b == 0) return (false, 0); + return (true, a % b); + } + + /** + * @dev Returns the addition of two unsigned integers, reverting on + * overflow. + * + * Counterpart to Solidity's `+` operator. + * + * Requirements: + * + * - Addition cannot overflow. + */ + function add(uint256 a, uint256 b) internal pure returns (uint256) { + uint256 c = a + b; + require(c >= a, "SafeMath: addition overflow"); + return c; + } + + /** + * @dev Returns the subtraction of two unsigned integers, reverting on + * overflow (when the result is negative). + * + * Counterpart to Solidity's `-` operator. + * + * Requirements: + * + * - Subtraction cannot overflow. + */ + function sub(uint256 a, uint256 b) internal pure returns (uint256) { + require(b <= a, "SafeMath: subtraction overflow"); + return a - b; + } + + /** + * @dev Returns the multiplication of two unsigned integers, reverting on + * overflow. + * + * Counterpart to Solidity's `*` operator. + * + * Requirements: + * + * - Multiplication cannot overflow. + */ + function mul(uint256 a, uint256 b) internal pure returns (uint256) { + if (a == 0) return 0; + uint256 c = a * b; + require(c / a == b, "SafeMath: multiplication overflow"); + return c; + } + + /** + * @dev Returns the integer division of two unsigned integers, reverting on + * division by zero. The result is rounded towards zero. + * + * Counterpart to Solidity's `/` operator. Note: this function uses a + * `revert` opcode (which leaves remaining gas untouched) while Solidity + * uses an invalid opcode to revert (consuming all remaining gas). + * + * Requirements: + * + * - The divisor cannot be zero. + */ + function div(uint256 a, uint256 b) internal pure returns (uint256) { + require(b > 0, "SafeMath: division by zero"); + return a / b; + } + + /** + * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), + * reverting when dividing by zero. + * + * Counterpart to Solidity's `%` operator. This function uses a `revert` + * opcode (which leaves remaining gas untouched) while Solidity uses an + * invalid opcode to revert (consuming all remaining gas). + * + * Requirements: + * + * - The divisor cannot be zero. + */ + function mod(uint256 a, uint256 b) internal pure returns (uint256) { + require(b > 0, "SafeMath: modulo by zero"); + return a % b; + } + + /** + * @dev Returns the subtraction of two unsigned integers, reverting with custom message on + * overflow (when the result is negative). + * + * CAUTION: This function is deprecated because it requires allocating memory for the error + * message unnecessarily. For custom revert reasons use {trySub}. + * + * Counterpart to Solidity's `-` operator. + * + * Requirements: + * + * - Subtraction cannot overflow. + */ + function sub( + uint256 a, + uint256 b, + string memory errorMessage + ) internal pure returns (uint256) { + require(b <= a, errorMessage); + return a - b; + } + + /** + * @dev Returns the integer division of two unsigned integers, reverting with custom message on + * division by zero. The result is rounded towards zero. + * + * CAUTION: This function is deprecated because it requires allocating memory for the error + * message unnecessarily. For custom revert reasons use {tryDiv}. + * + * Counterpart to Solidity's `/` operator. Note: this function uses a + * `revert` opcode (which leaves remaining gas untouched) while Solidity + * uses an invalid opcode to revert (consuming all remaining gas). + * + * Requirements: + * + * - The divisor cannot be zero. + */ + function div( + uint256 a, + uint256 b, + string memory errorMessage + ) internal pure returns (uint256) { + require(b > 0, errorMessage); + return a / b; + } + + /** + * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), + * reverting with custom message when dividing by zero. + * + * CAUTION: This function is deprecated because it requires allocating memory for the error + * message unnecessarily. For custom revert reasons use {tryMod}. + * + * Counterpart to Solidity's `%` operator. This function uses a `revert` + * opcode (which leaves remaining gas untouched) while Solidity uses an + * invalid opcode to revert (consuming all remaining gas). + * + * Requirements: + * + * - The divisor cannot be zero. + */ + function mod( + uint256 a, + uint256 b, + string memory errorMessage + ) internal pure returns (uint256) { + require(b > 0, errorMessage); + return a % b; + } +} + +// File @openzeppelin/contracts/utils/EnumerableSet.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + +/** + * @dev Library for managing + * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive + * types. + * + * Sets have the following properties: + * + * - Elements are added, removed, and checked for existence in constant time + * (O(1)). + * - Elements are enumerated in O(n). No guarantees are made on the ordering. + * + * ``` + * contract Example { + * // Add the library methods + * using EnumerableSet for EnumerableSet.AddressSet; + * + * // Declare a set state variable + * EnumerableSet.AddressSet private mySet; + * } + * ``` + * + * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) + * and `uint256` (`UintSet`) are supported. + */ +library EnumerableSet { + // To implement this library for multiple types with as little code + // repetition as possible, we write it in terms of a generic Set type with + // bytes32 values. + // The Set implementation uses private functions, and user-facing + // implementations (such as AddressSet) are just wrappers around the + // underlying Set. + // This means that we can only create new EnumerableSets for types that fit + // in bytes32. + + struct Set { + // Storage of set values + bytes32[] _values; + // Position of the value in the `values` array, plus 1 because index 0 + // means a value is not in the set. + mapping(bytes32 => uint256) _indexes; + } + + /** + * @dev Add a value to a set. O(1). + * + * Returns true if the value was added to the set, that is if it was not + * already present. + */ + function _add(Set storage set, bytes32 value) private returns (bool) { + if (!_contains(set, value)) { + set._values.push(value); + // The value is stored at length-1, but we add 1 to all indexes + // and use 0 as a sentinel value + set._indexes[value] = set._values.length; + return true; + } else { + return false; + } + } + + /** + * @dev Removes a value from a set. O(1). + * + * Returns true if the value was removed from the set, that is if it was + * present. + */ + function _remove(Set storage set, bytes32 value) private returns (bool) { + // We read and store the value's index to prevent multiple reads from the same storage slot + uint256 valueIndex = set._indexes[value]; + + if (valueIndex != 0) { + // Equivalent to contains(set, value) + // To delete an element from the _values array in O(1), we swap the element to delete with the last one in + // the array, and then remove the last element (sometimes called as 'swap and pop'). + // This modifies the order of the array, as noted in {at}. + + uint256 toDeleteIndex = valueIndex - 1; + uint256 lastIndex = set._values.length - 1; + + // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs + // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement. + + bytes32 lastvalue = set._values[lastIndex]; + + // Move the last value to the index where the value to delete is + set._values[toDeleteIndex] = lastvalue; + // Update the index for the moved value + set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based + + // Delete the slot where the moved value was stored + set._values.pop(); + + // Delete the index for the deleted slot + delete set._indexes[value]; + + return true; + } else { + return false; + } + } + + /** + * @dev Returns true if the value is in the set. O(1). + */ + function _contains(Set storage set, bytes32 value) private view returns (bool) { + return set._indexes[value] != 0; + } + + /** + * @dev Returns the number of values on the set. O(1). + */ + function _length(Set storage set) private view returns (uint256) { + return set._values.length; + } + + /** + * @dev Returns the value stored at position `index` in the set. O(1). + * + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function _at(Set storage set, uint256 index) private view returns (bytes32) { + require(set._values.length > index, "EnumerableSet: index out of bounds"); + return set._values[index]; + } + + // Bytes32Set + + struct Bytes32Set { + Set _inner; + } + + /** + * @dev Add a value to a set. O(1). + * + * Returns true if the value was added to the set, that is if it was not + * already present. + */ + function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { + return _add(set._inner, value); + } + + /** + * @dev Removes a value from a set. O(1). + * + * Returns true if the value was removed from the set, that is if it was + * present. + */ + function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { + return _remove(set._inner, value); + } + + /** + * @dev Returns true if the value is in the set. O(1). + */ + function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { + return _contains(set._inner, value); + } + + /** + * @dev Returns the number of values in the set. O(1). + */ + function length(Bytes32Set storage set) internal view returns (uint256) { + return _length(set._inner); + } + + /** + * @dev Returns the value stored at position `index` in the set. O(1). + * + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { + return _at(set._inner, index); + } + + // AddressSet + + struct AddressSet { + Set _inner; + } + + /** + * @dev Add a value to a set. O(1). + * + * Returns true if the value was added to the set, that is if it was not + * already present. + */ + function add(AddressSet storage set, address value) internal returns (bool) { + return _add(set._inner, bytes32(uint256(uint160(value)))); + } + + /** + * @dev Removes a value from a set. O(1). + * + * Returns true if the value was removed from the set, that is if it was + * present. + */ + function remove(AddressSet storage set, address value) internal returns (bool) { + return _remove(set._inner, bytes32(uint256(uint160(value)))); + } + + /** + * @dev Returns true if the value is in the set. O(1). + */ + function contains(AddressSet storage set, address value) internal view returns (bool) { + return _contains(set._inner, bytes32(uint256(uint160(value)))); + } + + /** + * @dev Returns the number of values in the set. O(1). + */ + function length(AddressSet storage set) internal view returns (uint256) { + return _length(set._inner); + } + + /** + * @dev Returns the value stored at position `index` in the set. O(1). + * + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(AddressSet storage set, uint256 index) internal view returns (address) { + return address(uint160(uint256(_at(set._inner, index)))); + } + + // UintSet + + struct UintSet { + Set _inner; + } + + /** + * @dev Add a value to a set. O(1). + * + * Returns true if the value was added to the set, that is if it was not + * already present. + */ + function add(UintSet storage set, uint256 value) internal returns (bool) { + return _add(set._inner, bytes32(value)); + } + + /** + * @dev Removes a value from a set. O(1). + * + * Returns true if the value was removed from the set, that is if it was + * present. + */ + function remove(UintSet storage set, uint256 value) internal returns (bool) { + return _remove(set._inner, bytes32(value)); + } + + /** + * @dev Returns true if the value is in the set. O(1). + */ + function contains(UintSet storage set, uint256 value) internal view returns (bool) { + return _contains(set._inner, bytes32(value)); + } + + /** + * @dev Returns the number of values on the set. O(1). + */ + function length(UintSet storage set) internal view returns (uint256) { + return _length(set._inner); + } + + /** + * @dev Returns the value stored at position `index` in the set. O(1). + * + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(UintSet storage set, uint256 index) internal view returns (uint256) { + return uint256(_at(set._inner, index)); + } +} + +// File @openzeppelin/contracts/utils/Address.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.2 <0.8.0; + +/** + * @dev Collection of functions related to the address type + */ +library Address { + /** + * @dev Returns true if `account` is a contract. + * + * [IMPORTANT] + * ==== + * It is unsafe to assume that an address for which this function returns + * false is an externally-owned account (EOA) and not a contract. + * + * Among others, `isContract` will return false for the following + * types of addresses: + * + * - an externally-owned account + * - a contract in construction + * - an address where a contract will be created + * - an address where a contract lived, but was destroyed + * ==== + */ + function isContract(address account) internal view returns (bool) { + // This method relies on extcodesize, which returns 0 for contracts in + // construction, since the code is only stored at the end of the + // constructor execution. + + uint256 size; + // solhint-disable-next-line no-inline-assembly + assembly { + size := extcodesize(account) + } + return size > 0; + } + + /** + * @dev Replacement for Solidity's `transfer`: sends `amount` wei to + * `recipient`, forwarding all available gas and reverting on errors. + * + * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost + * of certain opcodes, possibly making contracts go over the 2300 gas limit + * imposed by `transfer`, making them unable to receive funds via + * `transfer`. {sendValue} removes this limitation. + * + * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. + * + * IMPORTANT: because control is transferred to `recipient`, care must be + * taken to not create reentrancy vulnerabilities. Consider using + * {ReentrancyGuard} or the + * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. + */ + function sendValue(address payable recipient, uint256 amount) internal { + require(address(this).balance >= amount, "Address: insufficient balance"); + + // solhint-disable-next-line avoid-low-level-calls, avoid-call-value + (bool success, ) = recipient.call{value: amount}(""); + require(success, "Address: unable to send value, recipient may have reverted"); + } + + /** + * @dev Performs a Solidity function call using a low level `call`. A + * plain`call` is an unsafe replacement for a function call: use this + * function instead. + * + * If `target` reverts with a revert reason, it is bubbled up by this + * function (like regular Solidity function calls). + * + * Returns the raw returned data. To convert to the expected return value, + * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. + * + * Requirements: + * + * - `target` must be a contract. + * - calling `target` with `data` must not revert. + * + * _Available since v3.1._ + */ + function functionCall(address target, bytes memory data) internal returns (bytes memory) { + return functionCall(target, data, "Address: low-level call failed"); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with + * `errorMessage` as a fallback revert reason when `target` reverts. + * + * _Available since v3.1._ + */ + function functionCall( + address target, + bytes memory data, + string memory errorMessage + ) internal returns (bytes memory) { + return functionCallWithValue(target, data, 0, errorMessage); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], + * but also transferring `value` wei to `target`. + * + * Requirements: + * + * - the calling contract must have an ETH balance of at least `value`. + * - the called Solidity function must be `payable`. + * + * _Available since v3.1._ + */ + function functionCallWithValue( + address target, + bytes memory data, + uint256 value + ) internal returns (bytes memory) { + return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); + } + + /** + * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but + * with `errorMessage` as a fallback revert reason when `target` reverts. + * + * _Available since v3.1._ + */ + function functionCallWithValue( + address target, + bytes memory data, + uint256 value, + string memory errorMessage + ) internal returns (bytes memory) { + require(address(this).balance >= value, "Address: insufficient balance for call"); + require(isContract(target), "Address: call to non-contract"); + + // solhint-disable-next-line avoid-low-level-calls + (bool success, bytes memory returndata) = target.call{value: value}(data); + return _verifyCallResult(success, returndata, errorMessage); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], + * but performing a static call. + * + * _Available since v3.3._ + */ + function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { + return functionStaticCall(target, data, "Address: low-level static call failed"); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], + * but performing a static call. + * + * _Available since v3.3._ + */ + function functionStaticCall( + address target, + bytes memory data, + string memory errorMessage + ) internal view returns (bytes memory) { + require(isContract(target), "Address: static call to non-contract"); + + // solhint-disable-next-line avoid-low-level-calls + (bool success, bytes memory returndata) = target.staticcall(data); + return _verifyCallResult(success, returndata, errorMessage); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], + * but performing a delegate call. + * + * _Available since v3.4._ + */ + function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { + return functionDelegateCall(target, data, "Address: low-level delegate call failed"); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], + * but performing a delegate call. + * + * _Available since v3.4._ + */ + function functionDelegateCall( + address target, + bytes memory data, + string memory errorMessage + ) internal returns (bytes memory) { + require(isContract(target), "Address: delegate call to non-contract"); + + // solhint-disable-next-line avoid-low-level-calls + (bool success, bytes memory returndata) = target.delegatecall(data); + return _verifyCallResult(success, returndata, errorMessage); + } + + function _verifyCallResult( + bool success, + bytes memory returndata, + string memory errorMessage + ) private pure returns (bytes memory) { + if (success) { + return returndata; + } else { + // Look for revert reason and bubble it up if present + if (returndata.length > 0) { + // The easiest way to bubble the revert reason is using memory via assembly + + // solhint-disable-next-line no-inline-assembly + assembly { + let returndata_size := mload(returndata) + revert(add(32, returndata), returndata_size) + } + } else { + revert(errorMessage); + } + } + } +} + +// File @openzeppelin/contracts/access/AccessControl.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + +/** + * @dev Contract module that allows children to implement role-based access + * control mechanisms. + * + * Roles are referred to by their `bytes32` identifier. These should be exposed + * in the external API and be unique. The best way to achieve this is by + * using `public constant` hash digests: + * + * ``` + * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); + * ``` + * + * Roles can be used to represent a set of permissions. To restrict access to a + * function call, use {hasRole}: + * + * ``` + * function foo() public { + * require(hasRole(MY_ROLE, msg.sender)); + * ... + * } + * ``` + * + * Roles can be granted and revoked dynamically via the {grantRole} and + * {revokeRole} functions. Each role has an associated admin role, and only + * accounts that have a role's admin role can call {grantRole} and {revokeRole}. + * + * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means + * that only accounts with this role will be able to grant or revoke other + * roles. More complex role relationships can be created by using + * {_setRoleAdmin}. + * + * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to + * grant and revoke this role. Extra precautions should be taken to secure + * accounts that have been granted it. + */ +abstract contract AccessControl is Context { + using EnumerableSet for EnumerableSet.AddressSet; + using Address for address; + + struct RoleData { + EnumerableSet.AddressSet members; + bytes32 adminRole; + } + + mapping(bytes32 => RoleData) private _roles; + + bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; + + /** + * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` + * + * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite + * {RoleAdminChanged} not being emitted signaling this. + * + * _Available since v3.1._ + */ + event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); + + /** + * @dev Emitted when `account` is granted `role`. + * + * `sender` is the account that originated the contract call, an admin role + * bearer except when using {_setupRole}. + */ + event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); + + /** + * @dev Emitted when `account` is revoked `role`. + * + * `sender` is the account that originated the contract call: + * - if using `revokeRole`, it is the admin role bearer + * - if using `renounceRole`, it is the role bearer (i.e. `account`) + */ + event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); + + /** + * @dev Returns `true` if `account` has been granted `role`. + */ + function hasRole(bytes32 role, address account) public view returns (bool) { + return _roles[role].members.contains(account); + } + + /** + * @dev Returns the number of accounts that have `role`. Can be used + * together with {getRoleMember} to enumerate all bearers of a role. + */ + function getRoleMemberCount(bytes32 role) public view returns (uint256) { + return _roles[role].members.length(); + } + + /** + * @dev 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. + */ + function getRoleMember(bytes32 role, uint256 index) public view returns (address) { + return _roles[role].members.at(index); + } + + /** + * @dev Returns the admin role that controls `role`. See {grantRole} and + * {revokeRole}. + * + * To change a role's admin, use {_setRoleAdmin}. + */ + function getRoleAdmin(bytes32 role) public view returns (bytes32) { + return _roles[role].adminRole; + } + + /** + * @dev Grants `role` to `account`. + * + * If `account` had not been already granted `role`, emits a {RoleGranted} + * event. + * + * Requirements: + * + * - the caller must have ``role``'s admin role. + */ + function grantRole(bytes32 role, address account) public virtual { + require(hasRole(_roles[role].adminRole, _msgSender()), "AccessControl: sender must be an admin to grant"); + + _grantRole(role, account); + } + + /** + * @dev Revokes `role` from `account`. + * + * If `account` had been granted `role`, emits a {RoleRevoked} event. + * + * Requirements: + * + * - the caller must have ``role``'s admin role. + */ + function revokeRole(bytes32 role, address account) public virtual { + require(hasRole(_roles[role].adminRole, _msgSender()), "AccessControl: sender must be an admin to revoke"); + + _revokeRole(role, account); + } + + /** + * @dev Revokes `role` from the calling account. + * + * Roles are often managed via {grantRole} and {revokeRole}: this function's + * purpose is to provide a mechanism for accounts to lose their privileges + * if they are compromised (such as when a trusted device is misplaced). + * + * If the calling account had been granted `role`, emits a {RoleRevoked} + * event. + * + * Requirements: + * + * - the caller must be `account`. + */ + function renounceRole(bytes32 role, address account) public virtual { + require(account == _msgSender(), "AccessControl: can only renounce roles for self"); + + _revokeRole(role, account); + } + + /** + * @dev Grants `role` to `account`. + * + * If `account` had not been already granted `role`, emits a {RoleGranted} + * event. Note that unlike {grantRole}, this function doesn't perform any + * checks on the calling account. + * + * [WARNING] + * ==== + * This function should only be called from the constructor when setting + * up the initial roles for the system. + * + * Using this function in any other way is effectively circumventing the admin + * system imposed by {AccessControl}. + * ==== + */ + function _setupRole(bytes32 role, address account) internal virtual { + _grantRole(role, account); + } + + /** + * @dev Sets `adminRole` as ``role``'s admin role. + * + * Emits a {RoleAdminChanged} event. + */ + function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { + emit RoleAdminChanged(role, _roles[role].adminRole, adminRole); + _roles[role].adminRole = adminRole; + } + + function _grantRole(bytes32 role, address account) private { + if (_roles[role].members.add(account)) { + emit RoleGranted(role, account, _msgSender()); + } + } + + function _revokeRole(bytes32 role, address account) private { + if (_roles[role].members.remove(account)) { + emit RoleRevoked(role, account, _msgSender()); + } + } +} + +// File @openzeppelin/contracts/utils/Counters.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + +/** + * @title Counters + * @author Matt Condon (@shrugs) + * @dev Provides counters that can only be incremented or decremented by one. This can be used e.g. to track the number + * of elements in a mapping, issuing ERC721 ids, or counting request ids. + * + * Include with `using Counters for Counters.Counter;` + * Since it is not possible to overflow a 256 bit integer with increments of one, `increment` can skip the {SafeMath} + * overflow check, thereby saving gas. This does assume however correct usage, in that the underlying `_value` is never + * directly accessed. + */ +library Counters { + using SafeMath for uint256; + + struct Counter { + // This variable should never be directly accessed by users of the library: interactions must be restricted to + // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add + // this feature: see https://github.com/ethereum/solidity/issues/4637 + uint256 _value; // default: 0 + } + + function current(Counter storage counter) internal view returns (uint256) { + return counter._value; + } + + function increment(Counter storage counter) internal { + // The {SafeMath} overflow check can be skipped here, see the comment at the top + counter._value += 1; + } + + function decrement(Counter storage counter) internal { + counter._value = counter._value.sub(1); + } +} + +// File @openzeppelin/contracts/introspection/IERC165.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + +/** + * @dev Interface of the ERC165 standard, as defined in the + * https://eips.ethereum.org/EIPS/eip-165[EIP]. + * + * Implementers can declare support of contract interfaces, which can then be + * queried by others ({ERC165Checker}). + * + * For an implementation, see {ERC165}. + */ +interface IERC165 { + /** + * @dev Returns true if this contract implements the interface defined by + * `interfaceId`. See the corresponding + * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] + * to learn more about how these ids are created. + * + * This function call must use less than 30 000 gas. + */ + function supportsInterface(bytes4 interfaceId) external view returns (bool); +} + +// File @openzeppelin/contracts/token/ERC721/IERC721.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.2 <0.8.0; + +/** + * @dev Required interface of an ERC721 compliant contract. + */ +interface IERC721 is IERC165 { + /** + * @dev Emitted when `tokenId` token is transferred from `from` to `to`. + */ + event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); + + /** + * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. + */ + event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); + + /** + * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. + */ + event ApprovalForAll(address indexed owner, address indexed operator, bool approved); + + /** + * @dev Returns the number of tokens in ``owner``'s account. + */ + function balanceOf(address owner) external view returns (uint256 balance); + + /** + * @dev Returns the owner of the `tokenId` token. + * + * Requirements: + * + * - `tokenId` must exist. + */ + function ownerOf(uint256 tokenId) external view returns (address owner); + + /** + * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients + * are aware of the ERC721 protocol to prevent tokens from being forever locked. + * + * Requirements: + * + * - `from` cannot be the zero address. + * - `to` cannot be the zero address. + * - `tokenId` token must exist and be owned by `from`. + * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. + * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. + * + * Emits a {Transfer} event. + */ + function safeTransferFrom( + address from, + address to, + uint256 tokenId + ) external; + + /** + * @dev Transfers `tokenId` token from `from` to `to`. + * + * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. + * + * Requirements: + * + * - `from` cannot be the zero address. + * - `to` cannot be the zero address. + * - `tokenId` token must be owned by `from`. + * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. + * + * Emits a {Transfer} event. + */ + function transferFrom( + address from, + address to, + uint256 tokenId + ) external; + + /** + * @dev Gives permission to `to` to transfer `tokenId` token to another account. + * The approval is cleared when the token is transferred. + * + * Only a single account can be approved at a time, so approving the zero address clears previous approvals. + * + * Requirements: + * + * - The caller must own the token or be an approved operator. + * - `tokenId` must exist. + * + * Emits an {Approval} event. + */ + function approve(address to, uint256 tokenId) external; + + /** + * @dev Returns the account approved for `tokenId` token. + * + * Requirements: + * + * - `tokenId` must exist. + */ + function getApproved(uint256 tokenId) external view returns (address operator); + + /** + * @dev Approve or remove `operator` as an operator for the caller. + * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. + * + * Requirements: + * + * - The `operator` cannot be the caller. + * + * Emits an {ApprovalForAll} event. + */ + function setApprovalForAll(address operator, bool _approved) external; + + /** + * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. + * + * See {setApprovalForAll} + */ + function isApprovedForAll(address owner, address operator) external view returns (bool); + + /** + * @dev Safely transfers `tokenId` token from `from` to `to`. + * + * Requirements: + * + * - `from` cannot be the zero address. + * - `to` cannot be the zero address. + * - `tokenId` token must exist and be owned by `from`. + * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. + * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. + * + * Emits a {Transfer} event. + */ + function safeTransferFrom( + address from, + address to, + uint256 tokenId, + bytes calldata data + ) external; +} + +// File @openzeppelin/contracts/token/ERC721/IERC721Metadata.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.2 <0.8.0; + +/** + * @title ERC-721 Non-Fungible Token Standard, optional metadata extension + * @dev See https://eips.ethereum.org/EIPS/eip-721 + */ +interface IERC721Metadata is IERC721 { + /** + * @dev Returns the token collection name. + */ + function name() external view returns (string memory); + + /** + * @dev Returns the token collection symbol. + */ + function symbol() external view returns (string memory); + + /** + * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. + */ + function tokenURI(uint256 tokenId) external view returns (string memory); +} + +// File @openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.2 <0.8.0; + +/** + * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension + * @dev See https://eips.ethereum.org/EIPS/eip-721 + */ +interface IERC721Enumerable is IERC721 { + /** + * @dev Returns the total amount of tokens stored by the contract. + */ + function totalSupply() external view returns (uint256); + + /** + * @dev Returns a token ID owned by `owner` at a given `index` of its token list. + * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. + */ + function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); + + /** + * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. + * Use along with {totalSupply} to enumerate all tokens. + */ + function tokenByIndex(uint256 index) external view returns (uint256); +} + +// File @openzeppelin/contracts/token/ERC721/IERC721Receiver.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + +/** + * @title ERC721 token receiver interface + * @dev Interface for any contract that wants to support safeTransfers + * from ERC721 asset contracts. + */ +interface IERC721Receiver { + /** + * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} + * by `operator` from `from`, this function is called. + * + * It must return its Solidity selector to confirm the token transfer. + * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. + * + * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. + */ + function onERC721Received( + address operator, + address from, + uint256 tokenId, + bytes calldata data + ) external returns (bytes4); +} + +// File @openzeppelin/contracts/introspection/ERC165.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + +/** + * @dev Implementation of the {IERC165} interface. + * + * Contracts may inherit from this and call {_registerInterface} to declare + * their support of an interface. + */ +abstract contract ERC165 is IERC165 { + /* + * bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7 + */ + bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7; + + /** + * @dev Mapping of interface ids to whether or not it's supported. + */ + mapping(bytes4 => bool) private _supportedInterfaces; + + constructor() internal { + // Derived contracts need only register support for their own interfaces, + // we register support for ERC165 itself here + _registerInterface(_INTERFACE_ID_ERC165); + } + + /** + * @dev See {IERC165-supportsInterface}. + * + * Time complexity O(1), guaranteed to always use less than 30 000 gas. + */ + function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { + return _supportedInterfaces[interfaceId]; + } + + /** + * @dev Registers the contract as an implementer of the interface defined by + * `interfaceId`. Support of the actual ERC165 interface is automatic and + * registering its interface id is not required. + * + * See {IERC165-supportsInterface}. + * + * Requirements: + * + * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`). + */ + function _registerInterface(bytes4 interfaceId) internal virtual { + require(interfaceId != 0xffffffff, "ERC165: invalid interface id"); + _supportedInterfaces[interfaceId] = true; + } +} + +// File @openzeppelin/contracts/utils/EnumerableMap.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + +/** + * @dev Library for managing an enumerable variant of Solidity's + * https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`] + * type. + * + * Maps have the following properties: + * + * - Entries are added, removed, and checked for existence in constant time + * (O(1)). + * - Entries are enumerated in O(n). No guarantees are made on the ordering. + * + * ``` + * contract Example { + * // Add the library methods + * using EnumerableMap for EnumerableMap.UintToAddressMap; + * + * // Declare a set state variable + * EnumerableMap.UintToAddressMap private myMap; + * } + * ``` + * + * As of v3.0.0, only maps of type `uint256 -> address` (`UintToAddressMap`) are + * supported. + */ +library EnumerableMap { + // To implement this library for multiple types with as little code + // repetition as possible, we write it in terms of a generic Map type with + // bytes32 keys and values. + // The Map implementation uses private functions, and user-facing + // implementations (such as Uint256ToAddressMap) are just wrappers around + // the underlying Map. + // This means that we can only create new EnumerableMaps for types that fit + // in bytes32. + + struct MapEntry { + bytes32 _key; + bytes32 _value; + } + + struct Map { + // Storage of map keys and values + MapEntry[] _entries; + // Position of the entry defined by a key in the `entries` array, plus 1 + // because index 0 means a key is not in the map. + mapping(bytes32 => uint256) _indexes; + } + + /** + * @dev Adds a key-value pair to a map, or updates the value for an existing + * key. O(1). + * + * Returns true if the key was added to the map, that is if it was not + * already present. + */ + function _set( + Map storage map, + bytes32 key, + bytes32 value + ) private returns (bool) { + // We read and store the key's index to prevent multiple reads from the same storage slot + uint256 keyIndex = map._indexes[key]; + + if (keyIndex == 0) { + // Equivalent to !contains(map, key) + map._entries.push(MapEntry({_key: key, _value: value})); + // The entry is stored at length-1, but we add 1 to all indexes + // and use 0 as a sentinel value + map._indexes[key] = map._entries.length; + return true; + } else { + map._entries[keyIndex - 1]._value = value; + return false; + } + } + + /** + * @dev Removes a key-value pair from a map. O(1). + * + * Returns true if the key was removed from the map, that is if it was present. + */ + function _remove(Map storage map, bytes32 key) private returns (bool) { + // We read and store the key's index to prevent multiple reads from the same storage slot + uint256 keyIndex = map._indexes[key]; + + if (keyIndex != 0) { + // Equivalent to contains(map, key) + // To delete a key-value pair from the _entries array in O(1), we swap the entry to delete with the last one + // in the array, and then remove the last entry (sometimes called as 'swap and pop'). + // This modifies the order of the array, as noted in {at}. + + uint256 toDeleteIndex = keyIndex - 1; + uint256 lastIndex = map._entries.length - 1; + + // When the entry to delete is the last one, the swap operation is unnecessary. However, since this occurs + // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement. + + MapEntry storage lastEntry = map._entries[lastIndex]; + + // Move the last entry to the index where the entry to delete is + map._entries[toDeleteIndex] = lastEntry; + // Update the index for the moved entry + map._indexes[lastEntry._key] = toDeleteIndex + 1; // All indexes are 1-based + + // Delete the slot where the moved entry was stored + map._entries.pop(); + + // Delete the index for the deleted slot + delete map._indexes[key]; + + return true; + } else { + return false; + } + } + + /** + * @dev Returns true if the key is in the map. O(1). + */ + function _contains(Map storage map, bytes32 key) private view returns (bool) { + return map._indexes[key] != 0; + } + + /** + * @dev Returns the number of key-value pairs in the map. O(1). + */ + function _length(Map storage map) private view returns (uint256) { + return map._entries.length; + } + + /** + * @dev Returns the key-value pair stored at position `index` in the map. O(1). + * + * Note that there are no guarantees on the ordering of entries inside the + * array, and it may change when more entries are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function _at(Map storage map, uint256 index) private view returns (bytes32, bytes32) { + require(map._entries.length > index, "EnumerableMap: index out of bounds"); + + MapEntry storage entry = map._entries[index]; + return (entry._key, entry._value); + } + + /** + * @dev Tries to returns the value associated with `key`. O(1). + * Does not revert if `key` is not in the map. + */ + function _tryGet(Map storage map, bytes32 key) private view returns (bool, bytes32) { + uint256 keyIndex = map._indexes[key]; + if (keyIndex == 0) return (false, 0); // Equivalent to contains(map, key) + return (true, map._entries[keyIndex - 1]._value); // All indexes are 1-based + } + + /** + * @dev Returns the value associated with `key`. O(1). + * + * Requirements: + * + * - `key` must be in the map. + */ + function _get(Map storage map, bytes32 key) private view returns (bytes32) { + uint256 keyIndex = map._indexes[key]; + require(keyIndex != 0, "EnumerableMap: nonexistent key"); // Equivalent to contains(map, key) + return map._entries[keyIndex - 1]._value; // All indexes are 1-based + } + + /** + * @dev Same as {_get}, with a custom error message when `key` is not in the map. + * + * CAUTION: This function is deprecated because it requires allocating memory for the error + * message unnecessarily. For custom revert reasons use {_tryGet}. + */ + function _get( + Map storage map, + bytes32 key, + string memory errorMessage + ) private view returns (bytes32) { + uint256 keyIndex = map._indexes[key]; + require(keyIndex != 0, errorMessage); // Equivalent to contains(map, key) + return map._entries[keyIndex - 1]._value; // All indexes are 1-based + } + + // UintToAddressMap + + struct UintToAddressMap { + Map _inner; + } + + /** + * @dev Adds a key-value pair to a map, or updates the value for an existing + * key. O(1). + * + * Returns true if the key was added to the map, that is if it was not + * already present. + */ + function set( + UintToAddressMap storage map, + uint256 key, + address value + ) internal returns (bool) { + return _set(map._inner, bytes32(key), bytes32(uint256(uint160(value)))); + } + + /** + * @dev Removes a value from a set. O(1). + * + * Returns true if the key was removed from the map, that is if it was present. + */ + function remove(UintToAddressMap storage map, uint256 key) internal returns (bool) { + return _remove(map._inner, bytes32(key)); + } + + /** + * @dev Returns true if the key is in the map. O(1). + */ + function contains(UintToAddressMap storage map, uint256 key) internal view returns (bool) { + return _contains(map._inner, bytes32(key)); + } + + /** + * @dev Returns the number of elements in the map. O(1). + */ + function length(UintToAddressMap storage map) internal view returns (uint256) { + return _length(map._inner); + } + + /** + * @dev Returns the element stored at position `index` in the set. O(1). + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(UintToAddressMap storage map, uint256 index) internal view returns (uint256, address) { + (bytes32 key, bytes32 value) = _at(map._inner, index); + return (uint256(key), address(uint160(uint256(value)))); + } + + /** + * @dev Tries to returns the value associated with `key`. O(1). + * Does not revert if `key` is not in the map. + * + * _Available since v3.4._ + */ + function tryGet(UintToAddressMap storage map, uint256 key) internal view returns (bool, address) { + (bool success, bytes32 value) = _tryGet(map._inner, bytes32(key)); + return (success, address(uint160(uint256(value)))); + } + + /** + * @dev Returns the value associated with `key`. O(1). + * + * Requirements: + * + * - `key` must be in the map. + */ + function get(UintToAddressMap storage map, uint256 key) internal view returns (address) { + return address(uint160(uint256(_get(map._inner, bytes32(key))))); + } + + /** + * @dev Same as {get}, with a custom error message when `key` is not in the map. + * + * CAUTION: This function is deprecated because it requires allocating memory for the error + * message unnecessarily. For custom revert reasons use {tryGet}. + */ + function get( + UintToAddressMap storage map, + uint256 key, + string memory errorMessage + ) internal view returns (address) { + return address(uint160(uint256(_get(map._inner, bytes32(key), errorMessage)))); + } +} + +// File @openzeppelin/contracts/utils/Strings.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + +/** + * @dev String operations. + */ +library Strings { + /** + * @dev Converts a `uint256` to its ASCII `string` representation. + */ + function toString(uint256 value) internal pure returns (string memory) { + // Inspired by OraclizeAPI's implementation - MIT licence + // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol + + if (value == 0) { + return "0"; + } + uint256 temp = value; + uint256 digits; + while (temp != 0) { + digits++; + temp /= 10; + } + bytes memory buffer = new bytes(digits); + uint256 index = digits - 1; + temp = value; + while (temp != 0) { + buffer[index--] = bytes1(uint8(48 + (temp % 10))); + temp /= 10; + } + return string(buffer); + } +} + +// File @openzeppelin/contracts/token/ERC721/ERC721.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + +/** + * @title ERC721 Non-Fungible Token Standard basic implementation + * @dev see https://eips.ethereum.org/EIPS/eip-721 + */ +contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { + using SafeMath for uint256; + using Address for address; + using EnumerableSet for EnumerableSet.UintSet; + using EnumerableMap for EnumerableMap.UintToAddressMap; + using Strings for uint256; + + // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` + // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector` + bytes4 private constant _ERC721_RECEIVED = 0x150b7a02; + + // Mapping from holder address to their (enumerable) set of owned tokens + mapping(address => EnumerableSet.UintSet) private _holderTokens; + + // Enumerable mapping from token ids to their owners + EnumerableMap.UintToAddressMap private _tokenOwners; + + // Mapping from token ID to approved address + mapping(uint256 => address) private _tokenApprovals; + + // Mapping from owner to operator approvals + mapping(address => mapping(address => bool)) private _operatorApprovals; + + // Token name + string private _name; + + // Token symbol + string private _symbol; + + // Optional mapping for token URIs + mapping(uint256 => string) private _tokenURIs; + + // Base URI + string private _baseURI; + + /* + * bytes4(keccak256('balanceOf(address)')) == 0x70a08231 + * bytes4(keccak256('ownerOf(uint256)')) == 0x6352211e + * bytes4(keccak256('approve(address,uint256)')) == 0x095ea7b3 + * bytes4(keccak256('getApproved(uint256)')) == 0x081812fc + * bytes4(keccak256('setApprovalForAll(address,bool)')) == 0xa22cb465 + * bytes4(keccak256('isApprovedForAll(address,address)')) == 0xe985e9c5 + * bytes4(keccak256('transferFrom(address,address,uint256)')) == 0x23b872dd + * bytes4(keccak256('safeTransferFrom(address,address,uint256)')) == 0x42842e0e + * bytes4(keccak256('safeTransferFrom(address,address,uint256,bytes)')) == 0xb88d4fde + * + * => 0x70a08231 ^ 0x6352211e ^ 0x095ea7b3 ^ 0x081812fc ^ + * 0xa22cb465 ^ 0xe985e9c5 ^ 0x23b872dd ^ 0x42842e0e ^ 0xb88d4fde == 0x80ac58cd + */ + bytes4 private constant _INTERFACE_ID_ERC721 = 0x80ac58cd; + + /* + * bytes4(keccak256('name()')) == 0x06fdde03 + * bytes4(keccak256('symbol()')) == 0x95d89b41 + * bytes4(keccak256('tokenURI(uint256)')) == 0xc87b56dd + * + * => 0x06fdde03 ^ 0x95d89b41 ^ 0xc87b56dd == 0x5b5e139f + */ + bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x5b5e139f; + + /* + * bytes4(keccak256('totalSupply()')) == 0x18160ddd + * bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) == 0x2f745c59 + * bytes4(keccak256('tokenByIndex(uint256)')) == 0x4f6ccce7 + * + * => 0x18160ddd ^ 0x2f745c59 ^ 0x4f6ccce7 == 0x780e9d63 + */ + bytes4 private constant _INTERFACE_ID_ERC721_ENUMERABLE = 0x780e9d63; + + /** + * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. + */ + constructor(string memory name_, string memory symbol_) public { + _name = name_; + _symbol = symbol_; + + // register the supported interfaces to conform to ERC721 via ERC165 + _registerInterface(_INTERFACE_ID_ERC721); + _registerInterface(_INTERFACE_ID_ERC721_METADATA); + _registerInterface(_INTERFACE_ID_ERC721_ENUMERABLE); + } + + /** + * @dev See {IERC721-balanceOf}. + */ + function balanceOf(address owner) public view virtual override returns (uint256) { + require(owner != address(0), "ERC721: balance query for the zero address"); + return _holderTokens[owner].length(); + } + + /** + * @dev See {IERC721-ownerOf}. + */ + function ownerOf(uint256 tokenId) public view virtual override returns (address) { + return _tokenOwners.get(tokenId, "ERC721: owner query for nonexistent token"); + } + + /** + * @dev See {IERC721Metadata-name}. + */ + function name() public view virtual override returns (string memory) { + return _name; + } + + /** + * @dev See {IERC721Metadata-symbol}. + */ + function symbol() public view virtual override returns (string memory) { + return _symbol; + } + + /** + * @dev See {IERC721Metadata-tokenURI}. + */ + function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { + require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); + + string memory _tokenURI = _tokenURIs[tokenId]; + string memory base = baseURI(); + + // If there is no base URI, return the token URI. + if (bytes(base).length == 0) { + return _tokenURI; + } + // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked). + if (bytes(_tokenURI).length > 0) { + return string(abi.encodePacked(base, _tokenURI)); + } + // If there is a baseURI but no tokenURI, concatenate the tokenID to the baseURI. + return string(abi.encodePacked(base, tokenId.toString())); + } + + /** + * @dev Returns the base URI set via {_setBaseURI}. This will be + * automatically added as a prefix in {tokenURI} to each token's URI, or + * to the token ID if no specific URI is set for that token ID. + */ + function baseURI() public view virtual returns (string memory) { + return _baseURI; + } + + /** + * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. + */ + function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { + return _holderTokens[owner].at(index); + } + + /** + * @dev See {IERC721Enumerable-totalSupply}. + */ + function totalSupply() public view virtual override returns (uint256) { + // _tokenOwners are indexed by tokenIds, so .length() returns the number of tokenIds + return _tokenOwners.length(); + } + + /** + * @dev See {IERC721Enumerable-tokenByIndex}. + */ + function tokenByIndex(uint256 index) public view virtual override returns (uint256) { + (uint256 tokenId, ) = _tokenOwners.at(index); + return tokenId; + } + + /** + * @dev See {IERC721-approve}. + */ + function approve(address to, uint256 tokenId) public virtual override { + address owner = ERC721.ownerOf(tokenId); + require(to != owner, "ERC721: approval to current owner"); + + require( + _msgSender() == owner || ERC721.isApprovedForAll(owner, _msgSender()), + "ERC721: approve caller is not owner nor approved for all" + ); + + _approve(to, tokenId); + } + + /** + * @dev See {IERC721-getApproved}. + */ + function getApproved(uint256 tokenId) public view virtual override returns (address) { + require(_exists(tokenId), "ERC721: approved query for nonexistent token"); + + return _tokenApprovals[tokenId]; + } + + /** + * @dev See {IERC721-setApprovalForAll}. + */ + function setApprovalForAll(address operator, bool approved) public virtual override { + require(operator != _msgSender(), "ERC721: approve to caller"); + + _operatorApprovals[_msgSender()][operator] = approved; + emit ApprovalForAll(_msgSender(), operator, approved); + } + + /** + * @dev See {IERC721-isApprovedForAll}. + */ + function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { + return _operatorApprovals[owner][operator]; + } + + /** + * @dev See {IERC721-transferFrom}. + */ + function transferFrom( + address from, + address to, + uint256 tokenId + ) public virtual override { + //solhint-disable-next-line max-line-length + require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); + + _transfer(from, to, tokenId); + } + + /** + * @dev See {IERC721-safeTransferFrom}. + */ + function safeTransferFrom( + address from, + address to, + uint256 tokenId + ) public virtual override { + safeTransferFrom(from, to, tokenId, ""); + } + + /** + * @dev See {IERC721-safeTransferFrom}. + */ + function safeTransferFrom( + address from, + address to, + uint256 tokenId, + bytes memory _data + ) public virtual override { + require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); + _safeTransfer(from, to, tokenId, _data); + } + + /** + * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients + * are aware of the ERC721 protocol to prevent tokens from being forever locked. + * + * `_data` is additional data, it has no specified format and it is sent in call to `to`. + * + * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. + * implement alternative mechanisms to perform token transfer, such as signature-based. + * + * Requirements: + * + * - `from` cannot be the zero address. + * - `to` cannot be the zero address. + * - `tokenId` token must exist and be owned by `from`. + * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. + * + * Emits a {Transfer} event. + */ + function _safeTransfer( + address from, + address to, + uint256 tokenId, + bytes memory _data + ) internal virtual { + _transfer(from, to, tokenId); + require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); + } + + /** + * @dev Returns whether `tokenId` exists. + * + * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. + * + * Tokens start existing when they are minted (`_mint`), + * and stop existing when they are burned (`_burn`). + */ + function _exists(uint256 tokenId) internal view virtual returns (bool) { + return _tokenOwners.contains(tokenId); + } + + /** + * @dev Returns whether `spender` is allowed to manage `tokenId`. + * + * Requirements: + * + * - `tokenId` must exist. + */ + function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { + require(_exists(tokenId), "ERC721: operator query for nonexistent token"); + address owner = ERC721.ownerOf(tokenId); + return (spender == owner || getApproved(tokenId) == spender || ERC721.isApprovedForAll(owner, spender)); + } + + /** + * @dev Safely mints `tokenId` and transfers it to `to`. + * + * Requirements: + d* + * - `tokenId` must not exist. + * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. + * + * Emits a {Transfer} event. + */ + function _safeMint(address to, uint256 tokenId) internal virtual { + _safeMint(to, tokenId, ""); + } + + /** + * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is + * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. + */ + function _safeMint( + address to, + uint256 tokenId, + bytes memory _data + ) internal virtual { + _mint(to, tokenId); + require( + _checkOnERC721Received(address(0), to, tokenId, _data), + "ERC721: transfer to non ERC721Receiver implementer" + ); + } + + /** + * @dev Mints `tokenId` and transfers it to `to`. + * + * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible + * + * Requirements: + * + * - `tokenId` must not exist. + * - `to` cannot be the zero address. + * + * Emits a {Transfer} event. + */ + function _mint(address to, uint256 tokenId) internal virtual { + require(to != address(0), "ERC721: mint to the zero address"); + require(!_exists(tokenId), "ERC721: token already minted"); + + _beforeTokenTransfer(address(0), to, tokenId); + + _holderTokens[to].add(tokenId); + + _tokenOwners.set(tokenId, to); + + emit Transfer(address(0), to, tokenId); + } + + /** + * @dev Destroys `tokenId`. + * The approval is cleared when the token is burned. + * + * Requirements: + * + * - `tokenId` must exist. + * + * Emits a {Transfer} event. + */ + function _burn(uint256 tokenId) internal virtual { + address owner = ERC721.ownerOf(tokenId); // internal owner + + _beforeTokenTransfer(owner, address(0), tokenId); + + // Clear approvals + _approve(address(0), tokenId); + + // Clear metadata (if any) + if (bytes(_tokenURIs[tokenId]).length != 0) { + delete _tokenURIs[tokenId]; + } + + _holderTokens[owner].remove(tokenId); + + _tokenOwners.remove(tokenId); + + emit Transfer(owner, address(0), tokenId); + } + + /** + * @dev Transfers `tokenId` from `from` to `to`. + * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. + * + * Requirements: + * + * - `to` cannot be the zero address. + * - `tokenId` token must be owned by `from`. + * + * Emits a {Transfer} event. + */ + function _transfer( + address from, + address to, + uint256 tokenId + ) internal virtual { + require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); // internal owner + require(to != address(0), "ERC721: transfer to the zero address"); + + _beforeTokenTransfer(from, to, tokenId); + + // Clear approvals from the previous owner + _approve(address(0), tokenId); + + _holderTokens[from].remove(tokenId); + _holderTokens[to].add(tokenId); + + _tokenOwners.set(tokenId, to); + + emit Transfer(from, to, tokenId); + } + + /** + * @dev Sets `_tokenURI` as the tokenURI of `tokenId`. + * + * Requirements: + * + * - `tokenId` must exist. + */ + function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual { + require(_exists(tokenId), "ERC721Metadata: URI set of nonexistent token"); + _tokenURIs[tokenId] = _tokenURI; + } + + /** + * @dev Internal function to set the base URI for all token IDs. It is + * automatically added as a prefix to the value returned in {tokenURI}, + * or to the token ID if {tokenURI} is empty. + */ + function _setBaseURI(string memory baseURI_) internal virtual { + _baseURI = baseURI_; + } + + /** + * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. + * The call is not executed if the target address is not a contract. + * + * @param from address representing the previous owner of the given token ID + * @param to target address that will receive the tokens + * @param tokenId uint256 ID of the token to be transferred + * @param _data bytes optional data to send along with the call + * @return bool whether the call correctly returned the expected magic value + */ + function _checkOnERC721Received( + address from, + address to, + uint256 tokenId, + bytes memory _data + ) private returns (bool) { + if (!to.isContract()) { + return true; + } + bytes memory returndata = to.functionCall( + abi.encodeWithSelector(IERC721Receiver(to).onERC721Received.selector, _msgSender(), from, tokenId, _data), + "ERC721: transfer to non ERC721Receiver implementer" + ); + bytes4 retval = abi.decode(returndata, (bytes4)); + return (retval == _ERC721_RECEIVED); + } + + /** + * @dev Approve `to` to operate on `tokenId` + * + * Emits an {Approval} event. + */ + function _approve(address to, uint256 tokenId) internal virtual { + _tokenApprovals[tokenId] = to; + emit Approval(ERC721.ownerOf(tokenId), to, tokenId); // internal owner + } + + /** + * @dev Hook that is called before any token transfer. This includes minting + * and burning. + * + * Calling conditions: + * + * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be + * transferred to `to`. + * - When `from` is zero, `tokenId` will be minted for `to`. + * - When `to` is zero, ``from``'s `tokenId` will be burned. + * - `from` cannot be the zero address. + * - `to` cannot be the zero address. + * + * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. + */ + function _beforeTokenTransfer( + address from, + address to, + uint256 tokenId + ) internal virtual {} +} + +// File @openzeppelin/contracts/token/ERC721/ERC721Burnable.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + +/** + * @title ERC721 Burnable Token + * @dev ERC721 Token that can be irreversibly burned (destroyed). + */ +abstract contract ERC721Burnable is Context, ERC721 { + /** + * @dev Burns `tokenId`. See {ERC721-_burn}. + * + * Requirements: + * + * - The caller must own `tokenId` or be an approved operator. + */ + function burn(uint256 tokenId) public virtual { + //solhint-disable-next-line max-line-length + require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721Burnable: caller is not owner nor approved"); + _burn(tokenId); + } +} + +// File @openzeppelin/contracts/utils/Pausable.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + +/** + * @dev Contract module which allows children to implement an emergency stop + * mechanism that can be triggered by an authorized account. + * + * This module is used through inheritance. It will make available the + * modifiers `whenNotPaused` and `whenPaused`, which can be applied to + * the functions of your contract. Note that they will not be pausable by + * simply including this module, only once the modifiers are put in place. + */ +abstract contract Pausable is Context { + /** + * @dev Emitted when the pause is triggered by `account`. + */ + event Paused(address account); + + /** + * @dev Emitted when the pause is lifted by `account`. + */ + event Unpaused(address account); + + bool private _paused; + + /** + * @dev Initializes the contract in unpaused state. + */ + constructor() internal { + _paused = false; + } + + /** + * @dev Returns true if the contract is paused, and false otherwise. + */ + function paused() public view virtual returns (bool) { + return _paused; + } + + /** + * @dev Modifier to make a function callable only when the contract is not paused. + * + * Requirements: + * + * - The contract must not be paused. + */ + modifier whenNotPaused() { + require(!paused(), "Pausable: paused"); + _; + } + + /** + * @dev Modifier to make a function callable only when the contract is paused. + * + * Requirements: + * + * - The contract must be paused. + */ + modifier whenPaused() { + require(paused(), "Pausable: not paused"); + _; + } + + /** + * @dev Triggers stopped state. + * + * Requirements: + * + * - The contract must not be paused. + */ + function _pause() internal virtual whenNotPaused { + _paused = true; + emit Paused(_msgSender()); + } + + /** + * @dev Returns to normal state. + * + * Requirements: + * + * - The contract must be paused. + */ + function _unpause() internal virtual whenPaused { + _paused = false; + emit Unpaused(_msgSender()); + } +} + +// File @openzeppelin/contracts/token/ERC721/ERC721Pausable.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + +/** + * @dev ERC721 token with pausable token transfers, minting and burning. + * + * Useful for scenarios such as preventing trades until the end of an evaluation + * period, or having an emergency switch for freezing all token transfers in the + * event of a large bug. + */ +abstract contract ERC721Pausable is ERC721, Pausable { + /** + * @dev See {ERC721-_beforeTokenTransfer}. + * + * Requirements: + * + * - the contract must not be paused. + */ + function _beforeTokenTransfer( + address from, + address to, + uint256 tokenId + ) internal virtual override { + super._beforeTokenTransfer(from, to, tokenId); + + require(!paused(), "ERC721Pausable: token transfer while paused"); + } +} + +// File @openzeppelin/contracts/presets/ERC721PresetMinterPauserAutoId.sol@v3.4.1 + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + +/** + * @dev {ERC721} token, including: + * + * - ability for holders to burn (destroy) their tokens + * - a minter role that allows for token minting (creation) + * - a pauser role that allows to stop all token transfers + * - token ID and URI autogeneration + * + * This contract uses {AccessControl} to lock permissioned functions using the + * different roles - head to its documentation for details. + * + * The account that deploys the contract will be granted the minter and pauser + * roles, as well as the default admin role, which will let it grant both minter + * and pauser roles to other accounts. + */ +contract ERC721PresetMinterPauserAutoId is Context, AccessControl, ERC721Burnable, ERC721Pausable { + using Counters for Counters.Counter; + + bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); + bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); + + Counters.Counter private _tokenIdTracker; + + /** + * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE` and `PAUSER_ROLE` to the + * account that deploys the contract. + * + * Token URIs will be autogenerated based on `baseURI` and their token IDs. + * See {ERC721-tokenURI}. + */ + constructor( + string memory name, + string memory symbol, + string memory baseURI + ) public ERC721(name, symbol) { + _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); + + _setupRole(MINTER_ROLE, _msgSender()); + _setupRole(PAUSER_ROLE, _msgSender()); + + _setBaseURI(baseURI); + } + + /** + * @dev Creates a new token for `to`. Its token ID will be automatically + * assigned (and available on the emitted {IERC721-Transfer} event), and the token + * URI autogenerated based on the base URI passed at construction. + * + * See {ERC721-_mint}. + * + * Requirements: + * + * - the caller must have the `MINTER_ROLE`. + */ + function mint(address to) public virtual { + require(hasRole(MINTER_ROLE, _msgSender()), "ERC721PresetMinterPauserAutoId: must have minter role to mint"); + + // We cannot just use balanceOf to create the new tokenId because tokens + // can be burned (destroyed), so we need a separate counter. + _mint(to, _tokenIdTracker.current()); + _tokenIdTracker.increment(); + } + + /** + * @dev Pauses all token transfers. + * + * See {ERC721Pausable} and {Pausable-_pause}. + * + * Requirements: + * + * - the caller must have the `PAUSER_ROLE`. + */ + function pause() public virtual { + require(hasRole(PAUSER_ROLE, _msgSender()), "ERC721PresetMinterPauserAutoId: must have pauser role to pause"); + _pause(); + } + + /** + * @dev Unpauses all token transfers. + * + * See {ERC721Pausable} and {Pausable-_unpause}. + * + * Requirements: + * + * - the caller must have the `PAUSER_ROLE`. + */ + function unpause() public virtual { + require(hasRole(PAUSER_ROLE, _msgSender()), "ERC721PresetMinterPauserAutoId: must have pauser role to unpause"); + _unpause(); + } + + function _beforeTokenTransfer( + address from, + address to, + uint256 tokenId + ) internal virtual override(ERC721, ERC721Pausable) { + super._beforeTokenTransfer(from, to, tokenId); + } +} + +// File contracts/Libraries/CurrentTime.sol + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.6 <0.9.0; + +contract CurrentTime { + function currentTime() internal view virtual returns (uint256) { + return block.timestamp; + } +} + +// File contracts/CryptOrchidGoerli/CryptOrchidGoerli.sol + +// SPDX-License-Identifier: MIT + +// NB: this is only meant to deploy to goerli, where chainlink VRF is unavailable. +// goerli connects to polygon mumbai, which is what we need to test PoS bridging. +// Deploy scripts prevent other contracts from goerli deploy, and this contract from +// anything other than goerlui +pragma solidity >=0.6.6 <0.9.0; + +contract CryptOrchidGoerli is ERC721PresetMinterPauserAutoId, Ownable, CurrentTime { + using SafeMath for uint256; + using Strings for string; + using Counters for Counters.Counter; + + struct CryptOrchid { + string species; + uint256 plantedAt; + uint256 waterLevel; + } + mapping(uint256 => CryptOrchid) public cryptorchids; + + enum Stage {Unsold, Seed, Flower, Dead} + + bool internal saleStarted = false; + bool internal growingStarted = false; + + uint256 public constant MAX_CRYPTORCHIDS = 10000; + uint256 public constant GROWTH_CYCLE = 604800; // 7 days + uint256 public constant WATERING_WINDOW = 10800; // 3 hours + uint256 internal constant MAX_TIMESTAMP = 2**256 - 1; + string internal constant GRANUM_IPFS = "QmWd1mn7DuGyx9ByfNeqCsgdSUsJZ1cragitgaygsqDvEm"; + + uint16[10] private limits = [0, 3074, 6074, 8074, 9074, 9574, 9824, 9924, 9974, 9999]; + string[10] private genum = [ + "shenzhenica orchidaceae", + "phalaenopsis micholitzii", + "guarianthe aurantiaca", + "vanda coerulea", + "cypripedium calceolus", + "paphiopedilum vietnamense", + "miltonia kayasimae", + "platanthera azorica", + "dendrophylax lindenii", + "paphiopedilum rothschildianum" + ]; + + string[10] private speciesIPFSConstant = [ + "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/shenzhenica-orchidaceae.json", + "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/phalaenopsis-micholitzii.json", + "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/guarianthe-aurantiaca.json", + "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/vanda-coerulea.json", + "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/cypripedium-calceolus.json", + "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/paphiopedilum-vietnamense.json", + "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/miltonia-kayasimae.json", + "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/platanthera-azorica.json", + "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/dendrophylax-lindenii.json", + "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/paphiopedilum-rothschildianum.json" + ]; + + string[10] private deadSpeciesIPFSConstant = [ + "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/shenzhenica-orchidaceae.json", + "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/phalaenopsis-micholitzii.json", + "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/guarianthe-aurantiaca.json", + "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/vanda-coerulea.json", + "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/cypripedium-calceolus.json", + "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/paphiopedilum-vietnamense.json", + "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/miltonia-kayasimae.json", + "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/platanthera-azorica.json", + "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/dendrophylax-lindenii.json", + "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/paphiopedilum-rothschildianum.json" + ]; + + Counters.Counter private _tokenIds; + + mapping(bytes32 => uint256) public requestToToken; + mapping(bytes32 => string) private speciesIPFS; + mapping(bytes32 => string) private deadSpeciesIPFS; + + constructor() public payable ERC721PresetMinterPauserAutoId("CryptOrchids", "ORCHD", "ipfs://") { + for (uint256 index = 0; index < genum.length; index++) { + speciesIPFS[keccak256(abi.encode(genum[index]))] = speciesIPFSConstant[index]; + deadSpeciesIPFS[keccak256(abi.encode(genum[index]))] = deadSpeciesIPFSConstant[index]; + } + } + + function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { + (string memory species, , , ) = getTokenMetadata(tokenId); + + if (growthStage(tokenId) == Stage.Seed) { + return string(abi.encodePacked(baseURI(), GRANUM_IPFS)); + } + + if (growthStage(tokenId) == Stage.Flower) { + return string(abi.encodePacked(baseURI(), speciesIPFS[keccak256(abi.encode(species))])); + } + + return string(abi.encodePacked(baseURI(), deadSpeciesIPFS[keccak256(abi.encode(species))])); + } + + function _beforeTokenTransfer( + address from, + address to, + uint256 tokenId + ) internal virtual override { + require(address(0) == to || alive(tokenId), "Dead CryptOrchids cannot be transferred"); + super._beforeTokenTransfer(from, to, tokenId); + } + + function currentPrice() public view returns (uint256 price) { + uint256 currentSupply = totalSupply(); + if (currentSupply >= 9900) { + return 1000000000000000000; // 9900+: 1.00 ETH + } else if (currentSupply >= 9500) { + return 640000000000000000; // 9500-9500: 0.64 ETH + } else if (currentSupply >= 7500) { + return 320000000000000000; // 7500-9500: 0.32 ETH + } else if (currentSupply >= 3500) { + return 160000000000000000; // 3500-7500: 0.16 ETH + } else if (currentSupply >= 1500) { + return 80000000000000000; // 1500-3500: 0.08 ETH + } else if (currentSupply >= 500) { + return 60000000000000000; // 500-1500: 0.06 ETH + } else { + return 40000000000000000; // 0 - 500 0.04 ETH + } + } + + function startSale() public onlyOwner { + saleStarted = true; + } + + function startGrowing() public onlyOwner { + growingStarted = true; + } + + /** + * @dev Withdraw ether from this contract (Callable by owner only) + */ + function withdraw() public onlyOwner { + uint256 balance = address(this).balance; + msg.sender.transfer(balance); + } + + receive() external payable {} + + function webMint(uint256 units) public payable { + require(saleStarted, "The Nursery is closed"); + require(units <= MAX_CRYPTORCHIDS - totalSupply(), "Not enough bulbs left"); + require(totalSupply() < MAX_CRYPTORCHIDS, "Sale has already ended"); + require(units > 0 && units <= 20, "You can plant minimum 1, maximum 20 CryptOrchids"); + require(SafeMath.add(totalSupply(), units) <= MAX_CRYPTORCHIDS, "Exceeds MAX_CRYPTORCHIDS"); + require(msg.value >= SafeMath.mul(currentPrice(), units), "Ether value sent is below the price"); + + for (uint256 i = 0; i < units; i++) { + _tokenIds.increment(); + uint256 newItemId = _tokenIds.current(); + cryptorchids[newItemId] = CryptOrchid({species: "granum", plantedAt: MAX_TIMESTAMP, waterLevel: 0}); + _safeMint(msg.sender, newItemId); + } + } + + function germinate(uint256 tokenId, uint256 userProvidedSeed) public { + require(growingStarted, "Germination starts 2021-04-12T16:00:00Z"); + require(_isApprovedOrOwner(_msgSender(), tokenId), "Only the Owner can germinate a CryptOrchid."); + _requestRandom(tokenId, userProvidedSeed); + } + + function _requestRandom(uint256 tokenId, uint256 userProvidedSeed) internal returns (bytes32 requestId) { + uint256 pseudoRand = uint256(keccak256(abi.encodePacked(block.timestamp, block.difficulty, userProvidedSeed))); + fulfillRandomness(tokenId, pseudoRand); + } + + function fulfillRandomness(uint256 tokenId, uint256 randomness) internal { + CryptOrchid storage orchid = cryptorchids[tokenId]; + string memory species = pickSpecies(SafeMath.mod(randomness, 10000)); + orchid.species = species; + orchid.plantedAt = currentTime(); + address tokenOwner = ownerOf(tokenId); + } + + function alive(uint256 tokenId) public view returns (bool) { + return growthStage(tokenId) != Stage.Dead; + } + + function flowering(uint256 tokenId) public view returns (bool) { + return growthStage(tokenId) == Stage.Flower; + } + + function growthStage(uint256 tokenId) public view returns (Stage) { + CryptOrchid memory orchid = cryptorchids[tokenId]; + if (orchid.plantedAt == 0) return Stage.Unsold; + if (orchid.plantedAt == MAX_TIMESTAMP) return Stage.Seed; + uint256 currentWaterLevel = orchid.waterLevel; + uint256 elapsed = currentTime() - orchid.plantedAt; + uint256 fullCycles = SafeMath.div(uint256(elapsed), GROWTH_CYCLE); + uint256 modulo = SafeMath.mod(elapsed, GROWTH_CYCLE); + + if (currentWaterLevel == fullCycles) { + return Stage.Flower; + } + + if (SafeMath.add(currentWaterLevel, 1) == fullCycles && modulo < WATERING_WINDOW) { + return Stage.Flower; + } + + return Stage.Dead; + } + + function water(uint256 tokenId) public { + require(_isApprovedOrOwner(_msgSender(), tokenId), "Only the Owner can water a CryptOrchid."); + + if (!alive(tokenId)) { + return; + } + + CryptOrchid storage orchid = cryptorchids[tokenId]; + + uint256 wateringLevel = orchid.waterLevel; + uint256 elapsed = currentTime() - orchid.plantedAt; + uint256 fullCycles = SafeMath.div(uint256(elapsed), GROWTH_CYCLE); + + if (wateringLevel > fullCycles) { + return; + } + + uint256 newWaterLevel = SafeMath.add(wateringLevel, 1); + orchid.waterLevel = newWaterLevel; + } + + function getTokenMetadata(uint256 tokenId) + public + view + returns ( + string memory, + uint256, + uint256, + Stage + ) + { + return ( + cryptorchids[tokenId].species, + cryptorchids[tokenId].plantedAt, + cryptorchids[tokenId].waterLevel, + growthStage(tokenId) + ); + } + + /** + * @notice Pick species for random number index + * @param randomIndex uint256 + * @return species string + */ + function pickSpecies(uint256 randomIndex) private view returns (string memory) { + for (uint256 i = 0; i < 10; i++) { + if (randomIndex <= limits[i]) { + return genum[i]; + } + } + } +} + +// File contracts/Libraries/matic/common/AccessControlMixin.sol + +pragma solidity 0.6.6; + +contract AccessControlMixin is AccessControl { + string private _revertMsg; + + function _setupContractId(string memory contractId) internal { + _revertMsg = string(abi.encodePacked(contractId, ": INSUFFICIENT_PERMISSIONS")); + } + + modifier only(bytes32 role) { + require(hasRole(role, _msgSender()), _revertMsg); + _; + } +} + +// File contracts/Libraries/matic/child/ChildToken/IChildToken.sol + +pragma solidity 0.6.6; + +interface IChildToken { + function deposit(address user, bytes calldata depositData) external; +} + +// File contracts/Libraries/matic/common/Initializable.sol + +pragma solidity 0.6.6; + +contract Initializable { + bool inited = false; + + modifier initializer() { + require(!inited, "already inited"); + _; + inited = true; + } +} + +// File contracts/Libraries/matic/common/EIP712Base.sol + +pragma solidity 0.6.6; + +contract EIP712Base is Initializable { + struct EIP712Domain { + string name; + string version; + address verifyingContract; + bytes32 salt; + } + + string public constant ERC712_VERSION = "1"; + + bytes32 internal constant EIP712_DOMAIN_TYPEHASH = keccak256( + bytes("EIP712Domain(string name,string version,address verifyingContract,bytes32 salt)") + ); + bytes32 internal domainSeperator; + + // supposed to be called once while initializing. + // one of the contractsa that inherits this contract follows proxy pattern + // so it is not possible to do this in a constructor + function _initializeEIP712(string memory name) internal initializer { + _setDomainSeperator(name); + } + + function _setDomainSeperator(string memory name) internal { + domainSeperator = keccak256( + abi.encode( + EIP712_DOMAIN_TYPEHASH, + keccak256(bytes(name)), + keccak256(bytes(ERC712_VERSION)), + address(this), + bytes32(getChainId()) + ) + ); + } + + function getDomainSeperator() public view returns (bytes32) { + return domainSeperator; + } + + function getChainId() public pure returns (uint256) { + uint256 id; + assembly { + id := chainid() + } + return id; + } + + /** + * Accept message hash and returns hash message in EIP712 compatible form + * So that it can be used to recover signer from signature signed using EIP712 formatted data + * https://eips.ethereum.org/EIPS/eip-712 + * "\\x19" makes the encoding deterministic + * "\\x01" is the version byte to make it compatible to EIP-191 + */ + function toTypedMessageHash(bytes32 messageHash) internal view returns (bytes32) { + return keccak256(abi.encodePacked("\x19\x01", getDomainSeperator(), messageHash)); + } +} + +// File contracts/Libraries/matic/common/NativeMetaTransaction.sol + +pragma solidity 0.6.6; + +contract NativeMetaTransaction is EIP712Base { + using SafeMath for uint256; + bytes32 private constant META_TRANSACTION_TYPEHASH = keccak256( + bytes("MetaTransaction(uint256 nonce,address from,bytes functionSignature)") + ); + event MetaTransactionExecuted(address userAddress, address payable relayerAddress, bytes functionSignature); + mapping(address => uint256) nonces; + + /* + * Meta transaction structure. + * No point of including value field here as if user is doing value transfer then he has the funds to pay for gas + * He should call the desired function directly in that case. + */ + struct MetaTransaction { + uint256 nonce; + address from; + bytes functionSignature; + } + + function executeMetaTransaction( + address userAddress, + bytes memory functionSignature, + bytes32 sigR, + bytes32 sigS, + uint8 sigV + ) public payable returns (bytes memory) { + MetaTransaction memory metaTx = MetaTransaction({ + nonce: nonces[userAddress], + from: userAddress, + functionSignature: functionSignature + }); + + require(verify(userAddress, metaTx, sigR, sigS, sigV), "Signer and signature do not match"); + + // increase nonce for user (to avoid re-use) + nonces[userAddress] = nonces[userAddress].add(1); + + emit MetaTransactionExecuted(userAddress, msg.sender, functionSignature); + + // Append userAddress and relayer address at the end to extract it from calling context + (bool success, bytes memory returnData) = address(this).call(abi.encodePacked(functionSignature, userAddress)); + require(success, "Function call not successful"); + + return returnData; + } + + function hashMetaTransaction(MetaTransaction memory metaTx) internal pure returns (bytes32) { + return + keccak256( + abi.encode(META_TRANSACTION_TYPEHASH, metaTx.nonce, metaTx.from, keccak256(metaTx.functionSignature)) + ); + } + + function getNonce(address user) public view returns (uint256 nonce) { + nonce = nonces[user]; + } + + function verify( + address signer, + MetaTransaction memory metaTx, + bytes32 sigR, + bytes32 sigS, + uint8 sigV + ) internal view returns (bool) { + require(signer != address(0), "NativeMetaTransaction: INVALID_SIGNER"); + return signer == ecrecover(toTypedMessageHash(hashMetaTransaction(metaTx)), sigV, sigR, sigS); + } +} + +// File contracts/Libraries/matic/common/ContextMixin.sol + +pragma solidity 0.6.6; + +abstract contract ContextMixin { + function msgSender() internal view returns (address payable sender) { + if (msg.sender == address(this)) { + bytes memory array = msg.data; + uint256 index = msg.data.length; + assembly { + // Load the 32 bytes word from memory with the address on the lower 20 bytes, and mask those. + sender := and(mload(add(array, index)), 0xffffffffffffffffffffffffffffffffffffffff) + } + } else { + sender = msg.sender; + } + return sender; + } +} + +// File contracts/Libraries/tunnel/FxBaseChildTunnel.sol + +// SPDX-License-Identifier: MIT +pragma solidity >=0.6.6 <0.9.0; + +// IFxMessageProcessor represents interface to process message +interface IFxMessageProcessor { + function processMessageFromRoot( + uint256 stateId, + address rootMessageSender, + bytes calldata data + ) external; +} + +/** + * @notice Mock child tunnel contract to receive and send message from L2 + */ +abstract contract FxBaseChildTunnel is IFxMessageProcessor { + // MessageTunnel on L1 will get data from this event + event MessageSent(bytes message); + + // fx child + address public fxChild; + + // fx root tunnel + address public fxRootTunnel; + + constructor(address _fxChild) internal { + fxChild = _fxChild; + } + + // Sender must be fxRootTunnel in case of ERC20 tunnel + modifier validateSender(address sender) { + require(sender == fxRootTunnel, "FxBaseChildTunnel: INVALID_SENDER_FROM_ROOT"); + _; + } + + // set fxRootTunnel if not set already + function setFxRootTunnel(address _fxRootTunnel) public { + require(fxRootTunnel == address(0x0), "FxBaseChildTunnel: ROOT_TUNNEL_ALREADY_SET"); + fxRootTunnel = _fxRootTunnel; + } + + function processMessageFromRoot( + uint256 stateId, + address rootMessageSender, + bytes memory data + ) public override { + require(msg.sender == fxChild, "FxBaseChildTunnel: INVALID_SENDER"); + _processMessageFromRoot(stateId, rootMessageSender, data); + } + + /** + * @notice Emit message that can be received on Root Tunnel + * @dev Call the internal function when need to emit message + * @param message bytes message that will be sent to Root Tunnel + * some message examples - + * abi.encode(tokenId); + * abi.encode(tokenId, tokenMetadata); + * abi.encode(messageType, messageData); + */ + function _sendMessageToRoot(bytes memory message) internal { + emit MessageSent(message); + } + + /** + * @notice Process message received from Root Tunnel + * @dev function needs to be implemented to handle message as per requirement + * This is called by onStateReceive function. + * Since it is called via a system call, any event will not be emitted during its execution. + * @param stateId unique state id + * @param sender root message sender + * @param message bytes message that was sent from Root Tunnel + */ + function _processMessageFromRoot( + uint256 stateId, + address sender, + bytes memory message + ) internal virtual; +} + +// File contracts/CryptOrchidERC721Child/CryptOrchidERC721Child.sol + +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.6 <0.9.0; + +contract CryptOrchidERC721Child is + CryptOrchidGoerli, + IChildToken, + AccessControlMixin, + NativeMetaTransaction, + ContextMixin, + FxBaseChildTunnel +{ + bytes32 public constant DEPOSITOR_ROLE = keccak256("DEPOSITOR_ROLE"); + + // limit batching of tokens due to gas limit restrictions + uint256 public constant BATCH_LIMIT = 20; + + event WithdrawnBatch(address indexed user, uint256[] tokenIds); + event TransferWithMetadata(address indexed from, address indexed to, uint256 indexed tokenId, bytes metaData); + + constructor(address childChainManager, address _fxChild) public CryptOrchidGoerli() FxBaseChildTunnel(_fxChild) { + _setupContractId("CryptOrchidERC721Child"); + _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); + _setupRole(DEPOSITOR_ROLE, childChainManager); + _initializeEIP712("CryptOrchids"); + } + + // This is to support Native meta transactions + // never use msg.sender directly, use _msgSender() instead + function _msgSender() internal view override returns (address payable sender) { + return ContextMixin.msgSender(); + } + + /** + * @notice called when token is deposited on root chain + * @dev Should be callable only by ChildChainManager + * Should handle deposit by minting the required tokenId for user + * Make sure minting is done only by this function + * @param user user address for whom deposit is being done + * @param depositData abi encoded tokenId + */ + function deposit(address user, bytes calldata depositData) external override only(DEPOSITOR_ROLE) { + // deposit single + if (depositData.length == 32) { + uint256 tokenId = abi.decode(depositData, (uint256)); + _mint(user, tokenId); + + // deposit batch + } else { + uint256[] memory tokenIds = abi.decode(depositData, (uint256[])); + uint256 length = tokenIds.length; + for (uint256 i; i < length; i++) { + _mint(user, tokenIds[i]); + } + } + } + + /** + * @notice called when user wants to withdraw token back to root chain + * @dev Should burn user's token. This transaction will be verified when exiting on root chain + * @param tokenId tokenId to withdraw + */ + function withdraw(uint256 tokenId) external { + require(_msgSender() == ownerOf(tokenId), "ChildERC721: INVALID_TOKEN_OWNER"); + _burn(tokenId); + } + + /** + * @notice called when user wants to withdraw multiple tokens back to root chain + * @dev Should burn user's tokens. This transaction will be verified when exiting on root chain + * @param tokenIds tokenId list to withdraw + */ + function withdrawBatch(uint256[] calldata tokenIds) external { + uint256 length = tokenIds.length; + require(length <= BATCH_LIMIT, "ChildERC721: EXCEEDS_BATCH_LIMIT"); + for (uint256 i; i < length; i++) { + uint256 tokenId = tokenIds[i]; + require( + _msgSender() == ownerOf(tokenId), + string(abi.encodePacked("ChildERC721: INVALID_TOKEN_OWNER ", tokenId)) + ); + _burn(tokenId); + } + emit WithdrawnBatch(_msgSender(), tokenIds); + } + + /** + * @notice called when user wants to withdraw token back to root chain with arbitrary metadata + * @dev Should handle withraw by burning user's token. + * + * This transaction will be verified when exiting on root chain + * + * @param tokenId tokenId to withdraw + */ + function withdrawWithMetadata(uint256 tokenId) external { + require(_msgSender() == ownerOf(tokenId), "ChildERC721: INVALID_TOKEN_OWNER"); + + // Encoding metadata associated with tokenId & emitting event + emit TransferWithMetadata(_msgSender(), address(0), tokenId, this.encodeTokenMetadata(tokenId)); + + _burn(tokenId); + } + + /** + * @notice This method is supposed to be called by client when withdrawing token with metadata + * and pass return value of this function as second paramter of `withdrawWithMetadata` method + * + * It can be overridden by clients to encode data in a different form, which needs to + * be decoded back by them correctly during exiting + * + * @param tokenId Token for which URI to be fetched + */ + function encodeTokenMetadata(uint256 tokenId) external view virtual returns (bytes memory) { + // You're always free to change this default implementation + // and pack more data in byte array which can be decoded back + // in L1 + return abi.encode(tokenURI(tokenId)); + } + + function _processMessageFromRoot( + uint256 stateId, + address sender, + bytes memory data + ) internal override validateSender(sender) { + (string memory species, uint256 plantedAt, uint256 waterLevel, uint256 tokenId) = abi.decode( + data, + (string, uint256, uint256, uint256) + ); + cryptorchids[tokenId] = CryptOrchid({species: species, plantedAt: plantedAt, waterLevel: waterLevel}); + } + + function sendMessageToRoot(bytes memory message) public { + _sendMessageToRoot(message); + } +} diff --git a/hardhat.config.ts b/hardhat.config.ts index ba66a07..0eb1d95 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -14,7 +14,7 @@ const config: HardhatUserConfig = { settings: { optimizer: { enabled: true, - runs: 1000, + runs: 200, }, }, }, @@ -55,6 +55,20 @@ const config: HardhatUserConfig = { url: node_url('kovan'), accounts: accounts('kovan'), }, + goerli: { + url: node_url('goerli'), + accounts: accounts('goerli'), + timeout: 60000, + }, + matic: { + url: 'https://rpc-mumbai.maticvigil.com', + accounts: accounts('matic'), + }, + mumbai: { + url: 'https://rpc-mumbai.maticvigil.com', + accounts: accounts('mumbai'), + chainId: 80001, + }, staging: { url: node_url('kovan'), accounts: accounts('kovan'), diff --git a/package.json b/package.json index fb83287..1397a58 100644 --- a/package.json +++ b/package.json @@ -87,8 +87,5 @@ "graphql-request": "^3.4.0", "node-fetch": "2.6.1", "yargs-parser": "^20.2.7" - }, - "engines": { - "node": "14" } } diff --git a/scripts.js b/scripts.js index 40ae0e9..95e8000 100644 --- a/scripts.js +++ b/scripts.js @@ -38,7 +38,9 @@ program .description('deploy to network') .action(async (network, extra) => { await execute( - `hardhat --network ${network} deploy ${extra ? extra.join(' ') : ''}` + `hardhat --network ${network} deploy --reset ${ + extra ? extra.join(' ') : '' + }` ); }); diff --git a/utils/network.ts b/utils/network.ts index 638d6bf..9284395 100644 --- a/utils/network.ts +++ b/utils/network.ts @@ -36,6 +36,18 @@ export function chainlinkEnv(networkName: string): Record { } export function deploymentForEnv(networkName: string): Record { + if (networkName == 'goerli') { + const { + abi, + address, + // eslint-disable-next-line @typescript-eslint/no-var-requires + } = require(`../deployments/${networkName}/CryptOrchidGoerli.json`); + + return { + address, + abi, + }; + } const { abi, address, diff --git a/yarn-error.log b/yarn-error.log new file mode 100644 index 0000000..bf415d9 --- /dev/null +++ b/yarn-error.log @@ -0,0 +1,11628 @@ +Arguments: + /usr/local/Cellar/node/14.9.0/bin/node /usr/local/Cellar/yarn/1.22.5/libexec/bin/yarn.js add fx-portal + +PATH: + /Users/samuelsbauch/.rbenv/shims:/usr/local/bin:/usr/local/sbin:/Users/samuelsbauch/.nvm/versions/node/v16.0.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Applications/Postgres.app/Contents/Versions/latest/bin:/Users/samuelsbauch/.rbenv/shims:/usr/local/sbin:/Users/samuelsbauch/.nvm/versions/node/v16.0.0/bin:/Users/samuelsbauch/Library/Android/sdk/emulator:/Users/samuelsbauch/Library/Android/sdk/tools:/Users/samuelsbauch/Library/Android/sdk/tools/bin:/Users/samuelsbauch/Library/Android/sdk/platform-tools:/Users/samuelsbauch/Library/Python/3.8/bin:/Users/samuelsbauch/Library/Android/sdk/emulator:/Users/samuelsbauch/Library/Android/sdk/tools:/Users/samuelsbauch/Library/Android/sdk/tools/bin:/Users/samuelsbauch/Library/Android/sdk/platform-tools:/Users/samuelsbauch/Library/Python/3.8/bin + +Yarn version: + 1.22.5 + +Node version: + 14.9.0 + +Platform: + darwin x64 + +Trace: + Error: https://registry.yarnpkg.com/fx-portal: Not found + at Request.params.callback [as _callback] (/usr/local/Cellar/yarn/1.22.5/libexec/lib/cli.js:66988:18) + at Request.self.callback (/usr/local/Cellar/yarn/1.22.5/libexec/lib/cli.js:140749:22) + at Request.emit (events.js:314:20) + at Request. (/usr/local/Cellar/yarn/1.22.5/libexec/lib/cli.js:141721:10) + at Request.emit (events.js:314:20) + at IncomingMessage. (/usr/local/Cellar/yarn/1.22.5/libexec/lib/cli.js:141643:12) + at Object.onceWrapper (events.js:420:28) + at IncomingMessage.emit (events.js:326:22) + at endReadableNT (_stream_readable.js:1244:12) + at processTicksAndRejections (internal/process/task_queues.js:80:21) + +npm manifest: + { + "name": "template-ethereum-contracts", + "version": "0.1.0", + "description": "Template to develop ethereum smart contracts", + "repository": "github:wighawag/template-ethereum-contracts", + "author": "wighawag", + "license": "MIT", + "keywords": [ + "ethereum", + "smart-contracts", + "template", + "boilerplate", + "hardhat", + "solidity" + ], + "resolutions": { + "websocket": "1.0.32" + }, + "devDependencies": { + "@ethersproject/wallet": "^5.0.5", + "@nomiclabs/buidler-etherscan": "^2.1.0", + "@nomiclabs/hardhat-etherscan": "^2.1.1", + "@openzeppelin/contracts": "^3.4.1", + "@typechain/ethers-v5": "^6.0.0", + "@typechain/hardhat": "^1.0.1", + "@types/chai": "^4.2.11", + "@types/mocha": "^8.0.2", + "@types/node": "^14.10.2", + "@typescript-eslint/eslint-plugin": "^4.6.0", + "@typescript-eslint/parser": "^4.6.0", + "chai": "^4.2.0", + "chai-ethers": "^0.0.1", + "commander": "^7.1.0", + "cross-env": "^7.0.2", + "date-fns": "^2.19.0", + "dotenv": "^8.2.0", + "eslint": "^7.7.0", + "eslint-config-prettier": "^6.11.0", + "ethereum-waffle": "^3.3.0", + "ethers": "^5.0.17", + "fs-extra": "^9.0.1", + "hardhat": "^2.1.2", + "hardhat-deploy": "^0.7.0-beta.47", + "hardhat-deploy-ethers": "^0.3.0-beta.7", + "hardhat-gas-reporter": "^1.0.4", + "lodash": "^4.17.21", + "mocha": "^8.1.1", + "prettier": "^2.0.5", + "prettier-plugin-solidity": "^1.0.0-alpha.57", + "sinon": "^10.0.0", + "solhint": "^3.3.1", + "solhint-plugin-prettier": "^0.0.5", + "solidity-coverage": "^0.7.15", + "ts-generator": "^0.1.1", + "ts-node": "^9.0.0", + "typechain": "^4.0.2", + "typescript": "^4.0.5" + }, + "scripts": { + "prepare": "node ./.setup.js && hardhat typechain", + "lint": "eslint \"**/*.{js,ts}\" && solhint src/**/*.sol", + "lint:fix": "eslint --fix \"**/*.{js,ts}\" && solhint --fix src/**/*.sol", + "format": "prettier --check \"**/*.{ts,js,sol}\"", + "format:fix": "prettier --write \"**/*.{ts,js,sol}\"", + "compile": "hardhat compile", + "void:deploy": "hardhat deploy", + "test": "cross-env HARDHAT_DEPLOY_FIXTURE=true HARDHAT_COMPILE=true mocha --bail --recursive test", + "gas": "cross-env REPORT_GAS=true hardhat test", + "coverage": "cross-env HARDHAT_DEPLOY_FIXTURE=true hardhat coverage", + "dev": "hardhat node --watch --export contractsInfo.json", + "local:dev": "hardhat --network localhost deploy --watch", + "exec": "node ./scripts.js run", + "deploy": "node ./scripts.js deploy", + "deploy-assets": "ts-node arweave/deployAssets.ts", + "export": "node ./scripts.js export", + "fork:exec": "node ./scripts.js fork:run", + "fork:deploy": "node ./scripts.js fork:deploy", + "fork:dev": "node ./scripts.js fork:dev", + "fork:test": "node ./scripts.js fork:test" + }, + "dependencies": { + "@chainlink/contracts": "^0.1.6", + "@nomiclabs/hardhat-ethers": "^2.0.2", + "@poanet/solidity-flattener": "^3.0.6", + "arweave": "^1.10.13", + "glob": "^7.1.6", + "graphql": "^15.5.0", + "graphql-request": "^3.4.0", + "node-fetch": "2.6.1", + "yargs-parser": "^20.2.7" + } + } + +yarn manifest: + No manifest + +Lockfile: + # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. + # yarn lockfile v1 + + + "@babel/code-frame@^7.0.0": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.10.4.tgz#168da1a36e90da68ae8d49c0f1b48c7c6249213a" + integrity sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg== + dependencies: + "@babel/highlight" "^7.10.4" + + "@babel/helper-validator-identifier@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz#a78c7a7251e01f616512d31b10adcf52ada5e0d2" + integrity sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw== + + "@babel/highlight@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.10.4.tgz#7d1bdfd65753538fabe6c38596cdb76d9ac60143" + integrity sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA== + dependencies: + "@babel/helper-validator-identifier" "^7.10.4" + chalk "^2.0.0" + js-tokens "^4.0.0" + + "@chainlink/contracts@^0.1.6": + version "0.1.6" + resolved "https://registry.yarnpkg.com/@chainlink/contracts/-/contracts-0.1.6.tgz#e4795565c723f99adaf6e97382cfb41dff0bcf91" + integrity sha512-RXKMm+3ADEi1c4/XsXy2Z1m0KQh7H6Nn0FWXmCgXRIorOBt7dvh52c0c41ONJfIhHB/tGeoXnp4lPnZEDqkocA== + optionalDependencies: + "@truffle/contract" "^4.2.29" + ethers "^4.0.45" + + "@ensdomains/ens@^0.4.4": + version "0.4.5" + resolved "https://registry.yarnpkg.com/@ensdomains/ens/-/ens-0.4.5.tgz#e0aebc005afdc066447c6e22feb4eda89a5edbfc" + integrity sha512-JSvpj1iNMFjK6K+uVl4unqMoa9rf5jopb8cya5UGBWz23Nw8hSNT7efgUx4BTlAPAgpNlEioUfeTyQ6J9ZvTVw== + dependencies: + bluebird "^3.5.2" + eth-ens-namehash "^2.0.8" + solc "^0.4.20" + testrpc "0.0.1" + web3-utils "^1.0.0-beta.31" + + "@ensdomains/resolver@^0.2.4": + version "0.2.4" + resolved "https://registry.yarnpkg.com/@ensdomains/resolver/-/resolver-0.2.4.tgz#c10fe28bf5efbf49bff4666d909aed0265efbc89" + integrity sha512-bvaTH34PMCbv6anRa9I/0zjLJgY4EuznbEMgbV77JBCQ9KNC46rzi0avuxpOfu+xDjPEtSFGqVEOr5GlUSGudA== + + "@eslint/eslintrc@^0.2.1": + version "0.2.1" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.2.1.tgz#f72069c330461a06684d119384435e12a5d76e3c" + integrity sha512-XRUeBZ5zBWLYgSANMpThFddrZZkEbGHgUdt5UJjZfnlN9BGCiUBrf+nvbRupSjMvqzwnQN0qwCmOxITt1cfywA== + dependencies: + ajv "^6.12.4" + debug "^4.1.1" + espree "^7.3.0" + globals "^12.1.0" + ignore "^4.0.6" + import-fresh "^3.2.1" + js-yaml "^3.13.1" + lodash "^4.17.19" + minimatch "^3.0.4" + strip-json-comments "^3.1.1" + + "@ethereum-waffle/chai@^3.3.0": + version "3.3.1" + resolved "https://registry.yarnpkg.com/@ethereum-waffle/chai/-/chai-3.3.1.tgz#3f20b810d0fa516f19af93c50c3be1091333fa8e" + integrity sha512-+vepCjttfOzCSnmiVEmd1bR8ctA2wYVrtWa8bDLhnTpj91BIIHotNDTwpeq7fyjrOCIBTN3Ai8ACfjNoatc4OA== + dependencies: + "@ethereum-waffle/provider" "^3.3.1" + ethers "^5.0.0" + + "@ethereum-waffle/compiler@^3.3.0": + version "3.3.1" + resolved "https://registry.yarnpkg.com/@ethereum-waffle/compiler/-/compiler-3.3.1.tgz#946128fd565aa4347075fd716dbd0f3f38189280" + integrity sha512-X/TeQugt94AQwXEdCjIQxcXYGawNulVBYEBE7nloj4wE/RBxNolXwjoVNjcS4kuiMMbKkdO0JkL5sn6ixx8bDg== + dependencies: + "@resolver-engine/imports" "^0.3.3" + "@resolver-engine/imports-fs" "^0.3.3" + "@typechain/ethers-v5" "^2.0.0" + "@types/mkdirp" "^0.5.2" + "@types/node-fetch" "^2.5.5" + ethers "^5.0.1" + mkdirp "^0.5.1" + node-fetch "^2.6.0" + solc "^0.6.3" + ts-generator "^0.1.1" + typechain "^3.0.0" + + "@ethereum-waffle/ens@^3.2.2": + version "3.2.3" + resolved "https://registry.yarnpkg.com/@ethereum-waffle/ens/-/ens-3.2.3.tgz#970f51e16a140e4e99c7b7831713d645be63aacb" + integrity sha512-OIfguJu4e+NYJHNnNVaFzvNG5WYPntWU1vnQuAFszBFytOeIkv2hAXv8RmRL+cledcvShtP3gmXU3Lvf0o4Sxw== + dependencies: + "@ensdomains/ens" "^0.4.4" + "@ensdomains/resolver" "^0.2.4" + ethers "^5.0.1" + + "@ethereum-waffle/mock-contract@^3.2.2": + version "3.2.2" + resolved "https://registry.yarnpkg.com/@ethereum-waffle/mock-contract/-/mock-contract-3.2.2.tgz#5749b03cbb4850150f81cf66151c4523eb7436f0" + integrity sha512-H60Cc5C7sYNU4LuPMSKDh8YIaN9/fkwEjznY78CEbOosO+lMlFYdA+5VZjeDGDuYKfsBqsocQdkj1CRyoi1KNw== + dependencies: + "@ethersproject/abi" "^5.0.1" + ethers "^5.0.1" + + "@ethereum-waffle/provider@^3.3.0", "@ethereum-waffle/provider@^3.3.1": + version "3.3.1" + resolved "https://registry.yarnpkg.com/@ethereum-waffle/provider/-/provider-3.3.1.tgz#62e13fc45ce918a3992b18e17279e32ed22a01da" + integrity sha512-I7iziCqvkVhfaYKRRjUoEK3JHne5PffLd8dokI9RvDighKn/OA4P8mMb400EGmuDG5NTVTM5hdnTa2jIYwrhyA== + dependencies: + "@ethereum-waffle/ens" "^3.2.2" + ethers "^5.0.1" + ganache-core "^2.10.2" + patch-package "^6.2.2" + postinstall-postinstall "^2.1.0" + + "@ethersproject/abi@5.0.0-beta.153": + version "5.0.0-beta.153" + resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.0.0-beta.153.tgz#43a37172b33794e4562999f6e2d555b7599a8eee" + integrity sha512-aXweZ1Z7vMNzJdLpR1CZUAIgnwjrZeUSvN9syCwlBaEBUFJmFY+HHnfuTI5vIhVs/mRkfJVrbEyl51JZQqyjAg== + dependencies: + "@ethersproject/address" ">=5.0.0-beta.128" + "@ethersproject/bignumber" ">=5.0.0-beta.130" + "@ethersproject/bytes" ">=5.0.0-beta.129" + "@ethersproject/constants" ">=5.0.0-beta.128" + "@ethersproject/hash" ">=5.0.0-beta.128" + "@ethersproject/keccak256" ">=5.0.0-beta.127" + "@ethersproject/logger" ">=5.0.0-beta.129" + "@ethersproject/properties" ">=5.0.0-beta.131" + "@ethersproject/strings" ">=5.0.0-beta.130" + + "@ethersproject/abi@5.0.12", "@ethersproject/abi@^5.0.10": + version "5.0.12" + resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.0.12.tgz#9aebe6aedc05ce45bb6c41b06d80bd195b7de77c" + integrity sha512-Ujr/3bwyYYjXLDQfebeiiTuvOw9XtUKM8av6YkoBeMXyGQM9GkjrQlwJMNwGTmqjATH/ZNbRgCh98GjOLiIB1Q== + dependencies: + "@ethersproject/address" "^5.0.9" + "@ethersproject/bignumber" "^5.0.13" + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/constants" "^5.0.8" + "@ethersproject/hash" "^5.0.10" + "@ethersproject/keccak256" "^5.0.7" + "@ethersproject/logger" "^5.0.8" + "@ethersproject/properties" "^5.0.7" + "@ethersproject/strings" "^5.0.8" + + "@ethersproject/abi@5.0.13", "@ethersproject/abi@^5.0.1": + version "5.0.13" + resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.0.13.tgz#600a559c3730467716595658beaa2894b4352bcc" + integrity sha512-2coOH3D7ra1lwamKEH0HVc+Jbcsw5yfeCgmY8ekhCDualEiyyovD2qDcMBBcY3+kjoLHVTmo7ost6MNClxdOrg== + dependencies: + "@ethersproject/address" "^5.0.9" + "@ethersproject/bignumber" "^5.0.13" + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/constants" "^5.0.8" + "@ethersproject/hash" "^5.0.10" + "@ethersproject/keccak256" "^5.0.7" + "@ethersproject/logger" "^5.0.8" + "@ethersproject/properties" "^5.0.7" + "@ethersproject/strings" "^5.0.8" + + "@ethersproject/abi@5.0.7", "@ethersproject/abi@^5.0.0-beta.146", "@ethersproject/abi@^5.0.2", "@ethersproject/abi@^5.0.5": + version "5.0.7" + resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.0.7.tgz#79e52452bd3ca2956d0e1c964207a58ad1a0ee7b" + integrity sha512-Cqktk+hSIckwP/W8O47Eef60VwmoSC/L3lY0+dIBhQPCNn9E4V7rwmm2aFrNRRDJfFlGuZ1khkQUOc3oBX+niw== + dependencies: + "@ethersproject/address" "^5.0.4" + "@ethersproject/bignumber" "^5.0.7" + "@ethersproject/bytes" "^5.0.4" + "@ethersproject/constants" "^5.0.4" + "@ethersproject/hash" "^5.0.4" + "@ethersproject/keccak256" "^5.0.3" + "@ethersproject/logger" "^5.0.5" + "@ethersproject/properties" "^5.0.3" + "@ethersproject/strings" "^5.0.4" + + "@ethersproject/abstract-provider@5.0.10": + version "5.0.10" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.0.10.tgz#a533aed39a5f27312745c8c4c40fa25fc884831c" + integrity sha512-OSReY5iz94iIaPlRvLiJP8YVIvQLx4aUvMMnHWSaA/vTU8QHZmgNlt4OBdYV1+aFY8Xl+VRYiWBHq72ZDKXXCQ== + dependencies: + "@ethersproject/bignumber" "^5.0.13" + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/logger" "^5.0.8" + "@ethersproject/networks" "^5.0.7" + "@ethersproject/properties" "^5.0.7" + "@ethersproject/transactions" "^5.0.9" + "@ethersproject/web" "^5.0.12" + + "@ethersproject/abstract-provider@5.0.5", "@ethersproject/abstract-provider@^5.0.4": + version "5.0.5" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.0.5.tgz#797a32a8707830af1ad8f833e9c228994d5572b9" + integrity sha512-i/CjElAkzV7vQBAeoz+IpjGfcFYEP9eD7j3fzZ0fzTq03DO7PPnR+xkEZ1IoDXGwDS+55aLM1xvLDwB/Lx6IOQ== + dependencies: + "@ethersproject/bignumber" "^5.0.7" + "@ethersproject/bytes" "^5.0.4" + "@ethersproject/logger" "^5.0.5" + "@ethersproject/networks" "^5.0.3" + "@ethersproject/properties" "^5.0.3" + "@ethersproject/transactions" "^5.0.5" + "@ethersproject/web" "^5.0.6" + + "@ethersproject/abstract-provider@5.0.9", "@ethersproject/abstract-provider@^5.0.8": + version "5.0.9" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.0.9.tgz#a55410b73e3994842884eb82b1f43e3a9f653eea" + integrity sha512-X9fMkqpeu9ayC3JyBkeeZhn35P4xQkpGX/l+FrxDtEW9tybf/UWXSMi8bGThpPtfJ6q6U2LDetXSpSwK4TfYQQ== + dependencies: + "@ethersproject/bignumber" "^5.0.13" + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/logger" "^5.0.8" + "@ethersproject/networks" "^5.0.7" + "@ethersproject/properties" "^5.0.7" + "@ethersproject/transactions" "^5.0.9" + "@ethersproject/web" "^5.0.12" + + "@ethersproject/abstract-signer@5.0.13", "@ethersproject/abstract-signer@^5.0.10": + version "5.0.13" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.0.13.tgz#59b4d0367d6327ec53bc269c6730c44a4a3b043c" + integrity sha512-VBIZEI5OK0TURoCYyw0t3w+TEO4kdwnI9wvt4kqUwyxSn3YCRpXYVl0Xoe7XBR/e5+nYOi2MyFGJ3tsFwONecQ== + dependencies: + "@ethersproject/abstract-provider" "^5.0.8" + "@ethersproject/bignumber" "^5.0.13" + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/logger" "^5.0.8" + "@ethersproject/properties" "^5.0.7" + + "@ethersproject/abstract-signer@5.0.14": + version "5.0.14" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.0.14.tgz#30ef912b0f86599d90fdffc65c110452e7b55cf1" + integrity sha512-JztBwVO7o5OHLh2vyjordlS4/1EjRyaECtc8vPdXTF1i4dXN+J0coeRoPN6ZFbBvi/YbaB6br2fvqhst1VQD/g== + dependencies: + "@ethersproject/abstract-provider" "^5.0.8" + "@ethersproject/bignumber" "^5.0.13" + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/logger" "^5.0.8" + "@ethersproject/properties" "^5.0.7" + + "@ethersproject/abstract-signer@5.0.7", "@ethersproject/abstract-signer@^5.0.2", "@ethersproject/abstract-signer@^5.0.4", "@ethersproject/abstract-signer@^5.0.6": + version "5.0.7" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.0.7.tgz#cdbd3bd479edf77c71b7f6a6156b0275b1176ded" + integrity sha512-8W8gy/QutEL60EoMEpvxZ8MFAEWs/JvH5nmZ6xeLXoZvmBCasGmxqHdYjo2cxg0nevkPkq9SeenSsBBZSCx+SQ== + dependencies: + "@ethersproject/abstract-provider" "^5.0.4" + "@ethersproject/bignumber" "^5.0.7" + "@ethersproject/bytes" "^5.0.4" + "@ethersproject/logger" "^5.0.5" + "@ethersproject/properties" "^5.0.3" + + "@ethersproject/address@5.0.10", "@ethersproject/address@^5.0.9": + version "5.0.10" + resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.0.10.tgz#2bc69fdff4408e0570471cd19dee577ab06a10d0" + integrity sha512-70vqESmW5Srua1kMDIN6uVfdneZMaMyRYH4qPvkAXGkbicrCOsA9m01vIloA4wYiiF+HLEfL1ENKdn5jb9xiAw== + dependencies: + "@ethersproject/bignumber" "^5.0.13" + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/keccak256" "^5.0.7" + "@ethersproject/logger" "^5.0.8" + "@ethersproject/rlp" "^5.0.7" + + "@ethersproject/address@5.0.11": + version "5.0.11" + resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.0.11.tgz#12022e8c590c33939beb5ab18b401ecf585eac59" + integrity sha512-Et4GBdD8/tsBGjCEOKee9upN29qjL5kbRcmJifb4Penmiuh9GARXL2/xpXvEp5EW+EIW/rfCHFJrkYBgoQFQBw== + dependencies: + "@ethersproject/bignumber" "^5.0.13" + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/keccak256" "^5.0.7" + "@ethersproject/logger" "^5.0.8" + "@ethersproject/rlp" "^5.0.7" + + "@ethersproject/address@5.0.5", "@ethersproject/address@>=5.0.0-beta.128", "@ethersproject/address@^5.0.2", "@ethersproject/address@^5.0.4", "@ethersproject/address@^5.0.5": + version "5.0.5" + resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.0.5.tgz#2caa65f6b7125015395b1b54c985ee0b27059cc7" + integrity sha512-DpkQ6rwk9jTefrRsJzEm6nhRiJd9pvhn1xN0rw5N/jswXG5r7BLk/GVA0mMAVWAsYfvi2xSc5L41FMox43RYEA== + dependencies: + "@ethersproject/bignumber" "^5.0.7" + "@ethersproject/bytes" "^5.0.4" + "@ethersproject/keccak256" "^5.0.3" + "@ethersproject/logger" "^5.0.5" + "@ethersproject/rlp" "^5.0.3" + bn.js "^4.4.0" + + "@ethersproject/base64@5.0.4", "@ethersproject/base64@^5.0.3": + version "5.0.4" + resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.0.4.tgz#b0d8fdbf3dda977cf546dcd35725a7b1d5256caa" + integrity sha512-4KRykQ7BQMeOXfvio1YITwHjxwBzh92UoXIdzxDE1p53CK28bbHPdsPNYo0wl0El7lJAMpT2SOdL0hhbWRnyIA== + dependencies: + "@ethersproject/bytes" "^5.0.4" + + "@ethersproject/base64@5.0.8", "@ethersproject/base64@^5.0.7": + version "5.0.8" + resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.0.8.tgz#1bc4b4b8c59c1debf972c7164b96c0b8964a20a1" + integrity sha512-PNbpHOMgZpZ1skvQl119pV2YkCPXmZTxw+T92qX0z7zaMFPypXWTZBzim+hUceb//zx4DFjeGT4aSjZRTOYThg== + dependencies: + "@ethersproject/bytes" "^5.0.9" + + "@ethersproject/base64@5.0.9": + version "5.0.9" + resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.0.9.tgz#bb1f35d3dba92082a574d5e2418f9202a0a1a7e6" + integrity sha512-37RBz5LEZ9SlTNGiWCYFttnIN9J7qVs9Xo2EbqGqDH5LfW9EIji66S+YDMpXVo1zWDax1FkEldAoatxHK2gfgA== + dependencies: + "@ethersproject/bytes" "^5.0.9" + + "@ethersproject/basex@5.0.4", "@ethersproject/basex@^5.0.3": + version "5.0.4" + resolved "https://registry.yarnpkg.com/@ethersproject/basex/-/basex-5.0.4.tgz#93e1cd11f9a47281da2389de24f88e13e9d90847" + integrity sha512-ixIr/kKiAoSzOnSc777AGIOAhKai5Ivqr4HO/Gz+YG+xkfv6kqD6AW4ga9vM20Wwb0QBhh3LoRWTu4V1K+x9Ew== + dependencies: + "@ethersproject/bytes" "^5.0.4" + "@ethersproject/properties" "^5.0.3" + + "@ethersproject/basex@5.0.8", "@ethersproject/basex@^5.0.7": + version "5.0.8" + resolved "https://registry.yarnpkg.com/@ethersproject/basex/-/basex-5.0.8.tgz#6867fad20047aa29fbd4b880f27894ed04cc7bb8" + integrity sha512-PCVKZIShBQUqAXjJSvaCidThPvL0jaaQZcewJc0sf8Xx05BizaOS8r3jdPdpNdY+/qZtRDqwHTSKjvR/xssyLQ== + dependencies: + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/properties" "^5.0.7" + + "@ethersproject/basex@5.0.9": + version "5.0.9" + resolved "https://registry.yarnpkg.com/@ethersproject/basex/-/basex-5.0.9.tgz#00d727a031bac563cb8bb900955206f1bf3cf1fc" + integrity sha512-FANswl1IN3PS0eltQxH2aM2+utPrkLUVG4XVFi6SafRG9EpAqXCgycxC8PU90mPGhigYTpg9cnTB5mCZ6ejQjw== + dependencies: + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/properties" "^5.0.7" + + "@ethersproject/bignumber@5.0.14", "@ethersproject/bignumber@^5.0.13": + version "5.0.14" + resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.0.14.tgz#605bc61dcbd4a8c6df8b5a7a77c0210273f3de8a" + integrity sha512-Q4TjMq9Gg3Xzj0aeJWqJgI3tdEiPiET7Y5OtNtjTAODZ2kp4y9jMNg97zVcvPedFvGROdpGDyCI77JDFodUzOw== + dependencies: + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/logger" "^5.0.8" + bn.js "^4.4.0" + + "@ethersproject/bignumber@5.0.15": + version "5.0.15" + resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.0.15.tgz#b089b3f1e0381338d764ac1c10512f0c93b184ed" + integrity sha512-MTADqnyacvdRwtKh7o9ujwNDSM1SDJjYDMYAzjIgjoi9rh6TY4suMbhCa3i2vh3SUXiXSICyTI8ui+NPdrZ9Lw== + dependencies: + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/logger" "^5.0.8" + bn.js "^4.4.0" + + "@ethersproject/bignumber@5.0.8", "@ethersproject/bignumber@>=5.0.0-beta.130", "@ethersproject/bignumber@^5.0.5", "@ethersproject/bignumber@^5.0.7", "@ethersproject/bignumber@^5.0.8": + version "5.0.8" + resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.0.8.tgz#cee33bd8eb0266176def0d371b45274b1d2c4ec0" + integrity sha512-KXFVAFKS1jdTXYN8BE5Oj+ZfPMh28iRdFeNGBVT6cUFdtiPVqeXqc0ggvBqA3A1VoFFGgM7oAeaagA393aORHA== + dependencies: + "@ethersproject/bytes" "^5.0.4" + "@ethersproject/logger" "^5.0.5" + bn.js "^4.4.0" + + "@ethersproject/bytes@5.0.10", "@ethersproject/bytes@^5.0.9": + version "5.0.10" + resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.0.10.tgz#aa49afe7491ba24ff76fa33d98677351263f9ba4" + integrity sha512-vpu0v1LZ1j1s9kERQIMnVU69MyHEzUff7nqK9XuCU4vx+AM8n9lU2gj7jtJIvGSt9HzatK/6I6bWusI5nyuaTA== + dependencies: + "@ethersproject/logger" "^5.0.8" + + "@ethersproject/bytes@5.0.11": + version "5.0.11" + resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.0.11.tgz#21118e75b1d00db068984c15530e316021101276" + integrity sha512-D51plLYY5qF05AsoVQwIZVLqlBkaTPVHVP/1WmmBIWyHB0cRW0C9kh0kx5Exo51rB63Hk8PfHxc7SmpoaQFEyg== + dependencies: + "@ethersproject/logger" "^5.0.8" + + "@ethersproject/bytes@5.0.5", "@ethersproject/bytes@>=5.0.0-beta.129", "@ethersproject/bytes@^5.0.2", "@ethersproject/bytes@^5.0.4": + version "5.0.5" + resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.0.5.tgz#688b70000e550de0c97a151a21f15b87d7f97d7c" + integrity sha512-IEj9HpZB+ACS6cZ+QQMTqmu/cnUK2fYNE6ms/PVxjoBjoxc6HCraLpam1KuRvreMy0i523PLmjN8OYeikRdcUQ== + dependencies: + "@ethersproject/logger" "^5.0.5" + + "@ethersproject/constants@5.0.10": + version "5.0.10" + resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.0.10.tgz#eb0c604fbc44c53ba9641eed31a1d0c9e1ebcadc" + integrity sha512-OSo8jxkHLDXieCy8bgOFR7lMfgPxEzKvSDdP+WAWHCDM8+orwch0B6wzkTmiQFgryAtIctrBt5glAdJikZ3hGw== + dependencies: + "@ethersproject/bignumber" "^5.0.13" + + "@ethersproject/constants@5.0.5", "@ethersproject/constants@>=5.0.0-beta.128", "@ethersproject/constants@^5.0.4": + version "5.0.5" + resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.0.5.tgz#0ed19b002e8404bdf6d135234dc86a7d9bcf9b71" + integrity sha512-foaQVmxp2+ik9FrLUCtVrLZCj4M3Ibgkqvh+Xw/vFRSerkjVSYePApaVE5essxhoSlF1U9oXfWY09QI2AXtgKA== + dependencies: + "@ethersproject/bignumber" "^5.0.7" + + "@ethersproject/constants@5.0.9", "@ethersproject/constants@^5.0.8": + version "5.0.9" + resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.0.9.tgz#81ac44c3bf612de63eb1c490b314ea1b932cda9f" + integrity sha512-2uAKH89UcaJP/Sc+54u92BtJtZ4cPgcS1p0YbB1L3tlkavwNvth+kNCUplIB1Becqs7BOZr0B/3dMNjhJDy4Dg== + dependencies: + "@ethersproject/bignumber" "^5.0.13" + + "@ethersproject/contracts@5.0.11": + version "5.0.11" + resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.0.11.tgz#e6cc57698a05be2329cb2ca3d7e87686f95e438a" + integrity sha512-FTUUd/6x00dYL2VufE2VowZ7h3mAyBfCQMGwI3tKDIWka+C0CunllFiKrlYCdiHFuVeMotR65dIcnzbLn72MCw== + dependencies: + "@ethersproject/abi" "^5.0.10" + "@ethersproject/abstract-provider" "^5.0.8" + "@ethersproject/abstract-signer" "^5.0.10" + "@ethersproject/address" "^5.0.9" + "@ethersproject/bignumber" "^5.0.13" + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/constants" "^5.0.8" + "@ethersproject/logger" "^5.0.8" + "@ethersproject/properties" "^5.0.7" + + "@ethersproject/contracts@5.0.12": + version "5.0.12" + resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.0.12.tgz#6d488db46221258399dfe80b89bf849b3afd7897" + integrity sha512-srijy31idjz8bE+gL1I6IRj2H4I9dUwfQ+QroLrIgNdGArqY8y2iFUKa3QTy+JBX26fJsdYiCQi1kKkaNpnMpQ== + dependencies: + "@ethersproject/abi" "^5.0.10" + "@ethersproject/abstract-provider" "^5.0.8" + "@ethersproject/abstract-signer" "^5.0.10" + "@ethersproject/address" "^5.0.9" + "@ethersproject/bignumber" "^5.0.13" + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/constants" "^5.0.8" + "@ethersproject/logger" "^5.0.8" + "@ethersproject/properties" "^5.0.7" + + "@ethersproject/contracts@5.0.5", "@ethersproject/contracts@^5.0.2": + version "5.0.5" + resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.0.5.tgz#64831a341ec8ca225e83ff3e9437c26b970fd5d7" + integrity sha512-tFI255lFbmbqMkgnuyhDWHl3yWqttPlReplYuVvDCT/SuvBjLR4ad2uipBlh1fh5X1ipK9ettAoV4S0HKim4Kw== + dependencies: + "@ethersproject/abi" "^5.0.5" + "@ethersproject/abstract-provider" "^5.0.4" + "@ethersproject/abstract-signer" "^5.0.4" + "@ethersproject/address" "^5.0.4" + "@ethersproject/bignumber" "^5.0.7" + "@ethersproject/bytes" "^5.0.4" + "@ethersproject/constants" "^5.0.4" + "@ethersproject/logger" "^5.0.5" + "@ethersproject/properties" "^5.0.3" + + "@ethersproject/hash@5.0.11", "@ethersproject/hash@^5.0.10": + version "5.0.11" + resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.0.11.tgz#da89517438bbbf8a39df56fff09f0a71669ae7a7" + integrity sha512-H3KJ9fk33XWJ2djAW03IL7fg3DsDMYjO1XijiUb1hJ85vYfhvxu0OmsU7d3tg2Uv1H1kFSo8ghr3WFQ8c+NL3g== + dependencies: + "@ethersproject/abstract-signer" "^5.0.10" + "@ethersproject/address" "^5.0.9" + "@ethersproject/bignumber" "^5.0.13" + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/keccak256" "^5.0.7" + "@ethersproject/logger" "^5.0.8" + "@ethersproject/properties" "^5.0.7" + "@ethersproject/strings" "^5.0.8" + + "@ethersproject/hash@5.0.12": + version "5.0.12" + resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.0.12.tgz#1074599f7509e2ca2bb7a3d4f4e39ab3a796da42" + integrity sha512-kn4QN+fhNFbUgX3XZTZUaQixi0oyfIEY+hfW+KtkHu+rq7dV76oAIvaLEEynu1/4npOL38E4X4YI42gGZk+C0Q== + dependencies: + "@ethersproject/abstract-signer" "^5.0.10" + "@ethersproject/address" "^5.0.9" + "@ethersproject/bignumber" "^5.0.13" + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/keccak256" "^5.0.7" + "@ethersproject/logger" "^5.0.8" + "@ethersproject/properties" "^5.0.7" + "@ethersproject/strings" "^5.0.8" + + "@ethersproject/hash@5.0.6", "@ethersproject/hash@>=5.0.0-beta.128", "@ethersproject/hash@^5.0.4": + version "5.0.6" + resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.0.6.tgz#2a2e8a1470685421217e9e86e9971ca636e609ce" + integrity sha512-Gvh57v6BWhwnud6l7tMfQm32PRQ2DYx2WaAAQmAxAfYvmzUkpQCBstnGeNMXIL8/2wdkvcB2u+WZRWaZtsFuUQ== + dependencies: + "@ethersproject/abstract-signer" "^5.0.6" + "@ethersproject/address" "^5.0.5" + "@ethersproject/bignumber" "^5.0.8" + "@ethersproject/bytes" "^5.0.4" + "@ethersproject/keccak256" "^5.0.3" + "@ethersproject/logger" "^5.0.5" + "@ethersproject/properties" "^5.0.4" + "@ethersproject/strings" "^5.0.4" + + "@ethersproject/hdnode@5.0.10": + version "5.0.10" + resolved "https://registry.yarnpkg.com/@ethersproject/hdnode/-/hdnode-5.0.10.tgz#f7cdf154bf5d104c76dce2940745fc71d9e7eb1b" + integrity sha512-ZLwMtIcXK7xz2lSITDCl40W04CtRq4K9NwBxhCzdzPdaz6XnoJMwGz2YMVLg+8ksseq+RYtTwIIXtlK6vyvQyg== + dependencies: + "@ethersproject/abstract-signer" "^5.0.10" + "@ethersproject/basex" "^5.0.7" + "@ethersproject/bignumber" "^5.0.13" + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/logger" "^5.0.8" + "@ethersproject/pbkdf2" "^5.0.7" + "@ethersproject/properties" "^5.0.7" + "@ethersproject/sha2" "^5.0.7" + "@ethersproject/signing-key" "^5.0.8" + "@ethersproject/strings" "^5.0.8" + "@ethersproject/transactions" "^5.0.9" + "@ethersproject/wordlists" "^5.0.8" + + "@ethersproject/hdnode@5.0.5", "@ethersproject/hdnode@^5.0.4": + version "5.0.5" + resolved "https://registry.yarnpkg.com/@ethersproject/hdnode/-/hdnode-5.0.5.tgz#1f89aad0a5ba9dfae3a85a36e0669f8bc7a74781" + integrity sha512-Ho4HZaK+KijE5adayvjAGusWMnT0mgwGa5hGMBofBOgX9nqiKf6Wxx68SXBGI1/L3rmKo6mlAjxUd8gefs0teQ== + dependencies: + "@ethersproject/abstract-signer" "^5.0.4" + "@ethersproject/basex" "^5.0.3" + "@ethersproject/bignumber" "^5.0.7" + "@ethersproject/bytes" "^5.0.4" + "@ethersproject/logger" "^5.0.5" + "@ethersproject/pbkdf2" "^5.0.3" + "@ethersproject/properties" "^5.0.3" + "@ethersproject/sha2" "^5.0.3" + "@ethersproject/signing-key" "^5.0.4" + "@ethersproject/strings" "^5.0.4" + "@ethersproject/transactions" "^5.0.5" + "@ethersproject/wordlists" "^5.0.4" + + "@ethersproject/hdnode@5.0.9", "@ethersproject/hdnode@^5.0.8": + version "5.0.9" + resolved "https://registry.yarnpkg.com/@ethersproject/hdnode/-/hdnode-5.0.9.tgz#ce65b430d3d3f0cd3c8f9dfaaf376b55881d9dba" + integrity sha512-S5UMmIC6XfFtqhUK4uTjD8GPNzSbE+sZ/0VMqFnA3zAJ+cEFZuEyhZDYnl2ItGJzjT4jsy+uEy1SIl3baYK1PQ== + dependencies: + "@ethersproject/abstract-signer" "^5.0.10" + "@ethersproject/basex" "^5.0.7" + "@ethersproject/bignumber" "^5.0.13" + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/logger" "^5.0.8" + "@ethersproject/pbkdf2" "^5.0.7" + "@ethersproject/properties" "^5.0.7" + "@ethersproject/sha2" "^5.0.7" + "@ethersproject/signing-key" "^5.0.8" + "@ethersproject/strings" "^5.0.8" + "@ethersproject/transactions" "^5.0.9" + "@ethersproject/wordlists" "^5.0.8" + + "@ethersproject/json-wallets@5.0.11", "@ethersproject/json-wallets@^5.0.10": + version "5.0.11" + resolved "https://registry.yarnpkg.com/@ethersproject/json-wallets/-/json-wallets-5.0.11.tgz#86fdc41b7762acb443d6a896f6c61231ab2aee5d" + integrity sha512-0GhWScWUlXXb4qJNp0wmkU95QS3YdN9UMOfMSEl76CRANWWrmyzxcBVSXSBu5iQ0/W8wO+xGlJJ3tpA6v3mbIw== + dependencies: + "@ethersproject/abstract-signer" "^5.0.10" + "@ethersproject/address" "^5.0.9" + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/hdnode" "^5.0.8" + "@ethersproject/keccak256" "^5.0.7" + "@ethersproject/logger" "^5.0.8" + "@ethersproject/pbkdf2" "^5.0.7" + "@ethersproject/properties" "^5.0.7" + "@ethersproject/random" "^5.0.7" + "@ethersproject/strings" "^5.0.8" + "@ethersproject/transactions" "^5.0.9" + aes-js "3.0.0" + scrypt-js "3.0.1" + + "@ethersproject/json-wallets@5.0.12": + version "5.0.12" + resolved "https://registry.yarnpkg.com/@ethersproject/json-wallets/-/json-wallets-5.0.12.tgz#8946a0fcce1634b636313a50330b7d30a24996e8" + integrity sha512-nac553zGZnOewpjlqbfy7WBl8m3y7qudzRsI2dCxrediYtPIVIs9f6Pbnou8vDmmp8X4/U4W788d+Ma88o+Gbg== + dependencies: + "@ethersproject/abstract-signer" "^5.0.10" + "@ethersproject/address" "^5.0.9" + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/hdnode" "^5.0.8" + "@ethersproject/keccak256" "^5.0.7" + "@ethersproject/logger" "^5.0.8" + "@ethersproject/pbkdf2" "^5.0.7" + "@ethersproject/properties" "^5.0.7" + "@ethersproject/random" "^5.0.7" + "@ethersproject/strings" "^5.0.8" + "@ethersproject/transactions" "^5.0.9" + aes-js "3.0.0" + scrypt-js "3.0.1" + + "@ethersproject/json-wallets@5.0.7", "@ethersproject/json-wallets@^5.0.6": + version "5.0.7" + resolved "https://registry.yarnpkg.com/@ethersproject/json-wallets/-/json-wallets-5.0.7.tgz#4c48753b38ce7bce23a55f25c23f24617cf560e5" + integrity sha512-dgOn9JtGgjT28mDXs4LYY2rT4CzS6bG/rxoYuPq3TLHIf6nmvBcr33Fee6RrM/y8UAx4gyIkf6wb2cXsOctvQQ== + dependencies: + "@ethersproject/abstract-signer" "^5.0.4" + "@ethersproject/address" "^5.0.4" + "@ethersproject/bytes" "^5.0.4" + "@ethersproject/hdnode" "^5.0.4" + "@ethersproject/keccak256" "^5.0.3" + "@ethersproject/logger" "^5.0.5" + "@ethersproject/pbkdf2" "^5.0.3" + "@ethersproject/properties" "^5.0.3" + "@ethersproject/random" "^5.0.3" + "@ethersproject/strings" "^5.0.4" + "@ethersproject/transactions" "^5.0.5" + aes-js "3.0.0" + scrypt-js "3.0.1" + + "@ethersproject/keccak256@5.0.4", "@ethersproject/keccak256@>=5.0.0-beta.127", "@ethersproject/keccak256@^5.0.3": + version "5.0.4" + resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.0.4.tgz#36ca0a7d1ae2a272da5654cb886776d0c680ef3a" + integrity sha512-GNpiOUm9PGUxFNqOxYKDQBM0u68bG9XC9iOulEQ8I0tOx/4qUpgVzvgXL6ugxr0RY554Gz/NQsVqknqPzUcxpQ== + dependencies: + "@ethersproject/bytes" "^5.0.4" + js-sha3 "0.5.7" + + "@ethersproject/keccak256@5.0.8", "@ethersproject/keccak256@^5.0.7": + version "5.0.8" + resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.0.8.tgz#13aaf69e1c8bd15fc59a2ebd055c0878f2a059c8" + integrity sha512-zoGbwXcWWs9MX4NOAZ7N0hhgIRl4Q/IO/u9c/RHRY4WqDy3Ywm0OLamEV53QDwhjwn3YiiVwU1Ve5j7yJ0a/KQ== + dependencies: + "@ethersproject/bytes" "^5.0.9" + js-sha3 "0.5.7" + + "@ethersproject/keccak256@5.0.9": + version "5.0.9" + resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.0.9.tgz#ca0d86e4af56c13b1ef25e533bde3e96d28f647d" + integrity sha512-zhdUTj6RGtCJSgU+bDrWF6cGbvW453LoIC1DSNWrTlXzC7WuH4a+EiPrgc7/kNoRxerKuA/cxYlI8GwNtVtDlw== + dependencies: + "@ethersproject/bytes" "^5.0.9" + js-sha3 "0.5.7" + + "@ethersproject/logger@5.0.10": + version "5.0.10" + resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.0.10.tgz#fd884688b3143253e0356ef92d5f22d109d2e026" + integrity sha512-0y2T2NqykDrbPM3Zw9RSbPkDOxwChAL8detXaom76CfYoGxsOnRP/zTX8OUAV+x9LdwzgbWvWmeXrc0M7SuDZw== + + "@ethersproject/logger@5.0.6", "@ethersproject/logger@>=5.0.0-beta.129", "@ethersproject/logger@^5.0.5": + version "5.0.6" + resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.0.6.tgz#faa484203e86e08be9e07fef826afeef7183fe88" + integrity sha512-FrX0Vnb3JZ1md/7GIZfmJ06XOAA8r3q9Uqt9O5orr4ZiksnbpXKlyDzQtlZ5Yv18RS8CAUbiKH9vwidJg1BPmQ== + + "@ethersproject/logger@5.0.9", "@ethersproject/logger@^5.0.8": + version "5.0.9" + resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.0.9.tgz#0e6a0b3ecc938713016954daf4ac7967467aa763" + integrity sha512-kV3Uamv3XOH99Xf3kpIG3ZkS7mBNYcLDM00JSDtNgNB4BihuyxpQzIZPRIDmRi+95Z/R1Bb0X2kUNHa/kJoVrw== + + "@ethersproject/networks@5.0.4", "@ethersproject/networks@^5.0.3": + version "5.0.4" + resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.0.4.tgz#6d320a5e15a0cda804f5da88be0ba846156f6eec" + integrity sha512-/wHDTRms5mpJ09BoDrbNdFWINzONe05wZRgohCXvEv39rrH/Gd/yAnct8wC0RsW3tmFOgjgQxuBvypIxuUynTw== + dependencies: + "@ethersproject/logger" "^5.0.5" + + "@ethersproject/networks@5.0.8", "@ethersproject/networks@^5.0.7": + version "5.0.8" + resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.0.8.tgz#37e6f8c058f2d540373ea5939056cd3de069132e" + integrity sha512-PYpptlO2Tu5f/JEBI5hdlMds5k1DY1QwVbh3LKPb3un9dQA2bC51vd2/gRWAgSBpF3kkmZOj4FhD7ATLX4H+DA== + dependencies: + "@ethersproject/logger" "^5.0.8" + + "@ethersproject/networks@5.0.9": + version "5.0.9" + resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.0.9.tgz#ec5da11e4d4bfd69bec4eaebc9ace33eb9569279" + integrity sha512-L8+VCQwArBLGkxZb/5Ns/OH/OxP38AcaveXIxhUTq+VWpXYjrObG3E7RDQIKkUx1S1IcQl/UWTz5w4DK0UitJg== + dependencies: + "@ethersproject/logger" "^5.0.8" + + "@ethersproject/pbkdf2@5.0.4", "@ethersproject/pbkdf2@^5.0.3": + version "5.0.4" + resolved "https://registry.yarnpkg.com/@ethersproject/pbkdf2/-/pbkdf2-5.0.4.tgz#a0841d53f5ce9a2b52a65a349d2dc15910b0a767" + integrity sha512-9jVBjHXQKfr9+3bkCg01a8Cd1H9e+7Kw3ZMIvAxD0lZtuzrXsJxm1hVwY9KA+PRUvgS/9tTP4viXQYwLAax7zg== + dependencies: + "@ethersproject/bytes" "^5.0.4" + "@ethersproject/sha2" "^5.0.3" + + "@ethersproject/pbkdf2@5.0.8", "@ethersproject/pbkdf2@^5.0.7": + version "5.0.8" + resolved "https://registry.yarnpkg.com/@ethersproject/pbkdf2/-/pbkdf2-5.0.8.tgz#06a086b1ac04c75e6846afd6cf6170a49a634411" + integrity sha512-UlmAMGbIPaS2xXsI38FbePVTfJMuU9jnwcqVn3p88HxPF4kD897ha+l3TNsBqJqf32UbQL5GImnf1oJkSKq4vQ== + dependencies: + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/sha2" "^5.0.7" + + "@ethersproject/pbkdf2@5.0.9": + version "5.0.9" + resolved "https://registry.yarnpkg.com/@ethersproject/pbkdf2/-/pbkdf2-5.0.9.tgz#be39c7f0a66c0d3cb1ad1dbb12a78e9bcdf9b5ae" + integrity sha512-ItE/wQ/WVw/ajEHPUVgfu0aEvksPgOQc+278bke8sGKnGO3ppjmqp0MHh17tHc1EBTzJbSms5aLIqc56qZ/oiA== + dependencies: + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/sha2" "^5.0.7" + + "@ethersproject/properties@5.0.4", "@ethersproject/properties@>=5.0.0-beta.131", "@ethersproject/properties@^5.0.3", "@ethersproject/properties@^5.0.4": + version "5.0.4" + resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.0.4.tgz#a67a1f5a52c30850b5062c861631e73d131f666e" + integrity sha512-UdyX3GqBxFt15B0uSESdDNmhvEbK3ACdDXl2soshoPcneXuTswHDeA0LoPlnaZzhbgk4p6jqb4GMms5C26Qu6A== + dependencies: + "@ethersproject/logger" "^5.0.5" + + "@ethersproject/properties@5.0.8", "@ethersproject/properties@^5.0.7": + version "5.0.8" + resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.0.8.tgz#e45d28d25402c73394873dbf058f856c966cae01" + integrity sha512-zEnLMze2Eu2VDPj/05QwCwMKHh506gpT9PP9KPVd4dDB+5d6AcROUYVLoIIQgBYK7X/Gw0UJmG3oVtnxOQafAw== + dependencies: + "@ethersproject/logger" "^5.0.8" + + "@ethersproject/properties@5.0.9": + version "5.0.9" + resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.0.9.tgz#d7aae634680760136ea522e25c3ef043ec15b5c2" + integrity sha512-ZCjzbHYTw+rF1Pn8FDCEmx3gQttwIHcm/6Xee8g/M3Ga3SfW4tccNMbs5zqnBH0E4RoOPaeNgyg1O68TaF0tlg== + dependencies: + "@ethersproject/logger" "^5.0.8" + + "@ethersproject/providers@5.0.14", "@ethersproject/providers@^5.0.5": + version "5.0.14" + resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.0.14.tgz#751ccb14b4a8c8e9e4be171818c23f4601be90ba" + integrity sha512-K9QRRkkHWyprm3g4L8U9aPx5uyivznL4RYemkN2shCQumyGqFJ5SO+OtQrgebVm0JpGwFAUGugnhRUh49sjErw== + dependencies: + "@ethersproject/abstract-provider" "^5.0.4" + "@ethersproject/abstract-signer" "^5.0.4" + "@ethersproject/address" "^5.0.4" + "@ethersproject/basex" "^5.0.3" + "@ethersproject/bignumber" "^5.0.7" + "@ethersproject/bytes" "^5.0.4" + "@ethersproject/constants" "^5.0.4" + "@ethersproject/hash" "^5.0.4" + "@ethersproject/logger" "^5.0.5" + "@ethersproject/networks" "^5.0.3" + "@ethersproject/properties" "^5.0.3" + "@ethersproject/random" "^5.0.3" + "@ethersproject/rlp" "^5.0.3" + "@ethersproject/sha2" "^5.0.3" + "@ethersproject/strings" "^5.0.4" + "@ethersproject/transactions" "^5.0.5" + "@ethersproject/web" "^5.0.6" + bech32 "1.1.4" + ws "7.2.3" + + "@ethersproject/providers@5.0.23": + version "5.0.23" + resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.0.23.tgz#1e26512303d60bbd557242532fdb5fa3c5d5fb73" + integrity sha512-eJ94z2tgPaUgUmxwd3BVkIzkgkbNIkY6wRPVas04LVaBTycObQbgj794aaUu2bfk7+Bn2B/gjUZtJW1ybxh9/A== + dependencies: + "@ethersproject/abstract-provider" "^5.0.8" + "@ethersproject/abstract-signer" "^5.0.10" + "@ethersproject/address" "^5.0.9" + "@ethersproject/basex" "^5.0.7" + "@ethersproject/bignumber" "^5.0.13" + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/constants" "^5.0.8" + "@ethersproject/hash" "^5.0.10" + "@ethersproject/logger" "^5.0.8" + "@ethersproject/networks" "^5.0.7" + "@ethersproject/properties" "^5.0.7" + "@ethersproject/random" "^5.0.7" + "@ethersproject/rlp" "^5.0.7" + "@ethersproject/sha2" "^5.0.7" + "@ethersproject/strings" "^5.0.8" + "@ethersproject/transactions" "^5.0.9" + "@ethersproject/web" "^5.0.12" + bech32 "1.1.4" + ws "7.2.3" + + "@ethersproject/providers@5.0.24": + version "5.0.24" + resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.0.24.tgz#4c638a029482d052faa18364b5e0e2d3ddd9c0cb" + integrity sha512-M4Iw1r4gGJkt7ZUa++iREuviKL/DIpmIMsaUlVlXtV+ZrUXeN8xQ3zOTrbz7R4h9W9oljBZM7i4D3Kn1krJ30A== + dependencies: + "@ethersproject/abstract-provider" "^5.0.8" + "@ethersproject/abstract-signer" "^5.0.10" + "@ethersproject/address" "^5.0.9" + "@ethersproject/basex" "^5.0.7" + "@ethersproject/bignumber" "^5.0.13" + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/constants" "^5.0.8" + "@ethersproject/hash" "^5.0.10" + "@ethersproject/logger" "^5.0.8" + "@ethersproject/networks" "^5.0.7" + "@ethersproject/properties" "^5.0.7" + "@ethersproject/random" "^5.0.7" + "@ethersproject/rlp" "^5.0.7" + "@ethersproject/sha2" "^5.0.7" + "@ethersproject/strings" "^5.0.8" + "@ethersproject/transactions" "^5.0.9" + "@ethersproject/web" "^5.0.12" + bech32 "1.1.4" + ws "7.2.3" + + "@ethersproject/random@5.0.4", "@ethersproject/random@^5.0.3": + version "5.0.4" + resolved "https://registry.yarnpkg.com/@ethersproject/random/-/random-5.0.4.tgz#98f7cf65b0e588cec39ef24843e391ed5004556f" + integrity sha512-AIZJhqs6Ba4/+U3lOjt3QZbP6b/kuuGLJUYFUonAgWmkTHwqsCwYnFvnHKQSUuHbXHvErp7WFXFlztx+yMn3kQ== + dependencies: + "@ethersproject/bytes" "^5.0.4" + "@ethersproject/logger" "^5.0.5" + + "@ethersproject/random@5.0.8", "@ethersproject/random@^5.0.7": + version "5.0.8" + resolved "https://registry.yarnpkg.com/@ethersproject/random/-/random-5.0.8.tgz#8d3726be48e95467abce9b23c93adbb1de009dda" + integrity sha512-4rHtotmd9NjklW0eDvByicEkL+qareIyFSbG1ShC8tPJJSAC0g55oQWzw+3nfdRCgBHRuEE7S8EcPcTVPvZ9cA== + dependencies: + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/logger" "^5.0.8" + + "@ethersproject/random@5.0.9": + version "5.0.9" + resolved "https://registry.yarnpkg.com/@ethersproject/random/-/random-5.0.9.tgz#1903d4436ba66e4c8ac77968b16f756abea3a0d0" + integrity sha512-DANG8THsKqFbJOantrxumtG6gyETNE54VfbsWa+SQAT8WKpDo9W/X5Zhh73KuhClaey1UI32uVmISZeq/Zxn1A== + dependencies: + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/logger" "^5.0.8" + + "@ethersproject/rlp@5.0.4", "@ethersproject/rlp@^5.0.3": + version "5.0.4" + resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.0.4.tgz#0090a0271e84ea803016a112a79f5cfd80271a77" + integrity sha512-5qrrZad7VTjofxSsm7Zg/7Dr4ZOln4S2CqiDdOuTv6MBKnXj0CiBojXyuDy52M8O3wxH0CyE924hXWTDV1PQWQ== + dependencies: + "@ethersproject/bytes" "^5.0.4" + "@ethersproject/logger" "^5.0.5" + + "@ethersproject/rlp@5.0.8", "@ethersproject/rlp@^5.0.7": + version "5.0.8" + resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.0.8.tgz#ff54e206d0ae28640dd054f2bcc7070f06f9dfbe" + integrity sha512-E4wdFs8xRNJfzNHmnkC8w5fPeT4Wd1U2cust3YeT16/46iSkLT8nn8ilidC6KhR7hfuSZE4UqSPzyk76p7cdZg== + dependencies: + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/logger" "^5.0.8" + + "@ethersproject/rlp@5.0.9": + version "5.0.9" + resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.0.9.tgz#da205bf8a34d3c3409eb73ddd237130a4b376aff" + integrity sha512-ns1U7ZMVeruUW6JXc4om+1w3w4ynHN/0fpwmeNTsAjwGKoF8SAUgue6ylKpHKWSti2idx7jDxbn8hNNFHk67CA== + dependencies: + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/logger" "^5.0.8" + + "@ethersproject/sha2@5.0.4", "@ethersproject/sha2@^5.0.3": + version "5.0.4" + resolved "https://registry.yarnpkg.com/@ethersproject/sha2/-/sha2-5.0.4.tgz#40f639721a27dbe034b3dee021ba20b054586fec" + integrity sha512-0yFhf1mspxAfWdXXoPtK94adUeu1R7/FzAa+DfEiZTc76sz/vHXf0LSIazoR3znYKFny6haBxME+usbvvEcF3A== + dependencies: + "@ethersproject/bytes" "^5.0.4" + "@ethersproject/logger" "^5.0.5" + hash.js "1.1.3" + + "@ethersproject/sha2@5.0.8", "@ethersproject/sha2@^5.0.7": + version "5.0.8" + resolved "https://registry.yarnpkg.com/@ethersproject/sha2/-/sha2-5.0.8.tgz#9903c67e562739d8b312820b0a265b9c9bf35fc3" + integrity sha512-ILP1ZgyvDj4rrdE+AXrTv9V88m7x87uga2VZ/FeULKPumOEw/4bGnJz/oQ8zDnDvVYRCJ+48VaQBS2CFLbk1ww== + dependencies: + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/logger" "^5.0.8" + hash.js "1.1.3" + + "@ethersproject/sha2@5.0.9": + version "5.0.9" + resolved "https://registry.yarnpkg.com/@ethersproject/sha2/-/sha2-5.0.9.tgz#41275ee03e6e1660b3c997754005e089e936adc6" + integrity sha512-5FH4s47gM7N1fFAYQ1+m7aX0SbLg0Xr+6tvqndmNqc382/qBIbzXiGlUookrsjlPb6gLNurnTssCXjNM72J6lQ== + dependencies: + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/logger" "^5.0.8" + hash.js "1.1.3" + + "@ethersproject/signing-key@5.0.10", "@ethersproject/signing-key@^5.0.8": + version "5.0.10" + resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.0.10.tgz#05e26e04f0aa5360dc78674d7331bacea8fea5c1" + integrity sha512-w5it3GbFOvN6e0mTd5gDNj+bwSe6L9jqqYjU+uaYS8/hAEp4qYLk5p8ZjbJJkNn7u1p0iwocp8X9oH/OdK8apA== + dependencies: + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/logger" "^5.0.8" + "@ethersproject/properties" "^5.0.7" + elliptic "6.5.4" + + "@ethersproject/signing-key@5.0.11": + version "5.0.11" + resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.0.11.tgz#19fc5c4597e18ad0a5efc6417ba5b74069fdd2af" + integrity sha512-Jfcru/BGwdkXhLxT+8WCZtFy7LL0TPFZw05FAb5asxB/MyVsEfNdNxGDtjVE9zXfmRSPe/EusXYY4K7wcygOyQ== + dependencies: + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/logger" "^5.0.8" + "@ethersproject/properties" "^5.0.7" + elliptic "6.5.4" + + "@ethersproject/signing-key@5.0.5", "@ethersproject/signing-key@^5.0.4": + version "5.0.5" + resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.0.5.tgz#acfd06fc05a14180df7e027688bbd23fc4baf782" + integrity sha512-Z1wY7JC1HVO4CvQWY2TyTTuAr8xK3bJijZw1a9G92JEmKdv1j255R/0YLBBcFTl2J65LUjtXynNJ2GbArPGi5g== + dependencies: + "@ethersproject/bytes" "^5.0.4" + "@ethersproject/logger" "^5.0.5" + "@ethersproject/properties" "^5.0.3" + elliptic "6.5.3" + + "@ethersproject/solidity@5.0.10": + version "5.0.10" + resolved "https://registry.yarnpkg.com/@ethersproject/solidity/-/solidity-5.0.10.tgz#128c9289761cf83d81ff62a1195d6079a924a86c" + integrity sha512-8OG3HLqynWXDA6mVIHuHfF/ojTTwBahON7hc9GAKCqglzXCkVA3OpyxOJXPzjHClRIAUUiU7r9oy9Z/nsjtT/g== + dependencies: + "@ethersproject/bignumber" "^5.0.13" + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/keccak256" "^5.0.7" + "@ethersproject/sha2" "^5.0.7" + "@ethersproject/strings" "^5.0.8" + + "@ethersproject/solidity@5.0.5", "@ethersproject/solidity@^5.0.2": + version "5.0.5" + resolved "https://registry.yarnpkg.com/@ethersproject/solidity/-/solidity-5.0.5.tgz#97a7d8a67f2d944f208c948fed0d565512bcc2be" + integrity sha512-DMFQ0ouXmNVoKWbGEUFGi8Urli4SJip9jXafQyFHWPRr5oJUqDVkNfwcyC37k+mhBG93k7qrYXCH2xJnGEOxHg== + dependencies: + "@ethersproject/bignumber" "^5.0.7" + "@ethersproject/bytes" "^5.0.4" + "@ethersproject/keccak256" "^5.0.3" + "@ethersproject/sha2" "^5.0.3" + "@ethersproject/strings" "^5.0.4" + + "@ethersproject/solidity@5.0.9": + version "5.0.9" + resolved "https://registry.yarnpkg.com/@ethersproject/solidity/-/solidity-5.0.9.tgz#49100fbe9f364ac56f7ff7c726f4f3d151901134" + integrity sha512-LIxSAYEQgLRXE3mRPCq39ou61kqP8fDrGqEeNcaNJS3aLbmAOS8MZp56uK++WsdI9hj8sNsFh78hrAa6zR9Jag== + dependencies: + "@ethersproject/bignumber" "^5.0.13" + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/keccak256" "^5.0.7" + "@ethersproject/sha2" "^5.0.7" + "@ethersproject/strings" "^5.0.8" + + "@ethersproject/strings@5.0.10": + version "5.0.10" + resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.0.10.tgz#ddce1e9724f4ac4f3f67e0cac0b48748e964bfdb" + integrity sha512-KAeoS1tZ9/5ECXiIZA6S6hywbD0so2VmuW+Wfyo5EDXeyZ6Na1nxTPhTnW7voQmjbeYJffCrOc0qLFJeylyg7w== + dependencies: + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/constants" "^5.0.8" + "@ethersproject/logger" "^5.0.8" + + "@ethersproject/strings@5.0.5", "@ethersproject/strings@>=5.0.0-beta.130", "@ethersproject/strings@^5.0.4": + version "5.0.5" + resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.0.5.tgz#ed7e99a282a02f40757691b04a24cd83f3752195" + integrity sha512-JED6WaIV00xM/gvj8vSnd+0VWtDYdidTmavFRCTQakqfz+4tDo6Jz5LHgG+dd45h7ah7ykCHW0C7ZXWEDROCXQ== + dependencies: + "@ethersproject/bytes" "^5.0.4" + "@ethersproject/constants" "^5.0.4" + "@ethersproject/logger" "^5.0.5" + + "@ethersproject/strings@5.0.9", "@ethersproject/strings@^5.0.8": + version "5.0.9" + resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.0.9.tgz#8e2eb2918b140231e1d1b883d77e43213a8ac280" + integrity sha512-ogxBpcUpdO524CYs841MoJHgHxEPUy0bJFDS4Ezg8My+WYVMfVAOlZSLss0Rurbeeam8CpUVDzM4zUn09SU66Q== + dependencies: + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/constants" "^5.0.8" + "@ethersproject/logger" "^5.0.8" + + "@ethersproject/transactions@5.0.10", "@ethersproject/transactions@^5.0.9": + version "5.0.10" + resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.0.10.tgz#d50cafd80d27206336f80114bc0f18bc18687331" + integrity sha512-Tqpp+vKYQyQdJQQk4M73tDzO7ODf2D42/sJOcKlDAAbdSni13v6a+31hUdo02qYXhVYwIs+ZjHnO4zKv5BNk8w== + dependencies: + "@ethersproject/address" "^5.0.9" + "@ethersproject/bignumber" "^5.0.13" + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/constants" "^5.0.8" + "@ethersproject/keccak256" "^5.0.7" + "@ethersproject/logger" "^5.0.8" + "@ethersproject/properties" "^5.0.7" + "@ethersproject/rlp" "^5.0.7" + "@ethersproject/signing-key" "^5.0.8" + + "@ethersproject/transactions@5.0.11": + version "5.0.11" + resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.0.11.tgz#b31df5292f47937136a45885d6ee6112477c13df" + integrity sha512-ftsRvR9+gQp7L63F6+XmstvsZ4w8GtWvQB08e/zB+oB86Fnhq8+i/tkgpJplSHC8I/qgiCisva+M3u2GVhDFPA== + dependencies: + "@ethersproject/address" "^5.0.9" + "@ethersproject/bignumber" "^5.0.13" + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/constants" "^5.0.8" + "@ethersproject/keccak256" "^5.0.7" + "@ethersproject/logger" "^5.0.8" + "@ethersproject/properties" "^5.0.7" + "@ethersproject/rlp" "^5.0.7" + "@ethersproject/signing-key" "^5.0.8" + + "@ethersproject/transactions@5.0.6", "@ethersproject/transactions@^5.0.0-beta.135", "@ethersproject/transactions@^5.0.2", "@ethersproject/transactions@^5.0.5": + version "5.0.6" + resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.0.6.tgz#b8b27938be6e9ed671dbdd35fe98af8b14d0df7c" + integrity sha512-htsFhOD+NMBxx676A8ehSuwVV49iqpSB+CkjPZ02tpNew0K6p8g0CZ46Z1ZP946gIHAU80xQ0NACHYrjIUaCFA== + dependencies: + "@ethersproject/address" "^5.0.4" + "@ethersproject/bignumber" "^5.0.7" + "@ethersproject/bytes" "^5.0.4" + "@ethersproject/constants" "^5.0.4" + "@ethersproject/keccak256" "^5.0.3" + "@ethersproject/logger" "^5.0.5" + "@ethersproject/properties" "^5.0.3" + "@ethersproject/rlp" "^5.0.3" + "@ethersproject/signing-key" "^5.0.4" + + "@ethersproject/units@5.0.10": + version "5.0.10" + resolved "https://registry.yarnpkg.com/@ethersproject/units/-/units-5.0.10.tgz#9cca3b65cd0c92fab1bd33f2abd233546dd61987" + integrity sha512-eaiHi9ham5lbC7qpqxpae7OY/nHJUnRUnFFuEwi2VB5Nwe3Np468OAV+e+HR+jAK4fHXQE6PFBTxWGtnZuO37g== + dependencies: + "@ethersproject/bignumber" "^5.0.13" + "@ethersproject/constants" "^5.0.8" + "@ethersproject/logger" "^5.0.8" + + "@ethersproject/units@5.0.11": + version "5.0.11" + resolved "https://registry.yarnpkg.com/@ethersproject/units/-/units-5.0.11.tgz#f82f6e353ac0d6fa43b17337790f1f9aa72cb4c8" + integrity sha512-nOSPmcCWyB/dwoBRhhTtPGCsTbiXqmc7Q0Adwvafc432AC7hy3Fj3IFZtnSXsbtJ/GdHCIUIoA8gtvxSsFuBJg== + dependencies: + "@ethersproject/bignumber" "^5.0.13" + "@ethersproject/constants" "^5.0.8" + "@ethersproject/logger" "^5.0.8" + + "@ethersproject/units@5.0.6": + version "5.0.6" + resolved "https://registry.yarnpkg.com/@ethersproject/units/-/units-5.0.6.tgz#e1169ecffb7e8d5eab84e1481a4e35df19045708" + integrity sha512-tsJuy4mipppdmooukRfhXt8fGx9nxvfvG6Xdy0RDm7LzHsjghjwQ69m2bCpId6SDSR1Uq1cQ9irPiUBSyWolUA== + dependencies: + "@ethersproject/bignumber" "^5.0.7" + "@ethersproject/constants" "^5.0.4" + "@ethersproject/logger" "^5.0.5" + + "@ethersproject/wallet@5.0.11": + version "5.0.11" + resolved "https://registry.yarnpkg.com/@ethersproject/wallet/-/wallet-5.0.11.tgz#9891936089d1b91e22ed59f850bc344b1544bf26" + integrity sha512-2Fg/DOvUltR7aZTOyWWlQhru+SKvq2UE3uEhXSyCFgMqDQNuc2nHXh1SHJtN65jsEbjVIppOe1Q7EQMvhmeeRw== + dependencies: + "@ethersproject/abstract-provider" "^5.0.8" + "@ethersproject/abstract-signer" "^5.0.10" + "@ethersproject/address" "^5.0.9" + "@ethersproject/bignumber" "^5.0.13" + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/hash" "^5.0.10" + "@ethersproject/hdnode" "^5.0.8" + "@ethersproject/json-wallets" "^5.0.10" + "@ethersproject/keccak256" "^5.0.7" + "@ethersproject/logger" "^5.0.8" + "@ethersproject/properties" "^5.0.7" + "@ethersproject/random" "^5.0.7" + "@ethersproject/signing-key" "^5.0.8" + "@ethersproject/transactions" "^5.0.9" + "@ethersproject/wordlists" "^5.0.8" + + "@ethersproject/wallet@5.0.12": + version "5.0.12" + resolved "https://registry.yarnpkg.com/@ethersproject/wallet/-/wallet-5.0.12.tgz#bfb96f95e066b4b1b4591c4615207b87afedda8b" + integrity sha512-rboJebGf47/KPZrKZQdYg9BAYuXbc/OwcUyML1K1f2jnJeo1ObWV11U1PAWTjTbhhSy6/Fg+34GO2yMb5Dt1Rw== + dependencies: + "@ethersproject/abstract-provider" "^5.0.8" + "@ethersproject/abstract-signer" "^5.0.10" + "@ethersproject/address" "^5.0.9" + "@ethersproject/bignumber" "^5.0.13" + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/hash" "^5.0.10" + "@ethersproject/hdnode" "^5.0.8" + "@ethersproject/json-wallets" "^5.0.10" + "@ethersproject/keccak256" "^5.0.7" + "@ethersproject/logger" "^5.0.8" + "@ethersproject/properties" "^5.0.7" + "@ethersproject/random" "^5.0.7" + "@ethersproject/signing-key" "^5.0.8" + "@ethersproject/transactions" "^5.0.9" + "@ethersproject/wordlists" "^5.0.8" + + "@ethersproject/wallet@5.0.7", "@ethersproject/wallet@^5.0.2", "@ethersproject/wallet@^5.0.5": + version "5.0.7" + resolved "https://registry.yarnpkg.com/@ethersproject/wallet/-/wallet-5.0.7.tgz#9d4540f97d534e3d61548ace30f15857209b3f02" + integrity sha512-n2GX1+2Tc0qV8dguUcLkjNugINKvZY7u/5fEsn0skW9rz5+jHTR5IKMV6jSfXA+WjQT8UCNMvkI3CNcdhaPbTQ== + dependencies: + "@ethersproject/abstract-provider" "^5.0.4" + "@ethersproject/abstract-signer" "^5.0.4" + "@ethersproject/address" "^5.0.4" + "@ethersproject/bignumber" "^5.0.7" + "@ethersproject/bytes" "^5.0.4" + "@ethersproject/hash" "^5.0.4" + "@ethersproject/hdnode" "^5.0.4" + "@ethersproject/json-wallets" "^5.0.6" + "@ethersproject/keccak256" "^5.0.3" + "@ethersproject/logger" "^5.0.5" + "@ethersproject/properties" "^5.0.3" + "@ethersproject/random" "^5.0.3" + "@ethersproject/signing-key" "^5.0.4" + "@ethersproject/transactions" "^5.0.5" + "@ethersproject/wordlists" "^5.0.4" + + "@ethersproject/web@5.0.13", "@ethersproject/web@^5.0.12": + version "5.0.13" + resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.0.13.tgz#5a92ac6d835d2ebce95b6b645a86668736e2f532" + integrity sha512-G3x/Ns7pQm21ALnWLbdBI5XkW/jrsbXXffI9hKNPHqf59mTxHYtlNiSwxdoTSwCef3Hn7uvGZpaSgTyxs7IufQ== + dependencies: + "@ethersproject/base64" "^5.0.7" + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/logger" "^5.0.8" + "@ethersproject/properties" "^5.0.7" + "@ethersproject/strings" "^5.0.8" + + "@ethersproject/web@5.0.14": + version "5.0.14" + resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.0.14.tgz#6e7bebdd9fb967cb25ee60f44d9218dc0803bac4" + integrity sha512-QpTgplslwZ0Sp9oKNLoRuS6TKxnkwfaEk3gr7zd7XLF8XBsYejsrQO/03fNfnMx/TAT/RR6WEw/mbOwpRSeVRA== + dependencies: + "@ethersproject/base64" "^5.0.7" + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/logger" "^5.0.8" + "@ethersproject/properties" "^5.0.7" + "@ethersproject/strings" "^5.0.8" + + "@ethersproject/web@5.0.9", "@ethersproject/web@^5.0.6": + version "5.0.9" + resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.0.9.tgz#b08f8295f4bfd4777c8723fe9572f5453b9f03cb" + integrity sha512-//QNlv1MSkOII1hv3+HQwWoiVFS+BMVGI0KYeUww4cyrEktnx1QIez5bTSab9s9fWTFaWKNmQNBwMbxAqPuYDw== + dependencies: + "@ethersproject/base64" "^5.0.3" + "@ethersproject/bytes" "^5.0.4" + "@ethersproject/logger" "^5.0.5" + "@ethersproject/properties" "^5.0.3" + "@ethersproject/strings" "^5.0.4" + + "@ethersproject/wordlists@5.0.10": + version "5.0.10" + resolved "https://registry.yarnpkg.com/@ethersproject/wordlists/-/wordlists-5.0.10.tgz#177b9a0b4d72b9c4f304d08b36612d6c60e9b896" + integrity sha512-jWsEm1iJzpg9SCXnNfFz+tcp4Ofzv0TJb6mj+soCNcar9GcT0yGz62ZsHC3pLQWaF4LkCzGwRJHJTXKjHQfG1A== + dependencies: + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/hash" "^5.0.10" + "@ethersproject/logger" "^5.0.8" + "@ethersproject/properties" "^5.0.7" + "@ethersproject/strings" "^5.0.8" + + "@ethersproject/wordlists@5.0.5", "@ethersproject/wordlists@^5.0.4": + version "5.0.5" + resolved "https://registry.yarnpkg.com/@ethersproject/wordlists/-/wordlists-5.0.5.tgz#a935b7fdb86c96b44ea8391fed94b3fa2f33c606" + integrity sha512-XA3ycFltVrCTQt04w5nHu3Xq5Z6HjqWsXaAYQHFdqtugyUsIumaO9S5MOwFFuUYTNkZUoT3jCRa/OBS+K4tLfA== + dependencies: + "@ethersproject/bytes" "^5.0.4" + "@ethersproject/hash" "^5.0.4" + "@ethersproject/logger" "^5.0.5" + "@ethersproject/properties" "^5.0.3" + "@ethersproject/strings" "^5.0.4" + + "@ethersproject/wordlists@5.0.9", "@ethersproject/wordlists@^5.0.8": + version "5.0.9" + resolved "https://registry.yarnpkg.com/@ethersproject/wordlists/-/wordlists-5.0.9.tgz#f16cc0b317637c3ae9c689ebd7bc2cbbffadd013" + integrity sha512-Sn6MTjZkfbriod6GG6+p43W09HOXT4gwcDVNj0YoPYlo4Zq2Fk6b1CU9KUX3c6aI17PrgYb4qwZm5BMuORyqyQ== + dependencies: + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/hash" "^5.0.10" + "@ethersproject/logger" "^5.0.8" + "@ethersproject/properties" "^5.0.7" + "@ethersproject/strings" "^5.0.8" + + "@nodelib/fs.scandir@2.1.3": + version "2.1.3" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz#3a582bdb53804c6ba6d146579c46e52130cf4a3b" + integrity sha512-eGmwYQn3gxo4r7jdQnkrrN6bY478C3P+a/y72IJukF8LjB6ZHeB3c+Ehacj3sYeSmUXGlnA67/PmbM9CVwL7Dw== + dependencies: + "@nodelib/fs.stat" "2.0.3" + run-parallel "^1.1.9" + + "@nodelib/fs.stat@2.0.3", "@nodelib/fs.stat@^2.0.2": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz#34dc5f4cabbc720f4e60f75a747e7ecd6c175bd3" + integrity sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA== + + "@nodelib/fs.walk@^1.2.3": + version "1.2.4" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.4.tgz#011b9202a70a6366e436ca5c065844528ab04976" + integrity sha512-1V9XOY4rDW0rehzbrcqAmHnz8e7SKvX27gh8Gt2WgB0+pdzdiLV83p72kZPU+jvMbS1qU5mauP2iOvO8rhmurQ== + dependencies: + "@nodelib/fs.scandir" "2.1.3" + fastq "^1.6.0" + + "@nomiclabs/buidler-etherscan@^2.1.0": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@nomiclabs/buidler-etherscan/-/buidler-etherscan-2.1.0.tgz#cdebc96f7683de9586935fb446efce78e98cf973" + integrity sha512-Rh1PGCtIVNU9zDSnLn6WlJDMBM9LXzkwNnzRFnTrMdA+Aa9nMVX7qwbAXG9pyIIsuqNH6MRfk7CDvi8aMoojng== + dependencies: + "@ethersproject/abi" "^5.0.2" + "@ethersproject/address" "^5.0.2" + cbor "^5.0.2" + ethereumjs-abi "^0.6.8" + node-fetch "^2.6.0" + semver "^6.3.0" + + "@nomiclabs/ethereumjs-vm@4.2.2": + version "4.2.2" + resolved "https://registry.yarnpkg.com/@nomiclabs/ethereumjs-vm/-/ethereumjs-vm-4.2.2.tgz#2f8817113ca0fb6c44c1b870d0a809f0e026a6cc" + integrity sha512-8WmX94mMcJaZ7/m7yBbyuS6B+wuOul+eF+RY9fBpGhNaUpyMR/vFIcDojqcWQ4Yafe1tMKY5LDu2yfT4NZgV4Q== + dependencies: + async "^2.1.2" + async-eventemitter "^0.2.2" + core-js-pure "^3.0.1" + ethereumjs-account "^3.0.0" + ethereumjs-block "^2.2.2" + ethereumjs-blockchain "^4.0.3" + ethereumjs-common "^1.5.0" + ethereumjs-tx "^2.1.2" + ethereumjs-util "^6.2.0" + fake-merkle-patricia-tree "^1.0.1" + functional-red-black-tree "^1.0.1" + merkle-patricia-tree "3.0.0" + rustbn.js "~0.2.0" + safe-buffer "^5.1.1" + util.promisify "^1.0.0" + + "@nomiclabs/hardhat-ethers@^2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-ethers/-/hardhat-ethers-2.0.2.tgz#c472abcba0c5185aaa4ad4070146e95213c68511" + integrity sha512-6quxWe8wwS4X5v3Au8q1jOvXYEPkS1Fh+cME5u6AwNdnI4uERvPlVjlgRWzpnb+Rrt1l/cEqiNRH9GlsBMSDQg== + + "@nomiclabs/hardhat-etherscan@^2.1.1": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-etherscan/-/hardhat-etherscan-2.1.1.tgz#186f3fa652a0ca20fb77aa857cfad2da845d5cbf" + integrity sha512-8TNUFsO5DpAfwNlXMDhcEtFAMOYsVNaQL2vq5vuCD45kUKBgL8H21++zOk231ha9D7LQWBMCIg7A7iPxw6Jwmg== + dependencies: + "@ethersproject/abi" "^5.0.2" + "@ethersproject/address" "^5.0.2" + cbor "^5.0.2" + debug "^4.1.1" + fs-extra "^7.0.1" + node-fetch "^2.6.0" + semver "^6.3.0" + + "@openzeppelin/contracts@^3.4.1": + version "3.4.1" + resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-3.4.1.tgz#03c891fec7f93be0ae44ed74e57a122a38732ce7" + integrity sha512-cUriqMauq1ylzP2TxePNdPqkwI7Le3Annh4K9rrpvKfSBB/bdW+Iu1ihBaTIABTAAJ85LmKL5SSPPL9ry8d1gQ== + + "@poanet/solidity-flattener@^3.0.6": + version "3.0.6" + resolved "https://registry.yarnpkg.com/@poanet/solidity-flattener/-/solidity-flattener-3.0.6.tgz#765006bd2227b6e5c5a071ba2a85589512234c4d" + integrity sha512-BCeBZ6DRNfvPWUapRfhVua8zGeeMA1saYceQJDa2izPqTUfJMMaQHNrnyQ3tqgy+0nSeyRwYaSoEsRkQGa+new== + dependencies: + bunyan "^1.8.12" + decomment "^0.9.1" + glob-promise "^3.4.0" + path "^0.12.7" + + "@resolver-engine/core@^0.3.3": + version "0.3.3" + resolved "https://registry.yarnpkg.com/@resolver-engine/core/-/core-0.3.3.tgz#590f77d85d45bc7ecc4e06c654f41345db6ca967" + integrity sha512-eB8nEbKDJJBi5p5SrvrvILn4a0h42bKtbCTri3ZxCGt6UvoQyp7HnGOfki944bUjBSHKK3RvgfViHn+kqdXtnQ== + dependencies: + debug "^3.1.0" + is-url "^1.2.4" + request "^2.85.0" + + "@resolver-engine/fs@^0.3.3": + version "0.3.3" + resolved "https://registry.yarnpkg.com/@resolver-engine/fs/-/fs-0.3.3.tgz#fbf83fa0c4f60154a82c817d2fe3f3b0c049a973" + integrity sha512-wQ9RhPUcny02Wm0IuJwYMyAG8fXVeKdmhm8xizNByD4ryZlx6PP6kRen+t/haF43cMfmaV7T3Cx6ChOdHEhFUQ== + dependencies: + "@resolver-engine/core" "^0.3.3" + debug "^3.1.0" + + "@resolver-engine/imports-fs@^0.3.3": + version "0.3.3" + resolved "https://registry.yarnpkg.com/@resolver-engine/imports-fs/-/imports-fs-0.3.3.tgz#4085db4b8d3c03feb7a425fbfcf5325c0d1e6c1b" + integrity sha512-7Pjg/ZAZtxpeyCFlZR5zqYkz+Wdo84ugB5LApwriT8XFeQoLwGUj4tZFFvvCuxaNCcqZzCYbonJgmGObYBzyCA== + dependencies: + "@resolver-engine/fs" "^0.3.3" + "@resolver-engine/imports" "^0.3.3" + debug "^3.1.0" + + "@resolver-engine/imports@^0.3.3": + version "0.3.3" + resolved "https://registry.yarnpkg.com/@resolver-engine/imports/-/imports-0.3.3.tgz#badfb513bb3ff3c1ee9fd56073e3144245588bcc" + integrity sha512-anHpS4wN4sRMwsAbMXhMfOD/y4a4Oo0Cw/5+rue7hSwGWsDOQaAU1ClK1OxjUC35/peazxEl8JaSRRS+Xb8t3Q== + dependencies: + "@resolver-engine/core" "^0.3.3" + debug "^3.1.0" + hosted-git-info "^2.6.0" + path-browserify "^1.0.0" + url "^0.11.0" + + "@sentry/core@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/core/-/core-5.30.0.tgz#6b203664f69e75106ee8b5a2fe1d717379b331f3" + integrity sha512-TmfrII8w1PQZSZgPpUESqjB+jC6MvZJZdLtE/0hZ+SrnKhW3x5WlYLvTXZpcWePYBku7rl2wn1RZu6uT0qCTeg== + dependencies: + "@sentry/hub" "5.30.0" + "@sentry/minimal" "5.30.0" + "@sentry/types" "5.30.0" + "@sentry/utils" "5.30.0" + tslib "^1.9.3" + + "@sentry/hub@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-5.30.0.tgz#2453be9b9cb903404366e198bd30c7ca74cdc100" + integrity sha512-2tYrGnzb1gKz2EkMDQcfLrDTvmGcQPuWxLnJKXJvYTQDGLlEvi2tWz1VIHjunmOvJrB5aIQLhm+dcMRwFZDCqQ== + dependencies: + "@sentry/types" "5.30.0" + "@sentry/utils" "5.30.0" + tslib "^1.9.3" + + "@sentry/minimal@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-5.30.0.tgz#ce3d3a6a273428e0084adcb800bc12e72d34637b" + integrity sha512-BwWb/owZKtkDX+Sc4zCSTNcvZUq7YcH3uAVlmh/gtR9rmUvbzAA3ewLuB3myi4wWRAMEtny6+J/FN/x+2wn9Xw== + dependencies: + "@sentry/hub" "5.30.0" + "@sentry/types" "5.30.0" + tslib "^1.9.3" + + "@sentry/node@^5.18.1": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/node/-/node-5.30.0.tgz#4ca479e799b1021285d7fe12ac0858951c11cd48" + integrity sha512-Br5oyVBF0fZo6ZS9bxbJZG4ApAjRqAnqFFurMVJJdunNb80brh7a5Qva2kjhm+U6r9NJAB5OmDyPkA1Qnt+QVg== + dependencies: + "@sentry/core" "5.30.0" + "@sentry/hub" "5.30.0" + "@sentry/tracing" "5.30.0" + "@sentry/types" "5.30.0" + "@sentry/utils" "5.30.0" + cookie "^0.4.1" + https-proxy-agent "^5.0.0" + lru_map "^0.3.3" + tslib "^1.9.3" + + "@sentry/tracing@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-5.30.0.tgz#501d21f00c3f3be7f7635d8710da70d9419d4e1f" + integrity sha512-dUFowCr0AIMwiLD7Fs314Mdzcug+gBVo/+NCMyDw8tFxJkwWAKl7Qa2OZxLQ0ZHjakcj1hNKfCQJ9rhyfOl4Aw== + dependencies: + "@sentry/hub" "5.30.0" + "@sentry/minimal" "5.30.0" + "@sentry/types" "5.30.0" + "@sentry/utils" "5.30.0" + tslib "^1.9.3" + + "@sentry/types@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/types/-/types-5.30.0.tgz#19709bbe12a1a0115bc790b8942917da5636f402" + integrity sha512-R8xOqlSTZ+htqrfteCWU5Nk0CDN5ApUTvrlvBuiH1DyP6czDZ4ktbZB0hAgBlVcK0U+qpD3ag3Tqqpa5Q67rPw== + + "@sentry/utils@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-5.30.0.tgz#9a5bd7ccff85ccfe7856d493bffa64cabc41e980" + integrity sha512-zaYmoH0NWWtvnJjC9/CBseXMtKHm/tm40sz3YfJRxeQjyzRqNQPgivpd9R/oDJCYj999mzdW382p/qi2ypjLww== + dependencies: + "@sentry/types" "5.30.0" + tslib "^1.9.3" + + "@sindresorhus/is@^0.14.0": + version "0.14.0" + resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea" + integrity sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ== + + "@sinonjs/commons@^1.6.0", "@sinonjs/commons@^1.7.0", "@sinonjs/commons@^1.8.1": + version "1.8.2" + resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.2.tgz#858f5c4b48d80778fde4b9d541f27edc0d56488b" + integrity sha512-sruwd86RJHdsVf/AtBoijDmUqJp3B6hF/DGC23C+JaegnDHaZyewCjoVGTdg3J0uz3Zs7NnIT05OBOmML72lQw== + dependencies: + type-detect "4.0.8" + + "@sinonjs/fake-timers@^6.0.0", "@sinonjs/fake-timers@^6.0.1": + version "6.0.1" + resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-6.0.1.tgz#293674fccb3262ac782c7aadfdeca86b10c75c40" + integrity sha512-MZPUxrmFubI36XS1DI3qmI0YdN1gks62JtFZvxR67ljjSNCeK6U08Zx4msEWOXuofgqUt6zPHSi1H9fbjR/NRA== + dependencies: + "@sinonjs/commons" "^1.7.0" + + "@sinonjs/samsam@^5.3.1": + version "5.3.1" + resolved "https://registry.yarnpkg.com/@sinonjs/samsam/-/samsam-5.3.1.tgz#375a45fe6ed4e92fca2fb920e007c48232a6507f" + integrity sha512-1Hc0b1TtyfBu8ixF/tpfSHTVWKwCBLY4QJbkgnE7HcwyvT2xArDxb4K7dMgqRm3szI+LJbzmW/s4xxEhv6hwDg== + dependencies: + "@sinonjs/commons" "^1.6.0" + lodash.get "^4.4.2" + type-detect "^4.0.8" + + "@sinonjs/text-encoding@^0.7.1": + version "0.7.1" + resolved "https://registry.yarnpkg.com/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz#8da5c6530915653f3a1f38fd5f101d8c3f8079c5" + integrity sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ== + + "@solidity-parser/parser@^0.11.0": + version "0.11.1" + resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.11.1.tgz#fa840af64840c930f24a9c82c08d4a092a068add" + integrity sha512-H8BSBoKE8EubJa0ONqecA2TviT3TnHeC4NpgnAHSUiuhZoQBfPB4L2P9bs8R6AoTW10Endvh3vc+fomVMIDIYQ== + + "@solidity-parser/parser@^0.12.0": + version "0.12.0" + resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.12.0.tgz#18a0fb2a9d2484b23176f63b16093c64794fc323" + integrity sha512-DT3f/Aa4tQysZwUsuqBwvr8YRJzKkvPUKV/9o2/o5EVw3xqlbzmtx4O60lTUcZdCawL+N8bBLNUyOGpHjGlJVQ== + + "@solidity-parser/parser@^0.8.1": + version "0.8.1" + resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.8.1.tgz#1b606578af86b9ad10755409804a6ba83f9ce8a4" + integrity sha512-DF7H6T8I4lo2IZOE2NZwt3631T8j1gjpQLjmvY2xBNK50c4ltslR4XPKwT6RkeSd4+xCAK0GHC/k7sbRDBE4Yw== + + "@szmarczak/http-timer@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-1.1.2.tgz#b1665e2c461a2cd92f4c1bbf50d5454de0d4b421" + integrity sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA== + dependencies: + defer-to-connect "^1.0.1" + + "@truffle/blockchain-utils@^0.0.27": + version "0.0.27" + resolved "https://registry.yarnpkg.com/@truffle/blockchain-utils/-/blockchain-utils-0.0.27.tgz#e8d4c337e5478bc316353a1f63a86fa1439e62c8" + integrity sha512-QldE+NNCPbRpVU82rd1JuOrsze79DTBXYkzZPSGjPCRU6hTGVbPrqeHlW2Ju7LREDsjWrzOaU2LxLME11xLwPA== + dependencies: + source-map-support "^0.5.19" + + "@truffle/codec@^0.10.1": + version "0.10.1" + resolved "https://registry.yarnpkg.com/@truffle/codec/-/codec-0.10.1.tgz#70df52ddf1c64781a23daaccda24e10bfb9dec9d" + integrity sha512-c1lC9Wcp+Z1DLvEYH3dkEtMKnUJx72CirO3kmi0OgFSA5QqTDCtfrVOhAugcb/iMLgqUK05/pexp2whb4oASKA== + dependencies: + big.js "^5.2.2" + bn.js "^5.1.3" + cbor "^5.1.0" + debug "^4.3.1" + lodash.clonedeep "^4.5.0" + lodash.escaperegexp "^4.1.2" + lodash.partition "^4.6.0" + lodash.sum "^4.0.2" + semver "^7.3.4" + source-map-support "^0.5.19" + utf8 "^3.0.0" + web3-utils "1.2.9" + + "@truffle/contract-schema@^3.3.4": + version "3.3.4" + resolved "https://registry.yarnpkg.com/@truffle/contract-schema/-/contract-schema-3.3.4.tgz#95f0265cac7de7bcaa0542f5fe671a7896011bfe" + integrity sha512-HzscBl/GhZBvPNQeD9l6ewSHSkvNmE+bA0iTVa0Y2mNf5GD5Y3fK2NPyfbOdtckOvLqebvYGEDEPRiXc3BZ05g== + dependencies: + ajv "^6.10.0" + crypto-js "^3.1.9-1" + debug "^4.3.1" + + "@truffle/contract@^4.2.29": + version "4.3.11" + resolved "https://registry.yarnpkg.com/@truffle/contract/-/contract-4.3.11.tgz#b098df9719ea7134320a3608b86efc278a31ca79" + integrity sha512-SrE0HnfwjF+a/gJXdOzcfma5c5jPE1ONPfsEO+f3MERRZj7lRSoJDrOXTRgASOzhnk9BGzJQa6oMBI/k+rwIuw== + dependencies: + "@truffle/blockchain-utils" "^0.0.27" + "@truffle/contract-schema" "^3.3.4" + "@truffle/debug-utils" "^5.0.11" + "@truffle/error" "^0.0.12" + "@truffle/interface-adapter" "^0.4.19" + bignumber.js "^7.2.1" + ethereum-ens "^0.8.0" + ethers "^4.0.32" + source-map-support "^0.5.19" + web3 "1.2.9" + web3-core-helpers "1.2.9" + web3-core-promievent "1.2.9" + web3-eth-abi "1.2.9" + web3-utils "1.2.9" + + "@truffle/debug-utils@^5.0.11": + version "5.0.11" + resolved "https://registry.yarnpkg.com/@truffle/debug-utils/-/debug-utils-5.0.11.tgz#297ff83943212bf593a641180e3b28b230acadaa" + integrity sha512-KurW9r1DcK9c7/I0H21YWGBKu77gWm5HfBW6T+MjuRh5FGpxZ7GPka8oQkJCAZQuZKaQc9r9BoCQYQx1NX8pIg== + dependencies: + "@truffle/codec" "^0.10.1" + "@trufflesuite/chromafi" "^2.2.2" + bn.js "^5.1.3" + chalk "^2.4.2" + debug "^4.3.1" + highlight.js "^10.4.0" + highlightjs-solidity "^1.0.21" + + "@truffle/error@^0.0.12": + version "0.0.12" + resolved "https://registry.yarnpkg.com/@truffle/error/-/error-0.0.12.tgz#83e02e6ffe1d154fe274141d90038a91fd1e186d" + integrity sha512-kZqqnPR9YDJG7KCDOcN1qH16Qs0oz1PzF0Y93AWdhXuL9S9HYo/RUUeqGKbPpRBEZldQUS8aa4EzfK08u5pu6g== + + "@truffle/interface-adapter@^0.4.19": + version "0.4.19" + resolved "https://registry.yarnpkg.com/@truffle/interface-adapter/-/interface-adapter-0.4.19.tgz#19248ac88099f8df34f58a3d43a95ba3470dc89a" + integrity sha512-+Zz6Fr8+I2wYSS8RM3WBOMzf22QffMQTnlsYsRgRHzv3gYoRA9ZDLb84lFRfmWyw+IdXTo90tjRHEb5krC6uxg== + dependencies: + bn.js "^5.1.3" + ethers "^4.0.32" + source-map-support "^0.5.19" + web3 "1.2.9" + + "@truffle/provider@^0.2.24": + version "0.2.26" + resolved "https://registry.yarnpkg.com/@truffle/provider/-/provider-0.2.26.tgz#88e31b79973c2427c4a17d9a59411e6fbc810190" + integrity sha512-YKPmhB9S9AQkT2ePGtadwjDduxU23DXXy+5zyM5fevw5GCbXSnf+jG6rICXjPkVFjuKBlXuq5JbuERZn43522Q== + dependencies: + "@truffle/error" "^0.0.12" + "@truffle/interface-adapter" "^0.4.19" + web3 "1.2.9" + + "@trufflesuite/chromafi@^2.2.2": + version "2.2.2" + resolved "https://registry.yarnpkg.com/@trufflesuite/chromafi/-/chromafi-2.2.2.tgz#d3fc507aa8504faffc50fb892cedcfe98ff57f77" + integrity sha512-mItQwVBsb8qP/vaYHQ1kDt2vJLhjoEXJptT6y6fJGvFophMFhOI/NsTVUa0nJL1nyMeFiS6hSYuNVdpQZzB1gA== + dependencies: + ansi-mark "^1.0.0" + ansi-regex "^3.0.0" + array-uniq "^1.0.3" + camelcase "^4.1.0" + chalk "^2.3.2" + cheerio "^1.0.0-rc.2" + detect-indent "^5.0.0" + he "^1.1.1" + highlight.js "^10.4.1" + lodash.merge "^4.6.2" + min-indent "^1.0.0" + strip-ansi "^4.0.0" + strip-indent "^2.0.0" + super-split "^1.1.0" + + "@typechain/ethers-v5@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@typechain/ethers-v5/-/ethers-v5-2.0.0.tgz#cd3ca1590240d587ca301f4c029b67bfccd08810" + integrity sha512-0xdCkyGOzdqh4h5JSf+zoWx85IusEjDcPIwNEHP8mrWSnCae4rvrqB+/gtpdNfX7zjlFlZiMeePn2r63EI3Lrw== + dependencies: + ethers "^5.0.2" + + "@typechain/ethers-v5@^6.0.0": + version "6.0.0" + resolved "https://registry.yarnpkg.com/@typechain/ethers-v5/-/ethers-v5-6.0.0.tgz#eb0df3f12be92f03db4e59656a46a518058730b9" + integrity sha512-yJhl3j5mab3yl8qm1TsvHQKwrUPn491SBJvHf/b3PKVtt0VxXJwU2T05yzqEpkMFGA0qkmp3cxQJDK2WGIPP+g== + + "@typechain/hardhat@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@typechain/hardhat/-/hardhat-1.0.1.tgz#6e53956c15b2aff073413cfcdb3f5339b0a85f2e" + integrity sha512-gRETPlvLdN95PIP3PVktEtQSnSMJMWxaxNKI34KFPYEuW4QLLm6UrUCHWmulhB1eUQ1EhYRAda7kEhcJOQ/M1g== + + "@types/bn.js@^4.11.3", "@types/bn.js@^4.11.4", "@types/bn.js@^4.11.5": + version "4.11.6" + resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-4.11.6.tgz#c306c70d9358aaea33cd4eda092a742b9505967c" + integrity sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg== + dependencies: + "@types/node" "*" + + "@types/bn.js@^5.1.0": + version "5.1.0" + resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.0.tgz#32c5d271503a12653c62cf4d2b45e6eab8cebc68" + integrity sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA== + dependencies: + "@types/node" "*" + + "@types/chai@^4.2.11": + version "4.2.14" + resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.2.14.tgz#44d2dd0b5de6185089375d976b4ec5caf6861193" + integrity sha512-G+ITQPXkwTrslfG5L/BksmbLUA0M1iybEsmCWPqzSxsRRhJZimBKJkoMi8fr/CPygPTj4zO5pJH7I2/cm9M7SQ== + + "@types/concat-stream@^1.6.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@types/concat-stream/-/concat-stream-1.6.0.tgz#394dbe0bb5fee46b38d896735e8b68ef2390d00d" + integrity sha1-OU2+C7X+5Gs42JZzXoto7yOQ0A0= + dependencies: + "@types/node" "*" + + "@types/form-data@0.0.33": + version "0.0.33" + resolved "https://registry.yarnpkg.com/@types/form-data/-/form-data-0.0.33.tgz#c9ac85b2a5fd18435b8c85d9ecb50e6d6c893ff8" + integrity sha1-yayFsqX9GENbjIXZ7LUObWyJP/g= + dependencies: + "@types/node" "*" + + "@types/glob@*", "@types/glob@^7.1.1": + version "7.1.3" + resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.3.tgz#e6ba80f36b7daad2c685acd9266382e68985c183" + integrity sha512-SEYeGAIQIQX8NN6LDKprLjbrd5dARM5EXsd8GI/A5l0apYI1fGMWgPHSe4ZKL4eozlAyI+doUE9XbYS4xCkQ1w== + dependencies: + "@types/minimatch" "*" + "@types/node" "*" + + "@types/json-schema@^7.0.3": + version "7.0.6" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.6.tgz#f4c7ec43e81b319a9815115031709f26987891f0" + integrity sha512-3c+yGKvVP5Y9TYBEibGNR+kLtijnj7mYrXRg+WpFb2X9xm04g/DXYkfg4hmzJQosc9snFNUPkbYIhu+KAm6jJw== + + "@types/lru-cache@^5.1.0": + version "5.1.0" + resolved "https://registry.yarnpkg.com/@types/lru-cache/-/lru-cache-5.1.0.tgz#57f228f2b80c046b4a1bd5cac031f81f207f4f03" + integrity sha512-RaE0B+14ToE4l6UqdarKPnXwVDuigfFv+5j9Dze/Nqr23yyuqdNvzcZi3xB+3Agvi5R4EOgAksfv3lXX4vBt9w== + + "@types/minimatch@*": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" + integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== + + "@types/mkdirp@^0.5.2": + version "0.5.2" + resolved "https://registry.yarnpkg.com/@types/mkdirp/-/mkdirp-0.5.2.tgz#503aacfe5cc2703d5484326b1b27efa67a339c1f" + integrity sha512-U5icWpv7YnZYGsN4/cmh3WD2onMY0aJIiTE6+51TwJCttdHvtCYmkBNOobHlXwrJRL0nkH9jH4kD+1FAdMN4Tg== + dependencies: + "@types/node" "*" + + "@types/mocha@^8.0.2": + version "8.0.3" + resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-8.0.3.tgz#51b21b6acb6d1b923bbdc7725c38f9f455166402" + integrity sha512-vyxR57nv8NfcU0GZu8EUXZLTbCMupIUwy95LJ6lllN+JRPG25CwMHoB1q5xKh8YKhQnHYRAn4yW2yuHbf/5xgg== + + "@types/node-fetch@^2.5.5": + version "2.5.8" + resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.5.8.tgz#e199c835d234c7eb0846f6618012e558544ee2fb" + integrity sha512-fbjI6ja0N5ZA8TV53RUqzsKNkl9fv8Oj3T7zxW7FGv1GSH7gwJaNF8dzCjrqKaxKeUpTz4yT1DaJFq/omNpGfw== + dependencies: + "@types/node" "*" + form-data "^3.0.0" + + "@types/node@*": + version "14.14.37" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.37.tgz#a3dd8da4eb84a996c36e331df98d82abd76b516e" + integrity sha512-XYmBiy+ohOR4Lh5jE379fV2IU+6Jn4g5qASinhitfyO71b/sCo6MKsMLF5tc7Zf2CE8hViVQyYSobJNke8OvUw== + + "@types/node@^10.0.3": + version "10.17.44" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.44.tgz#3945e6b702cb6403f22b779c8ea9e5c3f44ead40" + integrity sha512-vHPAyBX1ffLcy4fQHmDyIUMUb42gHZjPHU66nhvbMzAWJqHnySGZ6STwN3rwrnSd1FHB0DI/RWgGELgKSYRDmw== + + "@types/node@^10.12.18": + version "10.17.52" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.52.tgz#dc960d4e256331b3c697b7a573ee98b882febee5" + integrity sha512-bKnO8Rcj03i6JTzweabq96k29uVNcXGB0bkwjVQTFagDgxxNged18281AZ0nTMHl+aFpPPWyPrk4Z3+NtW/z5w== + + "@types/node@^12.12.6": + version "12.20.6" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.6.tgz#7b73cce37352936e628c5ba40326193443cfba25" + integrity sha512-sRVq8d+ApGslmkE9e3i+D3gFGk7aZHAT+G4cIpIEdLJYPsWiSPwcAnJEjddLQQDqV3Ra2jOclX/Sv6YrvGYiWA== + + "@types/node@^12.6.1": + version "12.20.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.1.tgz#63d36c10e162666f0107f247cdca76542c3c7472" + integrity sha512-tCkE96/ZTO+cWbln2xfyvd6ngHLanvVlJ3e5BeirJ3BYI5GbAyubIrmV4JjjugDly5D9fHjOL5MNsqsCnqwW6g== + + "@types/node@^14.10.2": + version "14.14.5" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.5.tgz#e92d3b8f76583efa26c1a63a21c9d3c1143daa29" + integrity sha512-H5Wn24s/ZOukBmDn03nnGTp18A60ny9AmCwnEcgJiTgSGsCO7k+NWP7zjCCbhlcnVCoI+co52dUAt9GMhOSULw== + + "@types/node@^8.0.0": + version "8.10.66" + resolved "https://registry.yarnpkg.com/@types/node/-/node-8.10.66.tgz#dd035d409df322acc83dff62a602f12a5783bbb3" + integrity sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw== + + "@types/pbkdf2@^3.0.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@types/pbkdf2/-/pbkdf2-3.1.0.tgz#039a0e9b67da0cdc4ee5dab865caa6b267bb66b1" + integrity sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ== + dependencies: + "@types/node" "*" + + "@types/prettier@^2.1.1": + version "2.2.1" + resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.2.1.tgz#374e31645d58cb18a07b3ecd8e9dede4deb2cccd" + integrity sha512-DxZZbyMAM9GWEzXL+BMZROWz9oo6A9EilwwOMET2UVu2uZTqMWS5S69KVtuVKaRjCUpcrOXRalet86/OpG4kqw== + + "@types/qs@^6.2.31", "@types/qs@^6.9.4": + version "6.9.5" + resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.5.tgz#434711bdd49eb5ee69d90c1d67c354a9a8ecb18b" + integrity sha512-/JHkVHtx/REVG0VVToGRGH2+23hsYLHdyG+GrvoUGlGAd0ErauXDyvHtRI/7H7mzLm+tBCKA7pfcpkQ1lf58iQ== + + "@types/resolve@^0.0.8": + version "0.0.8" + resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-0.0.8.tgz#f26074d238e02659e323ce1a13d041eee280e194" + integrity sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ== + dependencies: + "@types/node" "*" + + "@types/secp256k1@^4.0.1": + version "4.0.1" + resolved "https://registry.yarnpkg.com/@types/secp256k1/-/secp256k1-4.0.1.tgz#fb3aa61a1848ad97d7425ff9dcba784549fca5a4" + integrity sha512-+ZjSA8ELlOp8SlKi0YLB2tz9d5iPNEmOBd+8Rz21wTMdaXQIa9b6TEnD6l5qKOCypE7FSyPyck12qZJxSDNoog== + dependencies: + "@types/node" "*" + + "@typescript-eslint/eslint-plugin@^4.6.0": + version "4.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.6.0.tgz#210cd538bb703f883aff81d3996961f5dba31fdb" + integrity sha512-1+419X+Ynijytr1iWI+/IcX/kJryc78YNpdaXR1aRO1sU3bC0vZrIAF1tIX7rudVI84W7o7M4zo5p1aVt70fAg== + dependencies: + "@typescript-eslint/experimental-utils" "4.6.0" + "@typescript-eslint/scope-manager" "4.6.0" + debug "^4.1.1" + functional-red-black-tree "^1.0.1" + regexpp "^3.0.0" + semver "^7.3.2" + tsutils "^3.17.1" + + "@typescript-eslint/experimental-utils@4.6.0": + version "4.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.6.0.tgz#f750aef4dd8e5970b5c36084f0a5ca2f0db309a4" + integrity sha512-pnh6Beh2/4xjJVNL+keP49DFHk3orDHHFylSp3WEjtgW3y1U+6l+jNnJrGlbs6qhAz5z96aFmmbUyKhunXKvKw== + dependencies: + "@types/json-schema" "^7.0.3" + "@typescript-eslint/scope-manager" "4.6.0" + "@typescript-eslint/types" "4.6.0" + "@typescript-eslint/typescript-estree" "4.6.0" + eslint-scope "^5.0.0" + eslint-utils "^2.0.0" + + "@typescript-eslint/parser@^4.6.0": + version "4.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.6.0.tgz#7e9ff7df2f21d5c8f65f17add3b99eeeec33199d" + integrity sha512-Dj6NJxBhbdbPSZ5DYsQqpR32MwujF772F2H3VojWU6iT4AqL4BKuoNWOPFCoSZvCcADDvQjDpa6OLDAaiZPz2Q== + dependencies: + "@typescript-eslint/scope-manager" "4.6.0" + "@typescript-eslint/types" "4.6.0" + "@typescript-eslint/typescript-estree" "4.6.0" + debug "^4.1.1" + + "@typescript-eslint/scope-manager@4.6.0": + version "4.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.6.0.tgz#b7d8b57fe354047a72dfb31881d9643092838662" + integrity sha512-uZx5KvStXP/lwrMrfQQwDNvh2ppiXzz5TmyTVHb+5TfZ3sUP7U1onlz3pjoWrK9konRyFe1czyxObWTly27Ang== + dependencies: + "@typescript-eslint/types" "4.6.0" + "@typescript-eslint/visitor-keys" "4.6.0" + + "@typescript-eslint/types@4.6.0": + version "4.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.6.0.tgz#157ca925637fd53c193c6bf226a6c02b752dde2f" + integrity sha512-5FAgjqH68SfFG4UTtIFv+rqYJg0nLjfkjD0iv+5O27a0xEeNZ5rZNDvFGZDizlCD1Ifj7MAbSW2DPMrf0E9zjA== + + "@typescript-eslint/typescript-estree@4.6.0": + version "4.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.6.0.tgz#85bd98dcc8280511cfc5b2ce7b03a9ffa1732b08" + integrity sha512-s4Z9qubMrAo/tw0CbN0IN4AtfwuehGXVZM0CHNMdfYMGBDhPdwTEpBrecwhP7dRJu6d9tT9ECYNaWDHvlFSngA== + dependencies: + "@typescript-eslint/types" "4.6.0" + "@typescript-eslint/visitor-keys" "4.6.0" + debug "^4.1.1" + globby "^11.0.1" + is-glob "^4.0.1" + lodash "^4.17.15" + semver "^7.3.2" + tsutils "^3.17.1" + + "@typescript-eslint/visitor-keys@4.6.0": + version "4.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.6.0.tgz#fb05d6393891b0a089b243fc8f9fb8039383d5da" + integrity sha512-38Aa9Ztl0XyFPVzmutHXqDMCu15Xx8yKvUo38Gu3GhsuckCh3StPI5t2WIO9LHEsOH7MLmlGfKUisU8eW1Sjhg== + dependencies: + "@typescript-eslint/types" "4.6.0" + eslint-visitor-keys "^2.0.0" + + "@ungap/promise-all-settled@1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44" + integrity sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q== + + "@yarnpkg/lockfile@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31" + integrity sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ== + + abbrev@1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== + + abbrev@1.0.x: + version "1.0.9" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" + integrity sha1-kbR5JYinc4wl813W9jdSovh3YTU= + + abort-controller@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392" + integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg== + dependencies: + event-target-shim "^5.0.0" + + abstract-leveldown@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-3.0.0.tgz#5cb89f958a44f526779d740d1440e743e0c30a57" + integrity sha512-KUWx9UWGQD12zsmLNj64/pndaz4iJh/Pj7nopgkfDG6RlCcbMZvT6+9l7dchK4idog2Is8VdC/PvNbFuFmalIQ== + dependencies: + xtend "~4.0.0" + + abstract-leveldown@^2.4.1, abstract-leveldown@~2.7.1: + version "2.7.2" + resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-2.7.2.tgz#87a44d7ebebc341d59665204834c8b7e0932cc93" + integrity sha512-+OVvxH2rHVEhWLdbudP6p0+dNMXu8JA1CbhP19T8paTYAcX7oJ4OVjT+ZUVpv7mITxXHqDMej+GdqXBmXkw09w== + dependencies: + xtend "~4.0.0" + + abstract-leveldown@^5.0.0, abstract-leveldown@~5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-5.0.0.tgz#f7128e1f86ccabf7d2893077ce5d06d798e386c6" + integrity sha512-5mU5P1gXtsMIXg65/rsYGsi93+MlogXZ9FA8JnwKurHQg64bfXwGYVdVdijNTVNOlAsuIiOwHdvFFD5JqCJQ7A== + dependencies: + xtend "~4.0.0" + + abstract-leveldown@~2.6.0: + version "2.6.3" + resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-2.6.3.tgz#1c5e8c6a5ef965ae8c35dfb3a8770c476b82c4b8" + integrity sha512-2++wDf/DYqkPR3o5tbfdhF96EfMApo1GpPfzOsR/ZYXdkSmELlvOOEAl9iKkRsktMPHdGjO4rtkBpf2I7TiTeA== + dependencies: + xtend "~4.0.0" + + accepts@~1.3.7: + version "1.3.7" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" + integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA== + dependencies: + mime-types "~2.1.24" + negotiator "0.6.2" + + acorn-jsx@^5.0.0, acorn-jsx@^5.2.0: + version "5.3.1" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.1.tgz#fc8661e11b7ac1539c47dbfea2e72b3af34d267b" + integrity sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng== + + acorn@^6.0.7: + version "6.4.2" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.2.tgz#35866fd710528e92de10cf06016498e47e39e1e6" + integrity sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ== + + acorn@^7.4.0: + version "7.4.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" + integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== + + address@^1.0.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/address/-/address-1.1.2.tgz#bf1116c9c758c51b7a933d296b72c221ed9428b6" + integrity sha512-aT6camzM4xEA54YVJYSqxz1kv4IHnQZRtThJJHhUMRExaU5spC7jX5ugSwTaTgJliIgs4VhZOk7htClvQ/LmRA== + + adm-zip@^0.4.16: + version "0.4.16" + resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.16.tgz#cf4c508fdffab02c269cbc7f471a875f05570365" + integrity sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg== + + aes-js@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.0.0.tgz#e21df10ad6c2053295bcbb8dab40b09dbea87e4d" + integrity sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0= + + aes-js@^3.1.1: + version "3.1.2" + resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.1.2.tgz#db9aabde85d5caabbfc0d4f2a4446960f627146a" + integrity sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ== + + agent-base@6: + version "6.0.2" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" + integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== + dependencies: + debug "4" + + ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.3, ajv@^6.12.4, ajv@^6.6.1, ajv@^6.9.1: + version "6.12.6" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + + amdefine@>=0.0.4: + version "1.0.1" + resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" + integrity sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU= + + ansi-colors@3.2.3: + version "3.2.3" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.3.tgz#57d35b8686e851e2cc04c403f1c00203976a1813" + integrity sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw== + + ansi-colors@4.1.1, ansi-colors@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" + integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== + + ansi-escapes@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" + integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== + + ansi-escapes@^4.3.0: + version "4.3.2" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" + integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== + dependencies: + type-fest "^0.21.3" + + ansi-mark@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/ansi-mark/-/ansi-mark-1.0.4.tgz#1cd4ba8d57f15f109d6aaf6ec9ca9786c8a4ee6c" + integrity sha1-HNS6jVfxXxCdaq9uycqXhsik7mw= + dependencies: + ansi-regex "^3.0.0" + array-uniq "^1.0.3" + chalk "^2.3.2" + strip-ansi "^4.0.0" + super-split "^1.1.0" + + ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= + + ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= + + ansi-regex@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" + integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== + + ansi-regex@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" + integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== + + ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= + + ansi-styles@^3.2.0, ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + dependencies: + color-convert "^1.9.0" + + ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + + antlr4@4.7.1: + version "4.7.1" + resolved "https://registry.yarnpkg.com/antlr4/-/antlr4-4.7.1.tgz#69984014f096e9e775f53dd9744bf994d8959773" + integrity sha512-haHyTW7Y9joE5MVs37P2lNYfU2RWBLfcRDD8OWldcdZm5TiCE91B5Xl1oWSwiDUSd4rlExpt2pu1fksYQjRBYQ== + + anymatch@~3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.1.tgz#c55ecf02185e2469259399310c173ce31233b142" + integrity sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + + arg@^4.1.0: + version "4.1.3" + resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" + integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== + + argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== + dependencies: + sprintf-js "~1.0.2" + + arr-diff@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" + integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= + + arr-flatten@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" + integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== + + arr-union@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" + integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= + + array-back@^1.0.3, array-back@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/array-back/-/array-back-1.0.4.tgz#644ba7f095f7ffcf7c43b5f0dc39d3c1f03c063b" + integrity sha1-ZEun8JX3/898Q7Xw3DnTwfA8Bjs= + dependencies: + typical "^2.6.0" + + array-back@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/array-back/-/array-back-2.0.0.tgz#6877471d51ecc9c9bfa6136fb6c7d5fe69748022" + integrity sha512-eJv4pLLufP3g5kcZry0j6WXpIbzYw9GUB4mVJZno9wfwiBxbizTnHCw3VJb07cBihbFX48Y7oSrW9y+gt4glyw== + dependencies: + typical "^2.6.1" + + array-filter@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-filter/-/array-filter-1.0.0.tgz#baf79e62e6ef4c2a4c0b831232daffec251f9d83" + integrity sha1-uveeYubvTCpMC4MSMtr/7CUfnYM= + + array-flatten@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" + integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= + + array-union@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" + integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== + + array-uniq@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" + integrity sha1-r2rId6Jcx/dOBYiUdThY39sk/bY= + + array-unique@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" + integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= + + arweave@^1.10.13: + version "1.10.13" + resolved "https://registry.yarnpkg.com/arweave/-/arweave-1.10.13.tgz#88205154524b30a22b18f011f7241b2ddc22413c" + integrity sha512-FfM9CAF5msAk/12d87KDKu+00/ZriEf/S3ei2FTPMKCOdOb++SwLx7F3kAKO74obAgIGzL8X4Y0D/aV8oNNJDA== + dependencies: + asn1.js "^5.4.1" + axios "^0.21.1" + base64-js "^1.3.1" + bignumber.js "^9.0.1" + + asap@~2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" + integrity sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY= + + asn1.js@^5.2.0, asn1.js@^5.4.1: + version "5.4.1" + resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-5.4.1.tgz#11a980b84ebb91781ce35b0fdc2ee294e3783f07" + integrity sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA== + dependencies: + bn.js "^4.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + safer-buffer "^2.1.0" + + asn1@~0.2.3: + version "0.2.4" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" + integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg== + dependencies: + safer-buffer "~2.1.0" + + assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= + + assertion-error@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" + integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== + + assign-symbols@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" + integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= + + ast-parents@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/ast-parents/-/ast-parents-0.0.1.tgz#508fd0f05d0c48775d9eccda2e174423261e8dd3" + integrity sha1-UI/Q8F0MSHddnszaLhdEIyYejdM= + + astral-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" + integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg== + + async-eventemitter@^0.2.2: + version "0.2.4" + resolved "https://registry.yarnpkg.com/async-eventemitter/-/async-eventemitter-0.2.4.tgz#f5e7c8ca7d3e46aab9ec40a292baf686a0bafaca" + integrity sha512-pd20BwL7Yt1zwDFy+8MX8F1+WCT8aQeKj0kQnTrH9WaeRETlRamVhD0JtRPmrV4GfOJ2F9CvdQkZeZhnh2TuHw== + dependencies: + async "^2.4.0" + + async-limiter@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" + integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== + + async@1.x, async@^1.4.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" + integrity sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo= + + async@2.6.2: + version "2.6.2" + resolved "https://registry.yarnpkg.com/async/-/async-2.6.2.tgz#18330ea7e6e313887f5d2f2a904bac6fe4dd5381" + integrity sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg== + dependencies: + lodash "^4.17.11" + + async@^2.0.1, async@^2.1.2, async@^2.4.0, async@^2.5.0, async@^2.6.1: + version "2.6.3" + resolved "https://registry.yarnpkg.com/async/-/async-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff" + integrity sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg== + dependencies: + lodash "^4.17.14" + + asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= + + at-least-node@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" + integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== + + atob@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" + integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== + + available-typed-arrays@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.2.tgz#6b098ca9d8039079ee3f77f7b783c4480ba513f5" + integrity sha512-XWX3OX8Onv97LMk/ftVyBibpGwY5a8SmuxZPzeOxqmuEqUCOM9ZE+uIaD1VNJ5QnvU2UQusvmKbuM1FR8QWGfQ== + dependencies: + array-filter "^1.0.0" + + aws-sign2@~0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" + integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= + + aws4@^1.8.0: + version "1.10.1" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.10.1.tgz#e1e82e4f3e999e2cfd61b161280d16a111f86428" + integrity sha512-zg7Hz2k5lI8kb7U32998pRRFin7zJlkfezGJjUc2heaD4Pw2wObakCDVzkKztTm/Ln7eiVvYsjqak0Ed4LkMDA== + + axios@^0.21.1: + version "0.21.1" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.1.tgz#22563481962f4d6bde9a76d516ef0e5d3c09b2b8" + integrity sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA== + dependencies: + follow-redirects "^1.10.0" + + babel-code-frame@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" + integrity sha1-Y/1D99weO7fONZR9uP42mj9Yx0s= + dependencies: + chalk "^1.1.3" + esutils "^2.0.2" + js-tokens "^3.0.2" + + babel-core@^6.0.14, babel-core@^6.26.0: + version "6.26.3" + resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.3.tgz#b2e2f09e342d0f0c88e2f02e067794125e75c207" + integrity sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA== + dependencies: + babel-code-frame "^6.26.0" + babel-generator "^6.26.0" + babel-helpers "^6.24.1" + babel-messages "^6.23.0" + babel-register "^6.26.0" + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + convert-source-map "^1.5.1" + debug "^2.6.9" + json5 "^0.5.1" + lodash "^4.17.4" + minimatch "^3.0.4" + path-is-absolute "^1.0.1" + private "^0.1.8" + slash "^1.0.0" + source-map "^0.5.7" + + babel-generator@^6.26.0: + version "6.26.1" + resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90" + integrity sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA== + dependencies: + babel-messages "^6.23.0" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + detect-indent "^4.0.0" + jsesc "^1.3.0" + lodash "^4.17.4" + source-map "^0.5.7" + trim-right "^1.0.1" + + babel-helper-builder-binary-assignment-operator-visitor@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz#cce4517ada356f4220bcae8a02c2b346f9a56664" + integrity sha1-zORReto1b0IgvK6KAsKzRvmlZmQ= + dependencies: + babel-helper-explode-assignable-expression "^6.24.1" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + + babel-helper-call-delegate@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz#ece6aacddc76e41c3461f88bfc575bd0daa2df8d" + integrity sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340= + dependencies: + babel-helper-hoist-variables "^6.24.1" + babel-runtime "^6.22.0" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + + babel-helper-define-map@^6.24.1: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz#a5f56dab41a25f97ecb498c7ebaca9819f95be5f" + integrity sha1-pfVtq0GiX5fstJjH66ypgZ+Vvl8= + dependencies: + babel-helper-function-name "^6.24.1" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + lodash "^4.17.4" + + babel-helper-explode-assignable-expression@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz#f25b82cf7dc10433c55f70592d5746400ac22caa" + integrity sha1-8luCz33BBDPFX3BZLVdGQArCLKo= + dependencies: + babel-runtime "^6.22.0" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + + babel-helper-function-name@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz#d3475b8c03ed98242a25b48351ab18399d3580a9" + integrity sha1-00dbjAPtmCQqJbSDUasYOZ01gKk= + dependencies: + babel-helper-get-function-arity "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + + babel-helper-get-function-arity@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz#8f7782aa93407c41d3aa50908f89b031b1b6853d" + integrity sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0= + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + + babel-helper-hoist-variables@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz#1ecb27689c9d25513eadbc9914a73f5408be7a76" + integrity sha1-HssnaJydJVE+rbyZFKc/VAi+enY= + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + + babel-helper-optimise-call-expression@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz#f7a13427ba9f73f8f4fa993c54a97882d1244257" + integrity sha1-96E0J7qfc/j0+pk8VKl4gtEkQlc= + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + + babel-helper-regex@^6.24.1: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz#325c59f902f82f24b74faceed0363954f6495e72" + integrity sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI= + dependencies: + babel-runtime "^6.26.0" + babel-types "^6.26.0" + lodash "^4.17.4" + + babel-helper-remap-async-to-generator@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz#5ec581827ad723fecdd381f1c928390676e4551b" + integrity sha1-XsWBgnrXI/7N04HxySg5BnbkVRs= + dependencies: + babel-helper-function-name "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + + babel-helper-replace-supers@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz#bf6dbfe43938d17369a213ca8a8bf74b6a90ab1a" + integrity sha1-v22/5Dk40XNpohPKiov3S2qQqxo= + dependencies: + babel-helper-optimise-call-expression "^6.24.1" + babel-messages "^6.23.0" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + + babel-helpers@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2" + integrity sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI= + dependencies: + babel-runtime "^6.22.0" + babel-template "^6.24.1" + + babel-messages@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" + integrity sha1-8830cDhYA1sqKVHG7F7fbGLyYw4= + dependencies: + babel-runtime "^6.22.0" + + babel-plugin-check-es2015-constants@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz#35157b101426fd2ffd3da3f75c7d1e91835bbf8a" + integrity sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o= + dependencies: + babel-runtime "^6.22.0" + + babel-plugin-syntax-async-functions@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95" + integrity sha1-ytnK0RkbWtY0vzCuCHI5HgZHvpU= + + babel-plugin-syntax-exponentiation-operator@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz#9ee7e8337290da95288201a6a57f4170317830de" + integrity sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4= + + babel-plugin-syntax-trailing-function-commas@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz#ba0360937f8d06e40180a43fe0d5616fff532cf3" + integrity sha1-ugNgk3+NBuQBgKQ/4NVhb/9TLPM= + + babel-plugin-transform-async-to-generator@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz#6536e378aff6cb1d5517ac0e40eb3e9fc8d08761" + integrity sha1-ZTbjeK/2yx1VF6wOQOs+n8jQh2E= + dependencies: + babel-helper-remap-async-to-generator "^6.24.1" + babel-plugin-syntax-async-functions "^6.8.0" + babel-runtime "^6.22.0" + + babel-plugin-transform-es2015-arrow-functions@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz#452692cb711d5f79dc7f85e440ce41b9f244d221" + integrity sha1-RSaSy3EdX3ncf4XkQM5BufJE0iE= + dependencies: + babel-runtime "^6.22.0" + + babel-plugin-transform-es2015-block-scoped-functions@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz#bbc51b49f964d70cb8d8e0b94e820246ce3a6141" + integrity sha1-u8UbSflk1wy42OC5ToICRs46YUE= + dependencies: + babel-runtime "^6.22.0" + + babel-plugin-transform-es2015-block-scoping@^6.23.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz#d70f5299c1308d05c12f463813b0a09e73b1895f" + integrity sha1-1w9SmcEwjQXBL0Y4E7CgnnOxiV8= + dependencies: + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + lodash "^4.17.4" + + babel-plugin-transform-es2015-classes@^6.23.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz#5a4c58a50c9c9461e564b4b2a3bfabc97a2584db" + integrity sha1-WkxYpQyclGHlZLSyo7+ryXolhNs= + dependencies: + babel-helper-define-map "^6.24.1" + babel-helper-function-name "^6.24.1" + babel-helper-optimise-call-expression "^6.24.1" + babel-helper-replace-supers "^6.24.1" + babel-messages "^6.23.0" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + + babel-plugin-transform-es2015-computed-properties@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz#6fe2a8d16895d5634f4cd999b6d3480a308159b3" + integrity sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM= + dependencies: + babel-runtime "^6.22.0" + babel-template "^6.24.1" + + babel-plugin-transform-es2015-destructuring@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz#997bb1f1ab967f682d2b0876fe358d60e765c56d" + integrity sha1-mXux8auWf2gtKwh2/jWNYOdlxW0= + dependencies: + babel-runtime "^6.22.0" + + babel-plugin-transform-es2015-duplicate-keys@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz#73eb3d310ca969e3ef9ec91c53741a6f1576423e" + integrity sha1-c+s9MQypaePvnskcU3QabxV2Qj4= + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + + babel-plugin-transform-es2015-for-of@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz#f47c95b2b613df1d3ecc2fdb7573623c75248691" + integrity sha1-9HyVsrYT3x0+zC/bdXNiPHUkhpE= + dependencies: + babel-runtime "^6.22.0" + + babel-plugin-transform-es2015-function-name@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz#834c89853bc36b1af0f3a4c5dbaa94fd8eacaa8b" + integrity sha1-g0yJhTvDaxrw86TF26qU/Y6sqos= + dependencies: + babel-helper-function-name "^6.24.1" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + + babel-plugin-transform-es2015-literals@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz#4f54a02d6cd66cf915280019a31d31925377ca2e" + integrity sha1-T1SgLWzWbPkVKAAZox0xklN3yi4= + dependencies: + babel-runtime "^6.22.0" + + babel-plugin-transform-es2015-modules-amd@^6.22.0, babel-plugin-transform-es2015-modules-amd@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz#3b3e54017239842d6d19c3011c4bd2f00a00d154" + integrity sha1-Oz5UAXI5hC1tGcMBHEvS8AoA0VQ= + dependencies: + babel-plugin-transform-es2015-modules-commonjs "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + + babel-plugin-transform-es2015-modules-commonjs@^6.23.0, babel-plugin-transform-es2015-modules-commonjs@^6.24.1: + version "6.26.2" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.2.tgz#58a793863a9e7ca870bdc5a881117ffac27db6f3" + integrity sha512-CV9ROOHEdrjcwhIaJNBGMBCodN+1cfkwtM1SbUHmvyy35KGT7fohbpOxkE2uLz1o6odKK2Ck/tz47z+VqQfi9Q== + dependencies: + babel-plugin-transform-strict-mode "^6.24.1" + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-types "^6.26.0" + + babel-plugin-transform-es2015-modules-systemjs@^6.23.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz#ff89a142b9119a906195f5f106ecf305d9407d23" + integrity sha1-/4mhQrkRmpBhlfXxBuzzBdlAfSM= + dependencies: + babel-helper-hoist-variables "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + + babel-plugin-transform-es2015-modules-umd@^6.23.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz#ac997e6285cd18ed6176adb607d602344ad38468" + integrity sha1-rJl+YoXNGO1hdq22B9YCNErThGg= + dependencies: + babel-plugin-transform-es2015-modules-amd "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + + babel-plugin-transform-es2015-object-super@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz#24cef69ae21cb83a7f8603dad021f572eb278f8d" + integrity sha1-JM72muIcuDp/hgPa0CH1cusnj40= + dependencies: + babel-helper-replace-supers "^6.24.1" + babel-runtime "^6.22.0" + + babel-plugin-transform-es2015-parameters@^6.23.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz#57ac351ab49caf14a97cd13b09f66fdf0a625f2b" + integrity sha1-V6w1GrScrxSpfNE7CfZv3wpiXys= + dependencies: + babel-helper-call-delegate "^6.24.1" + babel-helper-get-function-arity "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + + babel-plugin-transform-es2015-shorthand-properties@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz#24f875d6721c87661bbd99a4622e51f14de38aa0" + integrity sha1-JPh11nIch2YbvZmkYi5R8U3jiqA= + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + + babel-plugin-transform-es2015-spread@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz#d6d68a99f89aedc4536c81a542e8dd9f1746f8d1" + integrity sha1-1taKmfia7cRTbIGlQujdnxdG+NE= + dependencies: + babel-runtime "^6.22.0" + + babel-plugin-transform-es2015-sticky-regex@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz#00c1cdb1aca71112cdf0cf6126c2ed6b457ccdbc" + integrity sha1-AMHNsaynERLN8M9hJsLta0V8zbw= + dependencies: + babel-helper-regex "^6.24.1" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + + babel-plugin-transform-es2015-template-literals@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz#a84b3450f7e9f8f1f6839d6d687da84bb1236d8d" + integrity sha1-qEs0UPfp+PH2g51taH2oS7EjbY0= + dependencies: + babel-runtime "^6.22.0" + + babel-plugin-transform-es2015-typeof-symbol@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz#dec09f1cddff94b52ac73d505c84df59dcceb372" + integrity sha1-3sCfHN3/lLUqxz1QXITfWdzOs3I= + dependencies: + babel-runtime "^6.22.0" + + babel-plugin-transform-es2015-unicode-regex@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz#d38b12f42ea7323f729387f18a7c5ae1faeb35e9" + integrity sha1-04sS9C6nMj9yk4fxinxa4frrNek= + dependencies: + babel-helper-regex "^6.24.1" + babel-runtime "^6.22.0" + regexpu-core "^2.0.0" + + babel-plugin-transform-exponentiation-operator@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz#2ab0c9c7f3098fa48907772bb813fe41e8de3a0e" + integrity sha1-KrDJx/MJj6SJB3cruBP+QejeOg4= + dependencies: + babel-helper-builder-binary-assignment-operator-visitor "^6.24.1" + babel-plugin-syntax-exponentiation-operator "^6.8.0" + babel-runtime "^6.22.0" + + babel-plugin-transform-regenerator@^6.22.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz#e0703696fbde27f0a3efcacf8b4dca2f7b3a8f2f" + integrity sha1-4HA2lvveJ/Cj78rPi03KL3s6jy8= + dependencies: + regenerator-transform "^0.10.0" + + babel-plugin-transform-strict-mode@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758" + integrity sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g= + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + + babel-preset-env@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.7.0.tgz#dea79fa4ebeb883cd35dab07e260c1c9c04df77a" + integrity sha512-9OR2afuKDneX2/q2EurSftUYM0xGu4O2D9adAhVfADDhrYDaxXV0rBbevVYoY9n6nyX1PmQW/0jtpJvUNr9CHg== + dependencies: + babel-plugin-check-es2015-constants "^6.22.0" + babel-plugin-syntax-trailing-function-commas "^6.22.0" + babel-plugin-transform-async-to-generator "^6.22.0" + babel-plugin-transform-es2015-arrow-functions "^6.22.0" + babel-plugin-transform-es2015-block-scoped-functions "^6.22.0" + babel-plugin-transform-es2015-block-scoping "^6.23.0" + babel-plugin-transform-es2015-classes "^6.23.0" + babel-plugin-transform-es2015-computed-properties "^6.22.0" + babel-plugin-transform-es2015-destructuring "^6.23.0" + babel-plugin-transform-es2015-duplicate-keys "^6.22.0" + babel-plugin-transform-es2015-for-of "^6.23.0" + babel-plugin-transform-es2015-function-name "^6.22.0" + babel-plugin-transform-es2015-literals "^6.22.0" + babel-plugin-transform-es2015-modules-amd "^6.22.0" + babel-plugin-transform-es2015-modules-commonjs "^6.23.0" + babel-plugin-transform-es2015-modules-systemjs "^6.23.0" + babel-plugin-transform-es2015-modules-umd "^6.23.0" + babel-plugin-transform-es2015-object-super "^6.22.0" + babel-plugin-transform-es2015-parameters "^6.23.0" + babel-plugin-transform-es2015-shorthand-properties "^6.22.0" + babel-plugin-transform-es2015-spread "^6.22.0" + babel-plugin-transform-es2015-sticky-regex "^6.22.0" + babel-plugin-transform-es2015-template-literals "^6.22.0" + babel-plugin-transform-es2015-typeof-symbol "^6.23.0" + babel-plugin-transform-es2015-unicode-regex "^6.22.0" + babel-plugin-transform-exponentiation-operator "^6.22.0" + babel-plugin-transform-regenerator "^6.22.0" + browserslist "^3.2.6" + invariant "^2.2.2" + semver "^5.3.0" + + babel-register@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071" + integrity sha1-btAhFz4vy0htestFxgCahW9kcHE= + dependencies: + babel-core "^6.26.0" + babel-runtime "^6.26.0" + core-js "^2.5.0" + home-or-tmp "^2.0.0" + lodash "^4.17.4" + mkdirp "^0.5.1" + source-map-support "^0.4.15" + + babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" + integrity sha1-llxwWGaOgrVde/4E/yM3vItWR/4= + dependencies: + core-js "^2.4.0" + regenerator-runtime "^0.11.0" + + babel-template@^6.24.1, babel-template@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" + integrity sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI= + dependencies: + babel-runtime "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + lodash "^4.17.4" + + babel-traverse@^6.24.1, babel-traverse@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" + integrity sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4= + dependencies: + babel-code-frame "^6.26.0" + babel-messages "^6.23.0" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + debug "^2.6.8" + globals "^9.18.0" + invariant "^2.2.2" + lodash "^4.17.4" + + babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" + integrity sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc= + dependencies: + babel-runtime "^6.26.0" + esutils "^2.0.2" + lodash "^4.17.4" + to-fast-properties "^1.0.3" + + babelify@^7.3.0: + version "7.3.0" + resolved "https://registry.yarnpkg.com/babelify/-/babelify-7.3.0.tgz#aa56aede7067fd7bd549666ee16dc285087e88e5" + integrity sha1-qlau3nBn/XvVSWZu4W3ChQh+iOU= + dependencies: + babel-core "^6.0.14" + object-assign "^4.0.0" + + babylon@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" + integrity sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ== + + backoff@^2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/backoff/-/backoff-2.5.0.tgz#f616eda9d3e4b66b8ca7fca79f695722c5f8e26f" + integrity sha1-9hbtqdPktmuMp/ynn2lXIsX44m8= + dependencies: + precond "0.2" + + balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= + + base-x@^3.0.2, base-x@^3.0.8: + version "3.0.8" + resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.8.tgz#1e1106c2537f0162e8b52474a557ebb09000018d" + integrity sha512-Rl/1AWP4J/zRrk54hhlxH4drNxPJXYUaKffODVI53/dAsV4t9fBxyxYKAVPU1XBHxYwOWP9h9H0hM2MVw4YfJA== + dependencies: + safe-buffer "^5.0.1" + + base64-js@^1.3.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" + integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== + + base@^0.11.1: + version "0.11.2" + resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" + integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg== + dependencies: + cache-base "^1.0.1" + class-utils "^0.3.5" + component-emitter "^1.2.1" + define-property "^1.0.0" + isobject "^3.0.1" + mixin-deep "^1.2.0" + pascalcase "^0.1.1" + + bcrypt-pbkdf@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" + integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= + dependencies: + tweetnacl "^0.14.3" + + bech32@1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/bech32/-/bech32-1.1.4.tgz#e38c9f37bf179b8eb16ae3a772b40c356d4832e9" + integrity sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ== + + big.js@^5.2.2: + version "5.2.2" + resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" + integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== + + bignumber.js@^7.2.1: + version "7.2.1" + resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-7.2.1.tgz#80c048759d826800807c4bfd521e50edbba57a5f" + integrity sha512-S4XzBk5sMB+Rcb/LNcpzXr57VRTxgAvaAEDAl1AwRx27j00hT84O6OkteE7u8UB3NuaaygCRrEpqox4uDOrbdQ== + + bignumber.js@^9.0.0, bignumber.js@^9.0.1: + version "9.0.1" + resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.0.1.tgz#8d7ba124c882bfd8e43260c67475518d0689e4e5" + integrity sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA== + + binary-extensions@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" + integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== + + bindings@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" + integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== + dependencies: + file-uri-to-path "1.0.0" + + bip39@2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/bip39/-/bip39-2.5.0.tgz#51cbd5179460504a63ea3c000db3f787ca051235" + integrity sha512-xwIx/8JKoT2+IPJpFEfXoWdYwP7UVAoUxxLNfGCfVowaJE7yg1Y5B1BVPqlUNsBq5/nGwmFkwRJ8xDW4sX8OdA== + dependencies: + create-hash "^1.1.0" + pbkdf2 "^3.0.9" + randombytes "^2.0.1" + safe-buffer "^5.0.1" + unorm "^1.3.3" + + bip66@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/bip66/-/bip66-1.1.5.tgz#01fa8748785ca70955d5011217d1b3139969ca22" + integrity sha1-AfqHSHhcpwlV1QESF9GzE5lpyiI= + dependencies: + safe-buffer "^5.0.1" + + blakejs@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/blakejs/-/blakejs-1.1.0.tgz#69df92ef953aa88ca51a32df6ab1c54a155fc7a5" + integrity sha1-ad+S75U6qIylGjLfarHFShVfx6U= + + bluebird@^3.4.7, bluebird@^3.5.0, bluebird@^3.5.2: + version "3.7.2" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" + integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== + + bn.js@4.11.6: + version "4.11.6" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.6.tgz#53344adb14617a13f6e8dd2ce28905d1c0ba3215" + integrity sha1-UzRK2xRhehP26N0s4okF0cC6MhU= + + bn.js@4.11.8: + version "4.11.8" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" + integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA== + + bn.js@^4.0.0, bn.js@^4.10.0, bn.js@^4.11.0, bn.js@^4.11.1, bn.js@^4.11.8, bn.js@^4.4.0, bn.js@^4.8.0: + version "4.12.0" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" + integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== + + bn.js@^4.1.0, bn.js@^4.11.6, bn.js@^4.11.9: + version "4.11.9" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.9.tgz#26d556829458f9d1e81fc48952493d0ba3507828" + integrity sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw== + + bn.js@^5.1.1, bn.js@^5.1.3: + version "5.1.3" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.1.3.tgz#beca005408f642ebebea80b042b4d18d2ac0ee6b" + integrity sha512-GkTiFpjFtUzU9CbMeJ5iazkCzGL3jrhzerzZIuqLABjbwRaFt33I9tUdSNryIptM+RxDet6OKm2WnLXzW51KsQ== + + bn.js@^5.1.2: + version "5.2.0" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.0.tgz#358860674396c6997771a9d051fcc1b57d4ae002" + integrity sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw== + + body-parser@1.19.0, body-parser@^1.16.0: + version "1.19.0" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a" + integrity sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw== + dependencies: + bytes "3.1.0" + content-type "~1.0.4" + debug "2.6.9" + depd "~1.1.2" + http-errors "1.7.2" + iconv-lite "0.4.24" + on-finished "~2.3.0" + qs "6.7.0" + raw-body "2.4.0" + type-is "~1.6.17" + + boolbase@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" + integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24= + + brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + + braces@^2.3.1: + version "2.3.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" + integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== + dependencies: + arr-flatten "^1.1.0" + array-unique "^0.3.2" + extend-shallow "^2.0.1" + fill-range "^4.0.0" + isobject "^3.0.1" + repeat-element "^1.1.2" + snapdragon "^0.8.1" + snapdragon-node "^2.0.1" + split-string "^3.0.2" + to-regex "^3.0.1" + + braces@^3.0.1, braces@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + + brorand@^1.0.1, brorand@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" + integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= + + browser-stdout@1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" + integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== + + browserify-aes@^1.0.0, browserify-aes@^1.0.4, browserify-aes@^1.0.6, browserify-aes@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" + integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== + dependencies: + buffer-xor "^1.0.3" + cipher-base "^1.0.0" + create-hash "^1.1.0" + evp_bytestokey "^1.0.3" + inherits "^2.0.1" + safe-buffer "^5.0.1" + + browserify-cipher@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.1.tgz#8d6474c1b870bfdabcd3bcfcc1934a10e94f15f0" + integrity sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w== + dependencies: + browserify-aes "^1.0.4" + browserify-des "^1.0.0" + evp_bytestokey "^1.0.0" + + browserify-des@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.2.tgz#3af4f1f59839403572f1c66204375f7a7f703e9c" + integrity sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A== + dependencies: + cipher-base "^1.0.1" + des.js "^1.0.0" + inherits "^2.0.1" + safe-buffer "^5.1.2" + + browserify-rsa@^4.0.0, browserify-rsa@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524" + integrity sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ= + dependencies: + bn.js "^4.1.0" + randombytes "^2.0.1" + + browserify-sign@^4.0.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.2.1.tgz#eaf4add46dd54be3bb3b36c0cf15abbeba7956c3" + integrity sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg== + dependencies: + bn.js "^5.1.1" + browserify-rsa "^4.0.1" + create-hash "^1.2.0" + create-hmac "^1.1.7" + elliptic "^6.5.3" + inherits "^2.0.4" + parse-asn1 "^5.1.5" + readable-stream "^3.6.0" + safe-buffer "^5.2.0" + + browserslist@^3.2.6: + version "3.2.8" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-3.2.8.tgz#b0005361d6471f0f5952797a76fc985f1f978fc6" + integrity sha512-WHVocJYavUwVgVViC0ORikPHQquXwVh939TaelZ4WDqpWgTX/FsGhl/+P4qBUAGcRvtOgDgC+xftNWWp2RUTAQ== + dependencies: + caniuse-lite "^1.0.30000844" + electron-to-chromium "^1.3.47" + + bs58@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" + integrity sha1-vhYedsNU9veIrkBx9j806MTwpCo= + dependencies: + base-x "^3.0.2" + + bs58check@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/bs58check/-/bs58check-2.1.2.tgz#53b018291228d82a5aa08e7d796fdafda54aebfc" + integrity sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA== + dependencies: + bs58 "^4.0.0" + create-hash "^1.1.0" + safe-buffer "^5.1.2" + + buffer-from@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" + integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== + + buffer-to-arraybuffer@^0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz#6064a40fa76eb43c723aba9ef8f6e1216d10511a" + integrity sha1-YGSkD6dutDxyOrqe+PbhIW0QURo= + + buffer-xor@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" + integrity sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk= + + buffer-xor@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-2.0.2.tgz#34f7c64f04c777a1f8aac5e661273bb9dd320289" + integrity sha512-eHslX0bin3GB+Lx2p7lEYRShRewuNZL3fUl4qlVJGGiwoPGftmt8JQgk2Y9Ji5/01TnVDo33E5b5O3vUB1HdqQ== + dependencies: + safe-buffer "^5.1.1" + + buffer@^5.0.5, buffer@^5.5.0: + version "5.7.0" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.0.tgz#88afbd29fc89fa7b58e82b39206f31f2cf34feed" + integrity sha512-cd+5r1VLBwUqTrmnzW+D7ABkJUM6mr7uv1dv+6jRw4Rcl7tFIFHDqHPL98LhpGFn3dbAt3gtLxtrWp4m1kFrqg== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.1.13" + + buffer@^5.2.1, buffer@^5.6.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" + integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.1.13" + + bufferutil@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/bufferutil/-/bufferutil-4.0.1.tgz#3a177e8e5819a1243fe16b63a199951a7ad8d4a7" + integrity sha512-xowrxvpxojqkagPcWRQVXZl0YXhRhAtBEIq3VoER1NH5Mw1n1o0ojdspp+GS2J//2gCVyrzQDApQ4unGF+QOoA== + dependencies: + node-gyp-build "~3.7.0" + + bunyan@^1.8.12: + version "1.8.15" + resolved "https://registry.yarnpkg.com/bunyan/-/bunyan-1.8.15.tgz#8ce34ca908a17d0776576ca1b2f6cbd916e93b46" + integrity sha512-0tECWShh6wUysgucJcBAoYegf3JJoZWibxdqhTm7OHPeT42qdjkZ29QCMcKwbgU1kiH+auSIasNRXMLWXafXig== + optionalDependencies: + dtrace-provider "~0.8" + moment "^2.19.3" + mv "~2" + safe-json-stringify "~1" + + bytes@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" + integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== + + bytewise-core@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/bytewise-core/-/bytewise-core-1.2.3.tgz#3fb410c7e91558eb1ab22a82834577aa6bd61d42" + integrity sha1-P7QQx+kVWOsasiqCg0V3qmvWHUI= + dependencies: + typewise-core "^1.2" + + bytewise@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/bytewise/-/bytewise-1.1.0.tgz#1d13cbff717ae7158094aa881b35d081b387253e" + integrity sha1-HRPL/3F65xWAlKqIGzXQgbOHJT4= + dependencies: + bytewise-core "^1.2.2" + typewise "^1.0.3" + + cache-base@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" + integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== + dependencies: + collection-visit "^1.0.0" + component-emitter "^1.2.1" + get-value "^2.0.6" + has-value "^1.0.0" + isobject "^3.0.1" + set-value "^2.0.0" + to-object-path "^0.3.0" + union-value "^1.0.0" + unset-value "^1.0.0" + + cacheable-request@^6.0.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-6.1.0.tgz#20ffb8bd162ba4be11e9567d823db651052ca912" + integrity sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg== + dependencies: + clone-response "^1.0.2" + get-stream "^5.1.0" + http-cache-semantics "^4.0.0" + keyv "^3.0.0" + lowercase-keys "^2.0.0" + normalize-url "^4.1.0" + responselike "^1.0.2" + + cachedown@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/cachedown/-/cachedown-1.0.0.tgz#d43f036e4510696b31246d7db31ebf0f7ac32d15" + integrity sha1-1D8DbkUQaWsxJG19sx6/D3rDLRU= + dependencies: + abstract-leveldown "^2.4.1" + lru-cache "^3.2.0" + + call-bind@^1.0.0, call-bind@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" + integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== + dependencies: + function-bind "^1.1.1" + get-intrinsic "^1.0.2" + + caller-callsite@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/caller-callsite/-/caller-callsite-2.0.0.tgz#847e0fce0a223750a9a027c54b33731ad3154134" + integrity sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ= + dependencies: + callsites "^2.0.0" + + caller-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-2.0.0.tgz#468f83044e369ab2010fac5f06ceee15bb2cb1f4" + integrity sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ= + dependencies: + caller-callsite "^2.0.0" + + callsites@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" + integrity sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA= + + callsites@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== + + camelcase@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" + integrity sha1-MvxLn82vhF/N9+c7uXysImHwqwo= + + camelcase@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" + integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0= + + camelcase@^5.0.0: + version "5.3.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" + integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== + + camelcase@^6.0.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.1.0.tgz#27dc176173725fb0adf8a48b647f4d7871944d78" + integrity sha512-WCMml9ivU60+8rEJgELlFp1gxFcEGxwYleE3bziHEDeqsqAWGHdimB7beBFGjLzVNgPGyDsfgXLQEYMpmIFnVQ== + + caniuse-lite@^1.0.30000844: + version "1.0.30001204" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001204.tgz#256c85709a348ec4d175e847a3b515c66e79f2aa" + integrity sha512-JUdjWpcxfJ9IPamy2f5JaRDCaqJOxDzOSKtbdx4rH9VivMd1vIzoPumsJa9LoMIi4Fx2BV2KZOxWhNkBjaYivQ== + + caseless@^0.12.0, caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= + + cbor@^5.0.2, cbor@^5.1.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/cbor/-/cbor-5.2.0.tgz#4cca67783ccd6de7b50ab4ed62636712f287a67c" + integrity sha512-5IMhi9e1QU76ppa5/ajP1BmMWZ2FHkhAhjeVKQ/EFCgYSEaeVaoGtL7cxJskf9oCCk+XjzaIdc3IuU/dbA/o2A== + dependencies: + bignumber.js "^9.0.1" + nofilter "^1.0.4" + + chai-ethers@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/chai-ethers/-/chai-ethers-0.0.1.tgz#2dcc2d3251a07ea42ac37923b976198cccad3f1c" + integrity sha512-yajwk1BSf+lO2LzV+vra/iKukiUJcfD2aEVBZRWmaIJr0kI0eI1s6VF47qoXNolYxg0bf/SAlHSfwaPZWKBVyQ== + dependencies: + ethers "^5.0.0" + + chai@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/chai/-/chai-4.2.0.tgz#760aa72cf20e3795e84b12877ce0e83737aa29e5" + integrity sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw== + dependencies: + assertion-error "^1.1.0" + check-error "^1.0.2" + deep-eql "^3.0.1" + get-func-name "^2.0.0" + pathval "^1.1.0" + type-detect "^4.0.5" + + chalk@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + + chalk@^2.0.0, chalk@^2.1.0, chalk@^2.3.2, chalk@^2.4.1, chalk@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + + chalk@^4.0.0, chalk@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a" + integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + + chardet@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" + integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== + + "charenc@>= 0.0.1": + version "0.0.2" + resolved "https://registry.yarnpkg.com/charenc/-/charenc-0.0.2.tgz#c0a1d2f3a7092e03774bfa83f14c0fc5790a8667" + integrity sha1-wKHS86cJLgN3S/qD8UwPxXkKhmc= + + check-error@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" + integrity sha1-V00xLt2Iu13YkS6Sht1sCu1KrII= + + checkpoint-store@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/checkpoint-store/-/checkpoint-store-1.1.0.tgz#04e4cb516b91433893581e6d4601a78e9552ea06" + integrity sha1-BOTLUWuRQziTWB5tRgGnjpVS6gY= + dependencies: + functional-red-black-tree "^1.0.1" + + cheerio-select-tmp@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/cheerio-select-tmp/-/cheerio-select-tmp-0.1.1.tgz#55bbef02a4771710195ad736d5e346763ca4e646" + integrity sha512-YYs5JvbpU19VYJyj+F7oYrIE2BOll1/hRU7rEy/5+v9BzkSo3bK81iAeeQEMI92vRIxz677m72UmJUiVwwgjfQ== + dependencies: + css-select "^3.1.2" + css-what "^4.0.0" + domelementtype "^2.1.0" + domhandler "^4.0.0" + domutils "^2.4.4" + + cheerio@^1.0.0-rc.2: + version "1.0.0-rc.5" + resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.5.tgz#88907e1828674e8f9fee375188b27dadd4f0fa2f" + integrity sha512-yoqps/VCaZgN4pfXtenwHROTp8NG6/Hlt4Jpz2FEP0ZJQ+ZUkVDd0hAPDNKhj3nakpfPt/CNs57yEtxD1bXQiw== + dependencies: + cheerio-select-tmp "^0.1.0" + dom-serializer "~1.2.0" + domhandler "^4.0.0" + entities "~2.1.0" + htmlparser2 "^6.0.0" + parse5 "^6.0.0" + parse5-htmlparser2-tree-adapter "^6.0.0" + + chokidar@3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.3.0.tgz#12c0714668c55800f659e262d4962a97faf554a6" + integrity sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A== + dependencies: + anymatch "~3.1.1" + braces "~3.0.2" + glob-parent "~5.1.0" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.2.0" + optionalDependencies: + fsevents "~2.1.1" + + chokidar@3.4.3: + version "3.4.3" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.4.3.tgz#c1df38231448e45ca4ac588e6c79573ba6a57d5b" + integrity sha512-DtM3g7juCXQxFVSNPNByEC2+NImtBuxQQvWlHunpJIS5Ocr0lG306cC7FCi7cEA0fzmybPUIl4txBIobk1gGOQ== + dependencies: + anymatch "~3.1.1" + braces "~3.0.2" + glob-parent "~5.1.0" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.5.0" + optionalDependencies: + fsevents "~2.1.2" + + chokidar@^3.4.0: + version "3.5.1" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.1.tgz#ee9ce7bbebd2b79f49f304799d5468e31e14e68a" + integrity sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw== + dependencies: + anymatch "~3.1.1" + braces "~3.0.2" + glob-parent "~5.1.0" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.5.0" + optionalDependencies: + fsevents "~2.3.1" + + chownr@^1.1.1: + version "1.1.4" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" + integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== + + ci-info@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" + integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== + + cids@^0.7.1: + version "0.7.5" + resolved "https://registry.yarnpkg.com/cids/-/cids-0.7.5.tgz#60a08138a99bfb69b6be4ceb63bfef7a396b28b2" + integrity sha512-zT7mPeghoWAu+ppn8+BS1tQ5qGmbMfB4AregnQjA/qHY3GC1m1ptI9GkWNlgeu38r7CuRdXB47uY2XgAYt6QVA== + dependencies: + buffer "^5.5.0" + class-is "^1.1.0" + multibase "~0.6.0" + multicodec "^1.0.0" + multihashes "~0.4.15" + + cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" + integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + + class-is@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/class-is/-/class-is-1.1.0.tgz#9d3c0fba0440d211d843cec3dedfa48055005825" + integrity sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw== + + class-utils@^0.3.5: + version "0.3.6" + resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" + integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== + dependencies: + arr-union "^3.1.0" + define-property "^0.2.5" + isobject "^3.0.0" + static-extend "^0.1.1" + + cli-cursor@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" + integrity sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU= + dependencies: + restore-cursor "^2.0.0" + + cli-table3@^0.5.0: + version "0.5.1" + resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.5.1.tgz#0252372d94dfc40dbd8df06005f48f31f656f202" + integrity sha512-7Qg2Jrep1S/+Q3EceiZtQcDPWxhAvBw+ERf1162v4sikJrvojMHFqXt8QIVha8UlH9rgU0BeWPytZ9/TzYqlUw== + dependencies: + object-assign "^4.1.0" + string-width "^2.1.1" + optionalDependencies: + colors "^1.1.2" + + cli-width@^2.0.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.1.tgz#b0433d0b4e9c847ef18868a4ef16fd5fc8271c48" + integrity sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw== + + cliui@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" + integrity sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0= + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + wrap-ansi "^2.0.0" + + cliui@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" + integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== + dependencies: + string-width "^3.1.0" + strip-ansi "^5.2.0" + wrap-ansi "^5.1.0" + + clone-response@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b" + integrity sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws= + dependencies: + mimic-response "^1.0.0" + + clone@2.1.2, clone@^2.0.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" + integrity sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18= + + code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= + + collection-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" + integrity sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA= + dependencies: + map-visit "^1.0.0" + object-visit "^1.0.0" + + color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + dependencies: + color-name "1.1.3" + + color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + + color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= + + color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + + colors@^1.1.2: + version "1.4.0" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" + integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== + + combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: + version "1.0.8" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" + integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== + dependencies: + delayed-stream "~1.0.0" + + command-exists@^1.2.8: + version "1.2.9" + resolved "https://registry.yarnpkg.com/command-exists/-/command-exists-1.2.9.tgz#c50725af3808c8ab0260fd60b01fbfa25b954f69" + integrity sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w== + + command-line-args@^4.0.7: + version "4.0.7" + resolved "https://registry.yarnpkg.com/command-line-args/-/command-line-args-4.0.7.tgz#f8d1916ecb90e9e121eda6428e41300bfb64cc46" + integrity sha512-aUdPvQRAyBvQd2n7jXcsMDz68ckBJELXNzBybCHOibUWEg0mWTnaYCSRU8h9R+aNRSvDihJtssSRCiDRpLaezA== + dependencies: + array-back "^2.0.0" + find-replace "^1.0.3" + typical "^2.6.1" + + commander@2.18.0: + version "2.18.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.18.0.tgz#2bf063ddee7c7891176981a2cc798e5754bc6970" + integrity sha512-6CYPa+JP2ftfRU2qkDK+UTVeQYosOg/2GbcjIcKPHfinyOLPVGXu/ovN86RP49Re5ndJK1N0kuiidFFuepc4ZQ== + + commander@3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/commander/-/commander-3.0.2.tgz#6837c3fb677ad9933d1cfba42dd14d5117d6b39e" + integrity sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow== + + commander@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-7.1.0.tgz#f2eaecf131f10e36e07d894698226e36ae0eb5ff" + integrity sha512-pRxBna3MJe6HKnBGsDyMv8ETbptw3axEdYHoqNh7gu5oDcew8fs0xnivZGm06Ogk8zGAJ9VX+OPEr2GXEQK4dg== + + component-emitter@^1.2.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" + integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== + + concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + + concat-stream@^1.5.1, concat-stream@^1.6.0, concat-stream@^1.6.2: + version "1.6.2" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" + integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== + dependencies: + buffer-from "^1.0.0" + inherits "^2.0.3" + readable-stream "^2.2.2" + typedarray "^0.0.6" + + content-disposition@0.5.3: + version "0.5.3" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.3.tgz#e130caf7e7279087c5616c2007d0485698984fbd" + integrity sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g== + dependencies: + safe-buffer "5.1.2" + + content-hash@^2.5.2: + version "2.5.2" + resolved "https://registry.yarnpkg.com/content-hash/-/content-hash-2.5.2.tgz#bbc2655e7c21f14fd3bfc7b7d4bfe6e454c9e211" + integrity sha512-FvIQKy0S1JaWV10sMsA7TRx8bpU+pqPkhbsfvOJAdjRXvYxEckAwQWGwtRjiaJfh+E0DvcWUGqcdjwMGFjsSdw== + dependencies: + cids "^0.7.1" + multicodec "^0.5.5" + multihashes "^0.4.15" + + content-type@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" + integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== + + convert-source-map@^1.5.1: + version "1.7.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442" + integrity sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA== + dependencies: + safe-buffer "~5.1.1" + + cookie-signature@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" + integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw= + + cookie@0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba" + integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg== + + cookie@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.1.tgz#afd713fe26ebd21ba95ceb61f9a8116e50a537d1" + integrity sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA== + + cookiejar@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/cookiejar/-/cookiejar-2.1.2.tgz#dd8a235530752f988f9a0844f3fc589e3111125c" + integrity sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA== + + copy-descriptor@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" + integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= + + core-js-pure@^3.0.1: + version "3.10.0" + resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.10.0.tgz#dab9d6b141779b622b40567e7a536d2276646c15" + integrity sha512-CC582enhrFZStO4F8lGI7QL3SYx7/AIRc+IdSi3btrQGrVsTawo5K/crmKbRrQ+MOMhNX4v+PATn0k2NN6wI7A== + + core-js@^2.4.0, core-js@^2.5.0: + version "2.6.12" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec" + integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ== + + core-util-is@1.0.2, core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= + + cors@^2.8.1: + version "2.8.5" + resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.5.tgz#eac11da51592dd86b9f06f6e7ac293b3df875d29" + integrity sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g== + dependencies: + object-assign "^4" + vary "^1" + + cosmiconfig@^5.0.7: + version "5.2.1" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.2.1.tgz#040f726809c591e77a17c0a3626ca45b4f168b1a" + integrity sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA== + dependencies: + import-fresh "^2.0.0" + is-directory "^0.3.1" + js-yaml "^3.13.1" + parse-json "^4.0.0" + + create-ecdh@^4.0.0: + version "4.0.4" + resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.4.tgz#d6e7f4bffa66736085a0762fd3a632684dabcc4e" + integrity sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A== + dependencies: + bn.js "^4.1.0" + elliptic "^6.5.3" + + create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" + integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== + dependencies: + cipher-base "^1.0.1" + inherits "^2.0.1" + md5.js "^1.3.4" + ripemd160 "^2.0.1" + sha.js "^2.4.0" + + create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" + integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== + dependencies: + cipher-base "^1.0.3" + create-hash "^1.1.0" + inherits "^2.0.1" + ripemd160 "^2.0.0" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + + cross-env@^7.0.2: + version "7.0.2" + resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-7.0.2.tgz#bd5ed31339a93a3418ac4f3ca9ca3403082ae5f9" + integrity sha512-KZP/bMEOJEDCkDQAyRhu3RL2ZO/SUVrxQVI0G3YEQ+OLbRA3c6zgixe8Mq8a/z7+HKlNEjo8oiLUs8iRijY2Rw== + dependencies: + cross-spawn "^7.0.1" + + cross-fetch@^2.1.0, cross-fetch@^2.1.1: + version "2.2.3" + resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-2.2.3.tgz#e8a0b3c54598136e037f8650f8e823ccdfac198e" + integrity sha512-PrWWNH3yL2NYIb/7WF/5vFG3DCQiXDOVf8k3ijatbrtnwNuhMWLC7YF7uqf53tbTFDzHIUD8oITw4Bxt8ST3Nw== + dependencies: + node-fetch "2.1.2" + whatwg-fetch "2.0.4" + + cross-fetch@^3.0.6: + version "3.1.4" + resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.4.tgz#9723f3a3a247bf8b89039f3a380a9244e8fa2f39" + integrity sha512-1eAtFWdIubi6T4XPy6ei9iUFoKpUkIF971QLN8lIvvvwueI65+Nw5haMNKUwfJxabqlIIDODJKGrQ66gxC0PbQ== + dependencies: + node-fetch "2.6.1" + + cross-spawn@^6.0.0, cross-spawn@^6.0.5: + version "6.0.5" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" + integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== + dependencies: + nice-try "^1.0.4" + path-key "^2.0.1" + semver "^5.5.0" + shebang-command "^1.2.0" + which "^1.2.9" + + cross-spawn@^7.0.1, cross-spawn@^7.0.2: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + + "crypt@>= 0.0.1": + version "0.0.2" + resolved "https://registry.yarnpkg.com/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b" + integrity sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs= + + crypto-browserify@3.12.0: + version "3.12.0" + resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" + integrity sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg== + dependencies: + browserify-cipher "^1.0.0" + browserify-sign "^4.0.0" + create-ecdh "^4.0.0" + create-hash "^1.1.0" + create-hmac "^1.1.0" + diffie-hellman "^5.0.0" + inherits "^2.0.1" + pbkdf2 "^3.0.3" + public-encrypt "^4.0.0" + randombytes "^2.0.0" + randomfill "^1.0.3" + + crypto-js@^3.1.9-1: + version "3.3.0" + resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-3.3.0.tgz#846dd1cce2f68aacfa156c8578f926a609b7976b" + integrity sha512-DIT51nX0dCfKltpRiXV+/TVZq+Qq2NgF4644+K7Ttnla7zEzqc+kjJyiB96BHNyUTBxyjzRcZYpUdZa+QAqi6Q== + + css-select@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/css-select/-/css-select-3.1.2.tgz#d52cbdc6fee379fba97fb0d3925abbd18af2d9d8" + integrity sha512-qmss1EihSuBNWNNhHjxzxSfJoFBM/lERB/Q4EnsJQQC62R2evJDW481091oAdOr9uh46/0n4nrg0It5cAnj1RA== + dependencies: + boolbase "^1.0.0" + css-what "^4.0.0" + domhandler "^4.0.0" + domutils "^2.4.3" + nth-check "^2.0.0" + + css-what@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/css-what/-/css-what-4.0.0.tgz#35e73761cab2eeb3d3661126b23d7aa0e8432233" + integrity sha512-teijzG7kwYfNVsUh2H/YN62xW3KK9YhXEgSlbxMlcyjPNvdKJqFx5lrwlJgoFP1ZHlB89iGDlo/JyshKeRhv5A== + + d@1, d@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a" + integrity sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA== + dependencies: + es5-ext "^0.10.50" + type "^1.0.1" + + dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= + dependencies: + assert-plus "^1.0.0" + + date-fns@^2.19.0: + version "2.19.0" + resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.19.0.tgz#65193348635a28d5d916c43ec7ce6fbd145059e1" + integrity sha512-X3bf2iTPgCAQp9wvjOQytnf5vO5rESYRXlPIVcgSbtT5OTScPcsf9eZU+B/YIkKAtYr5WeCii58BgATrNitlWg== + + death@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/death/-/death-1.1.0.tgz#01aa9c401edd92750514470b8266390c66c67318" + integrity sha1-AaqcQB7dknUFFEcLgmY5DGbGcxg= + + debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.8, debug@^2.6.9: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + + debug@3.2.6: + version "3.2.6" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" + integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== + dependencies: + ms "^2.1.1" + + debug@4, debug@^4.1.1, debug@^4.3.1: + version "4.3.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" + integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== + dependencies: + ms "2.1.2" + + debug@4.2.0, debug@^4.0.1: + version "4.2.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.2.0.tgz#7f150f93920e94c58f5574c2fd01a3110effe7f1" + integrity sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg== + dependencies: + ms "2.1.2" + + debug@^3.1.0: + version "3.2.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" + integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== + dependencies: + ms "^2.1.1" + + decamelize@^1.1.1, decamelize@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= + + decamelize@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" + integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== + + decode-uri-component@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" + integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= + + decomment@^0.9.1: + version "0.9.4" + resolved "https://registry.yarnpkg.com/decomment/-/decomment-0.9.4.tgz#fa40335bd90e3826d5c1984276e390525ff856d5" + integrity sha512-8eNlhyI5cSU4UbBlrtagWpR03dqXcE5IR9zpe7PnO6UzReXDskucsD8usgrzUmQ6qJ3N82aws/p/mu/jqbURWw== + dependencies: + esprima "4.0.1" + + decompress-response@^3.2.0, decompress-response@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3" + integrity sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M= + dependencies: + mimic-response "^1.0.0" + + deep-eql@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-3.0.1.tgz#dfc9404400ad1c8fe023e7da1df1c147c4b444df" + integrity sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw== + dependencies: + type-detect "^4.0.0" + + deep-equal@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.1.1.tgz#b5c98c942ceffaf7cb051e24e1434a25a2e6076a" + integrity sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g== + dependencies: + is-arguments "^1.0.4" + is-date-object "^1.0.1" + is-regex "^1.0.4" + object-is "^1.0.1" + object-keys "^1.1.1" + regexp.prototype.flags "^1.2.0" + + deep-is@^0.1.3, deep-is@~0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" + integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= + + defer-to-connect@^1.0.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.1.3.tgz#331ae050c08dcf789f8c83a7b81f0ed94f4ac591" + integrity sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ== + + deferred-leveldown@~1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/deferred-leveldown/-/deferred-leveldown-1.2.2.tgz#3acd2e0b75d1669924bc0a4b642851131173e1eb" + integrity sha512-uukrWD2bguRtXilKt6cAWKyoXrTSMo5m7crUdLfWQmu8kIm88w3QZoUL+6nhpfKVmhHANER6Re3sKoNoZ3IKMA== + dependencies: + abstract-leveldown "~2.6.0" + + deferred-leveldown@~4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/deferred-leveldown/-/deferred-leveldown-4.0.2.tgz#0b0570087827bf480a23494b398f04c128c19a20" + integrity sha512-5fMC8ek8alH16QiV0lTCis610D1Zt1+LA4MS4d63JgS32lrCjTFDUFz2ao09/j2I4Bqb5jL4FZYwu7Jz0XO1ww== + dependencies: + abstract-leveldown "~5.0.0" + inherits "^2.0.3" + + define-properties@^1.1.2, define-properties@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" + integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== + dependencies: + object-keys "^1.0.12" + + define-property@^0.2.5: + version "0.2.5" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" + integrity sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY= + dependencies: + is-descriptor "^0.1.0" + + define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" + integrity sha1-dp66rz9KY6rTr56NMEybvnm/sOY= + dependencies: + is-descriptor "^1.0.0" + + define-property@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" + integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== + dependencies: + is-descriptor "^1.0.2" + isobject "^3.0.1" + + defined@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693" + integrity sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM= + + delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= + + depd@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" + integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= + + des.js@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.1.tgz#5382142e1bdc53f85d86d53e5f4aa7deb91e0843" + integrity sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA== + dependencies: + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + + destroy@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" + integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= + + detect-indent@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" + integrity sha1-920GQ1LN9Docts5hnE7jqUdd4gg= + dependencies: + repeating "^2.0.0" + + detect-indent@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d" + integrity sha1-OHHMCmoALow+Wzz38zYmRnXwa50= + + detect-port@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/detect-port/-/detect-port-1.3.0.tgz#d9c40e9accadd4df5cac6a782aefd014d573d1f1" + integrity sha512-E+B1gzkl2gqxt1IhUzwjrxBKRqx1UzC3WLONHinn8S3T6lwV/agVCyitiFOsGJ/eYuEUBvD71MZHy3Pv1G9doQ== + dependencies: + address "^1.0.1" + debug "^2.6.0" + + diff@3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" + integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== + + diff@4.0.2, diff@^4.0.1, diff@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" + integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== + + diffie-hellman@^5.0.0: + version "5.0.3" + resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" + integrity sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg== + dependencies: + bn.js "^4.1.0" + miller-rabin "^4.0.0" + randombytes "^2.0.0" + + dir-glob@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" + integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== + dependencies: + path-type "^4.0.0" + + dir-to-object@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/dir-to-object/-/dir-to-object-2.0.0.tgz#29723e9bd1c3e58e4f307bd04ff634c0370c8f8a" + integrity sha512-sXs0JKIhymON7T1UZuO2Ud6VTNAx/VTBXIl4+3mjb2RgfOpt+hectX0x04YqPOPdkeOAKoJuKqwqnXXURNPNEA== + + doctrine@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" + integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== + dependencies: + esutils "^2.0.2" + + dom-serializer@^1.0.1, dom-serializer@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-1.2.0.tgz#3433d9136aeb3c627981daa385fc7f32d27c48f1" + integrity sha512-n6kZFH/KlCrqs/1GHMOd5i2fd/beQHuehKdWvNNffbGHTr/almdhuVvTVFb3V7fglz+nC50fFusu3lY33h12pA== + dependencies: + domelementtype "^2.0.1" + domhandler "^4.0.0" + entities "^2.0.0" + + dom-walk@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.2.tgz#0c548bef048f4d1f2a97249002236060daa3fd84" + integrity sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w== + + domelementtype@^2.0.1, domelementtype@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.1.0.tgz#a851c080a6d1c3d94344aed151d99f669edf585e" + integrity sha512-LsTgx/L5VpD+Q8lmsXSHW2WpA+eBlZ9HPf3erD1IoPF00/3JKHZ3BknUVA2QGDNu69ZNmyFmCWBSO45XjYKC5w== + + domhandler@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-4.0.0.tgz#01ea7821de996d85f69029e81fa873c21833098e" + integrity sha512-KPTbnGQ1JeEMQyO1iYXoagsI6so/C96HZiFyByU3T6iAzpXn8EGEvct6unm1ZGoed8ByO2oirxgwxBmqKF9haA== + dependencies: + domelementtype "^2.1.0" + + domutils@^2.4.3, domutils@^2.4.4: + version "2.5.0" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.5.0.tgz#42f49cffdabb92ad243278b331fd761c1c2d3039" + integrity sha512-Ho16rzNMOFk2fPwChGh3D2D9OEHAfG19HgmRR2l+WLSsIstNsAYBzePH412bL0y5T44ejABIVfTHQ8nqi/tBCg== + dependencies: + dom-serializer "^1.0.1" + domelementtype "^2.0.1" + domhandler "^4.0.0" + + dotenv@^8.2.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.2.0.tgz#97e619259ada750eea3e4ea3e26bceea5424b16a" + integrity sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw== + + dotignore@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/dotignore/-/dotignore-0.1.2.tgz#f942f2200d28c3a76fbdd6f0ee9f3257c8a2e905" + integrity sha512-UGGGWfSauusaVJC+8fgV+NVvBXkCTmVv7sk6nojDZZvuOUNGUy0Zk4UpHQD6EDjS0jpBwcACvH4eofvyzBcRDw== + dependencies: + minimatch "^3.0.4" + + drbg.js@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/drbg.js/-/drbg.js-1.0.1.tgz#3e36b6c42b37043823cdbc332d58f31e2445480b" + integrity sha1-Pja2xCs3BDgjzbwzLVjzHiRFSAs= + dependencies: + browserify-aes "^1.0.6" + create-hash "^1.1.2" + create-hmac "^1.1.4" + + dtrace-provider@~0.8: + version "0.8.8" + resolved "https://registry.yarnpkg.com/dtrace-provider/-/dtrace-provider-0.8.8.tgz#2996d5490c37e1347be263b423ed7b297fb0d97e" + integrity sha512-b7Z7cNtHPhH9EJhNNbbeqTcXB8LGFFZhq1PGgEvpeHlzd36bhbdTWoE/Ba/YguqpBSlAPKnARWhVlhunCMwfxg== + dependencies: + nan "^2.14.0" + + duplexer3@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" + integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI= + + ecc-jsbn@~0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" + integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= + dependencies: + jsbn "~0.1.0" + safer-buffer "^2.1.0" + + ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= + + electron-to-chromium@^1.3.47: + version "1.3.695" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.695.tgz#955f419cf99137226180cc4cca2e59015a4e248d" + integrity sha512-lz66RliUqLHU1Ojxx1A4QUxKydjiQ79Y4dZyPobs2Dmxj5aVL2TM3KoQ2Gs7HS703Bfny+ukI3KOxwAB0xceHQ== + + elliptic@6.5.3, elliptic@^6.5.3: + version "6.5.3" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.3.tgz#cb59eb2efdaf73a0bd78ccd7015a62ad6e0f93d6" + integrity sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw== + dependencies: + bn.js "^4.4.0" + brorand "^1.0.1" + hash.js "^1.0.0" + hmac-drbg "^1.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.0" + + elliptic@6.5.4, elliptic@^6.4.0, elliptic@^6.5.2: + version "6.5.4" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" + integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== + dependencies: + bn.js "^4.11.9" + brorand "^1.1.0" + hash.js "^1.0.0" + hmac-drbg "^1.0.1" + inherits "^2.0.4" + minimalistic-assert "^1.0.1" + minimalistic-crypto-utils "^1.0.1" + + emoji-regex@^7.0.1: + version "7.0.3" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" + integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== + + emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + + emoji-regex@^9.0.0: + version "9.2.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.0.tgz#a26da8e832b16a9753309f25e35e3c0efb9a066a" + integrity sha512-DNc3KFPK18bPdElMJnf/Pkv5TXhxFU3YFDEuGLDRtPmV4rkmCjBkCSEp22u6rBHdSN9Vlp/GK7k98prmE1Jgug== + + encode-utf8@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/encode-utf8/-/encode-utf8-1.0.3.tgz#f30fdd31da07fb596f281beb2f6b027851994cda" + integrity sha512-ucAnuBEhUK4boH2HjVYG5Q2mQyPorvv0u/ocS+zhdw0S8AlHYY+GOFhP1Gio5z4icpP2ivFSvhtFjQi8+T9ppw== + + encodeurl@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" + integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= + + encoding-down@5.0.4, encoding-down@~5.0.0: + version "5.0.4" + resolved "https://registry.yarnpkg.com/encoding-down/-/encoding-down-5.0.4.tgz#1e477da8e9e9d0f7c8293d320044f8b2cd8e9614" + integrity sha512-8CIZLDcSKxgzT+zX8ZVfgNbu8Md2wq/iqa1Y7zyVR18QBEAc0Nmzuvj/N5ykSKpfGzjM8qxbaFntLPwnVoUhZw== + dependencies: + abstract-leveldown "^5.0.0" + inherits "^2.0.3" + level-codec "^9.0.0" + level-errors "^2.0.0" + xtend "^4.0.1" + + encoding@^0.1.11: + version "0.1.13" + resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9" + integrity sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A== + dependencies: + iconv-lite "^0.6.2" + + end-of-stream@^1.1.0: + version "1.4.4" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" + integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== + dependencies: + once "^1.4.0" + + enquirer@^2.3.0, enquirer@^2.3.5: + version "2.3.6" + resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" + integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== + dependencies: + ansi-colors "^4.1.1" + + entities@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55" + integrity sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A== + + entities@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-2.1.0.tgz#992d3129cf7df6870b96c57858c249a120f8b8b5" + integrity sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w== + + env-paths@^2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2" + integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A== + + errno@~0.1.1: + version "0.1.8" + resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.8.tgz#8bb3e9c7d463be4976ff888f76b4809ebc2e811f" + integrity sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A== + dependencies: + prr "~1.0.1" + + error-ex@^1.2.0, error-ex@^1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== + dependencies: + is-arrayish "^0.2.1" + + es-abstract@^1.18.0-next.1, es-abstract@^1.18.0-next.2: + version "1.18.0" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.18.0.tgz#ab80b359eecb7ede4c298000390bc5ac3ec7b5a4" + integrity sha512-LJzK7MrQa8TS0ja2w3YNLzUgJCGPdPOV1yVvezjNnS89D+VR08+Szt2mz3YB2Dck/+w5tfIq/RoUAFqJJGM2yw== + dependencies: + call-bind "^1.0.2" + es-to-primitive "^1.2.1" + function-bind "^1.1.1" + get-intrinsic "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.2" + is-callable "^1.2.3" + is-negative-zero "^2.0.1" + is-regex "^1.1.2" + is-string "^1.0.5" + object-inspect "^1.9.0" + object-keys "^1.1.1" + object.assign "^4.1.2" + string.prototype.trimend "^1.0.4" + string.prototype.trimstart "^1.0.4" + unbox-primitive "^1.0.0" + + es-to-primitive@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" + integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== + dependencies: + is-callable "^1.1.4" + is-date-object "^1.0.1" + is-symbol "^1.0.2" + + es5-ext@^0.10.35, es5-ext@^0.10.50: + version "0.10.53" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.53.tgz#93c5a3acfdbef275220ad72644ad02ee18368de1" + integrity sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q== + dependencies: + es6-iterator "~2.0.3" + es6-symbol "~3.1.3" + next-tick "~1.0.0" + + es6-iterator@~2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" + integrity sha1-p96IkUGgWpSwhUQDstCg+/qY87c= + dependencies: + d "1" + es5-ext "^0.10.35" + es6-symbol "^3.1.1" + + es6-symbol@^3.1.1, es6-symbol@~3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.3.tgz#bad5d3c1bcdac28269f4cb331e431c78ac705d18" + integrity sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA== + dependencies: + d "^1.0.1" + ext "^1.1.2" + + escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= + + escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= + + escape-string-regexp@4.0.0, escape-string-regexp@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + + escodegen@1.8.x: + version "1.8.1" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018" + integrity sha1-WltTr0aTEQvrsIZ6o0MN07cKEBg= + dependencies: + esprima "^2.7.1" + estraverse "^1.9.1" + esutils "^2.0.2" + optionator "^0.8.1" + optionalDependencies: + source-map "~0.2.0" + + eslint-config-prettier@^6.11.0: + version "6.15.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.15.0.tgz#7f93f6cb7d45a92f1537a70ecc06366e1ac6fed9" + integrity sha512-a1+kOYLR8wMGustcgAjdydMsQ2A/2ipRPwRKUmfYaSxc9ZPcrku080Ctl6zrZzZNs/U82MjSv+qKREkoq3bJaw== + dependencies: + get-stdin "^6.0.0" + + eslint-scope@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.3.tgz#ca03833310f6889a3264781aa82e63eb9cfe7848" + integrity sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg== + dependencies: + esrecurse "^4.1.0" + estraverse "^4.1.1" + + eslint-scope@^5.0.0, eslint-scope@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" + integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== + dependencies: + esrecurse "^4.3.0" + estraverse "^4.1.1" + + eslint-utils@^1.3.1: + version "1.4.3" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.3.tgz#74fec7c54d0776b6f67e0251040b5806564e981f" + integrity sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q== + dependencies: + eslint-visitor-keys "^1.1.0" + + eslint-utils@^2.0.0, eslint-utils@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27" + integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg== + dependencies: + eslint-visitor-keys "^1.1.0" + + eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" + integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== + + eslint-visitor-keys@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz#21fdc8fbcd9c795cc0321f0563702095751511a8" + integrity sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ== + + eslint@^5.6.0: + version "5.16.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.16.0.tgz#a1e3ac1aae4a3fbd8296fcf8f7ab7314cbb6abea" + integrity sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg== + dependencies: + "@babel/code-frame" "^7.0.0" + ajv "^6.9.1" + chalk "^2.1.0" + cross-spawn "^6.0.5" + debug "^4.0.1" + doctrine "^3.0.0" + eslint-scope "^4.0.3" + eslint-utils "^1.3.1" + eslint-visitor-keys "^1.0.0" + espree "^5.0.1" + esquery "^1.0.1" + esutils "^2.0.2" + file-entry-cache "^5.0.1" + functional-red-black-tree "^1.0.1" + glob "^7.1.2" + globals "^11.7.0" + ignore "^4.0.6" + import-fresh "^3.0.0" + imurmurhash "^0.1.4" + inquirer "^6.2.2" + js-yaml "^3.13.0" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.3.0" + lodash "^4.17.11" + minimatch "^3.0.4" + mkdirp "^0.5.1" + natural-compare "^1.4.0" + optionator "^0.8.2" + path-is-inside "^1.0.2" + progress "^2.0.0" + regexpp "^2.0.1" + semver "^5.5.1" + strip-ansi "^4.0.0" + strip-json-comments "^2.0.1" + table "^5.2.3" + text-table "^0.2.0" + + eslint@^7.7.0: + version "7.12.1" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.12.1.tgz#bd9a81fa67a6cfd51656cdb88812ce49ccec5801" + integrity sha512-HlMTEdr/LicJfN08LB3nM1rRYliDXOmfoO4vj39xN6BLpFzF00hbwBoqHk8UcJ2M/3nlARZWy/mslvGEuZFvsg== + dependencies: + "@babel/code-frame" "^7.0.0" + "@eslint/eslintrc" "^0.2.1" + ajv "^6.10.0" + chalk "^4.0.0" + cross-spawn "^7.0.2" + debug "^4.0.1" + doctrine "^3.0.0" + enquirer "^2.3.5" + eslint-scope "^5.1.1" + eslint-utils "^2.1.0" + eslint-visitor-keys "^2.0.0" + espree "^7.3.0" + esquery "^1.2.0" + esutils "^2.0.2" + file-entry-cache "^5.0.1" + functional-red-black-tree "^1.0.1" + glob-parent "^5.0.0" + globals "^12.1.0" + ignore "^4.0.6" + import-fresh "^3.0.0" + imurmurhash "^0.1.4" + is-glob "^4.0.0" + js-yaml "^3.13.1" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.4.1" + lodash "^4.17.19" + minimatch "^3.0.4" + natural-compare "^1.4.0" + optionator "^0.9.1" + progress "^2.0.0" + regexpp "^3.1.0" + semver "^7.2.1" + strip-ansi "^6.0.0" + strip-json-comments "^3.1.0" + table "^5.2.3" + text-table "^0.2.0" + v8-compile-cache "^2.0.3" + + espree@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-5.0.1.tgz#5d6526fa4fc7f0788a5cf75b15f30323e2f81f7a" + integrity sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A== + dependencies: + acorn "^6.0.7" + acorn-jsx "^5.0.0" + eslint-visitor-keys "^1.0.0" + + espree@^7.3.0: + version "7.3.0" + resolved "https://registry.yarnpkg.com/espree/-/espree-7.3.0.tgz#dc30437cf67947cf576121ebd780f15eeac72348" + integrity sha512-dksIWsvKCixn1yrEXO8UosNSxaDoSYpq9reEjZSbHLpT5hpaCAKTLBwq0RHtLrIr+c0ByiYzWT8KTMRzoRCNlw== + dependencies: + acorn "^7.4.0" + acorn-jsx "^5.2.0" + eslint-visitor-keys "^1.3.0" + + esprima-extract-comments@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/esprima-extract-comments/-/esprima-extract-comments-1.1.0.tgz#0dacab567a5900240de6d344cf18c33617becbc9" + integrity sha512-sBQUnvJwpeE9QnPrxh7dpI/dp67erYG4WXEAreAMoelPRpMR7NWb4YtwRPn9b+H1uLQKl/qS8WYmyaljTpjIsw== + dependencies: + esprima "^4.0.0" + + esprima@2.7.x, esprima@^2.7.1: + version "2.7.3" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" + integrity sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE= + + esprima@4.0.1, esprima@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== + + esquery@^1.0.1, esquery@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.3.1.tgz#b78b5828aa8e214e29fb74c4d5b752e1c033da57" + integrity sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ== + dependencies: + estraverse "^5.1.0" + + esrecurse@^4.1.0, esrecurse@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" + integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== + dependencies: + estraverse "^5.2.0" + + estraverse@^1.9.1: + version "1.9.3" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44" + integrity sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q= + + estraverse@^4.1.1: + version "4.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" + integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== + + estraverse@^5.1.0, estraverse@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.2.0.tgz#307df42547e6cc7324d3cf03c155d5cdb8c53880" + integrity sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ== + + esutils@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + + etag@~1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" + integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= + + eth-block-tracker@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/eth-block-tracker/-/eth-block-tracker-3.0.1.tgz#95cd5e763c7293e0b1b2790a2a39ac2ac188a5e1" + integrity sha512-WUVxWLuhMmsfenfZvFO5sbl1qFY2IqUlw/FPVmjjdElpqLsZtSG+wPe9Dz7W/sB6e80HgFKknOmKk2eNlznHug== + dependencies: + eth-query "^2.1.0" + ethereumjs-tx "^1.3.3" + ethereumjs-util "^5.1.3" + ethjs-util "^0.1.3" + json-rpc-engine "^3.6.0" + pify "^2.3.0" + tape "^4.6.3" + + eth-ens-namehash@2.0.8, eth-ens-namehash@^2.0.0, eth-ens-namehash@^2.0.8: + version "2.0.8" + resolved "https://registry.yarnpkg.com/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz#229ac46eca86d52e0c991e7cb2aef83ff0f68bcf" + integrity sha1-IprEbsqG1S4MmR58sq74P/D2i88= + dependencies: + idna-uts46-hx "^2.3.1" + js-sha3 "^0.5.7" + + eth-gas-reporter@^0.2.20: + version "0.2.22" + resolved "https://registry.yarnpkg.com/eth-gas-reporter/-/eth-gas-reporter-0.2.22.tgz#bbe91f5d7b22433d26f099eeb5b20118ced0e575" + integrity sha512-L1FlC792aTf3j/j+gGzSNlGrXKSxNPXQNk6TnV5NNZ2w3jnQCRyJjDl0zUo25Cq2t90IS5vGdbkwqFQK7Ce+kw== + dependencies: + "@ethersproject/abi" "^5.0.0-beta.146" + "@solidity-parser/parser" "^0.12.0" + cli-table3 "^0.5.0" + colors "^1.1.2" + ethereumjs-util "6.2.0" + ethers "^4.0.40" + fs-readdir-recursive "^1.1.0" + lodash "^4.17.14" + markdown-table "^1.1.3" + mocha "^7.1.1" + req-cwd "^2.0.0" + request "^2.88.0" + request-promise-native "^1.0.5" + sha1 "^1.1.1" + sync-request "^6.0.0" + + eth-json-rpc-infura@^3.1.0: + version "3.2.1" + resolved "https://registry.yarnpkg.com/eth-json-rpc-infura/-/eth-json-rpc-infura-3.2.1.tgz#26702a821067862b72d979c016fd611502c6057f" + integrity sha512-W7zR4DZvyTn23Bxc0EWsq4XGDdD63+XPUCEhV2zQvQGavDVC4ZpFDK4k99qN7bd7/fjj37+rxmuBOBeIqCA5Mw== + dependencies: + cross-fetch "^2.1.1" + eth-json-rpc-middleware "^1.5.0" + json-rpc-engine "^3.4.0" + json-rpc-error "^2.0.0" + + eth-json-rpc-middleware@^1.5.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/eth-json-rpc-middleware/-/eth-json-rpc-middleware-1.6.0.tgz#5c9d4c28f745ccb01630f0300ba945f4bef9593f" + integrity sha512-tDVCTlrUvdqHKqivYMjtFZsdD7TtpNLBCfKAcOpaVs7orBMS/A8HWro6dIzNtTZIR05FAbJ3bioFOnZpuCew9Q== + dependencies: + async "^2.5.0" + eth-query "^2.1.2" + eth-tx-summary "^3.1.2" + ethereumjs-block "^1.6.0" + ethereumjs-tx "^1.3.3" + ethereumjs-util "^5.1.2" + ethereumjs-vm "^2.1.0" + fetch-ponyfill "^4.0.0" + json-rpc-engine "^3.6.0" + json-rpc-error "^2.0.0" + json-stable-stringify "^1.0.1" + promise-to-callback "^1.0.0" + tape "^4.6.3" + + eth-lib@0.2.7: + version "0.2.7" + resolved "https://registry.yarnpkg.com/eth-lib/-/eth-lib-0.2.7.tgz#2f93f17b1e23aec3759cd4a3fe20c1286a3fc1ca" + integrity sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco= + dependencies: + bn.js "^4.11.6" + elliptic "^6.4.0" + xhr-request-promise "^0.1.2" + + eth-lib@0.2.8, eth-lib@^0.2.8: + version "0.2.8" + resolved "https://registry.yarnpkg.com/eth-lib/-/eth-lib-0.2.8.tgz#b194058bef4b220ad12ea497431d6cb6aa0623c8" + integrity sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw== + dependencies: + bn.js "^4.11.6" + elliptic "^6.4.0" + xhr-request-promise "^0.1.2" + + eth-lib@^0.1.26: + version "0.1.29" + resolved "https://registry.yarnpkg.com/eth-lib/-/eth-lib-0.1.29.tgz#0c11f5060d42da9f931eab6199084734f4dbd1d9" + integrity sha512-bfttrr3/7gG4E02HoWTDUcDDslN003OlOoBxk9virpAZQ1ja/jDgwkWB8QfJF7ojuEowrqy+lzp9VcJG7/k5bQ== + dependencies: + bn.js "^4.11.6" + elliptic "^6.4.0" + nano-json-stream-parser "^0.1.2" + servify "^0.1.12" + ws "^3.0.0" + xhr-request-promise "^0.1.2" + + eth-query@^2.0.2, eth-query@^2.1.0, eth-query@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/eth-query/-/eth-query-2.1.2.tgz#d6741d9000106b51510c72db92d6365456a6da5e" + integrity sha1-1nQdkAAQa1FRDHLbktY2VFam2l4= + dependencies: + json-rpc-random-id "^1.0.0" + xtend "^4.0.1" + + eth-sig-util@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/eth-sig-util/-/eth-sig-util-3.0.0.tgz#75133b3d7c20a5731af0690c385e184ab942b97e" + integrity sha512-4eFkMOhpGbTxBQ3AMzVf0haUX2uTur7DpWiHzWyTURa28BVJJtOkcb9Ok5TV0YvEPG61DODPW7ZUATbJTslioQ== + dependencies: + buffer "^5.2.1" + elliptic "^6.4.0" + ethereumjs-abi "0.6.5" + ethereumjs-util "^5.1.1" + tweetnacl "^1.0.0" + tweetnacl-util "^0.15.0" + + eth-sig-util@^1.4.2: + version "1.4.2" + resolved "https://registry.yarnpkg.com/eth-sig-util/-/eth-sig-util-1.4.2.tgz#8d958202c7edbaae839707fba6f09ff327606210" + integrity sha1-jZWCAsftuq6Dlwf7pvCf8ydgYhA= + dependencies: + ethereumjs-abi "git+https://github.com/ethereumjs/ethereumjs-abi.git" + ethereumjs-util "^5.1.1" + + eth-sig-util@^2.5.2: + version "2.5.4" + resolved "https://registry.yarnpkg.com/eth-sig-util/-/eth-sig-util-2.5.4.tgz#577b01fe491b6bf59b0464be09633e20c1677bc5" + integrity sha512-aCMBwp8q/4wrW4QLsF/HYBOSA7TpLKmkVwP3pYQNkEEseW2Rr8Z5Uxc9/h6HX+OG3tuHo+2bINVSihIeBfym6A== + dependencies: + ethereumjs-abi "0.6.8" + ethereumjs-util "^5.1.1" + tweetnacl "^1.0.3" + tweetnacl-util "^0.15.0" + + eth-tx-summary@^3.1.2: + version "3.2.4" + resolved "https://registry.yarnpkg.com/eth-tx-summary/-/eth-tx-summary-3.2.4.tgz#e10eb95eb57cdfe549bf29f97f1e4f1db679035c" + integrity sha512-NtlDnaVZah146Rm8HMRUNMgIwG/ED4jiqk0TME9zFheMl1jOp6jL1m0NKGjJwehXQ6ZKCPr16MTr+qspKpEXNg== + dependencies: + async "^2.1.2" + clone "^2.0.0" + concat-stream "^1.5.1" + end-of-stream "^1.1.0" + eth-query "^2.0.2" + ethereumjs-block "^1.4.1" + ethereumjs-tx "^1.1.1" + ethereumjs-util "^5.0.1" + ethereumjs-vm "^2.6.0" + through2 "^2.0.3" + + ethashjs@~0.0.7: + version "0.0.8" + resolved "https://registry.yarnpkg.com/ethashjs/-/ethashjs-0.0.8.tgz#227442f1bdee409a548fb04136e24c874f3aa6f9" + integrity sha512-/MSbf/r2/Ld8o0l15AymjOTlPqpN8Cr4ByUEA9GtR4x0yAh3TdtDzEg29zMjXCNPI7u6E5fOQdj/Cf9Tc7oVNw== + dependencies: + async "^2.1.2" + buffer-xor "^2.0.1" + ethereumjs-util "^7.0.2" + miller-rabin "^4.0.0" + + ethereum-bloom-filters@^1.0.6: + version "1.0.7" + resolved "https://registry.yarnpkg.com/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.7.tgz#b7b80735e385dbb7f944ce6b4533e24511306060" + integrity sha512-cDcJJSJ9GMAcURiAWO3DxIEhTL/uWqlQnvgKpuYQzYPrt/izuGU+1ntQmHt0IRq6ADoSYHFnB+aCEFIldjhkMQ== + dependencies: + js-sha3 "^0.8.0" + + ethereum-common@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/ethereum-common/-/ethereum-common-0.2.0.tgz#13bf966131cce1eeade62a1b434249bb4cb120ca" + integrity sha512-XOnAR/3rntJgbCdGhqdaLIxDLWKLmsZOGhHdBKadEr6gEnJLH52k93Ou+TUdFaPN3hJc3isBZBal3U/XZ15abA== + + ethereum-common@^0.0.18: + version "0.0.18" + resolved "https://registry.yarnpkg.com/ethereum-common/-/ethereum-common-0.0.18.tgz#2fdc3576f232903358976eb39da783213ff9523f" + integrity sha1-L9w1dvIykDNYl26znaeDIT/5Uj8= + + ethereum-cryptography@^0.1.2, ethereum-cryptography@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz#8d6143cfc3d74bf79bbd8edecdf29e4ae20dd191" + integrity sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ== + dependencies: + "@types/pbkdf2" "^3.0.0" + "@types/secp256k1" "^4.0.1" + blakejs "^1.1.0" + browserify-aes "^1.2.0" + bs58check "^2.1.2" + create-hash "^1.2.0" + create-hmac "^1.1.7" + hash.js "^1.1.7" + keccak "^3.0.0" + pbkdf2 "^3.0.17" + randombytes "^2.1.0" + safe-buffer "^5.1.2" + scrypt-js "^3.0.0" + secp256k1 "^4.0.1" + setimmediate "^1.0.5" + + ethereum-ens@^0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/ethereum-ens/-/ethereum-ens-0.8.0.tgz#6d0f79acaa61fdbc87d2821779c4e550243d4c57" + integrity sha512-a8cBTF4AWw1Q1Y37V1LSCS9pRY4Mh3f8vCg5cbXCCEJ3eno1hbI/+Ccv9SZLISYpqQhaglP3Bxb/34lS4Qf7Bg== + dependencies: + bluebird "^3.4.7" + eth-ens-namehash "^2.0.0" + js-sha3 "^0.5.7" + pako "^1.0.4" + underscore "^1.8.3" + web3 "^1.0.0-beta.34" + + ethereum-waffle@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/ethereum-waffle/-/ethereum-waffle-3.3.0.tgz#166a0cc1d3b2925f117b20ef0951b3fe72e38e79" + integrity sha512-4xm3RWAPCu5LlaVxYEg0tG3L7g5ovBw1GY/UebrzZ+OTx22vcPjI+bvelFlGBpkdnO5yOIFXjH2eK59tNAe9IA== + dependencies: + "@ethereum-waffle/chai" "^3.3.0" + "@ethereum-waffle/compiler" "^3.3.0" + "@ethereum-waffle/mock-contract" "^3.2.2" + "@ethereum-waffle/provider" "^3.3.0" + ethers "^5.0.1" + + ethereumjs-abi@0.6.5: + version "0.6.5" + resolved "https://registry.yarnpkg.com/ethereumjs-abi/-/ethereumjs-abi-0.6.5.tgz#5a637ef16ab43473fa72a29ad90871405b3f5241" + integrity sha1-WmN+8Wq0NHP6cqKa2QhxQFs/UkE= + dependencies: + bn.js "^4.10.0" + ethereumjs-util "^4.3.0" + + ethereumjs-abi@0.6.8, ethereumjs-abi@^0.6.8: + version "0.6.8" + resolved "https://registry.yarnpkg.com/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz#71bc152db099f70e62f108b7cdfca1b362c6fcae" + integrity sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA== + dependencies: + bn.js "^4.11.8" + ethereumjs-util "^6.0.0" + + "ethereumjs-abi@git+https://github.com/ethereumjs/ethereumjs-abi.git": + version "0.6.8" + resolved "git+https://github.com/ethereumjs/ethereumjs-abi.git#1a27c59c15ab1e95ee8e5c4ed6ad814c49cc439e" + dependencies: + bn.js "^4.11.8" + ethereumjs-util "^6.0.0" + + ethereumjs-account@3.0.0, ethereumjs-account@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ethereumjs-account/-/ethereumjs-account-3.0.0.tgz#728f060c8e0c6e87f1e987f751d3da25422570a9" + integrity sha512-WP6BdscjiiPkQfF9PVfMcwx/rDvfZTjFKY0Uwc09zSQr9JfIVH87dYIJu0gNhBhpmovV4yq295fdllS925fnBA== + dependencies: + ethereumjs-util "^6.0.0" + rlp "^2.2.1" + safe-buffer "^5.1.1" + + ethereumjs-account@^2.0.3: + version "2.0.5" + resolved "https://registry.yarnpkg.com/ethereumjs-account/-/ethereumjs-account-2.0.5.tgz#eeafc62de544cb07b0ee44b10f572c9c49e00a84" + integrity sha512-bgDojnXGjhMwo6eXQC0bY6UK2liSFUSMwwylOmQvZbSl/D7NXQ3+vrGO46ZeOgjGfxXmgIeVNDIiHw7fNZM4VA== + dependencies: + ethereumjs-util "^5.0.0" + rlp "^2.0.0" + safe-buffer "^5.1.1" + + ethereumjs-block@2.2.2, ethereumjs-block@^2.2.2, ethereumjs-block@~2.2.0, ethereumjs-block@~2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/ethereumjs-block/-/ethereumjs-block-2.2.2.tgz#c7654be7e22df489fda206139ecd63e2e9c04965" + integrity sha512-2p49ifhek3h2zeg/+da6XpdFR3GlqY3BIEiqxGF8j9aSRIgkb7M1Ky+yULBKJOu8PAZxfhsYA+HxUk2aCQp3vg== + dependencies: + async "^2.0.1" + ethereumjs-common "^1.5.0" + ethereumjs-tx "^2.1.1" + ethereumjs-util "^5.0.0" + merkle-patricia-tree "^2.1.2" + + ethereumjs-block@^1.2.2, ethereumjs-block@^1.4.1, ethereumjs-block@^1.6.0: + version "1.7.1" + resolved "https://registry.yarnpkg.com/ethereumjs-block/-/ethereumjs-block-1.7.1.tgz#78b88e6cc56de29a6b4884ee75379b6860333c3f" + integrity sha512-B+sSdtqm78fmKkBq78/QLKJbu/4Ts4P2KFISdgcuZUPDm9x+N7qgBPIIFUGbaakQh8bzuquiRVbdmvPKqbILRg== + dependencies: + async "^2.0.1" + ethereum-common "0.2.0" + ethereumjs-tx "^1.2.2" + ethereumjs-util "^5.0.0" + merkle-patricia-tree "^2.1.2" + + ethereumjs-blockchain@^4.0.3: + version "4.0.4" + resolved "https://registry.yarnpkg.com/ethereumjs-blockchain/-/ethereumjs-blockchain-4.0.4.tgz#30f2228dc35f6dcf94423692a6902604ae34960f" + integrity sha512-zCxaRMUOzzjvX78DTGiKjA+4h2/sF0OYL1QuPux0DHpyq8XiNoF5GYHtb++GUxVlMsMfZV7AVyzbtgcRdIcEPQ== + dependencies: + async "^2.6.1" + ethashjs "~0.0.7" + ethereumjs-block "~2.2.2" + ethereumjs-common "^1.5.0" + ethereumjs-util "^6.1.0" + flow-stoplight "^1.0.0" + level-mem "^3.0.1" + lru-cache "^5.1.1" + rlp "^2.2.2" + semaphore "^1.1.0" + + ethereumjs-common@1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/ethereumjs-common/-/ethereumjs-common-1.5.0.tgz#d3e82fc7c47c0cef95047f431a99485abc9bb1cd" + integrity sha512-SZOjgK1356hIY7MRj3/ma5qtfr/4B5BL+G4rP/XSMYr2z1H5el4RX5GReYCKmQmYI/nSBmRnwrZ17IfHuG0viQ== + + ethereumjs-common@^1.1.0, ethereumjs-common@^1.3.2, ethereumjs-common@^1.5.0: + version "1.5.2" + resolved "https://registry.yarnpkg.com/ethereumjs-common/-/ethereumjs-common-1.5.2.tgz#2065dbe9214e850f2e955a80e650cb6999066979" + integrity sha512-hTfZjwGX52GS2jcVO6E2sx4YuFnf0Fhp5ylo4pEPhEffNln7vS59Hr5sLnp3/QCazFLluuBZ+FZ6J5HTp0EqCA== + + ethereumjs-tx@2.1.2, ethereumjs-tx@^2.1.1, ethereumjs-tx@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ethereumjs-tx/-/ethereumjs-tx-2.1.2.tgz#5dfe7688bf177b45c9a23f86cf9104d47ea35fed" + integrity sha512-zZEK1onCeiORb0wyCXUvg94Ve5It/K6GD1K+26KfFKodiBiS6d9lfCXlUKGBBdQ+bv7Day+JK0tj1K+BeNFRAw== + dependencies: + ethereumjs-common "^1.5.0" + ethereumjs-util "^6.0.0" + + ethereumjs-tx@^1.1.1, ethereumjs-tx@^1.2.0, ethereumjs-tx@^1.2.2, ethereumjs-tx@^1.3.3: + version "1.3.7" + resolved "https://registry.yarnpkg.com/ethereumjs-tx/-/ethereumjs-tx-1.3.7.tgz#88323a2d875b10549b8347e09f4862b546f3d89a" + integrity sha512-wvLMxzt1RPhAQ9Yi3/HKZTn0FZYpnsmQdbKYfUUpi4j1SEIcbkd9tndVjcPrufY3V7j2IebOpC00Zp2P/Ay2kA== + dependencies: + ethereum-common "^0.0.18" + ethereumjs-util "^5.0.0" + + ethereumjs-util@6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-6.2.0.tgz#23ec79b2488a7d041242f01e25f24e5ad0357960" + integrity sha512-vb0XN9J2QGdZGIEKG2vXM+kUdEivUfU6Wmi5y0cg+LRhDYKnXIZ/Lz7XjFbHRR9VIKq2lVGLzGBkA++y2nOdOQ== + dependencies: + "@types/bn.js" "^4.11.3" + bn.js "^4.11.0" + create-hash "^1.1.2" + ethjs-util "0.1.6" + keccak "^2.0.0" + rlp "^2.2.3" + secp256k1 "^3.0.1" + + ethereumjs-util@6.2.1, ethereumjs-util@^6.0.0, ethereumjs-util@^6.1.0, ethereumjs-util@^6.2.0: + version "6.2.1" + resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz#fcb4e4dd5ceacb9d2305426ab1a5cd93e3163b69" + integrity sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw== + dependencies: + "@types/bn.js" "^4.11.3" + bn.js "^4.11.0" + create-hash "^1.1.2" + elliptic "^6.5.2" + ethereum-cryptography "^0.1.3" + ethjs-util "0.1.6" + rlp "^2.2.3" + + ethereumjs-util@^4.3.0: + version "4.5.1" + resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-4.5.1.tgz#f4bf9b3b515a484e3cc8781d61d9d980f7c83bd0" + integrity sha512-WrckOZ7uBnei4+AKimpuF1B3Fv25OmoRgmYCpGsP7u8PFxXAmAgiJSYT2kRWnt6fVIlKaQlZvuwXp7PIrmn3/w== + dependencies: + bn.js "^4.8.0" + create-hash "^1.1.2" + elliptic "^6.5.2" + ethereum-cryptography "^0.1.3" + rlp "^2.0.0" + + ethereumjs-util@^5.0.0, ethereumjs-util@^5.0.1, ethereumjs-util@^5.1.1, ethereumjs-util@^5.1.2, ethereumjs-util@^5.1.3, ethereumjs-util@^5.1.5, ethereumjs-util@^5.2.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz#a833f0e5fca7e5b361384dc76301a721f537bf65" + integrity sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ== + dependencies: + bn.js "^4.11.0" + create-hash "^1.1.2" + elliptic "^6.5.2" + ethereum-cryptography "^0.1.3" + ethjs-util "^0.1.3" + rlp "^2.0.0" + safe-buffer "^5.1.1" + + ethereumjs-util@^7.0.2: + version "7.0.10" + resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-7.0.10.tgz#5fb7b69fa1fda0acc59634cf39d6b0291180fc1f" + integrity sha512-c/xThw6A+EAnej5Xk5kOzFzyoSnw0WX0tSlZ6pAsfGVvQj3TItaDg9b1+Fz1RJXA+y2YksKwQnuzgt1eY6LKzw== + dependencies: + "@types/bn.js" "^5.1.0" + bn.js "^5.1.2" + create-hash "^1.1.2" + ethereum-cryptography "^0.1.3" + ethjs-util "0.1.6" + rlp "^2.2.4" + + ethereumjs-vm@4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/ethereumjs-vm/-/ethereumjs-vm-4.2.0.tgz#e885e861424e373dbc556278f7259ff3fca5edab" + integrity sha512-X6qqZbsY33p5FTuZqCnQ4+lo957iUJMM6Mpa6bL4UW0dxM6WmDSHuI4j/zOp1E2TDKImBGCJA9QPfc08PaNubA== + dependencies: + async "^2.1.2" + async-eventemitter "^0.2.2" + core-js-pure "^3.0.1" + ethereumjs-account "^3.0.0" + ethereumjs-block "^2.2.2" + ethereumjs-blockchain "^4.0.3" + ethereumjs-common "^1.5.0" + ethereumjs-tx "^2.1.2" + ethereumjs-util "^6.2.0" + fake-merkle-patricia-tree "^1.0.1" + functional-red-black-tree "^1.0.1" + merkle-patricia-tree "^2.3.2" + rustbn.js "~0.2.0" + safe-buffer "^5.1.1" + util.promisify "^1.0.0" + + ethereumjs-vm@^2.1.0, ethereumjs-vm@^2.3.4, ethereumjs-vm@^2.6.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/ethereumjs-vm/-/ethereumjs-vm-2.6.0.tgz#76243ed8de031b408793ac33907fb3407fe400c6" + integrity sha512-r/XIUik/ynGbxS3y+mvGnbOKnuLo40V5Mj1J25+HEO63aWYREIqvWeRO/hnROlMBE5WoniQmPmhiaN0ctiHaXw== + dependencies: + async "^2.1.2" + async-eventemitter "^0.2.2" + ethereumjs-account "^2.0.3" + ethereumjs-block "~2.2.0" + ethereumjs-common "^1.1.0" + ethereumjs-util "^6.0.0" + fake-merkle-patricia-tree "^1.0.1" + functional-red-black-tree "^1.0.1" + merkle-patricia-tree "^2.3.2" + rustbn.js "~0.2.0" + safe-buffer "^5.1.1" + + ethereumjs-wallet@0.6.5: + version "0.6.5" + resolved "https://registry.yarnpkg.com/ethereumjs-wallet/-/ethereumjs-wallet-0.6.5.tgz#685e9091645cee230ad125c007658833991ed474" + integrity sha512-MDwjwB9VQVnpp/Dc1XzA6J1a3wgHQ4hSvA1uWNatdpOrtCbPVuQSKSyRnjLvS0a+KKMw2pvQ9Ybqpb3+eW8oNA== + dependencies: + aes-js "^3.1.1" + bs58check "^2.1.2" + ethereum-cryptography "^0.1.3" + ethereumjs-util "^6.0.0" + randombytes "^2.0.6" + safe-buffer "^5.1.2" + scryptsy "^1.2.1" + utf8 "^3.0.0" + uuid "^3.3.2" + + ethers@^4.0.32, ethers@^4.0.40, ethers@^4.0.45: + version "4.0.48" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-4.0.48.tgz#330c65b8133e112b0613156e57e92d9009d8fbbe" + integrity sha512-sZD5K8H28dOrcidzx9f8KYh8083n5BexIO3+SbE4jK83L85FxtpXZBCQdXb8gkg+7sBqomcLhhkU7UHL+F7I2g== + dependencies: + aes-js "3.0.0" + bn.js "^4.4.0" + elliptic "6.5.3" + hash.js "1.1.3" + js-sha3 "0.5.7" + scrypt-js "2.0.4" + setimmediate "1.0.4" + uuid "2.0.1" + xmlhttprequest "1.8.0" + + ethers@^5.0.0: + version "5.0.31" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.0.31.tgz#60e3b1425864fe5d2babc147ede01be8382a7d2a" + integrity sha512-zpq0YbNFLFn+t+ibS8UkVWFeK5w6rVMSvbSHrHAQslfazovLnQ/mc2gdN5+6P45/k8fPgHrfHrYvJ4XvyK/S1A== + dependencies: + "@ethersproject/abi" "5.0.12" + "@ethersproject/abstract-provider" "5.0.9" + "@ethersproject/abstract-signer" "5.0.13" + "@ethersproject/address" "5.0.10" + "@ethersproject/base64" "5.0.8" + "@ethersproject/basex" "5.0.8" + "@ethersproject/bignumber" "5.0.14" + "@ethersproject/bytes" "5.0.10" + "@ethersproject/constants" "5.0.9" + "@ethersproject/contracts" "5.0.11" + "@ethersproject/hash" "5.0.11" + "@ethersproject/hdnode" "5.0.9" + "@ethersproject/json-wallets" "5.0.11" + "@ethersproject/keccak256" "5.0.8" + "@ethersproject/logger" "5.0.9" + "@ethersproject/networks" "5.0.8" + "@ethersproject/pbkdf2" "5.0.8" + "@ethersproject/properties" "5.0.8" + "@ethersproject/providers" "5.0.23" + "@ethersproject/random" "5.0.8" + "@ethersproject/rlp" "5.0.8" + "@ethersproject/sha2" "5.0.8" + "@ethersproject/signing-key" "5.0.10" + "@ethersproject/solidity" "5.0.9" + "@ethersproject/strings" "5.0.9" + "@ethersproject/transactions" "5.0.10" + "@ethersproject/units" "5.0.10" + "@ethersproject/wallet" "5.0.11" + "@ethersproject/web" "5.0.13" + "@ethersproject/wordlists" "5.0.9" + + ethers@^5.0.1, ethers@^5.0.2: + version "5.0.32" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.0.32.tgz#f009970be31d96a589bf0ce597a39c10c7e297a6" + integrity sha512-rORfGWR0HsA4pjKMMcWZorw12DHsXqfIAuPVHJsXt+vI24jvXcVqx+rLsSvgOoLdaCMdxiN5qlIq2+4axKG31g== + dependencies: + "@ethersproject/abi" "5.0.13" + "@ethersproject/abstract-provider" "5.0.10" + "@ethersproject/abstract-signer" "5.0.14" + "@ethersproject/address" "5.0.11" + "@ethersproject/base64" "5.0.9" + "@ethersproject/basex" "5.0.9" + "@ethersproject/bignumber" "5.0.15" + "@ethersproject/bytes" "5.0.11" + "@ethersproject/constants" "5.0.10" + "@ethersproject/contracts" "5.0.12" + "@ethersproject/hash" "5.0.12" + "@ethersproject/hdnode" "5.0.10" + "@ethersproject/json-wallets" "5.0.12" + "@ethersproject/keccak256" "5.0.9" + "@ethersproject/logger" "5.0.10" + "@ethersproject/networks" "5.0.9" + "@ethersproject/pbkdf2" "5.0.9" + "@ethersproject/properties" "5.0.9" + "@ethersproject/providers" "5.0.24" + "@ethersproject/random" "5.0.9" + "@ethersproject/rlp" "5.0.9" + "@ethersproject/sha2" "5.0.9" + "@ethersproject/signing-key" "5.0.11" + "@ethersproject/solidity" "5.0.10" + "@ethersproject/strings" "5.0.10" + "@ethersproject/transactions" "5.0.11" + "@ethersproject/units" "5.0.11" + "@ethersproject/wallet" "5.0.12" + "@ethersproject/web" "5.0.14" + "@ethersproject/wordlists" "5.0.10" + + ethers@^5.0.17: + version "5.0.19" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.0.19.tgz#a4636f62a180135b13fd1f0a393477beafd535b7" + integrity sha512-0AZnUgZh98q888WAd1oI3aLeI+iyDtrupjANVtPPS7O63lVopkR/No8A1NqSkgl/rU+b2iuu2mUZor6GD4RG2w== + dependencies: + "@ethersproject/abi" "5.0.7" + "@ethersproject/abstract-provider" "5.0.5" + "@ethersproject/abstract-signer" "5.0.7" + "@ethersproject/address" "5.0.5" + "@ethersproject/base64" "5.0.4" + "@ethersproject/basex" "5.0.4" + "@ethersproject/bignumber" "5.0.8" + "@ethersproject/bytes" "5.0.5" + "@ethersproject/constants" "5.0.5" + "@ethersproject/contracts" "5.0.5" + "@ethersproject/hash" "5.0.6" + "@ethersproject/hdnode" "5.0.5" + "@ethersproject/json-wallets" "5.0.7" + "@ethersproject/keccak256" "5.0.4" + "@ethersproject/logger" "5.0.6" + "@ethersproject/networks" "5.0.4" + "@ethersproject/pbkdf2" "5.0.4" + "@ethersproject/properties" "5.0.4" + "@ethersproject/providers" "5.0.14" + "@ethersproject/random" "5.0.4" + "@ethersproject/rlp" "5.0.4" + "@ethersproject/sha2" "5.0.4" + "@ethersproject/signing-key" "5.0.5" + "@ethersproject/solidity" "5.0.5" + "@ethersproject/strings" "5.0.5" + "@ethersproject/transactions" "5.0.6" + "@ethersproject/units" "5.0.6" + "@ethersproject/wallet" "5.0.7" + "@ethersproject/web" "5.0.9" + "@ethersproject/wordlists" "5.0.5" + + ethjs-unit@0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/ethjs-unit/-/ethjs-unit-0.1.6.tgz#c665921e476e87bce2a9d588a6fe0405b2c41699" + integrity sha1-xmWSHkduh7ziqdWIpv4EBbLEFpk= + dependencies: + bn.js "4.11.6" + number-to-bn "1.7.0" + + ethjs-util@0.1.6, ethjs-util@^0.1.3: + version "0.1.6" + resolved "https://registry.yarnpkg.com/ethjs-util/-/ethjs-util-0.1.6.tgz#f308b62f185f9fe6237132fb2a9818866a5cd536" + integrity sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w== + dependencies: + is-hex-prefixed "1.0.0" + strip-hex-prefix "1.0.0" + + event-target-shim@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" + integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== + + eventemitter3@3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.2.tgz#2d3d48f9c346698fce83a85d7d664e98535df6e7" + integrity sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q== + + eventemitter3@4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.4.tgz#b5463ace635a083d018bdc7c917b4c5f10a85384" + integrity sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ== + + eventemitter3@^4.0.0: + version "4.0.7" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" + integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== + + events@^3.0.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" + integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== + + evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" + integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== + dependencies: + md5.js "^1.3.4" + safe-buffer "^5.1.1" + + execa@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8" + integrity sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA== + dependencies: + cross-spawn "^6.0.0" + get-stream "^4.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + + expand-brackets@^2.1.4: + version "2.1.4" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" + integrity sha1-t3c14xXOMPa27/D4OwQVGiJEliI= + dependencies: + debug "^2.3.3" + define-property "^0.2.5" + extend-shallow "^2.0.1" + posix-character-classes "^0.1.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + + express@^4.14.0: + version "4.17.1" + resolved "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134" + integrity sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g== + dependencies: + accepts "~1.3.7" + array-flatten "1.1.1" + body-parser "1.19.0" + content-disposition "0.5.3" + content-type "~1.0.4" + cookie "0.4.0" + cookie-signature "1.0.6" + debug "2.6.9" + depd "~1.1.2" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + finalhandler "~1.1.2" + fresh "0.5.2" + merge-descriptors "1.0.1" + methods "~1.1.2" + on-finished "~2.3.0" + parseurl "~1.3.3" + path-to-regexp "0.1.7" + proxy-addr "~2.0.5" + qs "6.7.0" + range-parser "~1.2.1" + safe-buffer "5.1.2" + send "0.17.1" + serve-static "1.14.1" + setprototypeof "1.1.1" + statuses "~1.5.0" + type-is "~1.6.18" + utils-merge "1.0.1" + vary "~1.1.2" + + ext@^1.1.2: + version "1.4.0" + resolved "https://registry.yarnpkg.com/ext/-/ext-1.4.0.tgz#89ae7a07158f79d35517882904324077e4379244" + integrity sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A== + dependencies: + type "^2.0.0" + + extend-shallow@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" + integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= + dependencies: + is-extendable "^0.1.0" + + extend-shallow@^3.0.0, extend-shallow@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" + integrity sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg= + dependencies: + assign-symbols "^1.0.0" + is-extendable "^1.0.1" + + extend@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" + integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== + + external-editor@^3.0.3: + version "3.1.0" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" + integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew== + dependencies: + chardet "^0.7.0" + iconv-lite "^0.4.24" + tmp "^0.0.33" + + extglob@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" + integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== + dependencies: + array-unique "^0.3.2" + define-property "^1.0.0" + expand-brackets "^2.1.4" + extend-shallow "^2.0.1" + fragment-cache "^0.2.1" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + + extract-comments@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/extract-comments/-/extract-comments-1.1.0.tgz#b90bca033a056bd69b8ba1c6b6b120fc2ee95c18" + integrity sha512-dzbZV2AdSSVW/4E7Ti5hZdHWbA+Z80RJsJhr5uiL10oyjl/gy7/o+HI1HwK4/WSZhlq4SNKU3oUzXlM13Qx02Q== + dependencies: + esprima-extract-comments "^1.1.0" + parse-code-context "^1.0.0" + + extract-files@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/extract-files/-/extract-files-9.0.0.tgz#8a7744f2437f81f5ed3250ed9f1550de902fe54a" + integrity sha512-CvdFfHkC95B4bBBk36hcEmvdR2awOdhhVUYH6S/zrVj3477zven/fJMYg7121h4T1xHZC+tetUpubpAhxwI7hQ== + + extsprintf@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= + + extsprintf@^1.2.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" + integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= + + fake-merkle-patricia-tree@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/fake-merkle-patricia-tree/-/fake-merkle-patricia-tree-1.0.1.tgz#4b8c3acfb520afadf9860b1f14cd8ce3402cddd3" + integrity sha1-S4w6z7Ugr635hgsfFM2M40As3dM= + dependencies: + checkpoint-store "^1.1.0" + + fast-deep-equal@^3.1.1: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + + fast-diff@^1.1.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" + integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== + + fast-glob@^3.0.3: + version "3.2.5" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.5.tgz#7939af2a656de79a4f1901903ee8adcaa7cb9661" + integrity sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.0" + merge2 "^1.3.0" + micromatch "^4.0.2" + picomatch "^2.2.1" + + fast-glob@^3.1.1: + version "3.2.4" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.4.tgz#d20aefbf99579383e7f3cc66529158c9b98554d3" + integrity sha512-kr/Oo6PX51265qeuCYsyGypiO5uJFgBS0jksyG7FUeCyQzNwYnzrNIMR1NXfkZXsMYXYLRAHgISHBz8gQcxKHQ== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.0" + merge2 "^1.3.0" + micromatch "^4.0.2" + picomatch "^2.2.1" + + fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + + fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= + + fastq@^1.6.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.8.0.tgz#550e1f9f59bbc65fe185cb6a9b4d95357107f481" + integrity sha512-SMIZoZdLh/fgofivvIkmknUXyPnvxRE3DhtZ5Me3Mrsk5gyPL42F0xr51TdRXskBxHfMp+07bcYzfsYEsSQA9Q== + dependencies: + reusify "^1.0.4" + + fetch-ponyfill@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/fetch-ponyfill/-/fetch-ponyfill-4.1.0.tgz#ae3ce5f732c645eab87e4ae8793414709b239893" + integrity sha1-rjzl9zLGReq4fkroeTQUcJsjmJM= + dependencies: + node-fetch "~1.7.1" + + figures@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" + integrity sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI= + dependencies: + escape-string-regexp "^1.0.5" + + file-entry-cache@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-5.0.1.tgz#ca0f6efa6dd3d561333fb14515065c2fafdf439c" + integrity sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g== + dependencies: + flat-cache "^2.0.1" + + file-uri-to-path@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" + integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== + + fill-range@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" + integrity sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc= + dependencies: + extend-shallow "^2.0.1" + is-number "^3.0.0" + repeat-string "^1.6.1" + to-regex-range "^2.1.0" + + fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + + finalhandler@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d" + integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA== + dependencies: + debug "2.6.9" + encodeurl "~1.0.2" + escape-html "~1.0.3" + on-finished "~2.3.0" + parseurl "~1.3.3" + statuses "~1.5.0" + unpipe "~1.0.0" + + find-replace@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/find-replace/-/find-replace-1.0.3.tgz#b88e7364d2d9c959559f388c66670d6130441fa0" + integrity sha1-uI5zZNLZyVlVnziMZmcNYTBEH6A= + dependencies: + array-back "^1.0.4" + test-value "^2.1.0" + + find-up@3.0.0, find-up@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" + integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== + dependencies: + locate-path "^3.0.0" + + find-up@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + + find-up@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" + integrity sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8= + dependencies: + path-exists "^2.0.0" + pinkie-promise "^2.0.0" + + find-up@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" + integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= + dependencies: + locate-path "^2.0.0" + + find-yarn-workspace-root@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/find-yarn-workspace-root/-/find-yarn-workspace-root-1.2.1.tgz#40eb8e6e7c2502ddfaa2577c176f221422f860db" + integrity sha512-dVtfb0WuQG+8Ag2uWkbG79hOUzEsRrhBzgfn86g2sJPkzmcpGdghbNTfUKGTxymFrY/tLIodDzLoW9nOJ4FY8Q== + dependencies: + fs-extra "^4.0.3" + micromatch "^3.1.4" + + find-yarn-workspace-root@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/find-yarn-workspace-root/-/find-yarn-workspace-root-2.0.0.tgz#f47fb8d239c900eb78179aa81b66673eac88f7bd" + integrity sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ== + dependencies: + micromatch "^4.0.2" + + flat-cache@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-2.0.1.tgz#5d296d6f04bda44a4630a301413bdbc2ec085ec0" + integrity sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA== + dependencies: + flatted "^2.0.0" + rimraf "2.6.3" + write "1.0.3" + + flat@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/flat/-/flat-4.1.1.tgz#a392059cc382881ff98642f5da4dde0a959f309b" + integrity sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA== + dependencies: + is-buffer "~2.0.3" + + flat@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" + integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== + + flatted@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138" + integrity sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA== + + flow-stoplight@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/flow-stoplight/-/flow-stoplight-1.0.0.tgz#4a292c5bcff8b39fa6cc0cb1a853d86f27eeff7b" + integrity sha1-SiksW8/4s5+mzAyxqFPYbyfu/3s= + + fmix@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/fmix/-/fmix-0.1.0.tgz#c7bbf124dec42c9d191cfb947d0a9778dd986c0c" + integrity sha1-x7vxJN7ELJ0ZHPuUfQqXeN2YbAw= + dependencies: + imul "^1.0.0" + + follow-redirects@^1.10.0: + version "1.13.2" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.13.2.tgz#dd73c8effc12728ba5cf4259d760ea5fb83e3147" + integrity sha512-6mPTgLxYm3r6Bkkg0vNM0HTjfGrOEtsfbhagQvbxDEsEkpNhw582upBaoRZylzen6krEmxXJgt9Ju6HiI4O7BA== + + follow-redirects@^1.12.1: + version "1.13.3" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.13.3.tgz#e5598ad50174c1bc4e872301e82ac2cd97f90267" + integrity sha512-DUgl6+HDzB0iEptNQEXLx/KhTmDb8tZUHSeLqpnjpknR70H0nC2t9N73BK6fN4hOvJ84pKlIQVQ4k5FFlBedKA== + + for-each@^0.3.3, for-each@~0.3.3: + version "0.3.3" + resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" + integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw== + dependencies: + is-callable "^1.1.3" + + for-in@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= + + foreach@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" + integrity sha1-C+4AUBiusmDQo6865ljdATbsG5k= + + forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= + + form-data@^2.2.0: + version "2.5.1" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.5.1.tgz#f2cbec57b5e59e23716e128fe44d4e5dd23895f4" + integrity sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.6" + mime-types "^2.1.12" + + form-data@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.0.tgz#31b7e39c85f1355b7139ee0c647cf0de7f83c682" + integrity sha512-CKMFDglpbMi6PyN+brwB9Q/GOw0eAnsrEZDgcsH5Krhz5Od/haKHAX0NmQfha2zPPz0JpWzA7GJHGSnvCRLWsg== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + + form-data@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" + integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.6" + mime-types "^2.1.12" + + forwarded@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84" + integrity sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ= + + fp-ts@1.19.3: + version "1.19.3" + resolved "https://registry.yarnpkg.com/fp-ts/-/fp-ts-1.19.3.tgz#261a60d1088fbff01f91256f91d21d0caaaaa96f" + integrity sha512-H5KQDspykdHuztLTg+ajGN0Z2qUjcEf3Ybxc6hLt0k7/zPkn29XnKnxlBPyW2XIddWrGaJBzBl4VLYOtk39yZg== + + fp-ts@^1.0.0: + version "1.19.5" + resolved "https://registry.yarnpkg.com/fp-ts/-/fp-ts-1.19.5.tgz#3da865e585dfa1fdfd51785417357ac50afc520a" + integrity sha512-wDNqTimnzs8QqpldiId9OavWK2NptormjXnRJTQecNjzwfyp6P/8s/zG8e4h3ja3oqkKaY72UlTjQYt/1yXf9A== + + fragment-cache@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" + integrity sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk= + dependencies: + map-cache "^0.2.2" + + fresh@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" + integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= + + fs-extra@^0.30.0: + version "0.30.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.30.0.tgz#f233ffcc08d4da7d432daa449776989db1df93f0" + integrity sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A= + dependencies: + graceful-fs "^4.1.2" + jsonfile "^2.1.0" + klaw "^1.0.0" + path-is-absolute "^1.0.0" + rimraf "^2.2.8" + + fs-extra@^4.0.2, fs-extra@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94" + integrity sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg== + dependencies: + graceful-fs "^4.1.2" + jsonfile "^4.0.0" + universalify "^0.1.0" + + fs-extra@^7.0.0, fs-extra@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" + integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== + dependencies: + graceful-fs "^4.1.2" + jsonfile "^4.0.0" + universalify "^0.1.0" + + fs-extra@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" + integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^4.0.0" + universalify "^0.1.0" + + fs-extra@^9.0.0, fs-extra@^9.0.1: + version "9.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.0.1.tgz#910da0062437ba4c39fedd863f1675ccfefcb9fc" + integrity sha512-h2iAoN838FqAFJY2/qVpzFXy+EBxfVE220PalAqQLDVsFOHLJrZvut5puAbCdNv6WJk+B8ihI+k0c7JK5erwqQ== + dependencies: + at-least-node "^1.0.0" + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^1.0.0" + + fs-minipass@^1.2.5: + version "1.2.7" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" + integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA== + dependencies: + minipass "^2.6.0" + + fs-readdir-recursive@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz#e32fc030a2ccee44a6b5371308da54be0b397d27" + integrity sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA== + + fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= + + fsevents@~2.1.1, fsevents@~2.1.2: + version "2.1.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" + integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== + + fsevents@~2.3.1: + version "2.3.2" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" + integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== + + function-bind@^1.1.1, function-bind@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== + + functional-red-black-tree@^1.0.1, functional-red-black-tree@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" + integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= + + ganache-cli@^6.11.0: + version "6.12.2" + resolved "https://registry.yarnpkg.com/ganache-cli/-/ganache-cli-6.12.2.tgz#c0920f7db0d4ac062ffe2375cb004089806f627a" + integrity sha512-bnmwnJDBDsOWBUP8E/BExWf85TsdDEFelQSzihSJm9VChVO1SHp94YXLP5BlA4j/OTxp0wR4R1Tje9OHOuAJVw== + dependencies: + ethereumjs-util "6.2.1" + source-map-support "0.5.12" + yargs "13.2.4" + + ganache-core@^2.10.2: + version "2.13.2" + resolved "https://registry.yarnpkg.com/ganache-core/-/ganache-core-2.13.2.tgz#27e6fc5417c10e6e76e2e646671869d7665814a3" + integrity sha512-tIF5cR+ANQz0+3pHWxHjIwHqFXcVo0Mb+kcsNhglNFALcYo49aQpnS9dqHartqPfMFjiHh/qFoD3mYK0d/qGgw== + dependencies: + abstract-leveldown "3.0.0" + async "2.6.2" + bip39 "2.5.0" + cachedown "1.0.0" + clone "2.1.2" + debug "3.2.6" + encoding-down "5.0.4" + eth-sig-util "3.0.0" + ethereumjs-abi "0.6.8" + ethereumjs-account "3.0.0" + ethereumjs-block "2.2.2" + ethereumjs-common "1.5.0" + ethereumjs-tx "2.1.2" + ethereumjs-util "6.2.1" + ethereumjs-vm "4.2.0" + heap "0.2.6" + keccak "3.0.1" + level-sublevel "6.6.4" + levelup "3.1.1" + lodash "4.17.20" + lru-cache "5.1.1" + merkle-patricia-tree "3.0.0" + patch-package "6.2.2" + seedrandom "3.0.1" + source-map-support "0.5.12" + tmp "0.1.0" + web3-provider-engine "14.2.1" + websocket "1.0.32" + optionalDependencies: + ethereumjs-wallet "0.6.5" + web3 "1.2.11" + + get-caller-file@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" + integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== + + get-caller-file@^2.0.1: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + + get-func-name@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" + integrity sha1-6td0q+5y4gQJQzoGY2YCPdaIekE= + + get-intrinsic@^1.0.2, get-intrinsic@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.1.tgz#15f59f376f855c446963948f0d24cd3637b4abc6" + integrity sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q== + dependencies: + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.1" + + get-port@^3.1.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/get-port/-/get-port-3.2.0.tgz#dd7ce7de187c06c8bf353796ac71e099f0980ebc" + integrity sha1-3Xzn3hh8Bsi/NTeWrHHgmfCYDrw= + + get-stdin@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b" + integrity sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g== + + get-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" + integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= + + get-stream@^4.0.0, get-stream@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" + integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== + dependencies: + pump "^3.0.0" + + get-stream@^5.1.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" + integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== + dependencies: + pump "^3.0.0" + + get-value@^2.0.3, get-value@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" + integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= + + getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= + dependencies: + assert-plus "^1.0.0" + + ghost-testrpc@^0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/ghost-testrpc/-/ghost-testrpc-0.0.2.tgz#c4de9557b1d1ae7b2d20bbe474a91378ca90ce92" + integrity sha512-i08dAEgJ2g8z5buJIrCTduwPIhih3DP+hOCTyyryikfV8T0bNvHnGXO67i0DD1H4GBDETTclPy9njZbfluQYrQ== + dependencies: + chalk "^2.4.2" + node-emoji "^1.10.0" + + glob-parent@^5.0.0, glob-parent@^5.1.0: + version "5.1.1" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.1.tgz#b6c1ef417c4e5663ea498f1c45afac6916bbc229" + integrity sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ== + dependencies: + is-glob "^4.0.1" + + glob-parent@~5.1.0: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + + glob-promise@^3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/glob-promise/-/glob-promise-3.4.0.tgz#b6b8f084504216f702dc2ce8c9bc9ac8866fdb20" + integrity sha512-q08RJ6O+eJn+dVanerAndJwIcumgbDdYiUT7zFQl3Wm1xD6fBKtah7H8ZJChj4wP+8C+QfeVy8xautR7rdmKEw== + dependencies: + "@types/glob" "*" + + glob@7.1.3: + version "7.1.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" + integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + + glob@7.1.6, glob@^7.0.0, glob@^7.1.2, glob@^7.1.3, glob@^7.1.6, glob@~7.1.6: + version "7.1.6" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" + integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + + glob@^5.0.15: + version "5.0.15" + resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" + integrity sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E= + dependencies: + inflight "^1.0.4" + inherits "2" + minimatch "2 || 3" + once "^1.3.0" + path-is-absolute "^1.0.0" + + glob@^6.0.1: + version "6.0.4" + resolved "https://registry.yarnpkg.com/glob/-/glob-6.0.4.tgz#0f08860f6a155127b2fadd4f9ce24b1aab6e4d22" + integrity sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI= + dependencies: + inflight "^1.0.4" + inherits "2" + minimatch "2 || 3" + once "^1.3.0" + path-is-absolute "^1.0.0" + + global-modules@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-2.0.0.tgz#997605ad2345f27f51539bea26574421215c7780" + integrity sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A== + dependencies: + global-prefix "^3.0.0" + + global-prefix@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-3.0.0.tgz#fc85f73064df69f50421f47f883fe5b913ba9b97" + integrity sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg== + dependencies: + ini "^1.3.5" + kind-of "^6.0.2" + which "^1.3.1" + + global@~4.3.0: + version "4.3.2" + resolved "https://registry.yarnpkg.com/global/-/global-4.3.2.tgz#e76989268a6c74c38908b1305b10fc0e394e9d0f" + integrity sha1-52mJJopsdMOJCLEwWxD8DjlOnQ8= + dependencies: + min-document "^2.19.0" + process "~0.5.1" + + global@~4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/global/-/global-4.4.0.tgz#3e7b105179006a323ed71aafca3e9c57a5cc6406" + integrity sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w== + dependencies: + min-document "^2.19.0" + process "^0.11.10" + + globals@^11.7.0: + version "11.12.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" + integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== + + globals@^12.1.0: + version "12.4.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-12.4.0.tgz#a18813576a41b00a24a97e7f815918c2e19925f8" + integrity sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg== + dependencies: + type-fest "^0.8.1" + + globals@^9.18.0: + version "9.18.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" + integrity sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ== + + globby@^10.0.1: + version "10.0.2" + resolved "https://registry.yarnpkg.com/globby/-/globby-10.0.2.tgz#277593e745acaa4646c3ab411289ec47a0392543" + integrity sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg== + dependencies: + "@types/glob" "^7.1.1" + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.0.3" + glob "^7.1.3" + ignore "^5.1.1" + merge2 "^1.2.3" + slash "^3.0.0" + + globby@^11.0.1: + version "11.0.1" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.1.tgz#9a2bf107a068f3ffeabc49ad702c79ede8cfd357" + integrity sha512-iH9RmgwCmUJHi2z5o2l3eTtGBtXek1OYlHrbcxOYugyHLmAsZrPj43OtHThd62Buh/Vv6VyCBD2bdyWcGNQqoQ== + dependencies: + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.1.1" + ignore "^5.1.4" + merge2 "^1.3.0" + slash "^3.0.0" + + got@9.6.0: + version "9.6.0" + resolved "https://registry.yarnpkg.com/got/-/got-9.6.0.tgz#edf45e7d67f99545705de1f7bbeeeb121765ed85" + integrity sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q== + dependencies: + "@sindresorhus/is" "^0.14.0" + "@szmarczak/http-timer" "^1.1.2" + cacheable-request "^6.0.0" + decompress-response "^3.3.0" + duplexer3 "^0.1.4" + get-stream "^4.1.0" + lowercase-keys "^1.0.1" + mimic-response "^1.0.1" + p-cancelable "^1.0.0" + to-readable-stream "^1.0.0" + url-parse-lax "^3.0.0" + + got@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/got/-/got-7.1.0.tgz#05450fd84094e6bbea56f451a43a9c289166385a" + integrity sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw== + dependencies: + decompress-response "^3.2.0" + duplexer3 "^0.1.4" + get-stream "^3.0.0" + is-plain-obj "^1.1.0" + is-retry-allowed "^1.0.0" + is-stream "^1.0.0" + isurl "^1.0.0-alpha5" + lowercase-keys "^1.0.0" + p-cancelable "^0.3.0" + p-timeout "^1.1.1" + safe-buffer "^5.0.1" + timed-out "^4.0.0" + url-parse-lax "^1.0.0" + url-to-options "^1.0.1" + + graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9: + version "4.2.6" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.6.tgz#ff040b2b0853b23c3d31027523706f1885d76bee" + integrity sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ== + + graceful-fs@^4.2.0: + version "4.2.4" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" + integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== + + graphql-request@^3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/graphql-request/-/graphql-request-3.4.0.tgz#3a400cd5511eb3c064b1873afb059196bbea9c2b" + integrity sha512-acrTzidSlwAj8wBNO7Q/UQHS8T+z5qRGquCQRv9J1InwR01BBWV9ObnoE+JS5nCCEj8wSGS0yrDXVDoRiKZuOg== + dependencies: + cross-fetch "^3.0.6" + extract-files "^9.0.0" + form-data "^3.0.0" + + graphql@^15.5.0: + version "15.5.0" + resolved "https://registry.yarnpkg.com/graphql/-/graphql-15.5.0.tgz#39d19494dbe69d1ea719915b578bf920344a69d5" + integrity sha512-OmaM7y0kaK31NKG31q4YbD2beNYa6jBBKtMFT6gLYJljHLJr42IqJ8KX08u3Li/0ifzTU5HjmoOOrwa5BRLeDA== + + growl@1.10.5: + version "1.10.5" + resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" + integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== + + handlebars@^4.0.1: + version "4.7.7" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.7.tgz#9ce33416aad02dbd6c8fafa8240d5d98004945a1" + integrity sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA== + dependencies: + minimist "^1.2.5" + neo-async "^2.6.0" + source-map "^0.6.1" + wordwrap "^1.0.0" + optionalDependencies: + uglify-js "^3.1.4" + + har-schema@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" + integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= + + har-validator@~5.1.3: + version "5.1.5" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.5.tgz#1f0803b9f8cb20c0fa13822df1ecddb36bde1efd" + integrity sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w== + dependencies: + ajv "^6.12.3" + har-schema "^2.0.0" + + hardhat-deploy-ethers@^0.3.0-beta.7: + version "0.3.0-beta.7" + resolved "https://registry.yarnpkg.com/hardhat-deploy-ethers/-/hardhat-deploy-ethers-0.3.0-beta.7.tgz#860d86b84ed3c4fdef64283ccf1e8d5623454d02" + integrity sha512-JKMNte6vudu9LSNqgmBtNxc1gfxp3NUcPKVAf/FANHfl9pa/mBGg6hpQO7tD8CLkAbe6f4K5BjyYIPWX3p7MKw== + + hardhat-deploy@^0.7.0-beta.47: + version "0.7.0-beta.47" + resolved "https://registry.yarnpkg.com/hardhat-deploy/-/hardhat-deploy-0.7.0-beta.47.tgz#974afd2c070e95437842b05bb24ade84962b4057" + integrity sha512-7YknSJ2o+ZsYMUtgNg1CW4pj++2cwOpDi4omyCXyktY9Plgudo9vNJwGHxgYU6bLQ6uhCGqICP4WL23beZGsZw== + dependencies: + "@ethersproject/abi" "^5.0.2" + "@ethersproject/abstract-signer" "^5.0.2" + "@ethersproject/address" "^5.0.2" + "@ethersproject/bignumber" "^5.0.5" + "@ethersproject/bytes" "^5.0.2" + "@ethersproject/contracts" "^5.0.2" + "@ethersproject/providers" "^5.0.5" + "@ethersproject/solidity" "^5.0.2" + "@ethersproject/transactions" "^5.0.2" + "@ethersproject/wallet" "^5.0.2" + "@types/qs" "^6.9.4" + axios "^0.21.1" + chalk "^4.1.0" + chokidar "^3.4.0" + debug "^4.1.1" + form-data "^3.0.0" + fs-extra "^9.0.0" + match-all "^1.2.6" + murmur-128 "^0.2.1" + qs "^6.9.4" + + hardhat-gas-reporter@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/hardhat-gas-reporter/-/hardhat-gas-reporter-1.0.4.tgz#59e3137e38e0dfeac2e4f90d5c74160b50ad4829" + integrity sha512-G376zKh81G3K9WtDA+SoTLWsoygikH++tD1E7llx+X7J+GbIqfwhDKKgvJjcnEesMrtR9UqQHK02lJuXY1RTxw== + dependencies: + eth-gas-reporter "^0.2.20" + sha1 "^1.1.1" + + hardhat@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.1.2.tgz#a2128b71b0fb216ffc978c85a2030835b4e306ea" + integrity sha512-42iOheDsDl6Gr7sBfpA0S+bQUIcXSDEUrrqmnFEcBHx9qBoQad3s212y2ODmmkdLt+PqqTM+Mq8N3bZDTdjoLg== + dependencies: + "@nomiclabs/ethereumjs-vm" "4.2.2" + "@sentry/node" "^5.18.1" + "@solidity-parser/parser" "^0.11.0" + "@types/bn.js" "^4.11.5" + "@types/lru-cache" "^5.1.0" + abort-controller "^3.0.0" + adm-zip "^0.4.16" + ansi-escapes "^4.3.0" + chalk "^2.4.2" + chokidar "^3.4.0" + ci-info "^2.0.0" + debug "^4.1.1" + enquirer "^2.3.0" + env-paths "^2.2.0" + eth-sig-util "^2.5.2" + ethereum-cryptography "^0.1.2" + ethereumjs-abi "^0.6.8" + ethereumjs-account "^3.0.0" + ethereumjs-block "^2.2.2" + ethereumjs-common "^1.5.0" + ethereumjs-tx "^2.1.2" + ethereumjs-util "^6.2.0" + find-up "^2.1.0" + fp-ts "1.19.3" + fs-extra "^7.0.1" + glob "^7.1.3" + immutable "^4.0.0-rc.12" + io-ts "1.10.4" + lodash "^4.17.11" + merkle-patricia-tree "3.0.0" + mnemonist "^0.38.0" + mocha "^7.1.2" + node-fetch "^2.6.0" + qs "^6.7.0" + raw-body "^2.4.1" + resolve "1.17.0" + semver "^6.3.0" + slash "^3.0.0" + solc "0.7.3" + source-map-support "^0.5.13" + stacktrace-parser "^0.1.10" + "true-case-path" "^2.2.1" + tsort "0.0.1" + uuid "^3.3.2" + ws "^7.2.1" + + has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + integrity sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE= + dependencies: + ansi-regex "^2.0.0" + + has-bigints@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.1.tgz#64fe6acb020673e3b78db035a5af69aa9d07b113" + integrity sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA== + + has-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" + integrity sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo= + + has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= + + has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + + has-symbol-support-x@^1.4.1: + version "1.4.2" + resolved "https://registry.yarnpkg.com/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz#1409f98bc00247da45da67cee0a36f282ff26455" + integrity sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw== + + has-symbols@^1.0.0, has-symbols@^1.0.1, has-symbols@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.2.tgz#165d3070c00309752a1236a479331e3ac56f1423" + integrity sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw== + + has-to-string-tag-x@^1.2.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz#a045ab383d7b4b2012a00148ab0aa5f290044d4d" + integrity sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw== + dependencies: + has-symbol-support-x "^1.4.1" + + has-value@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" + integrity sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8= + dependencies: + get-value "^2.0.3" + has-values "^0.1.4" + isobject "^2.0.0" + + has-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" + integrity sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc= + dependencies: + get-value "^2.0.6" + has-values "^1.0.0" + isobject "^3.0.0" + + has-values@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" + integrity sha1-bWHeldkd/Km5oCCJrThL/49it3E= + + has-values@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" + integrity sha1-lbC2P+whRmGab+V/51Yo1aOe/k8= + dependencies: + is-number "^3.0.0" + kind-of "^4.0.0" + + has@^1.0.3, has@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + dependencies: + function-bind "^1.1.1" + + hash-base@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.1.0.tgz#55c381d9e06e1d2997a883b4a3fddfe7f0d3af33" + integrity sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA== + dependencies: + inherits "^2.0.4" + readable-stream "^3.6.0" + safe-buffer "^5.2.0" + + hash.js@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.3.tgz#340dedbe6290187151c1ea1d777a3448935df846" + integrity sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA== + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.0" + + hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" + integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.1" + + he@1.2.0, he@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" + integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== + + heap@0.2.6: + version "0.2.6" + resolved "https://registry.yarnpkg.com/heap/-/heap-0.2.6.tgz#087e1f10b046932fc8594dd9e6d378afc9d1e5ac" + integrity sha1-CH4fELBGky/IWU3Z5tN4r8nR5aw= + + highlight.js@^10.4.0, highlight.js@^10.4.1: + version "10.7.0" + resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-10.7.0.tgz#2b4232f45f000a72ae6ef05fe83b831d75add6cb" + integrity sha512-2omq9bKvr0BkwZRLhyjoDd1muuuMsacFY2qoIt/Eu8JoZyJaGm8oQKviiOC/QbJqEeZp9c0BikDr0Jz4kWd8Ag== + + highlightjs-solidity@^1.0.21: + version "1.0.21" + resolved "https://registry.yarnpkg.com/highlightjs-solidity/-/highlightjs-solidity-1.0.21.tgz#6d257215b5b635231d4d0c523f2c419bbff6fe42" + integrity sha512-ozOtTD986CBIxuIuauzz2lqCOTpd27TbfYm+msMtNSB69mJ0cdFNvZ6rOO5iFtEHtDkVYVEFQywXffG2sX3XTw== + + hmac-drbg@^1.0.0, hmac-drbg@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" + integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= + dependencies: + hash.js "^1.0.3" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.1" + + home-or-tmp@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" + integrity sha1-42w/LSyufXRqhX440Y1fMqeILbg= + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.1" + + hosted-git-info@^2.1.4, hosted-git-info@^2.6.0: + version "2.8.8" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488" + integrity sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg== + + htmlparser2@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-6.0.1.tgz#422521231ef6d42e56bd411da8ba40aa36e91446" + integrity sha512-GDKPd+vk4jvSuvCbyuzx/unmXkk090Azec7LovXP8as1Hn8q9p3hbjmDGbUqqhknw0ajwit6LiiWqfiTUPMK7w== + dependencies: + domelementtype "^2.0.1" + domhandler "^4.0.0" + domutils "^2.4.4" + entities "^2.0.0" + + http-basic@^8.1.1: + version "8.1.3" + resolved "https://registry.yarnpkg.com/http-basic/-/http-basic-8.1.3.tgz#a7cabee7526869b9b710136970805b1004261bbf" + integrity sha512-/EcDMwJZh3mABI2NhGfHOGOeOZITqfkEO4p/xK+l3NpyncIHUQBoMvCSF/b5GqvKtySC2srL/GGG3+EtlqlmCw== + dependencies: + caseless "^0.12.0" + concat-stream "^1.6.2" + http-response-object "^3.0.1" + parse-cache-control "^1.0.1" + + http-cache-semantics@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390" + integrity sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ== + + http-errors@1.7.2: + version "1.7.2" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.2.tgz#4f5029cf13239f31036e5b2e55292bcfbcc85c8f" + integrity sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg== + dependencies: + depd "~1.1.2" + inherits "2.0.3" + setprototypeof "1.1.1" + statuses ">= 1.5.0 < 2" + toidentifier "1.0.0" + + http-errors@1.7.3, http-errors@~1.7.2: + version "1.7.3" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.3.tgz#6c619e4f9c60308c38519498c14fbb10aacebb06" + integrity sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw== + dependencies: + depd "~1.1.2" + inherits "2.0.4" + setprototypeof "1.1.1" + statuses ">= 1.5.0 < 2" + toidentifier "1.0.0" + + http-https@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/http-https/-/http-https-1.0.0.tgz#2f908dd5f1db4068c058cd6e6d4ce392c913389b" + integrity sha1-L5CN1fHbQGjAWM1ubUzjkskTOJs= + + http-response-object@^3.0.1: + version "3.0.2" + resolved "https://registry.yarnpkg.com/http-response-object/-/http-response-object-3.0.2.tgz#7f435bb210454e4360d074ef1f989d5ea8aa9810" + integrity sha512-bqX0XTF6fnXSQcEJ2Iuyr75yVakyjIDCqroJQ/aHfSdlM743Cwqoi2nDYMzLGWUcuTWGWy8AAvOKXTfiv6q9RA== + dependencies: + "@types/node" "^10.0.3" + + http-signature@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" + integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= + dependencies: + assert-plus "^1.0.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + + https-proxy-agent@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz#e2a90542abb68a762e0a0850f6c9edadfd8506b2" + integrity sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA== + dependencies: + agent-base "6" + debug "4" + + iconv-lite@0.4.24, iconv-lite@^0.4.24: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + + iconv-lite@^0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.2.tgz#ce13d1875b0c3a674bd6a04b7f76b01b1b6ded01" + integrity sha512-2y91h5OpQlolefMPmUlivelittSWy0rP+oYVpn6A7GwVHNE8AWzoYOBNmlwks3LobaJxgHCYZAnyNo2GgpNRNQ== + dependencies: + safer-buffer ">= 2.1.2 < 3.0.0" + + idna-uts46-hx@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz#a1dc5c4df37eee522bf66d969cc980e00e8711f9" + integrity sha512-PWoF9Keq6laYdIRwwCdhTPl60xRqAloYNMQLiyUnG42VjT53oW07BXIRM+NK7eQjzXjAk2gUvX9caRxlnF9TAA== + dependencies: + punycode "2.1.0" + + ieee754@^1.1.13: + version "1.2.1" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" + integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== + + ignore@^4.0.6: + version "4.0.6" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" + integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== + + ignore@^5.1.1, ignore@^5.1.4: + version "5.1.8" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" + integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== + + immediate@^3.2.3: + version "3.3.0" + resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.3.0.tgz#1aef225517836bcdf7f2a2de2600c79ff0269266" + integrity sha512-HR7EVodfFUdQCTIeySw+WDRFJlPcLOJbXfwwZ7Oom6tjsvZ3bOkCDJHehQC3nxJrv7+f9XecwazynjU8e4Vw3Q== + + immediate@~3.2.3: + version "3.2.3" + resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.2.3.tgz#d140fa8f614659bd6541233097ddaac25cdd991c" + integrity sha1-0UD6j2FGWb1lQSMwl92qwlzdmRw= + + immutable@^4.0.0-rc.12: + version "4.0.0-rc.12" + resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.0.0-rc.12.tgz#ca59a7e4c19ae8d9bf74a97bdf0f6e2f2a5d0217" + integrity sha512-0M2XxkZLx/mi3t8NVwIm1g8nHoEmM9p9UBl/G9k4+hm0kBgOVdMV/B3CY5dQ8qG8qc80NN4gDV4HQv6FTJ5q7A== + + import-fresh@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-2.0.0.tgz#d81355c15612d386c61f9ddd3922d4304822a546" + integrity sha1-2BNVwVYS04bGH53dOSLUMEgipUY= + dependencies: + caller-path "^2.0.0" + resolve-from "^3.0.0" + + import-fresh@^3.0.0, import-fresh@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.2.1.tgz#633ff618506e793af5ac91bf48b72677e15cbe66" + integrity sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ== + dependencies: + parent-module "^1.0.0" + resolve-from "^4.0.0" + + imul@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/imul/-/imul-1.0.1.tgz#9d5867161e8b3de96c2c38d5dc7cb102f35e2ac9" + integrity sha1-nVhnFh6LPelsLDjV3HyxAvNeKsk= + + imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= + + inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + dependencies: + once "^1.3.0" + wrappy "1" + + inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3, inherits@~2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + + inherits@2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= + + ini@^1.3.5: + version "1.3.8" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" + integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== + + inquirer@^6.2.2: + version "6.5.2" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.5.2.tgz#ad50942375d036d327ff528c08bd5fab089928ca" + integrity sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ== + dependencies: + ansi-escapes "^3.2.0" + chalk "^2.4.2" + cli-cursor "^2.1.0" + cli-width "^2.0.0" + external-editor "^3.0.3" + figures "^2.0.0" + lodash "^4.17.12" + mute-stream "0.0.7" + run-async "^2.2.0" + rxjs "^6.4.0" + string-width "^2.1.0" + strip-ansi "^5.1.0" + through "^2.3.6" + + interpret@^1.0.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" + integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA== + + invariant@^2.2.2: + version "2.2.4" + resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" + integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== + dependencies: + loose-envify "^1.0.0" + + invert-kv@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" + integrity sha1-EEqOSqym09jNFXqO+L+rLXo//bY= + + invert-kv@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-2.0.0.tgz#7393f5afa59ec9ff5f67a27620d11c226e3eec02" + integrity sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA== + + io-ts@1.10.4: + version "1.10.4" + resolved "https://registry.yarnpkg.com/io-ts/-/io-ts-1.10.4.tgz#cd5401b138de88e4f920adbcb7026e2d1967e6e2" + integrity sha512-b23PteSnYXSONJ6JQXRAlvJhuw8KOtkqa87W4wDtvMrud/DTJd5X+NpOOI+O/zZwVq6v0VLAaJ+1EDViKEuN9g== + dependencies: + fp-ts "^1.0.0" + + ipaddr.js@1.9.1: + version "1.9.1" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" + integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== + + is-accessor-descriptor@^0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" + integrity sha1-qeEss66Nh2cn7u84Q/igiXtcmNY= + dependencies: + kind-of "^3.0.2" + + is-accessor-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" + integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== + dependencies: + kind-of "^6.0.0" + + is-arguments@^1.0.4: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.0.tgz#62353031dfbee07ceb34656a6bde59efecae8dd9" + integrity sha512-1Ij4lOMPl/xB5kBDn7I+b2ttPMKa8szhEIrXDuXQD/oe3HJLTLhqhgGspwgyGd6MOywBUqVvYicF72lkgDnIHg== + dependencies: + call-bind "^1.0.0" + + is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= + + is-bigint@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.1.tgz#6923051dfcbc764278540b9ce0e6b3213aa5ebc2" + integrity sha512-J0ELF4yHFxHy0cmSxZuheDOz2luOdVvqjwmEcj8H/L1JHeuEDSDbeRP+Dk9kFVk5RTFzbucJ2Kb9F7ixY2QaCg== + + is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + dependencies: + binary-extensions "^2.0.0" + + is-boolean-object@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.0.tgz#e2aaad3a3a8fca34c28f6eee135b156ed2587ff0" + integrity sha512-a7Uprx8UtD+HWdyYwnD1+ExtTgqQtD2k/1yJgtXP6wnMm8byhkoTZRl+95LLThpzNZJ5aEvi46cdH+ayMFRwmA== + dependencies: + call-bind "^1.0.0" + + is-buffer@^1.1.5: + version "1.1.6" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== + + is-buffer@~2.0.3: + version "2.0.5" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.5.tgz#ebc252e400d22ff8d77fa09888821a24a658c191" + integrity sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ== + + is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.3.tgz#8b1e0500b73a1d76c70487636f368e519de8db8e" + integrity sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ== + + is-ci@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c" + integrity sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w== + dependencies: + ci-info "^2.0.0" + + is-core-module@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.2.0.tgz#97037ef3d52224d85163f5597b2b63d9afed981a" + integrity sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ== + dependencies: + has "^1.0.3" + + is-data-descriptor@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" + integrity sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y= + dependencies: + kind-of "^3.0.2" + + is-data-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" + integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== + dependencies: + kind-of "^6.0.0" + + is-date-object@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.2.tgz#bda736f2cd8fd06d32844e7743bfa7494c3bfd7e" + integrity sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g== + + is-descriptor@^0.1.0: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" + integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg== + dependencies: + is-accessor-descriptor "^0.1.6" + is-data-descriptor "^0.1.4" + kind-of "^5.0.0" + + is-descriptor@^1.0.0, is-descriptor@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" + integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg== + dependencies: + is-accessor-descriptor "^1.0.0" + is-data-descriptor "^1.0.0" + kind-of "^6.0.2" + + is-directory@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" + integrity sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE= + + is-docker@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.1.1.tgz#4125a88e44e450d384e09047ede71adc2d144156" + integrity sha512-ZOoqiXfEwtGknTiuDEy8pN2CfE3TxMHprvNer1mXiqwkOT77Rw3YVrUQ52EqAOU3QAWDQ+bQdx7HJzrv7LS2Hw== + + is-extendable@^0.1.0, is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= + + is-extendable@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" + integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== + dependencies: + is-plain-object "^2.0.4" + + is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= + + is-finite@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.1.0.tgz#904135c77fb42c0641d6aa1bcdbc4daa8da082f3" + integrity sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w== + + is-fn@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fn/-/is-fn-1.0.0.tgz#9543d5de7bcf5b08a22ec8a20bae6e286d510d8c" + integrity sha1-lUPV3nvPWwiiLsiiC65uKG1RDYw= + + is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + integrity sha1-754xOG8DGn8NZDr4L95QxFfvAMs= + dependencies: + number-is-nan "^1.0.0" + + is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= + + is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + + is-function@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-function/-/is-function-1.0.2.tgz#4f097f30abf6efadac9833b17ca5dc03f8144e08" + integrity sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ== + + is-generator-function@^1.0.7: + version "1.0.8" + resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.8.tgz#dfb5c2b120e02b0a8d9d2c6806cd5621aa922f7b" + integrity sha512-2Omr/twNtufVZFr1GhxjOMFPAj2sjc/dKaIqBhvo4qciXfJmITGH6ZGd8eZYNHza8t1y0e01AuqRhJwfWp26WQ== + + is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" + integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== + dependencies: + is-extglob "^2.1.1" + + is-hex-prefixed@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz#7d8d37e6ad77e5d127148913c573e082d777f554" + integrity sha1-fY035q135dEnFIkTxXPggtd39VQ= + + is-negative-zero@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.1.tgz#3de746c18dda2319241a53675908d8f766f11c24" + integrity sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w== + + is-number-object@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.4.tgz#36ac95e741cf18b283fc1ddf5e83da798e3ec197" + integrity sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw== + + is-number@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" + integrity sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU= + dependencies: + kind-of "^3.0.2" + + is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + + is-object@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.1.tgz#8952688c5ec2ffd6b03ecc85e769e02903083470" + integrity sha1-iVJojF7C/9awPsyF52ngKQMINHA= + + is-plain-obj@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" + integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4= + + is-plain-obj@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" + integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== + + is-plain-object@^2.0.3, is-plain-object@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== + dependencies: + isobject "^3.0.1" + + is-regex@^1.0.4, is-regex@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.2.tgz#81c8ebde4db142f2cf1c53fc86d6a45788266251" + integrity sha512-axvdhb5pdhEVThqJzYXwMlVuZwC+FF2DpcOhTS+y/8jVq4trxyPgfcwIxIKiyeuLlSQYKkmUaPQJ8ZE4yNKXDg== + dependencies: + call-bind "^1.0.2" + has-symbols "^1.0.1" + + is-regex@~1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.5.tgz#39d589a358bf18967f726967120b8fc1aed74eae" + integrity sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ== + dependencies: + has "^1.0.3" + + is-retry-allowed@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz#d778488bd0a4666a3be8a1482b9f2baafedea8b4" + integrity sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg== + + is-stream@^1.0.0, is-stream@^1.0.1, is-stream@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= + + is-string@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.5.tgz#40493ed198ef3ff477b8c7f92f644ec82a5cd3a6" + integrity sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ== + + is-symbol@^1.0.2, is-symbol@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.3.tgz#38e1014b9e6329be0de9d24a414fd7441ec61937" + integrity sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ== + dependencies: + has-symbols "^1.0.1" + + is-typed-array@^1.1.3: + version "1.1.5" + resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.5.tgz#f32e6e096455e329eb7b423862456aa213f0eb4e" + integrity sha512-S+GRDgJlR3PyEbsX/Fobd9cqpZBuvUS+8asRqYDMLCb2qMzt1oz5m5oxQCxOgUDxiWsOVNi4yaF+/uvdlHlYug== + dependencies: + available-typed-arrays "^1.0.2" + call-bind "^1.0.2" + es-abstract "^1.18.0-next.2" + foreach "^2.0.5" + has-symbols "^1.0.1" + + is-typedarray@^1.0.0, is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= + + is-url@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/is-url/-/is-url-1.2.4.tgz#04a4df46d28c4cff3d73d01ff06abeb318a1aa52" + integrity sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww== + + is-utf8@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" + integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI= + + is-windows@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" + integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== + + is-wsl@^2.1.1: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" + integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== + dependencies: + is-docker "^2.0.0" + + isarray@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8= + + isarray@1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= + + isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= + + isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= + dependencies: + isarray "1.0.0" + + isobject@^3.0.0, isobject@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= + + isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= + + isurl@^1.0.0-alpha5: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isurl/-/isurl-1.0.0.tgz#b27f4f49f3cdaa3ea44a0a5b7f3462e6edc39d67" + integrity sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w== + dependencies: + has-to-string-tag-x "^1.2.0" + is-object "^1.0.1" + + js-sha3@0.5.7, js-sha3@^0.5.7: + version "0.5.7" + resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.5.7.tgz#0d4ffd8002d5333aabaf4a23eed2f6374c9f28e7" + integrity sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc= + + js-sha3@0.8.0, js-sha3@^0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" + integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== + + "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + + js-tokens@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" + integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= + + js-yaml@3.13.1: + version "3.13.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" + integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + + js-yaml@3.14.0, js-yaml@^3.12.0, js-yaml@^3.13.0, js-yaml@^3.13.1: + version "3.14.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.0.tgz#a7a34170f26a21bb162424d8adacb4113a69e482" + integrity sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + + js-yaml@3.x: + version "3.14.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" + integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + + jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= + + jsesc@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" + integrity sha1-RsP+yMGJKxKwgz25vHYiF226s0s= + + jsesc@~0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" + integrity sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0= + + json-buffer@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" + integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg= + + json-parse-better-errors@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" + integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== + + json-rpc-engine@^3.4.0, json-rpc-engine@^3.6.0: + version "3.8.0" + resolved "https://registry.yarnpkg.com/json-rpc-engine/-/json-rpc-engine-3.8.0.tgz#9d4ff447241792e1d0a232f6ef927302bb0c62a9" + integrity sha512-6QNcvm2gFuuK4TKU1uwfH0Qd/cOSb9c1lls0gbnIhciktIUQJwz6NQNAW4B1KiGPenv7IKu97V222Yo1bNhGuA== + dependencies: + async "^2.0.1" + babel-preset-env "^1.7.0" + babelify "^7.3.0" + json-rpc-error "^2.0.0" + promise-to-callback "^1.0.0" + safe-event-emitter "^1.0.1" + + json-rpc-error@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/json-rpc-error/-/json-rpc-error-2.0.0.tgz#a7af9c202838b5e905c7250e547f1aff77258a02" + integrity sha1-p6+cICg4tekFxyUOVH8a/3cligI= + dependencies: + inherits "^2.0.1" + + json-rpc-random-id@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-rpc-random-id/-/json-rpc-random-id-1.0.1.tgz#ba49d96aded1444dbb8da3d203748acbbcdec8c8" + integrity sha1-uknZat7RRE27jaPSA3SKy7zeyMg= + + json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + + json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= + + json-stable-stringify-without-jsonify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= + + json-stable-stringify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" + integrity sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8= + dependencies: + jsonify "~0.0.0" + + json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= + + json5@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" + integrity sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE= + + jsonfile@^2.1.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" + integrity sha1-NzaitCi4e72gzIO1P6PWM6NcKug= + optionalDependencies: + graceful-fs "^4.1.6" + + jsonfile@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" + integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss= + optionalDependencies: + graceful-fs "^4.1.6" + + jsonfile@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.0.1.tgz#98966cba214378c8c84b82e085907b40bf614179" + integrity sha512-jR2b5v7d2vIOust+w3wtFKZIfpC2pnRmFAhAC/BuweZFQR8qZzxH1OyrQ10HmdVYiXWkYUqPVsz91cG7EL2FBg== + dependencies: + universalify "^1.0.0" + optionalDependencies: + graceful-fs "^4.1.6" + + jsonify@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" + integrity sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM= + + jsonschema@^1.2.4: + version "1.4.0" + resolved "https://registry.yarnpkg.com/jsonschema/-/jsonschema-1.4.0.tgz#1afa34c4bc22190d8e42271ec17ac8b3404f87b2" + integrity sha512-/YgW6pRMr6M7C+4o8kS+B/2myEpHCrxO4PEWnqJNBFMjn7EWXqlQ4tGwL6xTHeRplwuZmcAncdvfOad1nT2yMw== + + jsprim@^1.2.2: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" + integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= + dependencies: + assert-plus "1.0.0" + extsprintf "1.3.0" + json-schema "0.2.3" + verror "1.10.0" + + just-extend@^4.0.2: + version "4.1.1" + resolved "https://registry.yarnpkg.com/just-extend/-/just-extend-4.1.1.tgz#158f1fdb01f128c411dc8b286a7b4837b3545282" + integrity sha512-aWgeGFW67BP3e5181Ep1Fv2v8z//iBJfrvyTnq8wG86vEESwmonn1zPBJ0VfmT9CJq2FIT0VsETtrNFm2a+SHA== + + keccak@3.0.1, keccak@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/keccak/-/keccak-3.0.1.tgz#ae30a0e94dbe43414f741375cff6d64c8bea0bff" + integrity sha512-epq90L9jlFWCW7+pQa6JOnKn2Xgl2mtI664seYR6MHskvI9agt7AnDqmAlp9TqU4/caMYbA08Hi5DMZAl5zdkA== + dependencies: + node-addon-api "^2.0.0" + node-gyp-build "^4.2.0" + + keccak@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/keccak/-/keccak-2.1.0.tgz#734ea53f2edcfd0f42cdb8d5f4c358fef052752b" + integrity sha512-m1wbJRTo+gWbctZWay9i26v5fFnYkOn7D5PCxJ3fZUGUEb49dE1Pm4BREUYCt/aoO6di7jeoGmhvqN9Nzylm3Q== + dependencies: + bindings "^1.5.0" + inherits "^2.0.4" + nan "^2.14.0" + safe-buffer "^5.2.0" + + keyv@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.1.0.tgz#ecc228486f69991e49e9476485a5be1e8fc5c4d9" + integrity sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA== + dependencies: + json-buffer "3.0.0" + + kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= + dependencies: + is-buffer "^1.1.5" + + kind-of@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" + integrity sha1-IIE989cSkosgc3hpGkUGb65y3Vc= + dependencies: + is-buffer "^1.1.5" + + kind-of@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" + integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== + + kind-of@^6.0.0, kind-of@^6.0.2: + version "6.0.3" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" + integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== + + klaw-sync@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/klaw-sync/-/klaw-sync-6.0.0.tgz#1fd2cfd56ebb6250181114f0a581167099c2b28c" + integrity sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ== + dependencies: + graceful-fs "^4.1.11" + + klaw@^1.0.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439" + integrity sha1-QIhDO0azsbolnXh4XY6W9zugJDk= + optionalDependencies: + graceful-fs "^4.1.9" + + lcid@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" + integrity sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU= + dependencies: + invert-kv "^1.0.0" + + lcid@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-2.0.0.tgz#6ef5d2df60e52f82eb228a4c373e8d1f397253cf" + integrity sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA== + dependencies: + invert-kv "^2.0.0" + + level-codec@^9.0.0: + version "9.0.2" + resolved "https://registry.yarnpkg.com/level-codec/-/level-codec-9.0.2.tgz#fd60df8c64786a80d44e63423096ffead63d8cbc" + integrity sha512-UyIwNb1lJBChJnGfjmO0OR+ezh2iVu1Kas3nvBS/BzGnx79dv6g7unpKIDNPMhfdTEGoc7mC8uAu51XEtX+FHQ== + dependencies: + buffer "^5.6.0" + + level-codec@~7.0.0: + version "7.0.1" + resolved "https://registry.yarnpkg.com/level-codec/-/level-codec-7.0.1.tgz#341f22f907ce0f16763f24bddd681e395a0fb8a7" + integrity sha512-Ua/R9B9r3RasXdRmOtd+t9TCOEIIlts+TN/7XTT2unhDaL6sJn83S3rUyljbr6lVtw49N3/yA0HHjpV6Kzb2aQ== + + level-errors@^1.0.3: + version "1.1.2" + resolved "https://registry.yarnpkg.com/level-errors/-/level-errors-1.1.2.tgz#4399c2f3d3ab87d0625f7e3676e2d807deff404d" + integrity sha512-Sw/IJwWbPKF5Ai4Wz60B52yj0zYeqzObLh8k1Tk88jVmD51cJSKWSYpRyhVIvFzZdvsPqlH5wfhp/yxdsaQH4w== + dependencies: + errno "~0.1.1" + + level-errors@^2.0.0, level-errors@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/level-errors/-/level-errors-2.0.1.tgz#2132a677bf4e679ce029f517c2f17432800c05c8" + integrity sha512-UVprBJXite4gPS+3VznfgDSU8PTRuVX0NXwoWW50KLxd2yw4Y1t2JUR5In1itQnudZqRMT9DlAM3Q//9NCjCFw== + dependencies: + errno "~0.1.1" + + level-errors@~1.0.3: + version "1.0.5" + resolved "https://registry.yarnpkg.com/level-errors/-/level-errors-1.0.5.tgz#83dbfb12f0b8a2516bdc9a31c4876038e227b859" + integrity sha512-/cLUpQduF6bNrWuAC4pwtUKA5t669pCsCi2XbmojG2tFeOr9j6ShtdDCtFFQO1DRt+EVZhx9gPzP9G2bUaG4ig== + dependencies: + errno "~0.1.1" + + level-iterator-stream@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/level-iterator-stream/-/level-iterator-stream-2.0.3.tgz#ccfff7c046dcf47955ae9a86f46dfa06a31688b4" + integrity sha512-I6Heg70nfF+e5Y3/qfthJFexhRw/Gi3bIymCoXAlijZdAcLaPuWSJs3KXyTYf23ID6g0o2QF62Yh+grOXY3Rig== + dependencies: + inherits "^2.0.1" + readable-stream "^2.0.5" + xtend "^4.0.0" + + level-iterator-stream@~1.3.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/level-iterator-stream/-/level-iterator-stream-1.3.1.tgz#e43b78b1a8143e6fa97a4f485eb8ea530352f2ed" + integrity sha1-5Dt4sagUPm+pek9IXrjqUwNS8u0= + dependencies: + inherits "^2.0.1" + level-errors "^1.0.3" + readable-stream "^1.0.33" + xtend "^4.0.0" + + level-iterator-stream@~3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/level-iterator-stream/-/level-iterator-stream-3.0.1.tgz#2c98a4f8820d87cdacab3132506815419077c730" + integrity sha512-nEIQvxEED9yRThxvOrq8Aqziy4EGzrxSZK+QzEFAVuJvQ8glfyZ96GB6BoI4sBbLfjMXm2w4vu3Tkcm9obcY0g== + dependencies: + inherits "^2.0.1" + readable-stream "^2.3.6" + xtend "^4.0.0" + + level-mem@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/level-mem/-/level-mem-3.0.1.tgz#7ce8cf256eac40f716eb6489654726247f5a89e5" + integrity sha512-LbtfK9+3Ug1UmvvhR2DqLqXiPW1OJ5jEh0a3m9ZgAipiwpSxGj/qaVVy54RG5vAQN1nCuXqjvprCuKSCxcJHBg== + dependencies: + level-packager "~4.0.0" + memdown "~3.0.0" + + level-packager@~4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/level-packager/-/level-packager-4.0.1.tgz#7e7d3016af005be0869bc5fa8de93d2a7f56ffe6" + integrity sha512-svCRKfYLn9/4CoFfi+d8krOtrp6RoX8+xm0Na5cgXMqSyRru0AnDYdLl+YI8u1FyS6gGZ94ILLZDE5dh2but3Q== + dependencies: + encoding-down "~5.0.0" + levelup "^3.0.0" + + level-post@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/level-post/-/level-post-1.0.7.tgz#19ccca9441a7cc527879a0635000f06d5e8f27d0" + integrity sha512-PWYqG4Q00asOrLhX7BejSajByB4EmG2GaKHfj3h5UmmZ2duciXLPGYWIjBzLECFWUGOZWlm5B20h/n3Gs3HKew== + dependencies: + ltgt "^2.1.2" + + level-sublevel@6.6.4: + version "6.6.4" + resolved "https://registry.yarnpkg.com/level-sublevel/-/level-sublevel-6.6.4.tgz#f7844ae893919cd9d69ae19d7159499afd5352ba" + integrity sha512-pcCrTUOiO48+Kp6F1+UAzF/OtWqLcQVTVF39HLdZ3RO8XBoXt+XVPKZO1vVr1aUoxHZA9OtD2e1v7G+3S5KFDA== + dependencies: + bytewise "~1.1.0" + level-codec "^9.0.0" + level-errors "^2.0.0" + level-iterator-stream "^2.0.3" + ltgt "~2.1.1" + pull-defer "^0.2.2" + pull-level "^2.0.3" + pull-stream "^3.6.8" + typewiselite "~1.0.0" + xtend "~4.0.0" + + level-ws@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/level-ws/-/level-ws-0.0.0.tgz#372e512177924a00424b0b43aef2bb42496d228b" + integrity sha1-Ny5RIXeSSgBCSwtDrvK7QkltIos= + dependencies: + readable-stream "~1.0.15" + xtend "~2.1.1" + + level-ws@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/level-ws/-/level-ws-1.0.0.tgz#19a22d2d4ac57b18cc7c6ecc4bd23d899d8f603b" + integrity sha512-RXEfCmkd6WWFlArh3X8ONvQPm8jNpfA0s/36M4QzLqrLEIt1iJE9WBHLZ5vZJK6haMjJPJGJCQWfjMNnRcq/9Q== + dependencies: + inherits "^2.0.3" + readable-stream "^2.2.8" + xtend "^4.0.1" + + levelup@3.1.1, levelup@^3.0.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/levelup/-/levelup-3.1.1.tgz#c2c0b3be2b4dc316647c53b42e2f559e232d2189" + integrity sha512-9N10xRkUU4dShSRRFTBdNaBxofz+PGaIZO962ckboJZiNmLuhVT6FZ6ZKAsICKfUBO76ySaYU6fJWX/jnj3Lcg== + dependencies: + deferred-leveldown "~4.0.0" + level-errors "~2.0.0" + level-iterator-stream "~3.0.0" + xtend "~4.0.0" + + levelup@^1.2.1: + version "1.3.9" + resolved "https://registry.yarnpkg.com/levelup/-/levelup-1.3.9.tgz#2dbcae845b2bb2b6bea84df334c475533bbd82ab" + integrity sha512-VVGHfKIlmw8w1XqpGOAGwq6sZm2WwWLmlDcULkKWQXEA5EopA8OBNJ2Ck2v6bdk8HeEZSbCSEgzXadyQFm76sQ== + dependencies: + deferred-leveldown "~1.2.1" + level-codec "~7.0.0" + level-errors "~1.0.3" + level-iterator-stream "~1.3.0" + prr "~1.0.1" + semver "~5.4.1" + xtend "~4.0.0" + + levn@^0.3.0, levn@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= + dependencies: + prelude-ls "~1.1.2" + type-check "~0.3.2" + + levn@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" + integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== + dependencies: + prelude-ls "^1.2.1" + type-check "~0.4.0" + + load-json-file@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" + integrity sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA= + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + pinkie-promise "^2.0.0" + strip-bom "^2.0.0" + + locate-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" + integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= + dependencies: + p-locate "^2.0.0" + path-exists "^3.0.0" + + locate-path@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" + integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== + dependencies: + p-locate "^3.0.0" + path-exists "^3.0.0" + + locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + dependencies: + p-locate "^5.0.0" + + lodash.assign@^4.0.3, lodash.assign@^4.0.6: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7" + integrity sha1-DZnzzNem0mHRm9rrkkUAXShYCOc= + + lodash.clonedeep@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" + integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8= + + lodash.escaperegexp@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz#64762c48618082518ac3df4ccf5d5886dae20347" + integrity sha1-ZHYsSGGAglGKw99Mz11YhtriA0c= + + lodash.get@^4.4.2: + version "4.4.2" + resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" + integrity sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk= + + lodash.merge@^4.6.2: + version "4.6.2" + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" + integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== + + lodash.partition@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.partition/-/lodash.partition-4.6.0.tgz#a38e46b73469e0420b0da1212e66d414be364ba4" + integrity sha1-o45GtzRp4EILDaEhLmbUFL42S6Q= + + lodash.sum@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/lodash.sum/-/lodash.sum-4.0.2.tgz#ad90e397965d803d4f1ff7aa5b2d0197f3b4637b" + integrity sha1-rZDjl5ZdgD1PH/eqWy0Bl/O0Y3s= + + lodash.toarray@^4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.toarray/-/lodash.toarray-4.4.0.tgz#24c4bfcd6b2fba38bfd0594db1179d8e9b656561" + integrity sha1-JMS/zWsvuji/0FlNsRedjptlZWE= + + lodash@4.17.20, lodash@^4.17.12, lodash@^4.17.19: + version "4.17.20" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52" + integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA== + + lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.21, lodash@^4.17.4: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + + log-symbols@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-3.0.0.tgz#f3a08516a5dea893336a7dee14d18a1cfdab77c4" + integrity sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ== + dependencies: + chalk "^2.4.2" + + log-symbols@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.0.0.tgz#69b3cc46d20f448eccdb75ea1fa733d9e821c920" + integrity sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA== + dependencies: + chalk "^4.0.0" + + looper@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/looper/-/looper-2.0.0.tgz#66cd0c774af3d4fedac53794f742db56da8f09ec" + integrity sha1-Zs0Md0rz1P7axTeU90LbVtqPCew= + + looper@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/looper/-/looper-3.0.0.tgz#2efa54c3b1cbaba9b94aee2e5914b0be57fbb749" + integrity sha1-LvpUw7HLq6m5Su4uWRSwvlf7t0k= + + loose-envify@^1.0.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" + integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== + dependencies: + js-tokens "^3.0.0 || ^4.0.0" + + lowercase-keys@^1.0.0, lowercase-keys@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" + integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA== + + lowercase-keys@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479" + integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== + + lru-cache@5.1.1, lru-cache@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" + integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== + dependencies: + yallist "^3.0.2" + + lru-cache@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-3.2.0.tgz#71789b3b7f5399bec8565dda38aa30d2a097efee" + integrity sha1-cXibO39Tmb7IVl3aOKow0qCX7+4= + dependencies: + pseudomap "^1.0.1" + + lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" + + lru_map@^0.3.3: + version "0.3.3" + resolved "https://registry.yarnpkg.com/lru_map/-/lru_map-0.3.3.tgz#b5c8351b9464cbd750335a79650a0ec0e56118dd" + integrity sha1-tcg1G5Rky9dQM1p5ZQoOwOVhGN0= + + ltgt@^2.1.2, ltgt@~2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ltgt/-/ltgt-2.2.1.tgz#f35ca91c493f7b73da0e07495304f17b31f87ee5" + integrity sha1-81ypHEk/e3PaDgdJUwTxezH4fuU= + + ltgt@~2.1.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ltgt/-/ltgt-2.1.3.tgz#10851a06d9964b971178441c23c9e52698eece34" + integrity sha1-EIUaBtmWS5cReEQcI8nlJpjuzjQ= + + make-error@^1.1.1: + version "1.3.6" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== + + map-age-cleaner@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz#7d583a7306434c055fe474b0f45078e6e1b4b92a" + integrity sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w== + dependencies: + p-defer "^1.0.0" + + map-cache@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" + integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= + + map-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" + integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48= + dependencies: + object-visit "^1.0.0" + + markdown-table@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/markdown-table/-/markdown-table-1.1.3.tgz#9fcb69bcfdb8717bfd0398c6ec2d93036ef8de60" + integrity sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q== + + match-all@^1.2.6: + version "1.2.6" + resolved "https://registry.yarnpkg.com/match-all/-/match-all-1.2.6.tgz#66d276ad6b49655551e63d3a6ee53e8be0566f8d" + integrity sha512-0EESkXiTkWzrQQntBu2uzKvLu6vVkUGz40nGPbSZuegcfE5UuSzNjLaIu76zJWuaT/2I3Z/8M06OlUOZLGwLlQ== + + md5.js@^1.3.4: + version "1.3.5" + resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" + integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + safe-buffer "^5.1.2" + + media-typer@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= + + mem@^4.0.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/mem/-/mem-4.3.0.tgz#461af497bc4ae09608cdb2e60eefb69bff744178" + integrity sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w== + dependencies: + map-age-cleaner "^0.1.1" + mimic-fn "^2.0.0" + p-is-promise "^2.0.0" + + memdown@^1.0.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/memdown/-/memdown-1.4.1.tgz#b4e4e192174664ffbae41361aa500f3119efe215" + integrity sha1-tOThkhdGZP+65BNhqlAPMRnv4hU= + dependencies: + abstract-leveldown "~2.7.1" + functional-red-black-tree "^1.0.1" + immediate "^3.2.3" + inherits "~2.0.1" + ltgt "~2.2.0" + safe-buffer "~5.1.1" + + memdown@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/memdown/-/memdown-3.0.0.tgz#93aca055d743b20efc37492e9e399784f2958309" + integrity sha512-tbV02LfZMWLcHcq4tw++NuqMO+FZX8tNJEiD2aNRm48ZZusVg5N8NART+dmBkepJVye986oixErf7jfXboMGMA== + dependencies: + abstract-leveldown "~5.0.0" + functional-red-black-tree "~1.0.1" + immediate "~3.2.3" + inherits "~2.0.1" + ltgt "~2.2.0" + safe-buffer "~5.1.1" + + memorystream@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/memorystream/-/memorystream-0.3.1.tgz#86d7090b30ce455d63fbae12dda51a47ddcaf9b2" + integrity sha1-htcJCzDORV1j+64S3aUaR93K+bI= + + merge-descriptors@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" + integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= + + merge2@^1.2.3, merge2@^1.3.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" + integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== + + merkle-patricia-tree@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/merkle-patricia-tree/-/merkle-patricia-tree-3.0.0.tgz#448d85415565df72febc33ca362b8b614f5a58f8" + integrity sha512-soRaMuNf/ILmw3KWbybaCjhx86EYeBbD8ph0edQCTed0JN/rxDt1EBN52Ajre3VyGo+91f8+/rfPIRQnnGMqmQ== + dependencies: + async "^2.6.1" + ethereumjs-util "^5.2.0" + level-mem "^3.0.1" + level-ws "^1.0.0" + readable-stream "^3.0.6" + rlp "^2.0.0" + semaphore ">=1.0.1" + + merkle-patricia-tree@^2.1.2, merkle-patricia-tree@^2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/merkle-patricia-tree/-/merkle-patricia-tree-2.3.2.tgz#982ca1b5a0fde00eed2f6aeed1f9152860b8208a" + integrity sha512-81PW5m8oz/pz3GvsAwbauj7Y00rqm81Tzad77tHBwU7pIAtN+TJnMSOJhxBKflSVYhptMMb9RskhqHqrSm1V+g== + dependencies: + async "^1.4.2" + ethereumjs-util "^5.0.0" + level-ws "0.0.0" + levelup "^1.2.1" + memdown "^1.0.0" + readable-stream "^2.0.0" + rlp "^2.0.0" + semaphore ">=1.0.1" + + methods@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" + integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= + + micromatch@^3.1.4: + version "3.1.10" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" + integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + braces "^2.3.1" + define-property "^2.0.2" + extend-shallow "^3.0.2" + extglob "^2.0.4" + fragment-cache "^0.2.1" + kind-of "^6.0.2" + nanomatch "^1.2.9" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.2" + + micromatch@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.2.tgz#4fcb0999bf9fbc2fcbdd212f6d629b9a56c39259" + integrity sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q== + dependencies: + braces "^3.0.1" + picomatch "^2.0.5" + + miller-rabin@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" + integrity sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA== + dependencies: + bn.js "^4.0.0" + brorand "^1.0.1" + + mime-db@1.44.0: + version "1.44.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92" + integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg== + + mime-types@^2.1.12, mime-types@^2.1.16, mime-types@~2.1.19, mime-types@~2.1.24: + version "2.1.27" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f" + integrity sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w== + dependencies: + mime-db "1.44.0" + + mime@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" + integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== + + mimic-fn@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" + integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== + + mimic-fn@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== + + mimic-response@^1.0.0, mimic-response@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" + integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== + + min-document@^2.19.0: + version "2.19.0" + resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685" + integrity sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU= + dependencies: + dom-walk "^0.1.0" + + min-indent@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" + integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg== + + minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" + integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== + + minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" + integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= + + "minimatch@2 || 3", minimatch@3.0.4, minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== + dependencies: + brace-expansion "^1.1.7" + + minimist@^1.2.0, minimist@^1.2.5, minimist@~1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" + integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== + + minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" + integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== + dependencies: + safe-buffer "^5.1.2" + yallist "^3.0.0" + + minizlib@^1.2.1: + version "1.3.3" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" + integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q== + dependencies: + minipass "^2.9.0" + + mixin-deep@^1.2.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" + integrity sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA== + dependencies: + for-in "^1.0.2" + is-extendable "^1.0.1" + + mkdirp-promise@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz#e9b8f68e552c68a9c1713b84883f7a1dd039b8a1" + integrity sha1-6bj2jlUsaKnBcTuEiD96HdA5uKE= + dependencies: + mkdirp "*" + + mkdirp@*: + version "1.0.4" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" + integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== + + mkdirp@0.5.5, mkdirp@0.5.x, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.1: + version "0.5.5" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" + integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== + dependencies: + minimist "^1.2.5" + + mnemonist@^0.38.0: + version "0.38.3" + resolved "https://registry.yarnpkg.com/mnemonist/-/mnemonist-0.38.3.tgz#35ec79c1c1f4357cfda2fe264659c2775ccd7d9d" + integrity sha512-2K9QYubXx/NAjv4VLq1d1Ly8pWNC5L3BrixtdkyTegXWJIqY+zLNDhhX/A+ZwWt70tB1S8H4BE8FLYEFyNoOBw== + dependencies: + obliterator "^1.6.1" + + mocha@^7.1.1, mocha@^7.1.2: + version "7.2.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-7.2.0.tgz#01cc227b00d875ab1eed03a75106689cfed5a604" + integrity sha512-O9CIypScywTVpNaRrCAgoUnJgozpIofjKUYmJhiCIJMiuYnLI6otcb1/kpW9/n/tJODHGZ7i8aLQoDVsMtOKQQ== + dependencies: + ansi-colors "3.2.3" + browser-stdout "1.3.1" + chokidar "3.3.0" + debug "3.2.6" + diff "3.5.0" + escape-string-regexp "1.0.5" + find-up "3.0.0" + glob "7.1.3" + growl "1.10.5" + he "1.2.0" + js-yaml "3.13.1" + log-symbols "3.0.0" + minimatch "3.0.4" + mkdirp "0.5.5" + ms "2.1.1" + node-environment-flags "1.0.6" + object.assign "4.1.0" + strip-json-comments "2.0.1" + supports-color "6.0.0" + which "1.3.1" + wide-align "1.1.3" + yargs "13.3.2" + yargs-parser "13.1.2" + yargs-unparser "1.6.0" + + mocha@^8.1.1: + version "8.2.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-8.2.0.tgz#f8aa79110b4b5a6580c65d4dd8083c425282624e" + integrity sha512-lEWEMq2LMfNJMKeuEwb5UELi+OgFDollXaytR5ggQcHpzG3NP/R7rvixAvF+9/lLsTWhWG+4yD2M70GsM06nxw== + dependencies: + "@ungap/promise-all-settled" "1.1.2" + ansi-colors "4.1.1" + browser-stdout "1.3.1" + chokidar "3.4.3" + debug "4.2.0" + diff "4.0.2" + escape-string-regexp "4.0.0" + find-up "5.0.0" + glob "7.1.6" + growl "1.10.5" + he "1.2.0" + js-yaml "3.14.0" + log-symbols "4.0.0" + minimatch "3.0.4" + ms "2.1.2" + nanoid "3.1.12" + serialize-javascript "5.0.1" + strip-json-comments "3.1.1" + supports-color "7.2.0" + which "2.0.2" + wide-align "1.1.3" + workerpool "6.0.2" + yargs "13.3.2" + yargs-parser "13.1.2" + yargs-unparser "2.0.0" + + mock-fs@^4.1.0: + version "4.13.0" + resolved "https://registry.yarnpkg.com/mock-fs/-/mock-fs-4.13.0.tgz#31c02263673ec3789f90eb7b6963676aa407a598" + integrity sha512-DD0vOdofJdoaRNtnWcrXe6RQbpHkPPmtqGq14uRX0F8ZKJ5nv89CVTYl/BZdppDxBDaV0hl75htg3abpEWlPZA== + + moment@^2.19.3: + version "2.29.1" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.1.tgz#b2be769fa31940be9eeea6469c075e35006fa3d3" + integrity sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ== + + ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= + + ms@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" + integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== + + ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + + ms@^2.1.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + + multibase@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/multibase/-/multibase-0.7.0.tgz#1adfc1c50abe05eefeb5091ac0c2728d6b84581b" + integrity sha512-TW8q03O0f6PNFTQDvh3xxH03c8CjGaaYrjkl9UQPG6rz53TQzzxJVCIWVjzcbN/Q5Y53Zd0IBQBMVktVgNx4Fg== + dependencies: + base-x "^3.0.8" + buffer "^5.5.0" + + multibase@~0.6.0: + version "0.6.1" + resolved "https://registry.yarnpkg.com/multibase/-/multibase-0.6.1.tgz#b76df6298536cc17b9f6a6db53ec88f85f8cc12b" + integrity sha512-pFfAwyTjbbQgNc3G7D48JkJxWtoJoBMaR4xQUOuB8RnCgRqaYmWNFeJTTvrJ2w51bjLq2zTby6Rqj9TQ9elSUw== + dependencies: + base-x "^3.0.8" + buffer "^5.5.0" + + multicodec@^0.5.5: + version "0.5.7" + resolved "https://registry.yarnpkg.com/multicodec/-/multicodec-0.5.7.tgz#1fb3f9dd866a10a55d226e194abba2dcc1ee9ffd" + integrity sha512-PscoRxm3f+88fAtELwUnZxGDkduE2HD9Q6GHUOywQLjOGT/HAdhjLDYNZ1e7VR0s0TP0EwZ16LNUTFpoBGivOA== + dependencies: + varint "^5.0.0" + + multicodec@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/multicodec/-/multicodec-1.0.4.tgz#46ac064657c40380c28367c90304d8ed175a714f" + integrity sha512-NDd7FeS3QamVtbgfvu5h7fd1IlbaC4EQ0/pgU4zqE2vdHCmBGsUa0TiM8/TdSeG6BMPC92OOCf8F1ocE/Wkrrg== + dependencies: + buffer "^5.6.0" + varint "^5.0.0" + + multihashes@^0.4.15, multihashes@~0.4.15: + version "0.4.21" + resolved "https://registry.yarnpkg.com/multihashes/-/multihashes-0.4.21.tgz#dc02d525579f334a7909ade8a122dabb58ccfcb5" + integrity sha512-uVSvmeCWf36pU2nB4/1kzYZjsXD9vofZKpgudqkceYY5g2aZZXJ5r9lxuzoRLl1OAp28XljXsEJ/X/85ZsKmKw== + dependencies: + buffer "^5.5.0" + multibase "^0.7.0" + varint "^5.0.0" + + murmur-128@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/murmur-128/-/murmur-128-0.2.1.tgz#a9f6568781d2350ecb1bf80c14968cadbeaa4b4d" + integrity sha512-WseEgiRkI6aMFBbj8Cg9yBj/y+OdipwVC7zUo3W2W1JAJITwouUOtpqsmGSg67EQmwwSyod7hsVsWY5LsrfQVg== + dependencies: + encode-utf8 "^1.0.2" + fmix "^0.1.0" + imul "^1.0.0" + + mute-stream@0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" + integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= + + mv@~2: + version "2.1.1" + resolved "https://registry.yarnpkg.com/mv/-/mv-2.1.1.tgz#ae6ce0d6f6d5e0a4f7d893798d03c1ea9559b6a2" + integrity sha1-rmzg1vbV4KT32JN5jQPB6pVZtqI= + dependencies: + mkdirp "~0.5.1" + ncp "~2.0.0" + rimraf "~2.4.0" + + nan@^2.14.0: + version "2.14.2" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.2.tgz#f5376400695168f4cc694ac9393d0c9585eeea19" + integrity sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ== + + nano-json-stream-parser@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/nano-json-stream-parser/-/nano-json-stream-parser-0.1.2.tgz#0cc8f6d0e2b622b479c40d499c46d64b755c6f5f" + integrity sha1-DMj20OK2IrR5xA1JnEbWS3Vcb18= + + nanoid@3.1.12: + version "3.1.12" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.12.tgz#6f7736c62e8d39421601e4a0c77623a97ea69654" + integrity sha512-1qstj9z5+x491jfiC4Nelk+f8XBad7LN20PmyWINJEMRSf3wcAjAWysw1qaA8z6NSKe2sjq1hRSDpBH5paCb6A== + + nanomatch@^1.2.9: + version "1.2.13" + resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" + integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA== + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + define-property "^2.0.2" + extend-shallow "^3.0.2" + fragment-cache "^0.2.1" + is-windows "^1.0.2" + kind-of "^6.0.2" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + + natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= + + ncp@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ncp/-/ncp-2.0.0.tgz#195a21d6c46e361d2fb1281ba38b91e9df7bdbb3" + integrity sha1-GVoh1sRuNh0vsSgbo4uR6d9727M= + + negotiator@0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" + integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== + + neo-async@^2.6.0: + version "2.6.2" + resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" + integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== + + next-tick@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c" + integrity sha1-yobR/ogoFpsBICCOPchCS524NCw= + + nice-try@^1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" + integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== + + nise@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/nise/-/nise-4.1.0.tgz#8fb75a26e90b99202fa1e63f448f58efbcdedaf6" + integrity sha512-eQMEmGN/8arp0xsvGoQ+B1qvSkR73B1nWSCh7nOt5neMCtwcQVYQGdzQMhcNscktTsWB54xnlSQFzOAPJD8nXA== + dependencies: + "@sinonjs/commons" "^1.7.0" + "@sinonjs/fake-timers" "^6.0.0" + "@sinonjs/text-encoding" "^0.7.1" + just-extend "^4.0.2" + path-to-regexp "^1.7.0" + + node-addon-api@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-2.0.2.tgz#432cfa82962ce494b132e9d72a15b29f71ff5d32" + integrity sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA== + + node-emoji@^1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/node-emoji/-/node-emoji-1.10.0.tgz#8886abd25d9c7bb61802a658523d1f8d2a89b2da" + integrity sha512-Yt3384If5H6BYGVHiHwTL+99OzJKHhgp82S8/dktEK73T26BazdgZ4JZh92xSVtGNJvz9UbXdNAc5hcrXV42vw== + dependencies: + lodash.toarray "^4.4.0" + + node-environment-flags@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/node-environment-flags/-/node-environment-flags-1.0.6.tgz#a30ac13621f6f7d674260a54dede048c3982c088" + integrity sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw== + dependencies: + object.getownpropertydescriptors "^2.0.3" + semver "^5.7.0" + + node-fetch@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.1.2.tgz#ab884e8e7e57e38a944753cec706f788d1768bb5" + integrity sha1-q4hOjn5X44qUR1POxwb3iNF2i7U= + + node-fetch@2.6.1, node-fetch@^2.6.0: + version "2.6.1" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" + integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== + + node-fetch@~1.7.1: + version "1.7.3" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" + integrity sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ== + dependencies: + encoding "^0.1.11" + is-stream "^1.0.1" + + node-gyp-build@^4.2.0: + version "4.2.3" + resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.2.3.tgz#ce6277f853835f718829efb47db20f3e4d9c4739" + integrity sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg== + + node-gyp-build@~3.7.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-3.7.0.tgz#daa77a4f547b9aed3e2aac779eaf151afd60ec8d" + integrity sha512-L/Eg02Epx6Si2NXmedx+Okg+4UHqmaf3TNcxd50SF9NQGcJaON3AtU++kax69XV7YWz4tUspqZSAsVofhFKG2w== + + nofilter@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/nofilter/-/nofilter-1.0.4.tgz#78d6f4b6a613e7ced8b015cec534625f7667006e" + integrity sha512-N8lidFp+fCz+TD51+haYdbDGrcBWwuHX40F5+z0qkUjMJ5Tp+rdSuAkMJ9N9eoolDlEVTf6u5icM+cNKkKW2mA== + + nopt@3.x: + version "3.0.6" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" + integrity sha1-xkZdvwirzU2zWTF/eaxopkayj/k= + dependencies: + abbrev "1" + + normalize-package-data@^2.3.2: + version "2.5.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" + integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== + dependencies: + hosted-git-info "^2.1.4" + resolve "^1.10.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + + normalize-path@^3.0.0, normalize-path@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + + normalize-url@^4.1.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.0.tgz#453354087e6ca96957bd8f5baf753f5982142129" + integrity sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ== + + npm-run-path@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" + integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8= + dependencies: + path-key "^2.0.0" + + nth-check@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-2.0.0.tgz#1bb4f6dac70072fc313e8c9cd1417b5074c0a125" + integrity sha512-i4sc/Kj8htBrAiH1viZ0TgU8Y5XqCaV/FziYK6TBczxmeKm3AEFWqqF3195yKudrarqy7Zu80Ra5dobFjn9X/Q== + dependencies: + boolbase "^1.0.0" + + number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= + + number-to-bn@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/number-to-bn/-/number-to-bn-1.7.0.tgz#bb3623592f7e5f9e0030b1977bd41a0c53fe1ea0" + integrity sha1-uzYjWS9+X54AMLGXe9QaDFP+HqA= + dependencies: + bn.js "4.11.6" + strip-hex-prefix "1.0.0" + + oauth-sign@~0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" + integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== + + object-assign@^4, object-assign@^4.0.0, object-assign@^4.1.0, object-assign@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= + + object-copy@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" + integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw= + dependencies: + copy-descriptor "^0.1.0" + define-property "^0.2.5" + kind-of "^3.0.3" + + object-inspect@^1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.9.0.tgz#c90521d74e1127b67266ded3394ad6116986533a" + integrity sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw== + + object-inspect@~1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.7.0.tgz#f4f6bd181ad77f006b5ece60bd0b6f398ff74a67" + integrity sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw== + + object-is@^1.0.1: + version "1.1.5" + resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.5.tgz#b9deeaa5fc7f1846a0faecdceec138e5778f53ac" + integrity sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + + object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" + integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== + + object-keys@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-0.4.0.tgz#28a6aae7428dd2c3a92f3d95f21335dd204e0336" + integrity sha1-KKaq50KN0sOpLz2V8hM13SBOAzY= + + object-visit@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" + integrity sha1-95xEk68MU3e1n+OdOV5BBC3QRbs= + dependencies: + isobject "^3.0.0" + + object.assign@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" + integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== + dependencies: + define-properties "^1.1.2" + function-bind "^1.1.1" + has-symbols "^1.0.0" + object-keys "^1.0.11" + + object.assign@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940" + integrity sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ== + dependencies: + call-bind "^1.0.0" + define-properties "^1.1.3" + has-symbols "^1.0.1" + object-keys "^1.1.1" + + object.getownpropertydescriptors@^2.0.3, object.getownpropertydescriptors@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.2.tgz#1bd63aeacf0d5d2d2f31b5e393b03a7c601a23f7" + integrity sha512-WtxeKSzfBjlzL+F9b7M7hewDzMwy+C8NRssHd1YrNlzHzIDrXcXiNOMrezdAEM4UXixgV+vvnyBeN7Rygl2ttQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.18.0-next.2" + + object.pick@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" + integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= + dependencies: + isobject "^3.0.1" + + obliterator@^1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/obliterator/-/obliterator-1.6.1.tgz#dea03e8ab821f6c4d96a299e17aef6a3af994ef3" + integrity sha512-9WXswnqINnnhOG/5SLimUlzuU1hFJUc8zkwyD59Sd+dPOMf05PmnYG/d6Q7HZ+KmgkZJa1PxRso6QdM3sTNHig== + + oboe@2.1.4: + version "2.1.4" + resolved "https://registry.yarnpkg.com/oboe/-/oboe-2.1.4.tgz#20c88cdb0c15371bb04119257d4fdd34b0aa49f6" + integrity sha1-IMiM2wwVNxuwQRklfU/dNLCqSfY= + dependencies: + http-https "^1.0.0" + + oboe@2.1.5: + version "2.1.5" + resolved "https://registry.yarnpkg.com/oboe/-/oboe-2.1.5.tgz#5554284c543a2266d7a38f17e073821fbde393cd" + integrity sha1-VVQoTFQ6ImbXo48X4HOCH73jk80= + dependencies: + http-https "^1.0.0" + + on-finished@~2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" + integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= + dependencies: + ee-first "1.1.1" + + once@1.x, once@^1.3.0, once@^1.3.1, once@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + dependencies: + wrappy "1" + + onetime@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" + integrity sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ= + dependencies: + mimic-fn "^1.0.0" + + open@^7.4.2: + version "7.4.2" + resolved "https://registry.yarnpkg.com/open/-/open-7.4.2.tgz#b8147e26dcf3e426316c730089fd71edd29c2321" + integrity sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q== + dependencies: + is-docker "^2.0.0" + is-wsl "^2.1.1" + + optionator@^0.8.1, optionator@^0.8.2: + version "0.8.3" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" + integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== + dependencies: + deep-is "~0.1.3" + fast-levenshtein "~2.0.6" + levn "~0.3.0" + prelude-ls "~1.1.2" + type-check "~0.3.2" + word-wrap "~1.2.3" + + optionator@^0.9.1: + version "0.9.1" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" + integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw== + dependencies: + deep-is "^0.1.3" + fast-levenshtein "^2.0.6" + levn "^0.4.1" + prelude-ls "^1.2.1" + type-check "^0.4.0" + word-wrap "^1.2.3" + + os-homedir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= + + os-locale@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" + integrity sha1-IPnxeuKe00XoveWDsT0gCYA8FNk= + dependencies: + lcid "^1.0.0" + + os-locale@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.1.0.tgz#a802a6ee17f24c10483ab9935719cef4ed16bf1a" + integrity sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q== + dependencies: + execa "^1.0.0" + lcid "^2.0.0" + mem "^4.0.0" + + os-tmpdir@^1.0.1, os-tmpdir@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= + + p-cancelable@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.3.0.tgz#b9e123800bcebb7ac13a479be195b507b98d30fa" + integrity sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw== + + p-cancelable@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-1.1.0.tgz#d078d15a3af409220c886f1d9a0ca2e441ab26cc" + integrity sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw== + + p-defer@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c" + integrity sha1-n26xgvbJqozXQwBKfU+WsZaw+ww= + + p-finally@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" + integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= + + p-is-promise@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-2.1.0.tgz#918cebaea248a62cf7ffab8e3bca8c5f882fc42e" + integrity sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg== + + p-limit@^1.1.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" + integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== + dependencies: + p-try "^1.0.0" + + p-limit@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== + dependencies: + p-try "^2.0.0" + + p-limit@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.0.2.tgz#1664e010af3cadc681baafd3e2a437be7b0fb5fe" + integrity sha512-iwqZSOoWIW+Ew4kAGUlN16J4M7OB3ysMLSZtnhmqx7njIHFPlxWBX8xo3lVTyFVq6mI/lL9qt2IsN1sHwaxJkg== + dependencies: + p-try "^2.0.0" + + p-locate@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" + integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= + dependencies: + p-limit "^1.1.0" + + p-locate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" + integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== + dependencies: + p-limit "^2.0.0" + + p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== + dependencies: + p-limit "^3.0.2" + + p-timeout@^1.1.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-1.2.1.tgz#5eb3b353b7fce99f101a1038880bb054ebbea386" + integrity sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y= + dependencies: + p-finally "^1.0.0" + + p-try@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" + integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= + + p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + + pako@^1.0.4: + version "1.0.11" + resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf" + integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw== + + parent-module@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" + integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== + dependencies: + callsites "^3.0.0" + + parse-asn1@^5.0.0, parse-asn1@^5.1.5: + version "5.1.6" + resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.6.tgz#385080a3ec13cb62a62d39409cb3e88844cdaed4" + integrity sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw== + dependencies: + asn1.js "^5.2.0" + browserify-aes "^1.0.0" + evp_bytestokey "^1.0.0" + pbkdf2 "^3.0.3" + safe-buffer "^5.1.1" + + parse-cache-control@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parse-cache-control/-/parse-cache-control-1.0.1.tgz#8eeab3e54fa56920fe16ba38f77fa21aacc2d74e" + integrity sha1-juqz5U+laSD+Fro493+iGqzC104= + + parse-code-context@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/parse-code-context/-/parse-code-context-1.0.0.tgz#718c295c593d0d19a37f898473268cc75e98de1e" + integrity sha512-OZQaqKaQnR21iqhlnPfVisFjBWjhnMl5J9MgbP8xC+EwoVqbXrq78lp+9Zb3ahmLzrIX5Us/qbvBnaS3hkH6OA== + + parse-headers@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/parse-headers/-/parse-headers-2.0.3.tgz#5e8e7512383d140ba02f0c7aa9f49b4399c92515" + integrity sha512-QhhZ+DCCit2Coi2vmAKbq5RGTRcQUOE2+REgv8vdyu7MnYx2eZztegqtTx99TZ86GTIwqiy3+4nQTWZ2tgmdCA== + + parse-json@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + integrity sha1-9ID0BDTvgHQfhGkJn43qGPVaTck= + dependencies: + error-ex "^1.2.0" + + parse-json@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" + integrity sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA= + dependencies: + error-ex "^1.3.1" + json-parse-better-errors "^1.0.1" + + parse5-htmlparser2-tree-adapter@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz#2cdf9ad823321140370d4dbf5d3e92c7c8ddc6e6" + integrity sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA== + dependencies: + parse5 "^6.0.1" + + parse5@^6.0.0, parse5@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b" + integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw== + + parseurl@~1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" + integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== + + pascalcase@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" + integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= + + patch-package@6.2.2: + version "6.2.2" + resolved "https://registry.yarnpkg.com/patch-package/-/patch-package-6.2.2.tgz#71d170d650c65c26556f0d0fbbb48d92b6cc5f39" + integrity sha512-YqScVYkVcClUY0v8fF0kWOjDYopzIM8e3bj/RU1DPeEF14+dCGm6UeOYm4jvCyxqIEQ5/eJzmbWfDWnUleFNMg== + dependencies: + "@yarnpkg/lockfile" "^1.1.0" + chalk "^2.4.2" + cross-spawn "^6.0.5" + find-yarn-workspace-root "^1.2.1" + fs-extra "^7.0.1" + is-ci "^2.0.0" + klaw-sync "^6.0.0" + minimist "^1.2.0" + rimraf "^2.6.3" + semver "^5.6.0" + slash "^2.0.0" + tmp "^0.0.33" + + patch-package@^6.2.2: + version "6.4.7" + resolved "https://registry.yarnpkg.com/patch-package/-/patch-package-6.4.7.tgz#2282d53c397909a0d9ef92dae3fdeb558382b148" + integrity sha512-S0vh/ZEafZ17hbhgqdnpunKDfzHQibQizx9g8yEf5dcVk3KOflOfdufRXQX8CSEkyOQwuM/bNz1GwKvFj54kaQ== + dependencies: + "@yarnpkg/lockfile" "^1.1.0" + chalk "^2.4.2" + cross-spawn "^6.0.5" + find-yarn-workspace-root "^2.0.0" + fs-extra "^7.0.1" + is-ci "^2.0.0" + klaw-sync "^6.0.0" + minimist "^1.2.0" + open "^7.4.2" + rimraf "^2.6.3" + semver "^5.6.0" + slash "^2.0.0" + tmp "^0.0.33" + + path-browserify@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-1.0.1.tgz#d98454a9c3753d5790860f16f68867b9e46be1fd" + integrity sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g== + + path-exists@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" + integrity sha1-D+tsZPD8UY2adU3V77YscCJ2H0s= + dependencies: + pinkie-promise "^2.0.0" + + path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= + + path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + + path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + + path-is-inside@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" + integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM= + + path-key@^2.0.0, path-key@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" + integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= + + path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + + path-parse@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" + integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== + + path-to-regexp@0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" + integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= + + path-to-regexp@^1.7.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-1.8.0.tgz#887b3ba9d84393e87a0a0b9f4cb756198b53548a" + integrity sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA== + dependencies: + isarray "0.0.1" + + path-type@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" + integrity sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE= + dependencies: + graceful-fs "^4.1.2" + pify "^2.0.0" + pinkie-promise "^2.0.0" + + path-type@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" + integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== + + path@^0.12.7: + version "0.12.7" + resolved "https://registry.yarnpkg.com/path/-/path-0.12.7.tgz#d4dc2a506c4ce2197eb481ebfcd5b36c0140b10f" + integrity sha1-1NwqUGxM4hl+tIHr/NWzbAFAsQ8= + dependencies: + process "^0.11.1" + util "^0.10.3" + + pathval@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.0.tgz#b942e6d4bde653005ef6b71361def8727d0645e0" + integrity sha1-uULm1L3mUwBe9rcTYd74cn0GReA= + + pbkdf2@^3.0.17, pbkdf2@^3.0.3, pbkdf2@^3.0.9: + version "3.1.1" + resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.1.tgz#cb8724b0fada984596856d1a6ebafd3584654b94" + integrity sha512-4Ejy1OPxi9f2tt1rRV7Go7zmfDQ+ZectEQz3VGUQhgq62HtIRPDyG/JtnwIxs6x3uNMwo2V7q1fMvKjb+Tnpqg== + dependencies: + create-hash "^1.1.2" + create-hmac "^1.1.4" + ripemd160 "^2.0.1" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + + performance-now@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" + integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= + + picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.2.1: + version "2.2.2" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" + integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== + + pify@^2.0.0, pify@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= + + pify@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" + integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== + + pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o= + dependencies: + pinkie "^2.0.0" + + pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= + + posix-character-classes@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" + integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= + + postinstall-postinstall@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/postinstall-postinstall/-/postinstall-postinstall-2.1.0.tgz#4f7f77441ef539d1512c40bd04c71b06a4704ca3" + integrity sha512-7hQX6ZlZXIoRiWNrbMQaLzUUfH+sSx39u8EJ9HYuDc1kLo9IXKWjM5RSquZN1ad5GnH8CGFM78fsAAQi3OKEEQ== + + precond@0.2: + version "0.2.3" + resolved "https://registry.yarnpkg.com/precond/-/precond-0.2.3.tgz#aa9591bcaa24923f1e0f4849d240f47efc1075ac" + integrity sha1-qpWRvKokkj8eD0hJ0kD0fvwQdaw= + + prelude-ls@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" + integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== + + prelude-ls@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= + + prepend-http@^1.0.1: + version "1.0.4" + resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" + integrity sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw= + + prepend-http@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" + integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= + + prettier-linter-helpers@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b" + integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w== + dependencies: + fast-diff "^1.1.2" + + prettier-plugin-solidity@^1.0.0-alpha.57: + version "1.0.0-alpha.59" + resolved "https://registry.yarnpkg.com/prettier-plugin-solidity/-/prettier-plugin-solidity-1.0.0-alpha.59.tgz#b0cf82fb068537d152d0bc417588d08e952a56c6" + integrity sha512-6cE0SWaiYCBoJY4clCfsbWlEEOU4K42Ny6Tg4Jwprgts/q+AVfYnPQ5coRs7zIjYzc4RVspifYPeh+oAg8RpLw== + dependencies: + "@solidity-parser/parser" "^0.8.1" + dir-to-object "^2.0.0" + emoji-regex "^9.0.0" + escape-string-regexp "^4.0.0" + extract-comments "^1.1.0" + prettier "^2.0.5" + semver "^7.3.2" + string-width "^4.2.0" + + prettier@^1.14.3: + version "1.19.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb" + integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew== + + prettier@^2.0.5: + version "2.1.2" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.1.2.tgz#3050700dae2e4c8b67c4c3f666cdb8af405e1ce5" + integrity sha512-16c7K+x4qVlJg9rEbXl7HEGmQyZlG4R9AgP+oHKRMsMsuk8s+ATStlf1NpDqyBI1HpVyfjLOeMhH2LvuNvV5Vg== + + prettier@^2.1.2: + version "2.2.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.2.1.tgz#795a1a78dd52f073da0cd42b21f9c91381923ff5" + integrity sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q== + + private@^0.1.6, private@^0.1.8: + version "0.1.8" + resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" + integrity sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg== + + process-nextick-args@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" + integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== + + process@^0.11.1, process@^0.11.10: + version "0.11.10" + resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" + integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= + + process@~0.5.1: + version "0.5.2" + resolved "https://registry.yarnpkg.com/process/-/process-0.5.2.tgz#1638d8a8e34c2f440a91db95ab9aeb677fc185cf" + integrity sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8= + + progress@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" + integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== + + promise-to-callback@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/promise-to-callback/-/promise-to-callback-1.0.0.tgz#5d2a749010bfb67d963598fcd3960746a68feef7" + integrity sha1-XSp0kBC/tn2WNZj805YHRqaP7vc= + dependencies: + is-fn "^1.0.0" + set-immediate-shim "^1.0.1" + + promise@^8.0.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/promise/-/promise-8.1.0.tgz#697c25c3dfe7435dd79fcd58c38a135888eaf05e" + integrity sha512-W04AqnILOL/sPRXziNicCjSNRruLAuIHEOVBazepu0545DDNGYHz7ar9ZgZ1fMU8/MA4mVxp5rkBWRi6OXIy3Q== + dependencies: + asap "~2.0.6" + + proxy-addr@~2.0.5: + version "2.0.6" + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.6.tgz#fdc2336505447d3f2f2c638ed272caf614bbb2bf" + integrity sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw== + dependencies: + forwarded "~0.1.2" + ipaddr.js "1.9.1" + + prr@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" + integrity sha1-0/wRS6BplaRexok/SEzrHXj19HY= + + pseudomap@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" + integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= + + psl@^1.1.28: + version "1.8.0" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" + integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ== + + public-encrypt@^4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.3.tgz#4fcc9d77a07e48ba7527e7cbe0de33d0701331e0" + integrity sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q== + dependencies: + bn.js "^4.1.0" + browserify-rsa "^4.0.0" + create-hash "^1.1.0" + parse-asn1 "^5.0.0" + randombytes "^2.0.1" + safe-buffer "^5.1.2" + + pull-cat@^1.1.9: + version "1.1.11" + resolved "https://registry.yarnpkg.com/pull-cat/-/pull-cat-1.1.11.tgz#b642dd1255da376a706b6db4fa962f5fdb74c31b" + integrity sha1-tkLdElXaN2pwa220+pYvX9t0wxs= + + pull-defer@^0.2.2: + version "0.2.3" + resolved "https://registry.yarnpkg.com/pull-defer/-/pull-defer-0.2.3.tgz#4ee09c6d9e227bede9938db80391c3dac489d113" + integrity sha512-/An3KE7mVjZCqNhZsr22k1Tx8MACnUnHZZNPSJ0S62td8JtYr/AiRG42Vz7Syu31SoTLUzVIe61jtT/pNdjVYA== + + pull-level@^2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pull-level/-/pull-level-2.0.4.tgz#4822e61757c10bdcc7cf4a03af04c92734c9afac" + integrity sha512-fW6pljDeUThpq5KXwKbRG3X7Ogk3vc75d5OQU/TvXXui65ykm+Bn+fiktg+MOx2jJ85cd+sheufPL+rw9QSVZg== + dependencies: + level-post "^1.0.7" + pull-cat "^1.1.9" + pull-live "^1.0.1" + pull-pushable "^2.0.0" + pull-stream "^3.4.0" + pull-window "^2.1.4" + stream-to-pull-stream "^1.7.1" + + pull-live@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/pull-live/-/pull-live-1.0.1.tgz#a4ecee01e330155e9124bbbcf4761f21b38f51f5" + integrity sha1-pOzuAeMwFV6RJLu89HYfIbOPUfU= + dependencies: + pull-cat "^1.1.9" + pull-stream "^3.4.0" + + pull-pushable@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/pull-pushable/-/pull-pushable-2.2.0.tgz#5f2f3aed47ad86919f01b12a2e99d6f1bd776581" + integrity sha1-Xy867UethpGfAbEqLpnW8b13ZYE= + + pull-stream@^3.2.3, pull-stream@^3.4.0, pull-stream@^3.6.8: + version "3.6.14" + resolved "https://registry.yarnpkg.com/pull-stream/-/pull-stream-3.6.14.tgz#529dbd5b86131f4a5ed636fdf7f6af00781357ee" + integrity sha512-KIqdvpqHHaTUA2mCYcLG1ibEbu/LCKoJZsBWyv9lSYtPkJPBq8m3Hxa103xHi6D2thj5YXa0TqK3L3GUkwgnew== + + pull-window@^2.1.4: + version "2.1.4" + resolved "https://registry.yarnpkg.com/pull-window/-/pull-window-2.1.4.tgz#fc3b86feebd1920c7ae297691e23f705f88552f0" + integrity sha1-/DuG/uvRkgx64pdpHiP3BfiFUvA= + dependencies: + looper "^2.0.0" + + pump@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" + integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + + punycode@1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" + integrity sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0= + + punycode@2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.0.tgz#5f863edc89b96db09074bad7947bf09056ca4e7d" + integrity sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0= + + punycode@^2.1.0, punycode@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== + + qs@6.7.0: + version "6.7.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc" + integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ== + + qs@^6.4.0, qs@^6.9.4: + version "6.9.4" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.9.4.tgz#9090b290d1f91728d3c22e54843ca44aea5ab687" + integrity sha512-A1kFqHekCTM7cz0udomYUoYNWjBebHm/5wzU/XqrBRBNWectVH0QIiN+NEcZ0Dte5hvzHwbr8+XQmguPhJ6WdQ== + + qs@^6.7.0: + version "6.10.1" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.10.1.tgz#4931482fa8d647a5aab799c5271d2133b981fb6a" + integrity sha512-M528Hph6wsSVOBiYUnGf+K/7w0hNshs/duGsNXPUCLH5XAqjEtiPGwNONLV0tBH8NoGb0mvD5JubnUTrujKDTg== + dependencies: + side-channel "^1.0.4" + + qs@~6.5.2: + version "6.5.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" + integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== + + query-string@^5.0.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/query-string/-/query-string-5.1.1.tgz#a78c012b71c17e05f2e3fa2319dd330682efb3cb" + integrity sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw== + dependencies: + decode-uri-component "^0.2.0" + object-assign "^4.1.0" + strict-uri-encode "^1.0.0" + + querystring@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" + integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= + + randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.0.6, randombytes@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" + integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== + dependencies: + safe-buffer "^5.1.0" + + randomfill@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.4.tgz#c92196fc86ab42be983f1bf31778224931d61458" + integrity sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw== + dependencies: + randombytes "^2.0.5" + safe-buffer "^5.1.0" + + range-parser@~1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" + integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== + + raw-body@2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.0.tgz#a1ce6fb9c9bc356ca52e89256ab59059e13d0332" + integrity sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q== + dependencies: + bytes "3.1.0" + http-errors "1.7.2" + iconv-lite "0.4.24" + unpipe "1.0.0" + + raw-body@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.1.tgz#30ac82f98bb5ae8c152e67149dac8d55153b168c" + integrity sha512-9WmIKF6mkvA0SLmA2Knm9+qj89e+j1zqgyn8aXGd7+nAduPoqgI9lO57SAZNn/Byzo5P7JhXTyg9PzaJbH73bA== + dependencies: + bytes "3.1.0" + http-errors "1.7.3" + iconv-lite "0.4.24" + unpipe "1.0.0" + + read-pkg-up@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" + integrity sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI= + dependencies: + find-up "^1.0.0" + read-pkg "^1.0.0" + + read-pkg@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" + integrity sha1-9f+qXs0pyzHAR0vKfXVra7KePyg= + dependencies: + load-json-file "^1.0.0" + normalize-package-data "^2.3.2" + path-type "^1.0.0" + + readable-stream@^1.0.33: + version "1.1.14" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" + integrity sha1-fPTFTvZI44EwhMY23SB54WbAgdk= + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + + readable-stream@^2.0.0, readable-stream@^2.0.5, readable-stream@^2.2.2, readable-stream@^2.2.8, readable-stream@^2.2.9, readable-stream@^2.3.6, readable-stream@~2.3.6: + version "2.3.7" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" + integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + + readable-stream@^3.0.6, readable-stream@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" + integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + + readable-stream@~1.0.15: + version "1.0.34" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" + integrity sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw= + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + + readdirp@~3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.2.0.tgz#c30c33352b12c96dfb4b895421a49fd5a9593839" + integrity sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ== + dependencies: + picomatch "^2.0.4" + + readdirp@~3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.5.0.tgz#9ba74c019b15d365278d2e91bb8c48d7b4d42c9e" + integrity sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ== + dependencies: + picomatch "^2.2.1" + + rechoir@^0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" + integrity sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q= + dependencies: + resolve "^1.1.6" + + recursive-readdir@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/recursive-readdir/-/recursive-readdir-2.2.2.tgz#9946fb3274e1628de6e36b2f6714953b4845094f" + integrity sha512-nRCcW9Sj7NuZwa2XvH9co8NPeXUBhZP7CRKJtU+cS6PW9FpCIFoI5ib0NT1ZrbNuPoRy0ylyCaUL8Gih4LSyFg== + dependencies: + minimatch "3.0.4" + + regenerate@^1.2.1: + version "1.4.2" + resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a" + integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A== + + regenerator-runtime@^0.11.0: + version "0.11.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" + integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg== + + regenerator-transform@^0.10.0: + version "0.10.1" + resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.10.1.tgz#1e4996837231da8b7f3cf4114d71b5691a0680dd" + integrity sha512-PJepbvDbuK1xgIgnau7Y90cwaAmO/LCLMI2mPvaXq2heGMR3aWW5/BQvYrhJ8jgmQjXewXvBjzfqKcVOmhjZ6Q== + dependencies: + babel-runtime "^6.18.0" + babel-types "^6.19.0" + private "^0.1.6" + + regex-not@^1.0.0, regex-not@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" + integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A== + dependencies: + extend-shallow "^3.0.2" + safe-regex "^1.1.0" + + regexp.prototype.flags@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.3.1.tgz#7ef352ae8d159e758c0eadca6f8fcb4eef07be26" + integrity sha512-JiBdRBq91WlY7uRJ0ds7R+dU02i6LKi8r3BuQhNXn+kmeLN+EfHhfjqMRis1zJxnlu88hq/4dx0P2OP3APRTOA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + + regexpp@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" + integrity sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw== + + regexpp@^3.0.0, regexpp@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.1.0.tgz#206d0ad0a5648cffbdb8ae46438f3dc51c9f78e2" + integrity sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q== + + regexpu-core@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240" + integrity sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA= + dependencies: + regenerate "^1.2.1" + regjsgen "^0.2.0" + regjsparser "^0.1.4" + + regjsgen@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" + integrity sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc= + + regjsparser@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" + integrity sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw= + dependencies: + jsesc "~0.5.0" + + repeat-element@^1.1.2: + version "1.1.3" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce" + integrity sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g== + + repeat-string@^1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= + + repeating@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" + integrity sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo= + dependencies: + is-finite "^1.0.0" + + req-cwd@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/req-cwd/-/req-cwd-2.0.0.tgz#d4082b4d44598036640fb73ddea01ed53db49ebc" + integrity sha1-1AgrTURZgDZkD7c93qAe1T20nrw= + dependencies: + req-from "^2.0.0" + + req-from@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/req-from/-/req-from-2.0.0.tgz#d74188e47f93796f4aa71df6ee35ae689f3e0e70" + integrity sha1-10GI5H+TeW9Kpx327jWuaJ8+DnA= + dependencies: + resolve-from "^3.0.0" + + request-promise-core@1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/request-promise-core/-/request-promise-core-1.1.4.tgz#3eedd4223208d419867b78ce815167d10593a22f" + integrity sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw== + dependencies: + lodash "^4.17.19" + + request-promise-native@^1.0.5: + version "1.0.9" + resolved "https://registry.yarnpkg.com/request-promise-native/-/request-promise-native-1.0.9.tgz#e407120526a5efdc9a39b28a5679bf47b9d9dc28" + integrity sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g== + dependencies: + request-promise-core "1.1.4" + stealthy-require "^1.1.1" + tough-cookie "^2.3.3" + + request@^2.79.0, request@^2.85.0, request@^2.88.0: + version "2.88.2" + resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" + integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== + dependencies: + aws-sign2 "~0.7.0" + aws4 "^1.8.0" + caseless "~0.12.0" + combined-stream "~1.0.6" + extend "~3.0.2" + forever-agent "~0.6.1" + form-data "~2.3.2" + har-validator "~5.1.3" + http-signature "~1.2.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.19" + oauth-sign "~0.9.0" + performance-now "^2.1.0" + qs "~6.5.2" + safe-buffer "^5.1.2" + tough-cookie "~2.5.0" + tunnel-agent "^0.6.0" + uuid "^3.3.2" + + require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= + + require-from-string@^1.1.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-1.2.1.tgz#529c9ccef27380adfec9a2f965b649bbee636418" + integrity sha1-UpyczvJzgK3+yaL5ZbZJu+5jZBg= + + require-from-string@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" + integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== + + require-main-filename@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" + integrity sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE= + + require-main-filename@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" + integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== + + resolve-from@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" + integrity sha1-six699nWiBvItuZTM17rywoYh0g= + + resolve-from@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== + + resolve-url@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" + integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= + + resolve@1.1.x: + version "1.1.7" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" + integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= + + resolve@1.17.0, resolve@~1.17.0: + version "1.17.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" + integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== + dependencies: + path-parse "^1.0.6" + + resolve@^1.1.6, resolve@^1.10.0, resolve@^1.8.1: + version "1.20.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" + integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A== + dependencies: + is-core-module "^2.2.0" + path-parse "^1.0.6" + + responselike@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7" + integrity sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec= + dependencies: + lowercase-keys "^1.0.0" + + restore-cursor@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" + integrity sha1-n37ih/gv0ybU/RYpI9YhKe7g368= + dependencies: + onetime "^2.0.0" + signal-exit "^3.0.2" + + resumer@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/resumer/-/resumer-0.0.0.tgz#f1e8f461e4064ba39e82af3cdc2a8c893d076759" + integrity sha1-8ej0YeQGS6Oegq883CqMiT0HZ1k= + dependencies: + through "~2.3.4" + + ret@~0.1.10: + version "0.1.15" + resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" + integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== + + reusify@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" + integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== + + rimraf@2.6.3: + version "2.6.3" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" + integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== + dependencies: + glob "^7.1.3" + + rimraf@^2.2.8, rimraf@^2.6.3: + version "2.7.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" + integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== + dependencies: + glob "^7.1.3" + + rimraf@~2.4.0: + version "2.4.5" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.4.5.tgz#ee710ce5d93a8fdb856fb5ea8ff0e2d75934b2da" + integrity sha1-7nEM5dk6j9uFb7Xqj/Di11k0sto= + dependencies: + glob "^6.0.1" + + ripemd160@^2.0.0, ripemd160@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" + integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + + rlp@^2.0.0, rlp@^2.2.1, rlp@^2.2.2, rlp@^2.2.3, rlp@^2.2.4: + version "2.2.6" + resolved "https://registry.yarnpkg.com/rlp/-/rlp-2.2.6.tgz#c80ba6266ac7a483ef1e69e8e2f056656de2fb2c" + integrity sha512-HAfAmL6SDYNWPUOJNrM500x4Thn4PZsEy5pijPh40U9WfNk0z15hUYzO9xVIMAdIHdFtD8CBDHd75Td1g36Mjg== + dependencies: + bn.js "^4.11.1" + + run-async@^2.2.0: + version "2.4.1" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" + integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== + + run-parallel@^1.1.9: + version "1.1.10" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.1.10.tgz#60a51b2ae836636c81377df16cb107351bcd13ef" + integrity sha512-zb/1OuZ6flOlH6tQyMPUrE3x3Ulxjlo9WIVXR4yVYi4H9UXQaeIsPbLn2R3O3vQCnDKkAl2qHiuocKKX4Tz/Sw== + + rustbn.js@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/rustbn.js/-/rustbn.js-0.2.0.tgz#8082cb886e707155fd1cb6f23bd591ab8d55d0ca" + integrity sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA== + + rxjs@^6.4.0: + version "6.6.3" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.3.tgz#8ca84635c4daa900c0d3967a6ee7ac60271ee552" + integrity sha512-trsQc+xYYXZ3urjOiJOuCOa5N3jAZ3eiSpQB5hIT8zGlL2QfnHLJ2r7GMkBGuIausdJN1OneaI6gQlsqNHHmZQ== + dependencies: + tslib "^1.9.0" + + safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + + safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + + safe-event-emitter@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/safe-event-emitter/-/safe-event-emitter-1.0.1.tgz#5b692ef22329ed8f69fdce607e50ca734f6f20af" + integrity sha512-e1wFe99A91XYYxoQbcq2ZJUWurxEyP8vfz7A7vuUe1s95q8r5ebraVaA1BukYJcpM6V16ugWoD9vngi8Ccu5fg== + dependencies: + events "^3.0.0" + + safe-json-stringify@~1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/safe-json-stringify/-/safe-json-stringify-1.2.0.tgz#356e44bc98f1f93ce45df14bcd7c01cda86e0afd" + integrity sha512-gH8eh2nZudPQO6TytOvbxnuhYBOvDBBLW52tz5q6X58lJcd/tkmqFR+5Z9adS8aJtURSXWThWy/xJtJwixErvg== + + safe-regex@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" + integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4= + dependencies: + ret "~0.1.10" + + "safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + + sc-istanbul@^0.4.5: + version "0.4.5" + resolved "https://registry.yarnpkg.com/sc-istanbul/-/sc-istanbul-0.4.5.tgz#1896066484d55336cf2cdbcc7884dc79da50dc76" + integrity sha512-7wR5EZFLsC4w0wSm9BUuCgW+OGKAU7PNlW5L0qwVPbh+Q1sfVn2fyzfMXYCm6rkNA5ipaCOt94nApcguQwF5Gg== + dependencies: + abbrev "1.0.x" + async "1.x" + escodegen "1.8.x" + esprima "2.7.x" + glob "^5.0.15" + handlebars "^4.0.1" + js-yaml "3.x" + mkdirp "0.5.x" + nopt "3.x" + once "1.x" + resolve "1.1.x" + supports-color "^3.1.0" + which "^1.1.1" + wordwrap "^1.0.0" + + scrypt-js@2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-2.0.4.tgz#32f8c5149f0797672e551c07e230f834b6af5f16" + integrity sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw== + + scrypt-js@3.0.1, scrypt-js@^3.0.0, scrypt-js@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-3.0.1.tgz#d314a57c2aef69d1ad98a138a21fe9eafa9ee312" + integrity sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA== + + scryptsy@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/scryptsy/-/scryptsy-1.2.1.tgz#a3225fa4b2524f802700761e2855bdf3b2d92163" + integrity sha1-oyJfpLJST4AnAHYeKFW987LZIWM= + dependencies: + pbkdf2 "^3.0.3" + + secp256k1@^3.0.1: + version "3.8.0" + resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-3.8.0.tgz#28f59f4b01dbee9575f56a47034b7d2e3b3b352d" + integrity sha512-k5ke5avRZbtl9Tqx/SA7CbY3NF6Ro+Sj9cZxezFzuBlLDmyqPiL8hJJ+EmzD8Ig4LUDByHJ3/iPOVoRixs/hmw== + dependencies: + bindings "^1.5.0" + bip66 "^1.1.5" + bn.js "^4.11.8" + create-hash "^1.2.0" + drbg.js "^1.0.1" + elliptic "^6.5.2" + nan "^2.14.0" + safe-buffer "^5.1.2" + + secp256k1@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-4.0.2.tgz#15dd57d0f0b9fdb54ac1fa1694f40e5e9a54f4a1" + integrity sha512-UDar4sKvWAksIlfX3xIaQReADn+WFnHvbVujpcbr+9Sf/69odMwy2MUsz5CKLQgX9nsIyrjuxL2imVyoNHa3fg== + dependencies: + elliptic "^6.5.2" + node-addon-api "^2.0.0" + node-gyp-build "^4.2.0" + + seedrandom@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/seedrandom/-/seedrandom-3.0.1.tgz#eb3dde015bcf55df05a233514e5df44ef9dce083" + integrity sha512-1/02Y/rUeU1CJBAGLebiC5Lbo5FnB22gQbIFFYTLkwvp1xdABZJH1sn4ZT1MzXmPpzv+Rf/Lu2NcsLJiK4rcDg== + + semaphore@>=1.0.1, semaphore@^1.0.3, semaphore@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/semaphore/-/semaphore-1.1.0.tgz#aaad8b86b20fe8e9b32b16dc2ee682a8cd26a8aa" + integrity sha512-O4OZEaNtkMd/K0i6js9SL+gqy0ZCBMgUvlSqHKi4IBdjhe7wB8pwztUk1BbZ1fmrvpwFrPbHzqd2w5pTcJH6LA== + + "semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0, semver@^5.7.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + + semver@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" + integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + + semver@^7.2.1, semver@^7.3.2: + version "7.3.2" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" + integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== + + semver@^7.3.4: + version "7.3.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.4.tgz#27aaa7d2e4ca76452f98d3add093a72c943edc97" + integrity sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw== + dependencies: + lru-cache "^6.0.0" + + semver@~5.4.1: + version "5.4.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e" + integrity sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg== + + send@0.17.1: + version "0.17.1" + resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8" + integrity sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg== + dependencies: + debug "2.6.9" + depd "~1.1.2" + destroy "~1.0.4" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "~1.7.2" + mime "1.6.0" + ms "2.1.1" + on-finished "~2.3.0" + range-parser "~1.2.1" + statuses "~1.5.0" + + serialize-javascript@5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-5.0.1.tgz#7886ec848049a462467a97d3d918ebb2aaf934f4" + integrity sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA== + dependencies: + randombytes "^2.1.0" + + serve-static@1.14.1: + version "1.14.1" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.1.tgz#666e636dc4f010f7ef29970a88a674320898b2f9" + integrity sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg== + dependencies: + encodeurl "~1.0.2" + escape-html "~1.0.3" + parseurl "~1.3.3" + send "0.17.1" + + servify@^0.1.12: + version "0.1.12" + resolved "https://registry.yarnpkg.com/servify/-/servify-0.1.12.tgz#142ab7bee1f1d033b66d0707086085b17c06db95" + integrity sha512-/xE6GvsKKqyo1BAY+KxOWXcLpPsUUyji7Qg3bVD7hh1eRze5bR1uYiuDA/k3Gof1s9BTzQZEJK8sNcNGFIzeWw== + dependencies: + body-parser "^1.16.0" + cors "^2.8.1" + express "^4.14.0" + request "^2.79.0" + xhr "^2.3.3" + + set-blocking@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= + + set-immediate-shim@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" + integrity sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E= + + set-value@^2.0.0, set-value@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b" + integrity sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw== + dependencies: + extend-shallow "^2.0.1" + is-extendable "^0.1.1" + is-plain-object "^2.0.3" + split-string "^3.0.1" + + setimmediate@1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.4.tgz#20e81de622d4a02588ce0c8da8973cbcf1d3138f" + integrity sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48= + + setimmediate@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" + integrity sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU= + + setprototypeof@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683" + integrity sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw== + + sha.js@^2.4.0, sha.js@^2.4.8: + version "2.4.11" + resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" + integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + + sha1@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/sha1/-/sha1-1.1.1.tgz#addaa7a93168f393f19eb2b15091618e2700f848" + integrity sha1-rdqnqTFo85PxnrKxUJFhjicA+Eg= + dependencies: + charenc ">= 0.0.1" + crypt ">= 0.0.1" + + shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= + dependencies: + shebang-regex "^1.0.0" + + shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + + shebang-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= + + shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + + shelljs@^0.8.3: + version "0.8.4" + resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.4.tgz#de7684feeb767f8716b326078a8a00875890e3c2" + integrity sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ== + dependencies: + glob "^7.0.0" + interpret "^1.0.0" + rechoir "^0.6.2" + + side-channel@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" + integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== + dependencies: + call-bind "^1.0.0" + get-intrinsic "^1.0.2" + object-inspect "^1.9.0" + + signal-exit@^3.0.0, signal-exit@^3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" + integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== + + simple-concat@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.1.tgz#f46976082ba35c2263f1c8ab5edfe26c41c9552f" + integrity sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q== + + simple-get@^2.7.0: + version "2.8.1" + resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-2.8.1.tgz#0e22e91d4575d87620620bc91308d57a77f44b5d" + integrity sha512-lSSHRSw3mQNUGPAYRqo7xy9dhKmxFXIjLjp4KHpf99GEH2VH7C3AM+Qfx6du6jhfUi6Vm7XnbEVEf7Wb6N8jRw== + dependencies: + decompress-response "^3.3.0" + once "^1.3.1" + simple-concat "^1.0.0" + + sinon@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/sinon/-/sinon-10.0.0.tgz#52279f97e35646ff73d23207d0307977c9b81430" + integrity sha512-XAn5DxtGVJBlBWYrcYKEhWCz7FLwZGdyvANRyK06419hyEpdT0dMc5A8Vcxg5SCGHc40CsqoKsc1bt1CbJPfNw== + dependencies: + "@sinonjs/commons" "^1.8.1" + "@sinonjs/fake-timers" "^6.0.1" + "@sinonjs/samsam" "^5.3.1" + diff "^4.0.2" + nise "^4.1.0" + supports-color "^7.1.0" + + slash@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" + integrity sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU= + + slash@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44" + integrity sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A== + + slash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + + slice-ansi@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-2.1.0.tgz#cacd7693461a637a5788d92a7dd4fba068e81636" + integrity sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ== + dependencies: + ansi-styles "^3.2.0" + astral-regex "^1.0.0" + is-fullwidth-code-point "^2.0.0" + + snapdragon-node@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" + integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw== + dependencies: + define-property "^1.0.0" + isobject "^3.0.0" + snapdragon-util "^3.0.1" + + snapdragon-util@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" + integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ== + dependencies: + kind-of "^3.2.0" + + snapdragon@^0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" + integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg== + dependencies: + base "^0.11.1" + debug "^2.2.0" + define-property "^0.2.5" + extend-shallow "^2.0.1" + map-cache "^0.2.2" + source-map "^0.5.6" + source-map-resolve "^0.5.0" + use "^3.1.0" + + solc@0.7.3: + version "0.7.3" + resolved "https://registry.yarnpkg.com/solc/-/solc-0.7.3.tgz#04646961bd867a744f63d2b4e3c0701ffdc7d78a" + integrity sha512-GAsWNAjGzIDg7VxzP6mPjdurby3IkGCjQcM8GFYZT6RyaoUZKmMU6Y7YwG+tFGhv7dwZ8rmR4iwFDrrD99JwqA== + dependencies: + command-exists "^1.2.8" + commander "3.0.2" + follow-redirects "^1.12.1" + fs-extra "^0.30.0" + js-sha3 "0.8.0" + memorystream "^0.3.1" + require-from-string "^2.0.0" + semver "^5.5.0" + tmp "0.0.33" + + solc@^0.4.20: + version "0.4.26" + resolved "https://registry.yarnpkg.com/solc/-/solc-0.4.26.tgz#5390a62a99f40806b86258c737c1cf653cc35cb5" + integrity sha512-o+c6FpkiHd+HPjmjEVpQgH7fqZ14tJpXhho+/bQXlXbliLIS/xjXb42Vxh+qQY1WCSTMQ0+a5vR9vi0MfhU6mA== + dependencies: + fs-extra "^0.30.0" + memorystream "^0.3.1" + require-from-string "^1.1.0" + semver "^5.3.0" + yargs "^4.7.1" + + solc@^0.6.3: + version "0.6.12" + resolved "https://registry.yarnpkg.com/solc/-/solc-0.6.12.tgz#48ac854e0c729361b22a7483645077f58cba080e" + integrity sha512-Lm0Ql2G9Qc7yPP2Ba+WNmzw2jwsrd3u4PobHYlSOxaut3TtUbj9+5ZrT6f4DUpNPEoBaFUOEg9Op9C0mk7ge9g== + dependencies: + command-exists "^1.2.8" + commander "3.0.2" + fs-extra "^0.30.0" + js-sha3 "0.8.0" + memorystream "^0.3.1" + require-from-string "^2.0.0" + semver "^5.5.0" + tmp "0.0.33" + + solhint-plugin-prettier@^0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/solhint-plugin-prettier/-/solhint-plugin-prettier-0.0.5.tgz#e3b22800ba435cd640a9eca805a7f8bc3e3e6a6b" + integrity sha512-7jmWcnVshIrO2FFinIvDQmhQpfpS2rRRn3RejiYgnjIE68xO2bvrYvjqVNfrio4xH9ghOqn83tKuTzLjEbmGIA== + dependencies: + prettier-linter-helpers "^1.0.0" + + solhint@^3.3.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/solhint/-/solhint-3.3.1.tgz#7aa02afb79ad2bcfa64885b1fe134e220949546f" + integrity sha512-JXAOLM2UQrLOtx4fKXzleq6CR0N7AlRfki+dFyvab93x4DoHeHQ4Ic2LMScT8V0AddXgbKtR8xdIIZKLh07dNg== + dependencies: + "@solidity-parser/parser" "^0.8.1" + ajv "^6.6.1" + antlr4 "4.7.1" + ast-parents "0.0.1" + chalk "^2.4.2" + commander "2.18.0" + cosmiconfig "^5.0.7" + eslint "^5.6.0" + fast-diff "^1.1.2" + glob "^7.1.3" + ignore "^4.0.6" + js-yaml "^3.12.0" + lodash "^4.17.11" + semver "^6.3.0" + optionalDependencies: + prettier "^1.14.3" + + solidity-coverage@^0.7.15: + version "0.7.15" + resolved "https://registry.yarnpkg.com/solidity-coverage/-/solidity-coverage-0.7.15.tgz#c5974e92b665d5be6bee11c24bbf7f6ff7529fa2" + integrity sha512-MVcpEUyMjf+ITew3BS7fI/NRxpYJUg9wPrSLS7y/F7BwXpYVRgAK4WsjbMzVkRdmezta1Kon0XqYHZMLgEt9XA== + dependencies: + "@solidity-parser/parser" "^0.11.0" + "@truffle/provider" "^0.2.24" + chalk "^2.4.2" + death "^1.1.0" + detect-port "^1.3.0" + fs-extra "^8.1.0" + ganache-cli "^6.11.0" + ghost-testrpc "^0.0.2" + global-modules "^2.0.0" + globby "^10.0.1" + jsonschema "^1.2.4" + lodash "^4.17.15" + node-emoji "^1.10.0" + pify "^4.0.1" + recursive-readdir "^2.2.2" + sc-istanbul "^0.4.5" + semver "^7.3.4" + shelljs "^0.8.3" + web3-utils "^1.3.0" + + source-map-resolve@^0.5.0: + version "0.5.3" + resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" + integrity sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw== + dependencies: + atob "^2.1.2" + decode-uri-component "^0.2.0" + resolve-url "^0.2.1" + source-map-url "^0.4.0" + urix "^0.1.0" + + source-map-support@0.5.12: + version "0.5.12" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.12.tgz#b4f3b10d51857a5af0138d3ce8003b201613d599" + integrity sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + + source-map-support@^0.4.15: + version "0.4.18" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f" + integrity sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA== + dependencies: + source-map "^0.5.6" + + source-map-support@^0.5.13, source-map-support@^0.5.17, source-map-support@^0.5.19: + version "0.5.19" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61" + integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + + source-map-url@^0.4.0: + version "0.4.1" + resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.1.tgz#0af66605a745a5a2f91cf1bbf8a7afbc283dec56" + integrity sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw== + + source-map@^0.5.6, source-map@^0.5.7: + version "0.5.7" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= + + source-map@^0.6.0, source-map@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + + source-map@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d" + integrity sha1-2rc/vPwrqBm03gO9b26qSBZLP50= + dependencies: + amdefine ">=0.0.4" + + spdx-correct@^3.0.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.1.tgz#dece81ac9c1e6713e5f7d1b6f17d468fa53d89a9" + integrity sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w== + dependencies: + spdx-expression-parse "^3.0.0" + spdx-license-ids "^3.0.0" + + spdx-exceptions@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz#3f28ce1a77a00372683eade4a433183527a2163d" + integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== + + spdx-expression-parse@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz#cf70f50482eefdc98e3ce0a6833e4a53ceeba679" + integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== + dependencies: + spdx-exceptions "^2.1.0" + spdx-license-ids "^3.0.0" + + spdx-license-ids@^3.0.0: + version "3.0.7" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.7.tgz#e9c18a410e5ed7e12442a549fbd8afa767038d65" + integrity sha512-U+MTEOO0AiDzxwFvoa4JVnMV6mZlJKk2sBLt90s7G0Gd0Mlknc7kxEn3nuDPNZRta7O2uy8oLcZLVT+4sqNZHQ== + + split-string@^3.0.1, split-string@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" + integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw== + dependencies: + extend-shallow "^3.0.0" + + sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= + + sshpk@^1.7.0: + version "1.16.1" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877" + integrity sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg== + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + bcrypt-pbkdf "^1.0.0" + dashdash "^1.12.0" + ecc-jsbn "~0.1.1" + getpass "^0.1.1" + jsbn "~0.1.0" + safer-buffer "^2.0.2" + tweetnacl "~0.14.0" + + stacktrace-parser@^0.1.10: + version "0.1.10" + resolved "https://registry.yarnpkg.com/stacktrace-parser/-/stacktrace-parser-0.1.10.tgz#29fb0cae4e0d0b85155879402857a1639eb6051a" + integrity sha512-KJP1OCML99+8fhOHxwwzyWrlUuVX5GQ0ZpJTd1DFXhdkrvg1szxfHhawXUZ3g9TkXORQd4/WG68jMlQZ2p8wlg== + dependencies: + type-fest "^0.7.1" + + static-extend@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" + integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY= + dependencies: + define-property "^0.2.5" + object-copy "^0.1.0" + + "statuses@>= 1.5.0 < 2", statuses@~1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" + integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= + + stealthy-require@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" + integrity sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks= + + stream-to-pull-stream@^1.7.1: + version "1.7.3" + resolved "https://registry.yarnpkg.com/stream-to-pull-stream/-/stream-to-pull-stream-1.7.3.tgz#4161aa2d2eb9964de60bfa1af7feaf917e874ece" + integrity sha512-6sNyqJpr5dIOQdgNy/xcDWwDuzAsAwVzhzrWlAPAQ7Lkjx/rv0wgvxEyKwTq6FmNd5rjTrELt/CLmaSw7crMGg== + dependencies: + looper "^3.0.0" + pull-stream "^3.2.3" + + strict-uri-encode@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" + integrity sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM= + + string-width@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + + "string-width@^1.0.2 || 2", string-width@^2.1.0, string-width@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + + string-width@^3.0.0, string-width@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" + integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== + dependencies: + emoji-regex "^7.0.1" + is-fullwidth-code-point "^2.0.0" + strip-ansi "^5.1.0" + + string-width@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.0.tgz#952182c46cc7b2c313d1596e623992bd163b72b5" + integrity sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.0" + + string.prototype.trim@~1.2.1: + version "1.2.4" + resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.4.tgz#6014689baf5efaf106ad031a5fa45157666ed1bd" + integrity sha512-hWCk/iqf7lp0/AgTF7/ddO1IWtSNPASjlzCicV5irAVdE1grjsneK26YG6xACMBEdCvO8fUST0UzDMh/2Qy+9Q== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.18.0-next.2" + + string.prototype.trimend@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz#e75ae90c2942c63504686c18b287b4a0b1a45f80" + integrity sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + + string.prototype.trimstart@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz#b36399af4ab2999b4c9c648bd7a3fb2bb26feeed" + integrity sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + + string_decoder@^1.1.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + + string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + integrity sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ= + + string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + + strip-ansi@^3.0.0, strip-ansi@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= + dependencies: + ansi-regex "^2.0.0" + + strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= + dependencies: + ansi-regex "^3.0.0" + + strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" + integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== + dependencies: + ansi-regex "^4.1.0" + + strip-ansi@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" + integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== + dependencies: + ansi-regex "^5.0.0" + + strip-bom@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" + integrity sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4= + dependencies: + is-utf8 "^0.2.0" + + strip-eof@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" + integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= + + strip-hex-prefix@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz#0c5f155fef1151373377de9dbb588da05500e36f" + integrity sha1-DF8VX+8RUTczd96du1iNoFUA428= + dependencies: + is-hex-prefixed "1.0.0" + + strip-indent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68" + integrity sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g= + + strip-json-comments@2.0.1, strip-json-comments@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= + + strip-json-comments@3.1.1, strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + + super-split@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/super-split/-/super-split-1.1.0.tgz#43b3ba719155f4d43891a32729d59b213d9155fc" + integrity sha512-I4bA5mgcb6Fw5UJ+EkpzqXfiuvVGS/7MuND+oBxNFmxu3ugLNrdIatzBLfhFRMVMLxgSsRy+TjIktgkF9RFSNQ== + + supports-color@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.0.0.tgz#76cfe742cf1f41bb9b1c29ad03068c05b4c0e40a" + integrity sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg== + dependencies: + has-flag "^3.0.0" + + supports-color@7.2.0, supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + + supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= + + supports-color@^3.1.0: + version "3.2.3" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" + integrity sha1-ZawFBLOVQXHYpklGsq48u4pfVPY= + dependencies: + has-flag "^1.0.0" + + supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + + swarm-js@^0.1.40: + version "0.1.40" + resolved "https://registry.yarnpkg.com/swarm-js/-/swarm-js-0.1.40.tgz#b1bc7b6dcc76061f6c772203e004c11997e06b99" + integrity sha512-yqiOCEoA4/IShXkY3WKwP5PvZhmoOOD8clsKA7EEcRILMkTEYHCQ21HDCAcVpmIxZq4LyZvWeRJ6quIyHk1caA== + dependencies: + bluebird "^3.5.0" + buffer "^5.0.5" + eth-lib "^0.1.26" + fs-extra "^4.0.2" + got "^7.1.0" + mime-types "^2.1.16" + mkdirp-promise "^5.0.1" + mock-fs "^4.1.0" + setimmediate "^1.0.5" + tar "^4.0.2" + xhr-request "^1.0.1" + + sync-request@^6.0.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/sync-request/-/sync-request-6.1.0.tgz#e96217565b5e50bbffe179868ba75532fb597e68" + integrity sha512-8fjNkrNlNCrVc/av+Jn+xxqfCjYaBoHqCsDz6mt030UMxJGr+GSfCV1dQt2gRtlL63+VPidwDVLr7V2OcTSdRw== + dependencies: + http-response-object "^3.0.1" + sync-rpc "^1.2.1" + then-request "^6.0.0" + + sync-rpc@^1.2.1: + version "1.3.6" + resolved "https://registry.yarnpkg.com/sync-rpc/-/sync-rpc-1.3.6.tgz#b2e8b2550a12ccbc71df8644810529deb68665a7" + integrity sha512-J8jTXuZzRlvU7HemDgHi3pGnh/rkoqR/OZSjhTyyZrEkkYQbk7Z33AXp37mkPfPpfdOuj7Ex3H/TJM1z48uPQw== + dependencies: + get-port "^3.1.0" + + table@^5.2.3: + version "5.4.6" + resolved "https://registry.yarnpkg.com/table/-/table-5.4.6.tgz#1292d19500ce3f86053b05f0e8e7e4a3bb21079e" + integrity sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug== + dependencies: + ajv "^6.10.2" + lodash "^4.17.14" + slice-ansi "^2.1.0" + string-width "^3.0.0" + + tape@^4.6.3: + version "4.13.3" + resolved "https://registry.yarnpkg.com/tape/-/tape-4.13.3.tgz#51b3d91c83668c7a45b1a594b607dee0a0b46278" + integrity sha512-0/Y20PwRIUkQcTCSi4AASs+OANZZwqPKaipGCEwp10dQMipVvSZwUUCi01Y/OklIGyHKFhIcjock+DKnBfLAFw== + dependencies: + deep-equal "~1.1.1" + defined "~1.0.0" + dotignore "~0.1.2" + for-each "~0.3.3" + function-bind "~1.1.1" + glob "~7.1.6" + has "~1.0.3" + inherits "~2.0.4" + is-regex "~1.0.5" + minimist "~1.2.5" + object-inspect "~1.7.0" + resolve "~1.17.0" + resumer "~0.0.0" + string.prototype.trim "~1.2.1" + through "~2.3.8" + + tar@^4.0.2: + version "4.4.13" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525" + integrity sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA== + dependencies: + chownr "^1.1.1" + fs-minipass "^1.2.5" + minipass "^2.8.6" + minizlib "^1.2.1" + mkdirp "^0.5.0" + safe-buffer "^5.1.2" + yallist "^3.0.3" + + test-value@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/test-value/-/test-value-2.1.0.tgz#11da6ff670f3471a73b625ca4f3fdcf7bb748291" + integrity sha1-Edpv9nDzRxpztiXKTz/c97t0gpE= + dependencies: + array-back "^1.0.3" + typical "^2.6.0" + + testrpc@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/testrpc/-/testrpc-0.0.1.tgz#83e2195b1f5873aec7be1af8cbe6dcf39edb7aed" + integrity sha512-afH1hO+SQ/VPlmaLUFj2636QMeDvPCeQMc/9RBMW0IfjNe9gFD9Ra3ShqYkB7py0do1ZcCna/9acHyzTJ+GcNA== + + text-table@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= + + then-request@^6.0.0: + version "6.0.2" + resolved "https://registry.yarnpkg.com/then-request/-/then-request-6.0.2.tgz#ec18dd8b5ca43aaee5cb92f7e4c1630e950d4f0c" + integrity sha512-3ZBiG7JvP3wbDzA9iNY5zJQcHL4jn/0BWtXIkagfz7QgOL/LqjCEOBQuJNZfu0XYnv5JhKh+cDxCPM4ILrqruA== + dependencies: + "@types/concat-stream" "^1.6.0" + "@types/form-data" "0.0.33" + "@types/node" "^8.0.0" + "@types/qs" "^6.2.31" + caseless "~0.12.0" + concat-stream "^1.6.0" + form-data "^2.2.0" + http-basic "^8.1.1" + http-response-object "^3.0.1" + promise "^8.0.0" + qs "^6.4.0" + + through2@^2.0.3: + version "2.0.5" + resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" + integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== + dependencies: + readable-stream "~2.3.6" + xtend "~4.0.1" + + through@^2.3.6, through@~2.3.4, through@~2.3.8: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= + + timed-out@^4.0.0, timed-out@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" + integrity sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8= + + tmp@0.0.33, tmp@^0.0.33: + version "0.0.33" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== + dependencies: + os-tmpdir "~1.0.2" + + tmp@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.1.0.tgz#ee434a4e22543082e294ba6201dcc6eafefa2877" + integrity sha512-J7Z2K08jbGcdA1kkQpJSqLF6T0tdQqpR2pnSUXsIchbPdTI9v3e85cLW0d6WDhwuAleOV71j2xWs8qMPfK7nKw== + dependencies: + rimraf "^2.6.3" + + to-fast-properties@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" + integrity sha1-uDVx+k2MJbguIxsG46MFXeTKGkc= + + to-object-path@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" + integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68= + dependencies: + kind-of "^3.0.2" + + to-readable-stream@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/to-readable-stream/-/to-readable-stream-1.0.0.tgz#ce0aa0c2f3df6adf852efb404a783e77c0475771" + integrity sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q== + + to-regex-range@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" + integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg= + dependencies: + is-number "^3.0.0" + repeat-string "^1.6.1" + + to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + + to-regex@^3.0.1, to-regex@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" + integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== + dependencies: + define-property "^2.0.2" + extend-shallow "^3.0.2" + regex-not "^1.0.2" + safe-regex "^1.1.0" + + toidentifier@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" + integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== + + tough-cookie@^2.3.3, tough-cookie@~2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" + integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== + dependencies: + psl "^1.1.28" + punycode "^2.1.1" + + trim-right@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" + integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= + + "true-case-path@^2.2.1": + version "2.2.1" + resolved "https://registry.yarnpkg.com/true-case-path/-/true-case-path-2.2.1.tgz#c5bf04a5bbec3fd118be4084461b3a27c4d796bf" + integrity sha512-0z3j8R7MCjy10kc/g+qg7Ln3alJTodw9aDuVWZa3uiWqfuBMKeAeP2ocWcxoyM3D73yz3Jt/Pu4qPr4wHSdB/Q== + + ts-essentials@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-1.0.4.tgz#ce3b5dade5f5d97cf69889c11bf7d2da8555b15a" + integrity sha512-q3N1xS4vZpRouhYHDPwO0bDW3EZ6SK9CrrDHxi/D6BPReSjpVgWIOpLS2o0gSBZm+7q/wyKp6RVM1AeeW7uyfQ== + + ts-essentials@^6.0.3: + version "6.0.7" + resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-6.0.7.tgz#5f4880911b7581a873783740ce8b94da163d18a6" + integrity sha512-2E4HIIj4tQJlIHuATRHayv0EfMGK3ris/GRk1E3CFnsZzeNV+hUmelbaTZHLtXaZppM5oLhHRtO04gINC4Jusw== + + ts-essentials@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-7.0.1.tgz#d205508cae0cdadfb73c89503140cf2228389e2d" + integrity sha512-8lwh3QJtIc1UWhkQtr9XuksXu3O0YQdEE5g79guDfhCaU1FWTDIEDZ1ZSx4HTHUmlJZ8L812j3BZQ4a0aOUkSA== + + ts-generator@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ts-generator/-/ts-generator-0.1.1.tgz#af46f2fb88a6db1f9785977e9590e7bcd79220ab" + integrity sha512-N+ahhZxTLYu1HNTQetwWcx3so8hcYbkKBHTr4b4/YgObFTIKkOSSsaa+nal12w8mfrJAyzJfETXawbNjSfP2gQ== + dependencies: + "@types/mkdirp" "^0.5.2" + "@types/prettier" "^2.1.1" + "@types/resolve" "^0.0.8" + chalk "^2.4.1" + glob "^7.1.2" + mkdirp "^0.5.1" + prettier "^2.1.2" + resolve "^1.8.1" + ts-essentials "^1.0.0" + + ts-node@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-9.0.0.tgz#e7699d2a110cc8c0d3b831715e417688683460b3" + integrity sha512-/TqB4SnererCDR/vb4S/QvSZvzQMJN8daAslg7MeaiHvD8rDZsSfXmNeNumyZZzMned72Xoq/isQljYSt8Ynfg== + dependencies: + arg "^4.1.0" + diff "^4.0.1" + make-error "^1.1.1" + source-map-support "^0.5.17" + yn "3.1.1" + + tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3: + version "1.14.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" + integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== + + tsort@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/tsort/-/tsort-0.0.1.tgz#e2280f5e817f8bf4275657fd0f9aebd44f5a2786" + integrity sha1-4igPXoF/i/QnVlf9D5rr1E9aJ4Y= + + tsutils@^3.17.1: + version "3.17.1" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.17.1.tgz#ed719917f11ca0dee586272b2ac49e015a2dd759" + integrity sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g== + dependencies: + tslib "^1.8.1" + + tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= + dependencies: + safe-buffer "^5.0.1" + + tweetnacl-util@^0.15.0: + version "0.15.1" + resolved "https://registry.yarnpkg.com/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz#b80fcdb5c97bcc508be18c44a4be50f022eea00b" + integrity sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw== + + tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= + + tweetnacl@^1.0.0, tweetnacl@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.3.tgz#ac0af71680458d8a6378d0d0d050ab1407d35596" + integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw== + + type-check@^0.4.0, type-check@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" + integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== + dependencies: + prelude-ls "^1.2.1" + + type-check@~0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + integrity sha1-WITKtRLPHTVeP7eE8wgEsrUg23I= + dependencies: + prelude-ls "~1.1.2" + + type-detect@4.0.8, type-detect@^4.0.0, type-detect@^4.0.5, type-detect@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" + integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== + + type-fest@^0.21.3: + version "0.21.3" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" + integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== + + type-fest@^0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.7.1.tgz#8dda65feaf03ed78f0a3f9678f1869147f7c5c48" + integrity sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg== + + type-fest@^0.8.1: + version "0.8.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" + integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== + + type-is@~1.6.17, type-is@~1.6.18: + version "1.6.18" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" + integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== + dependencies: + media-typer "0.3.0" + mime-types "~2.1.24" + + type@^1.0.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/type/-/type-1.2.0.tgz#848dd7698dafa3e54a6c479e759c4bc3f18847a0" + integrity sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg== + + type@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/type/-/type-2.1.0.tgz#9bdc22c648cf8cf86dd23d32336a41cfb6475e3f" + integrity sha512-G9absDWvhAWCV2gmF1zKud3OyC61nZDwWvBL2DApaVFogI07CprggiQAOOjvp2NRjYWFzPyu7vwtDrQFq8jeSA== + + typechain@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/typechain/-/typechain-3.0.0.tgz#d5a47700831f238e43f7429b987b4bb54849b92e" + integrity sha512-ft4KVmiN3zH4JUFu2WJBrwfHeDf772Tt2d8bssDTo/YcckKW2D+OwFrHXRC6hJvO3mHjFQTihoMV6fJOi0Hngg== + dependencies: + command-line-args "^4.0.7" + debug "^4.1.1" + fs-extra "^7.0.0" + js-sha3 "^0.8.0" + lodash "^4.17.15" + ts-essentials "^6.0.3" + ts-generator "^0.1.1" + + typechain@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/typechain/-/typechain-4.0.2.tgz#31a961bf1fc43b8cde39193247439715e43ce5d3" + integrity sha512-SopnfdQrS5ek6sTbvymsnBACA+70FstX/ZLWY8lQWNdLUXGyoGFoa73Y+1hKlbz2DfCnO39bQ551qUMhk5GYSw== + dependencies: + command-line-args "^4.0.7" + debug "^4.1.1" + fs-extra "^7.0.0" + js-sha3 "^0.8.0" + lodash "^4.17.15" + ts-essentials "^7.0.1" + ts-generator "^0.1.1" + + typedarray-to-buffer@^3.1.5: + version "3.1.5" + resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" + integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q== + dependencies: + is-typedarray "^1.0.0" + + typedarray@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" + integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= + + typescript@^4.0.5: + version "4.0.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.0.5.tgz#ae9dddfd1069f1cb5beb3ef3b2170dd7c1332389" + integrity sha512-ywmr/VrTVCmNTJ6iV2LwIrfG1P+lv6luD8sUJs+2eI9NLGigaN+nUQc13iHqisq7bra9lnmUSYqbJvegraBOPQ== + + typewise-core@^1.2, typewise-core@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/typewise-core/-/typewise-core-1.2.0.tgz#97eb91805c7f55d2f941748fa50d315d991ef195" + integrity sha1-l+uRgFx/VdL5QXSPpQ0xXZke8ZU= + + typewise@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/typewise/-/typewise-1.0.3.tgz#1067936540af97937cc5dcf9922486e9fa284651" + integrity sha1-EGeTZUCvl5N8xdz5kiSG6fooRlE= + dependencies: + typewise-core "^1.2.0" + + typewiselite@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/typewiselite/-/typewiselite-1.0.0.tgz#c8882fa1bb1092c06005a97f34ef5c8508e3664e" + integrity sha1-yIgvobsQksBgBal/NO9chQjjZk4= + + typical@^2.6.0, typical@^2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/typical/-/typical-2.6.1.tgz#5c080e5d661cbbe38259d2e70a3c7253e873881d" + integrity sha1-XAgOXWYcu+OCWdLnCjxyU+hziB0= + + uglify-js@^3.1.4: + version "3.12.8" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.12.8.tgz#a82e6e53c9be14f7382de3d068ef1e26e7d4aaf8" + integrity sha512-fvBeuXOsvqjecUtF/l1dwsrrf5y2BCUk9AOJGzGcm6tE7vegku5u/YvqjyDaAGr422PLoLnrxg3EnRvTqsdC1w== + + ultron@~1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.1.tgz#9fe1536a10a664a65266a1e3ccf85fd36302bc9c" + integrity sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og== + + unbox-primitive@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.0.tgz#eeacbc4affa28e9b3d36b5eaeccc50b3251b1d3f" + integrity sha512-P/51NX+JXyxK/aigg1/ZgyccdAxm5K1+n8+tvqSntjOivPt19gvm1VC49RWYetsiub8WViUchdxl/KWHHB0kzA== + dependencies: + function-bind "^1.1.1" + has-bigints "^1.0.0" + has-symbols "^1.0.0" + which-boxed-primitive "^1.0.1" + + underscore@1.9.1: + version "1.9.1" + resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.9.1.tgz#06dce34a0e68a7babc29b365b8e74b8925203961" + integrity sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg== + + underscore@^1.8.3: + version "1.12.1" + resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.12.1.tgz#7bb8cc9b3d397e201cf8553336d262544ead829e" + integrity sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw== + + union-value@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" + integrity sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg== + dependencies: + arr-union "^3.1.0" + get-value "^2.0.6" + is-extendable "^0.1.1" + set-value "^2.0.1" + + universalify@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" + integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== + + universalify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-1.0.0.tgz#b61a1da173e8435b2fe3c67d29b9adf8594bd16d" + integrity sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug== + + unorm@^1.3.3: + version "1.6.0" + resolved "https://registry.yarnpkg.com/unorm/-/unorm-1.6.0.tgz#029b289661fba714f1a9af439eb51d9b16c205af" + integrity sha512-b2/KCUlYZUeA7JFUuRJZPUtr4gZvBh7tavtv4fvk4+KV9pfGiR6CQAQAWl49ZpR3ts2dk4FYkP7EIgDJoiOLDA== + + unpipe@1.0.0, unpipe@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= + + unset-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" + integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk= + dependencies: + has-value "^0.3.1" + isobject "^3.0.0" + + uri-js@^4.2.2: + version "4.4.0" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.0.tgz#aa714261de793e8a82347a7bcc9ce74e86f28602" + integrity sha512-B0yRTzYdUCCn9n+F4+Gh4yIDtMQcaJsmYBDsTSG8g/OejKBodLQ2IHfN3bM7jUsRXndopT7OIXWdYqc1fjmV6g== + dependencies: + punycode "^2.1.0" + + urix@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" + integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= + + url-parse-lax@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-1.0.0.tgz#7af8f303645e9bd79a272e7a14ac68bc0609da73" + integrity sha1-evjzA2Rem9eaJy56FKxovAYJ2nM= + dependencies: + prepend-http "^1.0.1" + + url-parse-lax@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-3.0.0.tgz#16b5cafc07dbe3676c1b1999177823d6503acb0c" + integrity sha1-FrXK/Afb42dsGxmZF3gj1lA6yww= + dependencies: + prepend-http "^2.0.0" + + url-set-query@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/url-set-query/-/url-set-query-1.0.0.tgz#016e8cfd7c20ee05cafe7795e892bd0702faa339" + integrity sha1-AW6M/Xwg7gXK/neV6JK9BwL6ozk= + + url-to-options@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/url-to-options/-/url-to-options-1.0.1.tgz#1505a03a289a48cbd7a434efbaeec5055f5633a9" + integrity sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k= + + url@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" + integrity sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE= + dependencies: + punycode "1.3.2" + querystring "0.2.0" + + use@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" + integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== + + utf-8-validate@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/utf-8-validate/-/utf-8-validate-5.0.2.tgz#63cfbccd85dc1f2b66cf7a1d0eebc08ed056bfb3" + integrity sha512-SwV++i2gTD5qh2XqaPzBnNX88N6HdyhQrNNRykvcS0QKvItV9u3vPEJr+X5Hhfb1JC0r0e1alL0iB09rY8+nmw== + dependencies: + node-gyp-build "~3.7.0" + + utf8@3.0.0, utf8@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/utf8/-/utf8-3.0.0.tgz#f052eed1364d696e769ef058b183df88c87f69d1" + integrity sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ== + + util-deprecate@^1.0.1, util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= + + util.promisify@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.1.1.tgz#77832f57ced2c9478174149cae9b96e9918cd54b" + integrity sha512-/s3UsZUrIfa6xDhr7zZhnE9SLQ5RIXyYfiVnMMyMDzOc8WhWN4Nbh36H842OyurKbCDAesZOJaVyvmSl6fhGQw== + dependencies: + call-bind "^1.0.0" + define-properties "^1.1.3" + for-each "^0.3.3" + has-symbols "^1.0.1" + object.getownpropertydescriptors "^2.1.1" + + util@^0.10.3: + version "0.10.4" + resolved "https://registry.yarnpkg.com/util/-/util-0.10.4.tgz#3aa0125bfe668a4672de58857d3ace27ecb76901" + integrity sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A== + dependencies: + inherits "2.0.3" + + util@^0.12.0: + version "0.12.3" + resolved "https://registry.yarnpkg.com/util/-/util-0.12.3.tgz#971bb0292d2cc0c892dab7c6a5d37c2bec707888" + integrity sha512-I8XkoQwE+fPQEhy9v012V+TSdH2kp9ts29i20TaaDUXsg7x/onePbhFJUExBfv/2ay1ZOp/Vsm3nDlmnFGSAog== + dependencies: + inherits "^2.0.3" + is-arguments "^1.0.4" + is-generator-function "^1.0.7" + is-typed-array "^1.1.3" + safe-buffer "^5.1.2" + which-typed-array "^1.1.2" + + utils-merge@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" + integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= + + uuid@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.1.tgz#c2a30dedb3e535d72ccf82e343941a50ba8533ac" + integrity sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w= + + uuid@3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" + integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA== + + uuid@^3.3.2: + version "3.4.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" + integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== + + v8-compile-cache@^2.0.3: + version "2.1.1" + resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.1.1.tgz#54bc3cdd43317bca91e35dcaf305b1a7237de745" + integrity sha512-8OQ9CL+VWyt3JStj7HX7/ciTL2V3Rl1Wf5OL+SNTm0yK1KvtReVulksyeRnCANHHuUxHlQig+JJDlUhBt1NQDQ== + + validate-npm-package-license@^3.0.1: + version "3.0.4" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" + integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== + dependencies: + spdx-correct "^3.0.0" + spdx-expression-parse "^3.0.0" + + varint@^5.0.0: + version "5.0.2" + resolved "https://registry.yarnpkg.com/varint/-/varint-5.0.2.tgz#5b47f8a947eb668b848e034dcfa87d0ff8a7f7a4" + integrity sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow== + + vary@^1, vary@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" + integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= + + verror@1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= + dependencies: + assert-plus "^1.0.0" + core-util-is "1.0.2" + extsprintf "^1.2.0" + + web3-bzz@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.2.11.tgz#41bc19a77444bd5365744596d778b811880f707f" + integrity sha512-XGpWUEElGypBjeFyUhTkiPXFbDVD6Nr/S5jznE3t8cWUA0FxRf1n3n/NuIZeb0H9RkN2Ctd/jNma/k8XGa3YKg== + dependencies: + "@types/node" "^12.12.6" + got "9.6.0" + swarm-js "^0.1.40" + underscore "1.9.1" + + web3-bzz@1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.2.9.tgz#25f8a373bc2dd019f47bf80523546f98b93c8790" + integrity sha512-ogVQr9jHodu9HobARtvUSmWG22cv2EUQzlPeejGWZ7j5h20HX40EDuWyomGY5VclIj5DdLY76Tmq88RTf/6nxA== + dependencies: + "@types/node" "^10.12.18" + got "9.6.0" + swarm-js "^0.1.40" + underscore "1.9.1" + + web3-bzz@1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.3.4.tgz#9be529353c4063bc68395370cb5d8e414c6b6c87" + integrity sha512-DBRVQB8FAgoAtZCpp2GAGPCJjgBgsuwOKEasjV044AAZiONpXcKHbkO6G1SgItIixnrJsRJpoGLGw52Byr6FKw== + dependencies: + "@types/node" "^12.12.6" + got "9.6.0" + swarm-js "^0.1.40" + underscore "1.9.1" + + web3-core-helpers@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.2.11.tgz#84c681ed0b942c0203f3b324a245a127e8c67a99" + integrity sha512-PEPoAoZd5ME7UfbnCZBdzIerpe74GEvlwT4AjOmHeCVZoIFk7EqvOZDejJHt+feJA6kMVTdd0xzRNN295UhC1A== + dependencies: + underscore "1.9.1" + web3-eth-iban "1.2.11" + web3-utils "1.2.11" + + web3-core-helpers@1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.2.9.tgz#6381077c3e01c127018cb9e9e3d1422697123315" + integrity sha512-t0WAG3orLCE3lqi77ZoSRNFok3VQWZXTniZigDQjyOJYMAX7BU3F3js8HKbjVnAxlX3tiKoDxI0KBk9F3AxYuw== + dependencies: + underscore "1.9.1" + web3-eth-iban "1.2.9" + web3-utils "1.2.9" + + web3-core-helpers@1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.3.4.tgz#b8549740bf24d5c71688d89c3cdd802d8d36b4e4" + integrity sha512-n7BqDalcTa1stncHMmrnFtyTgDhX5Fy+avNaHCf6qcOP2lwTQC8+mdHVBONWRJ6Yddvln+c8oY/TAaB6PzWK0A== + dependencies: + underscore "1.9.1" + web3-eth-iban "1.3.4" + web3-utils "1.3.4" + + web3-core-method@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.2.11.tgz#f880137d1507a0124912bf052534f168b8d8fbb6" + integrity sha512-ff0q76Cde94HAxLDZ6DbdmKniYCQVtvuaYh+rtOUMB6kssa5FX0q3vPmixi7NPooFnbKmmZCM6NvXg4IreTPIw== + dependencies: + "@ethersproject/transactions" "^5.0.0-beta.135" + underscore "1.9.1" + web3-core-helpers "1.2.11" + web3-core-promievent "1.2.11" + web3-core-subscriptions "1.2.11" + web3-utils "1.2.11" + + web3-core-method@1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.2.9.tgz#3fb538751029bea570e4f86731e2fa5e4945e462" + integrity sha512-bjsIoqP3gs7A/gP8+QeLUCyOKJ8bopteCSNbCX36Pxk6TYfYWNuC6hP+2GzUuqdP3xaZNe+XEElQFUNpR3oyAg== + dependencies: + "@ethersproject/transactions" "^5.0.0-beta.135" + underscore "1.9.1" + web3-core-helpers "1.2.9" + web3-core-promievent "1.2.9" + web3-core-subscriptions "1.2.9" + web3-utils "1.2.9" + + web3-core-method@1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.3.4.tgz#6c2812d96dd6c811b9e6c8a5d25050d2c22b9527" + integrity sha512-JxmQrujsAWYRRN77P/RY7XuZDCzxSiiQJrgX/60Lfyf7FF1Y0le4L/UMCi7vUJnuYkbU1Kfl9E0udnqwyPqlvQ== + dependencies: + "@ethersproject/transactions" "^5.0.0-beta.135" + underscore "1.9.1" + web3-core-helpers "1.3.4" + web3-core-promievent "1.3.4" + web3-core-subscriptions "1.3.4" + web3-utils "1.3.4" + + web3-core-promievent@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.2.11.tgz#51fe97ca0ddec2f99bf8c3306a7a8e4b094ea3cf" + integrity sha512-il4McoDa/Ox9Agh4kyfQ8Ak/9ABYpnF8poBLL33R/EnxLsJOGQG2nZhkJa3I067hocrPSjEdlPt/0bHXsln4qA== + dependencies: + eventemitter3 "4.0.4" + + web3-core-promievent@1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.2.9.tgz#bb1c56aa6fac2f4b3c598510f06554d25c11c553" + integrity sha512-0eAUA2zjgXTleSrnc1wdoKQPPIHU6KHf4fAscu4W9kKrR+mqP1KsjYrxY9wUyjNnXxfQ+5M29ipvbiaK8OqdOw== + dependencies: + eventemitter3 "3.1.2" + + web3-core-promievent@1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.3.4.tgz#d166239012d91496cdcbe91d5d54071ea818bc73" + integrity sha512-V61dZIeBwogg6hhZZUt0qL9hTp1WDhnsdjP++9fhTDr4vy/Gz8T5vibqT2LLg6lQC8i+Py33yOpMeMNjztaUaw== + dependencies: + eventemitter3 "4.0.4" + + web3-core-requestmanager@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.2.11.tgz#fe6eb603fbaee18530293a91f8cf26d8ae28c45a" + integrity sha512-oFhBtLfOiIbmfl6T6gYjjj9igOvtyxJ+fjS+byRxiwFJyJ5BQOz4/9/17gWR1Cq74paTlI7vDGxYfuvfE/mKvA== + dependencies: + underscore "1.9.1" + web3-core-helpers "1.2.11" + web3-providers-http "1.2.11" + web3-providers-ipc "1.2.11" + web3-providers-ws "1.2.11" + + web3-core-requestmanager@1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.2.9.tgz#dd6d855256c4dd681434fe0867f8cd742fe10503" + integrity sha512-1PwKV2m46ALUnIN5VPPgjOj8yMLJhhqZYvYJE34hTN5SErOkwhzx5zScvo5MN7v7KyQGFnpVCZKKGCiEnDmtFA== + dependencies: + underscore "1.9.1" + web3-core-helpers "1.2.9" + web3-providers-http "1.2.9" + web3-providers-ipc "1.2.9" + web3-providers-ws "1.2.9" + + web3-core-requestmanager@1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.3.4.tgz#e105ced735c2b5fcedd5771e0ecf9879ae9c373f" + integrity sha512-xriouCrhVnVDYQ04TZXdEREZm0OOJzkSEsoN5bu4JYsA6e/HzROeU+RjDpMUxFMzN4wxmFZ+HWbpPndS3QwMag== + dependencies: + underscore "1.9.1" + util "^0.12.0" + web3-core-helpers "1.3.4" + web3-providers-http "1.3.4" + web3-providers-ipc "1.3.4" + web3-providers-ws "1.3.4" + + web3-core-subscriptions@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.2.11.tgz#beca908fbfcb050c16f45f3f0f4c205e8505accd" + integrity sha512-qEF/OVqkCvQ7MPs1JylIZCZkin0aKK9lDxpAtQ1F8niEDGFqn7DT8E/vzbIa0GsOjL2fZjDhWJsaW+BSoAW1gg== + dependencies: + eventemitter3 "4.0.4" + underscore "1.9.1" + web3-core-helpers "1.2.11" + + web3-core-subscriptions@1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.2.9.tgz#335fd7d15dfce5d78b4b7bef05ce4b3d7237b0e4" + integrity sha512-Y48TvXPSPxEM33OmXjGVDMzTd0j8X0t2+sDw66haeBS8eYnrEzasWuBZZXDq0zNUsqyxItgBGDn+cszkgEnFqg== + dependencies: + eventemitter3 "3.1.2" + underscore "1.9.1" + web3-core-helpers "1.2.9" + + web3-core-subscriptions@1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.3.4.tgz#7b00e92bde21f792620cd02e6e508fcf4f4c31d3" + integrity sha512-drVHVDxh54hv7xmjIm44g4IXjfGj022fGw4/meB5R2D8UATFI40F73CdiBlyqk3DysP9njDOLTJFSQvEkLFUOg== + dependencies: + eventemitter3 "4.0.4" + underscore "1.9.1" + web3-core-helpers "1.3.4" + + web3-core@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.2.11.tgz#1043cacc1becb80638453cc5b2a14be9050288a7" + integrity sha512-CN7MEYOY5ryo5iVleIWRE3a3cZqVaLlIbIzDPsvQRUfzYnvzZQRZBm9Mq+ttDi2STOOzc1MKylspz/o3yq/LjQ== + dependencies: + "@types/bn.js" "^4.11.5" + "@types/node" "^12.12.6" + bignumber.js "^9.0.0" + web3-core-helpers "1.2.11" + web3-core-method "1.2.11" + web3-core-requestmanager "1.2.11" + web3-utils "1.2.11" + + web3-core@1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.2.9.tgz#2cba57aa259b6409db532d21bdf57db8d504fd3e" + integrity sha512-fSYv21IP658Ty2wAuU9iqmW7V+75DOYMVZsDH/c14jcF/1VXnedOcxzxSj3vArsCvXZNe6XC5/wAuGZyQwR9RA== + dependencies: + "@types/bn.js" "^4.11.4" + "@types/node" "^12.6.1" + bignumber.js "^9.0.0" + web3-core-helpers "1.2.9" + web3-core-method "1.2.9" + web3-core-requestmanager "1.2.9" + web3-utils "1.2.9" + + web3-core@1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.3.4.tgz#2cc7ba7f35cc167f7a0a46fd5855f86e51d34ce8" + integrity sha512-7OJu46RpCEfTerl+gPvHXANR2RkLqAfW7l2DAvQ7wN0pnCzl9nEfdgW6tMhr31k3TR2fWucwKzCyyxMGzMHeSA== + dependencies: + "@types/bn.js" "^4.11.5" + "@types/node" "^12.12.6" + bignumber.js "^9.0.0" + web3-core-helpers "1.3.4" + web3-core-method "1.3.4" + web3-core-requestmanager "1.3.4" + web3-utils "1.3.4" + + web3-eth-abi@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.2.11.tgz#a887494e5d447c2926d557a3834edd66e17af9b0" + integrity sha512-PkRYc0+MjuLSgg03QVWqWlQivJqRwKItKtEpRUaxUAeLE7i/uU39gmzm2keHGcQXo3POXAbOnMqkDvOep89Crg== + dependencies: + "@ethersproject/abi" "5.0.0-beta.153" + underscore "1.9.1" + web3-utils "1.2.11" + + web3-eth-abi@1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.2.9.tgz#14bedd7e4be04fcca35b2ac84af1400574cd8280" + integrity sha512-3YwUYbh/DMfDbhMWEebAdjSd5bj3ZQieOjLzWFHU23CaLEqT34sUix1lba+hgUH/EN6A7bKAuKOhR3p0OvTn7Q== + dependencies: + "@ethersproject/abi" "5.0.0-beta.153" + underscore "1.9.1" + web3-utils "1.2.9" + + web3-eth-abi@1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.3.4.tgz#10f5d8b6080dbb6cbaa1bcef7e0c70573da6566f" + integrity sha512-PVSLXJ2dzdXsC+R24llIIEOS6S1KhG5qwNznJjJvXZFe3sqgdSe47eNvwUamZtCBjcrdR/HQr+L/FTxqJSf80Q== + dependencies: + "@ethersproject/abi" "5.0.7" + underscore "1.9.1" + web3-utils "1.3.4" + + web3-eth-accounts@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.2.11.tgz#a9e3044da442d31903a7ce035a86d8fa33f90520" + integrity sha512-6FwPqEpCfKIh3nSSGeo3uBm2iFSnFJDfwL3oS9pyegRBXNsGRVpgiW63yhNzL0796StsvjHWwQnQHsZNxWAkGw== + dependencies: + crypto-browserify "3.12.0" + eth-lib "0.2.8" + ethereumjs-common "^1.3.2" + ethereumjs-tx "^2.1.1" + scrypt-js "^3.0.1" + underscore "1.9.1" + uuid "3.3.2" + web3-core "1.2.11" + web3-core-helpers "1.2.11" + web3-core-method "1.2.11" + web3-utils "1.2.11" + + web3-eth-accounts@1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.2.9.tgz#7ec422df90fecb5243603ea49dc28726db7bdab6" + integrity sha512-jkbDCZoA1qv53mFcRHCinoCsgg8WH+M0YUO1awxmqWXRmCRws1wW0TsuSQ14UThih5Dxolgl+e+aGWxG58LMwg== + dependencies: + crypto-browserify "3.12.0" + eth-lib "^0.2.8" + ethereumjs-common "^1.3.2" + ethereumjs-tx "^2.1.1" + scrypt-js "^3.0.1" + underscore "1.9.1" + uuid "3.3.2" + web3-core "1.2.9" + web3-core-helpers "1.2.9" + web3-core-method "1.2.9" + web3-utils "1.2.9" + + web3-eth-accounts@1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.3.4.tgz#cf513d78531c13ce079a5e7862820570350e79a5" + integrity sha512-gz9ReSmQEjqbYAjpmAx+UZF4CVMbyS4pfjSYWGAnNNI+Xz0f0u0kCIYXQ1UEaE+YeLcYiE+ZlZdgg6YoatO5nA== + dependencies: + crypto-browserify "3.12.0" + eth-lib "0.2.8" + ethereumjs-common "^1.3.2" + ethereumjs-tx "^2.1.1" + scrypt-js "^3.0.1" + underscore "1.9.1" + uuid "3.3.2" + web3-core "1.3.4" + web3-core-helpers "1.3.4" + web3-core-method "1.3.4" + web3-utils "1.3.4" + + web3-eth-contract@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.2.11.tgz#917065902bc27ce89da9a1da26e62ef663663b90" + integrity sha512-MzYuI/Rq2o6gn7vCGcnQgco63isPNK5lMAan2E51AJLknjSLnOxwNY3gM8BcKoy4Z+v5Dv00a03Xuk78JowFow== + dependencies: + "@types/bn.js" "^4.11.5" + underscore "1.9.1" + web3-core "1.2.11" + web3-core-helpers "1.2.11" + web3-core-method "1.2.11" + web3-core-promievent "1.2.11" + web3-core-subscriptions "1.2.11" + web3-eth-abi "1.2.11" + web3-utils "1.2.11" + + web3-eth-contract@1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.2.9.tgz#713d9c6d502d8c8f22b696b7ffd8e254444e6bfd" + integrity sha512-PYMvJf7EG/HyssUZa+pXrc8IB06K/YFfWYyW4R7ed3sab+9wWUys1TlWxBCBuiBXOokSAyM6H6P6/cKEx8FT8Q== + dependencies: + "@types/bn.js" "^4.11.4" + underscore "1.9.1" + web3-core "1.2.9" + web3-core-helpers "1.2.9" + web3-core-method "1.2.9" + web3-core-promievent "1.2.9" + web3-core-subscriptions "1.2.9" + web3-eth-abi "1.2.9" + web3-utils "1.2.9" + + web3-eth-contract@1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.3.4.tgz#1ea2dd71be0c4a9cf4772d4f75dbb2fa99751472" + integrity sha512-Fvy8ZxUksQY2ePt+XynFfOiSqxgQtMn4m2NJs6VXRl2Inl17qyRi/nIJJVKTcENLocm+GmZ/mxq2eOE5u02nPg== + dependencies: + "@types/bn.js" "^4.11.5" + underscore "1.9.1" + web3-core "1.3.4" + web3-core-helpers "1.3.4" + web3-core-method "1.3.4" + web3-core-promievent "1.3.4" + web3-core-subscriptions "1.3.4" + web3-eth-abi "1.3.4" + web3-utils "1.3.4" + + web3-eth-ens@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.2.11.tgz#26d4d7f16d6cbcfff918e39832b939edc3162532" + integrity sha512-dbW7dXP6HqT1EAPvnniZVnmw6TmQEKF6/1KgAxbo8iBBYrVTMDGFQUUnZ+C4VETGrwwaqtX4L9d/FrQhZ6SUiA== + dependencies: + content-hash "^2.5.2" + eth-ens-namehash "2.0.8" + underscore "1.9.1" + web3-core "1.2.11" + web3-core-helpers "1.2.11" + web3-core-promievent "1.2.11" + web3-eth-abi "1.2.11" + web3-eth-contract "1.2.11" + web3-utils "1.2.11" + + web3-eth-ens@1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.2.9.tgz#577b9358c036337833fb2bdc59c11be7f6f731b6" + integrity sha512-kG4+ZRgZ8I1WYyOBGI8QVRHfUSbbJjvJAGA1AF/NOW7JXQ+x7gBGeJw6taDWJhSshMoEKWcsgvsiuoG4870YxQ== + dependencies: + content-hash "^2.5.2" + eth-ens-namehash "2.0.8" + underscore "1.9.1" + web3-core "1.2.9" + web3-core-helpers "1.2.9" + web3-core-promievent "1.2.9" + web3-eth-abi "1.2.9" + web3-eth-contract "1.2.9" + web3-utils "1.2.9" + + web3-eth-ens@1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.3.4.tgz#a7e4bb18481fb0e2ce5bfb3b3da2fbb0ad78cefe" + integrity sha512-b0580tQyQwpV2wyacwQiBEfQmjCUln5iPhge3IBIMXaI43BUNtH3lsCL9ERFQeOdweB4o+6rYyNYr6xbRcSytg== + dependencies: + content-hash "^2.5.2" + eth-ens-namehash "2.0.8" + underscore "1.9.1" + web3-core "1.3.4" + web3-core-helpers "1.3.4" + web3-core-promievent "1.3.4" + web3-eth-abi "1.3.4" + web3-eth-contract "1.3.4" + web3-utils "1.3.4" + + web3-eth-iban@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.2.11.tgz#f5f73298305bc7392e2f188bf38a7362b42144ef" + integrity sha512-ozuVlZ5jwFC2hJY4+fH9pIcuH1xP0HEFhtWsR69u9uDIANHLPQQtWYmdj7xQ3p2YT4bQLq/axKhZi7EZVetmxQ== + dependencies: + bn.js "^4.11.9" + web3-utils "1.2.11" + + web3-eth-iban@1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.2.9.tgz#4ebf3d8783f34d04c4740dc18938556466399f7a" + integrity sha512-RtdVvJE0pyg9dHLy0GzDiqgnLnssSzfz/JYguhC1wsj9+Gnq1M6Diy3NixACWUAp6ty/zafyOaZnNQ+JuH9TjQ== + dependencies: + bn.js "4.11.8" + web3-utils "1.2.9" + + web3-eth-iban@1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.3.4.tgz#5eb7a564e0dcf68730d68f48f95dd207cd173d81" + integrity sha512-Y7/hLjVvIN/OhaAyZ8L/hxbTqVX6AFTl2RwUXR6EEU9oaLydPcMjAx/Fr8mghUvQS3QJSr+UGubP3W4SkyNiYw== + dependencies: + bn.js "^4.11.9" + web3-utils "1.3.4" + + web3-eth-personal@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.2.11.tgz#a38b3942a1d87a62070ce0622a941553c3d5aa70" + integrity sha512-42IzUtKq9iHZ8K9VN0vAI50iSU9tOA1V7XU2BhF/tb7We2iKBVdkley2fg26TxlOcKNEHm7o6HRtiiFsVK4Ifw== + dependencies: + "@types/node" "^12.12.6" + web3-core "1.2.11" + web3-core-helpers "1.2.11" + web3-core-method "1.2.11" + web3-net "1.2.11" + web3-utils "1.2.11" + + web3-eth-personal@1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.2.9.tgz#9b95eb159b950b83cd8ae15873e1d57711b7a368" + integrity sha512-cFiNrktxZ1C/rIdJFzQTvFn3/0zcsR3a+Jf8Y3KxeQDHszQtosjLWptP7bsUmDwEh4hzh0Cy3KpOxlYBWB8bJQ== + dependencies: + "@types/node" "^12.6.1" + web3-core "1.2.9" + web3-core-helpers "1.2.9" + web3-core-method "1.2.9" + web3-net "1.2.9" + web3-utils "1.2.9" + + web3-eth-personal@1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.3.4.tgz#0d0e0abea3447283d7ee5658ed312990c9bf48dd" + integrity sha512-JiTbaktYVk1j+S2EDooXAhw5j/VsdvZfKRmHtXUe/HizPM9ETXmj1+ne4RT6m+950jQ7DJwUF3XU1FKYNtEDwQ== + dependencies: + "@types/node" "^12.12.6" + web3-core "1.3.4" + web3-core-helpers "1.3.4" + web3-core-method "1.3.4" + web3-net "1.3.4" + web3-utils "1.3.4" + + web3-eth@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.2.11.tgz#4c81fcb6285b8caf544058fba3ae802968fdc793" + integrity sha512-REvxW1wJ58AgHPcXPJOL49d1K/dPmuw4LjPLBPStOVkQjzDTVmJEIsiLwn2YeuNDd4pfakBwT8L3bz1G1/wVsQ== + dependencies: + underscore "1.9.1" + web3-core "1.2.11" + web3-core-helpers "1.2.11" + web3-core-method "1.2.11" + web3-core-subscriptions "1.2.11" + web3-eth-abi "1.2.11" + web3-eth-accounts "1.2.11" + web3-eth-contract "1.2.11" + web3-eth-ens "1.2.11" + web3-eth-iban "1.2.11" + web3-eth-personal "1.2.11" + web3-net "1.2.11" + web3-utils "1.2.11" + + web3-eth@1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.2.9.tgz#e40e7b88baffc9b487193211c8b424dc944977b3" + integrity sha512-sIKO4iE9FEBa/CYUd6GdPd7GXt/wISqxUd8PlIld6+hvMJj02lgO7Z7p5T9mZIJcIZJGvZX81ogx8oJ9yif+Ag== + dependencies: + underscore "1.9.1" + web3-core "1.2.9" + web3-core-helpers "1.2.9" + web3-core-method "1.2.9" + web3-core-subscriptions "1.2.9" + web3-eth-abi "1.2.9" + web3-eth-accounts "1.2.9" + web3-eth-contract "1.2.9" + web3-eth-ens "1.2.9" + web3-eth-iban "1.2.9" + web3-eth-personal "1.2.9" + web3-net "1.2.9" + web3-utils "1.2.9" + + web3-eth@1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.3.4.tgz#7c4607685e66a1c43e3e315e526c959f24f96907" + integrity sha512-8OIVMLbvmx+LB5RZ4tDhXuFGWSdNMrCZ4HM0+PywQ08uEcmAcqTMFAn4vdPii+J8gCatZR501r1KdzX3SDLoPw== + dependencies: + underscore "1.9.1" + web3-core "1.3.4" + web3-core-helpers "1.3.4" + web3-core-method "1.3.4" + web3-core-subscriptions "1.3.4" + web3-eth-abi "1.3.4" + web3-eth-accounts "1.3.4" + web3-eth-contract "1.3.4" + web3-eth-ens "1.3.4" + web3-eth-iban "1.3.4" + web3-eth-personal "1.3.4" + web3-net "1.3.4" + web3-utils "1.3.4" + + web3-net@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.2.11.tgz#eda68ef25e5cdb64c96c39085cdb74669aabbe1b" + integrity sha512-sjrSDj0pTfZouR5BSTItCuZ5K/oZPVdVciPQ6981PPPIwJJkCMeVjD7I4zO3qDPCnBjBSbWvVnLdwqUBPtHxyg== + dependencies: + web3-core "1.2.11" + web3-core-method "1.2.11" + web3-utils "1.2.11" + + web3-net@1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.2.9.tgz#51d248ed1bc5c37713c4ac40c0073d9beacd87d3" + integrity sha512-d2mTn8jPlg+SI2hTj2b32Qan6DmtU9ap/IUlJTeQbZQSkTLf0u9suW8Vjwyr4poJYXTurdSshE7OZsPNn30/ZA== + dependencies: + web3-core "1.2.9" + web3-core-method "1.2.9" + web3-utils "1.2.9" + + web3-net@1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.3.4.tgz#d76158bf0b4a7b3b14352b4f95472db9efc57a2a" + integrity sha512-wVyqgVC3Zt/0uGnBiR3GpnsS8lvOFTDgWZMxAk9C6Guh8aJD9MUc7pbsw5rHrPUVe6S6RUfFJvh/Xq8oMIQgSw== + dependencies: + web3-core "1.3.4" + web3-core-method "1.3.4" + web3-utils "1.3.4" + + web3-provider-engine@14.2.1: + version "14.2.1" + resolved "https://registry.yarnpkg.com/web3-provider-engine/-/web3-provider-engine-14.2.1.tgz#ef351578797bf170e08d529cb5b02f8751329b95" + integrity sha512-iSv31h2qXkr9vrL6UZDm4leZMc32SjWJFGOp/D92JXfcEboCqraZyuExDkpxKw8ziTufXieNM7LSXNHzszYdJw== + dependencies: + async "^2.5.0" + backoff "^2.5.0" + clone "^2.0.0" + cross-fetch "^2.1.0" + eth-block-tracker "^3.0.0" + eth-json-rpc-infura "^3.1.0" + eth-sig-util "^1.4.2" + ethereumjs-block "^1.2.2" + ethereumjs-tx "^1.2.0" + ethereumjs-util "^5.1.5" + ethereumjs-vm "^2.3.4" + json-rpc-error "^2.0.0" + json-stable-stringify "^1.0.1" + promise-to-callback "^1.0.0" + readable-stream "^2.2.9" + request "^2.85.0" + semaphore "^1.0.3" + ws "^5.1.1" + xhr "^2.2.0" + xtend "^4.0.1" + + web3-providers-http@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.2.11.tgz#1cd03442c61670572d40e4dcdf1faff8bd91e7c6" + integrity sha512-psh4hYGb1+ijWywfwpB2cvvOIMISlR44F/rJtYkRmQ5jMvG4FOCPlQJPiHQZo+2cc3HbktvvSJzIhkWQJdmvrA== + dependencies: + web3-core-helpers "1.2.11" + xhr2-cookies "1.1.0" + + web3-providers-http@1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.2.9.tgz#e698aa5377e2019c24c5a1e6efa0f51018728934" + integrity sha512-F956tCIj60Ttr0UvEHWFIhx+be3He8msoPzyA44/kfzzYoMAsCFRn5cf0zQG6al0znE75g6HlWVSN6s3yAh51A== + dependencies: + web3-core-helpers "1.2.9" + xhr2-cookies "1.1.0" + + web3-providers-http@1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.3.4.tgz#89389e18e27148faa2fef58842740ffadbdda8cc" + integrity sha512-aIg/xHXvxpqpFU70sqfp+JC3sGkLfAimRKTUhG4oJZ7U+tTcYTHoxBJj+4A3Id4JAoKiiv0k1/qeyQ8f3rMC3g== + dependencies: + web3-core-helpers "1.3.4" + xhr2-cookies "1.1.0" + + web3-providers-ipc@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.2.11.tgz#d16d6c9be1be6e0b4f4536c4acc16b0f4f27ef21" + integrity sha512-yhc7Y/k8hBV/KlELxynWjJDzmgDEDjIjBzXK+e0rHBsYEhdCNdIH5Psa456c+l0qTEU2YzycF8VAjYpWfPnBpQ== + dependencies: + oboe "2.1.4" + underscore "1.9.1" + web3-core-helpers "1.2.11" + + web3-providers-ipc@1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.2.9.tgz#6159eacfcd7ac31edc470d93ef10814fe874763b" + integrity sha512-NQ8QnBleoHA2qTJlqoWu7EJAD/FR5uimf7Ielzk4Z2z+m+6UAuJdJMSuQNj+Umhz9L/Ys6vpS1vHx9NizFl+aQ== + dependencies: + oboe "2.1.4" + underscore "1.9.1" + web3-core-helpers "1.2.9" + + web3-providers-ipc@1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.3.4.tgz#b963518989b1b7847063cdd461ff73b83855834a" + integrity sha512-E0CvXEJElr/TIlG1YfJeO3Le5NI/4JZM+1SsEdiPIfBUAJN18oOoum138EBGKv5+YaLKZUtUuJSXWjIIOR/0Ig== + dependencies: + oboe "2.1.5" + underscore "1.9.1" + web3-core-helpers "1.3.4" + + web3-providers-ws@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.2.11.tgz#a1dfd6d9778d840561d9ec13dd453046451a96bb" + integrity sha512-ZxnjIY1Er8Ty+cE4migzr43zA/+72AF1myzsLaU5eVgdsfV7Jqx7Dix1hbevNZDKFlSoEyq/3j/jYalh3So1Zg== + dependencies: + eventemitter3 "4.0.4" + underscore "1.9.1" + web3-core-helpers "1.2.11" + websocket "^1.0.31" + + web3-providers-ws@1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.2.9.tgz#22c2006655ec44b4ad2b41acae62741a6ae7a88c" + integrity sha512-6+UpvINeI//dglZoAKStUXqxDOXJy6Iitv2z3dbgInG4zb8tkYl/VBDL80UjUg3ZvzWG0g7EKY2nRPEpON2TFA== + dependencies: + eventemitter3 "^4.0.0" + underscore "1.9.1" + web3-core-helpers "1.2.9" + websocket "^1.0.31" + + web3-providers-ws@1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.3.4.tgz#b94c2e0ec51a0c472abdec53a472b5bf8176bec1" + integrity sha512-WBd9hk2fUAdrbA3kUyUk94ZeILtE6txLeoVVvIKAw2bPegx+RjkLyxC1Du0oceKgQ/qQWod8CCzl1E/GgTP+MQ== + dependencies: + eventemitter3 "4.0.4" + underscore "1.9.1" + web3-core-helpers "1.3.4" + websocket "^1.0.32" + + web3-shh@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.2.11.tgz#f5d086f9621c9a47e98d438010385b5f059fd88f" + integrity sha512-B3OrO3oG1L+bv3E1sTwCx66injW1A8hhwpknDUbV+sw3fehFazA06z9SGXUefuFI1kVs4q2vRi0n4oCcI4dZDg== + dependencies: + web3-core "1.2.11" + web3-core-method "1.2.11" + web3-core-subscriptions "1.2.11" + web3-net "1.2.11" + + web3-shh@1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.2.9.tgz#c4ba70d6142cfd61341a50752d8cace9a0370911" + integrity sha512-PWa8b/EaxaMinFaxy6cV0i0EOi2M7a/ST+9k9nhyhCjVa2vzXuNoBNo2IUOmeZ0WP2UQB8ByJ2+p4htlJaDOjA== + dependencies: + web3-core "1.2.9" + web3-core-method "1.2.9" + web3-core-subscriptions "1.2.9" + web3-net "1.2.9" + + web3-shh@1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.3.4.tgz#b7d29e118f26416c1a74575e585be379cc01a77a" + integrity sha512-zoeww5mxLh3xKcqbX85irQbtFe5pc5XwrgjvmdMkhkOdZzPASlWOgqzUFtaPykpLwC3yavVx4jG5RqifweXLUA== + dependencies: + web3-core "1.3.4" + web3-core-method "1.3.4" + web3-core-subscriptions "1.3.4" + web3-net "1.3.4" + + web3-utils@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.2.11.tgz#af1942aead3fb166ae851a985bed8ef2c2d95a82" + integrity sha512-3Tq09izhD+ThqHEaWYX4VOT7dNPdZiO+c/1QMA0s5X2lDFKK/xHJb7cyTRRVzN2LvlHbR7baS1tmQhSua51TcQ== + dependencies: + bn.js "^4.11.9" + eth-lib "0.2.8" + ethereum-bloom-filters "^1.0.6" + ethjs-unit "0.1.6" + number-to-bn "1.7.0" + randombytes "^2.1.0" + underscore "1.9.1" + utf8 "3.0.0" + + web3-utils@1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.2.9.tgz#abe11735221627da943971ef1a630868fb9c61f3" + integrity sha512-9hcpuis3n/LxFzEVjwnVgvJzTirS2S9/MiNAa7l4WOEoywY+BSNwnRX4MuHnjkh9NY25B6QOjuNG6FNnSjTw1w== + dependencies: + bn.js "4.11.8" + eth-lib "0.2.7" + ethereum-bloom-filters "^1.0.6" + ethjs-unit "0.1.6" + number-to-bn "1.7.0" + randombytes "^2.1.0" + underscore "1.9.1" + utf8 "3.0.0" + + web3-utils@1.3.4, web3-utils@^1.0.0-beta.31, web3-utils@^1.3.0: + version "1.3.4" + resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.3.4.tgz#9b1aa30d7549f860b573e7bb7e690999e7192198" + integrity sha512-/vC2v0MaZNpWooJfpRw63u0Y3ag2gNjAWiLtMSL6QQLmCqCy4SQIndMt/vRyx0uMoeGt1YTwSXEcHjUzOhLg0A== + dependencies: + bn.js "^4.11.9" + eth-lib "0.2.8" + ethereum-bloom-filters "^1.0.6" + ethjs-unit "0.1.6" + number-to-bn "1.7.0" + randombytes "^2.1.0" + underscore "1.9.1" + utf8 "3.0.0" + + web3@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3/-/web3-1.2.11.tgz#50f458b2e8b11aa37302071c170ed61cff332975" + integrity sha512-mjQ8HeU41G6hgOYm1pmeH0mRAeNKJGnJEUzDMoerkpw7QUQT4exVREgF1MYPvL/z6vAshOXei25LE/t/Bxl8yQ== + dependencies: + web3-bzz "1.2.11" + web3-core "1.2.11" + web3-eth "1.2.11" + web3-eth-personal "1.2.11" + web3-net "1.2.11" + web3-shh "1.2.11" + web3-utils "1.2.11" + + web3@1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/web3/-/web3-1.2.9.tgz#cbcf1c0fba5e213a6dfb1f2c1f4b37062e4ce337" + integrity sha512-Mo5aBRm0JrcNpN/g4VOrDzudymfOnHRC3s2VarhYxRA8aWgF5rnhQ0ziySaugpic1gksbXPe105pUWyRqw8HUA== + dependencies: + web3-bzz "1.2.9" + web3-core "1.2.9" + web3-eth "1.2.9" + web3-eth-personal "1.2.9" + web3-net "1.2.9" + web3-shh "1.2.9" + web3-utils "1.2.9" + + web3@^1.0.0-beta.34: + version "1.3.4" + resolved "https://registry.yarnpkg.com/web3/-/web3-1.3.4.tgz#31e014873360aa5840eb17f9f171190c967cffb7" + integrity sha512-D6cMb2EtTMLHgdGbkTPGl/Qi7DAfczR+Lp7iFX3bcu/bsD9V8fZW69hA8v5cRPNGzXUwVQebk3bS17WKR4cD2w== + dependencies: + web3-bzz "1.3.4" + web3-core "1.3.4" + web3-eth "1.3.4" + web3-eth-personal "1.3.4" + web3-net "1.3.4" + web3-shh "1.3.4" + web3-utils "1.3.4" + + websocket@1.0.32, websocket@^1.0.31, websocket@^1.0.32: + version "1.0.32" + resolved "https://registry.yarnpkg.com/websocket/-/websocket-1.0.32.tgz#1f16ddab3a21a2d929dec1687ab21cfdc6d3dbb1" + integrity sha512-i4yhcllSP4wrpoPMU2N0TQ/q0O94LRG/eUQjEAamRltjQ1oT1PFFKOG4i877OlJgCG8rw6LrrowJp+TYCEWF7Q== + dependencies: + bufferutil "^4.0.1" + debug "^2.2.0" + es5-ext "^0.10.50" + typedarray-to-buffer "^3.1.5" + utf-8-validate "^5.0.2" + yaeti "^0.0.6" + + whatwg-fetch@2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz#dde6a5df315f9d39991aa17621853d720b85566f" + integrity sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng== + + which-boxed-primitive@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" + integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== + dependencies: + is-bigint "^1.0.1" + is-boolean-object "^1.1.0" + is-number-object "^1.0.4" + is-string "^1.0.5" + is-symbol "^1.0.3" + + which-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" + integrity sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8= + + which-module@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" + integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= + + which-typed-array@^1.1.2: + version "1.1.4" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.4.tgz#8fcb7d3ee5adf2d771066fba7cf37e32fe8711ff" + integrity sha512-49E0SpUe90cjpoc7BOJwyPHRqSAd12c10Qm2amdEZrJPCY2NDxaW01zHITrem+rnETY3dwrbH3UUrUwagfCYDA== + dependencies: + available-typed-arrays "^1.0.2" + call-bind "^1.0.0" + es-abstract "^1.18.0-next.1" + foreach "^2.0.5" + function-bind "^1.1.1" + has-symbols "^1.0.1" + is-typed-array "^1.1.3" + + which@1.3.1, which@^1.1.1, which@^1.2.9, which@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== + dependencies: + isexe "^2.0.0" + + which@2.0.2, which@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + + wide-align@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" + integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== + dependencies: + string-width "^1.0.2 || 2" + + window-size@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.2.0.tgz#b4315bb4214a3d7058ebeee892e13fa24d98b075" + integrity sha1-tDFbtCFKPXBY6+7okuE/ok2YsHU= + + word-wrap@^1.2.3, word-wrap@~1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" + integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== + + wordwrap@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" + integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= + + workerpool@6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.0.2.tgz#e241b43d8d033f1beb52c7851069456039d1d438" + integrity sha512-DSNyvOpFKrNusaaUwk+ej6cBj1bmhLcBfj80elGk+ZIo5JSkq+unB1dLKEOcNfJDZgjGICfhQ0Q5TbP0PvF4+Q== + + wrap-ansi@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" + integrity sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU= + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + + wrap-ansi@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" + integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== + dependencies: + ansi-styles "^3.2.0" + string-width "^3.0.0" + strip-ansi "^5.0.0" + + wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + + write@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/write/-/write-1.0.3.tgz#0800e14523b923a387e415123c865616aae0f5c3" + integrity sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig== + dependencies: + mkdirp "^0.5.1" + + ws@7.2.3: + version "7.2.3" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.2.3.tgz#a5411e1fb04d5ed0efee76d26d5c46d830c39b46" + integrity sha512-HTDl9G9hbkNDk98naoR/cHDws7+EyYMOdL1BmjsZXRUjf7d+MficC4B7HLUPlSiho0vg+CWKrGIt/VJBd1xunQ== + + ws@^3.0.0: + version "3.3.3" + resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.3.tgz#f1cf84fe2d5e901ebce94efaece785f187a228f2" + integrity sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA== + dependencies: + async-limiter "~1.0.0" + safe-buffer "~5.1.0" + ultron "~1.1.0" + + ws@^5.1.1: + version "5.2.2" + resolved "https://registry.yarnpkg.com/ws/-/ws-5.2.2.tgz#dffef14866b8e8dc9133582514d1befaf96e980f" + integrity sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA== + dependencies: + async-limiter "~1.0.0" + + ws@^7.2.1: + version "7.4.4" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.4.tgz#383bc9742cb202292c9077ceab6f6047b17f2d59" + integrity sha512-Qm8k8ojNQIMx7S+Zp8u/uHOx7Qazv3Yv4q68MiWWWOJhiwG5W3x7iqmRtJo8xxrciZUY4vRxUTJCKuRnF28ZZw== + + xhr-request-promise@^0.1.2: + version "0.1.3" + resolved "https://registry.yarnpkg.com/xhr-request-promise/-/xhr-request-promise-0.1.3.tgz#2d5f4b16d8c6c893be97f1a62b0ed4cf3ca5f96c" + integrity sha512-YUBytBsuwgitWtdRzXDDkWAXzhdGB8bYm0sSzMPZT7Z2MBjMSTHFsyCT1yCRATY+XC69DUrQraRAEgcoCRaIPg== + dependencies: + xhr-request "^1.1.0" + + xhr-request@^1.0.1, xhr-request@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/xhr-request/-/xhr-request-1.1.0.tgz#f4a7c1868b9f198723444d82dcae317643f2e2ed" + integrity sha512-Y7qzEaR3FDtL3fP30k9wO/e+FBnBByZeybKOhASsGP30NIkRAAkKD/sCnLvgEfAIEC1rcmK7YG8f4oEnIrrWzA== + dependencies: + buffer-to-arraybuffer "^0.0.5" + object-assign "^4.1.1" + query-string "^5.0.1" + simple-get "^2.7.0" + timed-out "^4.0.1" + url-set-query "^1.0.0" + xhr "^2.0.4" + + xhr2-cookies@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/xhr2-cookies/-/xhr2-cookies-1.1.0.tgz#7d77449d0999197f155cb73b23df72505ed89d48" + integrity sha1-fXdEnQmZGX8VXLc7I99yUF7YnUg= + dependencies: + cookiejar "^2.1.1" + + xhr@^2.0.4, xhr@^2.3.3: + version "2.5.0" + resolved "https://registry.yarnpkg.com/xhr/-/xhr-2.5.0.tgz#bed8d1676d5ca36108667692b74b316c496e49dd" + integrity sha512-4nlO/14t3BNUZRXIXfXe+3N6w3s1KoxcJUUURctd64BLRe67E4gRwp4PjywtDY72fXpZ1y6Ch0VZQRY/gMPzzQ== + dependencies: + global "~4.3.0" + is-function "^1.0.1" + parse-headers "^2.0.0" + xtend "^4.0.0" + + xhr@^2.2.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/xhr/-/xhr-2.6.0.tgz#b69d4395e792b4173d6b7df077f0fc5e4e2b249d" + integrity sha512-/eCGLb5rxjx5e3mF1A7s+pLlR6CGyqWN91fv1JgER5mVWg1MZmlhBvy9kjcsOdRk8RrIujotWyJamfyrp+WIcA== + dependencies: + global "~4.4.0" + is-function "^1.0.1" + parse-headers "^2.0.0" + xtend "^4.0.0" + + xmlhttprequest@1.8.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz#67fe075c5c24fef39f9d65f5f7b7fe75171968fc" + integrity sha1-Z/4HXFwk/vOfnWX197f+dRcZaPw= + + xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.0, xtend@~4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" + integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== + + xtend@~2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-2.1.2.tgz#6efecc2a4dad8e6962c4901b337ce7ba87b5d28b" + integrity sha1-bv7MKk2tjmlixJAbM3znuoe10os= + dependencies: + object-keys "~0.4.0" + + y18n@^3.2.1: + version "3.2.2" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.2.tgz#85c901bd6470ce71fc4bb723ad209b70f7f28696" + integrity sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ== + + y18n@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.1.tgz#8db2b83c31c5d75099bb890b23f3094891e247d4" + integrity sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ== + + yaeti@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/yaeti/-/yaeti-0.0.6.tgz#f26f484d72684cf42bedfb76970aa1608fbf9577" + integrity sha1-8m9ITXJoTPQr7ft2lwqhYI+/lXc= + + yallist@^3.0.0, yallist@^3.0.2, yallist@^3.0.3: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" + integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== + + yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + + yargs-parser@13.1.2, yargs-parser@^13.1.0, yargs-parser@^13.1.2: + version "13.1.2" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" + integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + + yargs-parser@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-2.4.1.tgz#85568de3cf150ff49fa51825f03a8c880ddcc5c4" + integrity sha1-hVaN488VD/SfpRgl8DqMiA3cxcQ= + dependencies: + camelcase "^3.0.0" + lodash.assign "^4.0.6" + + yargs-parser@^20.2.7: + version "20.2.7" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.7.tgz#61df85c113edfb5a7a4e36eb8aa60ef423cbc90a" + integrity sha512-FiNkvbeHzB/syOjIUxFDCnhSfzAL8R5vs40MgLFBorXACCOAEaWu0gRZl14vG8MR9AOJIZbmkjhusqBYZ3HTHw== + + yargs-unparser@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-1.6.0.tgz#ef25c2c769ff6bd09e4b0f9d7c605fb27846ea9f" + integrity sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw== + dependencies: + flat "^4.1.0" + lodash "^4.17.15" + yargs "^13.3.0" + + yargs-unparser@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" + integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== + dependencies: + camelcase "^6.0.0" + decamelize "^4.0.0" + flat "^5.0.2" + is-plain-obj "^2.1.0" + + yargs@13.2.4: + version "13.2.4" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.2.4.tgz#0b562b794016eb9651b98bd37acf364aa5d6dc83" + integrity sha512-HG/DWAJa1PAnHT9JAhNa8AbAv3FPaiLzioSjCcmuXXhP8MlpHO5vwls4g4j6n30Z74GVQj8Xa62dWVx1QCGklg== + dependencies: + cliui "^5.0.0" + find-up "^3.0.0" + get-caller-file "^2.0.1" + os-locale "^3.1.0" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^3.0.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^13.1.0" + + yargs@13.3.2, yargs@^13.3.0: + version "13.3.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" + integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw== + dependencies: + cliui "^5.0.0" + find-up "^3.0.0" + get-caller-file "^2.0.1" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^3.0.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^13.1.2" + + yargs@^4.7.1: + version "4.8.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-4.8.1.tgz#c0c42924ca4aaa6b0e6da1739dfb216439f9ddc0" + integrity sha1-wMQpJMpKqmsObaFznfshZDn53cA= + dependencies: + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + lodash.assign "^4.0.3" + os-locale "^1.4.0" + read-pkg-up "^1.0.1" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^1.0.1" + which-module "^1.0.0" + window-size "^0.2.0" + y18n "^3.2.1" + yargs-parser "^2.4.1" + + yn@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" + integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== diff --git a/yarn.lock b/yarn.lock index cf3e45b..e44375b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,33 +2,40 @@ # yarn lockfile v1 -"@babel/code-frame@^7.0.0": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.10.4.tgz#168da1a36e90da68ae8d49c0f1b48c7c6249213a" - integrity sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg== +"@babel/code-frame@7.12.11": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f" + integrity sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw== dependencies: "@babel/highlight" "^7.10.4" -"@babel/helper-validator-identifier@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz#a78c7a7251e01f616512d31b10adcf52ada5e0d2" - integrity sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw== +"@babel/code-frame@^7.0.0": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.13.tgz#dcfc826beef65e75c50e21d3837d7d95798dd658" + integrity sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g== + dependencies: + "@babel/highlight" "^7.12.13" + +"@babel/helper-validator-identifier@^7.14.0": + version "7.14.0" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.0.tgz#d26cad8a47c65286b15df1547319a5d0bcf27288" + integrity sha512-V3ts7zMSu5lfiwWDVWzRDGIN+lnCEUdaXgtVHJgLb1rGaA6jMrtB9EmE7L18foXJIE8Un/A/h6NJfGQp/e1J4A== -"@babel/highlight@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.10.4.tgz#7d1bdfd65753538fabe6c38596cdb76d9ac60143" - integrity sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA== +"@babel/highlight@^7.10.4", "@babel/highlight@^7.12.13": + version "7.14.0" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.14.0.tgz#3197e375711ef6bf834e67d0daec88e4f46113cf" + integrity sha512-YSCOwxvTYEIMSGaBQb5kDDsCopDdiUGsqpatp3fOlI4+2HQSkTmEVWnVuySdAC5EWCqSWWTv0ib63RjR7dTBdg== dependencies: - "@babel/helper-validator-identifier" "^7.10.4" + "@babel/helper-validator-identifier" "^7.14.0" chalk "^2.0.0" js-tokens "^4.0.0" "@chainlink/contracts@^0.1.6": - version "0.1.6" - resolved "https://registry.yarnpkg.com/@chainlink/contracts/-/contracts-0.1.6.tgz#e4795565c723f99adaf6e97382cfb41dff0bcf91" - integrity sha512-RXKMm+3ADEi1c4/XsXy2Z1m0KQh7H6Nn0FWXmCgXRIorOBt7dvh52c0c41ONJfIhHB/tGeoXnp4lPnZEDqkocA== + version "0.1.7" + resolved "https://registry.yarnpkg.com/@chainlink/contracts/-/contracts-0.1.7.tgz#ff8e8f1fad5f0766d52ad515f83148f9d82cccad" + integrity sha512-txVkGrwFYnyLUC/I5hTe7yZK7fjmB6YFULfBHqryRuREUmGd4bdpXfrcUUsZycmWibanp69QVyQBpsDrPhWsjw== optionalDependencies: - "@truffle/contract" "^4.2.29" + "@truffle/contract" "^4.3.8" ethers "^4.0.45" "@ensdomains/ens@^0.4.4": @@ -47,10 +54,10 @@ resolved "https://registry.yarnpkg.com/@ensdomains/resolver/-/resolver-0.2.4.tgz#c10fe28bf5efbf49bff4666d909aed0265efbc89" integrity sha512-bvaTH34PMCbv6anRa9I/0zjLJgY4EuznbEMgbV77JBCQ9KNC46rzi0avuxpOfu+xDjPEtSFGqVEOr5GlUSGudA== -"@eslint/eslintrc@^0.2.1": - version "0.2.1" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.2.1.tgz#f72069c330461a06684d119384435e12a5d76e3c" - integrity sha512-XRUeBZ5zBWLYgSANMpThFddrZZkEbGHgUdt5UJjZfnlN9BGCiUBrf+nvbRupSjMvqzwnQN0qwCmOxITt1cfywA== +"@eslint/eslintrc@^0.4.1": + version "0.4.1" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.1.tgz#442763b88cecbe3ee0ec7ca6d6dd6168550cbf14" + integrity sha512-5v7TDE9plVhvxQeWLXDTvFvJBdH6pEsdnl2g/dAptmuFEPedQ4Erq5rsDsX+mvAM610IhNaO2W5V1dOOnDKxkQ== dependencies: ajv "^6.12.4" debug "^4.1.1" @@ -59,7 +66,6 @@ ignore "^4.0.6" import-fresh "^3.2.1" js-yaml "^3.13.1" - lodash "^4.17.19" minimatch "^3.0.4" strip-json-comments "^3.1.1" @@ -116,6 +122,76 @@ patch-package "^6.2.2" postinstall-postinstall "^2.1.0" +"@ethereumjs/block@^3.2.1", "@ethereumjs/block@^3.3.0": + version "3.3.0" + resolved "https://registry.yarnpkg.com/@ethereumjs/block/-/block-3.3.0.tgz#a1b3baec831c71c0d9e7f6145f25e919cff4939c" + integrity sha512-WoefY9Rs4W8vZTxG9qwntAlV61xsSv0NPoXmHO7x3SH16dwJQtU15YvahPCz4HEEXbu7GgGgNgu0pv8JY7VauA== + dependencies: + "@ethereumjs/common" "^2.3.0" + "@ethereumjs/tx" "^3.2.0" + ethereumjs-util "^7.0.10" + merkle-patricia-tree "^4.2.0" + +"@ethereumjs/blockchain@^5.2.1", "@ethereumjs/blockchain@^5.3.0": + version "5.3.0" + resolved "https://registry.yarnpkg.com/@ethereumjs/blockchain/-/blockchain-5.3.0.tgz#206936e30a4320d87a26e58d157eadef21ef6ff1" + integrity sha512-B0Y5QDZcRDQISPilv3m8nzk97QmC98DnSE9WxzGpCxfef22Mw7xhwGipci5Iy0dVC2Np2Cr5d3F6bHAR7+yVmQ== + dependencies: + "@ethereumjs/block" "^3.3.0" + "@ethereumjs/common" "^2.3.0" + "@ethereumjs/ethash" "^1.0.0" + debug "^2.2.0" + ethereumjs-util "^7.0.10" + level-mem "^5.0.1" + lru-cache "^5.1.1" + rlp "^2.2.4" + semaphore-async-await "^1.5.1" + +"@ethereumjs/common@^2.2.0", "@ethereumjs/common@^2.3.0": + version "2.3.0" + resolved "https://registry.yarnpkg.com/@ethereumjs/common/-/common-2.3.0.tgz#b1174fab8653565b4835a455d972dc2e89411896" + integrity sha512-Fmi15MdVptsC85n6NcUXIFiiXCXWEfZNgPWP+OGAQOC6ZtdzoNawtxH/cYpIgEgSuIzfOeX3VKQP/qVI1wISHg== + dependencies: + crc-32 "^1.2.0" + ethereumjs-util "^7.0.10" + +"@ethereumjs/ethash@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@ethereumjs/ethash/-/ethash-1.0.0.tgz#4e77f85b37be1ade5393e8719bdabac3e796ddaa" + integrity sha512-iIqnGG6NMKesyOxv2YctB2guOVX18qMAWlj3QlZyrc+GqfzLqoihti+cVNQnyNxr7eYuPdqwLQOFuPe6g/uKjw== + dependencies: + "@types/levelup" "^4.3.0" + buffer-xor "^2.0.1" + ethereumjs-util "^7.0.7" + miller-rabin "^4.0.0" + +"@ethereumjs/tx@^3.1.3", "@ethereumjs/tx@^3.2.0": + version "3.2.0" + resolved "https://registry.yarnpkg.com/@ethereumjs/tx/-/tx-3.2.0.tgz#2a816d5db67eb36059c8dc13f022f64e9b8d7ab9" + integrity sha512-D3X/XtZ3ldUg34hr99Jvj7NxW3NxVKdUKrwQnEWlAp4CmCQpvYoyn7NF4lk34rHEt7ScS+Agu01pcDHoOcd19A== + dependencies: + "@ethereumjs/common" "^2.3.0" + ethereumjs-util "^7.0.10" + +"@ethereumjs/vm@^5.3.2": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethereumjs/vm/-/vm-5.4.0.tgz#092d530388e855310406160f144d6f492800c0ea" + integrity sha512-0Mv51inp5S/mh+fKP0H90byT/5DdFirChUFUMhEjDlIBnHK55o/liKZ+0iNSLm6ZxX8iPs7urp11/UCoxPJfLA== + dependencies: + "@ethereumjs/block" "^3.3.0" + "@ethereumjs/blockchain" "^5.3.0" + "@ethereumjs/common" "^2.3.0" + "@ethereumjs/tx" "^3.2.0" + async-eventemitter "^0.2.4" + core-js-pure "^3.0.1" + debug "^2.2.0" + ethereumjs-util "^7.0.10" + functional-red-black-tree "^1.0.1" + mcl-wasm "^0.7.1" + merkle-patricia-tree "^4.2.0" + rustbn.js "~0.2.0" + util.promisify "^1.0.1" + "@ethersproject/abi@5.0.0-beta.153": version "5.0.0-beta.153" resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.0.0-beta.153.tgz#43a37172b33794e4562999f6e2d555b7599a8eee" @@ -161,7 +237,7 @@ "@ethersproject/properties" "^5.0.7" "@ethersproject/strings" "^5.0.8" -"@ethersproject/abi@5.0.7", "@ethersproject/abi@^5.0.0-beta.146", "@ethersproject/abi@^5.0.2", "@ethersproject/abi@^5.0.5": +"@ethersproject/abi@5.0.7", "@ethersproject/abi@^5.0.0-beta.146": version "5.0.7" resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.0.7.tgz#79e52452bd3ca2956d0e1c964207a58ad1a0ee7b" integrity sha512-Cqktk+hSIckwP/W8O47Eef60VwmoSC/L3lY0+dIBhQPCNn9E4V7rwmm2aFrNRRDJfFlGuZ1khkQUOc3oBX+niw== @@ -176,6 +252,21 @@ "@ethersproject/properties" "^5.0.3" "@ethersproject/strings" "^5.0.4" +"@ethersproject/abi@5.2.0", "@ethersproject/abi@^5.0.0", "@ethersproject/abi@^5.0.2", "@ethersproject/abi@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.2.0.tgz#e2ca0b7f7e3b83e4d427ed8b38fdc1c48e2bb00f" + integrity sha512-24ExfHa0VbIOUHbB36b6lCVmWkaIVmrd9/m8MICtmSsRKzlugWqUD0B8g0zrRylXNxAOc3V6T4xKJ8jEDSvp3w== + dependencies: + "@ethersproject/address" "^5.2.0" + "@ethersproject/bignumber" "^5.2.0" + "@ethersproject/bytes" "^5.2.0" + "@ethersproject/constants" "^5.2.0" + "@ethersproject/hash" "^5.2.0" + "@ethersproject/keccak256" "^5.2.0" + "@ethersproject/logger" "^5.2.0" + "@ethersproject/properties" "^5.2.0" + "@ethersproject/strings" "^5.2.0" + "@ethersproject/abstract-provider@5.0.10": version "5.0.10" resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.0.10.tgz#a533aed39a5f27312745c8c4c40fa25fc884831c" @@ -189,19 +280,6 @@ "@ethersproject/transactions" "^5.0.9" "@ethersproject/web" "^5.0.12" -"@ethersproject/abstract-provider@5.0.5", "@ethersproject/abstract-provider@^5.0.4": - version "5.0.5" - resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.0.5.tgz#797a32a8707830af1ad8f833e9c228994d5572b9" - integrity sha512-i/CjElAkzV7vQBAeoz+IpjGfcFYEP9eD7j3fzZ0fzTq03DO7PPnR+xkEZ1IoDXGwDS+55aLM1xvLDwB/Lx6IOQ== - dependencies: - "@ethersproject/bignumber" "^5.0.7" - "@ethersproject/bytes" "^5.0.4" - "@ethersproject/logger" "^5.0.5" - "@ethersproject/networks" "^5.0.3" - "@ethersproject/properties" "^5.0.3" - "@ethersproject/transactions" "^5.0.5" - "@ethersproject/web" "^5.0.6" - "@ethersproject/abstract-provider@5.0.9", "@ethersproject/abstract-provider@^5.0.8": version "5.0.9" resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.0.9.tgz#a55410b73e3994842884eb82b1f43e3a9f653eea" @@ -215,6 +293,19 @@ "@ethersproject/transactions" "^5.0.9" "@ethersproject/web" "^5.0.12" +"@ethersproject/abstract-provider@5.2.0", "@ethersproject/abstract-provider@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.2.0.tgz#b5c24b162f119b5d241738ded9555186013aa77d" + integrity sha512-Xi7Pt+CulRijc/vskBGIaYMEhafKjoNx8y4RNj/dnSpXHXScOJUSTtypqGBUngZddRbcwZGbHwEr6DZoKZwIZA== + dependencies: + "@ethersproject/bignumber" "^5.2.0" + "@ethersproject/bytes" "^5.2.0" + "@ethersproject/logger" "^5.2.0" + "@ethersproject/networks" "^5.2.0" + "@ethersproject/properties" "^5.2.0" + "@ethersproject/transactions" "^5.2.0" + "@ethersproject/web" "^5.2.0" + "@ethersproject/abstract-signer@5.0.13", "@ethersproject/abstract-signer@^5.0.10": version "5.0.13" resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.0.13.tgz#59b4d0367d6327ec53bc269c6730c44a4a3b043c" @@ -237,16 +328,16 @@ "@ethersproject/logger" "^5.0.8" "@ethersproject/properties" "^5.0.7" -"@ethersproject/abstract-signer@5.0.7", "@ethersproject/abstract-signer@^5.0.2", "@ethersproject/abstract-signer@^5.0.4", "@ethersproject/abstract-signer@^5.0.6": - version "5.0.7" - resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.0.7.tgz#cdbd3bd479edf77c71b7f6a6156b0275b1176ded" - integrity sha512-8W8gy/QutEL60EoMEpvxZ8MFAEWs/JvH5nmZ6xeLXoZvmBCasGmxqHdYjo2cxg0nevkPkq9SeenSsBBZSCx+SQ== +"@ethersproject/abstract-signer@5.2.0", "@ethersproject/abstract-signer@^5.0.0", "@ethersproject/abstract-signer@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.2.0.tgz#8e291fb6558b4190fb3e2fe440a9ffd092a2f459" + integrity sha512-JTXzLUrtoxpOEq1ecH86U7tstkEa9POKAGbGBb+gicbjGgzYYkLR4/LD83SX2/JNWvtYyY8t5errt5ehiy1gxQ== dependencies: - "@ethersproject/abstract-provider" "^5.0.4" - "@ethersproject/bignumber" "^5.0.7" - "@ethersproject/bytes" "^5.0.4" - "@ethersproject/logger" "^5.0.5" - "@ethersproject/properties" "^5.0.3" + "@ethersproject/abstract-provider" "^5.2.0" + "@ethersproject/bignumber" "^5.2.0" + "@ethersproject/bytes" "^5.2.0" + "@ethersproject/logger" "^5.2.0" + "@ethersproject/properties" "^5.2.0" "@ethersproject/address@5.0.10", "@ethersproject/address@^5.0.9": version "5.0.10" @@ -270,24 +361,16 @@ "@ethersproject/logger" "^5.0.8" "@ethersproject/rlp" "^5.0.7" -"@ethersproject/address@5.0.5", "@ethersproject/address@>=5.0.0-beta.128", "@ethersproject/address@^5.0.2", "@ethersproject/address@^5.0.4", "@ethersproject/address@^5.0.5": - version "5.0.5" - resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.0.5.tgz#2caa65f6b7125015395b1b54c985ee0b27059cc7" - integrity sha512-DpkQ6rwk9jTefrRsJzEm6nhRiJd9pvhn1xN0rw5N/jswXG5r7BLk/GVA0mMAVWAsYfvi2xSc5L41FMox43RYEA== - dependencies: - "@ethersproject/bignumber" "^5.0.7" - "@ethersproject/bytes" "^5.0.4" - "@ethersproject/keccak256" "^5.0.3" - "@ethersproject/logger" "^5.0.5" - "@ethersproject/rlp" "^5.0.3" - bn.js "^4.4.0" - -"@ethersproject/base64@5.0.4", "@ethersproject/base64@^5.0.3": - version "5.0.4" - resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.0.4.tgz#b0d8fdbf3dda977cf546dcd35725a7b1d5256caa" - integrity sha512-4KRykQ7BQMeOXfvio1YITwHjxwBzh92UoXIdzxDE1p53CK28bbHPdsPNYo0wl0El7lJAMpT2SOdL0hhbWRnyIA== +"@ethersproject/address@5.2.0", "@ethersproject/address@>=5.0.0-beta.128", "@ethersproject/address@^5.0.0", "@ethersproject/address@^5.0.2", "@ethersproject/address@^5.0.4", "@ethersproject/address@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.2.0.tgz#afcfa92db84582f54a60a9da361cea4aae450a69" + integrity sha512-2YfZlalWefOEfnr/CdqKRrgMgbKidYc+zG4/ilxSdcryZSux3eBU5/5btAT/hSiaHipUjd8UrWK8esCBHU6QNQ== dependencies: - "@ethersproject/bytes" "^5.0.4" + "@ethersproject/bignumber" "^5.2.0" + "@ethersproject/bytes" "^5.2.0" + "@ethersproject/keccak256" "^5.2.0" + "@ethersproject/logger" "^5.2.0" + "@ethersproject/rlp" "^5.2.0" "@ethersproject/base64@5.0.8", "@ethersproject/base64@^5.0.7": version "5.0.8" @@ -303,13 +386,12 @@ dependencies: "@ethersproject/bytes" "^5.0.9" -"@ethersproject/basex@5.0.4", "@ethersproject/basex@^5.0.3": - version "5.0.4" - resolved "https://registry.yarnpkg.com/@ethersproject/basex/-/basex-5.0.4.tgz#93e1cd11f9a47281da2389de24f88e13e9d90847" - integrity sha512-ixIr/kKiAoSzOnSc777AGIOAhKai5Ivqr4HO/Gz+YG+xkfv6kqD6AW4ga9vM20Wwb0QBhh3LoRWTu4V1K+x9Ew== +"@ethersproject/base64@5.2.0", "@ethersproject/base64@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.2.0.tgz#e01066d25e5b4e8a051545163bee5def47bd9534" + integrity sha512-D9wOvRE90QBI+yFsKMv0hnANiMzf40Xicq9JZbV9XYzh7srImmwmMcReU2wHjOs9FtEgSJo51Tt+sI1dKPYKDg== dependencies: - "@ethersproject/bytes" "^5.0.4" - "@ethersproject/properties" "^5.0.3" + "@ethersproject/bytes" "^5.2.0" "@ethersproject/basex@5.0.8", "@ethersproject/basex@^5.0.7": version "5.0.8" @@ -327,6 +409,14 @@ "@ethersproject/bytes" "^5.0.9" "@ethersproject/properties" "^5.0.7" +"@ethersproject/basex@5.2.0", "@ethersproject/basex@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/basex/-/basex-5.2.0.tgz#f921039e3bdfdab8c5a7ba8b21e81c83fc1ab98b" + integrity sha512-Oo7oX7BmaHLY/8ZsOLI5W0mrSwPBb1iboosN17jfK/4vGAtKjAInDai9I72CzN4NRJaMN5FkFLoPYywGqgGHlg== + dependencies: + "@ethersproject/bytes" "^5.2.0" + "@ethersproject/properties" "^5.2.0" + "@ethersproject/bignumber@5.0.14", "@ethersproject/bignumber@^5.0.13": version "5.0.14" resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.0.14.tgz#605bc61dcbd4a8c6df8b5a7a77c0210273f3de8a" @@ -345,13 +435,13 @@ "@ethersproject/logger" "^5.0.8" bn.js "^4.4.0" -"@ethersproject/bignumber@5.0.8", "@ethersproject/bignumber@>=5.0.0-beta.130", "@ethersproject/bignumber@^5.0.5", "@ethersproject/bignumber@^5.0.7", "@ethersproject/bignumber@^5.0.8": - version "5.0.8" - resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.0.8.tgz#cee33bd8eb0266176def0d371b45274b1d2c4ec0" - integrity sha512-KXFVAFKS1jdTXYN8BE5Oj+ZfPMh28iRdFeNGBVT6cUFdtiPVqeXqc0ggvBqA3A1VoFFGgM7oAeaagA393aORHA== +"@ethersproject/bignumber@5.2.0", "@ethersproject/bignumber@>=5.0.0-beta.130", "@ethersproject/bignumber@^5.0.0", "@ethersproject/bignumber@^5.0.7", "@ethersproject/bignumber@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.2.0.tgz#03f91ea740c5adb6f8c6a2e91bb4ee5ffaff5503" + integrity sha512-+MNQTxwV7GEiA4NH/i51UqQ+lY36O0rxPdV+0qzjFSySiyBlJpLk6aaa4UTvKmYWlI7YKZm6vuyCENeYn7qAOw== dependencies: - "@ethersproject/bytes" "^5.0.4" - "@ethersproject/logger" "^5.0.5" + "@ethersproject/bytes" "^5.2.0" + "@ethersproject/logger" "^5.2.0" bn.js "^4.4.0" "@ethersproject/bytes@5.0.10", "@ethersproject/bytes@^5.0.9": @@ -368,12 +458,12 @@ dependencies: "@ethersproject/logger" "^5.0.8" -"@ethersproject/bytes@5.0.5", "@ethersproject/bytes@>=5.0.0-beta.129", "@ethersproject/bytes@^5.0.2", "@ethersproject/bytes@^5.0.4": - version "5.0.5" - resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.0.5.tgz#688b70000e550de0c97a151a21f15b87d7f97d7c" - integrity sha512-IEj9HpZB+ACS6cZ+QQMTqmu/cnUK2fYNE6ms/PVxjoBjoxc6HCraLpam1KuRvreMy0i523PLmjN8OYeikRdcUQ== +"@ethersproject/bytes@5.2.0", "@ethersproject/bytes@>=5.0.0-beta.129", "@ethersproject/bytes@^5.0.0", "@ethersproject/bytes@^5.0.4", "@ethersproject/bytes@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.2.0.tgz#327917d5a1600f92fd2a9da4052fa6d974583132" + integrity sha512-O1CRpvJDnRTB47vvW8vyqojUZxVookb4LJv/s06TotriU3Xje5WFvlvXJu1yTchtxTz9BbvJw0lFXKpyO6Dn7w== dependencies: - "@ethersproject/logger" "^5.0.5" + "@ethersproject/logger" "^5.2.0" "@ethersproject/constants@5.0.10": version "5.0.10" @@ -382,13 +472,6 @@ dependencies: "@ethersproject/bignumber" "^5.0.13" -"@ethersproject/constants@5.0.5", "@ethersproject/constants@>=5.0.0-beta.128", "@ethersproject/constants@^5.0.4": - version "5.0.5" - resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.0.5.tgz#0ed19b002e8404bdf6d135234dc86a7d9bcf9b71" - integrity sha512-foaQVmxp2+ik9FrLUCtVrLZCj4M3Ibgkqvh+Xw/vFRSerkjVSYePApaVE5essxhoSlF1U9oXfWY09QI2AXtgKA== - dependencies: - "@ethersproject/bignumber" "^5.0.7" - "@ethersproject/constants@5.0.9", "@ethersproject/constants@^5.0.8": version "5.0.9" resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.0.9.tgz#81ac44c3bf612de63eb1c490b314ea1b932cda9f" @@ -396,6 +479,13 @@ dependencies: "@ethersproject/bignumber" "^5.0.13" +"@ethersproject/constants@5.2.0", "@ethersproject/constants@>=5.0.0-beta.128", "@ethersproject/constants@^5.0.4", "@ethersproject/constants@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.2.0.tgz#ccea78ce325f78abfe7358397c03eec570518d92" + integrity sha512-p+34YG0KbHS20NGdE+Ic0M6egzd7cDvcfoO9RpaAgyAYm3V5gJVqL7UynS87yCt6O6Nlx6wRFboPiM5ctAr+jA== + dependencies: + "@ethersproject/bignumber" "^5.2.0" + "@ethersproject/contracts@5.0.11": version "5.0.11" resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.0.11.tgz#e6cc57698a05be2329cb2ca3d7e87686f95e438a" @@ -426,20 +516,21 @@ "@ethersproject/logger" "^5.0.8" "@ethersproject/properties" "^5.0.7" -"@ethersproject/contracts@5.0.5", "@ethersproject/contracts@^5.0.2": - version "5.0.5" - resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.0.5.tgz#64831a341ec8ca225e83ff3e9437c26b970fd5d7" - integrity sha512-tFI255lFbmbqMkgnuyhDWHl3yWqttPlReplYuVvDCT/SuvBjLR4ad2uipBlh1fh5X1ipK9ettAoV4S0HKim4Kw== - dependencies: - "@ethersproject/abi" "^5.0.5" - "@ethersproject/abstract-provider" "^5.0.4" - "@ethersproject/abstract-signer" "^5.0.4" - "@ethersproject/address" "^5.0.4" - "@ethersproject/bignumber" "^5.0.7" - "@ethersproject/bytes" "^5.0.4" - "@ethersproject/constants" "^5.0.4" - "@ethersproject/logger" "^5.0.5" - "@ethersproject/properties" "^5.0.3" +"@ethersproject/contracts@5.2.0", "@ethersproject/contracts@^5.0.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.2.0.tgz#f54e12ec4a323f2bf93c338034839cc6dfc1e347" + integrity sha512-/2fg5tWPG6Z4pciEWpwGji3ggGA5j0ChVNF7NTmkOhvFrrJuWnRpzbvYA00nz8tBDNCOV3cwub5zfWRpgwYEJQ== + dependencies: + "@ethersproject/abi" "^5.2.0" + "@ethersproject/abstract-provider" "^5.2.0" + "@ethersproject/abstract-signer" "^5.2.0" + "@ethersproject/address" "^5.2.0" + "@ethersproject/bignumber" "^5.2.0" + "@ethersproject/bytes" "^5.2.0" + "@ethersproject/constants" "^5.2.0" + "@ethersproject/logger" "^5.2.0" + "@ethersproject/properties" "^5.2.0" + "@ethersproject/transactions" "^5.2.0" "@ethersproject/hash@5.0.11", "@ethersproject/hash@^5.0.10": version "5.0.11" @@ -469,19 +560,19 @@ "@ethersproject/properties" "^5.0.7" "@ethersproject/strings" "^5.0.8" -"@ethersproject/hash@5.0.6", "@ethersproject/hash@>=5.0.0-beta.128", "@ethersproject/hash@^5.0.4": - version "5.0.6" - resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.0.6.tgz#2a2e8a1470685421217e9e86e9971ca636e609ce" - integrity sha512-Gvh57v6BWhwnud6l7tMfQm32PRQ2DYx2WaAAQmAxAfYvmzUkpQCBstnGeNMXIL8/2wdkvcB2u+WZRWaZtsFuUQ== - dependencies: - "@ethersproject/abstract-signer" "^5.0.6" - "@ethersproject/address" "^5.0.5" - "@ethersproject/bignumber" "^5.0.8" - "@ethersproject/bytes" "^5.0.4" - "@ethersproject/keccak256" "^5.0.3" - "@ethersproject/logger" "^5.0.5" - "@ethersproject/properties" "^5.0.4" - "@ethersproject/strings" "^5.0.4" +"@ethersproject/hash@5.2.0", "@ethersproject/hash@>=5.0.0-beta.128", "@ethersproject/hash@^5.0.4", "@ethersproject/hash@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.2.0.tgz#2d21901eafc5bdb738b4ad96bee364d371ec724b" + integrity sha512-wEGry2HFFSssFiNEkFWMzj1vpdFv4rQlkBp41UfL6J58zKGNycoAWimokITDMk8p7548MKr27h48QfERnNKkRw== + dependencies: + "@ethersproject/abstract-signer" "^5.2.0" + "@ethersproject/address" "^5.2.0" + "@ethersproject/bignumber" "^5.2.0" + "@ethersproject/bytes" "^5.2.0" + "@ethersproject/keccak256" "^5.2.0" + "@ethersproject/logger" "^5.2.0" + "@ethersproject/properties" "^5.2.0" + "@ethersproject/strings" "^5.2.0" "@ethersproject/hdnode@5.0.10": version "5.0.10" @@ -501,24 +592,6 @@ "@ethersproject/transactions" "^5.0.9" "@ethersproject/wordlists" "^5.0.8" -"@ethersproject/hdnode@5.0.5", "@ethersproject/hdnode@^5.0.4": - version "5.0.5" - resolved "https://registry.yarnpkg.com/@ethersproject/hdnode/-/hdnode-5.0.5.tgz#1f89aad0a5ba9dfae3a85a36e0669f8bc7a74781" - integrity sha512-Ho4HZaK+KijE5adayvjAGusWMnT0mgwGa5hGMBofBOgX9nqiKf6Wxx68SXBGI1/L3rmKo6mlAjxUd8gefs0teQ== - dependencies: - "@ethersproject/abstract-signer" "^5.0.4" - "@ethersproject/basex" "^5.0.3" - "@ethersproject/bignumber" "^5.0.7" - "@ethersproject/bytes" "^5.0.4" - "@ethersproject/logger" "^5.0.5" - "@ethersproject/pbkdf2" "^5.0.3" - "@ethersproject/properties" "^5.0.3" - "@ethersproject/sha2" "^5.0.3" - "@ethersproject/signing-key" "^5.0.4" - "@ethersproject/strings" "^5.0.4" - "@ethersproject/transactions" "^5.0.5" - "@ethersproject/wordlists" "^5.0.4" - "@ethersproject/hdnode@5.0.9", "@ethersproject/hdnode@^5.0.8": version "5.0.9" resolved "https://registry.yarnpkg.com/@ethersproject/hdnode/-/hdnode-5.0.9.tgz#ce65b430d3d3f0cd3c8f9dfaaf376b55881d9dba" @@ -537,6 +610,24 @@ "@ethersproject/transactions" "^5.0.9" "@ethersproject/wordlists" "^5.0.8" +"@ethersproject/hdnode@5.2.0", "@ethersproject/hdnode@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/hdnode/-/hdnode-5.2.0.tgz#efea9b2f713e55aa5ba23cc62b4aac6d08dcfa53" + integrity sha512-ffq2JrW5AftCmfWZ8DxpdWdw/x06Yn+e9wrWHLpj8If1+w87W4LbTMRUaUmO1DUSN8H8g/6kMUKCTJPVuxsuOw== + dependencies: + "@ethersproject/abstract-signer" "^5.2.0" + "@ethersproject/basex" "^5.2.0" + "@ethersproject/bignumber" "^5.2.0" + "@ethersproject/bytes" "^5.2.0" + "@ethersproject/logger" "^5.2.0" + "@ethersproject/pbkdf2" "^5.2.0" + "@ethersproject/properties" "^5.2.0" + "@ethersproject/sha2" "^5.2.0" + "@ethersproject/signing-key" "^5.2.0" + "@ethersproject/strings" "^5.2.0" + "@ethersproject/transactions" "^5.2.0" + "@ethersproject/wordlists" "^5.2.0" + "@ethersproject/json-wallets@5.0.11", "@ethersproject/json-wallets@^5.0.10": version "5.0.11" resolved "https://registry.yarnpkg.com/@ethersproject/json-wallets/-/json-wallets-5.0.11.tgz#86fdc41b7762acb443d6a896f6c61231ab2aee5d" @@ -575,33 +666,25 @@ aes-js "3.0.0" scrypt-js "3.0.1" -"@ethersproject/json-wallets@5.0.7", "@ethersproject/json-wallets@^5.0.6": - version "5.0.7" - resolved "https://registry.yarnpkg.com/@ethersproject/json-wallets/-/json-wallets-5.0.7.tgz#4c48753b38ce7bce23a55f25c23f24617cf560e5" - integrity sha512-dgOn9JtGgjT28mDXs4LYY2rT4CzS6bG/rxoYuPq3TLHIf6nmvBcr33Fee6RrM/y8UAx4gyIkf6wb2cXsOctvQQ== - dependencies: - "@ethersproject/abstract-signer" "^5.0.4" - "@ethersproject/address" "^5.0.4" - "@ethersproject/bytes" "^5.0.4" - "@ethersproject/hdnode" "^5.0.4" - "@ethersproject/keccak256" "^5.0.3" - "@ethersproject/logger" "^5.0.5" - "@ethersproject/pbkdf2" "^5.0.3" - "@ethersproject/properties" "^5.0.3" - "@ethersproject/random" "^5.0.3" - "@ethersproject/strings" "^5.0.4" - "@ethersproject/transactions" "^5.0.5" +"@ethersproject/json-wallets@5.2.0", "@ethersproject/json-wallets@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/json-wallets/-/json-wallets-5.2.0.tgz#d41c7c39e4d236b586e26e2145b09ac49dc56608" + integrity sha512-iWxSm9XiugEtaehYD6w1ImmXeatjcGcrQvffZVJHH1UqV4FckDzrOYnZBRHPQRYlnhNVrGTld1+S0Cu4MB8gdw== + dependencies: + "@ethersproject/abstract-signer" "^5.2.0" + "@ethersproject/address" "^5.2.0" + "@ethersproject/bytes" "^5.2.0" + "@ethersproject/hdnode" "^5.2.0" + "@ethersproject/keccak256" "^5.2.0" + "@ethersproject/logger" "^5.2.0" + "@ethersproject/pbkdf2" "^5.2.0" + "@ethersproject/properties" "^5.2.0" + "@ethersproject/random" "^5.2.0" + "@ethersproject/strings" "^5.2.0" + "@ethersproject/transactions" "^5.2.0" aes-js "3.0.0" scrypt-js "3.0.1" -"@ethersproject/keccak256@5.0.4", "@ethersproject/keccak256@>=5.0.0-beta.127", "@ethersproject/keccak256@^5.0.3": - version "5.0.4" - resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.0.4.tgz#36ca0a7d1ae2a272da5654cb886776d0c680ef3a" - integrity sha512-GNpiOUm9PGUxFNqOxYKDQBM0u68bG9XC9iOulEQ8I0tOx/4qUpgVzvgXL6ugxr0RY554Gz/NQsVqknqPzUcxpQ== - dependencies: - "@ethersproject/bytes" "^5.0.4" - js-sha3 "0.5.7" - "@ethersproject/keccak256@5.0.8", "@ethersproject/keccak256@^5.0.7": version "5.0.8" resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.0.8.tgz#13aaf69e1c8bd15fc59a2ebd055c0878f2a059c8" @@ -618,27 +701,28 @@ "@ethersproject/bytes" "^5.0.9" js-sha3 "0.5.7" +"@ethersproject/keccak256@5.2.0", "@ethersproject/keccak256@>=5.0.0-beta.127", "@ethersproject/keccak256@^5.0.3", "@ethersproject/keccak256@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.2.0.tgz#15257862807c23f24a3209d1016d322dca85a464" + integrity sha512-LqyxTwVANga5Y3L1yo184czW6b3PibabN8xyE/eOulQLLfXNrHHhwrOTpOhoVRWCICVCD/5SjQfwqTrczjS7jQ== + dependencies: + "@ethersproject/bytes" "^5.2.0" + js-sha3 "0.5.7" + "@ethersproject/logger@5.0.10": version "5.0.10" resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.0.10.tgz#fd884688b3143253e0356ef92d5f22d109d2e026" integrity sha512-0y2T2NqykDrbPM3Zw9RSbPkDOxwChAL8detXaom76CfYoGxsOnRP/zTX8OUAV+x9LdwzgbWvWmeXrc0M7SuDZw== -"@ethersproject/logger@5.0.6", "@ethersproject/logger@>=5.0.0-beta.129", "@ethersproject/logger@^5.0.5": - version "5.0.6" - resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.0.6.tgz#faa484203e86e08be9e07fef826afeef7183fe88" - integrity sha512-FrX0Vnb3JZ1md/7GIZfmJ06XOAA8r3q9Uqt9O5orr4ZiksnbpXKlyDzQtlZ5Yv18RS8CAUbiKH9vwidJg1BPmQ== - "@ethersproject/logger@5.0.9", "@ethersproject/logger@^5.0.8": version "5.0.9" resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.0.9.tgz#0e6a0b3ecc938713016954daf4ac7967467aa763" integrity sha512-kV3Uamv3XOH99Xf3kpIG3ZkS7mBNYcLDM00JSDtNgNB4BihuyxpQzIZPRIDmRi+95Z/R1Bb0X2kUNHa/kJoVrw== -"@ethersproject/networks@5.0.4", "@ethersproject/networks@^5.0.3": - version "5.0.4" - resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.0.4.tgz#6d320a5e15a0cda804f5da88be0ba846156f6eec" - integrity sha512-/wHDTRms5mpJ09BoDrbNdFWINzONe05wZRgohCXvEv39rrH/Gd/yAnct8wC0RsW3tmFOgjgQxuBvypIxuUynTw== - dependencies: - "@ethersproject/logger" "^5.0.5" +"@ethersproject/logger@5.2.0", "@ethersproject/logger@>=5.0.0-beta.129", "@ethersproject/logger@^5.0.5", "@ethersproject/logger@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.2.0.tgz#accf5348251f78b6c8891af67f42490a4ea4e5ae" + integrity sha512-dPZ6/E3YiArgG8dI/spGkaRDry7YZpCntf4gm/c6SI8Mbqiihd7q3nuLN5VvDap/0K3xm3RE1AIUOcUwwh2ezQ== "@ethersproject/networks@5.0.8", "@ethersproject/networks@^5.0.7": version "5.0.8" @@ -654,13 +738,12 @@ dependencies: "@ethersproject/logger" "^5.0.8" -"@ethersproject/pbkdf2@5.0.4", "@ethersproject/pbkdf2@^5.0.3": - version "5.0.4" - resolved "https://registry.yarnpkg.com/@ethersproject/pbkdf2/-/pbkdf2-5.0.4.tgz#a0841d53f5ce9a2b52a65a349d2dc15910b0a767" - integrity sha512-9jVBjHXQKfr9+3bkCg01a8Cd1H9e+7Kw3ZMIvAxD0lZtuzrXsJxm1hVwY9KA+PRUvgS/9tTP4viXQYwLAax7zg== +"@ethersproject/networks@5.2.0", "@ethersproject/networks@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.2.0.tgz#66c23c6ac477dd703645b2c971ac842d8b8aa524" + integrity sha512-q+htMgq7wQoEnjlkdHM6t1sktKxNbEB/F6DQBPNwru7KpQ1R0n0UTIXJB8Rb7lSnvjqcAQ40X3iVqm94NJfYDw== dependencies: - "@ethersproject/bytes" "^5.0.4" - "@ethersproject/sha2" "^5.0.3" + "@ethersproject/logger" "^5.2.0" "@ethersproject/pbkdf2@5.0.8", "@ethersproject/pbkdf2@^5.0.7": version "5.0.8" @@ -678,12 +761,13 @@ "@ethersproject/bytes" "^5.0.9" "@ethersproject/sha2" "^5.0.7" -"@ethersproject/properties@5.0.4", "@ethersproject/properties@>=5.0.0-beta.131", "@ethersproject/properties@^5.0.3", "@ethersproject/properties@^5.0.4": - version "5.0.4" - resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.0.4.tgz#a67a1f5a52c30850b5062c861631e73d131f666e" - integrity sha512-UdyX3GqBxFt15B0uSESdDNmhvEbK3ACdDXl2soshoPcneXuTswHDeA0LoPlnaZzhbgk4p6jqb4GMms5C26Qu6A== +"@ethersproject/pbkdf2@5.2.0", "@ethersproject/pbkdf2@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/pbkdf2/-/pbkdf2-5.2.0.tgz#8166a7a7238a5fd1d9bb6eb2000fea0f19fdde06" + integrity sha512-qKOoO6yir/qnAgg6OP3U4gRuZ6jl9P7xwggRu/spVfnuaR+wa490AatWLqB1WOXKf6JFjm5yOaT/T5fCICQVdQ== dependencies: - "@ethersproject/logger" "^5.0.5" + "@ethersproject/bytes" "^5.2.0" + "@ethersproject/sha2" "^5.2.0" "@ethersproject/properties@5.0.8", "@ethersproject/properties@^5.0.7": version "5.0.8" @@ -699,30 +783,12 @@ dependencies: "@ethersproject/logger" "^5.0.8" -"@ethersproject/providers@5.0.14", "@ethersproject/providers@^5.0.5": - version "5.0.14" - resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.0.14.tgz#751ccb14b4a8c8e9e4be171818c23f4601be90ba" - integrity sha512-K9QRRkkHWyprm3g4L8U9aPx5uyivznL4RYemkN2shCQumyGqFJ5SO+OtQrgebVm0JpGwFAUGugnhRUh49sjErw== +"@ethersproject/properties@5.2.0", "@ethersproject/properties@>=5.0.0-beta.131", "@ethersproject/properties@^5.0.3", "@ethersproject/properties@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.2.0.tgz#8fadf367f7ac7357019d0224aa579b234c545ac1" + integrity sha512-oNFkzcoGwXXV+/Yp/MLcDLrL/2i360XIy2YN9yRZJPnIbLwjroFNLiRzLs6PyPw1D09Xs8OcPR1/nHv6xDKE2A== dependencies: - "@ethersproject/abstract-provider" "^5.0.4" - "@ethersproject/abstract-signer" "^5.0.4" - "@ethersproject/address" "^5.0.4" - "@ethersproject/basex" "^5.0.3" - "@ethersproject/bignumber" "^5.0.7" - "@ethersproject/bytes" "^5.0.4" - "@ethersproject/constants" "^5.0.4" - "@ethersproject/hash" "^5.0.4" - "@ethersproject/logger" "^5.0.5" - "@ethersproject/networks" "^5.0.3" - "@ethersproject/properties" "^5.0.3" - "@ethersproject/random" "^5.0.3" - "@ethersproject/rlp" "^5.0.3" - "@ethersproject/sha2" "^5.0.3" - "@ethersproject/strings" "^5.0.4" - "@ethersproject/transactions" "^5.0.5" - "@ethersproject/web" "^5.0.6" - bech32 "1.1.4" - ws "7.2.3" + "@ethersproject/logger" "^5.2.0" "@ethersproject/providers@5.0.23": version "5.0.23" @@ -774,13 +840,30 @@ bech32 "1.1.4" ws "7.2.3" -"@ethersproject/random@5.0.4", "@ethersproject/random@^5.0.3": - version "5.0.4" - resolved "https://registry.yarnpkg.com/@ethersproject/random/-/random-5.0.4.tgz#98f7cf65b0e588cec39ef24843e391ed5004556f" - integrity sha512-AIZJhqs6Ba4/+U3lOjt3QZbP6b/kuuGLJUYFUonAgWmkTHwqsCwYnFvnHKQSUuHbXHvErp7WFXFlztx+yMn3kQ== - dependencies: - "@ethersproject/bytes" "^5.0.4" - "@ethersproject/logger" "^5.0.5" +"@ethersproject/providers@5.2.0", "@ethersproject/providers@^5.0.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.2.0.tgz#b2f3e3b2ca4567c8372543ceb6f3c6e3a2370783" + integrity sha512-Yf/ZUqCrVr+jR0SHA9GuNZs4R1xnV9Ibnh1TlOa0ZzI6o+Qf8bEyE550k9bYI4zk2f9x9baX2RRs6BJY7Jz/WA== + dependencies: + "@ethersproject/abstract-provider" "^5.2.0" + "@ethersproject/abstract-signer" "^5.2.0" + "@ethersproject/address" "^5.2.0" + "@ethersproject/basex" "^5.2.0" + "@ethersproject/bignumber" "^5.2.0" + "@ethersproject/bytes" "^5.2.0" + "@ethersproject/constants" "^5.2.0" + "@ethersproject/hash" "^5.2.0" + "@ethersproject/logger" "^5.2.0" + "@ethersproject/networks" "^5.2.0" + "@ethersproject/properties" "^5.2.0" + "@ethersproject/random" "^5.2.0" + "@ethersproject/rlp" "^5.2.0" + "@ethersproject/sha2" "^5.2.0" + "@ethersproject/strings" "^5.2.0" + "@ethersproject/transactions" "^5.2.0" + "@ethersproject/web" "^5.2.0" + bech32 "1.1.4" + ws "7.2.3" "@ethersproject/random@5.0.8", "@ethersproject/random@^5.0.7": version "5.0.8" @@ -798,13 +881,13 @@ "@ethersproject/bytes" "^5.0.9" "@ethersproject/logger" "^5.0.8" -"@ethersproject/rlp@5.0.4", "@ethersproject/rlp@^5.0.3": - version "5.0.4" - resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.0.4.tgz#0090a0271e84ea803016a112a79f5cfd80271a77" - integrity sha512-5qrrZad7VTjofxSsm7Zg/7Dr4ZOln4S2CqiDdOuTv6MBKnXj0CiBojXyuDy52M8O3wxH0CyE924hXWTDV1PQWQ== +"@ethersproject/random@5.2.0", "@ethersproject/random@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/random/-/random-5.2.0.tgz#1d7e19f17d88eda56228a263063826829e49eebe" + integrity sha512-7Nd3qjivBGlDCGDuGYjPi8CXdtVhRZ7NeyBXoJgtnJBwn1S01ahrbMeOUVmRVWrFM0YiSEPEGo7i4xEu2gRPcg== dependencies: - "@ethersproject/bytes" "^5.0.4" - "@ethersproject/logger" "^5.0.5" + "@ethersproject/bytes" "^5.2.0" + "@ethersproject/logger" "^5.2.0" "@ethersproject/rlp@5.0.8", "@ethersproject/rlp@^5.0.7": version "5.0.8" @@ -822,14 +905,13 @@ "@ethersproject/bytes" "^5.0.9" "@ethersproject/logger" "^5.0.8" -"@ethersproject/sha2@5.0.4", "@ethersproject/sha2@^5.0.3": - version "5.0.4" - resolved "https://registry.yarnpkg.com/@ethersproject/sha2/-/sha2-5.0.4.tgz#40f639721a27dbe034b3dee021ba20b054586fec" - integrity sha512-0yFhf1mspxAfWdXXoPtK94adUeu1R7/FzAa+DfEiZTc76sz/vHXf0LSIazoR3znYKFny6haBxME+usbvvEcF3A== +"@ethersproject/rlp@5.2.0", "@ethersproject/rlp@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.2.0.tgz#bbf605183818a9d96bdc40323d734c79e26cfaca" + integrity sha512-RqGsELtPWxcFhOOhSr0lQ2hBNT9tBE08WK0tb6VQbCk97EpqkbgP8yXED9PZlWMiRGchJTw6S+ExzK62XMX/fw== dependencies: - "@ethersproject/bytes" "^5.0.4" - "@ethersproject/logger" "^5.0.5" - hash.js "1.1.3" + "@ethersproject/bytes" "^5.2.0" + "@ethersproject/logger" "^5.2.0" "@ethersproject/sha2@5.0.8", "@ethersproject/sha2@^5.0.7": version "5.0.8" @@ -849,6 +931,15 @@ "@ethersproject/logger" "^5.0.8" hash.js "1.1.3" +"@ethersproject/sha2@5.2.0", "@ethersproject/sha2@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/sha2/-/sha2-5.2.0.tgz#ae18fa6c09c6d99fa2b564dac7276bcd513c1579" + integrity sha512-Wqqptfn0PRO2mvmpktPW1HOLrrCyGtxhVQxO1ZyePoGrcEOurhICOlIvkTogoX4Q928D3Z9XtSSCUbdOJUF2kg== + dependencies: + "@ethersproject/bytes" "^5.2.0" + "@ethersproject/logger" "^5.2.0" + hash.js "1.1.3" + "@ethersproject/signing-key@5.0.10", "@ethersproject/signing-key@^5.0.8": version "5.0.10" resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.0.10.tgz#05e26e04f0aa5360dc78674d7331bacea8fea5c1" @@ -869,15 +960,16 @@ "@ethersproject/properties" "^5.0.7" elliptic "6.5.4" -"@ethersproject/signing-key@5.0.5", "@ethersproject/signing-key@^5.0.4": - version "5.0.5" - resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.0.5.tgz#acfd06fc05a14180df7e027688bbd23fc4baf782" - integrity sha512-Z1wY7JC1HVO4CvQWY2TyTTuAr8xK3bJijZw1a9G92JEmKdv1j255R/0YLBBcFTl2J65LUjtXynNJ2GbArPGi5g== +"@ethersproject/signing-key@5.2.0", "@ethersproject/signing-key@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.2.0.tgz#e8eb10d3c0f4a575479db8d70c62aaf93cd384d1" + integrity sha512-9A+dVSkrVAPuhJnWqLWV/NkKi/KB4iagTKEuojfuApUfeIHEhpwQ0Jx3cBimk7qWISSSKdgiAmIqpvVtZ5FEkg== dependencies: - "@ethersproject/bytes" "^5.0.4" - "@ethersproject/logger" "^5.0.5" - "@ethersproject/properties" "^5.0.3" - elliptic "6.5.3" + "@ethersproject/bytes" "^5.2.0" + "@ethersproject/logger" "^5.2.0" + "@ethersproject/properties" "^5.2.0" + bn.js "^4.4.0" + elliptic "6.5.4" "@ethersproject/solidity@5.0.10": version "5.0.10" @@ -890,17 +982,6 @@ "@ethersproject/sha2" "^5.0.7" "@ethersproject/strings" "^5.0.8" -"@ethersproject/solidity@5.0.5", "@ethersproject/solidity@^5.0.2": - version "5.0.5" - resolved "https://registry.yarnpkg.com/@ethersproject/solidity/-/solidity-5.0.5.tgz#97a7d8a67f2d944f208c948fed0d565512bcc2be" - integrity sha512-DMFQ0ouXmNVoKWbGEUFGi8Urli4SJip9jXafQyFHWPRr5oJUqDVkNfwcyC37k+mhBG93k7qrYXCH2xJnGEOxHg== - dependencies: - "@ethersproject/bignumber" "^5.0.7" - "@ethersproject/bytes" "^5.0.4" - "@ethersproject/keccak256" "^5.0.3" - "@ethersproject/sha2" "^5.0.3" - "@ethersproject/strings" "^5.0.4" - "@ethersproject/solidity@5.0.9": version "5.0.9" resolved "https://registry.yarnpkg.com/@ethersproject/solidity/-/solidity-5.0.9.tgz#49100fbe9f364ac56f7ff7c726f4f3d151901134" @@ -912,6 +993,17 @@ "@ethersproject/sha2" "^5.0.7" "@ethersproject/strings" "^5.0.8" +"@ethersproject/solidity@5.2.0", "@ethersproject/solidity@^5.0.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/solidity/-/solidity-5.2.0.tgz#ac902d8f8b11bf58fd37ccf77392178cbbd0b08f" + integrity sha512-EEFlNyEnONW3CWF8UGWPcqxJUHiaIoofO7itGwO/2gvGpnwlL+WUV+GmQoHNxmn+QJeOHspnZuh6NOVrJL6H1g== + dependencies: + "@ethersproject/bignumber" "^5.2.0" + "@ethersproject/bytes" "^5.2.0" + "@ethersproject/keccak256" "^5.2.0" + "@ethersproject/sha2" "^5.2.0" + "@ethersproject/strings" "^5.2.0" + "@ethersproject/strings@5.0.10": version "5.0.10" resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.0.10.tgz#ddce1e9724f4ac4f3f67e0cac0b48748e964bfdb" @@ -921,15 +1013,6 @@ "@ethersproject/constants" "^5.0.8" "@ethersproject/logger" "^5.0.8" -"@ethersproject/strings@5.0.5", "@ethersproject/strings@>=5.0.0-beta.130", "@ethersproject/strings@^5.0.4": - version "5.0.5" - resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.0.5.tgz#ed7e99a282a02f40757691b04a24cd83f3752195" - integrity sha512-JED6WaIV00xM/gvj8vSnd+0VWtDYdidTmavFRCTQakqfz+4tDo6Jz5LHgG+dd45h7ah7ykCHW0C7ZXWEDROCXQ== - dependencies: - "@ethersproject/bytes" "^5.0.4" - "@ethersproject/constants" "^5.0.4" - "@ethersproject/logger" "^5.0.5" - "@ethersproject/strings@5.0.9", "@ethersproject/strings@^5.0.8": version "5.0.9" resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.0.9.tgz#8e2eb2918b140231e1d1b883d77e43213a8ac280" @@ -939,6 +1022,15 @@ "@ethersproject/constants" "^5.0.8" "@ethersproject/logger" "^5.0.8" +"@ethersproject/strings@5.2.0", "@ethersproject/strings@>=5.0.0-beta.130", "@ethersproject/strings@^5.0.4", "@ethersproject/strings@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.2.0.tgz#e93d989859587191c3f64bda124d9dedbc3f5a97" + integrity sha512-RmjX800wRYKgrzo2ZCSlA8OCQYyq4+M46VgjSVDVyYkLZctBXC3epqlppDA24R7eo856KNbXqezZsMnHT+sSuA== + dependencies: + "@ethersproject/bytes" "^5.2.0" + "@ethersproject/constants" "^5.2.0" + "@ethersproject/logger" "^5.2.0" + "@ethersproject/transactions@5.0.10", "@ethersproject/transactions@^5.0.9": version "5.0.10" resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.0.10.tgz#d50cafd80d27206336f80114bc0f18bc18687331" @@ -969,20 +1061,20 @@ "@ethersproject/rlp" "^5.0.7" "@ethersproject/signing-key" "^5.0.8" -"@ethersproject/transactions@5.0.6", "@ethersproject/transactions@^5.0.0-beta.135", "@ethersproject/transactions@^5.0.2", "@ethersproject/transactions@^5.0.5": - version "5.0.6" - resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.0.6.tgz#b8b27938be6e9ed671dbdd35fe98af8b14d0df7c" - integrity sha512-htsFhOD+NMBxx676A8ehSuwVV49iqpSB+CkjPZ02tpNew0K6p8g0CZ46Z1ZP946gIHAU80xQ0NACHYrjIUaCFA== - dependencies: - "@ethersproject/address" "^5.0.4" - "@ethersproject/bignumber" "^5.0.7" - "@ethersproject/bytes" "^5.0.4" - "@ethersproject/constants" "^5.0.4" - "@ethersproject/keccak256" "^5.0.3" - "@ethersproject/logger" "^5.0.5" - "@ethersproject/properties" "^5.0.3" - "@ethersproject/rlp" "^5.0.3" - "@ethersproject/signing-key" "^5.0.4" +"@ethersproject/transactions@5.2.0", "@ethersproject/transactions@^5.0.0", "@ethersproject/transactions@^5.0.0-beta.135", "@ethersproject/transactions@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.2.0.tgz#052e2ef8f8adf7037ebe4cc47aad2a61950e6491" + integrity sha512-QrGbhGYsouNNclUp3tWMbckMsuXJTOsA56kT3BuRrLlXJcUH7myIihajXdSfKcyJsvHJPrGZP+U3TKh+sLzZtg== + dependencies: + "@ethersproject/address" "^5.2.0" + "@ethersproject/bignumber" "^5.2.0" + "@ethersproject/bytes" "^5.2.0" + "@ethersproject/constants" "^5.2.0" + "@ethersproject/keccak256" "^5.2.0" + "@ethersproject/logger" "^5.2.0" + "@ethersproject/properties" "^5.2.0" + "@ethersproject/rlp" "^5.2.0" + "@ethersproject/signing-key" "^5.2.0" "@ethersproject/units@5.0.10": version "5.0.10" @@ -1002,14 +1094,14 @@ "@ethersproject/constants" "^5.0.8" "@ethersproject/logger" "^5.0.8" -"@ethersproject/units@5.0.6": - version "5.0.6" - resolved "https://registry.yarnpkg.com/@ethersproject/units/-/units-5.0.6.tgz#e1169ecffb7e8d5eab84e1481a4e35df19045708" - integrity sha512-tsJuy4mipppdmooukRfhXt8fGx9nxvfvG6Xdy0RDm7LzHsjghjwQ69m2bCpId6SDSR1Uq1cQ9irPiUBSyWolUA== +"@ethersproject/units@5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/units/-/units-5.2.0.tgz#08643e5d4583ecc1a32b103c1157f7ae80803392" + integrity sha512-yrwlyomXcBBHp5oSrLxlLkyHN7dVu3PO7hMbQXc00h388zU4TF3o/PAIUhh+x695wgJ19Fa8YgUWCab3a1RDwA== dependencies: - "@ethersproject/bignumber" "^5.0.7" - "@ethersproject/constants" "^5.0.4" - "@ethersproject/logger" "^5.0.5" + "@ethersproject/bignumber" "^5.2.0" + "@ethersproject/constants" "^5.2.0" + "@ethersproject/logger" "^5.2.0" "@ethersproject/wallet@5.0.11": version "5.0.11" @@ -1053,26 +1145,26 @@ "@ethersproject/transactions" "^5.0.9" "@ethersproject/wordlists" "^5.0.8" -"@ethersproject/wallet@5.0.7", "@ethersproject/wallet@^5.0.2", "@ethersproject/wallet@^5.0.5": - version "5.0.7" - resolved "https://registry.yarnpkg.com/@ethersproject/wallet/-/wallet-5.0.7.tgz#9d4540f97d534e3d61548ace30f15857209b3f02" - integrity sha512-n2GX1+2Tc0qV8dguUcLkjNugINKvZY7u/5fEsn0skW9rz5+jHTR5IKMV6jSfXA+WjQT8UCNMvkI3CNcdhaPbTQ== - dependencies: - "@ethersproject/abstract-provider" "^5.0.4" - "@ethersproject/abstract-signer" "^5.0.4" - "@ethersproject/address" "^5.0.4" - "@ethersproject/bignumber" "^5.0.7" - "@ethersproject/bytes" "^5.0.4" - "@ethersproject/hash" "^5.0.4" - "@ethersproject/hdnode" "^5.0.4" - "@ethersproject/json-wallets" "^5.0.6" - "@ethersproject/keccak256" "^5.0.3" - "@ethersproject/logger" "^5.0.5" - "@ethersproject/properties" "^5.0.3" - "@ethersproject/random" "^5.0.3" - "@ethersproject/signing-key" "^5.0.4" - "@ethersproject/transactions" "^5.0.5" - "@ethersproject/wordlists" "^5.0.4" +"@ethersproject/wallet@5.2.0", "@ethersproject/wallet@^5.0.0", "@ethersproject/wallet@^5.0.5": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/wallet/-/wallet-5.2.0.tgz#b5a8406676067e34f633536a4cb53c2ff98c0b5c" + integrity sha512-uPdjZwUmAJLo1+ybR/G/rL9pv/NEcCqOsjn6RJFvG7RmwP2kS1v5C+F+ysgx2W/PxBIVT+2IEsfXLbBz8s/6Rg== + dependencies: + "@ethersproject/abstract-provider" "^5.2.0" + "@ethersproject/abstract-signer" "^5.2.0" + "@ethersproject/address" "^5.2.0" + "@ethersproject/bignumber" "^5.2.0" + "@ethersproject/bytes" "^5.2.0" + "@ethersproject/hash" "^5.2.0" + "@ethersproject/hdnode" "^5.2.0" + "@ethersproject/json-wallets" "^5.2.0" + "@ethersproject/keccak256" "^5.2.0" + "@ethersproject/logger" "^5.2.0" + "@ethersproject/properties" "^5.2.0" + "@ethersproject/random" "^5.2.0" + "@ethersproject/signing-key" "^5.2.0" + "@ethersproject/transactions" "^5.2.0" + "@ethersproject/wordlists" "^5.2.0" "@ethersproject/web@5.0.13", "@ethersproject/web@^5.0.12": version "5.0.13" @@ -1096,16 +1188,16 @@ "@ethersproject/properties" "^5.0.7" "@ethersproject/strings" "^5.0.8" -"@ethersproject/web@5.0.9", "@ethersproject/web@^5.0.6": - version "5.0.9" - resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.0.9.tgz#b08f8295f4bfd4777c8723fe9572f5453b9f03cb" - integrity sha512-//QNlv1MSkOII1hv3+HQwWoiVFS+BMVGI0KYeUww4cyrEktnx1QIez5bTSab9s9fWTFaWKNmQNBwMbxAqPuYDw== +"@ethersproject/web@5.2.0", "@ethersproject/web@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.2.0.tgz#47d8e152e7fcc07ba0aff4f99fde268fde79dd7a" + integrity sha512-mYb9qxGlOBFR2pR6t1CZczuqqX6r8RQGn7MtwrBciMex3cvA/qs+wbmcDgl+/OZY0Pco/ih6WHQRnVi+4sBeCQ== dependencies: - "@ethersproject/base64" "^5.0.3" - "@ethersproject/bytes" "^5.0.4" - "@ethersproject/logger" "^5.0.5" - "@ethersproject/properties" "^5.0.3" - "@ethersproject/strings" "^5.0.4" + "@ethersproject/base64" "^5.2.0" + "@ethersproject/bytes" "^5.2.0" + "@ethersproject/logger" "^5.2.0" + "@ethersproject/properties" "^5.2.0" + "@ethersproject/strings" "^5.2.0" "@ethersproject/wordlists@5.0.10": version "5.0.10" @@ -1118,17 +1210,6 @@ "@ethersproject/properties" "^5.0.7" "@ethersproject/strings" "^5.0.8" -"@ethersproject/wordlists@5.0.5", "@ethersproject/wordlists@^5.0.4": - version "5.0.5" - resolved "https://registry.yarnpkg.com/@ethersproject/wordlists/-/wordlists-5.0.5.tgz#a935b7fdb86c96b44ea8391fed94b3fa2f33c606" - integrity sha512-XA3ycFltVrCTQt04w5nHu3Xq5Z6HjqWsXaAYQHFdqtugyUsIumaO9S5MOwFFuUYTNkZUoT3jCRa/OBS+K4tLfA== - dependencies: - "@ethersproject/bytes" "^5.0.4" - "@ethersproject/hash" "^5.0.4" - "@ethersproject/logger" "^5.0.5" - "@ethersproject/properties" "^5.0.3" - "@ethersproject/strings" "^5.0.4" - "@ethersproject/wordlists@5.0.9", "@ethersproject/wordlists@^5.0.8": version "5.0.9" resolved "https://registry.yarnpkg.com/@ethersproject/wordlists/-/wordlists-5.0.9.tgz#f16cc0b317637c3ae9c689ebd7bc2cbbffadd013" @@ -1140,25 +1221,36 @@ "@ethersproject/properties" "^5.0.7" "@ethersproject/strings" "^5.0.8" -"@nodelib/fs.scandir@2.1.3": - version "2.1.3" - resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz#3a582bdb53804c6ba6d146579c46e52130cf4a3b" - integrity sha512-eGmwYQn3gxo4r7jdQnkrrN6bY478C3P+a/y72IJukF8LjB6ZHeB3c+Ehacj3sYeSmUXGlnA67/PmbM9CVwL7Dw== +"@ethersproject/wordlists@5.2.0", "@ethersproject/wordlists@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/wordlists/-/wordlists-5.2.0.tgz#afcce0229e9ef64af1bf8a1e96571fa441e9f444" + integrity sha512-/7TG5r/Zm8Wd9WhoqQ4QnntgMkIfIZ8QVrpU81muiChLD26XLOgmyiqKPL7K058uYt7UZ0wzbXjxyCYadU3xFQ== + dependencies: + "@ethersproject/bytes" "^5.2.0" + "@ethersproject/hash" "^5.2.0" + "@ethersproject/logger" "^5.2.0" + "@ethersproject/properties" "^5.2.0" + "@ethersproject/strings" "^5.2.0" + +"@nodelib/fs.scandir@2.1.4": + version "2.1.4" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz#d4b3549a5db5de2683e0c1071ab4f140904bbf69" + integrity sha512-33g3pMJk3bg5nXbL/+CY6I2eJDzZAni49PfJnL5fghPTggPvBd/pFNSgJsdAgWptuFu7qq/ERvOYFlhvsLTCKA== dependencies: - "@nodelib/fs.stat" "2.0.3" + "@nodelib/fs.stat" "2.0.4" run-parallel "^1.1.9" -"@nodelib/fs.stat@2.0.3", "@nodelib/fs.stat@^2.0.2": - version "2.0.3" - resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz#34dc5f4cabbc720f4e60f75a747e7ecd6c175bd3" - integrity sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA== +"@nodelib/fs.stat@2.0.4", "@nodelib/fs.stat@^2.0.2": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.4.tgz#a3f2dd61bab43b8db8fa108a121cfffe4c676655" + integrity sha512-IYlHJA0clt2+Vg7bccq+TzRdJvv19c2INqBSsoOLp1je7xjtr7J26+WXR72MCdvU9q1qTzIWDfhMf+DRvQJK4Q== "@nodelib/fs.walk@^1.2.3": - version "1.2.4" - resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.4.tgz#011b9202a70a6366e436ca5c065844528ab04976" - integrity sha512-1V9XOY4rDW0rehzbrcqAmHnz8e7SKvX27gh8Gt2WgB0+pdzdiLV83p72kZPU+jvMbS1qU5mauP2iOvO8rhmurQ== + version "1.2.6" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.6.tgz#cce9396b30aa5afe9e3756608f5831adcb53d063" + integrity sha512-8Broas6vTtW4GIXTAHDoE32hnN2M5ykgCpWGbuXHQ15vEMqr23pB76e/GZcYsZCHALv50ktd24qhEyKr6wBtow== dependencies: - "@nodelib/fs.scandir" "2.1.3" + "@nodelib/fs.scandir" "2.1.4" fastq "^1.6.0" "@nomiclabs/buidler-etherscan@^2.1.0": @@ -1173,36 +1265,15 @@ node-fetch "^2.6.0" semver "^6.3.0" -"@nomiclabs/ethereumjs-vm@4.2.2": - version "4.2.2" - resolved "https://registry.yarnpkg.com/@nomiclabs/ethereumjs-vm/-/ethereumjs-vm-4.2.2.tgz#2f8817113ca0fb6c44c1b870d0a809f0e026a6cc" - integrity sha512-8WmX94mMcJaZ7/m7yBbyuS6B+wuOul+eF+RY9fBpGhNaUpyMR/vFIcDojqcWQ4Yafe1tMKY5LDu2yfT4NZgV4Q== - dependencies: - async "^2.1.2" - async-eventemitter "^0.2.2" - core-js-pure "^3.0.1" - ethereumjs-account "^3.0.0" - ethereumjs-block "^2.2.2" - ethereumjs-blockchain "^4.0.3" - ethereumjs-common "^1.5.0" - ethereumjs-tx "^2.1.2" - ethereumjs-util "^6.2.0" - fake-merkle-patricia-tree "^1.0.1" - functional-red-black-tree "^1.0.1" - merkle-patricia-tree "3.0.0" - rustbn.js "~0.2.0" - safe-buffer "^5.1.1" - util.promisify "^1.0.0" - "@nomiclabs/hardhat-ethers@^2.0.2": version "2.0.2" resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-ethers/-/hardhat-ethers-2.0.2.tgz#c472abcba0c5185aaa4ad4070146e95213c68511" integrity sha512-6quxWe8wwS4X5v3Au8q1jOvXYEPkS1Fh+cME5u6AwNdnI4uERvPlVjlgRWzpnb+Rrt1l/cEqiNRH9GlsBMSDQg== "@nomiclabs/hardhat-etherscan@^2.1.1": - version "2.1.1" - resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-etherscan/-/hardhat-etherscan-2.1.1.tgz#186f3fa652a0ca20fb77aa857cfad2da845d5cbf" - integrity sha512-8TNUFsO5DpAfwNlXMDhcEtFAMOYsVNaQL2vq5vuCD45kUKBgL8H21++zOk231ha9D7LQWBMCIg7A7iPxw6Jwmg== + version "2.1.2" + resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-etherscan/-/hardhat-etherscan-2.1.2.tgz#333b70a6116e922d16de2ef833dcb7191319afdd" + integrity sha512-SExzaBuHlnmHw0HKkElHITzdvhUQmlIRc2tlaywzgvPbh7WoI24nYqZ4N0CO+JXSDgRpFycvQNA8zRaCqjuqUg== dependencies: "@ethersproject/abi" "^5.0.2" "@ethersproject/address" "^5.0.2" @@ -1328,23 +1399,23 @@ integrity sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ== "@sinonjs/commons@^1.6.0", "@sinonjs/commons@^1.7.0", "@sinonjs/commons@^1.8.1": - version "1.8.2" - resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.2.tgz#858f5c4b48d80778fde4b9d541f27edc0d56488b" - integrity sha512-sruwd86RJHdsVf/AtBoijDmUqJp3B6hF/DGC23C+JaegnDHaZyewCjoVGTdg3J0uz3Zs7NnIT05OBOmML72lQw== + version "1.8.3" + resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.3.tgz#3802ddd21a50a949b6721ddd72da36e67e7f1b2d" + integrity sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ== dependencies: type-detect "4.0.8" -"@sinonjs/fake-timers@^6.0.0", "@sinonjs/fake-timers@^6.0.1": - version "6.0.1" - resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-6.0.1.tgz#293674fccb3262ac782c7aadfdeca86b10c75c40" - integrity sha512-MZPUxrmFubI36XS1DI3qmI0YdN1gks62JtFZvxR67ljjSNCeK6U08Zx4msEWOXuofgqUt6zPHSi1H9fbjR/NRA== +"@sinonjs/fake-timers@^7.0.4": + version "7.1.1" + resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-7.1.1.tgz#7a6ac09ed4c3fe1854a2002e08db15be6c8570b8" + integrity sha512-am34LJf0N2nON/PT9G7pauA+xjcwX9P6x31m4hBgfUeSXYRZBRv/R6EcdWs8iV4XJjPO++NTsrj7ua/cN2s6ZA== dependencies: "@sinonjs/commons" "^1.7.0" -"@sinonjs/samsam@^5.3.1": - version "5.3.1" - resolved "https://registry.yarnpkg.com/@sinonjs/samsam/-/samsam-5.3.1.tgz#375a45fe6ed4e92fca2fb920e007c48232a6507f" - integrity sha512-1Hc0b1TtyfBu8ixF/tpfSHTVWKwCBLY4QJbkgnE7HcwyvT2xArDxb4K7dMgqRm3szI+LJbzmW/s4xxEhv6hwDg== +"@sinonjs/samsam@^6.0.1": + version "6.0.2" + resolved "https://registry.yarnpkg.com/@sinonjs/samsam/-/samsam-6.0.2.tgz#a0117d823260f282c04bff5f8704bdc2ac6910bb" + integrity sha512-jxPRPp9n93ci7b8hMfJOFDPRLFYadN6FSpeROFTR4UNF4i5b+EK6m4QXPO46BDhFgRy1JuS87zAnFOzCUwMJcQ== dependencies: "@sinonjs/commons" "^1.6.0" lodash.get "^4.4.2" @@ -1365,10 +1436,12 @@ resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.12.0.tgz#18a0fb2a9d2484b23176f63b16093c64794fc323" integrity sha512-DT3f/Aa4tQysZwUsuqBwvr8YRJzKkvPUKV/9o2/o5EVw3xqlbzmtx4O60lTUcZdCawL+N8bBLNUyOGpHjGlJVQ== -"@solidity-parser/parser@^0.8.1": - version "0.8.1" - resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.8.1.tgz#1b606578af86b9ad10755409804a6ba83f9ce8a4" - integrity sha512-DF7H6T8I4lo2IZOE2NZwt3631T8j1gjpQLjmvY2xBNK50c4ltslR4XPKwT6RkeSd4+xCAK0GHC/k7sbRDBE4Yw== +"@solidity-parser/parser@^0.13.0", "@solidity-parser/parser@^0.13.0-rc.8": + version "0.13.1" + resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.13.1.tgz#233da4588e4e593ebca0e4c920d3bac1c3bf472c" + integrity sha512-V2iBpgVOgWGDQa221hiPjdhKnLcFYltQH1uwT42nu6qn4VX+jq7KLr6Fs31pmIpxaGbOmiKneKHXJ+BL8rO+xQ== + dependencies: + antlr4ts "^0.5.0-alpha.4" "@szmarczak/http-timer@^1.1.2": version "1.1.2" @@ -1377,17 +1450,15 @@ dependencies: defer-to-connect "^1.0.1" -"@truffle/blockchain-utils@^0.0.27": - version "0.0.27" - resolved "https://registry.yarnpkg.com/@truffle/blockchain-utils/-/blockchain-utils-0.0.27.tgz#e8d4c337e5478bc316353a1f63a86fa1439e62c8" - integrity sha512-QldE+NNCPbRpVU82rd1JuOrsze79DTBXYkzZPSGjPCRU6hTGVbPrqeHlW2Ju7LREDsjWrzOaU2LxLME11xLwPA== - dependencies: - source-map-support "^0.5.19" +"@truffle/blockchain-utils@^0.0.30": + version "0.0.30" + resolved "https://registry.yarnpkg.com/@truffle/blockchain-utils/-/blockchain-utils-0.0.30.tgz#1fafbd8e8694d79280177b5eff167b0690838855" + integrity sha512-3hkHSHxVavoALcxpBqD4YwHuCmkBrvjq6PAGw93i6WCB+pnejBD5sFjVCiZZKCogh4kGObxxcwu53+3dyT/6IQ== -"@truffle/codec@^0.10.1": - version "0.10.1" - resolved "https://registry.yarnpkg.com/@truffle/codec/-/codec-0.10.1.tgz#70df52ddf1c64781a23daaccda24e10bfb9dec9d" - integrity sha512-c1lC9Wcp+Z1DLvEYH3dkEtMKnUJx72CirO3kmi0OgFSA5QqTDCtfrVOhAugcb/iMLgqUK05/pexp2whb4oASKA== +"@truffle/codec@^0.10.7": + version "0.10.7" + resolved "https://registry.yarnpkg.com/@truffle/codec/-/codec-0.10.7.tgz#c08f656cb53ef580305ca2b42289b3d923ea1e14" + integrity sha512-mKoAzv2VOjIlRc8VD6rQBVj75cqUUVs8O4LzHNw6lnXHIas7NgBYsCixPGoanuVQ6HEu3NzRWfXDtJPHBUZJcg== dependencies: big.js "^5.2.2" bn.js "^5.1.3" @@ -1398,75 +1469,72 @@ lodash.partition "^4.6.0" lodash.sum "^4.0.2" semver "^7.3.4" - source-map-support "^0.5.19" utf8 "^3.0.0" - web3-utils "1.2.9" + web3-utils "1.3.6" -"@truffle/contract-schema@^3.3.4": - version "3.3.4" - resolved "https://registry.yarnpkg.com/@truffle/contract-schema/-/contract-schema-3.3.4.tgz#95f0265cac7de7bcaa0542f5fe671a7896011bfe" - integrity sha512-HzscBl/GhZBvPNQeD9l6ewSHSkvNmE+bA0iTVa0Y2mNf5GD5Y3fK2NPyfbOdtckOvLqebvYGEDEPRiXc3BZ05g== +"@truffle/contract-schema@^3.4.1": + version "3.4.1" + resolved "https://registry.yarnpkg.com/@truffle/contract-schema/-/contract-schema-3.4.1.tgz#13b404383d438b48960862022a20102970323666" + integrity sha512-2gvu6gxJtbbI67H2Bwh2rBuej+1uCV3z4zKFzQZP00hjNoL+QfybrmBcOVB88PflBeEB+oUXuwQfDoKX3TXlnQ== dependencies: ajv "^6.10.0" crypto-js "^3.1.9-1" debug "^4.3.1" -"@truffle/contract@^4.2.29": - version "4.3.11" - resolved "https://registry.yarnpkg.com/@truffle/contract/-/contract-4.3.11.tgz#b098df9719ea7134320a3608b86efc278a31ca79" - integrity sha512-SrE0HnfwjF+a/gJXdOzcfma5c5jPE1ONPfsEO+f3MERRZj7lRSoJDrOXTRgASOzhnk9BGzJQa6oMBI/k+rwIuw== +"@truffle/contract@^4.3.8": + version "4.3.17" + resolved "https://registry.yarnpkg.com/@truffle/contract/-/contract-4.3.17.tgz#bacdc19daad439a5351fc76747bae260f6821ba3" + integrity sha512-O/an0UdKgHfsPK9sdCEsbOAPE7Wke9s4pjh9ceXKaqMFyTYIhpnb41dXduyCgepfabZfUEZiwsOa18xy/YCdTg== dependencies: - "@truffle/blockchain-utils" "^0.0.27" - "@truffle/contract-schema" "^3.3.4" - "@truffle/debug-utils" "^5.0.11" - "@truffle/error" "^0.0.12" - "@truffle/interface-adapter" "^0.4.19" + "@truffle/blockchain-utils" "^0.0.30" + "@truffle/contract-schema" "^3.4.1" + "@truffle/debug-utils" "^5.0.17" + "@truffle/error" "^0.0.14" + "@truffle/interface-adapter" "^0.4.24" bignumber.js "^7.2.1" ethereum-ens "^0.8.0" ethers "^4.0.32" - source-map-support "^0.5.19" - web3 "1.2.9" - web3-core-helpers "1.2.9" - web3-core-promievent "1.2.9" - web3-eth-abi "1.2.9" - web3-utils "1.2.9" - -"@truffle/debug-utils@^5.0.11": - version "5.0.11" - resolved "https://registry.yarnpkg.com/@truffle/debug-utils/-/debug-utils-5.0.11.tgz#297ff83943212bf593a641180e3b28b230acadaa" - integrity sha512-KurW9r1DcK9c7/I0H21YWGBKu77gWm5HfBW6T+MjuRh5FGpxZ7GPka8oQkJCAZQuZKaQc9r9BoCQYQx1NX8pIg== - dependencies: - "@truffle/codec" "^0.10.1" + web3 "1.3.6" + web3-core-helpers "1.3.6" + web3-core-promievent "1.3.6" + web3-eth-abi "1.3.6" + web3-utils "1.3.6" + +"@truffle/debug-utils@^5.0.17": + version "5.0.17" + resolved "https://registry.yarnpkg.com/@truffle/debug-utils/-/debug-utils-5.0.17.tgz#02396d5526c257f36635d82858a67fd95766a0af" + integrity sha512-0d6rc20id3UN/rH8VU1MckDhmiUX4iZZvH4Z1SqG4h/c22WqpiNmRRJBPetA2dDo2IhPMRa7/4W0/fVKD/v20A== + dependencies: + "@truffle/codec" "^0.10.7" "@trufflesuite/chromafi" "^2.2.2" bn.js "^5.1.3" chalk "^2.4.2" debug "^4.3.1" highlight.js "^10.4.0" - highlightjs-solidity "^1.0.21" + highlightjs-solidity "^1.1.0" -"@truffle/error@^0.0.12": - version "0.0.12" - resolved "https://registry.yarnpkg.com/@truffle/error/-/error-0.0.12.tgz#83e02e6ffe1d154fe274141d90038a91fd1e186d" - integrity sha512-kZqqnPR9YDJG7KCDOcN1qH16Qs0oz1PzF0Y93AWdhXuL9S9HYo/RUUeqGKbPpRBEZldQUS8aa4EzfK08u5pu6g== +"@truffle/error@^0.0.14": + version "0.0.14" + resolved "https://registry.yarnpkg.com/@truffle/error/-/error-0.0.14.tgz#59683b5407bede7bddf16d80dc5592f9c5e5fa05" + integrity sha512-utJx+SZYoMqk8wldQG4gCVKhV8GwMJbWY7sLXFT/D8wWZTnE2peX7URFJh/cxkjTRCO328z1s2qewkhyVsu2HA== -"@truffle/interface-adapter@^0.4.19": - version "0.4.19" - resolved "https://registry.yarnpkg.com/@truffle/interface-adapter/-/interface-adapter-0.4.19.tgz#19248ac88099f8df34f58a3d43a95ba3470dc89a" - integrity sha512-+Zz6Fr8+I2wYSS8RM3WBOMzf22QffMQTnlsYsRgRHzv3gYoRA9ZDLb84lFRfmWyw+IdXTo90tjRHEb5krC6uxg== +"@truffle/interface-adapter@^0.4.24": + version "0.4.24" + resolved "https://registry.yarnpkg.com/@truffle/interface-adapter/-/interface-adapter-0.4.24.tgz#5d6d4f10c756e967f19ac2ad1620d11d25c034bb" + integrity sha512-2Zho4dJbm/XGwNleY7FdxcjXiAR3SzdGklgrAW4N/YVmltaJv6bT56ACIbPNN6AdzkTSTO65OlsB/63sfSa/VA== dependencies: bn.js "^5.1.3" ethers "^4.0.32" - source-map-support "^0.5.19" - web3 "1.2.9" + web3 "1.3.6" "@truffle/provider@^0.2.24": - version "0.2.26" - resolved "https://registry.yarnpkg.com/@truffle/provider/-/provider-0.2.26.tgz#88e31b79973c2427c4a17d9a59411e6fbc810190" - integrity sha512-YKPmhB9S9AQkT2ePGtadwjDduxU23DXXy+5zyM5fevw5GCbXSnf+jG6rICXjPkVFjuKBlXuq5JbuERZn43522Q== + version "0.2.31" + resolved "https://registry.yarnpkg.com/@truffle/provider/-/provider-0.2.31.tgz#4a52fedb663366a36214dc9f33772c832c941b61" + integrity sha512-IA1EYgwXX3sJgxmOEq6PDbSKaiOs4cSm1AImsZawomDW1MnmQY+6IotRrUsfUZsYPto/2ovNPfawNoxvAM0KzQ== dependencies: - "@truffle/error" "^0.0.12" - "@truffle/interface-adapter" "^0.4.19" - web3 "1.2.9" + "@truffle/error" "^0.0.14" + "@truffle/interface-adapter" "^0.4.24" + web3 "1.3.6" "@trufflesuite/chromafi@^2.2.2": version "2.2.2" @@ -1496,16 +1564,21 @@ ethers "^5.0.2" "@typechain/ethers-v5@^6.0.0": - version "6.0.0" - resolved "https://registry.yarnpkg.com/@typechain/ethers-v5/-/ethers-v5-6.0.0.tgz#eb0df3f12be92f03db4e59656a46a518058730b9" - integrity sha512-yJhl3j5mab3yl8qm1TsvHQKwrUPn491SBJvHf/b3PKVtt0VxXJwU2T05yzqEpkMFGA0qkmp3cxQJDK2WGIPP+g== + version "6.0.5" + resolved "https://registry.yarnpkg.com/@typechain/ethers-v5/-/ethers-v5-6.0.5.tgz#39bbf9baadd0e8d9efad9d16c60152b7cd9a467b" + integrity sha512-KJh+EWuxmX1a17fQWS1ba8DCYcqK7UpdbqMZZwyfiv9FQfn8ZQJX17anbkCMOSU8TV3EvRuJ/vFEKGzKnpkO8g== "@typechain/hardhat@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@typechain/hardhat/-/hardhat-1.0.1.tgz#6e53956c15b2aff073413cfcdb3f5339b0a85f2e" integrity sha512-gRETPlvLdN95PIP3PVktEtQSnSMJMWxaxNKI34KFPYEuW4QLLm6UrUCHWmulhB1eUQ1EhYRAda7kEhcJOQ/M1g== -"@types/bn.js@^4.11.3", "@types/bn.js@^4.11.4", "@types/bn.js@^4.11.5": +"@types/abstract-leveldown@*": + version "5.0.1" + resolved "https://registry.yarnpkg.com/@types/abstract-leveldown/-/abstract-leveldown-5.0.1.tgz#3c7750d0186b954c7f2d2f6acc8c3c7ba0c3412e" + integrity sha512-wYxU3kp5zItbxKmeRYCEplS2MW7DzyBnxPGj+GJVHZEUZiK/nn5Ei1sUFgURDh+X051+zsGe28iud3oHjrYWQQ== + +"@types/bn.js@^4.11.3", "@types/bn.js@^4.11.5": version "4.11.6" resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-4.11.6.tgz#c306c70d9358aaea33cd4eda092a742b9505967c" integrity sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg== @@ -1520,9 +1593,9 @@ "@types/node" "*" "@types/chai@^4.2.11": - version "4.2.14" - resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.2.14.tgz#44d2dd0b5de6185089375d976b4ec5caf6861193" - integrity sha512-G+ITQPXkwTrslfG5L/BksmbLUA0M1iybEsmCWPqzSxsRRhJZimBKJkoMi8fr/CPygPTj4zO5pJH7I2/cm9M7SQ== + version "4.2.18" + resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.2.18.tgz#0c8e298dbff8205e2266606c1ea5fbdba29b46e4" + integrity sha512-rS27+EkB/RE1Iz3u0XtVL5q36MGDWbgYe7zWiodyKNUnthxY0rukK5V36eiUCtCisB7NN8zKYH6DO2M37qxFEQ== "@types/concat-stream@^1.6.0": version "1.6.0" @@ -1547,9 +1620,17 @@ "@types/node" "*" "@types/json-schema@^7.0.3": - version "7.0.6" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.6.tgz#f4c7ec43e81b319a9815115031709f26987891f0" - integrity sha512-3c+yGKvVP5Y9TYBEibGNR+kLtijnj7mYrXRg+WpFb2X9xm04g/DXYkfg4hmzJQosc9snFNUPkbYIhu+KAm6jJw== + version "7.0.7" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.7.tgz#98a993516c859eb0d5c4c8f098317a9ea68db9ad" + integrity sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA== + +"@types/levelup@^4.3.0": + version "4.3.1" + resolved "https://registry.yarnpkg.com/@types/levelup/-/levelup-4.3.1.tgz#7a53b9fd510716e11b2065332790fdf5f9b950b9" + integrity sha512-n//PeTpbHLjMLTIgW5B/g06W/6iuTBHuvUka2nFL9APMSVMNe2r4enADfu3CIE9IyV9E+uquf9OEQQqrDeg24A== + dependencies: + "@types/abstract-leveldown" "*" + "@types/node" "*" "@types/lru-cache@^5.1.0": version "5.1.0" @@ -1557,9 +1638,9 @@ integrity sha512-RaE0B+14ToE4l6UqdarKPnXwVDuigfFv+5j9Dze/Nqr23yyuqdNvzcZi3xB+3Agvi5R4EOgAksfv3lXX4vBt9w== "@types/minimatch@*": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" - integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== + version "3.0.4" + resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.4.tgz#f0ec25dbf2f0e4b18647313ac031134ca5b24b21" + integrity sha512-1z8k4wzFnNjVK/tlxvrWuK5WMt6mydWWP7+zvH5eFep4oj+UkrfiJTRtjCeBXNpwaA/FYqqtb4/QS4ianFpIRA== "@types/mkdirp@^0.5.2": version "0.5.2" @@ -1569,9 +1650,9 @@ "@types/node" "*" "@types/mocha@^8.0.2": - version "8.0.3" - resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-8.0.3.tgz#51b21b6acb6d1b923bbdc7725c38f9f455166402" - integrity sha512-vyxR57nv8NfcU0GZu8EUXZLTbCMupIUwy95LJ6lllN+JRPG25CwMHoB1q5xKh8YKhQnHYRAn4yW2yuHbf/5xgg== + version "8.2.2" + resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-8.2.2.tgz#91daa226eb8c2ff261e6a8cbf8c7304641e095e0" + integrity sha512-Lwh0lzzqT5Pqh6z61P3c3P5nm6fzQK/MMHl9UKeneAeInVflBSz1O2EkX6gM6xfJd7FBXBY5purtLx7fUiZ7Hw== "@types/node-fetch@^2.5.5": version "2.5.8" @@ -1582,34 +1663,24 @@ form-data "^3.0.0" "@types/node@*": - version "14.14.37" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.37.tgz#a3dd8da4eb84a996c36e331df98d82abd76b516e" - integrity sha512-XYmBiy+ohOR4Lh5jE379fV2IU+6Jn4g5qASinhitfyO71b/sCo6MKsMLF5tc7Zf2CE8hViVQyYSobJNke8OvUw== + version "15.6.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-15.6.1.tgz#32d43390d5c62c5b6ec486a9bc9c59544de39a08" + integrity sha512-7EIraBEyRHEe7CH+Fm1XvgqU6uwZN8Q7jppJGcqjROMT29qhAuuOxYB1uEY5UMYQKEmA5D+5tBnhdaPXSsLONA== "@types/node@^10.0.3": version "10.17.44" resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.44.tgz#3945e6b702cb6403f22b779c8ea9e5c3f44ead40" integrity sha512-vHPAyBX1ffLcy4fQHmDyIUMUb42gHZjPHU66nhvbMzAWJqHnySGZ6STwN3rwrnSd1FHB0DI/RWgGELgKSYRDmw== -"@types/node@^10.12.18": - version "10.17.52" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.52.tgz#dc960d4e256331b3c697b7a573ee98b882febee5" - integrity sha512-bKnO8Rcj03i6JTzweabq96k29uVNcXGB0bkwjVQTFagDgxxNged18281AZ0nTMHl+aFpPPWyPrk4Z3+NtW/z5w== - "@types/node@^12.12.6": - version "12.20.6" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.6.tgz#7b73cce37352936e628c5ba40326193443cfba25" - integrity sha512-sRVq8d+ApGslmkE9e3i+D3gFGk7aZHAT+G4cIpIEdLJYPsWiSPwcAnJEjddLQQDqV3Ra2jOclX/Sv6YrvGYiWA== - -"@types/node@^12.6.1": - version "12.20.1" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.1.tgz#63d36c10e162666f0107f247cdca76542c3c7472" - integrity sha512-tCkE96/ZTO+cWbln2xfyvd6ngHLanvVlJ3e5BeirJ3BYI5GbAyubIrmV4JjjugDly5D9fHjOL5MNsqsCnqwW6g== + version "12.20.13" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.13.tgz#e743bae112bd779ac9650f907197dd2caa7f0364" + integrity sha512-1x8W5OpxPq+T85OUsHRP6BqXeosKmeXRtjoF39STcdf/UWLqUsoehstZKOi0CunhVqHG17AyZgpj20eRVooK6A== "@types/node@^14.10.2": - version "14.14.5" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.5.tgz#e92d3b8f76583efa26c1a63a21c9d3c1143daa29" - integrity sha512-H5Wn24s/ZOukBmDn03nnGTp18A60ny9AmCwnEcgJiTgSGsCO7k+NWP7zjCCbhlcnVCoI+co52dUAt9GMhOSULw== + version "14.17.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.17.1.tgz#5e07e0cb2ff793aa7a1b41deae76221e6166049f" + integrity sha512-/tpUyFD7meeooTRwl3sYlihx2BrJE7q9XF71EguPFIySj9B7qgnRtHsHTho+0AUm4m1SvWGm6uSncrR94q6Vtw== "@types/node@^8.0.0": version "8.10.66" @@ -1628,11 +1699,16 @@ resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.2.1.tgz#374e31645d58cb18a07b3ecd8e9dede4deb2cccd" integrity sha512-DxZZbyMAM9GWEzXL+BMZROWz9oo6A9EilwwOMET2UVu2uZTqMWS5S69KVtuVKaRjCUpcrOXRalet86/OpG4kqw== -"@types/qs@^6.2.31", "@types/qs@^6.9.4": +"@types/qs@^6.2.31": version "6.9.5" resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.5.tgz#434711bdd49eb5ee69d90c1d67c354a9a8ecb18b" integrity sha512-/JHkVHtx/REVG0VVToGRGH2+23hsYLHdyG+GrvoUGlGAd0ErauXDyvHtRI/7H7mzLm+tBCKA7pfcpkQ1lf58iQ== +"@types/qs@^6.9.4": + version "6.9.6" + resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.6.tgz#df9c3c8b31a247ec315e6996566be3171df4b3b1" + integrity sha512-0/HnwIfW4ki2D8L8c9GVcG5I72s9jP5GSLVF0VIXDW00kmIpA6O33G7a8n59Tmh7Nz0WUC3rSb7PTY/sdW2JzA== + "@types/resolve@^0.0.8": version "0.0.8" resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-0.0.8.tgz#f26074d238e02659e323ce1a13d041eee280e194" @@ -1641,80 +1717,80 @@ "@types/node" "*" "@types/secp256k1@^4.0.1": - version "4.0.1" - resolved "https://registry.yarnpkg.com/@types/secp256k1/-/secp256k1-4.0.1.tgz#fb3aa61a1848ad97d7425ff9dcba784549fca5a4" - integrity sha512-+ZjSA8ELlOp8SlKi0YLB2tz9d5iPNEmOBd+8Rz21wTMdaXQIa9b6TEnD6l5qKOCypE7FSyPyck12qZJxSDNoog== + version "4.0.2" + resolved "https://registry.yarnpkg.com/@types/secp256k1/-/secp256k1-4.0.2.tgz#20c29a87149d980f64464e56539bf4810fdb5d1d" + integrity sha512-QMg+9v0bbNJ2peLuHRWxzmy0HRJIG6gFZNhaRSp7S3ggSbCCxiqQB2/ybvhXyhHOCequpNkrx7OavNhrWOsW0A== dependencies: "@types/node" "*" "@typescript-eslint/eslint-plugin@^4.6.0": - version "4.6.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.6.0.tgz#210cd538bb703f883aff81d3996961f5dba31fdb" - integrity sha512-1+419X+Ynijytr1iWI+/IcX/kJryc78YNpdaXR1aRO1sU3bC0vZrIAF1tIX7rudVI84W7o7M4zo5p1aVt70fAg== + version "4.25.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.25.0.tgz#d82657b6ab4caa4c3f888ff923175fadc2f31f2a" + integrity sha512-Qfs3dWkTMKkKwt78xp2O/KZQB8MPS1UQ5D3YW2s6LQWBE1074BE+Rym+b1pXZIX3M3fSvPUDaCvZLKV2ylVYYQ== dependencies: - "@typescript-eslint/experimental-utils" "4.6.0" - "@typescript-eslint/scope-manager" "4.6.0" + "@typescript-eslint/experimental-utils" "4.25.0" + "@typescript-eslint/scope-manager" "4.25.0" debug "^4.1.1" functional-red-black-tree "^1.0.1" + lodash "^4.17.15" regexpp "^3.0.0" semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/experimental-utils@4.6.0": - version "4.6.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.6.0.tgz#f750aef4dd8e5970b5c36084f0a5ca2f0db309a4" - integrity sha512-pnh6Beh2/4xjJVNL+keP49DFHk3orDHHFylSp3WEjtgW3y1U+6l+jNnJrGlbs6qhAz5z96aFmmbUyKhunXKvKw== +"@typescript-eslint/experimental-utils@4.25.0": + version "4.25.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.25.0.tgz#b2febcfa715d2c1806fd5f0335193a6cd270df54" + integrity sha512-f0doRE76vq7NEEU0tw+ajv6CrmPelw5wLoaghEHkA2dNLFb3T/zJQqGPQ0OYt5XlZaS13MtnN+GTPCuUVg338w== dependencies: "@types/json-schema" "^7.0.3" - "@typescript-eslint/scope-manager" "4.6.0" - "@typescript-eslint/types" "4.6.0" - "@typescript-eslint/typescript-estree" "4.6.0" + "@typescript-eslint/scope-manager" "4.25.0" + "@typescript-eslint/types" "4.25.0" + "@typescript-eslint/typescript-estree" "4.25.0" eslint-scope "^5.0.0" eslint-utils "^2.0.0" "@typescript-eslint/parser@^4.6.0": - version "4.6.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.6.0.tgz#7e9ff7df2f21d5c8f65f17add3b99eeeec33199d" - integrity sha512-Dj6NJxBhbdbPSZ5DYsQqpR32MwujF772F2H3VojWU6iT4AqL4BKuoNWOPFCoSZvCcADDvQjDpa6OLDAaiZPz2Q== + version "4.25.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.25.0.tgz#6b2cb6285aa3d55bfb263c650739091b0f19aceb" + integrity sha512-OZFa1SKyEJpAhDx8FcbWyX+vLwh7OEtzoo2iQaeWwxucyfbi0mT4DijbOSsTgPKzGHr6GrF2V5p/CEpUH/VBxg== dependencies: - "@typescript-eslint/scope-manager" "4.6.0" - "@typescript-eslint/types" "4.6.0" - "@typescript-eslint/typescript-estree" "4.6.0" + "@typescript-eslint/scope-manager" "4.25.0" + "@typescript-eslint/types" "4.25.0" + "@typescript-eslint/typescript-estree" "4.25.0" debug "^4.1.1" -"@typescript-eslint/scope-manager@4.6.0": - version "4.6.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.6.0.tgz#b7d8b57fe354047a72dfb31881d9643092838662" - integrity sha512-uZx5KvStXP/lwrMrfQQwDNvh2ppiXzz5TmyTVHb+5TfZ3sUP7U1onlz3pjoWrK9konRyFe1czyxObWTly27Ang== +"@typescript-eslint/scope-manager@4.25.0": + version "4.25.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.25.0.tgz#9d86a5bcc46ef40acd03d85ad4e908e5aab8d4ca" + integrity sha512-2NElKxMb/0rya+NJG1U71BuNnp1TBd1JgzYsldsdA83h/20Tvnf/HrwhiSlNmuq6Vqa0EzidsvkTArwoq+tH6w== dependencies: - "@typescript-eslint/types" "4.6.0" - "@typescript-eslint/visitor-keys" "4.6.0" + "@typescript-eslint/types" "4.25.0" + "@typescript-eslint/visitor-keys" "4.25.0" -"@typescript-eslint/types@4.6.0": - version "4.6.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.6.0.tgz#157ca925637fd53c193c6bf226a6c02b752dde2f" - integrity sha512-5FAgjqH68SfFG4UTtIFv+rqYJg0nLjfkjD0iv+5O27a0xEeNZ5rZNDvFGZDizlCD1Ifj7MAbSW2DPMrf0E9zjA== +"@typescript-eslint/types@4.25.0": + version "4.25.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.25.0.tgz#0e444a5c5e3c22d7ffa5e16e0e60510b3de5af87" + integrity sha512-+CNINNvl00OkW6wEsi32wU5MhHti2J25TJsJJqgQmJu3B3dYDBcmOxcE5w9cgoM13TrdE/5ND2HoEnBohasxRQ== -"@typescript-eslint/typescript-estree@4.6.0": - version "4.6.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.6.0.tgz#85bd98dcc8280511cfc5b2ce7b03a9ffa1732b08" - integrity sha512-s4Z9qubMrAo/tw0CbN0IN4AtfwuehGXVZM0CHNMdfYMGBDhPdwTEpBrecwhP7dRJu6d9tT9ECYNaWDHvlFSngA== +"@typescript-eslint/typescript-estree@4.25.0": + version "4.25.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.25.0.tgz#942e4e25888736bff5b360d9b0b61e013d0cfa25" + integrity sha512-1B8U07TGNAFMxZbSpF6jqiDs1cVGO0izVkf18Q/SPcUAc9LhHxzvSowXDTvkHMWUVuPpagupaW63gB6ahTXVlg== dependencies: - "@typescript-eslint/types" "4.6.0" - "@typescript-eslint/visitor-keys" "4.6.0" + "@typescript-eslint/types" "4.25.0" + "@typescript-eslint/visitor-keys" "4.25.0" debug "^4.1.1" globby "^11.0.1" is-glob "^4.0.1" - lodash "^4.17.15" semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/visitor-keys@4.6.0": - version "4.6.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.6.0.tgz#fb05d6393891b0a089b243fc8f9fb8039383d5da" - integrity sha512-38Aa9Ztl0XyFPVzmutHXqDMCu15Xx8yKvUo38Gu3GhsuckCh3StPI5t2WIO9LHEsOH7MLmlGfKUisU8eW1Sjhg== +"@typescript-eslint/visitor-keys@4.25.0": + version "4.25.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.25.0.tgz#863e7ed23da4287c5b469b13223255d0fde6aaa7" + integrity sha512-AmkqV9dDJVKP/TcZrbf6s6i1zYXt5Hl8qOLrRDTFfRNae4+LB8A4N3i+FLZPW85zIxRy39BgeWOfMS3HoH5ngg== dependencies: - "@typescript-eslint/types" "4.6.0" + "@typescript-eslint/types" "4.25.0" eslint-visitor-keys "^2.0.0" "@ungap/promise-all-settled@1.1.2": @@ -1765,6 +1841,17 @@ abstract-leveldown@^5.0.0, abstract-leveldown@~5.0.0: dependencies: xtend "~4.0.0" +abstract-leveldown@^6.2.1: + version "6.3.0" + resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-6.3.0.tgz#d25221d1e6612f820c35963ba4bd739928f6026a" + integrity sha512-TU5nlYgta8YrBMNpc9FwQzRbiXsj49gsALsXadbGHt9CROPzX5fB0rWDR5mtdpOOKa5XqRFpbj1QroPAoPzVjQ== + dependencies: + buffer "^5.5.0" + immediate "^3.2.3" + level-concat-iterator "~2.0.0" + level-supports "~1.0.0" + xtend "~4.0.0" + abstract-leveldown@~2.6.0: version "2.6.3" resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-2.6.3.tgz#1c5e8c6a5ef965ae8c35dfb3a8770c476b82c4b8" @@ -1772,6 +1859,17 @@ abstract-leveldown@~2.6.0: dependencies: xtend "~4.0.0" +abstract-leveldown@~6.2.1: + version "6.2.3" + resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-6.2.3.tgz#036543d87e3710f2528e47040bc3261b77a9a8eb" + integrity sha512-BsLm5vFMRUrrLeCcRc+G0t2qOaTzpoJQLOubq2XM72eNpjF5UdU5o/5NvlNhx95XHcAvcl8OMXr4mlg/fRgUXQ== + dependencies: + buffer "^5.5.0" + immediate "^3.2.3" + level-concat-iterator "~2.0.0" + level-supports "~1.0.0" + xtend "~4.0.0" + accepts@~1.3.7: version "1.3.7" resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" @@ -1780,7 +1878,7 @@ accepts@~1.3.7: mime-types "~2.1.24" negotiator "0.6.2" -acorn-jsx@^5.0.0, acorn-jsx@^5.2.0: +acorn-jsx@^5.0.0, acorn-jsx@^5.3.1: version "5.3.1" resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.1.tgz#fc8661e11b7ac1539c47dbfea2e72b3af34d267b" integrity sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng== @@ -1832,6 +1930,16 @@ ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.3, ajv@^6.12.4, ajv@^6.6.1, ajv@^6.9.1: json-schema-traverse "^0.4.1" uri-js "^4.2.2" +ajv@^8.0.1: + version "8.5.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.5.0.tgz#695528274bcb5afc865446aa275484049a18ae4b" + integrity sha512-Y2l399Tt1AguU3BPRP9Fn4eN+Or+StUGWCUpbnFyXSo8NZ9S4uj+AG2pjs5apK+ZMOwYOz1+a+VKvKH7CudXgQ== + dependencies: + fast-deep-equal "^3.1.1" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" + uri-js "^4.2.2" + amdefine@>=0.0.4: version "1.0.1" resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" @@ -1902,7 +2010,7 @@ ansi-styles@^3.2.0, ansi-styles@^3.2.1: dependencies: color-convert "^1.9.0" -ansi-styles@^4.1.0: +ansi-styles@^4.0.0, ansi-styles@^4.1.0: version "4.3.0" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== @@ -1914,14 +2022,26 @@ antlr4@4.7.1: resolved "https://registry.yarnpkg.com/antlr4/-/antlr4-4.7.1.tgz#69984014f096e9e775f53dd9744bf994d8959773" integrity sha512-haHyTW7Y9joE5MVs37P2lNYfU2RWBLfcRDD8OWldcdZm5TiCE91B5Xl1oWSwiDUSd4rlExpt2pu1fksYQjRBYQ== +antlr4ts@^0.5.0-alpha.4: + version "0.5.0-alpha.4" + resolved "https://registry.yarnpkg.com/antlr4ts/-/antlr4ts-0.5.0-alpha.4.tgz#71702865a87478ed0b40c0709f422cf14d51652a" + integrity sha512-WPQDt1B74OfPv/IMS2ekXAKkTZIHl88uMetg6q3OTqgFxZ/dxDXI0EWLyZid/1Pe6hTftyg5N7gel5wNAGxXyQ== + anymatch@~3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.1.tgz#c55ecf02185e2469259399310c173ce31233b142" - integrity sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg== + version "3.1.2" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" + integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg== dependencies: normalize-path "^3.0.0" picomatch "^2.0.4" +arconnect@^0.2.8: + version "0.2.9" + resolved "https://registry.yarnpkg.com/arconnect/-/arconnect-0.2.9.tgz#be07d2281f20d864a91cdcb44e3eed7fccb97f12" + integrity sha512-Us49eN/+8l6BrkAPdXnJVPwWlxxUPR7QaBjA0j3OBAcioIFRpwTdoPN9FxtwDGN91lgM6ebOudTXJToRiNizoA== + dependencies: + arweave "^1.10.13" + arg@^4.1.0: version "4.1.3" resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" @@ -1934,6 +2054,11 @@ argparse@^1.0.7: dependencies: sprintf-js "~1.0.2" +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + arr-diff@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" @@ -1963,11 +2088,6 @@ array-back@^2.0.0: dependencies: typical "^2.6.1" -array-filter@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/array-filter/-/array-filter-1.0.0.tgz#baf79e62e6ef4c2a4c0b831232daffec251f9d83" - integrity sha1-uveeYubvTCpMC4MSMtr/7CUfnYM= - array-flatten@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" @@ -1989,10 +2109,11 @@ array-unique@^0.3.2: integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= arweave@^1.10.13: - version "1.10.13" - resolved "https://registry.yarnpkg.com/arweave/-/arweave-1.10.13.tgz#88205154524b30a22b18f011f7241b2ddc22413c" - integrity sha512-FfM9CAF5msAk/12d87KDKu+00/ZriEf/S3ei2FTPMKCOdOb++SwLx7F3kAKO74obAgIGzL8X4Y0D/aV8oNNJDA== + version "1.10.14" + resolved "https://registry.yarnpkg.com/arweave/-/arweave-1.10.14.tgz#9d34bc92aeb9e974639be51198b697d783bc7927" + integrity sha512-0xEjsrhSqqQNa6bDGztO+PhFOn5JkUiC5B/WSu+2KszdGXMuekos3XVkirIgrH4VKqLq84kLmN1ckXuiLkIWgQ== dependencies: + arconnect "^0.2.8" asn1.js "^5.4.1" axios "^0.21.1" base64-js "^1.3.1" @@ -2045,7 +2166,12 @@ astral-regex@^1.0.0: resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg== -async-eventemitter@^0.2.2: +astral-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" + integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== + +async-eventemitter@^0.2.2, async-eventemitter@^0.2.4: version "0.2.4" resolved "https://registry.yarnpkg.com/async-eventemitter/-/async-eventemitter-0.2.4.tgz#f5e7c8ca7d3e46aab9ec40a292baf686a0bafaca" integrity sha512-pd20BwL7Yt1zwDFy+8MX8F1+WCT8aQeKj0kQnTrH9WaeRETlRamVhD0JtRPmrV4GfOJ2F9CvdQkZeZhnh2TuHw== @@ -2092,11 +2218,9 @@ atob@^2.1.2: integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== available-typed-arrays@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.2.tgz#6b098ca9d8039079ee3f77f7b783c4480ba513f5" - integrity sha512-XWX3OX8Onv97LMk/ftVyBibpGwY5a8SmuxZPzeOxqmuEqUCOM9ZE+uIaD1VNJ5QnvU2UQusvmKbuM1FR8QWGfQ== - dependencies: - array-filter "^1.0.0" + version "1.0.4" + resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.4.tgz#9e0ae84ecff20caae6a94a1c3bc39b955649b7a9" + integrity sha512-SA5mXJWrId1TaQjfxUYghbqQ/hYioKmLJvPJyDuYRtXXenFNMjj4hSSt1Cf1xsuXSXrtxrVC5Ot4eU6cOtBDdA== aws-sign2@~0.7.0: version "0.7.0" @@ -2104,9 +2228,9 @@ aws-sign2@~0.7.0: integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= aws4@^1.8.0: - version "1.10.1" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.10.1.tgz#e1e82e4f3e999e2cfd61b161280d16a111f86428" - integrity sha512-zg7Hz2k5lI8kb7U32998pRRFin7zJlkfezGJjUc2heaD4Pw2wObakCDVzkKztTm/Ln7eiVvYsjqak0Ed4LkMDA== + version "1.11.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" + integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== axios@^0.21.1: version "0.21.1" @@ -2642,9 +2766,9 @@ backoff@^2.5.0: precond "0.2" balanced-match@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" - integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== base-x@^3.0.2, base-x@^3.0.8: version "3.0.8" @@ -2743,27 +2867,12 @@ bn.js@4.11.6: resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.6.tgz#53344adb14617a13f6e8dd2ce28905d1c0ba3215" integrity sha1-UzRK2xRhehP26N0s4okF0cC6MhU= -bn.js@4.11.8: - version "4.11.8" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" - integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA== - -bn.js@^4.0.0, bn.js@^4.10.0, bn.js@^4.11.0, bn.js@^4.11.1, bn.js@^4.11.8, bn.js@^4.4.0, bn.js@^4.8.0: +bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.10.0, bn.js@^4.11.0, bn.js@^4.11.1, bn.js@^4.11.6, bn.js@^4.11.8, bn.js@^4.11.9, bn.js@^4.4.0, bn.js@^4.8.0: version "4.12.0" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== -bn.js@^4.1.0, bn.js@^4.11.6, bn.js@^4.11.9: - version "4.11.9" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.9.tgz#26d556829458f9d1e81fc48952493d0ba3507828" - integrity sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw== - -bn.js@^5.1.1, bn.js@^5.1.3: - version "5.1.3" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.1.3.tgz#beca005408f642ebebea80b042b4d18d2ac0ee6b" - integrity sha512-GkTiFpjFtUzU9CbMeJ5iazkCzGL3jrhzerzZIuqLABjbwRaFt33I9tUdSNryIptM+RxDet6OKm2WnLXzW51KsQ== - -bn.js@^5.1.2: +bn.js@^5.0.0, bn.js@^5.1.1, bn.js@^5.1.2, bn.js@^5.1.3: version "5.2.0" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.0.tgz#358860674396c6997771a9d051fcc1b57d4ae002" integrity sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw== @@ -2862,11 +2971,11 @@ browserify-des@^1.0.0: safe-buffer "^5.1.2" browserify-rsa@^4.0.0, browserify-rsa@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524" - integrity sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ= + version "4.1.0" + resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.1.0.tgz#b2fd06b5b75ae297f7ce2dc651f918f5be158c8d" + integrity sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog== dependencies: - bn.js "^4.1.0" + bn.js "^5.0.0" randombytes "^2.0.1" browserify-sign@^4.0.0: @@ -2930,15 +3039,7 @@ buffer-xor@^2.0.1: dependencies: safe-buffer "^5.1.1" -buffer@^5.0.5, buffer@^5.5.0: - version "5.7.0" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.0.tgz#88afbd29fc89fa7b58e82b39206f31f2cf34feed" - integrity sha512-cd+5r1VLBwUqTrmnzW+D7ABkJUM6mr7uv1dv+6jRw4Rcl7tFIFHDqHPL98LhpGFn3dbAt3gtLxtrWp4m1kFrqg== - dependencies: - base64-js "^1.3.1" - ieee754 "^1.1.13" - -buffer@^5.2.1, buffer@^5.6.0: +buffer@^5.0.5, buffer@^5.2.1, buffer@^5.5.0, buffer@^5.6.0: version "5.7.1" resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== @@ -2947,11 +3048,11 @@ buffer@^5.2.1, buffer@^5.6.0: ieee754 "^1.1.13" bufferutil@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/bufferutil/-/bufferutil-4.0.1.tgz#3a177e8e5819a1243fe16b63a199951a7ad8d4a7" - integrity sha512-xowrxvpxojqkagPcWRQVXZl0YXhRhAtBEIq3VoER1NH5Mw1n1o0ojdspp+GS2J//2gCVyrzQDApQ4unGF+QOoA== + version "4.0.3" + resolved "https://registry.yarnpkg.com/bufferutil/-/bufferutil-4.0.3.tgz#66724b756bed23cd7c28c4d306d7994f9943cc6b" + integrity sha512-yEYTwGndELGvfXsImMBLop58eaGW+YdONi1fNjTINSY98tmMmFijBG6WXgdkfuLNt4imzQNtIE+eBp1PVpMCSw== dependencies: - node-gyp-build "~3.7.0" + node-gyp-build "^4.2.0" bytes@3.1.0: version "3.1.0" @@ -3057,9 +3158,9 @@ camelcase@^5.0.0: integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== camelcase@^6.0.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.1.0.tgz#27dc176173725fb0adf8a48b647f4d7871944d78" - integrity sha512-WCMml9ivU60+8rEJgELlFp1gxFcEGxwYleE3bziHEDeqsqAWGHdimB7beBFGjLzVNgPGyDsfgXLQEYMpmIFnVQ== + version "6.2.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.2.0.tgz#924af881c9d525ac9d87f40d964e5cea982a1809" + integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg== caniuse-lite@^1.0.30000844: version "1.0.30001204" @@ -3087,15 +3188,15 @@ chai-ethers@^0.0.1: ethers "^5.0.0" chai@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/chai/-/chai-4.2.0.tgz#760aa72cf20e3795e84b12877ce0e83737aa29e5" - integrity sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw== + version "4.3.4" + resolved "https://registry.yarnpkg.com/chai/-/chai-4.3.4.tgz#b55e655b31e1eac7099be4c08c21964fce2e6c49" + integrity sha512-yS5H68VYOCtN1cjfwumDSuzn/9c+yza4f3reKXlE5rUg7SFcCEy90gJvydNgOYtblyf4Zi6jIWRnXOgErta0KA== dependencies: assertion-error "^1.1.0" check-error "^1.0.2" deep-eql "^3.0.1" get-func-name "^2.0.0" - pathval "^1.1.0" + pathval "^1.1.1" type-detect "^4.0.5" chalk@^1.1.3: @@ -3119,9 +3220,9 @@ chalk@^2.0.0, chalk@^2.1.0, chalk@^2.3.2, chalk@^2.4.1, chalk@^2.4.2: supports-color "^5.3.0" chalk@^4.0.0, chalk@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a" - integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A== + version "4.1.1" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.1.tgz#c80b3fab28bf6371e6863325eee67e618b77e6ad" + integrity sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg== dependencies: ansi-styles "^4.1.0" supports-color "^7.1.0" @@ -3148,29 +3249,29 @@ checkpoint-store@^1.1.0: dependencies: functional-red-black-tree "^1.0.1" -cheerio-select-tmp@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/cheerio-select-tmp/-/cheerio-select-tmp-0.1.1.tgz#55bbef02a4771710195ad736d5e346763ca4e646" - integrity sha512-YYs5JvbpU19VYJyj+F7oYrIE2BOll1/hRU7rEy/5+v9BzkSo3bK81iAeeQEMI92vRIxz677m72UmJUiVwwgjfQ== +cheerio-select@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/cheerio-select/-/cheerio-select-1.4.0.tgz#3a16f21e37a2ef0f211d6d1aa4eff054bb22cdc9" + integrity sha512-sobR3Yqz27L553Qa7cK6rtJlMDbiKPdNywtR95Sj/YgfpLfy0u6CGJuaBKe5YE/vTc23SCRKxWSdlon/w6I/Ew== dependencies: - css-select "^3.1.2" - css-what "^4.0.0" - domelementtype "^2.1.0" - domhandler "^4.0.0" - domutils "^2.4.4" + css-select "^4.1.2" + css-what "^5.0.0" + domelementtype "^2.2.0" + domhandler "^4.2.0" + domutils "^2.6.0" cheerio@^1.0.0-rc.2: - version "1.0.0-rc.5" - resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.5.tgz#88907e1828674e8f9fee375188b27dadd4f0fa2f" - integrity sha512-yoqps/VCaZgN4pfXtenwHROTp8NG6/Hlt4Jpz2FEP0ZJQ+ZUkVDd0hAPDNKhj3nakpfPt/CNs57yEtxD1bXQiw== - dependencies: - cheerio-select-tmp "^0.1.0" - dom-serializer "~1.2.0" - domhandler "^4.0.0" - entities "~2.1.0" - htmlparser2 "^6.0.0" - parse5 "^6.0.0" - parse5-htmlparser2-tree-adapter "^6.0.0" + version "1.0.0-rc.9" + resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.9.tgz#a3ae6b7ce7af80675302ff836f628e7cb786a67f" + integrity sha512-QF6XVdrLONO6DXRF5iaolY+odmhj2CLj+xzNod7INPWMi/x9X4SOylH0S/vaPpX+AUU6t04s34SQNh7DbkuCng== + dependencies: + cheerio-select "^1.4.0" + dom-serializer "^1.3.1" + domhandler "^4.2.0" + htmlparser2 "^6.1.0" + parse5 "^6.0.1" + parse5-htmlparser2-tree-adapter "^6.0.1" + tslib "^2.2.0" chokidar@3.3.0: version "3.3.0" @@ -3187,22 +3288,7 @@ chokidar@3.3.0: optionalDependencies: fsevents "~2.1.1" -chokidar@3.4.3: - version "3.4.3" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.4.3.tgz#c1df38231448e45ca4ac588e6c79573ba6a57d5b" - integrity sha512-DtM3g7juCXQxFVSNPNByEC2+NImtBuxQQvWlHunpJIS5Ocr0lG306cC7FCi7cEA0fzmybPUIl4txBIobk1gGOQ== - dependencies: - anymatch "~3.1.1" - braces "~3.0.2" - glob-parent "~5.1.0" - is-binary-path "~2.1.0" - is-glob "~4.0.1" - normalize-path "~3.0.0" - readdirp "~3.5.0" - optionalDependencies: - fsevents "~2.1.2" - -chokidar@^3.4.0: +chokidar@3.5.1, chokidar@^3.4.0: version "3.5.1" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.1.tgz#ee9ce7bbebd2b79f49f304799d5468e31e14e68a" integrity sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw== @@ -3301,6 +3387,15 @@ cliui@^5.0.0: strip-ansi "^5.2.0" wrap-ansi "^5.1.0" +cliui@^7.0.2: + version "7.0.4" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" + integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^7.0.0" + clone-response@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b" @@ -3387,9 +3482,9 @@ commander@3.0.2: integrity sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow== commander@^7.1.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-7.1.0.tgz#f2eaecf131f10e36e07d894698226e36ae0eb5ff" - integrity sha512-pRxBna3MJe6HKnBGsDyMv8ETbptw3axEdYHoqNh7gu5oDcew8fs0xnivZGm06Ogk8zGAJ9VX+OPEr2GXEQK4dg== + version "7.2.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" + integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== component-emitter@^1.2.1: version "1.3.0" @@ -3465,9 +3560,9 @@ copy-descriptor@^0.1.0: integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= core-js-pure@^3.0.1: - version "3.10.0" - resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.10.0.tgz#dab9d6b141779b622b40567e7a536d2276646c15" - integrity sha512-CC582enhrFZStO4F8lGI7QL3SYx7/AIRc+IdSi3btrQGrVsTawo5K/crmKbRrQ+MOMhNX4v+PATn0k2NN6wI7A== + version "3.13.0" + resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.13.0.tgz#9d267fb47d1d7046cfbc05e7b67bb235b6735355" + integrity sha512-7VTvXbsMxROvzPAVczLgfizR8CyYnvWPrb1eGrtlZAJfjQWEHLofVfCKljLHdpazTfpaziRORwUH/kfGDKvpdA== core-js@^2.4.0, core-js@^2.5.0: version "2.6.12" @@ -3497,6 +3592,14 @@ cosmiconfig@^5.0.7: js-yaml "^3.13.1" parse-json "^4.0.0" +crc-32@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/crc-32/-/crc-32-1.2.0.tgz#cb2db6e29b88508e32d9dd0ec1693e7b41a18208" + integrity sha512-1uBwHxF+Y/4yF5G48fwnKq6QsIXheor3ZLPT80yGBV1oEUwpPojlEhQbWKVw1VwcTQyMGHK1/XMmTjmlsmTTGA== + dependencies: + exit-on-epipe "~1.0.1" + printj "~1.1.0" + create-ecdh@^4.0.0: version "4.0.4" resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.4.tgz#d6e7f4bffa66736085a0762fd3a632684dabcc4e" @@ -3528,10 +3631,15 @@ create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7: safe-buffer "^5.0.1" sha.js "^2.4.8" +create-require@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" + integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== + cross-env@^7.0.2: - version "7.0.2" - resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-7.0.2.tgz#bd5ed31339a93a3418ac4f3ca9ca3403082ae5f9" - integrity sha512-KZP/bMEOJEDCkDQAyRhu3RL2ZO/SUVrxQVI0G3YEQ+OLbRA3c6zgixe8Mq8a/z7+HKlNEjo8oiLUs8iRijY2Rw== + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-7.0.3.tgz#865264b29677dc015ba8418918965dd232fc54cf" + integrity sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw== dependencies: cross-spawn "^7.0.1" @@ -3597,21 +3705,21 @@ crypto-js@^3.1.9-1: resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-3.3.0.tgz#846dd1cce2f68aacfa156c8578f926a609b7976b" integrity sha512-DIT51nX0dCfKltpRiXV+/TVZq+Qq2NgF4644+K7Ttnla7zEzqc+kjJyiB96BHNyUTBxyjzRcZYpUdZa+QAqi6Q== -css-select@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/css-select/-/css-select-3.1.2.tgz#d52cbdc6fee379fba97fb0d3925abbd18af2d9d8" - integrity sha512-qmss1EihSuBNWNNhHjxzxSfJoFBM/lERB/Q4EnsJQQC62R2evJDW481091oAdOr9uh46/0n4nrg0It5cAnj1RA== +css-select@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/css-select/-/css-select-4.1.2.tgz#8b52b6714ed3a80d8221ec971c543f3b12653286" + integrity sha512-nu5ye2Hg/4ISq4XqdLY2bEatAcLIdt3OYGFc9Tm9n7VSlFBcfRv0gBNksHRgSdUDQGtN3XrZ94ztW+NfzkFSUw== dependencies: boolbase "^1.0.0" - css-what "^4.0.0" - domhandler "^4.0.0" - domutils "^2.4.3" + css-what "^5.0.0" + domhandler "^4.2.0" + domutils "^2.6.0" nth-check "^2.0.0" -css-what@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/css-what/-/css-what-4.0.0.tgz#35e73761cab2eeb3d3661126b23d7aa0e8432233" - integrity sha512-teijzG7kwYfNVsUh2H/YN62xW3KK9YhXEgSlbxMlcyjPNvdKJqFx5lrwlJgoFP1ZHlB89iGDlo/JyshKeRhv5A== +css-what@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/css-what/-/css-what-5.0.0.tgz#f0bf4f8bac07582722346ab243f6a35b512cfc47" + integrity sha512-qxyKHQvgKwzwDWC/rGbT821eJalfupxYW2qbSJSAtdSTimsr/MlaGONoNLllaUPZWf8QnbcKM/kPVYUQuEKAFA== d@1, d@^1.0.1: version "1.0.1" @@ -3629,9 +3737,9 @@ dashdash@^1.12.0: assert-plus "^1.0.0" date-fns@^2.19.0: - version "2.19.0" - resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.19.0.tgz#65193348635a28d5d916c43ec7ce6fbd145059e1" - integrity sha512-X3bf2iTPgCAQp9wvjOQytnf5vO5rESYRXlPIVcgSbtT5OTScPcsf9eZU+B/YIkKAtYr5WeCii58BgATrNitlWg== + version "2.21.3" + resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.21.3.tgz#8f5f6889d7a96bbcc1f0ea50239b397a83357f9b" + integrity sha512-HeYdzCaFflc1i4tGbj7JKMjM4cKGYoyxwcIIkHzNgCkX8xXDNJDZXgDDVchIWpN4eQc3lH37WarduXFZJOtxfw== death@^1.1.0: version "1.1.0" @@ -3652,20 +3760,13 @@ debug@3.2.6: dependencies: ms "^2.1.1" -debug@4, debug@^4.1.1, debug@^4.3.1: +debug@4, debug@4.3.1, debug@^4.0.1, debug@^4.1.1, debug@^4.3.1: version "4.3.1" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== dependencies: ms "2.1.2" -debug@4.2.0, debug@^4.0.1: - version "4.2.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.2.0.tgz#7f150f93920e94c58f5574c2fd01a3110effe7f1" - integrity sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg== - dependencies: - ms "2.1.2" - debug@^3.1.0: version "3.2.7" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" @@ -3739,6 +3840,14 @@ deferred-leveldown@~4.0.0: abstract-leveldown "~5.0.0" inherits "^2.0.3" +deferred-leveldown@~5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/deferred-leveldown/-/deferred-leveldown-5.3.0.tgz#27a997ad95408b61161aa69bd489b86c71b78058" + integrity sha512-a59VOT+oDy7vtAbLRCZwWgxu2BaCfd5Hk7wxJd48ei7I+nsg8Orlb9CLG0PMZienk9BSUKgeAqkO2+Lw+1+Ukw== + dependencies: + abstract-leveldown "~6.2.1" + inherits "^2.0.3" + define-properties@^1.1.2, define-properties@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" @@ -3821,7 +3930,12 @@ diff@3.5.0: resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== -diff@4.0.2, diff@^4.0.1, diff@^4.0.2: +diff@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" + integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== + +diff@^4.0.1, diff@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== @@ -3854,13 +3968,13 @@ doctrine@^3.0.0: dependencies: esutils "^2.0.2" -dom-serializer@^1.0.1, dom-serializer@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-1.2.0.tgz#3433d9136aeb3c627981daa385fc7f32d27c48f1" - integrity sha512-n6kZFH/KlCrqs/1GHMOd5i2fd/beQHuehKdWvNNffbGHTr/almdhuVvTVFb3V7fglz+nC50fFusu3lY33h12pA== +dom-serializer@^1.0.1, dom-serializer@^1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-1.3.2.tgz#6206437d32ceefaec7161803230c7a20bc1b4d91" + integrity sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig== dependencies: domelementtype "^2.0.1" - domhandler "^4.0.0" + domhandler "^4.2.0" entities "^2.0.0" dom-walk@^0.1.0: @@ -3868,31 +3982,31 @@ dom-walk@^0.1.0: resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.2.tgz#0c548bef048f4d1f2a97249002236060daa3fd84" integrity sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w== -domelementtype@^2.0.1, domelementtype@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.1.0.tgz#a851c080a6d1c3d94344aed151d99f669edf585e" - integrity sha512-LsTgx/L5VpD+Q8lmsXSHW2WpA+eBlZ9HPf3erD1IoPF00/3JKHZ3BknUVA2QGDNu69ZNmyFmCWBSO45XjYKC5w== +domelementtype@^2.0.1, domelementtype@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.2.0.tgz#9a0b6c2782ed6a1c7323d42267183df9bd8b1d57" + integrity sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A== -domhandler@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-4.0.0.tgz#01ea7821de996d85f69029e81fa873c21833098e" - integrity sha512-KPTbnGQ1JeEMQyO1iYXoagsI6so/C96HZiFyByU3T6iAzpXn8EGEvct6unm1ZGoed8ByO2oirxgwxBmqKF9haA== +domhandler@^4.0.0, domhandler@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-4.2.0.tgz#f9768a5f034be60a89a27c2e4d0f74eba0d8b059" + integrity sha512-zk7sgt970kzPks2Bf+dwT/PLzghLnsivb9CcxkvR8Mzr66Olr0Ofd8neSbglHJHaHa2MadfoSdNlKYAaafmWfA== dependencies: - domelementtype "^2.1.0" + domelementtype "^2.2.0" -domutils@^2.4.3, domutils@^2.4.4: - version "2.5.0" - resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.5.0.tgz#42f49cffdabb92ad243278b331fd761c1c2d3039" - integrity sha512-Ho16rzNMOFk2fPwChGh3D2D9OEHAfG19HgmRR2l+WLSsIstNsAYBzePH412bL0y5T44ejABIVfTHQ8nqi/tBCg== +domutils@^2.5.2, domutils@^2.6.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.6.0.tgz#2e15c04185d43fb16ae7057cb76433c6edb938b7" + integrity sha512-y0BezHuy4MDYxh6OvolXYsH+1EMGmFbwv5FKW7ovwMG6zTPWqNPq3WF9ayZssFq+UlKdffGLbOEaghNdaOm1WA== dependencies: dom-serializer "^1.0.1" - domelementtype "^2.0.1" - domhandler "^4.0.0" + domelementtype "^2.2.0" + domhandler "^4.2.0" dotenv@^8.2.0: - version "8.2.0" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.2.0.tgz#97e619259ada750eea3e4ea3e26bceea5424b16a" - integrity sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw== + version "8.6.0" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.6.0.tgz#061af664d19f7f4d8fc6e4ff9b584ce237adcb8b" + integrity sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g== dotignore@~0.1.2: version "0.1.2" @@ -3933,7 +4047,7 @@ electron-to-chromium@^1.3.47: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.695.tgz#955f419cf99137226180cc4cca2e59015a4e248d" integrity sha512-lz66RliUqLHU1Ojxx1A4QUxKydjiQ79Y4dZyPobs2Dmxj5aVL2TM3KoQ2Gs7HS703Bfny+ukI3KOxwAB0xceHQ== -elliptic@6.5.3, elliptic@^6.5.3: +elliptic@6.5.3: version "6.5.3" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.3.tgz#cb59eb2efdaf73a0bd78ccd7015a62ad6e0f93d6" integrity sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw== @@ -3946,7 +4060,7 @@ elliptic@6.5.3, elliptic@^6.5.3: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.0" -elliptic@6.5.4, elliptic@^6.4.0, elliptic@^6.5.2: +elliptic@6.5.4, elliptic@^6.4.0, elliptic@^6.5.2, elliptic@^6.5.3: version "6.5.4" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== @@ -3969,10 +4083,10 @@ emoji-regex@^8.0.0: resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== -emoji-regex@^9.0.0: - version "9.2.0" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.0.tgz#a26da8e832b16a9753309f25e35e3c0efb9a066a" - integrity sha512-DNc3KFPK18bPdElMJnf/Pkv5TXhxFU3YFDEuGLDRtPmV4rkmCjBkCSEp22u6rBHdSN9Vlp/GK7k98prmE1Jgug== +emoji-regex@^9.2.2: + version "9.2.2" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72" + integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg== encode-utf8@^1.0.2: version "1.0.3" @@ -3995,6 +4109,16 @@ encoding-down@5.0.4, encoding-down@~5.0.0: level-errors "^2.0.0" xtend "^4.0.1" +encoding-down@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/encoding-down/-/encoding-down-6.3.0.tgz#b1c4eb0e1728c146ecaef8e32963c549e76d082b" + integrity sha512-QKrV0iKR6MZVJV08QY0wp1e7vF6QbhnbQhb07bwpEyuz4uZiZgPlEGdkCROuFkUwdxlFaiPIhjyarH1ee/3vhw== + dependencies: + abstract-leveldown "^6.2.1" + inherits "^2.0.3" + level-codec "^9.0.0" + level-errors "^2.0.0" + encoding@^0.1.11: version "0.1.13" resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9" @@ -4021,11 +4145,6 @@ entities@^2.0.0: resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55" integrity sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A== -entities@~2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/entities/-/entities-2.1.0.tgz#992d3129cf7df6870b96c57858c249a120f8b8b5" - integrity sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w== - env-paths@^2.2.0: version "2.2.1" resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2" @@ -4046,9 +4165,9 @@ error-ex@^1.2.0, error-ex@^1.3.1: is-arrayish "^0.2.1" es-abstract@^1.18.0-next.1, es-abstract@^1.18.0-next.2: - version "1.18.0" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.18.0.tgz#ab80b359eecb7ede4c298000390bc5ac3ec7b5a4" - integrity sha512-LJzK7MrQa8TS0ja2w3YNLzUgJCGPdPOV1yVvezjNnS89D+VR08+Szt2mz3YB2Dck/+w5tfIq/RoUAFqJJGM2yw== + version "1.18.2" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.18.2.tgz#6eb518b640262e8ddcbd48e0bc8549f82efd48a7" + integrity sha512-byRiNIQXE6HWNySaU6JohoNXzYgbBjztwFnBLUTiJmWXjaU9bSq3urQLUlNLQ292tc+gc07zYZXNZjaOoAX3sw== dependencies: call-bind "^1.0.2" es-to-primitive "^1.2.1" @@ -4058,14 +4177,14 @@ es-abstract@^1.18.0-next.1, es-abstract@^1.18.0-next.2: has-symbols "^1.0.2" is-callable "^1.2.3" is-negative-zero "^2.0.1" - is-regex "^1.1.2" - is-string "^1.0.5" - object-inspect "^1.9.0" + is-regex "^1.1.3" + is-string "^1.0.6" + object-inspect "^1.10.3" object-keys "^1.1.1" object.assign "^4.1.2" string.prototype.trimend "^1.0.4" string.prototype.trimstart "^1.0.4" - unbox-primitive "^1.0.0" + unbox-primitive "^1.0.1" es-to-primitive@^1.2.1: version "1.2.1" @@ -4102,6 +4221,11 @@ es6-symbol@^3.1.1, es6-symbol@~3.1.3: d "^1.0.1" ext "^1.1.2" +escalade@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" + integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== + escape-html@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" @@ -4172,9 +4296,9 @@ eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3 integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== eslint-visitor-keys@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz#21fdc8fbcd9c795cc0321f0563702095751511a8" - integrity sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ== + version "2.1.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" + integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== eslint@^5.6.0: version "5.16.0" @@ -4219,28 +4343,30 @@ eslint@^5.6.0: text-table "^0.2.0" eslint@^7.7.0: - version "7.12.1" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.12.1.tgz#bd9a81fa67a6cfd51656cdb88812ce49ccec5801" - integrity sha512-HlMTEdr/LicJfN08LB3nM1rRYliDXOmfoO4vj39xN6BLpFzF00hbwBoqHk8UcJ2M/3nlARZWy/mslvGEuZFvsg== + version "7.27.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.27.0.tgz#665a1506d8f95655c9274d84bd78f7166b07e9c7" + integrity sha512-JZuR6La2ZF0UD384lcbnd0Cgg6QJjiCwhMD6eU4h/VGPcVGwawNNzKU41tgokGXnfjOOyI6QIffthhJTPzzuRA== dependencies: - "@babel/code-frame" "^7.0.0" - "@eslint/eslintrc" "^0.2.1" + "@babel/code-frame" "7.12.11" + "@eslint/eslintrc" "^0.4.1" ajv "^6.10.0" chalk "^4.0.0" cross-spawn "^7.0.2" debug "^4.0.1" doctrine "^3.0.0" enquirer "^2.3.5" + escape-string-regexp "^4.0.0" eslint-scope "^5.1.1" eslint-utils "^2.1.0" eslint-visitor-keys "^2.0.0" - espree "^7.3.0" - esquery "^1.2.0" + espree "^7.3.1" + esquery "^1.4.0" esutils "^2.0.2" - file-entry-cache "^5.0.1" + fast-deep-equal "^3.1.3" + file-entry-cache "^6.0.1" functional-red-black-tree "^1.0.1" glob-parent "^5.0.0" - globals "^12.1.0" + globals "^13.6.0" ignore "^4.0.6" import-fresh "^3.0.0" imurmurhash "^0.1.4" @@ -4248,7 +4374,7 @@ eslint@^7.7.0: js-yaml "^3.13.1" json-stable-stringify-without-jsonify "^1.0.1" levn "^0.4.1" - lodash "^4.17.19" + lodash.merge "^4.6.2" minimatch "^3.0.4" natural-compare "^1.4.0" optionator "^0.9.1" @@ -4257,7 +4383,7 @@ eslint@^7.7.0: semver "^7.2.1" strip-ansi "^6.0.0" strip-json-comments "^3.1.0" - table "^5.2.3" + table "^6.0.9" text-table "^0.2.0" v8-compile-cache "^2.0.3" @@ -4270,22 +4396,15 @@ espree@^5.0.1: acorn-jsx "^5.0.0" eslint-visitor-keys "^1.0.0" -espree@^7.3.0: - version "7.3.0" - resolved "https://registry.yarnpkg.com/espree/-/espree-7.3.0.tgz#dc30437cf67947cf576121ebd780f15eeac72348" - integrity sha512-dksIWsvKCixn1yrEXO8UosNSxaDoSYpq9reEjZSbHLpT5hpaCAKTLBwq0RHtLrIr+c0ByiYzWT8KTMRzoRCNlw== +espree@^7.3.0, espree@^7.3.1: + version "7.3.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-7.3.1.tgz#f2df330b752c6f55019f8bd89b7660039c1bbbb6" + integrity sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g== dependencies: acorn "^7.4.0" - acorn-jsx "^5.2.0" + acorn-jsx "^5.3.1" eslint-visitor-keys "^1.3.0" -esprima-extract-comments@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/esprima-extract-comments/-/esprima-extract-comments-1.1.0.tgz#0dacab567a5900240de6d344cf18c33617becbc9" - integrity sha512-sBQUnvJwpeE9QnPrxh7dpI/dp67erYG4WXEAreAMoelPRpMR7NWb4YtwRPn9b+H1uLQKl/qS8WYmyaljTpjIsw== - dependencies: - esprima "^4.0.0" - esprima@2.7.x, esprima@^2.7.1: version "2.7.3" resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" @@ -4296,10 +4415,10 @@ esprima@^4.0.0: resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== -esquery@^1.0.1, esquery@^1.2.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.3.1.tgz#b78b5828aa8e214e29fb74c4d5b752e1c033da57" - integrity sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ== +esquery@^1.0.1, esquery@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5" + integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== dependencies: estraverse "^5.1.0" @@ -4406,16 +4525,7 @@ eth-json-rpc-middleware@^1.5.0: promise-to-callback "^1.0.0" tape "^4.6.3" -eth-lib@0.2.7: - version "0.2.7" - resolved "https://registry.yarnpkg.com/eth-lib/-/eth-lib-0.2.7.tgz#2f93f17b1e23aec3759cd4a3fe20c1286a3fc1ca" - integrity sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco= - dependencies: - bn.js "^4.11.6" - elliptic "^6.4.0" - xhr-request-promise "^0.1.2" - -eth-lib@0.2.8, eth-lib@^0.2.8: +eth-lib@0.2.8: version "0.2.8" resolved "https://registry.yarnpkg.com/eth-lib/-/eth-lib-0.2.8.tgz#b194058bef4b220ad12ea497431d6cb6aa0623c8" integrity sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw== @@ -4501,9 +4611,9 @@ ethashjs@~0.0.7: miller-rabin "^4.0.0" ethereum-bloom-filters@^1.0.6: - version "1.0.7" - resolved "https://registry.yarnpkg.com/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.7.tgz#b7b80735e385dbb7f944ce6b4533e24511306060" - integrity sha512-cDcJJSJ9GMAcURiAWO3DxIEhTL/uWqlQnvgKpuYQzYPrt/izuGU+1ntQmHt0IRq6ADoSYHFnB+aCEFIldjhkMQ== + version "1.0.9" + resolved "https://registry.yarnpkg.com/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.9.tgz#4a59dead803af0c9e33834170bd7695df67061ec" + integrity sha512-GiK/RQkAkcVaEdxKVkPcG07PQ5vD7v2MFSHgZmBJSfMzNRHimntdBithsHAT89tAXnIpzVDWt8iaCD1DvkaxGg== dependencies: js-sha3 "^0.8.0" @@ -4716,7 +4826,7 @@ ethereumjs-util@^5.0.0, ethereumjs-util@^5.0.1, ethereumjs-util@^5.1.1, ethereum rlp "^2.0.0" safe-buffer "^5.1.1" -ethereumjs-util@^7.0.2: +ethereumjs-util@^7.0.10, ethereumjs-util@^7.0.2, ethereumjs-util@^7.0.7: version "7.0.10" resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-7.0.10.tgz#5fb7b69fa1fda0acc59634cf39d6b0291180fc1f" integrity sha512-c/xThw6A+EAnej5Xk5kOzFzyoSnw0WX0tSlZ6pAsfGVvQj3TItaDg9b1+Fz1RJXA+y2YksKwQnuzgt1eY6LKzw== @@ -4869,40 +4979,40 @@ ethers@^5.0.1, ethers@^5.0.2: "@ethersproject/wordlists" "5.0.10" ethers@^5.0.17: - version "5.0.19" - resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.0.19.tgz#a4636f62a180135b13fd1f0a393477beafd535b7" - integrity sha512-0AZnUgZh98q888WAd1oI3aLeI+iyDtrupjANVtPPS7O63lVopkR/No8A1NqSkgl/rU+b2iuu2mUZor6GD4RG2w== - dependencies: - "@ethersproject/abi" "5.0.7" - "@ethersproject/abstract-provider" "5.0.5" - "@ethersproject/abstract-signer" "5.0.7" - "@ethersproject/address" "5.0.5" - "@ethersproject/base64" "5.0.4" - "@ethersproject/basex" "5.0.4" - "@ethersproject/bignumber" "5.0.8" - "@ethersproject/bytes" "5.0.5" - "@ethersproject/constants" "5.0.5" - "@ethersproject/contracts" "5.0.5" - "@ethersproject/hash" "5.0.6" - "@ethersproject/hdnode" "5.0.5" - "@ethersproject/json-wallets" "5.0.7" - "@ethersproject/keccak256" "5.0.4" - "@ethersproject/logger" "5.0.6" - "@ethersproject/networks" "5.0.4" - "@ethersproject/pbkdf2" "5.0.4" - "@ethersproject/properties" "5.0.4" - "@ethersproject/providers" "5.0.14" - "@ethersproject/random" "5.0.4" - "@ethersproject/rlp" "5.0.4" - "@ethersproject/sha2" "5.0.4" - "@ethersproject/signing-key" "5.0.5" - "@ethersproject/solidity" "5.0.5" - "@ethersproject/strings" "5.0.5" - "@ethersproject/transactions" "5.0.6" - "@ethersproject/units" "5.0.6" - "@ethersproject/wallet" "5.0.7" - "@ethersproject/web" "5.0.9" - "@ethersproject/wordlists" "5.0.5" + version "5.2.0" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.2.0.tgz#13452e35947ab5d77053286d1f7161ee666c85ba" + integrity sha512-HqFGU2Qab0mAg3y1eHKVMXS4i1gTObMY0/4+x4LiO72NHhJL3Z795gnqyivmwG1J8e5NLSlRSfyIR7TL0Hw3ig== + dependencies: + "@ethersproject/abi" "5.2.0" + "@ethersproject/abstract-provider" "5.2.0" + "@ethersproject/abstract-signer" "5.2.0" + "@ethersproject/address" "5.2.0" + "@ethersproject/base64" "5.2.0" + "@ethersproject/basex" "5.2.0" + "@ethersproject/bignumber" "5.2.0" + "@ethersproject/bytes" "5.2.0" + "@ethersproject/constants" "5.2.0" + "@ethersproject/contracts" "5.2.0" + "@ethersproject/hash" "5.2.0" + "@ethersproject/hdnode" "5.2.0" + "@ethersproject/json-wallets" "5.2.0" + "@ethersproject/keccak256" "5.2.0" + "@ethersproject/logger" "5.2.0" + "@ethersproject/networks" "5.2.0" + "@ethersproject/pbkdf2" "5.2.0" + "@ethersproject/properties" "5.2.0" + "@ethersproject/providers" "5.2.0" + "@ethersproject/random" "5.2.0" + "@ethersproject/rlp" "5.2.0" + "@ethersproject/sha2" "5.2.0" + "@ethersproject/signing-key" "5.2.0" + "@ethersproject/solidity" "5.2.0" + "@ethersproject/strings" "5.2.0" + "@ethersproject/transactions" "5.2.0" + "@ethersproject/units" "5.2.0" + "@ethersproject/wallet" "5.2.0" + "@ethersproject/web" "5.2.0" + "@ethersproject/wordlists" "5.2.0" ethjs-unit@0.1.6: version "0.1.6" @@ -4925,21 +5035,11 @@ event-target-shim@^5.0.0: resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== -eventemitter3@3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.2.tgz#2d3d48f9c346698fce83a85d7d664e98535df6e7" - integrity sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q== - eventemitter3@4.0.4: version "4.0.4" resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.4.tgz#b5463ace635a083d018bdc7c917b4c5f10a85384" integrity sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ== -eventemitter3@^4.0.0: - version "4.0.7" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" - integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== - events@^3.0.0: version "3.3.0" resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" @@ -4966,6 +5066,11 @@ execa@^1.0.0: signal-exit "^3.0.0" strip-eof "^1.0.0" +exit-on-epipe@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/exit-on-epipe/-/exit-on-epipe-1.0.1.tgz#0bdd92e87d5285d267daa8171d0eb06159689692" + integrity sha512-h2z5mrROTxce56S+pnvAV890uu7ls7f1kEvVGJbw1OlFH3/mlJ5bkXu0KRyW94v37zzHPiUd55iLn3DA7TjWpw== + expand-brackets@^2.1.4: version "2.1.4" resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" @@ -5065,14 +5170,6 @@ extglob@^2.0.4: snapdragon "^0.8.1" to-regex "^3.0.1" -extract-comments@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/extract-comments/-/extract-comments-1.1.0.tgz#b90bca033a056bd69b8ba1c6b6b120fc2ee95c18" - integrity sha512-dzbZV2AdSSVW/4E7Ti5hZdHWbA+Z80RJsJhr5uiL10oyjl/gy7/o+HI1HwK4/WSZhlq4SNKU3oUzXlM13Qx02Q== - dependencies: - esprima-extract-comments "^1.1.0" - parse-code-context "^1.0.0" - extract-files@^9.0.0: version "9.0.0" resolved "https://registry.yarnpkg.com/extract-files/-/extract-files-9.0.0.tgz#8a7744f2437f81f5ed3250ed9f1550de902fe54a" @@ -5095,7 +5192,7 @@ fake-merkle-patricia-tree@^1.0.1: dependencies: checkpoint-store "^1.1.0" -fast-deep-equal@^3.1.1: +fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== @@ -5105,7 +5202,7 @@ fast-diff@^1.1.2: resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== -fast-glob@^3.0.3: +fast-glob@^3.0.3, fast-glob@^3.1.1: version "3.2.5" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.5.tgz#7939af2a656de79a4f1901903ee8adcaa7cb9661" integrity sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg== @@ -5117,18 +5214,6 @@ fast-glob@^3.0.3: micromatch "^4.0.2" picomatch "^2.2.1" -fast-glob@^3.1.1: - version "3.2.4" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.4.tgz#d20aefbf99579383e7f3cc66529158c9b98554d3" - integrity sha512-kr/Oo6PX51265qeuCYsyGypiO5uJFgBS0jksyG7FUeCyQzNwYnzrNIMR1NXfkZXsMYXYLRAHgISHBz8gQcxKHQ== - dependencies: - "@nodelib/fs.stat" "^2.0.2" - "@nodelib/fs.walk" "^1.2.3" - glob-parent "^5.1.0" - merge2 "^1.3.0" - micromatch "^4.0.2" - picomatch "^2.2.1" - fast-json-stable-stringify@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" @@ -5140,9 +5225,9 @@ fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= fastq@^1.6.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.8.0.tgz#550e1f9f59bbc65fe185cb6a9b4d95357107f481" - integrity sha512-SMIZoZdLh/fgofivvIkmknUXyPnvxRE3DhtZ5Me3Mrsk5gyPL42F0xr51TdRXskBxHfMp+07bcYzfsYEsSQA9Q== + version "1.11.0" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.11.0.tgz#bb9fb955a07130a918eb63c1f5161cc32a5d0858" + integrity sha512-7Eczs8gIPDrVzT+EksYBcupqMyxSHXXrHOLRRxU2/DicV8789MRBRR8+Hc2uWzUupOs4YS4JzBmBxjjCVBxD/g== dependencies: reusify "^1.0.4" @@ -5167,6 +5252,13 @@ file-entry-cache@^5.0.1: dependencies: flat-cache "^2.0.1" +file-entry-cache@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" + integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== + dependencies: + flat-cache "^3.0.4" + file-uri-to-path@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" @@ -5264,6 +5356,14 @@ flat-cache@^2.0.1: rimraf "2.6.3" write "1.0.3" +flat-cache@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" + integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== + dependencies: + flatted "^3.1.0" + rimraf "^3.0.2" + flat@^4.1.0: version "4.1.1" resolved "https://registry.yarnpkg.com/flat/-/flat-4.1.1.tgz#a392059cc382881ff98642f5da4dde0a959f309b" @@ -5281,6 +5381,11 @@ flatted@^2.0.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138" integrity sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA== +flatted@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.1.1.tgz#c4b489e80096d9df1dfc97c79871aea7c617c469" + integrity sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA== + flow-stoplight@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/flow-stoplight/-/flow-stoplight-1.0.0.tgz#4a292c5bcff8b39fa6cc0cb1a853d86f27eeff7b" @@ -5293,15 +5398,10 @@ fmix@^0.1.0: dependencies: imul "^1.0.0" -follow-redirects@^1.10.0: - version "1.13.2" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.13.2.tgz#dd73c8effc12728ba5cf4259d760ea5fb83e3147" - integrity sha512-6mPTgLxYm3r6Bkkg0vNM0HTjfGrOEtsfbhagQvbxDEsEkpNhw582upBaoRZylzen6krEmxXJgt9Ju6HiI4O7BA== - -follow-redirects@^1.12.1: - version "1.13.3" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.13.3.tgz#e5598ad50174c1bc4e872301e82ac2cd97f90267" - integrity sha512-DUgl6+HDzB0iEptNQEXLx/KhTmDb8tZUHSeLqpnjpknR70H0nC2t9N73BK6fN4hOvJ84pKlIQVQ4k5FFlBedKA== +follow-redirects@^1.10.0, follow-redirects@^1.12.1: + version "1.14.1" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.1.tgz#d9114ded0a1cfdd334e164e6662ad02bfd91ff43" + integrity sha512-HWqDgT7ZEkqRzBvc2s64vSZ/hfOceEol3ac/7tKwzuvEyWx3/4UegXh5oBOIotkGsObyk3xznnSRVADBgWSQVg== for-each@^0.3.3, for-each@~0.3.3: version "0.3.3" @@ -5335,9 +5435,9 @@ form-data@^2.2.0: mime-types "^2.1.12" form-data@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.0.tgz#31b7e39c85f1355b7139ee0c647cf0de7f83c682" - integrity sha512-CKMFDglpbMi6PyN+brwB9Q/GOw0eAnsrEZDgcsH5Krhz5Od/haKHAX0NmQfha2zPPz0JpWzA7GJHGSnvCRLWsg== + version "3.0.1" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.1.tgz#ebd53791b78356a99af9a300d4282c4d5eb9755f" + integrity sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg== dependencies: asynckit "^0.4.0" combined-stream "^1.0.8" @@ -5418,14 +5518,14 @@ fs-extra@^8.1.0: universalify "^0.1.0" fs-extra@^9.0.0, fs-extra@^9.0.1: - version "9.0.1" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.0.1.tgz#910da0062437ba4c39fedd863f1675ccfefcb9fc" - integrity sha512-h2iAoN838FqAFJY2/qVpzFXy+EBxfVE220PalAqQLDVsFOHLJrZvut5puAbCdNv6WJk+B8ihI+k0c7JK5erwqQ== + version "9.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" + integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== dependencies: at-least-node "^1.0.0" graceful-fs "^4.2.0" jsonfile "^6.0.1" - universalify "^1.0.0" + universalify "^2.0.0" fs-minipass@^1.2.5: version "1.2.7" @@ -5444,7 +5544,7 @@ fs.realpath@^1.0.0: resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= -fsevents@~2.1.1, fsevents@~2.1.2: +fsevents@~2.1.1: version "2.1.3" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== @@ -5515,7 +5615,7 @@ get-caller-file@^1.0.1: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== -get-caller-file@^2.0.1: +get-caller-file@^2.0.1, get-caller-file@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== @@ -5583,14 +5683,7 @@ ghost-testrpc@^0.0.2: chalk "^2.4.2" node-emoji "^1.10.0" -glob-parent@^5.0.0, glob-parent@^5.1.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.1.tgz#b6c1ef417c4e5663ea498f1c45afac6916bbc229" - integrity sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ== - dependencies: - is-glob "^4.0.1" - -glob-parent@~5.1.0: +glob-parent@^5.0.0, glob-parent@^5.1.0, glob-parent@~5.1.0: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== @@ -5609,7 +5702,7 @@ glob@7.1.3: once "^1.3.0" path-is-absolute "^1.0.0" -glob@7.1.6, glob@^7.0.0, glob@^7.1.2, glob@^7.1.3, glob@^7.1.6, glob@~7.1.6: +glob@7.1.6, glob@~7.1.6: version "7.1.6" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== @@ -5632,6 +5725,18 @@ glob@^5.0.15: once "^1.3.0" path-is-absolute "^1.0.0" +glob@^7.0.0, glob@^7.1.2, glob@^7.1.3, glob@^7.1.6: + version "7.1.7" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" + integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + global-modules@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-2.0.0.tgz#997605ad2345f27f51539bea26574421215c7780" @@ -5648,14 +5753,6 @@ global-prefix@^3.0.0: kind-of "^6.0.2" which "^1.3.1" -global@~4.3.0: - version "4.3.2" - resolved "https://registry.yarnpkg.com/global/-/global-4.3.2.tgz#e76989268a6c74c38908b1305b10fc0e394e9d0f" - integrity sha1-52mJJopsdMOJCLEwWxD8DjlOnQ8= - dependencies: - min-document "^2.19.0" - process "~0.5.1" - global@~4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/global/-/global-4.4.0.tgz#3e7b105179006a323ed71aafca3e9c57a5cc6406" @@ -5676,6 +5773,13 @@ globals@^12.1.0: dependencies: type-fest "^0.8.1" +globals@^13.6.0: + version "13.9.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.9.0.tgz#4bf2bf635b334a173fb1daf7c5e6b218ecdc06cb" + integrity sha512-74/FduwI/JaIrr1H8e71UbDE+5x7pIPs1C2rrwC52SszOo043CsWOZEMW7o2Y58xwm9b+0RBKDxY5n2sUpEFxA== + dependencies: + type-fest "^0.20.2" + globals@^9.18.0: version "9.18.0" resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" @@ -5696,9 +5800,9 @@ globby@^10.0.1: slash "^3.0.0" globby@^11.0.1: - version "11.0.1" - resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.1.tgz#9a2bf107a068f3ffeabc49ad702c79ede8cfd357" - integrity sha512-iH9RmgwCmUJHi2z5o2l3eTtGBtXek1OYlHrbcxOYugyHLmAsZrPj43OtHThd62Buh/Vv6VyCBD2bdyWcGNQqoQ== + version "11.0.3" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.3.tgz#9b1f0cb523e171dd1ad8c7b2a9fb4b644b9593cb" + integrity sha512-ffdmosjA807y7+lA1NM0jELARVmYul/715xiILEjo3hBLPTcirgQNnXECn5g3mtR8TOLCVbkfua1Hpen25/Xcg== dependencies: array-union "^2.1.0" dir-glob "^3.0.1" @@ -5744,16 +5848,11 @@ got@^7.1.0: url-parse-lax "^1.0.0" url-to-options "^1.0.1" -graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9: +graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0: version "4.2.6" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.6.tgz#ff040b2b0853b23c3d31027523706f1885d76bee" integrity sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ== -graceful-fs@^4.2.0: - version "4.2.4" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" - integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== - graphql-request@^3.4.0: version "3.4.0" resolved "https://registry.yarnpkg.com/graphql-request/-/graphql-request-3.4.0.tgz#3a400cd5511eb3c064b1873afb059196bbea9c2b" @@ -5804,20 +5903,20 @@ hardhat-deploy-ethers@^0.3.0-beta.7: integrity sha512-JKMNte6vudu9LSNqgmBtNxc1gfxp3NUcPKVAf/FANHfl9pa/mBGg6hpQO7tD8CLkAbe6f4K5BjyYIPWX3p7MKw== hardhat-deploy@^0.7.0-beta.47: - version "0.7.0-beta.47" - resolved "https://registry.yarnpkg.com/hardhat-deploy/-/hardhat-deploy-0.7.0-beta.47.tgz#974afd2c070e95437842b05bb24ade84962b4057" - integrity sha512-7YknSJ2o+ZsYMUtgNg1CW4pj++2cwOpDi4omyCXyktY9Plgudo9vNJwGHxgYU6bLQ6uhCGqICP4WL23beZGsZw== - dependencies: - "@ethersproject/abi" "^5.0.2" - "@ethersproject/abstract-signer" "^5.0.2" - "@ethersproject/address" "^5.0.2" - "@ethersproject/bignumber" "^5.0.5" - "@ethersproject/bytes" "^5.0.2" - "@ethersproject/contracts" "^5.0.2" - "@ethersproject/providers" "^5.0.5" - "@ethersproject/solidity" "^5.0.2" - "@ethersproject/transactions" "^5.0.2" - "@ethersproject/wallet" "^5.0.2" + version "0.7.9" + resolved "https://registry.yarnpkg.com/hardhat-deploy/-/hardhat-deploy-0.7.9.tgz#67ed5408ac882ee7e70504ad344f59e2647da263" + integrity sha512-+8srf0vm5Y9SL2hR0UDUldwjHaXCl2S+TcbdeSyoZXacw7T930MOv3VIwZWru32rYc8bbGGsGSBMY8omafVlMw== + dependencies: + "@ethersproject/abi" "^5.0.0" + "@ethersproject/abstract-signer" "^5.0.0" + "@ethersproject/address" "^5.0.0" + "@ethersproject/bignumber" "^5.0.0" + "@ethersproject/bytes" "^5.0.0" + "@ethersproject/contracts" "^5.0.0" + "@ethersproject/providers" "^5.0.0" + "@ethersproject/solidity" "^5.0.0" + "@ethersproject/transactions" "^5.0.0" + "@ethersproject/wallet" "^5.0.0" "@types/qs" "^6.9.4" axios "^0.21.1" chalk "^4.1.0" @@ -5838,14 +5937,18 @@ hardhat-gas-reporter@^1.0.4: sha1 "^1.1.1" hardhat@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.1.2.tgz#a2128b71b0fb216ffc978c85a2030835b4e306ea" - integrity sha512-42iOheDsDl6Gr7sBfpA0S+bQUIcXSDEUrrqmnFEcBHx9qBoQad3s212y2ODmmkdLt+PqqTM+Mq8N3bZDTdjoLg== - dependencies: - "@nomiclabs/ethereumjs-vm" "4.2.2" + version "2.3.0" + resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.3.0.tgz#5c29f8b4d08155c3dc8c908af9713fd5079522d5" + integrity sha512-nc4ro2bM4wPaA6/0Y22o5F5QrifQk2KCyPUUKLPUeFFZoGNGYB8vmeW/k9gV9DdMukdWTzfYlKc2Jn4bfb6tDQ== + dependencies: + "@ethereumjs/block" "^3.2.1" + "@ethereumjs/blockchain" "^5.2.1" + "@ethereumjs/common" "^2.2.0" + "@ethereumjs/tx" "^3.1.3" + "@ethereumjs/vm" "^5.3.2" "@sentry/node" "^5.18.1" "@solidity-parser/parser" "^0.11.0" - "@types/bn.js" "^4.11.5" + "@types/bn.js" "^5.1.0" "@types/lru-cache" "^5.1.0" abort-controller "^3.0.0" adm-zip "^0.4.16" @@ -5859,11 +5962,7 @@ hardhat@^2.1.2: eth-sig-util "^2.5.2" ethereum-cryptography "^0.1.2" ethereumjs-abi "^0.6.8" - ethereumjs-account "^3.0.0" - ethereumjs-block "^2.2.2" - ethereumjs-common "^1.5.0" - ethereumjs-tx "^2.1.2" - ethereumjs-util "^6.2.0" + ethereumjs-util "^7.0.10" find-up "^2.1.0" fp-ts "1.19.3" fs-extra "^7.0.1" @@ -5871,7 +5970,7 @@ hardhat@^2.1.2: immutable "^4.0.0-rc.12" io-ts "1.10.4" lodash "^4.17.11" - merkle-patricia-tree "3.0.0" + merkle-patricia-tree "^4.1.0" mnemonist "^0.38.0" mocha "^7.1.2" node-fetch "^2.6.0" @@ -5895,7 +5994,7 @@ has-ansi@^2.0.0: dependencies: ansi-regex "^2.0.0" -has-bigints@^1.0.0: +has-bigints@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.1.tgz#64fe6acb020673e3b78db035a5af69aa9d07b113" integrity sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA== @@ -6006,14 +6105,14 @@ heap@0.2.6: integrity sha1-CH4fELBGky/IWU3Z5tN4r8nR5aw= highlight.js@^10.4.0, highlight.js@^10.4.1: - version "10.7.0" - resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-10.7.0.tgz#2b4232f45f000a72ae6ef05fe83b831d75add6cb" - integrity sha512-2omq9bKvr0BkwZRLhyjoDd1muuuMsacFY2qoIt/Eu8JoZyJaGm8oQKviiOC/QbJqEeZp9c0BikDr0Jz4kWd8Ag== + version "10.7.2" + resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-10.7.2.tgz#89319b861edc66c48854ed1e6da21ea89f847360" + integrity sha512-oFLl873u4usRM9K63j4ME9u3etNF0PLiJhSQ8rdfuL51Wn3zkD6drf9ZW0dOzjnZI22YYG24z30JcmfCZjMgYg== -highlightjs-solidity@^1.0.21: - version "1.0.21" - resolved "https://registry.yarnpkg.com/highlightjs-solidity/-/highlightjs-solidity-1.0.21.tgz#6d257215b5b635231d4d0c523f2c419bbff6fe42" - integrity sha512-ozOtTD986CBIxuIuauzz2lqCOTpd27TbfYm+msMtNSB69mJ0cdFNvZ6rOO5iFtEHtDkVYVEFQywXffG2sX3XTw== +highlightjs-solidity@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/highlightjs-solidity/-/highlightjs-solidity-1.1.0.tgz#bdf0adba6deffdb1651f8fa63bee4dacc3dc4e00" + integrity sha512-LtH7uuoe+FOmtQd41ozAZKLJC2chqdqs461FJcWAx00R3VcBhSQTRFfzRGtTQqu2wsVIEdHiyynrPrEDDWyIMw== hmac-drbg@^1.0.0, hmac-drbg@^1.0.1: version "1.0.1" @@ -6037,14 +6136,14 @@ hosted-git-info@^2.1.4, hosted-git-info@^2.6.0: resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488" integrity sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg== -htmlparser2@^6.0.0: - version "6.0.1" - resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-6.0.1.tgz#422521231ef6d42e56bd411da8ba40aa36e91446" - integrity sha512-GDKPd+vk4jvSuvCbyuzx/unmXkk090Azec7LovXP8as1Hn8q9p3hbjmDGbUqqhknw0ajwit6LiiWqfiTUPMK7w== +htmlparser2@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-6.1.0.tgz#c4d762b6c3371a05dbe65e94ae43a9f845fb8fb7" + integrity sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A== dependencies: domelementtype "^2.0.1" domhandler "^4.0.0" - domutils "^2.4.4" + domutils "^2.5.2" entities "^2.0.0" http-basic@^8.1.1: @@ -6173,9 +6272,9 @@ import-fresh@^2.0.0: resolve-from "^3.0.0" import-fresh@^3.0.0, import-fresh@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.2.1.tgz#633ff618506e793af5ac91bf48b72677e15cbe66" - integrity sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ== + version "3.3.0" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" + integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== dependencies: parent-module "^1.0.0" resolve-from "^4.0.0" @@ -6293,9 +6392,9 @@ is-arrayish@^0.2.1: integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= is-bigint@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.1.tgz#6923051dfcbc764278540b9ce0e6b3213aa5ebc2" - integrity sha512-J0ELF4yHFxHy0cmSxZuheDOz2luOdVvqjwmEcj8H/L1JHeuEDSDbeRP+Dk9kFVk5RTFzbucJ2Kb9F7ixY2QaCg== + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.2.tgz#ffb381442503235ad245ea89e45b3dbff040ee5a" + integrity sha512-0JV5+SOCQkIdzjBK9buARcV804Ddu7A0Qet6sHi3FimE9ne6m4BGQZfRn+NZiXbBk4F4XmHfDZIipLj9pX8dSA== is-binary-path@~2.1.0: version "2.1.0" @@ -6305,11 +6404,11 @@ is-binary-path@~2.1.0: binary-extensions "^2.0.0" is-boolean-object@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.0.tgz#e2aaad3a3a8fca34c28f6eee135b156ed2587ff0" - integrity sha512-a7Uprx8UtD+HWdyYwnD1+ExtTgqQtD2k/1yJgtXP6wnMm8byhkoTZRl+95LLThpzNZJ5aEvi46cdH+ayMFRwmA== + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.1.tgz#3c0878f035cb821228d350d2e1e36719716a3de8" + integrity sha512-bXdQWkECBUIAcCkeH1unwJLIpZYaa5VvuygSyS/c2lf719mTKZDU5UdDRlpd01UjADgmW8RfqaP+mRaVPdr/Ng== dependencies: - call-bind "^1.0.0" + call-bind "^1.0.2" is-buffer@^1.1.5: version "1.1.6" @@ -6334,9 +6433,9 @@ is-ci@^2.0.0: ci-info "^2.0.0" is-core-module@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.2.0.tgz#97037ef3d52224d85163f5597b2b63d9afed981a" - integrity sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ== + version "2.4.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.4.0.tgz#8e9fc8e15027b011418026e98f0e6f4d86305cc1" + integrity sha512-6A2fkfq1rfeQZjxrZJGerpLCTHRNEBiSgnu0+obeJpEPZRUooHgsizvzv0ZjJwOz3iWIHdJtVWJ/tmPr3D21/A== dependencies: has "^1.0.3" @@ -6355,9 +6454,9 @@ is-data-descriptor@^1.0.0: kind-of "^6.0.0" is-date-object@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.2.tgz#bda736f2cd8fd06d32844e7743bfa7494c3bfd7e" - integrity sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g== + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.4.tgz#550cfcc03afada05eea3dd30981c7b09551f73e5" + integrity sha512-/b4ZVsG7Z5XVtIxs/h9W8nvfLgSAyKYdtGWQLbqy6jA1icmgjf8WCoTKgeS4wy5tYaPePouzFMANbnj94c2Z+A== is-descriptor@^0.1.0: version "0.1.6" @@ -6437,9 +6536,9 @@ is-function@^1.0.1: integrity sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ== is-generator-function@^1.0.7: - version "1.0.8" - resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.8.tgz#dfb5c2b120e02b0a8d9d2c6806cd5621aa922f7b" - integrity sha512-2Omr/twNtufVZFr1GhxjOMFPAj2sjc/dKaIqBhvo4qciXfJmITGH6ZGd8eZYNHza8t1y0e01AuqRhJwfWp26WQ== + version "1.0.9" + resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.9.tgz#e5f82c2323673e7fcad3d12858c83c4039f6399c" + integrity sha512-ZJ34p1uvIfptHCN7sFTjGibB9/oBg17sHqzDLfuwhvmN/qLVvIQXRQ8licZQ35WJ8KuEQt/etnnzQFI9C9Ue/A== is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: version "4.0.1" @@ -6459,9 +6558,9 @@ is-negative-zero@^2.0.1: integrity sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w== is-number-object@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.4.tgz#36ac95e741cf18b283fc1ddf5e83da798e3ec197" - integrity sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw== + version "1.0.5" + resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.5.tgz#6edfaeed7950cff19afedce9fbfca9ee6dd289eb" + integrity sha512-RU0lI/n95pMoUKu9v1BZP5MBcZuNSVJkMkAG2dJqC4z2GlkGUNeH68SuHuBKBD/XFe+LHZ+f9BKkLET60Niedw== is-number@^3.0.0: version "3.0.0" @@ -6476,9 +6575,9 @@ is-number@^7.0.0: integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== is-object@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.1.tgz#8952688c5ec2ffd6b03ecc85e769e02903083470" - integrity sha1-iVJojF7C/9awPsyF52ngKQMINHA= + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.2.tgz#a56552e1c665c9e950b4a025461da87e72f86fcf" + integrity sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA== is-plain-obj@^1.1.0: version "1.1.0" @@ -6497,7 +6596,7 @@ is-plain-object@^2.0.3, is-plain-object@^2.0.4: dependencies: isobject "^3.0.1" -is-regex@^1.0.4, is-regex@^1.1.2: +is-regex@^1.0.4: version "1.1.2" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.2.tgz#81c8ebde4db142f2cf1c53fc86d6a45788266251" integrity sha512-axvdhb5pdhEVThqJzYXwMlVuZwC+FF2DpcOhTS+y/8jVq4trxyPgfcwIxIKiyeuLlSQYKkmUaPQJ8ZE4yNKXDg== @@ -6505,6 +6604,14 @@ is-regex@^1.0.4, is-regex@^1.1.2: call-bind "^1.0.2" has-symbols "^1.0.1" +is-regex@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.3.tgz#d029f9aff6448b93ebbe3f33dac71511fdcbef9f" + integrity sha512-qSVXFz28HM7y+IWX6vLCsexdlvzT1PJNFSBuaQLQ5o0IEw8UDYW6/2+eCMVyIsbM8CNLX2a/QWmSpyxYEHY7CQ== + dependencies: + call-bind "^1.0.2" + has-symbols "^1.0.2" + is-regex@~1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.5.tgz#39d589a358bf18967f726967120b8fc1aed74eae" @@ -6522,17 +6629,17 @@ is-stream@^1.0.0, is-stream@^1.0.1, is-stream@^1.1.0: resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= -is-string@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.5.tgz#40493ed198ef3ff477b8c7f92f644ec82a5cd3a6" - integrity sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ== +is-string@^1.0.5, is-string@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.6.tgz#3fe5d5992fb0d93404f32584d4b0179a71b54a5f" + integrity sha512-2gdzbKUuqtQ3lYNrUTQYoClPhm7oQu4UdpSZMp1/DGgkHBT8E2Z1l0yMdb6D4zNAxwDiMv8MdulKROJGNl0Q0w== is-symbol@^1.0.2, is-symbol@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.3.tgz#38e1014b9e6329be0de9d24a414fd7441ec61937" - integrity sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ== + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.4.tgz#a6dac93b635b063ca6872236de88910a57af139c" + integrity sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg== dependencies: - has-symbols "^1.0.1" + has-symbols "^1.0.2" is-typed-array@^1.1.3: version "1.1.5" @@ -6640,15 +6747,7 @@ js-yaml@3.13.1: argparse "^1.0.7" esprima "^4.0.0" -js-yaml@3.14.0, js-yaml@^3.12.0, js-yaml@^3.13.0, js-yaml@^3.13.1: - version "3.14.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.0.tgz#a7a34170f26a21bb162424d8adacb4113a69e482" - integrity sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A== - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - -js-yaml@3.x: +js-yaml@3.x, js-yaml@^3.12.0, js-yaml@^3.13.0, js-yaml@^3.13.1: version "3.14.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== @@ -6656,6 +6755,13 @@ js-yaml@3.x: argparse "^1.0.7" esprima "^4.0.0" +js-yaml@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.0.0.tgz#f426bc0ff4b4051926cd588c71113183409a121f" + integrity sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q== + dependencies: + argparse "^2.0.1" + jsbn@~0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" @@ -6710,6 +6816,11 @@ json-schema-traverse@^0.4.1: resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== +json-schema-traverse@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" + integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== + json-schema@0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" @@ -6752,11 +6863,11 @@ jsonfile@^4.0.0: graceful-fs "^4.1.6" jsonfile@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.0.1.tgz#98966cba214378c8c84b82e085907b40bf614179" - integrity sha512-jR2b5v7d2vIOust+w3wtFKZIfpC2pnRmFAhAC/BuweZFQR8qZzxH1OyrQ10HmdVYiXWkYUqPVsz91cG7EL2FBg== + version "6.1.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" + integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== dependencies: - universalify "^1.0.0" + universalify "^2.0.0" optionalDependencies: graceful-fs "^4.1.6" @@ -6781,9 +6892,9 @@ jsprim@^1.2.2: verror "1.10.0" just-extend@^4.0.2: - version "4.1.1" - resolved "https://registry.yarnpkg.com/just-extend/-/just-extend-4.1.1.tgz#158f1fdb01f128c411dc8b286a7b4837b3545282" - integrity sha512-aWgeGFW67BP3e5181Ep1Fv2v8z//iBJfrvyTnq8wG86vEESwmonn1zPBJ0VfmT9CJq2FIT0VsETtrNFm2a+SHA== + version "4.2.1" + resolved "https://registry.yarnpkg.com/just-extend/-/just-extend-4.2.1.tgz#ef5e589afb61e5d66b24eca749409a8939a8c744" + integrity sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg== keccak@3.0.1, keccak@^3.0.0: version "3.0.1" @@ -6874,6 +6985,11 @@ level-codec@~7.0.0: resolved "https://registry.yarnpkg.com/level-codec/-/level-codec-7.0.1.tgz#341f22f907ce0f16763f24bddd681e395a0fb8a7" integrity sha512-Ua/R9B9r3RasXdRmOtd+t9TCOEIIlts+TN/7XTT2unhDaL6sJn83S3rUyljbr6lVtw49N3/yA0HHjpV6Kzb2aQ== +level-concat-iterator@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/level-concat-iterator/-/level-concat-iterator-2.0.1.tgz#1d1009cf108340252cb38c51f9727311193e6263" + integrity sha512-OTKKOqeav2QWcERMJR7IS9CUo1sHnke2C0gkSmcR7QuEtFNLLzHQAvnMw8ykvEcv0Qtkg0p7FOwP1v9e5Smdcw== + level-errors@^1.0.3: version "1.1.2" resolved "https://registry.yarnpkg.com/level-errors/-/level-errors-1.1.2.tgz#4399c2f3d3ab87d0625f7e3676e2d807deff404d" @@ -6923,6 +7039,15 @@ level-iterator-stream@~3.0.0: readable-stream "^2.3.6" xtend "^4.0.0" +level-iterator-stream@~4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/level-iterator-stream/-/level-iterator-stream-4.0.2.tgz#7ceba69b713b0d7e22fcc0d1f128ccdc8a24f79c" + integrity sha512-ZSthfEqzGSOMWoUGhTXdX9jv26d32XJuHz/5YnuHZzH6wldfWMOVwI9TBtKcya4BKTyTt3XVA0A3cF3q5CY30Q== + dependencies: + inherits "^2.0.4" + readable-stream "^3.4.0" + xtend "^4.0.2" + level-mem@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/level-mem/-/level-mem-3.0.1.tgz#7ce8cf256eac40f716eb6489654726247f5a89e5" @@ -6931,6 +7056,22 @@ level-mem@^3.0.1: level-packager "~4.0.0" memdown "~3.0.0" +level-mem@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/level-mem/-/level-mem-5.0.1.tgz#c345126b74f5b8aa376dc77d36813a177ef8251d" + integrity sha512-qd+qUJHXsGSFoHTziptAKXoLX87QjR7v2KMbqncDXPxQuCdsQlzmyX+gwrEHhlzn08vkf8TyipYyMmiC6Gobzg== + dependencies: + level-packager "^5.0.3" + memdown "^5.0.0" + +level-packager@^5.0.3: + version "5.1.1" + resolved "https://registry.yarnpkg.com/level-packager/-/level-packager-5.1.1.tgz#323ec842d6babe7336f70299c14df2e329c18939" + integrity sha512-HMwMaQPlTC1IlcwT3+swhqf/NUO+ZhXVz6TY1zZIIZlIR0YSn8GtAAWmIvKjNY16ZkEg/JcpAuQskxsXqC0yOQ== + dependencies: + encoding-down "^6.3.0" + levelup "^4.3.2" + level-packager@~4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/level-packager/-/level-packager-4.0.1.tgz#7e7d3016af005be0869bc5fa8de93d2a7f56ffe6" @@ -6962,6 +7103,13 @@ level-sublevel@6.6.4: typewiselite "~1.0.0" xtend "~4.0.0" +level-supports@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/level-supports/-/level-supports-1.0.1.tgz#2f530a596834c7301622521988e2c36bb77d122d" + integrity sha512-rXM7GYnW8gsl1vedTJIbzOrRv85c/2uCMpiiCzO2fndd06U/kUXEEU9evYn4zFggBOg36IsBW8LzqIpETwwQzg== + dependencies: + xtend "^4.0.2" + level-ws@0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/level-ws/-/level-ws-0.0.0.tgz#372e512177924a00424b0b43aef2bb42496d228b" @@ -6979,6 +7127,15 @@ level-ws@^1.0.0: readable-stream "^2.2.8" xtend "^4.0.1" +level-ws@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/level-ws/-/level-ws-2.0.0.tgz#207a07bcd0164a0ec5d62c304b4615c54436d339" + integrity sha512-1iv7VXx0G9ec1isqQZ7y5LmoZo/ewAsyDHNA8EFDW5hqH2Kqovm33nSFkSdnLLAK+I5FlT+lo5Cw9itGe+CpQA== + dependencies: + inherits "^2.0.3" + readable-stream "^3.1.0" + xtend "^4.0.1" + levelup@3.1.1, levelup@^3.0.0: version "3.1.1" resolved "https://registry.yarnpkg.com/levelup/-/levelup-3.1.1.tgz#c2c0b3be2b4dc316647c53b42e2f559e232d2189" @@ -7002,6 +7159,17 @@ levelup@^1.2.1: semver "~5.4.1" xtend "~4.0.0" +levelup@^4.3.2: + version "4.4.0" + resolved "https://registry.yarnpkg.com/levelup/-/levelup-4.4.0.tgz#f89da3a228c38deb49c48f88a70fb71f01cafed6" + integrity sha512-94++VFO3qN95cM/d6eBXvd894oJE0w3cInq9USsyQzzoJxmiYzPAocNcuGCPGGjoXqDVJcr3C1jzt1TSjyaiLQ== + dependencies: + deferred-leveldown "~5.3.0" + level-errors "~2.0.0" + level-iterator-stream "~4.0.0" + level-supports "~1.0.0" + xtend "~4.0.0" + levn@^0.3.0, levn@~0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" @@ -7092,12 +7260,17 @@ lodash.toarray@^4.4.0: resolved "https://registry.yarnpkg.com/lodash.toarray/-/lodash.toarray-4.4.0.tgz#24c4bfcd6b2fba38bfd0594db1179d8e9b656561" integrity sha1-JMS/zWsvuji/0FlNsRedjptlZWE= -lodash@4.17.20, lodash@^4.17.12, lodash@^4.17.19: +lodash.truncate@^4.4.2: + version "4.4.2" + resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" + integrity sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM= + +lodash@4.17.20: version "4.17.20" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52" integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA== -lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.21, lodash@^4.17.4: +lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.21, lodash@^4.17.4: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -7213,6 +7386,11 @@ match-all@^1.2.6: resolved "https://registry.yarnpkg.com/match-all/-/match-all-1.2.6.tgz#66d276ad6b49655551e63d3a6ee53e8be0566f8d" integrity sha512-0EESkXiTkWzrQQntBu2uzKvLu6vVkUGz40nGPbSZuegcfE5UuSzNjLaIu76zJWuaT/2I3Z/8M06OlUOZLGwLlQ== +mcl-wasm@^0.7.1: + version "0.7.7" + resolved "https://registry.yarnpkg.com/mcl-wasm/-/mcl-wasm-0.7.7.tgz#fd463dd1641a37f9f55b6ca8e5a38e95be2bc58f" + integrity sha512-jDGiCQA++5hX37gdH6RDZ3ZsA0raet7xyY/R5itj5cbcdf4Gvw+YyxWX/ZZ0Z2UPxJiw1ktRsCJZzpnqlQILdw== + md5.js@^1.3.4: version "1.3.5" resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" @@ -7248,6 +7426,18 @@ memdown@^1.0.0: ltgt "~2.2.0" safe-buffer "~5.1.1" +memdown@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/memdown/-/memdown-5.1.0.tgz#608e91a9f10f37f5b5fe767667a8674129a833cb" + integrity sha512-B3J+UizMRAlEArDjWHTMmadet+UKwHd3UjMgGBkZcKAxAYVPS9o0Yeiha4qvz7iGiL2Sb3igUft6p7nbFWctpw== + dependencies: + abstract-leveldown "~6.2.1" + functional-red-black-tree "~1.0.1" + immediate "~3.2.3" + inherits "~2.0.1" + ltgt "~2.2.0" + safe-buffer "~5.2.0" + memdown@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/memdown/-/memdown-3.0.0.tgz#93aca055d743b20efc37492e9e399784f2958309" @@ -7302,6 +7492,19 @@ merkle-patricia-tree@^2.1.2, merkle-patricia-tree@^2.3.2: rlp "^2.0.0" semaphore ">=1.0.1" +merkle-patricia-tree@^4.1.0, merkle-patricia-tree@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/merkle-patricia-tree/-/merkle-patricia-tree-4.2.0.tgz#a204b9041be5c25e8d14f0ff47021de090e811a1" + integrity sha512-0sBVXs7z1Q1/kxzWZ3nPnxSPiaHKF/f497UQzt9O7isRcS10tel9jM/4TivF6Jv7V1yFq4bWyoATxbDUOen5vQ== + dependencies: + "@types/levelup" "^4.3.0" + ethereumjs-util "^7.0.10" + level-mem "^5.0.1" + level-ws "^2.0.0" + readable-stream "^3.6.0" + rlp "^2.2.4" + semaphore-async-await "^1.5.1" + methods@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" @@ -7327,12 +7530,12 @@ micromatch@^3.1.4: to-regex "^3.0.2" micromatch@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.2.tgz#4fcb0999bf9fbc2fcbdd212f6d629b9a56c39259" - integrity sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q== + version "4.0.4" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.4.tgz#896d519dfe9db25fce94ceb7a500919bf881ebf9" + integrity sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg== dependencies: braces "^3.0.1" - picomatch "^2.0.5" + picomatch "^2.2.3" miller-rabin@^4.0.0: version "4.0.1" @@ -7342,17 +7545,17 @@ miller-rabin@^4.0.0: bn.js "^4.0.0" brorand "^1.0.1" -mime-db@1.44.0: - version "1.44.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92" - integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg== +mime-db@1.47.0: + version "1.47.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.47.0.tgz#8cb313e59965d3c05cfbf898915a267af46a335c" + integrity sha512-QBmA/G2y+IfeS4oktet3qRZ+P5kPhCKRXxXnQEudYqUaEioAU1/Lq2us3D/t1Jfo4hE9REQPrbB7K5sOczJVIw== mime-types@^2.1.12, mime-types@^2.1.16, mime-types@~2.1.19, mime-types@~2.1.24: - version "2.1.27" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f" - integrity sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w== + version "2.1.30" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.30.tgz#6e7be8b4c479825f85ed6326695db73f9305d62d" + integrity sha512-crmjA4bLtR8m9qLpHvgxSChT+XoSlZi8J4n/aIdn3z92e/U47Z0V/yl+Wh9W046GgFVAmoNR/fmdbZYcSSIUeg== dependencies: - mime-db "1.44.0" + mime-db "1.47.0" mime@1.6.0: version "1.6.0" @@ -7488,40 +7691,40 @@ mocha@^7.1.1, mocha@^7.1.2: yargs-unparser "1.6.0" mocha@^8.1.1: - version "8.2.0" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-8.2.0.tgz#f8aa79110b4b5a6580c65d4dd8083c425282624e" - integrity sha512-lEWEMq2LMfNJMKeuEwb5UELi+OgFDollXaytR5ggQcHpzG3NP/R7rvixAvF+9/lLsTWhWG+4yD2M70GsM06nxw== + version "8.4.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-8.4.0.tgz#677be88bf15980a3cae03a73e10a0fc3997f0cff" + integrity sha512-hJaO0mwDXmZS4ghXsvPVriOhsxQ7ofcpQdm8dE+jISUOKopitvnXFQmpRR7jd2K6VBG6E26gU3IAbXXGIbu4sQ== dependencies: "@ungap/promise-all-settled" "1.1.2" ansi-colors "4.1.1" browser-stdout "1.3.1" - chokidar "3.4.3" - debug "4.2.0" - diff "4.0.2" + chokidar "3.5.1" + debug "4.3.1" + diff "5.0.0" escape-string-regexp "4.0.0" find-up "5.0.0" glob "7.1.6" growl "1.10.5" he "1.2.0" - js-yaml "3.14.0" + js-yaml "4.0.0" log-symbols "4.0.0" minimatch "3.0.4" - ms "2.1.2" - nanoid "3.1.12" + ms "2.1.3" + nanoid "3.1.20" serialize-javascript "5.0.1" strip-json-comments "3.1.1" - supports-color "7.2.0" + supports-color "8.1.1" which "2.0.2" wide-align "1.1.3" - workerpool "6.0.2" - yargs "13.3.2" - yargs-parser "13.1.2" + workerpool "6.1.0" + yargs "16.2.0" + yargs-parser "20.2.4" yargs-unparser "2.0.0" mock-fs@^4.1.0: - version "4.13.0" - resolved "https://registry.yarnpkg.com/mock-fs/-/mock-fs-4.13.0.tgz#31c02263673ec3789f90eb7b6963676aa407a598" - integrity sha512-DD0vOdofJdoaRNtnWcrXe6RQbpHkPPmtqGq14uRX0F8ZKJ5nv89CVTYl/BZdppDxBDaV0hl75htg3abpEWlPZA== + version "4.14.0" + resolved "https://registry.yarnpkg.com/mock-fs/-/mock-fs-4.14.0.tgz#ce5124d2c601421255985e6e94da80a7357b1b18" + integrity sha512-qYvlv/exQ4+svI3UOvPUpLDF0OMX5euvUH0Ny4N5QyRyhNdgAgUrVH3iUINSzEPLvx0kbo/Bp28GJKIqvE7URw== ms@2.0.0: version "2.0.0" @@ -7538,7 +7741,7 @@ ms@2.1.2: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -ms@^2.1.1: +ms@2.1.3, ms@^2.1.1: version "2.1.3" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== @@ -7607,10 +7810,10 @@ nano-json-stream-parser@^0.1.2: resolved "https://registry.yarnpkg.com/nano-json-stream-parser/-/nano-json-stream-parser-0.1.2.tgz#0cc8f6d0e2b622b479c40d499c46d64b755c6f5f" integrity sha1-DMj20OK2IrR5xA1JnEbWS3Vcb18= -nanoid@3.1.12: - version "3.1.12" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.12.tgz#6f7736c62e8d39421601e4a0c77623a97ea69654" - integrity sha512-1qstj9z5+x491jfiC4Nelk+f8XBad7LN20PmyWINJEMRSf3wcAjAWysw1qaA8z6NSKe2sjq1hRSDpBH5paCb6A== +nanoid@3.1.20: + version "3.1.20" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.20.tgz#badc263c6b1dcf14b71efaa85f6ab4c1d6cfc788" + integrity sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw== nanomatch@^1.2.9: version "1.2.13" @@ -7654,13 +7857,13 @@ nice-try@^1.0.4: resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== -nise@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/nise/-/nise-4.1.0.tgz#8fb75a26e90b99202fa1e63f448f58efbcdedaf6" - integrity sha512-eQMEmGN/8arp0xsvGoQ+B1qvSkR73B1nWSCh7nOt5neMCtwcQVYQGdzQMhcNscktTsWB54xnlSQFzOAPJD8nXA== +nise@^5.0.1: + version "5.1.0" + resolved "https://registry.yarnpkg.com/nise/-/nise-5.1.0.tgz#713ef3ed138252daef20ec035ab62b7a28be645c" + integrity sha512-W5WlHu+wvo3PaKLsJJkgPup2LrsXCcm7AWwyNZkUnn5rwPkuPBi3Iwk5SQtN0mv+K65k7nKKjwNQ30wg3wLAQQ== dependencies: "@sinonjs/commons" "^1.7.0" - "@sinonjs/fake-timers" "^6.0.0" + "@sinonjs/fake-timers" "^7.0.4" "@sinonjs/text-encoding" "^0.7.1" just-extend "^4.0.2" path-to-regexp "^1.7.0" @@ -7708,11 +7911,6 @@ node-gyp-build@^4.2.0: resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.2.3.tgz#ce6277f853835f718829efb47db20f3e4d9c4739" integrity sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg== -node-gyp-build@~3.7.0: - version "3.7.0" - resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-3.7.0.tgz#daa77a4f547b9aed3e2aac779eaf151afd60ec8d" - integrity sha512-L/Eg02Epx6Si2NXmedx+Okg+4UHqmaf3TNcxd50SF9NQGcJaON3AtU++kax69XV7YWz4tUspqZSAsVofhFKG2w== - nofilter@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/nofilter/-/nofilter-1.0.4.tgz#78d6f4b6a613e7ced8b015cec534625f7667006e" @@ -7741,9 +7939,9 @@ normalize-path@^3.0.0, normalize-path@~3.0.0: integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== normalize-url@^4.1.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.0.tgz#453354087e6ca96957bd8f5baf753f5982142129" - integrity sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ== + version "4.5.1" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.1.tgz#0dd90cf1288ee1d1313b87081c9a5932ee48518a" + integrity sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA== npm-run-path@^2.0.0: version "2.0.2" @@ -7791,10 +7989,10 @@ object-copy@^0.1.0: define-property "^0.2.5" kind-of "^3.0.3" -object-inspect@^1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.9.0.tgz#c90521d74e1127b67266ded3394ad6116986533a" - integrity sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw== +object-inspect@^1.10.3, object-inspect@^1.9.0: + version "1.10.3" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.10.3.tgz#c2aa7d2d09f50c99375704f7a0adf24c5782d369" + integrity sha512-e5mCJlSH7poANfC8z8S9s9S2IN5/4Zb3aZ33f5s8YqoazCFzNLloLU8r5VCG+G7WoqLvAAZoVMcy3tp/3X0Plw== object-inspect@~1.7.0: version "1.7.0" @@ -8000,11 +8198,11 @@ p-limit@^2.0.0: p-try "^2.0.0" p-limit@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.0.2.tgz#1664e010af3cadc681baafd3e2a437be7b0fb5fe" - integrity sha512-iwqZSOoWIW+Ew4kAGUlN16J4M7OB3ysMLSZtnhmqx7njIHFPlxWBX8xo3lVTyFVq6mI/lL9qt2IsN1sHwaxJkg== + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== dependencies: - p-try "^2.0.0" + yocto-queue "^0.1.0" p-locate@^2.0.0: version "2.0.0" @@ -8072,11 +8270,6 @@ parse-cache-control@^1.0.1: resolved "https://registry.yarnpkg.com/parse-cache-control/-/parse-cache-control-1.0.1.tgz#8eeab3e54fa56920fe16ba38f77fa21aacc2d74e" integrity sha1-juqz5U+laSD+Fro493+iGqzC104= -parse-code-context@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/parse-code-context/-/parse-code-context-1.0.0.tgz#718c295c593d0d19a37f898473268cc75e98de1e" - integrity sha512-OZQaqKaQnR21iqhlnPfVisFjBWjhnMl5J9MgbP8xC+EwoVqbXrq78lp+9Zb3ahmLzrIX5Us/qbvBnaS3hkH6OA== - parse-headers@^2.0.0: version "2.0.3" resolved "https://registry.yarnpkg.com/parse-headers/-/parse-headers-2.0.3.tgz#5e8e7512383d140ba02f0c7aa9f49b4399c92515" @@ -8097,14 +8290,14 @@ parse-json@^4.0.0: error-ex "^1.3.1" json-parse-better-errors "^1.0.1" -parse5-htmlparser2-tree-adapter@^6.0.0: +parse5-htmlparser2-tree-adapter@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz#2cdf9ad823321140370d4dbf5d3e92c7c8ddc6e6" integrity sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA== dependencies: parse5 "^6.0.1" -parse5@^6.0.0, parse5@^6.0.1: +parse5@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/parse5/-/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b" integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw== @@ -8199,9 +8392,9 @@ path-key@^3.1.0: integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== path-parse@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" - integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== + version "1.0.7" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== path-to-regexp@0.1.7: version "0.1.7" @@ -8229,12 +8422,23 @@ path-type@^4.0.0: resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== -pathval@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.0.tgz#b942e6d4bde653005ef6b71361def8727d0645e0" - integrity sha1-uULm1L3mUwBe9rcTYd74cn0GReA= +pathval@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" + integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== + +pbkdf2@^3.0.17, pbkdf2@^3.0.3: + version "3.1.2" + resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.2.tgz#dd822aa0887580e52f1a039dc3eda108efae3075" + integrity sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA== + dependencies: + create-hash "^1.1.2" + create-hmac "^1.1.4" + ripemd160 "^2.0.1" + safe-buffer "^5.0.1" + sha.js "^2.4.8" -pbkdf2@^3.0.17, pbkdf2@^3.0.3, pbkdf2@^3.0.9: +pbkdf2@^3.0.9: version "3.1.1" resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.1.tgz#cb8724b0fada984596856d1a6ebafd3584654b94" integrity sha512-4Ejy1OPxi9f2tt1rRV7Go7zmfDQ+ZectEQz3VGUQhgq62HtIRPDyG/JtnwIxs6x3uNMwo2V7q1fMvKjb+Tnpqg== @@ -8250,10 +8454,10 @@ performance-now@^2.1.0: resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= -picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.2.1: - version "2.2.2" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" - integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== +picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3: + version "2.3.0" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972" + integrity sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw== pify@^2.0.0, pify@^2.3.0: version "2.3.0" @@ -8320,34 +8524,39 @@ prettier-linter-helpers@^1.0.0: fast-diff "^1.1.2" prettier-plugin-solidity@^1.0.0-alpha.57: - version "1.0.0-alpha.59" - resolved "https://registry.yarnpkg.com/prettier-plugin-solidity/-/prettier-plugin-solidity-1.0.0-alpha.59.tgz#b0cf82fb068537d152d0bc417588d08e952a56c6" - integrity sha512-6cE0SWaiYCBoJY4clCfsbWlEEOU4K42Ny6Tg4Jwprgts/q+AVfYnPQ5coRs7zIjYzc4RVspifYPeh+oAg8RpLw== + version "1.0.0-beta.11" + resolved "https://registry.yarnpkg.com/prettier-plugin-solidity/-/prettier-plugin-solidity-1.0.0-beta.11.tgz#580a16cab6517ab20cd08e65afd0300caa32125d" + integrity sha512-b3lh/9tn9BC3I723Aa91zebw2NDlbbBroKg7izP+jU0QfrLO6ldi0jY0XrqX3+zGqAI2aLcP8Jr1eGdymK5CgQ== dependencies: - "@solidity-parser/parser" "^0.8.1" + "@solidity-parser/parser" "^0.13.0" dir-to-object "^2.0.0" - emoji-regex "^9.0.0" + emoji-regex "^9.2.2" escape-string-regexp "^4.0.0" - extract-comments "^1.1.0" - prettier "^2.0.5" - semver "^7.3.2" - string-width "^4.2.0" + prettier "^2.2.1" + semver "^7.3.5" + solidity-comments-extractor "^0.0.7" + string-width "^4.2.2" prettier@^1.14.3: version "1.19.1" resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb" integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew== -prettier@^2.0.5: - version "2.1.2" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.1.2.tgz#3050700dae2e4c8b67c4c3f666cdb8af405e1ce5" - integrity sha512-16c7K+x4qVlJg9rEbXl7HEGmQyZlG4R9AgP+oHKRMsMsuk8s+ATStlf1NpDqyBI1HpVyfjLOeMhH2LvuNvV5Vg== +prettier@^2.0.5, prettier@^2.2.1: + version "2.3.0" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.0.tgz#b6a5bf1284026ae640f17f7ff5658a7567fc0d18" + integrity sha512-kXtO4s0Lz/DW/IJ9QdWhAf7/NmPWQXkFr/r/WkR3vyI+0v8amTDxiaQSLzs8NBlytfLWX/7uQUMIW677yLKl4w== prettier@^2.1.2: version "2.2.1" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.2.1.tgz#795a1a78dd52f073da0cd42b21f9c91381923ff5" integrity sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q== +printj@~1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/printj/-/printj-1.1.2.tgz#d90deb2975a8b9f600fb3a1c94e3f4c53c78a222" + integrity sha512-zA2SmoLaxZyArQTOPj5LXecR+RagfPSU5Kw1qP+jkWeNlrq+eJZyY2oS68SU1Z/7/myXM4lo9716laOFAVStCQ== + private@^0.1.6, private@^0.1.8: version "0.1.8" resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" @@ -8363,11 +8572,6 @@ process@^0.11.10: resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= -process@~0.5.1: - version "0.5.2" - resolved "https://registry.yarnpkg.com/process/-/process-0.5.2.tgz#1638d8a8e34c2f440a91db95ab9aeb677fc185cf" - integrity sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8= - progress@^2.0.0: version "2.0.3" resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" @@ -8499,12 +8703,12 @@ qs@6.7.0: resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc" integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ== -qs@^6.4.0, qs@^6.9.4: +qs@^6.4.0: version "6.9.4" resolved "https://registry.yarnpkg.com/qs/-/qs-6.9.4.tgz#9090b290d1f91728d3c22e54843ca44aea5ab687" integrity sha512-A1kFqHekCTM7cz0udomYUoYNWjBebHm/5wzU/XqrBRBNWectVH0QIiN+NEcZ0Dte5hvzHwbr8+XQmguPhJ6WdQ== -qs@^6.7.0: +qs@^6.7.0, qs@^6.9.4: version "6.10.1" resolved "https://registry.yarnpkg.com/qs/-/qs-6.10.1.tgz#4931482fa8d647a5aab799c5271d2133b981fb6a" integrity sha512-M528Hph6wsSVOBiYUnGf+K/7w0hNshs/duGsNXPUCLH5XAqjEtiPGwNONLV0tBH8NoGb0mvD5JubnUTrujKDTg== @@ -8530,6 +8734,11 @@ querystring@0.2.0: resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= +queue-microtask@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" + integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== + randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.0.6, randombytes@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" @@ -8610,7 +8819,7 @@ readable-stream@^2.0.0, readable-stream@^2.0.5, readable-stream@^2.2.2, readable string_decoder "~1.1.1" util-deprecate "~1.0.1" -readable-stream@^3.0.6, readable-stream@^3.6.0: +readable-stream@^3.0.6, readable-stream@^3.1.0, readable-stream@^3.4.0, readable-stream@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== @@ -8806,7 +9015,7 @@ require-from-string@^1.1.0: resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-1.2.1.tgz#529c9ccef27380adfec9a2f965b649bbee636418" integrity sha1-UpyczvJzgK3+yaL5ZbZJu+5jZBg= -require-from-string@^2.0.0: +require-from-string@^2.0.0, require-from-string@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== @@ -8902,6 +9111,13 @@ rimraf@^2.2.8, rimraf@^2.6.3: dependencies: glob "^7.1.3" +rimraf@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" + ripemd160@^2.0.0, ripemd160@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" @@ -8923,9 +9139,11 @@ run-async@^2.2.0: integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== run-parallel@^1.1.9: - version "1.1.10" - resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.1.10.tgz#60a51b2ae836636c81377df16cb107351bcd13ef" - integrity sha512-zb/1OuZ6flOlH6tQyMPUrE3x3Ulxjlo9WIVXR4yVYi4H9UXQaeIsPbLn2R3O3vQCnDKkAl2qHiuocKKX4Tz/Sw== + version "1.2.0" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" + integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== + dependencies: + queue-microtask "^1.2.2" rustbn.js@~0.2.0: version "0.2.0" @@ -8933,9 +9151,9 @@ rustbn.js@~0.2.0: integrity sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA== rxjs@^6.4.0: - version "6.6.3" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.3.tgz#8ca84635c4daa900c0d3967a6ee7ac60271ee552" - integrity sha512-trsQc+xYYXZ3urjOiJOuCOa5N3jAZ3eiSpQB5hIT8zGlL2QfnHLJ2r7GMkBGuIausdJN1OneaI6gQlsqNHHmZQ== + version "6.6.7" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9" + integrity sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ== dependencies: tslib "^1.9.0" @@ -8969,9 +9187,9 @@ safe-regex@^1.1.0: integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== sc-istanbul@^0.4.5: - version "0.4.5" - resolved "https://registry.yarnpkg.com/sc-istanbul/-/sc-istanbul-0.4.5.tgz#1896066484d55336cf2cdbcc7884dc79da50dc76" - integrity sha512-7wR5EZFLsC4w0wSm9BUuCgW+OGKAU7PNlW5L0qwVPbh+Q1sfVn2fyzfMXYCm6rkNA5ipaCOt94nApcguQwF5Gg== + version "0.4.6" + resolved "https://registry.yarnpkg.com/sc-istanbul/-/sc-istanbul-0.4.6.tgz#cf6784355ff2076f92d70d59047d71c13703e839" + integrity sha512-qJFF/8tW/zJsbyfh/iT/ZM5QNHE3CXxtLJbZsL+CzdJLBsPD7SedJZoUA4d8iAcN2IoMp/Dx80shOOd2x96X/g== dependencies: abbrev "1.0.x" async "1.x" @@ -9033,6 +9251,11 @@ seedrandom@3.0.1: resolved "https://registry.yarnpkg.com/seedrandom/-/seedrandom-3.0.1.tgz#eb3dde015bcf55df05a233514e5df44ef9dce083" integrity sha512-1/02Y/rUeU1CJBAGLebiC5Lbo5FnB22gQbIFFYTLkwvp1xdABZJH1sn4ZT1MzXmPpzv+Rf/Lu2NcsLJiK4rcDg== +semaphore-async-await@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/semaphore-async-await/-/semaphore-async-await-1.5.1.tgz#857bef5e3644601ca4b9570b87e9df5ca12974fa" + integrity sha1-hXvvXjZEYBykuVcLh+nfXKEpdPo= + semaphore@>=1.0.1, semaphore@^1.0.3, semaphore@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/semaphore/-/semaphore-1.1.0.tgz#aaad8b86b20fe8e9b32b16dc2ee682a8cd26a8aa" @@ -9048,15 +9271,10 @@ semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== -semver@^7.2.1, semver@^7.3.2: - version "7.3.2" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" - integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== - -semver@^7.3.4: - version "7.3.4" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.4.tgz#27aaa7d2e4ca76452f98d3add093a72c943edc97" - integrity sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw== +semver@^7.2.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5: + version "7.3.5" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" + integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== dependencies: lru-cache "^6.0.0" @@ -9225,15 +9443,15 @@ simple-get@^2.7.0: simple-concat "^1.0.0" sinon@^10.0.0: - version "10.0.0" - resolved "https://registry.yarnpkg.com/sinon/-/sinon-10.0.0.tgz#52279f97e35646ff73d23207d0307977c9b81430" - integrity sha512-XAn5DxtGVJBlBWYrcYKEhWCz7FLwZGdyvANRyK06419hyEpdT0dMc5A8Vcxg5SCGHc40CsqoKsc1bt1CbJPfNw== + version "10.0.1" + resolved "https://registry.yarnpkg.com/sinon/-/sinon-10.0.1.tgz#0d1a13ecb86f658d15984f84273e57745b1f4c57" + integrity sha512-1rf86mvW4Mt7JitEIgmNaLXaWnrWd/UrVKZZlL+kbeOujXVf9fmC4kQEQ/YeHoiIA23PLNngYWK+dngIx/AumA== dependencies: "@sinonjs/commons" "^1.8.1" - "@sinonjs/fake-timers" "^6.0.1" - "@sinonjs/samsam" "^5.3.1" + "@sinonjs/fake-timers" "^7.0.4" + "@sinonjs/samsam" "^6.0.1" diff "^4.0.2" - nise "^4.1.0" + nise "^5.0.1" supports-color "^7.1.0" slash@^1.0.0: @@ -9260,6 +9478,15 @@ slice-ansi@^2.1.0: astral-regex "^1.0.0" is-fullwidth-code-point "^2.0.0" +slice-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" + integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ== + dependencies: + ansi-styles "^4.0.0" + astral-regex "^2.0.0" + is-fullwidth-code-point "^3.0.0" + snapdragon-node@^2.0.1: version "2.1.1" resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" @@ -9338,11 +9565,11 @@ solhint-plugin-prettier@^0.0.5: prettier-linter-helpers "^1.0.0" solhint@^3.3.1: - version "3.3.1" - resolved "https://registry.yarnpkg.com/solhint/-/solhint-3.3.1.tgz#7aa02afb79ad2bcfa64885b1fe134e220949546f" - integrity sha512-JXAOLM2UQrLOtx4fKXzleq6CR0N7AlRfki+dFyvab93x4DoHeHQ4Ic2LMScT8V0AddXgbKtR8xdIIZKLh07dNg== + version "3.3.5" + resolved "https://registry.yarnpkg.com/solhint/-/solhint-3.3.5.tgz#dd348e9d2d94631776d37f7044035fe3bb57a249" + integrity sha512-GhEZS/C5O6U34fYKc63nyqCQ7/F5qTZ9YWjfBTUOVE8OXy4E8raApwk4jXplv+CoM8olQdRgTm0o4gsmte8JmA== dependencies: - "@solidity-parser/parser" "^0.8.1" + "@solidity-parser/parser" "^0.13.0-rc.8" ajv "^6.6.1" antlr4 "4.7.1" ast-parents "0.0.1" @@ -9359,12 +9586,17 @@ solhint@^3.3.1: optionalDependencies: prettier "^1.14.3" +solidity-comments-extractor@^0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/solidity-comments-extractor/-/solidity-comments-extractor-0.0.7.tgz#99d8f1361438f84019795d928b931f4e5c39ca19" + integrity sha512-wciNMLg/Irp8OKGrh3S2tfvZiZ0NEyILfcRCXCD4mp7SgK/i9gzLfhY2hY7VMCQJ3kH9UB9BzNdibIVMchzyYw== + solidity-coverage@^0.7.15: - version "0.7.15" - resolved "https://registry.yarnpkg.com/solidity-coverage/-/solidity-coverage-0.7.15.tgz#c5974e92b665d5be6bee11c24bbf7f6ff7529fa2" - integrity sha512-MVcpEUyMjf+ITew3BS7fI/NRxpYJUg9wPrSLS7y/F7BwXpYVRgAK4WsjbMzVkRdmezta1Kon0XqYHZMLgEt9XA== + version "0.7.16" + resolved "https://registry.yarnpkg.com/solidity-coverage/-/solidity-coverage-0.7.16.tgz#c8c8c46baa361e2817bbf275116ddd2ec90a55fb" + integrity sha512-ttBOStywE6ZOTJmmABSg4b8pwwZfYKG8zxu40Nz+sRF5bQX7JULXWj/XbX0KXps3Fsp8CJXg8P29rH3W54ipxw== dependencies: - "@solidity-parser/parser" "^0.11.0" + "@solidity-parser/parser" "^0.12.0" "@truffle/provider" "^0.2.24" chalk "^2.4.2" death "^1.1.0" @@ -9410,7 +9642,7 @@ source-map-support@^0.4.15: dependencies: source-map "^0.5.6" -source-map-support@^0.5.13, source-map-support@^0.5.17, source-map-support@^0.5.19: +source-map-support@^0.5.13, source-map-support@^0.5.17: version "0.5.19" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61" integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw== @@ -9557,10 +9789,10 @@ string-width@^3.0.0, string-width@^3.1.0: is-fullwidth-code-point "^2.0.0" strip-ansi "^5.1.0" -string-width@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.0.tgz#952182c46cc7b2c313d1596e623992bd163b72b5" - integrity sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg== +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2: + version "4.2.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.2.tgz#dafd4f9559a7585cfba529c6a0a4f73488ebd4c5" + integrity sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA== dependencies: emoji-regex "^8.0.0" is-fullwidth-code-point "^3.0.0" @@ -9684,10 +9916,10 @@ supports-color@6.0.0: dependencies: has-flag "^3.0.0" -supports-color@7.2.0, supports-color@^7.1.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" - integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== +supports-color@8.1.1: + version "8.1.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== dependencies: has-flag "^4.0.0" @@ -9710,6 +9942,13 @@ supports-color@^5.3.0: dependencies: has-flag "^3.0.0" +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + swarm-js@^0.1.40: version "0.1.40" resolved "https://registry.yarnpkg.com/swarm-js/-/swarm-js-0.1.40.tgz#b1bc7b6dcc76061f6c772203e004c11997e06b99" @@ -9753,6 +9992,18 @@ table@^5.2.3: slice-ansi "^2.1.0" string-width "^3.0.0" +table@^6.0.9: + version "6.7.1" + resolved "https://registry.yarnpkg.com/table/-/table-6.7.1.tgz#ee05592b7143831a8c94f3cee6aae4c1ccef33e2" + integrity sha512-ZGum47Yi6KOOFDE8m223td53ath2enHcYLgOCjGr5ngu8bdIARQk6mN/wRMv4yMRcHnCSnHbCEha4sobQx5yWg== + dependencies: + ajv "^8.0.1" + lodash.clonedeep "^4.5.0" + lodash.truncate "^4.4.2" + slice-ansi "^4.0.0" + string-width "^4.2.0" + strip-ansi "^6.0.0" + tape@^4.6.3: version "4.13.3" resolved "https://registry.yarnpkg.com/tape/-/tape-4.13.3.tgz#51b3d91c83668c7a45b1a594b607dee0a0b46278" @@ -9950,11 +10201,12 @@ ts-generator@^0.1.1: ts-essentials "^1.0.0" ts-node@^9.0.0: - version "9.0.0" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-9.0.0.tgz#e7699d2a110cc8c0d3b831715e417688683460b3" - integrity sha512-/TqB4SnererCDR/vb4S/QvSZvzQMJN8daAslg7MeaiHvD8rDZsSfXmNeNumyZZzMned72Xoq/isQljYSt8Ynfg== + version "9.1.1" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-9.1.1.tgz#51a9a450a3e959401bda5f004a72d54b936d376d" + integrity sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg== dependencies: arg "^4.1.0" + create-require "^1.1.0" diff "^4.0.1" make-error "^1.1.1" source-map-support "^0.5.17" @@ -9965,15 +10217,20 @@ tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== +tslib@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.2.0.tgz#fb2c475977e35e241311ede2693cee1ec6698f5c" + integrity sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w== + tsort@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/tsort/-/tsort-0.0.1.tgz#e2280f5e817f8bf4275657fd0f9aebd44f5a2786" integrity sha1-4igPXoF/i/QnVlf9D5rr1E9aJ4Y= tsutils@^3.17.1: - version "3.17.1" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.17.1.tgz#ed719917f11ca0dee586272b2ac49e015a2dd759" - integrity sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g== + version "3.21.0" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" + integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== dependencies: tslib "^1.8.1" @@ -10018,6 +10275,11 @@ type-detect@4.0.8, type-detect@^4.0.0, type-detect@^4.0.5, type-detect@^4.0.8: resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== +type-fest@^0.20.2: + version "0.20.2" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" + integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== + type-fest@^0.21.3: version "0.21.3" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" @@ -10047,9 +10309,9 @@ type@^1.0.1: integrity sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg== type@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/type/-/type-2.1.0.tgz#9bdc22c648cf8cf86dd23d32336a41cfb6475e3f" - integrity sha512-G9absDWvhAWCV2gmF1zKud3OyC61nZDwWvBL2DApaVFogI07CprggiQAOOjvp2NRjYWFzPyu7vwtDrQFq8jeSA== + version "2.5.0" + resolved "https://registry.yarnpkg.com/type/-/type-2.5.0.tgz#0a2e78c2e77907b252abe5f298c1b01c63f0db3d" + integrity sha512-180WMDQaIMm3+7hGXWf12GtdniDEy7nYcyFMKJn/eZz/6tSLXrUN9V0wKSbMjej0I1WHWbpREDEKHtqPQa9NNw== typechain@^3.0.0: version "3.0.0" @@ -10065,9 +10327,9 @@ typechain@^3.0.0: ts-generator "^0.1.1" typechain@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/typechain/-/typechain-4.0.2.tgz#31a961bf1fc43b8cde39193247439715e43ce5d3" - integrity sha512-SopnfdQrS5ek6sTbvymsnBACA+70FstX/ZLWY8lQWNdLUXGyoGFoa73Y+1hKlbz2DfCnO39bQ551qUMhk5GYSw== + version "4.0.3" + resolved "https://registry.yarnpkg.com/typechain/-/typechain-4.0.3.tgz#e8fcd6c984676858c64eeeb155ea783a10b73779" + integrity sha512-tmoHQeXZWHxIdeLK+i6dU0CU0vOd9Cndr3jFTZIMzak5/YpFZ8XoiYpTZcngygGBqZo+Z1EUmttLbW9KkFZLgQ== dependencies: command-line-args "^4.0.7" debug "^4.1.1" @@ -10090,9 +10352,9 @@ typedarray@^0.0.6: integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= typescript@^4.0.5: - version "4.0.5" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.0.5.tgz#ae9dddfd1069f1cb5beb3ef3b2170dd7c1332389" - integrity sha512-ywmr/VrTVCmNTJ6iV2LwIrfG1P+lv6luD8sUJs+2eI9NLGigaN+nUQc13iHqisq7bra9lnmUSYqbJvegraBOPQ== + version "4.3.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.2.tgz#399ab18aac45802d6f2498de5054fcbbe716a805" + integrity sha512-zZ4hShnmnoVnAHpVHWpTcxdv7dWP60S2FsydQLV8V5PbS3FifjWFFRiHSWpDJahly88PRyV5teTSLoq4eG7mKw== typewise-core@^1.2, typewise-core@^1.2.0: version "1.2.0" @@ -10117,24 +10379,29 @@ typical@^2.6.0, typical@^2.6.1: integrity sha1-XAgOXWYcu+OCWdLnCjxyU+hziB0= uglify-js@^3.1.4: - version "3.12.8" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.12.8.tgz#a82e6e53c9be14f7382de3d068ef1e26e7d4aaf8" - integrity sha512-fvBeuXOsvqjecUtF/l1dwsrrf5y2BCUk9AOJGzGcm6tE7vegku5u/YvqjyDaAGr422PLoLnrxg3EnRvTqsdC1w== + version "3.13.8" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.13.8.tgz#7c2f9f2553f611f3ff592bdc19c6fb208dc60afb" + integrity sha512-PvFLMFIQHfIjFFlvAch69U2IvIxK9TNzNWt1SxZGp9JZ/v70yvqIQuiJeVPPtUMOzoNt+aNRDk4wgxb34wvEqA== ultron@~1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.1.tgz#9fe1536a10a664a65266a1e3ccf85fd36302bc9c" integrity sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og== -unbox-primitive@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.0.tgz#eeacbc4affa28e9b3d36b5eaeccc50b3251b1d3f" - integrity sha512-P/51NX+JXyxK/aigg1/ZgyccdAxm5K1+n8+tvqSntjOivPt19gvm1VC49RWYetsiub8WViUchdxl/KWHHB0kzA== +unbox-primitive@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.1.tgz#085e215625ec3162574dc8859abee78a59b14471" + integrity sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw== dependencies: function-bind "^1.1.1" - has-bigints "^1.0.0" - has-symbols "^1.0.0" - which-boxed-primitive "^1.0.1" + has-bigints "^1.0.1" + has-symbols "^1.0.2" + which-boxed-primitive "^1.0.2" + +underscore@1.12.1: + version "1.12.1" + resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.12.1.tgz#7bb8cc9b3d397e201cf8553336d262544ead829e" + integrity sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw== underscore@1.9.1: version "1.9.1" @@ -10142,9 +10409,9 @@ underscore@1.9.1: integrity sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg== underscore@^1.8.3: - version "1.12.1" - resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.12.1.tgz#7bb8cc9b3d397e201cf8553336d262544ead829e" - integrity sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw== + version "1.13.1" + resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.13.1.tgz#0c1c6bd2df54b6b69f2314066d65b6cde6fcf9d1" + integrity sha512-hzSoAVtJF+3ZtiFX0VgfFPHEDRm7Y/QPjGyNo4TVdnDTdft3tr8hEkD25a1jC+TjTuE7tkHGKkhwCgs9dgBB2g== union-value@^1.0.0: version "1.0.1" @@ -10161,10 +10428,10 @@ universalify@^0.1.0: resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== -universalify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-1.0.0.tgz#b61a1da173e8435b2fe3c67d29b9adf8594bd16d" - integrity sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug== +universalify@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" + integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== unorm@^1.3.3: version "1.6.0" @@ -10185,9 +10452,9 @@ unset-value@^1.0.0: isobject "^3.0.0" uri-js@^4.2.2: - version "4.4.0" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.0.tgz#aa714261de793e8a82347a7bcc9ce74e86f28602" - integrity sha512-B0yRTzYdUCCn9n+F4+Gh4yIDtMQcaJsmYBDsTSG8g/OejKBodLQ2IHfN3bM7jUsRXndopT7OIXWdYqc1fjmV6g== + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== dependencies: punycode "^2.1.0" @@ -10234,11 +10501,11 @@ use@^3.1.0: integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== utf-8-validate@^5.0.2: - version "5.0.2" - resolved "https://registry.yarnpkg.com/utf-8-validate/-/utf-8-validate-5.0.2.tgz#63cfbccd85dc1f2b66cf7a1d0eebc08ed056bfb3" - integrity sha512-SwV++i2gTD5qh2XqaPzBnNX88N6HdyhQrNNRykvcS0QKvItV9u3vPEJr+X5Hhfb1JC0r0e1alL0iB09rY8+nmw== + version "5.0.5" + resolved "https://registry.yarnpkg.com/utf-8-validate/-/utf-8-validate-5.0.5.tgz#dd32c2e82c72002dc9f02eb67ba6761f43456ca1" + integrity sha512-+pnxRYsS/axEpkrrEpzYfNZGXp0IjC/9RIxwM5gntY4Koi8SHmUGSfxfWqxZdRxrtaoVstuOzUp/rbs3JSPELQ== dependencies: - node-gyp-build "~3.7.0" + node-gyp-build "^4.2.0" utf8@3.0.0, utf8@^3.0.0: version "3.0.0" @@ -10250,7 +10517,7 @@ util-deprecate@^1.0.1, util-deprecate@~1.0.1: resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= -util.promisify@^1.0.0: +util.promisify@^1.0.0, util.promisify@^1.0.1: version "1.1.1" resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.1.1.tgz#77832f57ced2c9478174149cae9b96e9918cd54b" integrity sha512-/s3UsZUrIfa6xDhr7zZhnE9SLQ5RIXyYfiVnMMyMDzOc8WhWN4Nbh36H842OyurKbCDAesZOJaVyvmSl6fhGQw== @@ -10294,9 +10561,9 @@ uuid@^3.3.2: integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== v8-compile-cache@^2.0.3: - version "2.1.1" - resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.1.1.tgz#54bc3cdd43317bca91e35dcaf305b1a7237de745" - integrity sha512-8OQ9CL+VWyt3JStj7HX7/ciTL2V3Rl1Wf5OL+SNTm0yK1KvtReVulksyeRnCANHHuUxHlQig+JJDlUhBt1NQDQ== + version "2.3.0" + resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" + integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== validate-npm-package-license@^3.0.1: version "3.0.4" @@ -10335,25 +10602,15 @@ web3-bzz@1.2.11: swarm-js "^0.1.40" underscore "1.9.1" -web3-bzz@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.2.9.tgz#25f8a373bc2dd019f47bf80523546f98b93c8790" - integrity sha512-ogVQr9jHodu9HobARtvUSmWG22cv2EUQzlPeejGWZ7j5h20HX40EDuWyomGY5VclIj5DdLY76Tmq88RTf/6nxA== - dependencies: - "@types/node" "^10.12.18" - got "9.6.0" - swarm-js "^0.1.40" - underscore "1.9.1" - -web3-bzz@1.3.4: - version "1.3.4" - resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.3.4.tgz#9be529353c4063bc68395370cb5d8e414c6b6c87" - integrity sha512-DBRVQB8FAgoAtZCpp2GAGPCJjgBgsuwOKEasjV044AAZiONpXcKHbkO6G1SgItIixnrJsRJpoGLGw52Byr6FKw== +web3-bzz@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.3.6.tgz#95f370aecc3ff6ad07f057e6c0c916ef09b04dde" + integrity sha512-ibHdx1wkseujFejrtY7ZyC0QxQ4ATXjzcNUpaLrvM6AEae8prUiyT/OloG9FWDgFD2CPLwzKwfSQezYQlANNlw== dependencies: "@types/node" "^12.12.6" got "9.6.0" swarm-js "^0.1.40" - underscore "1.9.1" + underscore "1.12.1" web3-core-helpers@1.2.11: version "1.2.11" @@ -10364,23 +10621,14 @@ web3-core-helpers@1.2.11: web3-eth-iban "1.2.11" web3-utils "1.2.11" -web3-core-helpers@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.2.9.tgz#6381077c3e01c127018cb9e9e3d1422697123315" - integrity sha512-t0WAG3orLCE3lqi77ZoSRNFok3VQWZXTniZigDQjyOJYMAX7BU3F3js8HKbjVnAxlX3tiKoDxI0KBk9F3AxYuw== - dependencies: - underscore "1.9.1" - web3-eth-iban "1.2.9" - web3-utils "1.2.9" - -web3-core-helpers@1.3.4: - version "1.3.4" - resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.3.4.tgz#b8549740bf24d5c71688d89c3cdd802d8d36b4e4" - integrity sha512-n7BqDalcTa1stncHMmrnFtyTgDhX5Fy+avNaHCf6qcOP2lwTQC8+mdHVBONWRJ6Yddvln+c8oY/TAaB6PzWK0A== +web3-core-helpers@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.3.6.tgz#c478246a9abe4e5456acf42657dac2f7c330be74" + integrity sha512-nhtjA2ZbkppjlxTSwG0Ttu6FcPkVu1rCN5IFAOVpF/L0SEt+jy+O5l90+cjDq0jAYvlBwUwnbh2mR9hwDEJCNA== dependencies: - underscore "1.9.1" - web3-eth-iban "1.3.4" - web3-utils "1.3.4" + underscore "1.12.1" + web3-eth-iban "1.3.6" + web3-utils "1.3.6" web3-core-method@1.2.11: version "1.2.11" @@ -10394,29 +10642,17 @@ web3-core-method@1.2.11: web3-core-subscriptions "1.2.11" web3-utils "1.2.11" -web3-core-method@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.2.9.tgz#3fb538751029bea570e4f86731e2fa5e4945e462" - integrity sha512-bjsIoqP3gs7A/gP8+QeLUCyOKJ8bopteCSNbCX36Pxk6TYfYWNuC6hP+2GzUuqdP3xaZNe+XEElQFUNpR3oyAg== - dependencies: - "@ethersproject/transactions" "^5.0.0-beta.135" - underscore "1.9.1" - web3-core-helpers "1.2.9" - web3-core-promievent "1.2.9" - web3-core-subscriptions "1.2.9" - web3-utils "1.2.9" - -web3-core-method@1.3.4: - version "1.3.4" - resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.3.4.tgz#6c2812d96dd6c811b9e6c8a5d25050d2c22b9527" - integrity sha512-JxmQrujsAWYRRN77P/RY7XuZDCzxSiiQJrgX/60Lfyf7FF1Y0le4L/UMCi7vUJnuYkbU1Kfl9E0udnqwyPqlvQ== +web3-core-method@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.3.6.tgz#4b0334edd94b03dfec729d113c69a4eb6ebc68ae" + integrity sha512-RyegqVGxn0cyYW5yzAwkPlsSEynkdPiegd7RxgB4ak1eKk2Cv1q2x4C7D2sZjeeCEF+q6fOkVmo2OZNqS2iQxg== dependencies: "@ethersproject/transactions" "^5.0.0-beta.135" - underscore "1.9.1" - web3-core-helpers "1.3.4" - web3-core-promievent "1.3.4" - web3-core-subscriptions "1.3.4" - web3-utils "1.3.4" + underscore "1.12.1" + web3-core-helpers "1.3.6" + web3-core-promievent "1.3.6" + web3-core-subscriptions "1.3.6" + web3-utils "1.3.6" web3-core-promievent@1.2.11: version "1.2.11" @@ -10425,17 +10661,10 @@ web3-core-promievent@1.2.11: dependencies: eventemitter3 "4.0.4" -web3-core-promievent@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.2.9.tgz#bb1c56aa6fac2f4b3c598510f06554d25c11c553" - integrity sha512-0eAUA2zjgXTleSrnc1wdoKQPPIHU6KHf4fAscu4W9kKrR+mqP1KsjYrxY9wUyjNnXxfQ+5M29ipvbiaK8OqdOw== - dependencies: - eventemitter3 "3.1.2" - -web3-core-promievent@1.3.4: - version "1.3.4" - resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.3.4.tgz#d166239012d91496cdcbe91d5d54071ea818bc73" - integrity sha512-V61dZIeBwogg6hhZZUt0qL9hTp1WDhnsdjP++9fhTDr4vy/Gz8T5vibqT2LLg6lQC8i+Py33yOpMeMNjztaUaw== +web3-core-promievent@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.3.6.tgz#6c27dc79de8f71b74f5d17acaf9aaf593d3cb0c9" + integrity sha512-Z+QzfyYDTXD5wJmZO5wwnRO8bAAHEItT1XNSPVb4J1CToV/I/SbF7CuF8Uzh2jns0Cm1109o666H7StFFvzVKw== dependencies: eventemitter3 "4.0.4" @@ -10450,28 +10679,17 @@ web3-core-requestmanager@1.2.11: web3-providers-ipc "1.2.11" web3-providers-ws "1.2.11" -web3-core-requestmanager@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.2.9.tgz#dd6d855256c4dd681434fe0867f8cd742fe10503" - integrity sha512-1PwKV2m46ALUnIN5VPPgjOj8yMLJhhqZYvYJE34hTN5SErOkwhzx5zScvo5MN7v7KyQGFnpVCZKKGCiEnDmtFA== - dependencies: - underscore "1.9.1" - web3-core-helpers "1.2.9" - web3-providers-http "1.2.9" - web3-providers-ipc "1.2.9" - web3-providers-ws "1.2.9" - -web3-core-requestmanager@1.3.4: - version "1.3.4" - resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.3.4.tgz#e105ced735c2b5fcedd5771e0ecf9879ae9c373f" - integrity sha512-xriouCrhVnVDYQ04TZXdEREZm0OOJzkSEsoN5bu4JYsA6e/HzROeU+RjDpMUxFMzN4wxmFZ+HWbpPndS3QwMag== +web3-core-requestmanager@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.3.6.tgz#4fea269fe913fd4fca464b4f7c65cb94857b5b2a" + integrity sha512-2rIaeuqeo7QN1Eex7aXP0ZqeteJEPWXYFS/M3r3LXMiV8R4STQBKE+//dnHJXoo2ctzEB5cgd+7NaJM8S3gPyA== dependencies: - underscore "1.9.1" + underscore "1.12.1" util "^0.12.0" - web3-core-helpers "1.3.4" - web3-providers-http "1.3.4" - web3-providers-ipc "1.3.4" - web3-providers-ws "1.3.4" + web3-core-helpers "1.3.6" + web3-providers-http "1.3.6" + web3-providers-ipc "1.3.6" + web3-providers-ws "1.3.6" web3-core-subscriptions@1.2.11: version "1.2.11" @@ -10482,23 +10700,14 @@ web3-core-subscriptions@1.2.11: underscore "1.9.1" web3-core-helpers "1.2.11" -web3-core-subscriptions@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.2.9.tgz#335fd7d15dfce5d78b4b7bef05ce4b3d7237b0e4" - integrity sha512-Y48TvXPSPxEM33OmXjGVDMzTd0j8X0t2+sDw66haeBS8eYnrEzasWuBZZXDq0zNUsqyxItgBGDn+cszkgEnFqg== - dependencies: - eventemitter3 "3.1.2" - underscore "1.9.1" - web3-core-helpers "1.2.9" - -web3-core-subscriptions@1.3.4: - version "1.3.4" - resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.3.4.tgz#7b00e92bde21f792620cd02e6e508fcf4f4c31d3" - integrity sha512-drVHVDxh54hv7xmjIm44g4IXjfGj022fGw4/meB5R2D8UATFI40F73CdiBlyqk3DysP9njDOLTJFSQvEkLFUOg== +web3-core-subscriptions@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.3.6.tgz#ee24e7974d1d72ff6c992c599deba4ef9b308415" + integrity sha512-wi9Z9X5X75OKvxAg42GGIf81ttbNR2TxzkAsp1g+nnp5K8mBwgZvXrIsDuj7Z7gx72Y45mWJADCWjk/2vqNu8g== dependencies: eventemitter3 "4.0.4" - underscore "1.9.1" - web3-core-helpers "1.3.4" + underscore "1.12.1" + web3-core-helpers "1.3.6" web3-core@1.2.11: version "1.2.11" @@ -10513,31 +10722,18 @@ web3-core@1.2.11: web3-core-requestmanager "1.2.11" web3-utils "1.2.11" -web3-core@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.2.9.tgz#2cba57aa259b6409db532d21bdf57db8d504fd3e" - integrity sha512-fSYv21IP658Ty2wAuU9iqmW7V+75DOYMVZsDH/c14jcF/1VXnedOcxzxSj3vArsCvXZNe6XC5/wAuGZyQwR9RA== - dependencies: - "@types/bn.js" "^4.11.4" - "@types/node" "^12.6.1" - bignumber.js "^9.0.0" - web3-core-helpers "1.2.9" - web3-core-method "1.2.9" - web3-core-requestmanager "1.2.9" - web3-utils "1.2.9" - -web3-core@1.3.4: - version "1.3.4" - resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.3.4.tgz#2cc7ba7f35cc167f7a0a46fd5855f86e51d34ce8" - integrity sha512-7OJu46RpCEfTerl+gPvHXANR2RkLqAfW7l2DAvQ7wN0pnCzl9nEfdgW6tMhr31k3TR2fWucwKzCyyxMGzMHeSA== +web3-core@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.3.6.tgz#a6a761d1ff2f3ee462b8dab679229d2f8e267504" + integrity sha512-gkLDM4T1Sc0T+HZIwxrNrwPg0IfWI0oABSglP2X5ZbBAYVUeEATA0o92LWV8BeF+okvKXLK1Fek/p6axwM/h3Q== dependencies: "@types/bn.js" "^4.11.5" "@types/node" "^12.12.6" bignumber.js "^9.0.0" - web3-core-helpers "1.3.4" - web3-core-method "1.3.4" - web3-core-requestmanager "1.3.4" - web3-utils "1.3.4" + web3-core-helpers "1.3.6" + web3-core-method "1.3.6" + web3-core-requestmanager "1.3.6" + web3-utils "1.3.6" web3-eth-abi@1.2.11: version "1.2.11" @@ -10548,23 +10744,14 @@ web3-eth-abi@1.2.11: underscore "1.9.1" web3-utils "1.2.11" -web3-eth-abi@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.2.9.tgz#14bedd7e4be04fcca35b2ac84af1400574cd8280" - integrity sha512-3YwUYbh/DMfDbhMWEebAdjSd5bj3ZQieOjLzWFHU23CaLEqT34sUix1lba+hgUH/EN6A7bKAuKOhR3p0OvTn7Q== - dependencies: - "@ethersproject/abi" "5.0.0-beta.153" - underscore "1.9.1" - web3-utils "1.2.9" - -web3-eth-abi@1.3.4: - version "1.3.4" - resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.3.4.tgz#10f5d8b6080dbb6cbaa1bcef7e0c70573da6566f" - integrity sha512-PVSLXJ2dzdXsC+R24llIIEOS6S1KhG5qwNznJjJvXZFe3sqgdSe47eNvwUamZtCBjcrdR/HQr+L/FTxqJSf80Q== +web3-eth-abi@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.3.6.tgz#4272ca48d817aa651bbf97b269f5ff10abc2b8a9" + integrity sha512-Or5cRnZu6WzgScpmbkvC6bfNxR26hqiKK4i8sMPFeTUABQcb/FU3pBj7huBLYbp9dH+P5W79D2MqwbWwjj9DoQ== dependencies: "@ethersproject/abi" "5.0.7" - underscore "1.9.1" - web3-utils "1.3.4" + underscore "1.12.1" + web3-utils "1.3.6" web3-eth-accounts@1.2.11: version "1.2.11" @@ -10583,39 +10770,22 @@ web3-eth-accounts@1.2.11: web3-core-method "1.2.11" web3-utils "1.2.11" -web3-eth-accounts@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.2.9.tgz#7ec422df90fecb5243603ea49dc28726db7bdab6" - integrity sha512-jkbDCZoA1qv53mFcRHCinoCsgg8WH+M0YUO1awxmqWXRmCRws1wW0TsuSQ14UThih5Dxolgl+e+aGWxG58LMwg== - dependencies: - crypto-browserify "3.12.0" - eth-lib "^0.2.8" - ethereumjs-common "^1.3.2" - ethereumjs-tx "^2.1.1" - scrypt-js "^3.0.1" - underscore "1.9.1" - uuid "3.3.2" - web3-core "1.2.9" - web3-core-helpers "1.2.9" - web3-core-method "1.2.9" - web3-utils "1.2.9" - -web3-eth-accounts@1.3.4: - version "1.3.4" - resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.3.4.tgz#cf513d78531c13ce079a5e7862820570350e79a5" - integrity sha512-gz9ReSmQEjqbYAjpmAx+UZF4CVMbyS4pfjSYWGAnNNI+Xz0f0u0kCIYXQ1UEaE+YeLcYiE+ZlZdgg6YoatO5nA== +web3-eth-accounts@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.3.6.tgz#f9fcb50b28ee58090ab292a10d996155caa2b474" + integrity sha512-Ilr0hG6ONbCdSlVKffasCmNwftD5HsNpwyQASevocIQwHdTlvlwO0tb3oGYuajbKOaDzNTwXfz25bttAEoFCGA== dependencies: crypto-browserify "3.12.0" eth-lib "0.2.8" ethereumjs-common "^1.3.2" ethereumjs-tx "^2.1.1" scrypt-js "^3.0.1" - underscore "1.9.1" + underscore "1.12.1" uuid "3.3.2" - web3-core "1.3.4" - web3-core-helpers "1.3.4" - web3-core-method "1.3.4" - web3-utils "1.3.4" + web3-core "1.3.6" + web3-core-helpers "1.3.6" + web3-core-method "1.3.6" + web3-utils "1.3.6" web3-eth-contract@1.2.11: version "1.2.11" @@ -10632,35 +10802,20 @@ web3-eth-contract@1.2.11: web3-eth-abi "1.2.11" web3-utils "1.2.11" -web3-eth-contract@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.2.9.tgz#713d9c6d502d8c8f22b696b7ffd8e254444e6bfd" - integrity sha512-PYMvJf7EG/HyssUZa+pXrc8IB06K/YFfWYyW4R7ed3sab+9wWUys1TlWxBCBuiBXOokSAyM6H6P6/cKEx8FT8Q== - dependencies: - "@types/bn.js" "^4.11.4" - underscore "1.9.1" - web3-core "1.2.9" - web3-core-helpers "1.2.9" - web3-core-method "1.2.9" - web3-core-promievent "1.2.9" - web3-core-subscriptions "1.2.9" - web3-eth-abi "1.2.9" - web3-utils "1.2.9" - -web3-eth-contract@1.3.4: - version "1.3.4" - resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.3.4.tgz#1ea2dd71be0c4a9cf4772d4f75dbb2fa99751472" - integrity sha512-Fvy8ZxUksQY2ePt+XynFfOiSqxgQtMn4m2NJs6VXRl2Inl17qyRi/nIJJVKTcENLocm+GmZ/mxq2eOE5u02nPg== +web3-eth-contract@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.3.6.tgz#cccf4d32dc56917fb6923e778498a9ba2a5ba866" + integrity sha512-8gDaRrLF2HCg+YEZN1ov0zN35vmtPnGf3h1DxmJQK5Wm2lRMLomz9rsWsuvig3UJMHqZAQKD7tOl3ocJocQsmA== dependencies: "@types/bn.js" "^4.11.5" - underscore "1.9.1" - web3-core "1.3.4" - web3-core-helpers "1.3.4" - web3-core-method "1.3.4" - web3-core-promievent "1.3.4" - web3-core-subscriptions "1.3.4" - web3-eth-abi "1.3.4" - web3-utils "1.3.4" + underscore "1.12.1" + web3-core "1.3.6" + web3-core-helpers "1.3.6" + web3-core-method "1.3.6" + web3-core-promievent "1.3.6" + web3-core-subscriptions "1.3.6" + web3-eth-abi "1.3.6" + web3-utils "1.3.6" web3-eth-ens@1.2.11: version "1.2.11" @@ -10677,35 +10832,20 @@ web3-eth-ens@1.2.11: web3-eth-contract "1.2.11" web3-utils "1.2.11" -web3-eth-ens@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.2.9.tgz#577b9358c036337833fb2bdc59c11be7f6f731b6" - integrity sha512-kG4+ZRgZ8I1WYyOBGI8QVRHfUSbbJjvJAGA1AF/NOW7JXQ+x7gBGeJw6taDWJhSshMoEKWcsgvsiuoG4870YxQ== - dependencies: - content-hash "^2.5.2" - eth-ens-namehash "2.0.8" - underscore "1.9.1" - web3-core "1.2.9" - web3-core-helpers "1.2.9" - web3-core-promievent "1.2.9" - web3-eth-abi "1.2.9" - web3-eth-contract "1.2.9" - web3-utils "1.2.9" - -web3-eth-ens@1.3.4: - version "1.3.4" - resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.3.4.tgz#a7e4bb18481fb0e2ce5bfb3b3da2fbb0ad78cefe" - integrity sha512-b0580tQyQwpV2wyacwQiBEfQmjCUln5iPhge3IBIMXaI43BUNtH3lsCL9ERFQeOdweB4o+6rYyNYr6xbRcSytg== +web3-eth-ens@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.3.6.tgz#0d28c5d4ea7b4462ef6c077545a77956a6cdf175" + integrity sha512-n27HNj7lpSkRxTgSx+Zo7cmKAgyg2ElFilaFlUu/X2CNH23lXfcPm2bWssivH9z0ndhg0OyR4AYFZqPaqDHkJA== dependencies: content-hash "^2.5.2" eth-ens-namehash "2.0.8" - underscore "1.9.1" - web3-core "1.3.4" - web3-core-helpers "1.3.4" - web3-core-promievent "1.3.4" - web3-eth-abi "1.3.4" - web3-eth-contract "1.3.4" - web3-utils "1.3.4" + underscore "1.12.1" + web3-core "1.3.6" + web3-core-helpers "1.3.6" + web3-core-promievent "1.3.6" + web3-eth-abi "1.3.6" + web3-eth-contract "1.3.6" + web3-utils "1.3.6" web3-eth-iban@1.2.11: version "1.2.11" @@ -10715,21 +10855,13 @@ web3-eth-iban@1.2.11: bn.js "^4.11.9" web3-utils "1.2.11" -web3-eth-iban@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.2.9.tgz#4ebf3d8783f34d04c4740dc18938556466399f7a" - integrity sha512-RtdVvJE0pyg9dHLy0GzDiqgnLnssSzfz/JYguhC1wsj9+Gnq1M6Diy3NixACWUAp6ty/zafyOaZnNQ+JuH9TjQ== - dependencies: - bn.js "4.11.8" - web3-utils "1.2.9" - -web3-eth-iban@1.3.4: - version "1.3.4" - resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.3.4.tgz#5eb7a564e0dcf68730d68f48f95dd207cd173d81" - integrity sha512-Y7/hLjVvIN/OhaAyZ8L/hxbTqVX6AFTl2RwUXR6EEU9oaLydPcMjAx/Fr8mghUvQS3QJSr+UGubP3W4SkyNiYw== +web3-eth-iban@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.3.6.tgz#0d6ba21fe78f190af8919e9cd5453882457209e0" + integrity sha512-nfMQaaLA/zsg5W4Oy/EJQbs8rSs1vBAX6b/35xzjYoutXlpHMQadujDx2RerTKhSHqFXSJeQAfE+2f6mdhYkRQ== dependencies: bn.js "^4.11.9" - web3-utils "1.3.4" + web3-utils "1.3.6" web3-eth-personal@1.2.11: version "1.2.11" @@ -10743,29 +10875,17 @@ web3-eth-personal@1.2.11: web3-net "1.2.11" web3-utils "1.2.11" -web3-eth-personal@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.2.9.tgz#9b95eb159b950b83cd8ae15873e1d57711b7a368" - integrity sha512-cFiNrktxZ1C/rIdJFzQTvFn3/0zcsR3a+Jf8Y3KxeQDHszQtosjLWptP7bsUmDwEh4hzh0Cy3KpOxlYBWB8bJQ== - dependencies: - "@types/node" "^12.6.1" - web3-core "1.2.9" - web3-core-helpers "1.2.9" - web3-core-method "1.2.9" - web3-net "1.2.9" - web3-utils "1.2.9" - -web3-eth-personal@1.3.4: - version "1.3.4" - resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.3.4.tgz#0d0e0abea3447283d7ee5658ed312990c9bf48dd" - integrity sha512-JiTbaktYVk1j+S2EDooXAhw5j/VsdvZfKRmHtXUe/HizPM9ETXmj1+ne4RT6m+950jQ7DJwUF3XU1FKYNtEDwQ== +web3-eth-personal@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.3.6.tgz#226137916754c498f0284f22c55924c87a2efcf0" + integrity sha512-pOHU0+/h1RFRYoh1ehYBehRbcKWP4OSzd4F7mDljhHngv6W8ewMHrAN8O1ol9uysN2MuCdRE19qkRg5eNgvzFQ== dependencies: "@types/node" "^12.12.6" - web3-core "1.3.4" - web3-core-helpers "1.3.4" - web3-core-method "1.3.4" - web3-net "1.3.4" - web3-utils "1.3.4" + web3-core "1.3.6" + web3-core-helpers "1.3.6" + web3-core-method "1.3.6" + web3-net "1.3.6" + web3-utils "1.3.6" web3-eth@1.2.11: version "1.2.11" @@ -10786,43 +10906,24 @@ web3-eth@1.2.11: web3-net "1.2.11" web3-utils "1.2.11" -web3-eth@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.2.9.tgz#e40e7b88baffc9b487193211c8b424dc944977b3" - integrity sha512-sIKO4iE9FEBa/CYUd6GdPd7GXt/wISqxUd8PlIld6+hvMJj02lgO7Z7p5T9mZIJcIZJGvZX81ogx8oJ9yif+Ag== - dependencies: - underscore "1.9.1" - web3-core "1.2.9" - web3-core-helpers "1.2.9" - web3-core-method "1.2.9" - web3-core-subscriptions "1.2.9" - web3-eth-abi "1.2.9" - web3-eth-accounts "1.2.9" - web3-eth-contract "1.2.9" - web3-eth-ens "1.2.9" - web3-eth-iban "1.2.9" - web3-eth-personal "1.2.9" - web3-net "1.2.9" - web3-utils "1.2.9" - -web3-eth@1.3.4: - version "1.3.4" - resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.3.4.tgz#7c4607685e66a1c43e3e315e526c959f24f96907" - integrity sha512-8OIVMLbvmx+LB5RZ4tDhXuFGWSdNMrCZ4HM0+PywQ08uEcmAcqTMFAn4vdPii+J8gCatZR501r1KdzX3SDLoPw== - dependencies: - underscore "1.9.1" - web3-core "1.3.4" - web3-core-helpers "1.3.4" - web3-core-method "1.3.4" - web3-core-subscriptions "1.3.4" - web3-eth-abi "1.3.4" - web3-eth-accounts "1.3.4" - web3-eth-contract "1.3.4" - web3-eth-ens "1.3.4" - web3-eth-iban "1.3.4" - web3-eth-personal "1.3.4" - web3-net "1.3.4" - web3-utils "1.3.4" +web3-eth@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.3.6.tgz#2c650893d540a7a0eb1365dd5b2dca24ac919b7c" + integrity sha512-9+rnywRRpyX3C4hfsAQXPQh6vHh9XzQkgLxo3gyeXfbhbShUoq2gFVuy42vsRs//6JlsKdyZS7Z3hHPHz2wreA== + dependencies: + underscore "1.12.1" + web3-core "1.3.6" + web3-core-helpers "1.3.6" + web3-core-method "1.3.6" + web3-core-subscriptions "1.3.6" + web3-eth-abi "1.3.6" + web3-eth-accounts "1.3.6" + web3-eth-contract "1.3.6" + web3-eth-ens "1.3.6" + web3-eth-iban "1.3.6" + web3-eth-personal "1.3.6" + web3-net "1.3.6" + web3-utils "1.3.6" web3-net@1.2.11: version "1.2.11" @@ -10833,23 +10934,14 @@ web3-net@1.2.11: web3-core-method "1.2.11" web3-utils "1.2.11" -web3-net@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.2.9.tgz#51d248ed1bc5c37713c4ac40c0073d9beacd87d3" - integrity sha512-d2mTn8jPlg+SI2hTj2b32Qan6DmtU9ap/IUlJTeQbZQSkTLf0u9suW8Vjwyr4poJYXTurdSshE7OZsPNn30/ZA== - dependencies: - web3-core "1.2.9" - web3-core-method "1.2.9" - web3-utils "1.2.9" - -web3-net@1.3.4: - version "1.3.4" - resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.3.4.tgz#d76158bf0b4a7b3b14352b4f95472db9efc57a2a" - integrity sha512-wVyqgVC3Zt/0uGnBiR3GpnsS8lvOFTDgWZMxAk9C6Guh8aJD9MUc7pbsw5rHrPUVe6S6RUfFJvh/Xq8oMIQgSw== +web3-net@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.3.6.tgz#a56492e2227475e38db29394f8bac305a2446e41" + integrity sha512-KhzU3wMQY/YYjyMiQzbaLPt2kut88Ncx2iqjy3nw28vRux3gVX0WOCk9EL/KVJBiAA/fK7VklTXvgy9dZnnipw== dependencies: - web3-core "1.3.4" - web3-core-method "1.3.4" - web3-utils "1.3.4" + web3-core "1.3.6" + web3-core-method "1.3.6" + web3-utils "1.3.6" web3-provider-engine@14.2.1: version "14.2.1" @@ -10885,20 +10977,12 @@ web3-providers-http@1.2.11: web3-core-helpers "1.2.11" xhr2-cookies "1.1.0" -web3-providers-http@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.2.9.tgz#e698aa5377e2019c24c5a1e6efa0f51018728934" - integrity sha512-F956tCIj60Ttr0UvEHWFIhx+be3He8msoPzyA44/kfzzYoMAsCFRn5cf0zQG6al0znE75g6HlWVSN6s3yAh51A== - dependencies: - web3-core-helpers "1.2.9" - xhr2-cookies "1.1.0" - -web3-providers-http@1.3.4: - version "1.3.4" - resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.3.4.tgz#89389e18e27148faa2fef58842740ffadbdda8cc" - integrity sha512-aIg/xHXvxpqpFU70sqfp+JC3sGkLfAimRKTUhG4oJZ7U+tTcYTHoxBJj+4A3Id4JAoKiiv0k1/qeyQ8f3rMC3g== +web3-providers-http@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.3.6.tgz#36e8724a7424d52827819d53fd75dbf31f5422c2" + integrity sha512-OQkT32O1A06dISIdazpGLveZcOXhEo5cEX6QyiSQkiPk/cjzDrXMw4SKZOGQbbS1+0Vjizm1Hrp7O8Vp2D1M5Q== dependencies: - web3-core-helpers "1.3.4" + web3-core-helpers "1.3.6" xhr2-cookies "1.1.0" web3-providers-ipc@1.2.11: @@ -10910,23 +10994,14 @@ web3-providers-ipc@1.2.11: underscore "1.9.1" web3-core-helpers "1.2.11" -web3-providers-ipc@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.2.9.tgz#6159eacfcd7ac31edc470d93ef10814fe874763b" - integrity sha512-NQ8QnBleoHA2qTJlqoWu7EJAD/FR5uimf7Ielzk4Z2z+m+6UAuJdJMSuQNj+Umhz9L/Ys6vpS1vHx9NizFl+aQ== - dependencies: - oboe "2.1.4" - underscore "1.9.1" - web3-core-helpers "1.2.9" - -web3-providers-ipc@1.3.4: - version "1.3.4" - resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.3.4.tgz#b963518989b1b7847063cdd461ff73b83855834a" - integrity sha512-E0CvXEJElr/TIlG1YfJeO3Le5NI/4JZM+1SsEdiPIfBUAJN18oOoum138EBGKv5+YaLKZUtUuJSXWjIIOR/0Ig== +web3-providers-ipc@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.3.6.tgz#cef8d12c1ebb47adce5ebf597f553c623362cb4a" + integrity sha512-+TVsSd2sSVvVgHG4s6FXwwYPPT91boKKcRuEFXqEfAbUC5t52XOgmyc2LNiD9LzPhed65FbV4LqICpeYGUvSwA== dependencies: oboe "2.1.5" - underscore "1.9.1" - web3-core-helpers "1.3.4" + underscore "1.12.1" + web3-core-helpers "1.3.6" web3-providers-ws@1.2.11: version "1.2.11" @@ -10938,24 +11013,14 @@ web3-providers-ws@1.2.11: web3-core-helpers "1.2.11" websocket "^1.0.31" -web3-providers-ws@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.2.9.tgz#22c2006655ec44b4ad2b41acae62741a6ae7a88c" - integrity sha512-6+UpvINeI//dglZoAKStUXqxDOXJy6Iitv2z3dbgInG4zb8tkYl/VBDL80UjUg3ZvzWG0g7EKY2nRPEpON2TFA== - dependencies: - eventemitter3 "^4.0.0" - underscore "1.9.1" - web3-core-helpers "1.2.9" - websocket "^1.0.31" - -web3-providers-ws@1.3.4: - version "1.3.4" - resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.3.4.tgz#b94c2e0ec51a0c472abdec53a472b5bf8176bec1" - integrity sha512-WBd9hk2fUAdrbA3kUyUk94ZeILtE6txLeoVVvIKAw2bPegx+RjkLyxC1Du0oceKgQ/qQWod8CCzl1E/GgTP+MQ== +web3-providers-ws@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.3.6.tgz#e1df617bc89d66165abdf2191da0014c505bfaac" + integrity sha512-bk7MnJf5or0Re2zKyhR3L3CjGululLCHXx4vlbc/drnaTARUVvi559OI5uLytc/1k5HKUUyENAxLvetz2G1dnQ== dependencies: eventemitter3 "4.0.4" - underscore "1.9.1" - web3-core-helpers "1.3.4" + underscore "1.12.1" + web3-core-helpers "1.3.6" websocket "^1.0.32" web3-shh@1.2.11: @@ -10968,25 +11033,15 @@ web3-shh@1.2.11: web3-core-subscriptions "1.2.11" web3-net "1.2.11" -web3-shh@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.2.9.tgz#c4ba70d6142cfd61341a50752d8cace9a0370911" - integrity sha512-PWa8b/EaxaMinFaxy6cV0i0EOi2M7a/ST+9k9nhyhCjVa2vzXuNoBNo2IUOmeZ0WP2UQB8ByJ2+p4htlJaDOjA== - dependencies: - web3-core "1.2.9" - web3-core-method "1.2.9" - web3-core-subscriptions "1.2.9" - web3-net "1.2.9" - -web3-shh@1.3.4: - version "1.3.4" - resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.3.4.tgz#b7d29e118f26416c1a74575e585be379cc01a77a" - integrity sha512-zoeww5mxLh3xKcqbX85irQbtFe5pc5XwrgjvmdMkhkOdZzPASlWOgqzUFtaPykpLwC3yavVx4jG5RqifweXLUA== +web3-shh@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.3.6.tgz#4e3486c7eca5cbdb87f88910948223a5b7ea6c20" + integrity sha512-9zRo415O0iBslxBnmu9OzYjNErzLnzOsy+IOvSpIreLYbbAw0XkDWxv3SfcpKnTIWIACBR4AYMIxmmyi5iB3jw== dependencies: - web3-core "1.3.4" - web3-core-method "1.3.4" - web3-core-subscriptions "1.3.4" - web3-net "1.3.4" + web3-core "1.3.6" + web3-core-method "1.3.6" + web3-core-subscriptions "1.3.6" + web3-net "1.3.6" web3-utils@1.2.11: version "1.2.11" @@ -11002,21 +11057,21 @@ web3-utils@1.2.11: underscore "1.9.1" utf8 "3.0.0" -web3-utils@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.2.9.tgz#abe11735221627da943971ef1a630868fb9c61f3" - integrity sha512-9hcpuis3n/LxFzEVjwnVgvJzTirS2S9/MiNAa7l4WOEoywY+BSNwnRX4MuHnjkh9NY25B6QOjuNG6FNnSjTw1w== +web3-utils@1.3.6, web3-utils@^1.3.0: + version "1.3.6" + resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.3.6.tgz#390bc9fa3a7179746963cfaca55bb80ac4d8dc10" + integrity sha512-hHatFaQpkQgjGVER17gNx8u1qMyaXFZtM0y0XLGH1bzsjMPlkMPLRcYOrZ00rOPfTEuYFOdrpGOqZXVmGrMZRg== dependencies: - bn.js "4.11.8" - eth-lib "0.2.7" + bn.js "^4.11.9" + eth-lib "0.2.8" ethereum-bloom-filters "^1.0.6" ethjs-unit "0.1.6" number-to-bn "1.7.0" randombytes "^2.1.0" - underscore "1.9.1" + underscore "1.12.1" utf8 "3.0.0" -web3-utils@1.3.4, web3-utils@^1.0.0-beta.31, web3-utils@^1.3.0: +web3-utils@^1.0.0-beta.31: version "1.3.4" resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.3.4.tgz#9b1aa30d7549f860b573e7bb7e690999e7192198" integrity sha512-/vC2v0MaZNpWooJfpRw63u0Y3ag2gNjAWiLtMSL6QQLmCqCy4SQIndMt/vRyx0uMoeGt1YTwSXEcHjUzOhLg0A== @@ -11043,31 +11098,18 @@ web3@1.2.11: web3-shh "1.2.11" web3-utils "1.2.11" -web3@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3/-/web3-1.2.9.tgz#cbcf1c0fba5e213a6dfb1f2c1f4b37062e4ce337" - integrity sha512-Mo5aBRm0JrcNpN/g4VOrDzudymfOnHRC3s2VarhYxRA8aWgF5rnhQ0ziySaugpic1gksbXPe105pUWyRqw8HUA== - dependencies: - web3-bzz "1.2.9" - web3-core "1.2.9" - web3-eth "1.2.9" - web3-eth-personal "1.2.9" - web3-net "1.2.9" - web3-shh "1.2.9" - web3-utils "1.2.9" - -web3@^1.0.0-beta.34: - version "1.3.4" - resolved "https://registry.yarnpkg.com/web3/-/web3-1.3.4.tgz#31e014873360aa5840eb17f9f171190c967cffb7" - integrity sha512-D6cMb2EtTMLHgdGbkTPGl/Qi7DAfczR+Lp7iFX3bcu/bsD9V8fZW69hA8v5cRPNGzXUwVQebk3bS17WKR4cD2w== +web3@1.3.6, web3@^1.0.0-beta.34: + version "1.3.6" + resolved "https://registry.yarnpkg.com/web3/-/web3-1.3.6.tgz#599425461c3f9a8cbbefa70616438995f4a064cc" + integrity sha512-jEpPhnL6GDteifdVh7ulzlPrtVQeA30V9vnki9liYlUvLV82ZM7BNOQJiuzlDePuE+jZETZSP/0G/JlUVt6pOA== dependencies: - web3-bzz "1.3.4" - web3-core "1.3.4" - web3-eth "1.3.4" - web3-eth-personal "1.3.4" - web3-net "1.3.4" - web3-shh "1.3.4" - web3-utils "1.3.4" + web3-bzz "1.3.6" + web3-core "1.3.6" + web3-eth "1.3.6" + web3-eth-personal "1.3.6" + web3-net "1.3.6" + web3-shh "1.3.6" + web3-utils "1.3.6" websocket@1.0.32, websocket@^1.0.31, websocket@^1.0.32: version "1.0.32" @@ -11086,7 +11128,7 @@ whatwg-fetch@2.0.4: resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz#dde6a5df315f9d39991aa17621853d720b85566f" integrity sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng== -which-boxed-primitive@^1.0.1: +which-boxed-primitive@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== @@ -11156,10 +11198,10 @@ wordwrap@^1.0.0: resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= -workerpool@6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.0.2.tgz#e241b43d8d033f1beb52c7851069456039d1d438" - integrity sha512-DSNyvOpFKrNusaaUwk+ej6cBj1bmhLcBfj80elGk+ZIo5JSkq+unB1dLKEOcNfJDZgjGICfhQ0Q5TbP0PvF4+Q== +workerpool@6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.1.0.tgz#a8e038b4c94569596852de7a8ea4228eefdeb37b" + integrity sha512-toV7q9rWNYha963Pl/qyeZ6wG+3nnsyvolaNUS8+R5Wtw6qJPTxIlOP1ZSvcGhEJw+l3HMMmtiNo9Gl61G4GVg== wrap-ansi@^2.0.0: version "2.1.0" @@ -11178,6 +11220,15 @@ wrap-ansi@^5.1.0: string-width "^3.0.0" strip-ansi "^5.0.0" +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" @@ -11212,9 +11263,9 @@ ws@^5.1.1: async-limiter "~1.0.0" ws@^7.2.1: - version "7.4.4" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.4.tgz#383bc9742cb202292c9077ceab6f6047b17f2d59" - integrity sha512-Qm8k8ojNQIMx7S+Zp8u/uHOx7Qazv3Yv4q68MiWWWOJhiwG5W3x7iqmRtJo8xxrciZUY4vRxUTJCKuRnF28ZZw== + version "7.4.6" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" + integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A== xhr-request-promise@^0.1.2: version "0.1.3" @@ -11243,17 +11294,7 @@ xhr2-cookies@1.1.0: dependencies: cookiejar "^2.1.1" -xhr@^2.0.4, xhr@^2.3.3: - version "2.5.0" - resolved "https://registry.yarnpkg.com/xhr/-/xhr-2.5.0.tgz#bed8d1676d5ca36108667692b74b316c496e49dd" - integrity sha512-4nlO/14t3BNUZRXIXfXe+3N6w3s1KoxcJUUURctd64BLRe67E4gRwp4PjywtDY72fXpZ1y6Ch0VZQRY/gMPzzQ== - dependencies: - global "~4.3.0" - is-function "^1.0.1" - parse-headers "^2.0.0" - xtend "^4.0.0" - -xhr@^2.2.0: +xhr@^2.0.4, xhr@^2.2.0, xhr@^2.3.3: version "2.6.0" resolved "https://registry.yarnpkg.com/xhr/-/xhr-2.6.0.tgz#b69d4395e792b4173d6b7df077f0fc5e4e2b249d" integrity sha512-/eCGLb5rxjx5e3mF1A7s+pLlR6CGyqWN91fv1JgER5mVWg1MZmlhBvy9kjcsOdRk8RrIujotWyJamfyrp+WIcA== @@ -11268,7 +11309,7 @@ xmlhttprequest@1.8.0: resolved "https://registry.yarnpkg.com/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz#67fe075c5c24fef39f9d65f5f7b7fe75171968fc" integrity sha1-Z/4HXFwk/vOfnWX197f+dRcZaPw= -xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.0, xtend@~4.0.1: +xtend@^4.0.0, xtend@^4.0.1, xtend@^4.0.2, xtend@~4.0.0, xtend@~4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== @@ -11286,9 +11327,14 @@ y18n@^3.2.1: integrity sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ== y18n@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.1.tgz#8db2b83c31c5d75099bb890b23f3094891e247d4" - integrity sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ== + version "4.0.3" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.3.tgz#b5f259c82cd6e336921efd7bfd8bf560de9eeedf" + integrity sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ== + +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== yaeti@^0.0.6: version "0.0.6" @@ -11313,6 +11359,11 @@ yargs-parser@13.1.2, yargs-parser@^13.1.0, yargs-parser@^13.1.2: camelcase "^5.0.0" decamelize "^1.2.0" +yargs-parser@20.2.4: + version "20.2.4" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" + integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== + yargs-parser@^2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-2.4.1.tgz#85568de3cf150ff49fa51825f03a8c880ddcc5c4" @@ -11321,7 +11372,7 @@ yargs-parser@^2.4.1: camelcase "^3.0.0" lodash.assign "^4.0.6" -yargs-parser@^20.2.7: +yargs-parser@^20.2.2, yargs-parser@^20.2.7: version "20.2.7" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.7.tgz#61df85c113edfb5a7a4e36eb8aa60ef423cbc90a" integrity sha512-FiNkvbeHzB/syOjIUxFDCnhSfzAL8R5vs40MgLFBorXACCOAEaWu0gRZl14vG8MR9AOJIZbmkjhusqBYZ3HTHw== @@ -11378,6 +11429,19 @@ yargs@13.3.2, yargs@^13.3.0: y18n "^4.0.0" yargs-parser "^13.1.2" +yargs@16.2.0: + version "16.2.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" + integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" + yargs@^4.7.1: version "4.8.1" resolved "https://registry.yarnpkg.com/yargs/-/yargs-4.8.1.tgz#c0c42924ca4aaa6b0e6da1739dfb216439f9ddc0" @@ -11402,3 +11466,8 @@ yn@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==