ETH Price: $3,250.02 (-1.06%)
 

Overview

Max Total Supply

163 GMN

Holders

36

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A

Other Info

Filtered by Token Holder
shillspeare.eth
Balance
1 GMN
0x42b169650de049686d81e6c4ce12220b759b77ca
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.

Contract Source Code Verified (Exact Match)

Contract Name:
GasMonster

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 100 runs

Other Settings:
default evmVersion
File 1 of 38 : GasMonster.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import 'erc721a/contracts/ERC721A.sol';
import './ChainlinkInfrastructureClient.sol';
import './TokenURIResolver.sol';
import './PausableMint.sol';
import './Withdrawable.sol';
import './Royalty.sol';
import './interfaces/IERC20.sol';
import './libs/SignerVerification.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import 'hardhat/console.sol';

struct NFT {
	uint8 level; // 1-7
	/*
	 * COMMON PARTS
	 * value from 0 to n, where n - is max number of property,
	 * 10 (NULL) - absence of params
	 */
	uint8 gender; // 0-1
	uint8 color; // 0-4
	uint8 background; // 1-4 on levels 1-4 and 5-9 on levels 5-7
	uint8 necklace; // 0-9
	uint8 accessories; // 0-9
	uint8 weapon; //  0-9
	/*
	 * ROBO PARTS
	 * head, body, tail, wingLeft, wingRight, armLeft, armRight, legLeft, legRight
	 */
	bool[9] roboParts;
}

contract GasMonster is
	ERC721A,
	ChainlinkInfrastructureClient,
	TokenURIResolver,
	PausableMint,
	Withdrawable,
	Royalty,
	ReentrancyGuard
{
	using Chainlink for Chainlink.Request;

	address private signer; // Address of presale signatures creator

	// NULL definition that suits for NFT properties
	uint8 private constant NULL = 10;

	uint256 public publicSaleTimestamp;
	uint256 public preSaleTimestamp;

	uint256 public preSalePriceOfNFT = 0.000005 ether;
	uint256 public publicSalePriceOfNFT = 0.00001 ether;
	uint256 public discountedGirlDragonPrice = 0.0000075 ether;
	// uint256 public maxSupply = 10000

	uint256 public timestampOfSexChangeAtMint = 1661990400; // 1 sepetember 2022

	// Mapping of supported interfaces
	mapping(bytes4 => bool) private _supportedInterfaces;

	struct Upgrade {
		bool inProgress;
		uint256 timestamp;
	}

	// NFT properties by tokenId
	mapping(uint256 => NFT) internal Tokens;

	/*
	 * Requests to get update availability
	 * @param requestId - generated by Chainlink
	 * @return tokenId  - NFT ID
	 */
	mapping(bytes32 => uint256) private UpgradeRequests;

	/*
	 * Requests to get random number
	 * @param requestId - ID returned from request builder function
	 * @return tokenId - NFT ID
	 */
	mapping(uint256 => uint256[]) internal VRFRequests;

	/*
	 * Requests to get random number
	 * @param tokenId - NFT ID for what was request
	 * @return lastUpdateRequestTimestamp
	 */
	mapping(uint256 => Upgrade) internal LastUpgrades;

	/**
	 * Events
	 * @notice they are needed for backend to refresh data in DB and create/update NFT images
	 */
	event MintFinal(address owner, uint256 tokenId, uint8 gender, uint8 color);

	// Event for NFT that just have been upgraded
	event LevelUp(
		uint256 tokenId,
		uint8 level,
		uint8 gender,
		uint8 color,
		uint8 background,
		uint8 necklace,
		uint8 accessories,
		uint8 weapon,
		bool[9] roboParts
	);

	event UpgradeFailed(bytes32 requestId);

	constructor(
		ChainlinkConfig memory _chainlinkConfig,
		ChainlinkVRFConfig memory _chainlinkVRFConfig,
		string memory _ipfsMetadataURL,
		string memory _backendBaseURL,
		uint256 _preSalePriceOfNFT,
		uint256 _publicSalePriceOfNFT,
		uint256 _discountedGirlDragonPrice,
		uint256 _preSaleTimestamp,
		uint256 _publicSaleTimestamp,
		address royaltyReceiver
	)
		ChainlinkInfrastructureClient(_chainlinkConfig, _chainlinkVRFConfig)
		ERC721A('GasMonsterNFT', 'GMN')
		Royalty(royaltyReceiver)
		TokenURIResolver(_backendBaseURL, _ipfsMetadataURL)
	{
		preSalePriceOfNFT = _preSalePriceOfNFT;
		publicSalePriceOfNFT = _publicSalePriceOfNFT;
		discountedGirlDragonPrice = _discountedGirlDragonPrice;

		preSaleTimestamp = _preSaleTimestamp;
		publicSaleTimestamp = _publicSaleTimestamp;

		signer = msg.sender;

		_registerInterface(_INTERFACE_ID_ERC2981);
		_registerInterface(type(IERC165).interfaceId);
		_registerInterface(type(IERC721).interfaceId);
		_registerInterface(type(IERC721Metadata).interfaceId);
	}

	/**
	 * Mints some quantity of NFTs on pre sale stage
	 * @param quantity of NFTs to mint
	 * @param signature address of msg.sender signed by owner of contract
	 * needed for WL
	 * @notice msg.value should be enough for mint, including NFT price (preSalePriceOfNFT * quantity)
	 * @notice presale should start, otherwise tx will be reverted
	 */
	function mintOnPreSale(uint256 quantity, bytes memory signature) external payable {
		require(_currentTime() > preSaleTimestamp, 'Pre-sale is not started yet');

		// Verify signature
		require(
			SignerVerification.isMessageVerified(signer, signature, _addressToString(msg.sender)),
			'Presale signature is wrong'
		);
		require(msg.value >= preSalePriceOfNFT * quantity, 'GasMonster: Not enough ethers to mint NFTs');

		_mint(quantity, msg.sender);
	}

	/**
	 * Mints some quantity of NFTs on public sale stage
	 * @param quantity of NFTs to mint
	 * @notice msg.value should be enough for mint, including NFT price (publicSalePriceOfNFT * quantity)
	 * @notice public sale should start, otherwise tx will be reverted
	 */
	function mintOnPublicSale(uint256 quantity) external payable {
		require(_currentTime() > publicSaleTimestamp, 'Public sale is not started yet');
		require(msg.value >= publicSalePriceOfNFT * quantity, 'GasMonster: Not enough ethers to mint NFTs');

		_mint(quantity, msg.sender);
	}

	/**
	 * Mints some quantity of NFTs
	 * @param quantity of NFTs to mint
	 * @param boyDragonId ID of dragon boy of msg.sender that can give discount for mint girl dragon
	 *
	 * @notice msg.value should be enough for mint, including NFT price (discountedGirlDragonPrice * quantity)
	 * @notice Boy dragon ID must be owned by msg.sender
	 */
	function mintDragonGirlWithDiscount(uint256 boyDragonId, uint256 quantity) external payable {
		require(_currentTime() >= timestampOfSexChangeAtMint, 'Mint of girl dragons is not started yet');

		NFT storage dragon = Tokens[boyDragonId];
		require(dragon.gender == 1, 'Given boyDragonId is the ID of girl dragon');

		require(ownerOf(boyDragonId) == msg.sender, 'You are not the owner of boy dragon');

		require(msg.value >= quantity * discountedGirlDragonPrice, 'GasMonster: Not enough ethers to mint NFTs');

		_mint(quantity, msg.sender);
	}

	/**
	 * Mints some quantity of NFTs
	 * @param quantity of NFTs to mint
	 * @param receiver address that will receive NFT
	 *
	 * @notice Mints not more than 10 NFTs by transaction
	 * @notice Can mint not more than 20 NFTs by account
	 */
	function _mint(uint256 quantity, address receiver) internal whenNotPaused {
		require(balanceOf(receiver) + quantity <= 20, 'GasMonster: You are allowed to get only 20 NFTs');
		require(quantity <= 10, 'GasMonster: You can mint only 10 mint in one transaction');

		uint256 startTokenId = _totalMinted();

		_safeMint(receiver, quantity);

		_recordMintedTokens(startTokenId, quantity, receiver);
	}

	function _recordMintedTokens(
		uint256 startTokenId,
		uint256 quantity,
		address tokenOwner
	) internal {
		// Array of minted tokens
		uint256[] memory mintedTokensIds = new uint256[](quantity);

		// last token number
		uint256 currentIndex = startTokenId;

		for (uint256 i = 0; i < quantity; ) {
			// Define nft gender
			uint8 nftGender;
			if (_currentTime() < timestampOfSexChangeAtMint) {
				// Male
				nftGender = 1;
			} else {
				// Female
				nftGender = 0;
			}
			// Define nft color
			uint8 nftColor = uint8(
				uint256(keccak256(abi.encodePacked(_currentTime(), block.number, currentIndex))) % 5
			);

			Tokens[currentIndex] = NFT(
				1,
				nftGender,
				nftColor,
				NULL,
				NULL,
				NULL,
				NULL,
				[false, false, false, false, false, false, false, false, false]
			);

			mintedTokensIds[i] = currentIndex;

			emit MintFinal(tokenOwner, currentIndex, nftGender, nftColor);

			unchecked {
				currentIndex++;
				i++;
			}
		}
	}

	// /**
	//  * Creates struct of NFT
	//  * @notice creates NFT of 1 level with empty params to fulfill them later
	//  */
	// function createEmptyNFT() internal pure returns (NFT memory) {
	// 	NFT memory token =
	// 	return token;
	// }

	/**
	 * Called by user to update NFT
	 * @param tokenId - ID of user's NFT
	 * @notice must be called to upgrade NFT
	 * @dev Builds Chainlink request to backend to get level-up availability
	 */
	function triggerUpgrade(uint256 tokenId) external nonReentrant {
		// Check for existence and for ownership
		require(msg.sender == ownerOf(tokenId), 'GasMonster: Only owner can upgrade NFT');
		require(Tokens[tokenId].level < 7, 'GasMonster: Token had alreay reached max level'); // all requirements take 7314 gas units
		require(
			_canRequestUpgrade(tokenId),
			'GasMonster: Upgrade already in progress. If request will not complete in 15 minutes, you will be able to request upgrade again'
		);

		Chainlink.Request memory request = buildChainlinkRequest(jobId, address(this), this.upgrade.selector);

		request.add(
			'get',
			string(abi.encodePacked(TokenURIResolver.backendBaseURL, '/canUpgrade/', Strings.toString(tokenId)))
		);
		request.add('path', 'data');

		// TODO: Delete before deployment
		if (block.chainid != 31337) {
			UpgradeRequests[sendChainlinkRequestTo(oracle, request, fee)] = tokenId;
		}

		LastUpgrades[tokenId] = Upgrade(true, _currentTime());
	}

	/**
	 * Check if upgrade is already in progres or user requested upgrade recently
	 * @param tokenId - ID of user's NFT
	 * @notice prevetns multiple requests that can create conflicts
	 */
	function _canRequestUpgrade(uint256 tokenId) internal view returns (bool) {
		Upgrade memory lastTokenUpgrade = LastUpgrades[tokenId];
		return !lastTokenUpgrade.inProgress || _currentTime() >= lastTokenUpgrade.timestamp + 15 minutes;
	}

	/**
	 * Upgrade that should be called fullfilled by Oracle
	 * @notice shouldn't be called to upgrade NFT (internal logic function)
	 * @param requestId - ID of Chainlink request
	 * @param canBeUpgraded - result of external request (must be boolean)
	 */
	function upgrade(bytes32 requestId, bool canBeUpgraded) public recordChainlinkFulfillment(requestId) {
		if (!canBeUpgraded) {
			emit UpgradeFailed(requestId);
			return;
		}

		uint256 tokenId = UpgradeRequests[requestId];

		NFT storage token = Tokens[tokenId];
		token.level = token.level + 1;

		uint256[] memory Ids = new uint256[](1);
		Ids[0] = tokenId;

		if (token.level == 7) {
			_fillInMissingPropsOfToken(tokenId, 12345678910111213);
			_emitSuitingEvent(tokenId);
			delete LastUpgrades[tokenId];
		} else {
			_requestNFTPropsFullfillmentWithRandom(Ids);
		}

		delete UpgradeRequests[requestId];
	}

	/**
	 * Makes request to ChainlinkVRF for random number
	 * @param tokenIds NFT IDs with empty properties to fill in
	 */
	function _requestNFTPropsFullfillmentWithRandom(uint256[] memory tokenIds) internal {
		uint256 requestId = COORDINATOR.requestRandomWords(
			keyHash,
			subscriptionId,
			requestConfirmations,
			callbackGasLimit,
			1 // Count of random words
		);

		// Record requestId and tokenId pair to get that as context later (in fulfillRandomWords())
		VRFRequests[requestId] = tokenIds;

		for (uint8 i = 0; i < tokenIds.length; ) {
			console.log('check');
			LastUpgrades[tokenIds[i]] = Upgrade(true, _currentTime());
			unchecked {
				i++;
			}
		}
	}

	/**
	 * Called by Chainlink VRF to fill in missing NFT params with random words
	 * @param _requestId unique request identifier
	 * @param _randomWords - some big random numbers
	 * @dev function name can't be changed! That is the standard name in Chainlink VRF
	 */
	function fulfillRandomWords(uint256 _requestId, uint256[] memory _randomWords) internal override {
		uint256[] memory tokenIds = VRFRequests[_requestId];

		uint256 tempRandomWord = _randomWords[0];
		uint256 randomWordLength;

		while (tempRandomWord > 0) {
			tempRandomWord = tempRandomWord / 10;
			randomWordLength++;
		}

		// Random word like 10 can't be used to fill in 2 props, it's too short. Minimum is 4 digit number (1000-9999)
		// require(
		// 	randomWordLength >= tokenIds.length * 4,
		// 	string(
		// 		abi.encodePacked(
		// 			'GasMonster: Random number is too short to fullfill ',
		// 			Strings.toString(tokenIds.length),
		// 			' NFTs properties'
		// 		)
		// 	)
		// );

		uint256 randomWord = _randomWords[0];

		// Fill in every NFT properties with different parts of random word
		for (uint8 i = 0; i < tokenIds.length; ) {
			_fillInMissingPropsOfToken(tokenIds[i], randomWord);
			// Emits MintFinal() or LevelUp() event
			_emitSuitingEvent(tokenIds[i]);

			uint8 tokenLevel = Tokens[tokenIds[i]].level;

			delete LastUpgrades[tokenIds[i]];

			if (tokenLevel >= 5) {
				// Generating robo parts takes at least 6 digit random number
				randomWord = randomWord / 1000000;
			} else {
				// Generating parts for 1 and 2 levels takes at least 4 digit random number
				randomWord = randomWord / 10000;
			}

			unchecked {
				i++;
			}
		}

		// Clear requests mapping
		delete VRFRequests[_requestId];
	}

	/**
	 * @param tokenId NFT ID
	 * @return boolean of having of all params required by the level
	 */
	// function _hasAllParamsAccordingToLevel(uint256 tokenId) internal view returns (bool) {
	// 	NFT storage token = Tokens[tokenId];

	// 	if (token.level == 1) {
	// 		return token.color != NULL && token.gender != NULL;
	// 	} else if (token.level == 2) {
	// 		return token.background != NULL && token.necklace != NULL;
	// 	} else if (token.level == 3) {
	// 		return token.accessories != NULL;
	// 	} else if (token.level == 4) {
	// 		return token.weapon != NULL;

	// 		// Robo parts counting
	// 	} else if (token.level == 5) {
	// 		return _countFilledRoboPartsOfToken(tokenId) == 3 && token.background >= 5 && token.background <= 9;
	// 	} else if (token.level == 6) {
	// 		return _countFilledRoboPartsOfToken(tokenId) == 6;
	// 	} else {
	// 		return _countFilledRoboPartsOfToken(tokenId) == 9;
	// 	}
	// }

	/**
	 * Fills NFT params required by level with random number
	 * @param tokenId NFT ID
	 * @param _randomNumber number recevied from Chainlink VRF
	 */
	function _fillInMissingPropsOfToken(uint256 tokenId, uint256 _randomNumber) internal {
		NFT storage token = Tokens[tokenId];

		// require(!_hasAllParamsAccordingToLevel(tokenId), 'All necessary properties are already filled in');

		// Checking random number to be long enough to fill params
		// if (token.level >= 5) {
		// 	_requireNumberToBeMoreThan(_randomNumber, 99999);
		// } else if (token.level < 3) {
		// 	_requireNumberToBeMoreThan(_randomNumber, 999);
		// } else {
		// 	_requireNumberToBeMoreThan(_randomNumber, 9);
		// }

		uint256 randomNumber = _randomNumber;

		if (token.level == 1) {
			// Define gender
			if (_currentTime() < timestampOfSexChangeAtMint) {
				// Male
				token.gender = 1;
			} else {
				// Female
				token.gender = 0;
			}

			// Dividing by 100 to get other part of the number
			token.color = uint8(randomNumber % 5);
		} else if (token.level == 2) {
			token.background = uint8(randomNumber % 5);
			// Dividing by 100 to get other part of the number
			token.necklace = uint8((randomNumber / 100) % 10);
		} else if (token.level == 3) {
			token.accessories = uint8(randomNumber % 10);
		} else if (token.level == 4) {
			token.weapon = uint8(randomNumber % 10);

			// Robo parts fullfilment
		} else if (token.level >= 5) {
			uint256 roboPartsCounter = _countFilledRoboPartsOfToken(tokenId);

			while (roboPartsCounter < 3 * (token.level - 4)) {
				_fillInRoboPartOfToken(tokenId, randomNumber);
				randomNumber = randomNumber / 100;
				roboPartsCounter++;
			}
		}

		// Update background on level 5
		if (token.level == 5) {
			// On level 5 background is changing to 5-9 value
			token.background = uint8(randomNumber % 5) + 5;
		}
	}

	/**
	 * @param tokenId NFT ID
	 * @return counter - number of robo parts NFT currently have
	 * @dev order of robo parts can be viewed in NFT struct
	 */
	function _countFilledRoboPartsOfToken(uint256 tokenId) internal view returns (uint8 counter) {
		NFT storage token = Tokens[tokenId];

		for (uint8 i = 0; i < 9; ) {
			if (token.roboParts[i]) counter++;
			unchecked {
				i++;
			}
		}
	}

	/**
	 * Fills one random robo part of token with given ID
	 * @param tokenId ID of NFT to update
	 * @param randomNumber random number from ChainlinkVRF
	 */
	function _fillInRoboPartOfToken(uint256 tokenId, uint256 randomNumber) internal {
		// _requireNumberToBeMoreThan(randomNumber, 9);

		NFT storage token = Tokens[tokenId];

		uint8 filledParts = _countFilledRoboPartsOfToken(tokenId);

		uint8 randomPositionCounter = uint8((randomNumber % (9 - filledParts)) + 1);

		uint8 trueCounter;
		// Iterator
		uint8 i;

		do {
			if (token.roboParts[i]) {
				trueCounter++;
			}
			unchecked {
				i++;
			}
		} while (i < randomPositionCounter + trueCounter);

		token.roboParts[i - 1] = true;
	}

	/**
	 * Emits event depending on NFT level
	 * @param tokenId ID of NFT to update
	 * @notice correct event is required for backend to generate or update image
	 */
	function _emitSuitingEvent(uint256 tokenId) internal {
		NFT storage token = Tokens[tokenId];

		if (token.level == 1) {
			// Sub 1 needs because backend expects numbers 0-1 and 0-4
			emit MintFinal(ownerOf(tokenId), tokenId, token.gender, token.color);
		} else {
			emit LevelUp(
				tokenId,
				token.level,
				token.gender,
				token.color,
				token.background,
				token.necklace,
				token.accessories,
				token.weapon,
				token.roboParts
			);
		}
	}

	/**
	 * Returns URL to token metadata
	 * @param tokenId ID of NFT to return URL
	 * @return string URI to backend or IPFS
	 * @dev Uses TokenURIManager to generate url
	 */
	function tokenURI(uint256 tokenId) public view override returns (string memory) {
		require(_exists(tokenId), 'GasMonster: URI request for non existen token');

		NFT memory token = Tokens[tokenId];

		return TokenURIResolver.formatTokenURI(tokenId, token);
	}

	/**
	 * @param tokenId ID of NFT
	 */
	function getTokenById(uint256 tokenId) external view returns (NFT memory) {
		return Tokens[tokenId];
	}

	/** Updates pre-sale price of NFT
	 * @param _preSalePriceOfNFT new pre-sale price for NFT
	 * @dev only owner of contract can change price
	 */
	function setPreSalePriceOfNFT(uint256 _preSalePriceOfNFT) external onlyOwner {
		preSalePriceOfNFT = _preSalePriceOfNFT;
	}

	/** Updates public sale price of NFT
	 * @param _publicSalePriceOfNFT public sale price for NFT
	 * @dev only owner of contract can change price
	 */
	function setPublicSalePriceOfNFT(uint256 _publicSalePriceOfNFT) external onlyOwner {
		publicSalePriceOfNFT = _publicSalePriceOfNFT;
	}

	function setDiscountedGirlDragonPrice(uint256 _discountedGirlDragonPrice) external onlyOwner {
		discountedGirlDragonPrice = _discountedGirlDragonPrice;
	}

	// function _requireNumberToBeMoreThan(uint256 number, uint256 minValue) internal pure {
	// 	require(number > minValue, 'GasMonster: number is too small');
	// }

	function changeRoyaltyReceiver(address receiver) external onlyOwner {
		_changeRoyaltyReceiver(receiver);
	}

	function _registerInterface(bytes4 interfaceId) internal {
		_supportedInterfaces[interfaceId] = true;
	}

	function supportsInterface(bytes4 interfaceId) public view override(ERC721A, IERC165, ERC165) returns (bool) {
		return _supportedInterfaces[interfaceId];
	}

	bool private isChainlinkNodeWorks = false;

	function testChainlinkRequest() external {
		isChainlinkNodeWorks = false;

		Chainlink.Request memory request = buildChainlinkRequest(
			jobId,
			address(this),
			this.fullfilChainlinkRequest.selector
		);

		request.add(
			'get',
			string(abi.encodePacked('https://my-json-server.typicode.com/lamerest/mock-backend/canUpgrade/0'))
		);
		request.add('path', 'data');

		sendChainlinkRequestTo(oracle, request, fee);
	}

	event ChainlinkRequestTestSuccessful(bytes32 requestId);

	function fullfilChainlinkRequest(bytes32 requestId, bool value) public recordChainlinkFulfillment(requestId) {
		isChainlinkNodeWorks = true;
		emit ChainlinkRequestTestSuccessful(requestId);
	}

	function getLastChainlinkNodeWorkState() public view returns (bool) {
		return isChainlinkNodeWorks;
	}

	function setTimestampOfSexChangeAtMint(uint256 _timestampOfSexChangeAtMint) external onlyOwner {
		timestampOfSexChangeAtMint = _timestampOfSexChangeAtMint;
	}

	function setPreSaleTimestamp(uint256 _preSaleTimestamp) external onlyOwner {
		preSaleTimestamp = _preSaleTimestamp;
	}

	function setPublicSaleTimestamp(uint256 _publicSaleTimestamp) external onlyOwner {
		publicSaleTimestamp = _publicSaleTimestamp;
	}

	function _addressToString(address _addr) internal pure returns (string memory) {
		bytes memory addressBytes = abi.encodePacked(_addr);

		bytes memory stringBytes = new bytes(42);

		stringBytes[0] = '0';
		stringBytes[1] = 'x';

		for (uint256 i = 0; i < 20; ) {
			uint8 leftValue = uint8(addressBytes[i]) / 16;
			uint8 rightValue = uint8(addressBytes[i]) - 16 * leftValue;

			bytes1 leftChar = leftValue < 10 ? bytes1(leftValue + 48) : bytes1(leftValue + 87);
			bytes1 rightChar = rightValue < 10 ? bytes1(rightValue + 48) : bytes1(rightValue + 87);

			stringBytes[2 * i + 3] = rightChar;
			stringBytes[2 * i + 2] = leftChar;

			unchecked {
				i++;
			}
		}

		return string(stringBytes);
	}

	function _currentTime() internal view returns (uint64) {
		return uint64(block.timestamp);
	}
}

File 2 of 38 : ERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v3.3.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import './IERC721A.sol';
import '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol';
import '@openzeppelin/contracts/utils/Address.sol';
import '@openzeppelin/contracts/utils/Context.sol';
import '@openzeppelin/contracts/utils/Strings.sol';
import '@openzeppelin/contracts/utils/introspection/ERC165.sol';

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension. Built to optimize for lower gas during batch mints.
 *
 * Assumes serials are sequentially minted starting at _startTokenId() (defaults to 0, e.g. 0, 1, 2, 3..).
 *
 * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
 *
 * Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256).
 */
contract ERC721A is Context, ERC165, IERC721A {
    using Address for address;
    using Strings for uint256;

    // The tokenId of the next token to be minted.
    uint256 internal _currentIndex;

    // The number of tokens burned.
    uint256 internal _burnCounter;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to ownership details
    // An empty struct value does not necessarily mean the token is unowned. See _ownershipOf implementation for details.
    mapping(uint256 => TokenOwnership) internal _ownerships;

    // Mapping owner address to address data
    mapping(address => AddressData) private _addressData;

    // 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;

    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
        _currentIndex = _startTokenId();
    }

    /**
     * To change the starting tokenId, please override this function.
     */
    function _startTokenId() internal view virtual returns (uint256) {
        return 0;
    }

    /**
     * @dev Burned tokens are calculated here, use _totalMinted() if you want to count just minted tokens.
     */
    function totalSupply() public view override returns (uint256) {
        // Counter underflow is impossible as _burnCounter cannot be incremented
        // more than _currentIndex - _startTokenId() times
        unchecked {
            return _currentIndex - _burnCounter - _startTokenId();
        }
    }

    /**
     * Returns the total amount of tokens minted in the contract.
     */
    function _totalMinted() internal view returns (uint256) {
        // Counter underflow is impossible as _currentIndex does not decrement,
        // and it is initialized to _startTokenId()
        unchecked {
            return _currentIndex - _startTokenId();
        }
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return
            interfaceId == type(IERC721).interfaceId ||
            interfaceId == type(IERC721Metadata).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view override returns (uint256) {
        if (owner == address(0)) revert BalanceQueryForZeroAddress();
        return uint256(_addressData[owner].balance);
    }

    /**
     * Returns the number of tokens minted by `owner`.
     */
    function _numberMinted(address owner) internal view returns (uint256) {
        return uint256(_addressData[owner].numberMinted);
    }

    /**
     * Returns the number of tokens burned by or on behalf of `owner`.
     */
    function _numberBurned(address owner) internal view returns (uint256) {
        return uint256(_addressData[owner].numberBurned);
    }

    /**
     * Returns the auxillary data for `owner`. (e.g. number of whitelist mint slots used).
     */
    function _getAux(address owner) internal view returns (uint64) {
        return _addressData[owner].aux;
    }

    /**
     * Sets the auxillary data for `owner`. (e.g. number of whitelist mint slots used).
     * If there are multiple variables, please pack them into a uint64.
     */
    function _setAux(address owner, uint64 aux) internal {
        _addressData[owner].aux = aux;
    }

    /**
     * Gas spent here starts off proportional to the maximum mint batch size.
     * It gradually moves to O(1) as tokens get transferred around in the collection over time.
     */
    function _ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) {
        uint256 curr = tokenId;

        unchecked {
            if (_startTokenId() <= curr) if (curr < _currentIndex) {
                TokenOwnership memory ownership = _ownerships[curr];
                if (!ownership.burned) {
                    if (ownership.addr != address(0)) {
                        return ownership;
                    }
                    // Invariant:
                    // There will always be an ownership that has an address and is not burned
                    // before an ownership that does not have an address and is not burned.
                    // Hence, curr will not underflow.
                    while (true) {
                        curr--;
                        ownership = _ownerships[curr];
                        if (ownership.addr != address(0)) {
                            return ownership;
                        }
                    }
                }
            }
        }
        revert OwnerQueryForNonexistentToken();
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view override returns (address) {
        return _ownershipOf(tokenId).addr;
    }

    /**
     * @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) {
        if (!_exists(tokenId)) revert URIQueryForNonexistentToken();

        string memory baseURI = _baseURI();
        return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : '';
    }

    /**
     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty
     * by default, can be overriden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return '';
    }

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public override {
        address owner = ERC721A.ownerOf(tokenId);
        if (to == owner) revert ApprovalToCurrentOwner();

        if (_msgSender() != owner) if(!isApprovedForAll(owner, _msgSender())) {
            revert ApprovalCallerNotOwnerNorApproved();
        }

        _approve(to, tokenId, owner);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view override returns (address) {
        if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        if (operator == _msgSender()) revert ApproveToCaller();

        _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 {
        _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 {
        _transfer(from, to, tokenId);
        if (to.isContract()) if(!_checkContractOnERC721Received(from, to, tokenId, _data)) {
            revert TransferToNonERC721ReceiverImplementer();
        }
    }

    /**
     * @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`),
     */
    function _exists(uint256 tokenId) internal view returns (bool) {
        return _startTokenId() <= tokenId && tokenId < _currentIndex && !_ownerships[tokenId].burned;
    }

    /**
     * @dev Equivalent to `_safeMint(to, quantity, '')`.
     */
    function _safeMint(address to, uint256 quantity) internal {
        _safeMint(to, quantity, '');
    }

    /**
     * @dev Safely mints `quantity` tokens and transfers them to `to`.
     *
     * Requirements:
     *
     * - If `to` refers to a smart contract, it must implement
     *   {IERC721Receiver-onERC721Received}, which is called for each safe transfer.
     * - `quantity` must be greater than 0.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(
        address to,
        uint256 quantity,
        bytes memory _data
    ) internal {
        uint256 startTokenId = _currentIndex;
        if (to == address(0)) revert MintToZeroAddress();
        if (quantity == 0) revert MintZeroQuantity();

        _beforeTokenTransfers(address(0), to, startTokenId, quantity);

        // Overflows are incredibly unrealistic.
        // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1
        // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1
        unchecked {
            _addressData[to].balance += uint64(quantity);
            _addressData[to].numberMinted += uint64(quantity);

            _ownerships[startTokenId].addr = to;
            _ownerships[startTokenId].startTimestamp = uint64(block.timestamp);

            uint256 updatedIndex = startTokenId;
            uint256 end = updatedIndex + quantity;

            if (to.isContract()) {
                do {
                    emit Transfer(address(0), to, updatedIndex);
                    if (!_checkContractOnERC721Received(address(0), to, updatedIndex++, _data)) {
                        revert TransferToNonERC721ReceiverImplementer();
                    }
                } while (updatedIndex < end);
                // Reentrancy protection
                if (_currentIndex != startTokenId) revert();
            } else {
                do {
                    emit Transfer(address(0), to, updatedIndex++);
                } while (updatedIndex < end);
            }
            _currentIndex = updatedIndex;
        }
        _afterTokenTransfers(address(0), to, startTokenId, quantity);
    }

    /**
     * @dev Mints `quantity` tokens and transfers them to `to`.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `quantity` must be greater than 0.
     *
     * Emits a {Transfer} event.
     */
    function _mint(address to, uint256 quantity) internal {
        uint256 startTokenId = _currentIndex;
        if (to == address(0)) revert MintToZeroAddress();
        if (quantity == 0) revert MintZeroQuantity();

        _beforeTokenTransfers(address(0), to, startTokenId, quantity);

        // Overflows are incredibly unrealistic.
        // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1
        // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1
        unchecked {
            _addressData[to].balance += uint64(quantity);
            _addressData[to].numberMinted += uint64(quantity);

            _ownerships[startTokenId].addr = to;
            _ownerships[startTokenId].startTimestamp = uint64(block.timestamp);

            uint256 updatedIndex = startTokenId;
            uint256 end = updatedIndex + quantity;

            do {
                emit Transfer(address(0), to, updatedIndex++);
            } while (updatedIndex < end);

            _currentIndex = updatedIndex;
        }
        _afterTokenTransfers(address(0), to, startTokenId, quantity);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *
     * 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
    ) private {
        TokenOwnership memory prevOwnership = _ownershipOf(tokenId);

        if (prevOwnership.addr != from) revert TransferFromIncorrectOwner();

        bool isApprovedOrOwner = (_msgSender() == from ||
            isApprovedForAll(from, _msgSender()) ||
            getApproved(tokenId) == _msgSender());

        if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();
        if (to == address(0)) revert TransferToZeroAddress();

        _beforeTokenTransfers(from, to, tokenId, 1);

        // Clear approvals from the previous owner
        _approve(address(0), tokenId, from);

        // Underflow of the sender's balance is impossible because we check for
        // ownership above and the recipient's balance can't realistically overflow.
        // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256.
        unchecked {
            _addressData[from].balance -= 1;
            _addressData[to].balance += 1;

            TokenOwnership storage currSlot = _ownerships[tokenId];
            currSlot.addr = to;
            currSlot.startTimestamp = uint64(block.timestamp);

            // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it.
            // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls.
            uint256 nextTokenId = tokenId + 1;
            TokenOwnership storage nextSlot = _ownerships[nextTokenId];
            if (nextSlot.addr == address(0)) {
                // This will suffice for checking _exists(nextTokenId),
                // as a burned slot cannot contain the zero address.
                if (nextTokenId != _currentIndex) {
                    nextSlot.addr = from;
                    nextSlot.startTimestamp = prevOwnership.startTimestamp;
                }
            }
        }

        emit Transfer(from, to, tokenId);
        _afterTokenTransfers(from, to, tokenId, 1);
    }

    /**
     * @dev Equivalent to `_burn(tokenId, false)`.
     */
    function _burn(uint256 tokenId) internal virtual {
        _burn(tokenId, false);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId, bool approvalCheck) internal virtual {
        TokenOwnership memory prevOwnership = _ownershipOf(tokenId);

        address from = prevOwnership.addr;

        if (approvalCheck) {
            bool isApprovedOrOwner = (_msgSender() == from ||
                isApprovedForAll(from, _msgSender()) ||
                getApproved(tokenId) == _msgSender());

            if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();
        }

        _beforeTokenTransfers(from, address(0), tokenId, 1);

        // Clear approvals from the previous owner
        _approve(address(0), tokenId, from);

        // Underflow of the sender's balance is impossible because we check for
        // ownership above and the recipient's balance can't realistically overflow.
        // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256.
        unchecked {
            AddressData storage addressData = _addressData[from];
            addressData.balance -= 1;
            addressData.numberBurned += 1;

            // Keep track of who burned the token, and the timestamp of burning.
            TokenOwnership storage currSlot = _ownerships[tokenId];
            currSlot.addr = from;
            currSlot.startTimestamp = uint64(block.timestamp);
            currSlot.burned = true;

            // If the ownership slot of tokenId+1 is not explicitly set, that means the burn initiator owns it.
            // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls.
            uint256 nextTokenId = tokenId + 1;
            TokenOwnership storage nextSlot = _ownerships[nextTokenId];
            if (nextSlot.addr == address(0)) {
                // This will suffice for checking _exists(nextTokenId),
                // as a burned slot cannot contain the zero address.
                if (nextTokenId != _currentIndex) {
                    nextSlot.addr = from;
                    nextSlot.startTimestamp = prevOwnership.startTimestamp;
                }
            }
        }

        emit Transfer(from, address(0), tokenId);
        _afterTokenTransfers(from, address(0), tokenId, 1);

        // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times.
        unchecked {
            _burnCounter++;
        }
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits a {Approval} event.
     */
    function _approve(
        address to,
        uint256 tokenId,
        address owner
    ) private {
        _tokenApprovals[tokenId] = to;
        emit Approval(owner, to, tokenId);
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target 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 _checkContractOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
            return retval == IERC721Receiver(to).onERC721Received.selector;
        } catch (bytes memory reason) {
            if (reason.length == 0) {
                revert TransferToNonERC721ReceiverImplementer();
            } else {
                assembly {
                    revert(add(32, reason), mload(reason))
                }
            }
        }
    }

    /**
     * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting.
     * And also called before burning one token.
     *
     * startTokenId - the first token id to be transferred
     * quantity - the amount to be transferred
     *
     * 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, `tokenId` will be burned by `from`.
     * - `from` and `to` are never both zero.
     */
    function _beforeTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual {}

    /**
     * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes
     * minting.
     * And also called after one token has been burned.
     *
     * startTokenId - the first token id to be transferred
     * quantity - the amount to be transferred
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been
     * transferred to `to`.
     * - When `from` is zero, `tokenId` has been minted for `to`.
     * - When `to` is zero, `tokenId` has been burned by `from`.
     * - `from` and `to` are never both zero.
     */
    function _afterTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual {}
}

File 3 of 38 : ChainlinkInfrastructureClient.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import '@chainlink/contracts/src/v0.8/VRFConsumerBaseV2.sol';
import '@chainlink/contracts/src/v0.8/interfaces/VRFCoordinatorV2Interface.sol';
import '@chainlink/contracts/src/v0.8/ChainlinkClient.sol';

// Chainlink and ChainlinkVRF config management contracts
import './ChainlinkConfigManagement/ChainlinkConfigManager.sol';
import './ChainlinkConfigManagement/ChainlinkVRFConfigManager.sol';

contract ChainlinkInfrastructureClient is
	ChainlinkClient,
	VRFConsumerBaseV2,
	ChainlinkConfigManager,
	ChainlinkVRFConfigManager
{
	constructor(ChainlinkConfig memory _chainlinkConfig, ChainlinkVRFConfig memory _chainlinkVRFConfig)
		ChainlinkConfigManager(_chainlinkConfig)
		ChainlinkVRFConfigManager(_chainlinkVRFConfig)
		VRFConsumerBaseV2(_chainlinkVRFConfig.vrfCoordinator)
	{
		setChainlinkToken(_chainlinkConfig.linkToken);
	}

	function fulfillRandomWords(uint256 requestId, uint256[] memory randomWords) internal virtual override {}
}

File 4 of 38 : TokenURIResolver.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/Strings.sol';
import {NFT} from './GasMonster.sol';

contract TokenURIResolver is Ownable {
	// Returned from tokenUri() AFTER reaching 7 level
	string public ipfsMetadataURL =
		'https://bafybeiby7ztd4djfci7c232gp4wmmftbfc4dx4zuxkooeki3fdbeyhiomi.ipfs.nftstorage.link/';

	// Returned from tokenUri() BEFORE reaching 7 level
	string public backendBaseURL = '';

	constructor(string memory _backendBaseURL, string memory _ipfsMetadataURL) {
		backendBaseURL = _backendBaseURL;
		ipfsMetadataURL = _ipfsMetadataURL;
	}
	/**
	 * Returns URI to NFT metadata
	 * @notice returns link to backend on levels 1-6
	 * @notice returns link to IPFS on level 7
	 */
	function formatTokenURI(uint256 tokenId, NFT memory token) public view returns (string memory) {
		if (token.level == 7) {
			return string(abi.encodePacked(ipfsMetadataURL, generateMetadataFileName(token)));
		}

		return string(abi.encodePacked(backendBaseURL, '/meta/', Strings.toString(tokenId)));
	}

	/**
	 * Returns filname string of metadata file on IPFS
	 * @param token NFT with properties
	 * @dev concatenates only common params, not the robo parts because they are always the same
	 */
	function generateMetadataFileName(NFT memory token) internal pure returns (string memory) {
		return
			string(
				abi.encodePacked(
					Strings.toString(token.color),
					Strings.toString(token.gender),
					Strings.toString(token.background),
					Strings.toString(token.necklace),
					Strings.toString(token.accessories),
					Strings.toString(token.weapon),
					'.json'
				)
			);
	}

	function updateBackendURL(string calldata url) external onlyOwner {
		backendBaseURL = url;
	}

	function updateIPFSMetadataURL(string calldata url) external onlyOwner {
		ipfsMetadataURL = url;
	}
}

File 5 of 38 : PausableMint.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import '@openzeppelin/contracts/security/Pausable.sol';
import '@openzeppelin/contracts/access/Ownable.sol';

contract PausableMint is Pausable, Ownable {
	/*
	 * Pause util functions
	 */
	function pauseMint() external onlyOwner {
		_pause();
	}

	function unpauseMint() external onlyOwner {
		_unpause();
	}
}

File 6 of 38 : Withdrawable.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import '@openzeppelin/contracts/access/Ownable.sol';
import './interfaces/IERC20.sol';

contract Withdrawable is Ownable {
	/**
	 * Withdraw ERC20 from contract to owner address
	 * @param contractAddress addres of ERC20 contract
	 * @notice any ERC20 token can be withdrawed
	 * @notice only owner can withdraw
	 */
	function withdrawERC20(address contractAddress) external onlyOwner {
		uint256 balance = IERC20(contractAddress).balanceOf(address(this));
		bool succeded = IERC20(contractAddress).transfer(msg.sender, balance);
		require(succeded, 'Withdrawable: Transfer did not happen');
	}

	/**
	 * Withdraw ETH from contract to owner address
	 * @notice only owner can withdraw
	 */
	function withdrawETH() external onlyOwner {
		(bool sent, ) = msg.sender.call{value: address(this).balance}('');
		require(sent, 'Failed to withdraw ETH');
	}
}

File 7 of 38 : Royalty.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.13;
import './interfaces/IERC2981.sol';
import '@openzeppelin/contracts/utils/introspection/ERC165.sol';

///
/// @dev Interface for the NFT Royalty Standard
///
contract Royalty is IERC2981, ERC165 {
	/// ERC165 bytes to add to interface array - set in parent contract
	/// implementing this standard
	///
	/// bytes4(keccak256("royaltyInfo(uint256,uint256)")) == 0x2a55205a
	bytes4 internal constant _INTERFACE_ID_ERC2981 = 0x2a55205a;
	address public _receiver;

	// / _registerInterface(_INTERFACE_ID_ERC2981);

	event RoyaltyRecieverChanged(address oldReceiver, address newReceiver);

	constructor(address receiver_) {
		require(receiver_ != address(0), 'Royalty: Trying to set zero address as royalty receiver');
		_receiver = receiver_;
	}

	/// @notice Called with the sale price to determine how much royalty
	//          is owed and to whom.
	/// @param _salePrice - the sale price of the NFT asset specified by _tokenId
	/// @return receiver - address of who should be sent the royalty payment
	/// @return royaltyAmount - the royalty payment amount for _salePrice
	function royaltyInfo(uint256, uint256 _salePrice) external view returns (address receiver, uint256 royaltyAmount) {
		royaltyAmount = (_salePrice / 1000) * 75;
		receiver = _receiver;
	}

	function _changeRoyaltyReceiver(address receiver_) internal {
		require(receiver_ != address(0), 'Royalty: Trying to set zero address as royalty receiver');
		require(msg.sender == _receiver, 'Royalty: Only current receiver can change royalty address');
		
		address oldReceiver = _receiver;

		_receiver = receiver_;

		emit RoyaltyRecieverChanged(oldReceiver, receiver_);
	}
}

File 8 of 38 : IERC20.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

interface IERC20 {
	/**
	 * @dev Returns the amount of tokens owned by `account`.
	 */
	function balanceOf(address account) external view returns (uint256);

	/**
	 * @dev Moves `amount` tokens from the caller's account to `to`.
	 *
	 * Returns a boolean value indicating whether the operation succeeded.
	 *
	 * Emits a {Transfer} event.
	 */
	function transfer(address to, uint256 amount) external returns (bool);
}

File 9 of 38 : SignerVerification.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import '@openzeppelin/contracts/utils/Strings.sol';

library SignerVerification {
    function isMessageVerified(
        address signer,
        bytes calldata signature,
        string calldata concatenatedParams
    ) external pure returns (bool) {
        return recoverSigner(getPrefixedHashMessage(concatenatedParams), signature) == signer;
    }

    function getSigner(bytes calldata signature, string calldata concatenatedParams) external pure returns (address) {
        return recoverSigner(getPrefixedHashMessage(concatenatedParams), signature);
    }

    function getPrefixedHashMessage(string calldata concatenatedParams) internal pure returns (bytes32) {
        uint256 messageLength = bytes(concatenatedParams).length;
        bytes memory prefix = abi.encodePacked('\x19Ethereum Signed Message:\n', Strings.toString(messageLength));
        return keccak256(abi.encodePacked(prefix, concatenatedParams));
    }

    function recoverSigner(bytes32 _ethSignedMessageHash, bytes memory _signature) internal pure returns (address) {
        (bytes32 r, bytes32 s, uint8 v) = splitSignature(_signature);
        return ecrecover(_ethSignedMessageHash, v, r, s);
    }

    function splitSignature(bytes memory sig)
    internal
    pure
    returns (
        bytes32 r,
        bytes32 s,
        uint8 v
    )
    {
        require(sig.length == 65, 'invalid signature length');

        assembly {
            r := mload(add(sig, 32))
            s := mload(add(sig, 64))
            v := byte(0, mload(add(sig, 96)))
        }
    }
}

File 10 of 38 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 11 of 38 : console.sol
// SPDX-License-Identifier: MIT
pragma solidity >= 0.4.22 <0.9.0;

library console {
	address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);

	function _sendLogPayload(bytes memory payload) private view {
		uint256 payloadLength = payload.length;
		address consoleAddress = CONSOLE_ADDRESS;
		assembly {
			let payloadStart := add(payload, 32)
			let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)
		}
	}

	function log() internal view {
		_sendLogPayload(abi.encodeWithSignature("log()"));
	}

	function logInt(int p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(int)", p0));
	}

	function logUint(uint p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint)", p0));
	}

	function logString(string memory p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string)", p0));
	}

	function logBool(bool p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool)", p0));
	}

	function logAddress(address p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address)", p0));
	}

	function logBytes(bytes memory p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes)", p0));
	}

	function logBytes1(bytes1 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes1)", p0));
	}

	function logBytes2(bytes2 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes2)", p0));
	}

	function logBytes3(bytes3 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes3)", p0));
	}

	function logBytes4(bytes4 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes4)", p0));
	}

	function logBytes5(bytes5 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes5)", p0));
	}

	function logBytes6(bytes6 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes6)", p0));
	}

	function logBytes7(bytes7 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes7)", p0));
	}

	function logBytes8(bytes8 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes8)", p0));
	}

	function logBytes9(bytes9 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes9)", p0));
	}

	function logBytes10(bytes10 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes10)", p0));
	}

	function logBytes11(bytes11 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes11)", p0));
	}

	function logBytes12(bytes12 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes12)", p0));
	}

	function logBytes13(bytes13 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes13)", p0));
	}

	function logBytes14(bytes14 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes14)", p0));
	}

	function logBytes15(bytes15 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes15)", p0));
	}

	function logBytes16(bytes16 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes16)", p0));
	}

	function logBytes17(bytes17 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes17)", p0));
	}

	function logBytes18(bytes18 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes18)", p0));
	}

	function logBytes19(bytes19 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes19)", p0));
	}

	function logBytes20(bytes20 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes20)", p0));
	}

	function logBytes21(bytes21 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes21)", p0));
	}

	function logBytes22(bytes22 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes22)", p0));
	}

	function logBytes23(bytes23 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes23)", p0));
	}

	function logBytes24(bytes24 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes24)", p0));
	}

	function logBytes25(bytes25 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes25)", p0));
	}

	function logBytes26(bytes26 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes26)", p0));
	}

	function logBytes27(bytes27 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes27)", p0));
	}

	function logBytes28(bytes28 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes28)", p0));
	}

	function logBytes29(bytes29 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes29)", p0));
	}

	function logBytes30(bytes30 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes30)", p0));
	}

	function logBytes31(bytes31 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes31)", p0));
	}

	function logBytes32(bytes32 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes32)", p0));
	}

	function log(uint p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint)", p0));
	}

	function log(string memory p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string)", p0));
	}

	function log(bool p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool)", p0));
	}

	function log(address p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address)", p0));
	}

	function log(uint p0, uint p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint)", p0, p1));
	}

	function log(uint p0, string memory p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string)", p0, p1));
	}

	function log(uint p0, bool p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool)", p0, p1));
	}

	function log(uint p0, address p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address)", p0, p1));
	}

	function log(string memory p0, uint p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint)", p0, p1));
	}

	function log(string memory p0, string memory p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string)", p0, p1));
	}

	function log(string memory p0, bool p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool)", p0, p1));
	}

	function log(string memory p0, address p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address)", p0, p1));
	}

	function log(bool p0, uint p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint)", p0, p1));
	}

	function log(bool p0, string memory p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string)", p0, p1));
	}

	function log(bool p0, bool p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool)", p0, p1));
	}

	function log(bool p0, address p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address)", p0, p1));
	}

	function log(address p0, uint p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint)", p0, p1));
	}

	function log(address p0, string memory p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string)", p0, p1));
	}

	function log(address p0, bool p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool)", p0, p1));
	}

	function log(address p0, address p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address)", p0, p1));
	}

	function log(uint p0, uint p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint)", p0, p1, p2));
	}

	function log(uint p0, uint p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,string)", p0, p1, p2));
	}

	function log(uint p0, uint p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool)", p0, p1, p2));
	}

	function log(uint p0, uint p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,address)", p0, p1, p2));
	}

	function log(uint p0, string memory p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,uint)", p0, p1, p2));
	}

	function log(uint p0, string memory p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,string)", p0, p1, p2));
	}

	function log(uint p0, string memory p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,bool)", p0, p1, p2));
	}

	function log(uint p0, string memory p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,address)", p0, p1, p2));
	}

	function log(uint p0, bool p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint)", p0, p1, p2));
	}

	function log(uint p0, bool p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,string)", p0, p1, p2));
	}

	function log(uint p0, bool p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool)", p0, p1, p2));
	}

	function log(uint p0, bool p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,address)", p0, p1, p2));
	}

	function log(uint p0, address p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,uint)", p0, p1, p2));
	}

	function log(uint p0, address p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,string)", p0, p1, p2));
	}

	function log(uint p0, address p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,bool)", p0, p1, p2));
	}

	function log(uint p0, address p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,address)", p0, p1, p2));
	}

	function log(string memory p0, uint p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,uint)", p0, p1, p2));
	}

	function log(string memory p0, uint p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,string)", p0, p1, p2));
	}

	function log(string memory p0, uint p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,bool)", p0, p1, p2));
	}

	function log(string memory p0, uint p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,address)", p0, p1, p2));
	}

	function log(string memory p0, string memory p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,uint)", p0, p1, p2));
	}

	function log(string memory p0, string memory p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,string)", p0, p1, p2));
	}

	function log(string memory p0, string memory p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,bool)", p0, p1, p2));
	}

	function log(string memory p0, string memory p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,address)", p0, p1, p2));
	}

	function log(string memory p0, bool p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint)", p0, p1, p2));
	}

	function log(string memory p0, bool p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,string)", p0, p1, p2));
	}

	function log(string memory p0, bool p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool)", p0, p1, p2));
	}

	function log(string memory p0, bool p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,address)", p0, p1, p2));
	}

	function log(string memory p0, address p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,uint)", p0, p1, p2));
	}

	function log(string memory p0, address p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,string)", p0, p1, p2));
	}

	function log(string memory p0, address p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,bool)", p0, p1, p2));
	}

	function log(string memory p0, address p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,address)", p0, p1, p2));
	}

	function log(bool p0, uint p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint)", p0, p1, p2));
	}

	function log(bool p0, uint p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,string)", p0, p1, p2));
	}

	function log(bool p0, uint p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool)", p0, p1, p2));
	}

	function log(bool p0, uint p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,address)", p0, p1, p2));
	}

	function log(bool p0, string memory p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint)", p0, p1, p2));
	}

	function log(bool p0, string memory p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,string)", p0, p1, p2));
	}

	function log(bool p0, string memory p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool)", p0, p1, p2));
	}

	function log(bool p0, string memory p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,address)", p0, p1, p2));
	}

	function log(bool p0, bool p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint)", p0, p1, p2));
	}

	function log(bool p0, bool p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string)", p0, p1, p2));
	}

	function log(bool p0, bool p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool)", p0, p1, p2));
	}

	function log(bool p0, bool p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address)", p0, p1, p2));
	}

	function log(bool p0, address p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint)", p0, p1, p2));
	}

	function log(bool p0, address p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,string)", p0, p1, p2));
	}

	function log(bool p0, address p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool)", p0, p1, p2));
	}

	function log(bool p0, address p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,address)", p0, p1, p2));
	}

	function log(address p0, uint p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,uint)", p0, p1, p2));
	}

	function log(address p0, uint p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,string)", p0, p1, p2));
	}

	function log(address p0, uint p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,bool)", p0, p1, p2));
	}

	function log(address p0, uint p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,address)", p0, p1, p2));
	}

	function log(address p0, string memory p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,uint)", p0, p1, p2));
	}

	function log(address p0, string memory p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,string)", p0, p1, p2));
	}

	function log(address p0, string memory p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,bool)", p0, p1, p2));
	}

	function log(address p0, string memory p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,address)", p0, p1, p2));
	}

	function log(address p0, bool p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint)", p0, p1, p2));
	}

	function log(address p0, bool p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,string)", p0, p1, p2));
	}

	function log(address p0, bool p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool)", p0, p1, p2));
	}

	function log(address p0, bool p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,address)", p0, p1, p2));
	}

	function log(address p0, address p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,uint)", p0, p1, p2));
	}

	function log(address p0, address p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,string)", p0, p1, p2));
	}

	function log(address p0, address p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,bool)", p0, p1, p2));
	}

	function log(address p0, address p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,address)", p0, p1, p2));
	}

	function log(uint p0, uint p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,string)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,address)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,string)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,address)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,string)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,address)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,string)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,address)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,string)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,address)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,string,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,string,string)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,string,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,string,address)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,string)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,address)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,address,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,address,string)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,address,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,address,address)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,string)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,address)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,string)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,address)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,string)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,address)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,string)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,address)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,string)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,address)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,string,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,string,string)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,string,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,string,address)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,string)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,address)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,address,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,address,string)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,address,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,address,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,string,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,string,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,string,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,string,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,address,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,address,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,address,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,address,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,uint,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,uint,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,uint,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,uint,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,string,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,string,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,string,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,string,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,bool,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,bool,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,bool,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,bool,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,address,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,address,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,address,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,address,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,string,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,string,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,string,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,string,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,address,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,address,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,address,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,address,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,uint,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,uint,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,uint,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,uint,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,string,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,string,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,string,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,string,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,bool,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,bool,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,bool,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,bool,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,address,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,address,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,address,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,address,address)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,string)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,address)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,string)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,address)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,string)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,address)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,string)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,address)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,string)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,address)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,string,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,string,string)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,string,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,string,address)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,string)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,address)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,address,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,address,string)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,address,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,address,address)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,string)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,address)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,string)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,address)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,string)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,address)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,string)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,address)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,string)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,address)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,string,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,string,string)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,string,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,string,address)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,string)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,address)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,address,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,address,string)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,address,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,address,address)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,uint)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,string)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,bool)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,address)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,string,uint)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,string,string)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,string,bool)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,string,address)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,uint)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,string)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,bool)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,address)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,address,uint)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,address,string)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,address,bool)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,address,address)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,uint,uint)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,uint,string)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,uint,bool)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,uint,address)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,string,uint)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,string,string)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,string,bool)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,string,address)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,bool,uint)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,bool,string)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,bool,bool)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,bool,address)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,address,uint)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,address,string)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,address,bool)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,address,address)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,uint)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,string)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,bool)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,address)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,string,uint)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,string,string)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,string,bool)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,string,address)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,uint)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,string)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,bool)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,address)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,address,uint)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,address,string)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,address,bool)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,address,address)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,uint,uint)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,uint,string)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,uint,bool)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,uint,address)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,string,uint)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,string,string)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,string,bool)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,string,address)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,bool,uint)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,bool,string)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,bool,bool)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,bool,address)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,address,uint)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,address,string)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,address,bool)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,address,address)", p0, p1, p2, p3));
	}

}

File 12 of 38 : IERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v3.3.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import '@openzeppelin/contracts/token/ERC721/IERC721.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol';

/**
 * @dev Interface of an ERC721A compliant contract.
 */
interface IERC721A is IERC721, IERC721Metadata {
    /**
     * The caller must own the token or be an approved operator.
     */
    error ApprovalCallerNotOwnerNorApproved();

    /**
     * The token does not exist.
     */
    error ApprovalQueryForNonexistentToken();

    /**
     * The caller cannot approve to their own address.
     */
    error ApproveToCaller();

    /**
     * The caller cannot approve to the current owner.
     */
    error ApprovalToCurrentOwner();

    /**
     * Cannot query the balance for the zero address.
     */
    error BalanceQueryForZeroAddress();

    /**
     * Cannot mint to the zero address.
     */
    error MintToZeroAddress();

    /**
     * The quantity of tokens minted must be more than zero.
     */
    error MintZeroQuantity();

    /**
     * The token does not exist.
     */
    error OwnerQueryForNonexistentToken();

    /**
     * The caller must own the token or be an approved operator.
     */
    error TransferCallerNotOwnerNorApproved();

    /**
     * The token must be owned by `from`.
     */
    error TransferFromIncorrectOwner();

    /**
     * Cannot safely transfer to a contract that does not implement the ERC721Receiver interface.
     */
    error TransferToNonERC721ReceiverImplementer();

    /**
     * Cannot transfer to the zero address.
     */
    error TransferToZeroAddress();

    /**
     * The token does not exist.
     */
    error URIQueryForNonexistentToken();

    // Compiler will pack this into a single 256bit word.
    struct TokenOwnership {
        // The address of the owner.
        address addr;
        // Keeps track of the start time of ownership with minimal overhead for tokenomics.
        uint64 startTimestamp;
        // Whether the token has been burned.
        bool burned;
    }

    // Compiler will pack this into a single 256bit word.
    struct AddressData {
        // Realistically, 2**64-1 is more than enough.
        uint64 balance;
        // Keeps track of mint count with minimal overhead for tokenomics.
        uint64 numberMinted;
        // Keeps track of burn count with minimal overhead for tokenomics.
        uint64 numberBurned;
        // For miscellaneous variable(s) pertaining to the address
        // (e.g. number of whitelist mint slots used).
        // If there are multiple variables, please pack them into a uint64.
        uint64 aux;
    }

    /**
     * @dev Returns the total amount of tokens stored by the contract.
     * 
     * Burned tokens are calculated here, use `_totalMinted()` if you want to count just minted tokens.
     */
    function totalSupply() external view returns (uint256);
}

File 13 of 38 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 14 of 38 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev 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");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly
                /// @solidity memory-safe-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 15 of 38 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 16 of 38 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
    uint8 private constant _ADDRESS_LENGTH = 20;

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }
}

File 17 of 38 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 18 of 38 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: 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 Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);
}

File 19 of 38 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Metadata is IERC721 {
    /**
     * @dev Returns the token collection name.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the token collection symbol.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) external view returns (string memory);
}

File 20 of 38 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 21 of 38 : VRFConsumerBaseV2.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

/** ****************************************************************************
 * @notice Interface for contracts using VRF randomness
 * *****************************************************************************
 * @dev PURPOSE
 *
 * @dev Reggie the Random Oracle (not his real job) wants to provide randomness
 * @dev to Vera the verifier in such a way that Vera can be sure he's not
 * @dev making his output up to suit himself. Reggie provides Vera a public key
 * @dev to which he knows the secret key. Each time Vera provides a seed to
 * @dev Reggie, he gives back a value which is computed completely
 * @dev deterministically from the seed and the secret key.
 *
 * @dev Reggie provides a proof by which Vera can verify that the output was
 * @dev correctly computed once Reggie tells it to her, but without that proof,
 * @dev the output is indistinguishable to her from a uniform random sample
 * @dev from the output space.
 *
 * @dev The purpose of this contract is to make it easy for unrelated contracts
 * @dev to talk to Vera the verifier about the work Reggie is doing, to provide
 * @dev simple access to a verifiable source of randomness. It ensures 2 things:
 * @dev 1. The fulfillment came from the VRFCoordinator
 * @dev 2. The consumer contract implements fulfillRandomWords.
 * *****************************************************************************
 * @dev USAGE
 *
 * @dev Calling contracts must inherit from VRFConsumerBase, and can
 * @dev initialize VRFConsumerBase's attributes in their constructor as
 * @dev shown:
 *
 * @dev   contract VRFConsumer {
 * @dev     constructor(<other arguments>, address _vrfCoordinator, address _link)
 * @dev       VRFConsumerBase(_vrfCoordinator) public {
 * @dev         <initialization with other arguments goes here>
 * @dev       }
 * @dev   }
 *
 * @dev The oracle will have given you an ID for the VRF keypair they have
 * @dev committed to (let's call it keyHash). Create subscription, fund it
 * @dev and your consumer contract as a consumer of it (see VRFCoordinatorInterface
 * @dev subscription management functions).
 * @dev Call requestRandomWords(keyHash, subId, minimumRequestConfirmations,
 * @dev callbackGasLimit, numWords),
 * @dev see (VRFCoordinatorInterface for a description of the arguments).
 *
 * @dev Once the VRFCoordinator has received and validated the oracle's response
 * @dev to your request, it will call your contract's fulfillRandomWords method.
 *
 * @dev The randomness argument to fulfillRandomWords is a set of random words
 * @dev generated from your requestId and the blockHash of the request.
 *
 * @dev If your contract could have concurrent requests open, you can use the
 * @dev requestId returned from requestRandomWords to track which response is associated
 * @dev with which randomness request.
 * @dev See "SECURITY CONSIDERATIONS" for principles to keep in mind,
 * @dev if your contract could have multiple requests in flight simultaneously.
 *
 * @dev Colliding `requestId`s are cryptographically impossible as long as seeds
 * @dev differ.
 *
 * *****************************************************************************
 * @dev SECURITY CONSIDERATIONS
 *
 * @dev A method with the ability to call your fulfillRandomness method directly
 * @dev could spoof a VRF response with any random value, so it's critical that
 * @dev it cannot be directly called by anything other than this base contract
 * @dev (specifically, by the VRFConsumerBase.rawFulfillRandomness method).
 *
 * @dev For your users to trust that your contract's random behavior is free
 * @dev from malicious interference, it's best if you can write it so that all
 * @dev behaviors implied by a VRF response are executed *during* your
 * @dev fulfillRandomness method. If your contract must store the response (or
 * @dev anything derived from it) and use it later, you must ensure that any
 * @dev user-significant behavior which depends on that stored value cannot be
 * @dev manipulated by a subsequent VRF request.
 *
 * @dev Similarly, both miners and the VRF oracle itself have some influence
 * @dev over the order in which VRF responses appear on the blockchain, so if
 * @dev your contract could have multiple VRF requests in flight simultaneously,
 * @dev you must ensure that the order in which the VRF responses arrive cannot
 * @dev be used to manipulate your contract's user-significant behavior.
 *
 * @dev Since the block hash of the block which contains the requestRandomness
 * @dev call is mixed into the input to the VRF *last*, a sufficiently powerful
 * @dev miner could, in principle, fork the blockchain to evict the block
 * @dev containing the request, forcing the request to be included in a
 * @dev different block with a different hash, and therefore a different input
 * @dev to the VRF. However, such an attack would incur a substantial economic
 * @dev cost. This cost scales with the number of blocks the VRF oracle waits
 * @dev until it calls responds to a request. It is for this reason that
 * @dev that you can signal to an oracle you'd like them to wait longer before
 * @dev responding to the request (however this is not enforced in the contract
 * @dev and so remains effective only in the case of unmodified oracle software).
 */
abstract contract VRFConsumerBaseV2 {
  error OnlyCoordinatorCanFulfill(address have, address want);
  address private immutable vrfCoordinator;

  /**
   * @param _vrfCoordinator address of VRFCoordinator contract
   */
  constructor(address _vrfCoordinator) {
    vrfCoordinator = _vrfCoordinator;
  }

  /**
   * @notice fulfillRandomness handles the VRF response. Your contract must
   * @notice implement it. See "SECURITY CONSIDERATIONS" above for important
   * @notice principles to keep in mind when implementing your fulfillRandomness
   * @notice method.
   *
   * @dev VRFConsumerBaseV2 expects its subcontracts to have a method with this
   * @dev signature, and will call it once it has verified the proof
   * @dev associated with the randomness. (It is triggered via a call to
   * @dev rawFulfillRandomness, below.)
   *
   * @param requestId The Id initially returned by requestRandomness
   * @param randomWords the VRF output expanded to the requested number of words
   */
  function fulfillRandomWords(uint256 requestId, uint256[] memory randomWords) internal virtual;

  // rawFulfillRandomness is called by VRFCoordinator when it receives a valid VRF
  // proof. rawFulfillRandomness then calls fulfillRandomness, after validating
  // the origin of the call
  function rawFulfillRandomWords(uint256 requestId, uint256[] memory randomWords) external {
    if (msg.sender != vrfCoordinator) {
      revert OnlyCoordinatorCanFulfill(msg.sender, vrfCoordinator);
    }
    fulfillRandomWords(requestId, randomWords);
  }
}

File 22 of 38 : VRFCoordinatorV2Interface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface VRFCoordinatorV2Interface {
  /**
   * @notice Get configuration relevant for making requests
   * @return minimumRequestConfirmations global min for request confirmations
   * @return maxGasLimit global max for request gas limit
   * @return s_provingKeyHashes list of registered key hashes
   */
  function getRequestConfig()
    external
    view
    returns (
      uint16,
      uint32,
      bytes32[] memory
    );

  /**
   * @notice Request a set of random words.
   * @param keyHash - Corresponds to a particular oracle job which uses
   * that key for generating the VRF proof. Different keyHash's have different gas price
   * ceilings, so you can select a specific one to bound your maximum per request cost.
   * @param subId  - The ID of the VRF subscription. Must be funded
   * with the minimum subscription balance required for the selected keyHash.
   * @param minimumRequestConfirmations - How many blocks you'd like the
   * oracle to wait before responding to the request. See SECURITY CONSIDERATIONS
   * for why you may want to request more. The acceptable range is
   * [minimumRequestBlockConfirmations, 200].
   * @param callbackGasLimit - How much gas you'd like to receive in your
   * fulfillRandomWords callback. Note that gasleft() inside fulfillRandomWords
   * may be slightly less than this amount because of gas used calling the function
   * (argument decoding etc.), so you may need to request slightly more than you expect
   * to have inside fulfillRandomWords. The acceptable range is
   * [0, maxGasLimit]
   * @param numWords - The number of uint256 random values you'd like to receive
   * in your fulfillRandomWords callback. Note these numbers are expanded in a
   * secure way by the VRFCoordinator from a single random value supplied by the oracle.
   * @return requestId - A unique identifier of the request. Can be used to match
   * a request to a response in fulfillRandomWords.
   */
  function requestRandomWords(
    bytes32 keyHash,
    uint64 subId,
    uint16 minimumRequestConfirmations,
    uint32 callbackGasLimit,
    uint32 numWords
  ) external returns (uint256 requestId);

  /**
   * @notice Create a VRF subscription.
   * @return subId - A unique subscription id.
   * @dev You can manage the consumer set dynamically with addConsumer/removeConsumer.
   * @dev Note to fund the subscription, use transferAndCall. For example
   * @dev  LINKTOKEN.transferAndCall(
   * @dev    address(COORDINATOR),
   * @dev    amount,
   * @dev    abi.encode(subId));
   */
  function createSubscription() external returns (uint64 subId);

  /**
   * @notice Get a VRF subscription.
   * @param subId - ID of the subscription
   * @return balance - LINK balance of the subscription in juels.
   * @return reqCount - number of requests for this subscription, determines fee tier.
   * @return owner - owner of the subscription.
   * @return consumers - list of consumer address which are able to use this subscription.
   */
  function getSubscription(uint64 subId)
    external
    view
    returns (
      uint96 balance,
      uint64 reqCount,
      address owner,
      address[] memory consumers
    );

  /**
   * @notice Request subscription owner transfer.
   * @param subId - ID of the subscription
   * @param newOwner - proposed new owner of the subscription
   */
  function requestSubscriptionOwnerTransfer(uint64 subId, address newOwner) external;

  /**
   * @notice Request subscription owner transfer.
   * @param subId - ID of the subscription
   * @dev will revert if original owner of subId has
   * not requested that msg.sender become the new owner.
   */
  function acceptSubscriptionOwnerTransfer(uint64 subId) external;

  /**
   * @notice Add a consumer to a VRF subscription.
   * @param subId - ID of the subscription
   * @param consumer - New consumer which can use the subscription
   */
  function addConsumer(uint64 subId, address consumer) external;

  /**
   * @notice Remove a consumer from a VRF subscription.
   * @param subId - ID of the subscription
   * @param consumer - Consumer to remove from the subscription
   */
  function removeConsumer(uint64 subId, address consumer) external;

  /**
   * @notice Cancel a subscription
   * @param subId - ID of the subscription
   * @param to - Where to send the remaining LINK to
   */
  function cancelSubscription(uint64 subId, address to) external;
}

File 23 of 38 : ChainlinkClient.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./Chainlink.sol";
import "./interfaces/ENSInterface.sol";
import "./interfaces/LinkTokenInterface.sol";
import "./interfaces/ChainlinkRequestInterface.sol";
import "./interfaces/OperatorInterface.sol";
import "./interfaces/PointerInterface.sol";
import {ENSResolver as ENSResolver_Chainlink} from "./vendor/ENSResolver.sol";

/**
 * @title The ChainlinkClient contract
 * @notice Contract writers can inherit this contract in order to create requests for the
 * Chainlink network
 */
abstract contract ChainlinkClient {
  using Chainlink for Chainlink.Request;

  uint256 internal constant LINK_DIVISIBILITY = 10**18;
  uint256 private constant AMOUNT_OVERRIDE = 0;
  address private constant SENDER_OVERRIDE = address(0);
  uint256 private constant ORACLE_ARGS_VERSION = 1;
  uint256 private constant OPERATOR_ARGS_VERSION = 2;
  bytes32 private constant ENS_TOKEN_SUBNAME = keccak256("link");
  bytes32 private constant ENS_ORACLE_SUBNAME = keccak256("oracle");
  address private constant LINK_TOKEN_POINTER = 0xC89bD4E1632D3A43CB03AAAd5262cbe4038Bc571;

  ENSInterface private s_ens;
  bytes32 private s_ensNode;
  LinkTokenInterface private s_link;
  OperatorInterface private s_oracle;
  uint256 private s_requestCount = 1;
  mapping(bytes32 => address) private s_pendingRequests;

  event ChainlinkRequested(bytes32 indexed id);
  event ChainlinkFulfilled(bytes32 indexed id);
  event ChainlinkCancelled(bytes32 indexed id);

  /**
   * @notice Creates a request that can hold additional parameters
   * @param specId The Job Specification ID that the request will be created for
   * @param callbackAddr address to operate the callback on
   * @param callbackFunctionSignature function signature to use for the callback
   * @return A Chainlink Request struct in memory
   */
  function buildChainlinkRequest(
    bytes32 specId,
    address callbackAddr,
    bytes4 callbackFunctionSignature
  ) internal pure returns (Chainlink.Request memory) {
    Chainlink.Request memory req;
    return req.initialize(specId, callbackAddr, callbackFunctionSignature);
  }

  /**
   * @notice Creates a request that can hold additional parameters
   * @param specId The Job Specification ID that the request will be created for
   * @param callbackFunctionSignature function signature to use for the callback
   * @return A Chainlink Request struct in memory
   */
  function buildOperatorRequest(bytes32 specId, bytes4 callbackFunctionSignature)
    internal
    view
    returns (Chainlink.Request memory)
  {
    Chainlink.Request memory req;
    return req.initialize(specId, address(this), callbackFunctionSignature);
  }

  /**
   * @notice Creates a Chainlink request to the stored oracle address
   * @dev Calls `chainlinkRequestTo` with the stored oracle address
   * @param req The initialized Chainlink Request
   * @param payment The amount of LINK to send for the request
   * @return requestId The request ID
   */
  function sendChainlinkRequest(Chainlink.Request memory req, uint256 payment) internal returns (bytes32) {
    return sendChainlinkRequestTo(address(s_oracle), req, payment);
  }

  /**
   * @notice Creates a Chainlink request to the specified oracle address
   * @dev Generates and stores a request ID, increments the local nonce, and uses `transferAndCall` to
   * send LINK which creates a request on the target oracle contract.
   * Emits ChainlinkRequested event.
   * @param oracleAddress The address of the oracle for the request
   * @param req The initialized Chainlink Request
   * @param payment The amount of LINK to send for the request
   * @return requestId The request ID
   */
  function sendChainlinkRequestTo(
    address oracleAddress,
    Chainlink.Request memory req,
    uint256 payment
  ) internal returns (bytes32 requestId) {
    uint256 nonce = s_requestCount;
    s_requestCount = nonce + 1;
    bytes memory encodedRequest = abi.encodeWithSelector(
      ChainlinkRequestInterface.oracleRequest.selector,
      SENDER_OVERRIDE, // Sender value - overridden by onTokenTransfer by the requesting contract's address
      AMOUNT_OVERRIDE, // Amount value - overridden by onTokenTransfer by the actual amount of LINK sent
      req.id,
      address(this),
      req.callbackFunctionId,
      nonce,
      ORACLE_ARGS_VERSION,
      req.buf.buf
    );
    return _rawRequest(oracleAddress, nonce, payment, encodedRequest);
  }

  /**
   * @notice Creates a Chainlink request to the stored oracle address
   * @dev This function supports multi-word response
   * @dev Calls `sendOperatorRequestTo` with the stored oracle address
   * @param req The initialized Chainlink Request
   * @param payment The amount of LINK to send for the request
   * @return requestId The request ID
   */
  function sendOperatorRequest(Chainlink.Request memory req, uint256 payment) internal returns (bytes32) {
    return sendOperatorRequestTo(address(s_oracle), req, payment);
  }

  /**
   * @notice Creates a Chainlink request to the specified oracle address
   * @dev This function supports multi-word response
   * @dev Generates and stores a request ID, increments the local nonce, and uses `transferAndCall` to
   * send LINK which creates a request on the target oracle contract.
   * Emits ChainlinkRequested event.
   * @param oracleAddress The address of the oracle for the request
   * @param req The initialized Chainlink Request
   * @param payment The amount of LINK to send for the request
   * @return requestId The request ID
   */
  function sendOperatorRequestTo(
    address oracleAddress,
    Chainlink.Request memory req,
    uint256 payment
  ) internal returns (bytes32 requestId) {
    uint256 nonce = s_requestCount;
    s_requestCount = nonce + 1;
    bytes memory encodedRequest = abi.encodeWithSelector(
      OperatorInterface.operatorRequest.selector,
      SENDER_OVERRIDE, // Sender value - overridden by onTokenTransfer by the requesting contract's address
      AMOUNT_OVERRIDE, // Amount value - overridden by onTokenTransfer by the actual amount of LINK sent
      req.id,
      req.callbackFunctionId,
      nonce,
      OPERATOR_ARGS_VERSION,
      req.buf.buf
    );
    return _rawRequest(oracleAddress, nonce, payment, encodedRequest);
  }

  /**
   * @notice Make a request to an oracle
   * @param oracleAddress The address of the oracle for the request
   * @param nonce used to generate the request ID
   * @param payment The amount of LINK to send for the request
   * @param encodedRequest data encoded for request type specific format
   * @return requestId The request ID
   */
  function _rawRequest(
    address oracleAddress,
    uint256 nonce,
    uint256 payment,
    bytes memory encodedRequest
  ) private returns (bytes32 requestId) {
    requestId = keccak256(abi.encodePacked(this, nonce));
    s_pendingRequests[requestId] = oracleAddress;
    emit ChainlinkRequested(requestId);
    require(s_link.transferAndCall(oracleAddress, payment, encodedRequest), "unable to transferAndCall to oracle");
  }

  /**
   * @notice Allows a request to be cancelled if it has not been fulfilled
   * @dev Requires keeping track of the expiration value emitted from the oracle contract.
   * Deletes the request from the `pendingRequests` mapping.
   * Emits ChainlinkCancelled event.
   * @param requestId The request ID
   * @param payment The amount of LINK sent for the request
   * @param callbackFunc The callback function specified for the request
   * @param expiration The time of the expiration for the request
   */
  function cancelChainlinkRequest(
    bytes32 requestId,
    uint256 payment,
    bytes4 callbackFunc,
    uint256 expiration
  ) internal {
    OperatorInterface requested = OperatorInterface(s_pendingRequests[requestId]);
    delete s_pendingRequests[requestId];
    emit ChainlinkCancelled(requestId);
    requested.cancelOracleRequest(requestId, payment, callbackFunc, expiration);
  }

  /**
   * @notice the next request count to be used in generating a nonce
   * @dev starts at 1 in order to ensure consistent gas cost
   * @return returns the next request count to be used in a nonce
   */
  function getNextRequestCount() internal view returns (uint256) {
    return s_requestCount;
  }

  /**
   * @notice Sets the stored oracle address
   * @param oracleAddress The address of the oracle contract
   */
  function setChainlinkOracle(address oracleAddress) internal {
    s_oracle = OperatorInterface(oracleAddress);
  }

  /**
   * @notice Sets the LINK token address
   * @param linkAddress The address of the LINK token contract
   */
  function setChainlinkToken(address linkAddress) internal {
    s_link = LinkTokenInterface(linkAddress);
  }

  /**
   * @notice Sets the Chainlink token address for the public
   * network as given by the Pointer contract
   */
  function setPublicChainlinkToken() internal {
    setChainlinkToken(PointerInterface(LINK_TOKEN_POINTER).getAddress());
  }

  /**
   * @notice Retrieves the stored address of the LINK token
   * @return The address of the LINK token
   */
  function chainlinkTokenAddress() internal view returns (address) {
    return address(s_link);
  }

  /**
   * @notice Retrieves the stored address of the oracle contract
   * @return The address of the oracle contract
   */
  function chainlinkOracleAddress() internal view returns (address) {
    return address(s_oracle);
  }

  /**
   * @notice Allows for a request which was created on another contract to be fulfilled
   * on this contract
   * @param oracleAddress The address of the oracle contract that will fulfill the request
   * @param requestId The request ID used for the response
   */
  function addChainlinkExternalRequest(address oracleAddress, bytes32 requestId) internal notPendingRequest(requestId) {
    s_pendingRequests[requestId] = oracleAddress;
  }

  /**
   * @notice Sets the stored oracle and LINK token contracts with the addresses resolved by ENS
   * @dev Accounts for subnodes having different resolvers
   * @param ensAddress The address of the ENS contract
   * @param node The ENS node hash
   */
  function useChainlinkWithENS(address ensAddress, bytes32 node) internal {
    s_ens = ENSInterface(ensAddress);
    s_ensNode = node;
    bytes32 linkSubnode = keccak256(abi.encodePacked(s_ensNode, ENS_TOKEN_SUBNAME));
    ENSResolver_Chainlink resolver = ENSResolver_Chainlink(s_ens.resolver(linkSubnode));
    setChainlinkToken(resolver.addr(linkSubnode));
    updateChainlinkOracleWithENS();
  }

  /**
   * @notice Sets the stored oracle contract with the address resolved by ENS
   * @dev This may be called on its own as long as `useChainlinkWithENS` has been called previously
   */
  function updateChainlinkOracleWithENS() internal {
    bytes32 oracleSubnode = keccak256(abi.encodePacked(s_ensNode, ENS_ORACLE_SUBNAME));
    ENSResolver_Chainlink resolver = ENSResolver_Chainlink(s_ens.resolver(oracleSubnode));
    setChainlinkOracle(resolver.addr(oracleSubnode));
  }

  /**
   * @notice Ensures that the fulfillment is valid for this contract
   * @dev Use if the contract developer prefers methods instead of modifiers for validation
   * @param requestId The request ID for fulfillment
   */
  function validateChainlinkCallback(bytes32 requestId)
    internal
    recordChainlinkFulfillment(requestId)
  // solhint-disable-next-line no-empty-blocks
  {

  }

  /**
   * @dev Reverts if the sender is not the oracle of the request.
   * Emits ChainlinkFulfilled event.
   * @param requestId The request ID for fulfillment
   */
  modifier recordChainlinkFulfillment(bytes32 requestId) {
    require(msg.sender == s_pendingRequests[requestId], "Source must be the oracle of the request");
    delete s_pendingRequests[requestId];
    emit ChainlinkFulfilled(requestId);
    _;
  }

  /**
   * @dev Reverts if the request is already pending
   * @param requestId The request ID for fulfillment
   */
  modifier notPendingRequest(bytes32 requestId) {
    require(s_pendingRequests[requestId] == address(0), "Request is already pending");
    _;
  }
}

File 24 of 38 : ChainlinkConfigManager.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
import '@openzeppelin/contracts/access/Ownable.sol';

struct ChainlinkConfig {
	address linkToken;
	address oracle;
	bytes32 jobId;
	uint256 fee;
}

contract ChainlinkConfigManager is Ownable {
	address internal oracle;
	bytes32 internal jobId;
	uint256 internal fee;

	event ChainlinkConfigChanged(address oracle, bytes32 jobId, uint256 fee);

	constructor(ChainlinkConfig memory _chainlinkConfig) {
		// Chainlink setup
		oracle = _chainlinkConfig.oracle;
		jobId = _chainlinkConfig.jobId;
		fee = _chainlinkConfig.fee;
	}

	function changeChainlinkConfig(ChainlinkConfig memory chainlinkConfig) external onlyOwner {
		oracle = chainlinkConfig.oracle;
		jobId = chainlinkConfig.jobId;
		fee = chainlinkConfig.fee;

		emit ChainlinkConfigChanged(oracle, jobId, fee);
	}
}

File 25 of 38 : ChainlinkVRFConfigManager.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
import '@openzeppelin/contracts/access/Ownable.sol';
import '@chainlink/contracts/src/v0.8/interfaces/VRFCoordinatorV2Interface.sol';

struct ChainlinkVRFConfig {
	address vrfCoordinator;
	bytes32 keyHash;
	uint64 subscriptionId;
	uint32 callbackGasLimit;
	uint16 requestConfirmations;
}

contract ChainlinkVRFConfigManager is Ownable {
	VRFCoordinatorV2Interface COORDINATOR;

	address public vrfCoordinator;

	// ID from subscription manager
	uint64 internal subscriptionId;

	// Keyhash depends on callbackGasLimit
	bytes32 internal keyHash;
	// Must be one of given gasLimits for network
	uint32 internal callbackGasLimit;
	uint16 internal requestConfirmations;

	event ChainlinkVRFConfigChanged(
		uint256 subscriptionId,
		bytes32 keyHash,
		uint32 callbackGasLimit,
		uint16 requestConfirmations
	);

	constructor(ChainlinkVRFConfig memory _chainlinkVRFConfig) {
		// ChainlinkVRF setup
		COORDINATOR = VRFCoordinatorV2Interface(_chainlinkVRFConfig.vrfCoordinator);

		vrfCoordinator = _chainlinkVRFConfig.vrfCoordinator;
		keyHash = _chainlinkVRFConfig.keyHash;
		callbackGasLimit = _chainlinkVRFConfig.callbackGasLimit;
		subscriptionId = _chainlinkVRFConfig.subscriptionId;
		requestConfirmations = _chainlinkVRFConfig.requestConfirmations;
	}

	function changeChainlinkVRFConfig(ChainlinkVRFConfig memory chainlinkVRFConfig) external onlyOwner {
		subscriptionId = chainlinkVRFConfig.subscriptionId;
		keyHash = chainlinkVRFConfig.keyHash;
		callbackGasLimit = chainlinkVRFConfig.callbackGasLimit;
		requestConfirmations = chainlinkVRFConfig.requestConfirmations;

		emit ChainlinkVRFConfigChanged(subscriptionId, keyHash, callbackGasLimit, requestConfirmations);
	}
}

File 26 of 38 : Chainlink.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {CBORChainlink} from "./vendor/CBORChainlink.sol";
import {BufferChainlink} from "./vendor/BufferChainlink.sol";

/**
 * @title Library for common Chainlink functions
 * @dev Uses imported CBOR library for encoding to buffer
 */
library Chainlink {
  uint256 internal constant defaultBufferSize = 256; // solhint-disable-line const-name-snakecase

  using CBORChainlink for BufferChainlink.buffer;

  struct Request {
    bytes32 id;
    address callbackAddress;
    bytes4 callbackFunctionId;
    uint256 nonce;
    BufferChainlink.buffer buf;
  }

  /**
   * @notice Initializes a Chainlink request
   * @dev Sets the ID, callback address, and callback function signature on the request
   * @param self The uninitialized request
   * @param jobId The Job Specification ID
   * @param callbackAddr The callback address
   * @param callbackFunc The callback function signature
   * @return The initialized request
   */
  function initialize(
    Request memory self,
    bytes32 jobId,
    address callbackAddr,
    bytes4 callbackFunc
  ) internal pure returns (Chainlink.Request memory) {
    BufferChainlink.init(self.buf, defaultBufferSize);
    self.id = jobId;
    self.callbackAddress = callbackAddr;
    self.callbackFunctionId = callbackFunc;
    return self;
  }

  /**
   * @notice Sets the data for the buffer without encoding CBOR on-chain
   * @dev CBOR can be closed with curly-brackets {} or they can be left off
   * @param self The initialized request
   * @param data The CBOR data
   */
  function setBuffer(Request memory self, bytes memory data) internal pure {
    BufferChainlink.init(self.buf, data.length);
    BufferChainlink.append(self.buf, data);
  }

  /**
   * @notice Adds a string value to the request with a given key name
   * @param self The initialized request
   * @param key The name of the key
   * @param value The string value to add
   */
  function add(
    Request memory self,
    string memory key,
    string memory value
  ) internal pure {
    self.buf.encodeString(key);
    self.buf.encodeString(value);
  }

  /**
   * @notice Adds a bytes value to the request with a given key name
   * @param self The initialized request
   * @param key The name of the key
   * @param value The bytes value to add
   */
  function addBytes(
    Request memory self,
    string memory key,
    bytes memory value
  ) internal pure {
    self.buf.encodeString(key);
    self.buf.encodeBytes(value);
  }

  /**
   * @notice Adds a int256 value to the request with a given key name
   * @param self The initialized request
   * @param key The name of the key
   * @param value The int256 value to add
   */
  function addInt(
    Request memory self,
    string memory key,
    int256 value
  ) internal pure {
    self.buf.encodeString(key);
    self.buf.encodeInt(value);
  }

  /**
   * @notice Adds a uint256 value to the request with a given key name
   * @param self The initialized request
   * @param key The name of the key
   * @param value The uint256 value to add
   */
  function addUint(
    Request memory self,
    string memory key,
    uint256 value
  ) internal pure {
    self.buf.encodeString(key);
    self.buf.encodeUInt(value);
  }

  /**
   * @notice Adds an array of strings to the request with a given key name
   * @param self The initialized request
   * @param key The name of the key
   * @param values The array of string values to add
   */
  function addStringArray(
    Request memory self,
    string memory key,
    string[] memory values
  ) internal pure {
    self.buf.encodeString(key);
    self.buf.startArray();
    for (uint256 i = 0; i < values.length; i++) {
      self.buf.encodeString(values[i]);
    }
    self.buf.endSequence();
  }
}

File 27 of 38 : ENSInterface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface ENSInterface {
  // Logged when the owner of a node assigns a new owner to a subnode.
  event NewOwner(bytes32 indexed node, bytes32 indexed label, address owner);

  // Logged when the owner of a node transfers ownership to a new account.
  event Transfer(bytes32 indexed node, address owner);

  // Logged when the resolver for a node changes.
  event NewResolver(bytes32 indexed node, address resolver);

  // Logged when the TTL of a node changes
  event NewTTL(bytes32 indexed node, uint64 ttl);

  function setSubnodeOwner(
    bytes32 node,
    bytes32 label,
    address owner
  ) external;

  function setResolver(bytes32 node, address resolver) external;

  function setOwner(bytes32 node, address owner) external;

  function setTTL(bytes32 node, uint64 ttl) external;

  function owner(bytes32 node) external view returns (address);

  function resolver(bytes32 node) external view returns (address);

  function ttl(bytes32 node) external view returns (uint64);
}

File 28 of 38 : LinkTokenInterface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface LinkTokenInterface {
  function allowance(address owner, address spender) external view returns (uint256 remaining);

  function approve(address spender, uint256 value) external returns (bool success);

  function balanceOf(address owner) external view returns (uint256 balance);

  function decimals() external view returns (uint8 decimalPlaces);

  function decreaseApproval(address spender, uint256 addedValue) external returns (bool success);

  function increaseApproval(address spender, uint256 subtractedValue) external;

  function name() external view returns (string memory tokenName);

  function symbol() external view returns (string memory tokenSymbol);

  function totalSupply() external view returns (uint256 totalTokensIssued);

  function transfer(address to, uint256 value) external returns (bool success);

  function transferAndCall(
    address to,
    uint256 value,
    bytes calldata data
  ) external returns (bool success);

  function transferFrom(
    address from,
    address to,
    uint256 value
  ) external returns (bool success);
}

File 29 of 38 : ChainlinkRequestInterface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface ChainlinkRequestInterface {
  function oracleRequest(
    address sender,
    uint256 requestPrice,
    bytes32 serviceAgreementID,
    address callbackAddress,
    bytes4 callbackFunctionId,
    uint256 nonce,
    uint256 dataVersion,
    bytes calldata data
  ) external;

  function cancelOracleRequest(
    bytes32 requestId,
    uint256 payment,
    bytes4 callbackFunctionId,
    uint256 expiration
  ) external;
}

File 30 of 38 : OperatorInterface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./OracleInterface.sol";
import "./ChainlinkRequestInterface.sol";

interface OperatorInterface is OracleInterface, ChainlinkRequestInterface {
  function operatorRequest(
    address sender,
    uint256 payment,
    bytes32 specId,
    bytes4 callbackFunctionId,
    uint256 nonce,
    uint256 dataVersion,
    bytes calldata data
  ) external;

  function fulfillOracleRequest2(
    bytes32 requestId,
    uint256 payment,
    address callbackAddress,
    bytes4 callbackFunctionId,
    uint256 expiration,
    bytes calldata data
  ) external returns (bool);

  function ownerTransferAndCall(
    address to,
    uint256 value,
    bytes calldata data
  ) external returns (bool success);

  function distributeFunds(address payable[] calldata receivers, uint256[] calldata amounts) external payable;

  function getAuthorizedSenders() external returns (address[] memory);

  function setAuthorizedSenders(address[] calldata senders) external;

  function getForwarder() external returns (address);
}

File 31 of 38 : PointerInterface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface PointerInterface {
  function getAddress() external view returns (address);
}

File 32 of 38 : ENSResolver.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

abstract contract ENSResolver {
  function addr(bytes32 node) public view virtual returns (address);
}

File 33 of 38 : CBORChainlink.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.4.19;

import {BufferChainlink} from "./BufferChainlink.sol";

library CBORChainlink {
  using BufferChainlink for BufferChainlink.buffer;

  uint8 private constant MAJOR_TYPE_INT = 0;
  uint8 private constant MAJOR_TYPE_NEGATIVE_INT = 1;
  uint8 private constant MAJOR_TYPE_BYTES = 2;
  uint8 private constant MAJOR_TYPE_STRING = 3;
  uint8 private constant MAJOR_TYPE_ARRAY = 4;
  uint8 private constant MAJOR_TYPE_MAP = 5;
  uint8 private constant MAJOR_TYPE_TAG = 6;
  uint8 private constant MAJOR_TYPE_CONTENT_FREE = 7;

  uint8 private constant TAG_TYPE_BIGNUM = 2;
  uint8 private constant TAG_TYPE_NEGATIVE_BIGNUM = 3;

  function encodeFixedNumeric(BufferChainlink.buffer memory buf, uint8 major, uint64 value) private pure {
    if(value <= 23) {
      buf.appendUint8(uint8((major << 5) | value));
    } else if (value <= 0xFF) {
      buf.appendUint8(uint8((major << 5) | 24));
      buf.appendInt(value, 1);
    } else if (value <= 0xFFFF) {
      buf.appendUint8(uint8((major << 5) | 25));
      buf.appendInt(value, 2);
    } else if (value <= 0xFFFFFFFF) {
      buf.appendUint8(uint8((major << 5) | 26));
      buf.appendInt(value, 4);
    } else {
      buf.appendUint8(uint8((major << 5) | 27));
      buf.appendInt(value, 8);
    }
  }

  function encodeIndefiniteLengthType(BufferChainlink.buffer memory buf, uint8 major) private pure {
    buf.appendUint8(uint8((major << 5) | 31));
  }

  function encodeUInt(BufferChainlink.buffer memory buf, uint value) internal pure {
    if(value > 0xFFFFFFFFFFFFFFFF) {
      encodeBigNum(buf, value);
    } else {
      encodeFixedNumeric(buf, MAJOR_TYPE_INT, uint64(value));
    }
  }

  function encodeInt(BufferChainlink.buffer memory buf, int value) internal pure {
    if(value < -0x10000000000000000) {
      encodeSignedBigNum(buf, value);
    } else if(value > 0xFFFFFFFFFFFFFFFF) {
      encodeBigNum(buf, uint(value));
    } else if(value >= 0) {
      encodeFixedNumeric(buf, MAJOR_TYPE_INT, uint64(uint256(value)));
    } else {
      encodeFixedNumeric(buf, MAJOR_TYPE_NEGATIVE_INT, uint64(uint256(-1 - value)));
    }
  }

  function encodeBytes(BufferChainlink.buffer memory buf, bytes memory value) internal pure {
    encodeFixedNumeric(buf, MAJOR_TYPE_BYTES, uint64(value.length));
    buf.append(value);
  }

  function encodeBigNum(BufferChainlink.buffer memory buf, uint value) internal pure {
    buf.appendUint8(uint8((MAJOR_TYPE_TAG << 5) | TAG_TYPE_BIGNUM));
    encodeBytes(buf, abi.encode(value));
  }

  function encodeSignedBigNum(BufferChainlink.buffer memory buf, int input) internal pure {
    buf.appendUint8(uint8((MAJOR_TYPE_TAG << 5) | TAG_TYPE_NEGATIVE_BIGNUM));
    encodeBytes(buf, abi.encode(uint256(-1 - input)));
  }

  function encodeString(BufferChainlink.buffer memory buf, string memory value) internal pure {
    encodeFixedNumeric(buf, MAJOR_TYPE_STRING, uint64(bytes(value).length));
    buf.append(bytes(value));
  }

  function startArray(BufferChainlink.buffer memory buf) internal pure {
    encodeIndefiniteLengthType(buf, MAJOR_TYPE_ARRAY);
  }

  function startMap(BufferChainlink.buffer memory buf) internal pure {
    encodeIndefiniteLengthType(buf, MAJOR_TYPE_MAP);
  }

  function endSequence(BufferChainlink.buffer memory buf) internal pure {
    encodeIndefiniteLengthType(buf, MAJOR_TYPE_CONTENT_FREE);
  }
}

File 34 of 38 : BufferChainlink.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/**
 * @dev A library for working with mutable byte buffers in Solidity.
 *
 * Byte buffers are mutable and expandable, and provide a variety of primitives
 * for writing to them. At any time you can fetch a bytes object containing the
 * current contents of the buffer. The bytes object should not be stored between
 * operations, as it may change due to resizing of the buffer.
 */
library BufferChainlink {
  /**
   * @dev Represents a mutable buffer. Buffers have a current value (buf) and
   *      a capacity. The capacity may be longer than the current value, in
   *      which case it can be extended without the need to allocate more memory.
   */
  struct buffer {
    bytes buf;
    uint256 capacity;
  }

  /**
   * @dev Initializes a buffer with an initial capacity.
   * @param buf The buffer to initialize.
   * @param capacity The number of bytes of space to allocate the buffer.
   * @return The buffer, for chaining.
   */
  function init(buffer memory buf, uint256 capacity) internal pure returns (buffer memory) {
    if (capacity % 32 != 0) {
      capacity += 32 - (capacity % 32);
    }
    // Allocate space for the buffer data
    buf.capacity = capacity;
    assembly {
      let ptr := mload(0x40)
      mstore(buf, ptr)
      mstore(ptr, 0)
      mstore(0x40, add(32, add(ptr, capacity)))
    }
    return buf;
  }

  /**
   * @dev Initializes a new buffer from an existing bytes object.
   *      Changes to the buffer may mutate the original value.
   * @param b The bytes object to initialize the buffer with.
   * @return A new buffer.
   */
  function fromBytes(bytes memory b) internal pure returns (buffer memory) {
    buffer memory buf;
    buf.buf = b;
    buf.capacity = b.length;
    return buf;
  }

  function resize(buffer memory buf, uint256 capacity) private pure {
    bytes memory oldbuf = buf.buf;
    init(buf, capacity);
    append(buf, oldbuf);
  }

  function max(uint256 a, uint256 b) private pure returns (uint256) {
    if (a > b) {
      return a;
    }
    return b;
  }

  /**
   * @dev Sets buffer length to 0.
   * @param buf The buffer to truncate.
   * @return The original buffer, for chaining..
   */
  function truncate(buffer memory buf) internal pure returns (buffer memory) {
    assembly {
      let bufptr := mload(buf)
      mstore(bufptr, 0)
    }
    return buf;
  }

  /**
   * @dev Writes a byte string to a buffer. Resizes if doing so would exceed
   *      the capacity of the buffer.
   * @param buf The buffer to append to.
   * @param off The start offset to write to.
   * @param data The data to append.
   * @param len The number of bytes to copy.
   * @return The original buffer, for chaining.
   */
  function write(
    buffer memory buf,
    uint256 off,
    bytes memory data,
    uint256 len
  ) internal pure returns (buffer memory) {
    require(len <= data.length);

    if (off + len > buf.capacity) {
      resize(buf, max(buf.capacity, len + off) * 2);
    }

    uint256 dest;
    uint256 src;
    assembly {
      // Memory address of the buffer data
      let bufptr := mload(buf)
      // Length of existing buffer data
      let buflen := mload(bufptr)
      // Start address = buffer address + offset + sizeof(buffer length)
      dest := add(add(bufptr, 32), off)
      // Update buffer length if we're extending it
      if gt(add(len, off), buflen) {
        mstore(bufptr, add(len, off))
      }
      src := add(data, 32)
    }

    // Copy word-length chunks while possible
    for (; len >= 32; len -= 32) {
      assembly {
        mstore(dest, mload(src))
      }
      dest += 32;
      src += 32;
    }

    // Copy remaining bytes
    unchecked {
      uint256 mask = (256**(32 - len)) - 1;
      assembly {
        let srcpart := and(mload(src), not(mask))
        let destpart := and(mload(dest), mask)
        mstore(dest, or(destpart, srcpart))
      }
    }

    return buf;
  }

  /**
   * @dev Appends a byte string to a buffer. Resizes if doing so would exceed
   *      the capacity of the buffer.
   * @param buf The buffer to append to.
   * @param data The data to append.
   * @param len The number of bytes to copy.
   * @return The original buffer, for chaining.
   */
  function append(
    buffer memory buf,
    bytes memory data,
    uint256 len
  ) internal pure returns (buffer memory) {
    return write(buf, buf.buf.length, data, len);
  }

  /**
   * @dev Appends a byte string to a buffer. Resizes if doing so would exceed
   *      the capacity of the buffer.
   * @param buf The buffer to append to.
   * @param data The data to append.
   * @return The original buffer, for chaining.
   */
  function append(buffer memory buf, bytes memory data) internal pure returns (buffer memory) {
    return write(buf, buf.buf.length, data, data.length);
  }

  /**
   * @dev Writes a byte to the buffer. Resizes if doing so would exceed the
   *      capacity of the buffer.
   * @param buf The buffer to append to.
   * @param off The offset to write the byte at.
   * @param data The data to append.
   * @return The original buffer, for chaining.
   */
  function writeUint8(
    buffer memory buf,
    uint256 off,
    uint8 data
  ) internal pure returns (buffer memory) {
    if (off >= buf.capacity) {
      resize(buf, buf.capacity * 2);
    }

    assembly {
      // Memory address of the buffer data
      let bufptr := mload(buf)
      // Length of existing buffer data
      let buflen := mload(bufptr)
      // Address = buffer address + sizeof(buffer length) + off
      let dest := add(add(bufptr, off), 32)
      mstore8(dest, data)
      // Update buffer length if we extended it
      if eq(off, buflen) {
        mstore(bufptr, add(buflen, 1))
      }
    }
    return buf;
  }

  /**
   * @dev Appends a byte to the buffer. Resizes if doing so would exceed the
   *      capacity of the buffer.
   * @param buf The buffer to append to.
   * @param data The data to append.
   * @return The original buffer, for chaining.
   */
  function appendUint8(buffer memory buf, uint8 data) internal pure returns (buffer memory) {
    return writeUint8(buf, buf.buf.length, data);
  }

  /**
   * @dev Writes up to 32 bytes to the buffer. Resizes if doing so would
   *      exceed the capacity of the buffer.
   * @param buf The buffer to append to.
   * @param off The offset to write at.
   * @param data The data to append.
   * @param len The number of bytes to write (left-aligned).
   * @return The original buffer, for chaining.
   */
  function write(
    buffer memory buf,
    uint256 off,
    bytes32 data,
    uint256 len
  ) private pure returns (buffer memory) {
    if (len + off > buf.capacity) {
      resize(buf, (len + off) * 2);
    }

    unchecked {
      uint256 mask = (256**len) - 1;
      // Right-align data
      data = data >> (8 * (32 - len));
      assembly {
        // Memory address of the buffer data
        let bufptr := mload(buf)
        // Address = buffer address + sizeof(buffer length) + off + len
        let dest := add(add(bufptr, off), len)
        mstore(dest, or(and(mload(dest), not(mask)), data))
        // Update buffer length if we extended it
        if gt(add(off, len), mload(bufptr)) {
          mstore(bufptr, add(off, len))
        }
      }
    }
    return buf;
  }

  /**
   * @dev Writes a bytes20 to the buffer. Resizes if doing so would exceed the
   *      capacity of the buffer.
   * @param buf The buffer to append to.
   * @param off The offset to write at.
   * @param data The data to append.
   * @return The original buffer, for chaining.
   */
  function writeBytes20(
    buffer memory buf,
    uint256 off,
    bytes20 data
  ) internal pure returns (buffer memory) {
    return write(buf, off, bytes32(data), 20);
  }

  /**
   * @dev Appends a bytes20 to the buffer. Resizes if doing so would exceed
   *      the capacity of the buffer.
   * @param buf The buffer to append to.
   * @param data The data to append.
   * @return The original buffer, for chhaining.
   */
  function appendBytes20(buffer memory buf, bytes20 data) internal pure returns (buffer memory) {
    return write(buf, buf.buf.length, bytes32(data), 20);
  }

  /**
   * @dev Appends a bytes32 to the buffer. Resizes if doing so would exceed
   *      the capacity of the buffer.
   * @param buf The buffer to append to.
   * @param data The data to append.
   * @return The original buffer, for chaining.
   */
  function appendBytes32(buffer memory buf, bytes32 data) internal pure returns (buffer memory) {
    return write(buf, buf.buf.length, data, 32);
  }

  /**
   * @dev Writes an integer to the buffer. Resizes if doing so would exceed
   *      the capacity of the buffer.
   * @param buf The buffer to append to.
   * @param off The offset to write at.
   * @param data The data to append.
   * @param len The number of bytes to write (right-aligned).
   * @return The original buffer, for chaining.
   */
  function writeInt(
    buffer memory buf,
    uint256 off,
    uint256 data,
    uint256 len
  ) private pure returns (buffer memory) {
    if (len + off > buf.capacity) {
      resize(buf, (len + off) * 2);
    }

    uint256 mask = (256**len) - 1;
    assembly {
      // Memory address of the buffer data
      let bufptr := mload(buf)
      // Address = buffer address + off + sizeof(buffer length) + len
      let dest := add(add(bufptr, off), len)
      mstore(dest, or(and(mload(dest), not(mask)), data))
      // Update buffer length if we extended it
      if gt(add(off, len), mload(bufptr)) {
        mstore(bufptr, add(off, len))
      }
    }
    return buf;
  }

  /**
   * @dev Appends a byte to the end of the buffer. Resizes if doing so would
   * exceed the capacity of the buffer.
   * @param buf The buffer to append to.
   * @param data The data to append.
   * @return The original buffer.
   */
  function appendInt(
    buffer memory buf,
    uint256 data,
    uint256 len
  ) internal pure returns (buffer memory) {
    return writeInt(buf, buf.buf.length, data, len);
  }
}

File 35 of 38 : OracleInterface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface OracleInterface {
  function fulfillOracleRequest(
    bytes32 requestId,
    uint256 payment,
    address callbackAddress,
    bytes4 callbackFunctionId,
    uint256 expiration,
    bytes32 data
  ) external returns (bool);

  function isAuthorizedSender(address node) external view returns (bool);

  function withdraw(address recipient, uint256 amount) external;

  function withdrawable() external view returns (uint256);
}

File 36 of 38 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 37 of 38 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        _requireNotPaused();
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        _requirePaused();
        _;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        require(!paused(), "Pausable: paused");
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        require(paused(), "Pausable: not paused");
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

File 38 of 38 : IERC2981.sol
pragma solidity ^0.8.13;
import "@openzeppelin/contracts/utils/introspection/IERC165.sol";

///
/// @dev Interface for the NFT Royalty Standard
///
interface IERC2981 is IERC165 {
    /// ERC165 bytes to add to interface array - set in parent contract
    /// implementing this standard
    ///
    /// bytes4(keccak256("royaltyInfo(uint256,uint256)")) == 0x2a55205a
    /// bytes4 private constant _INTERFACE_ID_ERC2981 = 0x2a55205a;
    /// _registerInterface(_INTERFACE_ID_ERC2981);

    /// @notice Called with the sale price to determine how much royalty
    //          is owed and to whom.
    /// @param _tokenId - the NFT asset queried for royalty information
    /// @param _salePrice - the sale price of the NFT asset specified by _tokenId
    /// @return receiver - address of who should be sent the royalty payment
    /// @return royaltyAmount - the royalty payment amount for _salePrice
    function royaltyInfo(
        uint256 _tokenId,
        uint256 _salePrice
    ) external view returns (
        address receiver,
        uint256 royaltyAmount
    );
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 100
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {
    "contracts/libs/SignerVerification.sol": {
      "SignerVerification": "0x7e70a29dde0d6c7eeb9ae5437a9cad352ef663b5"
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"components":[{"internalType":"address","name":"linkToken","type":"address"},{"internalType":"address","name":"oracle","type":"address"},{"internalType":"bytes32","name":"jobId","type":"bytes32"},{"internalType":"uint256","name":"fee","type":"uint256"}],"internalType":"struct ChainlinkConfig","name":"_chainlinkConfig","type":"tuple"},{"components":[{"internalType":"address","name":"vrfCoordinator","type":"address"},{"internalType":"bytes32","name":"keyHash","type":"bytes32"},{"internalType":"uint64","name":"subscriptionId","type":"uint64"},{"internalType":"uint32","name":"callbackGasLimit","type":"uint32"},{"internalType":"uint16","name":"requestConfirmations","type":"uint16"}],"internalType":"struct ChainlinkVRFConfig","name":"_chainlinkVRFConfig","type":"tuple"},{"internalType":"string","name":"_ipfsMetadataURL","type":"string"},{"internalType":"string","name":"_backendBaseURL","type":"string"},{"internalType":"uint256","name":"_preSalePriceOfNFT","type":"uint256"},{"internalType":"uint256","name":"_publicSalePriceOfNFT","type":"uint256"},{"internalType":"uint256","name":"_discountedGirlDragonPrice","type":"uint256"},{"internalType":"uint256","name":"_preSaleTimestamp","type":"uint256"},{"internalType":"uint256","name":"_publicSaleTimestamp","type":"uint256"},{"internalType":"address","name":"royaltyReceiver","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApprovalToCurrentOwner","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[{"internalType":"address","name":"have","type":"address"},{"internalType":"address","name":"want","type":"address"}],"name":"OnlyCoordinatorCanFulfill","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"id","type":"bytes32"}],"name":"ChainlinkCancelled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oracle","type":"address"},{"indexed":false,"internalType":"bytes32","name":"jobId","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"ChainlinkConfigChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"id","type":"bytes32"}],"name":"ChainlinkFulfilled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"requestId","type":"bytes32"}],"name":"ChainlinkRequestTestSuccessful","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"id","type":"bytes32"}],"name":"ChainlinkRequested","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"subscriptionId","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"keyHash","type":"bytes32"},{"indexed":false,"internalType":"uint32","name":"callbackGasLimit","type":"uint32"},{"indexed":false,"internalType":"uint16","name":"requestConfirmations","type":"uint16"}],"name":"ChainlinkVRFConfigChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint8","name":"level","type":"uint8"},{"indexed":false,"internalType":"uint8","name":"gender","type":"uint8"},{"indexed":false,"internalType":"uint8","name":"color","type":"uint8"},{"indexed":false,"internalType":"uint8","name":"background","type":"uint8"},{"indexed":false,"internalType":"uint8","name":"necklace","type":"uint8"},{"indexed":false,"internalType":"uint8","name":"accessories","type":"uint8"},{"indexed":false,"internalType":"uint8","name":"weapon","type":"uint8"},{"indexed":false,"internalType":"bool[9]","name":"roboParts","type":"bool[9]"}],"name":"LevelUp","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint8","name":"gender","type":"uint8"},{"indexed":false,"internalType":"uint8","name":"color","type":"uint8"}],"name":"MintFinal","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":false,"internalType":"address","name":"oldReceiver","type":"address"},{"indexed":false,"internalType":"address","name":"newReceiver","type":"address"}],"name":"RoyaltyRecieverChanged","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"requestId","type":"bytes32"}],"name":"UpgradeFailed","type":"event"},{"inputs":[],"name":"_receiver","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"backendBaseURL","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"linkToken","type":"address"},{"internalType":"address","name":"oracle","type":"address"},{"internalType":"bytes32","name":"jobId","type":"bytes32"},{"internalType":"uint256","name":"fee","type":"uint256"}],"internalType":"struct ChainlinkConfig","name":"chainlinkConfig","type":"tuple"}],"name":"changeChainlinkConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"vrfCoordinator","type":"address"},{"internalType":"bytes32","name":"keyHash","type":"bytes32"},{"internalType":"uint64","name":"subscriptionId","type":"uint64"},{"internalType":"uint32","name":"callbackGasLimit","type":"uint32"},{"internalType":"uint16","name":"requestConfirmations","type":"uint16"}],"internalType":"struct ChainlinkVRFConfig","name":"chainlinkVRFConfig","type":"tuple"}],"name":"changeChainlinkVRFConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"changeRoyaltyReceiver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"discountedGirlDragonPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"components":[{"internalType":"uint8","name":"level","type":"uint8"},{"internalType":"uint8","name":"gender","type":"uint8"},{"internalType":"uint8","name":"color","type":"uint8"},{"internalType":"uint8","name":"background","type":"uint8"},{"internalType":"uint8","name":"necklace","type":"uint8"},{"internalType":"uint8","name":"accessories","type":"uint8"},{"internalType":"uint8","name":"weapon","type":"uint8"},{"internalType":"bool[9]","name":"roboParts","type":"bool[9]"}],"internalType":"struct NFT","name":"token","type":"tuple"}],"name":"formatTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"requestId","type":"bytes32"},{"internalType":"bool","name":"value","type":"bool"}],"name":"fullfilChainlinkRequest","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":"getLastChainlinkNodeWorkState","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTokenById","outputs":[{"components":[{"internalType":"uint8","name":"level","type":"uint8"},{"internalType":"uint8","name":"gender","type":"uint8"},{"internalType":"uint8","name":"color","type":"uint8"},{"internalType":"uint8","name":"background","type":"uint8"},{"internalType":"uint8","name":"necklace","type":"uint8"},{"internalType":"uint8","name":"accessories","type":"uint8"},{"internalType":"uint8","name":"weapon","type":"uint8"},{"internalType":"bool[9]","name":"roboParts","type":"bool[9]"}],"internalType":"struct NFT","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ipfsMetadataURL","outputs":[{"internalType":"string","name":"","type":"string"}],"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":"uint256","name":"boyDragonId","type":"uint256"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"mintDragonGirlWithDiscount","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"mintOnPreSale","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"mintOnPublicSale","outputs":[],"stateMutability":"payable","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":"pauseMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"preSalePriceOfNFT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"preSaleTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicSalePriceOfNFT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicSaleTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"requestId","type":"uint256"},{"internalType":"uint256[]","name":"randomWords","type":"uint256[]"}],"name":"rawFulfillRandomWords","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_discountedGirlDragonPrice","type":"uint256"}],"name":"setDiscountedGirlDragonPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_preSalePriceOfNFT","type":"uint256"}],"name":"setPreSalePriceOfNFT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_preSaleTimestamp","type":"uint256"}],"name":"setPreSaleTimestamp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_publicSalePriceOfNFT","type":"uint256"}],"name":"setPublicSalePriceOfNFT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_publicSaleTimestamp","type":"uint256"}],"name":"setPublicSaleTimestamp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_timestampOfSexChangeAtMint","type":"uint256"}],"name":"setTimestampOfSexChangeAtMint","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":[],"name":"testChainlinkRequest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"timestampOfSexChangeAtMint","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":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"triggerUpgrade","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpauseMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"url","type":"string"}],"name":"updateBackendURL","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"url","type":"string"}],"name":"updateIPFSMetadataURL","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"requestId","type":"bytes32"},{"internalType":"bool","name":"canBeUpgraded","type":"bool"}],"name":"upgrade","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vrfCoordinator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"}],"name":"withdrawERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawETH","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6001600455610120604052605960a081815290620058ad60c03980516200002f9160169160209091019062000465565b50604080516020810191829052600090819052620000509160179162000465565b5065048c27395000601d556509184e72a000601e556506d23ad5f800601f5563630ff6006020556026805460ff191690553480156200008e57600080fd5b506040516200590638038062005906833981016040819052620000b1916200073e565b8087898c8c80826040518060400160405280600d81526020016c11d85cd35bdb9cdd195c939195609a1b8152506040518060400160405280600381526020016223a6a760e91b8152508460000151806001600160a01b03166080816001600160a01b0316815250505081600890805190602001906200013292919062000465565b5080516200014890600990602084019062000465565b5060006006555050600e805460ff1916905562000165336200040b565b602080820151600f80546001600160a01b039283166001600160a01b031991821617909155604080850151601055606094850151601155855160128054919094169216821790925560138054938601516014559385015160158054938701516001600160401b0316600160a01b026001600160e01b03199095169092179390931790935560809093015161ffff166401000000000265ffffffffffff1990931663ffffffff9091161791909117905581516200023d90600280546001600160a01b0319166001600160a01b0392909216919091179055565b505081516200025490601790602085019062000465565b5080516200026a90601690602084019062000465565b5050506001600160a01b038116620002ee5760405162461bcd60e51b815260206004820152603760248201527f526f79616c74793a20547279696e6720746f20736574207a65726f206164647260448201527f65737320617320726f79616c7479207265636569766572000000000000000000606482015260840160405180910390fd5b601880546001600160a01b039092166001600160a01b03199283161790556001601955601d879055601e869055601f859055601c849055601b839055601a8054909116331790556200036663152a902d60e11b6001600160e01b0319166000908152602160205260409020805460ff19166001179055565b5050602160205250507f284d001074a9225594f9d426b57a6edd471409c65c05ac7060dd135c269861948054600160ff1991821681179092557f9e6ea097be26452e060ac19276a5e66cb890a2abe0061ad073b40b744f9a6e7d8054821683179055635b5e139f60e01b6000527f8d8d0d97e44474c3efb470d586a8e46341108828bae47daa2692b3f192731190805490911690911790555062000857945050505050565b600e80546001600160a01b03838116610100818102610100600160a81b031985161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b82805462000473906200081b565b90600052602060002090601f016020900481019282620004975760008555620004e2565b82601f10620004b257805160ff1916838001178555620004e2565b82800160010185558215620004e2579182015b82811115620004e2578251825591602001919060010190620004c5565b50620004f0929150620004f4565b5090565b5b80821115620004f05760008155600101620004f5565b634e487b7160e01b600052604160045260246000fd5b60405160a081016001600160401b03811182821017156200054657620005466200050b565b60405290565b604051601f8201601f191681016001600160401b03811182821017156200057757620005776200050b565b604052919050565b80516001600160a01b03811681146200059757600080fd5b919050565b600060808284031215620005af57600080fd5b604051608081016001600160401b0381118282101715620005d457620005d46200050b565b604052905080620005e5836200057f565b8152620005f5602084016200057f565b602082015260408301516040820152606083015160608201525092915050565b600060a082840312156200062857600080fd5b6200063262000521565b90506200063f826200057f565b81526020828101519082015260408201516001600160401b03811681146200066657600080fd5b6040820152606082015163ffffffff811681146200068357600080fd5b6060820152608082015161ffff811681146200069e57600080fd5b608082015292915050565b600082601f830112620006bb57600080fd5b81516001600160401b03811115620006d757620006d76200050b565b6020620006ed601f8301601f191682016200054c565b82815285828487010111156200070257600080fd5b60005b838110156200072257858101830151828201840152820162000705565b83811115620007345760008385840101525b5095945050505050565b6000806000806000806000806000806102208b8d0312156200075f57600080fd5b6200076b8c8c6200059c565b99506200077c8c60808d0162000615565b6101208c01519099506001600160401b03808211156200079b57600080fd5b620007a98e838f01620006a9565b99506101408d0151915080821115620007c157600080fd5b50620007d08d828e01620006a9565b9750506101608b015195506101808b015194506101a08b015193506101c08b015192506101e08b015191506200080a6102008c016200057f565b90509295989b9194979a5092959850565b600181811c908216806200083057607f821691505b6020821081036200085157634e487b7160e01b600052602260045260246000fd5b50919050565b6080516150336200087a60003960008181610b0e0152610b5001526150336000f3fe6080604052600436106102e05760003560e01c806376e7eb5511610186578063b2ddb954116100d7578063e147e7df11610085578063e147e7df146108aa578063e6d7e134146108c0578063e985e9c5146108d6578063f2fde38b1461091f578063f4f3b2001461093f578063f75965fb1461095f578063f8f9dc7e1461097f57600080fd5b8063b2ddb954146107ea578063b88d4fde1461080a578063bb73e56c1461082a578063be5e08bc14610840578063c87b56dd14610860578063cd85cdb514610880578063e086e5ec1461089557600080fd5b806392754a261161013457806392754a261461072f57806395d89b411461074f57806396415bd71461076457806399a6936a14610784578063a22cb46514610797578063a3e56fa8146107b7578063a553f7d4146107d757600080fd5b806376e7eb551461064a578063792ea1541461066a5780637b53f8db1461068a5780637bdc60d9146106aa5780637c07cf29146106d75780637dd80137146106ec5780638da5cb5b1461070c57600080fd5b80633d068051116102405780636544489f116101ee5780636544489f1461058857806368feb256146105a05780636e709ac9146105c057806370a08231146105d5578063715018a6146105f557806371c54a171461060a578063727fda031461062a57600080fd5b80633d068051146104c457806342842e0e146104da5780634540771b146104fa578063511a96051461051a5780635c975abb1461053a5780635cbf3b82146105525780636352211e1461056857600080fd5b80631a8bd2da1161029d5780631a8bd2da146103e85780631fe543e3146103fd578063229fd5911461041d57806323b872dd146104325780632a55205a146104525780632f89e5a014610491578063385b23b9146104b157600080fd5b806301ffc9a7146102e557806302964ff11461033457806306fdde0314610361578063081812fc14610383578063095ea7b3146103a357806318160ddd146103c5575b600080fd5b3480156102f157600080fd5b5061031f6103003660046140b6565b6001600160e01b03191660009081526021602052604090205460ff1690565b60405190151581526020015b60405180910390f35b34801561034057600080fd5b50601854610354906001600160a01b031681565b60405161032b91906140d3565b34801561036d57600080fd5b50610376610995565b60405161032b919061413f565b34801561038f57600080fd5b5061035461039e366004614152565b610a27565b3480156103af57600080fd5b506103c36103be366004614187565b610a6b565b005b3480156103d157600080fd5b50600754600654035b60405190815260200161032b565b3480156103f457600080fd5b506103c3610af1565b34801561040957600080fd5b506103c3610418366004614265565b610b03565b34801561042957600080fd5b50610376610b90565b34801561043e57600080fd5b506103c361044d366004614316565b610c1e565b34801561045e57600080fd5b5061047261046d366004614352565b610c29565b604080516001600160a01b03909316835260208301919091520161032b565b34801561049d57600080fd5b506103c36104ac366004614374565b610c59565b6103c36104bf366004614152565b610d30565b3480156104d057600080fd5b506103da601c5481565b3480156104e657600080fd5b506103c36104f5366004614316565b610dc4565b34801561050657600080fd5b506103c3610515366004614152565b610ddf565b34801561052657600080fd5b506103c3610535366004614152565b610dec565b34801561054657600080fd5b50600e5460ff1661031f565b34801561055e57600080fd5b506103da60205481565b34801561057457600080fd5b50610354610583366004614152565b610df9565b34801561059457600080fd5b5060265460ff1661031f565b3480156105ac57600080fd5b506103c36105bb366004614152565b610e0b565b3480156105cc57600080fd5b506103c3610e18565b3480156105e157600080fd5b506103da6105f03660046143ff565b610f43565b34801561060157600080fd5b506103c3610f91565b34801561061657600080fd5b50610376610625366004614439565b610fa3565b34801561063657600080fd5b506103c3610645366004614548565b611018565b34801561065657600080fd5b506103c3610665366004614152565b61102c565b34801561067657600080fd5b506103c3610685366004614152565b611039565b34801561069657600080fd5b506103c36106a53660046145b9565b611377565b3480156106b657600080fd5b506106ca6106c5366004614152565b6113f4565b60405161032b919061464f565b3480156106e357600080fd5b506103766114d4565b3480156106f857600080fd5b506103c3610707366004614152565b6114e1565b34801561071857600080fd5b50600e5461010090046001600160a01b0316610354565b34801561073b57600080fd5b506103c361074a3660046143ff565b6114ee565b34801561075b57600080fd5b506103766114ff565b34801561077057600080fd5b506103c361077f366004614152565b61150e565b6103c3610792366004614352565b61151b565b3480156107a357600080fd5b506103c36107b23660046146cb565b6116a3565b3480156107c357600080fd5b50601354610354906001600160a01b031681565b6103c36107e5366004614771565b611738565b3480156107f657600080fd5b506103c36108053660046147b7565b6118a6565b34801561081657600080fd5b506103c36108253660046147dc565b611a40565b34801561083657600080fd5b506103da601d5481565b34801561084c57600080fd5b506103c361085b3660046147b7565b611a8a565b34801561086c57600080fd5b5061037661087b366004614152565b611b44565b34801561088c57600080fd5b506103c3611c92565b3480156108a157600080fd5b506103c3611ca2565b3480156108b657600080fd5b506103da601e5481565b3480156108cc57600080fd5b506103da601b5481565b3480156108e257600080fd5b5061031f6108f1366004614843565b6001600160a01b039182166000908152600d6020908152604080832093909416825291909152205460ff1690565b34801561092b57600080fd5b506103c361093a3660046143ff565b611d3b565b34801561094b57600080fd5b506103c361095a3660046143ff565b611db1565b34801561096b57600080fd5b506103c361097a366004614548565b611efd565b34801561098b57600080fd5b506103da601f5481565b6060600880546109a490614876565b80601f01602080910402602001604051908101604052809291908181526020018280546109d090614876565b8015610a1d5780601f106109f257610100808354040283529160200191610a1d565b820191906000526020600020905b815481529060010190602001808311610a0057829003601f168201915b5050505050905090565b6000610a3282611f11565b610a4f576040516333d1c03960e21b815260040160405180910390fd5b506000908152600c60205260409020546001600160a01b031690565b6000610a7682610df9565b9050806001600160a01b0316836001600160a01b031603610aaa5760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b03821614610ae157610ac481336108f1565b610ae1576040516367d9dca160e11b815260040160405180910390fd5b610aec838383611f3d565b505050565b610af9611f99565b610b01611ff9565b565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610b825760405163073e64fd60e21b81523360048201526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001660248201526044015b60405180910390fd5b610b8c8282612045565b5050565b60168054610b9d90614876565b80601f0160208091040260200160405190810160405280929190818152602001828054610bc990614876565b8015610c165780601f10610beb57610100808354040283529160200191610c16565b820191906000526020600020905b815481529060010190602001808311610bf957829003601f168201915b505050505081565b610aec83838361223e565b600080610c386103e8846148d6565b610c4390604b6148ea565b6018546001600160a01b03169590945092505050565b610c61611f99565b604081810151601380546001600160401b03928316600160a01b90810267ffffffffffffffff60a01b1990921691909117918290556020808601516014819055606080880151601580546080808c015161ffff908116600160201b90810265ffffffffffff1990941663ffffffff9687161793909317938490558b519890990490991687529486019390935282169684019690965204909116928101929092527f01b5d74f044c811afcaffdce6ece5445f7a76b3da636d716dcaef7f14630a26891015b60405180910390a150565b601b54426001600160401b031611610d8a5760405162461bcd60e51b815260206004820152601e60248201527f5075626c69632073616c65206973206e6f7420737461727465642079657400006044820152606401610b79565b80601e54610d9891906148ea565b341015610db75760405162461bcd60e51b8152600401610b7990614909565b610dc18133612419565b50565b610aec83838360405180602001604052806000815250611a40565b610de7611f99565b601f55565b610df4611f99565b601b55565b6000610e0482612531565b5192915050565b610e13611f99565b602055565b6026805460ff19169055601054600090610e3a9030632f97822f60e21b61264b565b9050610edb6040518060400160405280600381526020016219d95d60ea1b815250604051602001610ec3907f68747470733a2f2f6d792d6a736f6e2d7365727665722e74797069636f64652e81527f636f6d2f6c616d65726573742f6d6f636b2d6261636b656e642f63616e5570676020820152650726164652f360d41b604082015260460190565b60408051601f19818403018152919052839190612670565b610f28604051806040016040528060048152602001630e0c2e8d60e31b815250604051806040016040528060048152602001636461746160e01b815250836126709092919063ffffffff16565b600f54601154610b8c916001600160a01b031690839061268e565b60006001600160a01b038216610f6c576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600b60205260409020546001600160401b031690565b610f99611f99565b610b016000612721565b805160609060ff16600703610fe4576016610fbd8361277b565b604051602001610fce9291906149ec565b6040516020818303038152906040529050611012565b6017610fef84612808565b604051602001611000929190614a11565b60405160208183030381529060405290505b92915050565b611020611f99565b610aec60178383613e6d565b611034611f99565b601c55565b60026019540361108b5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b79565b600260195561109981610df9565b6001600160a01b0316336001600160a01b0316146111085760405162461bcd60e51b815260206004820152602660248201527f4761734d6f6e737465723a204f6e6c79206f776e65722063616e20757067726160448201526519194813919560d21b6064820152608401610b79565b600081815260226020526040902054600760ff909116106111825760405162461bcd60e51b815260206004820152602e60248201527f4761734d6f6e737465723a20546f6b656e2068616420616c726561792072656160448201526d18da1959081b585e081b195d995b60921b6064820152608401610b79565b61118b81612910565b6112495760405162461bcd60e51b815260206004820152607e60248201527f4761734d6f6e737465723a205570677261646520616c726561647920696e207060448201527f726f67726573732e20496620726571756573742077696c6c206e6f7420636f6d60648201527f706c65746520696e203135206d696e757465732c20796f752077696c6c20626560848201527f2061626c6520746f2072657175657374207570677261646520616761696e000060a482015260c401610b79565b600061125f6010543063b2ddb95460e01b61264b565b905061129c6040518060400160405280600381526020016219d95d60ea1b815250601761128b85612808565b604051602001610ec3929190614a48565b6112e9604051806040016040528060048152602001630e0c2e8d60e31b815250604051806040016040528060048152602001636461746160e01b815250836126709092919063ffffffff16565b46617a691461132b578160236000611319600f60009054906101000a90046001600160a01b03168560115461268e565b81526020810191909152604001600020555b604080518082019091526001815260208101426001600160401b0316905260009283526025602090815260409093208151815460ff191690151517815592015160019283015550601955565b61137f611f99565b602081810151600f80546001600160a01b0319166001600160a01b03909216918217905560408084015160108190556060808601516011819055835194855294840191909152908201929092527f8cbc8987595e6915129825ef9a480bce81957b43f4c4e6e9665ee88e6f4ded939101610d25565b6113fc613ef1565b600082815260226020908152604080832081516101008082018452825460ff80821684529181048216958301959095526201000085048116828501526301000000850481166060830152600160201b850481166080830152600160281b8504811660a0830152600160301b90940490931660c084015281516101208101928390529293909260e0850192909160018501916009918390855b825461010083900a900460ff1615158152602060019283018181049485019490930390920291018084116114945790505050505050815250509050919050565b60178054610b9d90614876565b6114e9611f99565b601d55565b6114f6611f99565b610dc18161296b565b6060600980546109a490614876565b611516611f99565b601e55565b602054426001600160401b031610156115865760405162461bcd60e51b815260206004820152602760248201527f4d696e74206f66206769726c20647261676f6e73206973206e6f7420737461726044820152661d1959081e595d60ca1b6064820152608401610b79565b6000828152602260205260409020805460ff610100909104166001146116015760405162461bcd60e51b815260206004820152602a60248201527f476976656e20626f79447261676f6e496420697320746865204944206f66206760448201526934b93610323930b3b7b760b11b6064820152608401610b79565b3361160b84610df9565b6001600160a01b03161461166d5760405162461bcd60e51b815260206004820152602360248201527f596f7520617265206e6f7420746865206f776e6572206f6620626f792064726160448201526233b7b760e91b6064820152608401610b79565b601f5461167a90836148ea565b3410156116995760405162461bcd60e51b8152600401610b7990614909565b610aec8233612419565b336001600160a01b038316036116cc5760405163b06307db60e01b815260040160405180910390fd5b336000818152600d602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b601c54426001600160401b0316116117925760405162461bcd60e51b815260206004820152601b60248201527f5072652d73616c65206973206e6f7420737461727465642079657400000000006044820152606401610b79565b601a54737e70a29dde0d6c7eeb9ae5437a9cad352ef663b590636cb80720906001600160a01b0316836117c433612abf565b6040518463ffffffff1660e01b81526004016117e293929190614a85565b602060405180830381865af41580156117ff573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118239190614abb565b61186f5760405162461bcd60e51b815260206004820152601a60248201527f50726573616c65207369676e61747572652069732077726f6e670000000000006044820152606401610b79565b81601d5461187d91906148ea565b34101561189c5760405162461bcd60e51b8152600401610b7990614909565b610b8c8233612419565b60008281526005602052604090205482906001600160a01b031633146118de5760405162461bcd60e51b8152600401610b7990614ad8565b60008181526005602052604080822080546001600160a01b03191690555182917f7cc135e0cebb02c3480ae5d74d377283180a2601f8f644edf7987b009316c63a91a28161195f576040518381527fc52c3a4d67df216e5611da5bf2188b1a0dd89082849b3d058585329ef16cc298906020015b60405180910390a1505050565b6000838152602360209081526040808320548084526022909252909120805461198c9060ff166001614b20565b815460ff191660ff919091161781556040805160018082528183019092526000916020808301908036833701905050905082816000815181106119d1576119d1614b45565b6020908102919091010152815460ff16600703611a21576119f983662bdc545df2bded612cca565b611a0283612ec8565b6000838152602560205260408120805460ff1916815560010155611a2a565b611a2a81612fa5565b5050506000928352505060236020526040812055565b611a4b84848461223e565b6001600160a01b0383163b15611a8457611a6784848484613121565b611a84576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b60008281526005602052604090205482906001600160a01b03163314611ac25760405162461bcd60e51b8152600401610b7990614ad8565b60008181526005602052604080822080546001600160a01b03191690555182917f7cc135e0cebb02c3480ae5d74d377283180a2601f8f644edf7987b009316c63a91a26026805460ff191660011790556040517fc307026e7c13eda98900e6d5e0712c9023c83d29d001161e175c346279e064b0906119529085815260200190565b6060611b4f82611f11565b611bb15760405162461bcd60e51b815260206004820152602d60248201527f4761734d6f6e737465723a20555249207265717565737420666f72206e6f6e2060448201526c32bc34b9ba32b7103a37b5b2b760991b6064820152608401610b79565b600082815260226020908152604080832081516101008082018452825460ff80821684529181048216958301959095526201000085048116828501526301000000850481166060830152600160201b850481166080830152600160281b8504811660a0830152600160301b90940490931660c08401528151610120810192839052909160e08401919060018401906009908288855b825461010083900a900460ff161515815260206001928301818104948501949093039092029101808411611c465790505050505050815250509050611c8b8382610fa3565b9392505050565b611c9a611f99565b610b0161320c565b611caa611f99565b604051600090339047908381818185875af1925050503d8060008114611cec576040519150601f19603f3d011682016040523d82523d6000602084013e611cf1565b606091505b5050905080610dc15760405162461bcd60e51b815260206004820152601660248201527508cc2d2d8cac840e8de40eed2e8d0c8e4c2ee408aa8960531b6044820152606401610b79565b611d43611f99565b6001600160a01b038116611da85760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610b79565b610dc181612721565b611db9611f99565b6040516370a0823160e01b81526000906001600160a01b038316906370a0823190611de89030906004016140d3565b602060405180830381865afa158015611e05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e299190614b5b565b60405163a9059cbb60e01b8152336004820152602481018290529091506000906001600160a01b0384169063a9059cbb906044016020604051808303816000875af1158015611e7c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ea09190614abb565b905080610aec5760405162461bcd60e51b815260206004820152602560248201527f576974686472617761626c653a205472616e7366657220646964206e6f74206860448201526430b83832b760d91b6064820152608401610b79565b611f05611f99565b610aec60168383613e6d565b6000600654821080156110125750506000908152600a6020526040902054600160e01b900460ff161590565b6000828152600c602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600e546001600160a01b03610100909104163314610b015760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b79565b612001613249565b600e805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405161203b91906140d3565b60405180910390a1565b60008281526024602090815260408083208054825181850281018501909352808352919290919083018282801561209b57602002820191906000526020600020905b815481526020019060010190808311612087575b505050505090506000826000815181106120b7576120b7614b45565b6020026020010151905060005b81156120e9576120d5600a836148d6565b9150806120e181614b74565b9150506120c4565b6000846000815181106120fe576120fe614b45565b6020026020010151905060005b84518160ff16101561221e5761213d858260ff168151811061212f5761212f614b45565b602002602001015183612cca565b612162858260ff168151811061215557612155614b45565b6020026020010151612ec8565b600060226000878460ff168151811061217d5761217d614b45565b6020026020010151815260200190815260200160002060000160009054906101000a900460ff16905060256000878460ff16815181106121bf576121bf614b45565b60209081029190910181015182528101919091526040016000908120805460ff1916815560010155600560ff821610612206576121ff620f4240846148d6565b9250612215565b612212612710846148d6565b92505b5060010161210b565b50600086815260246020526040812061223691613f3c565b505050505050565b600061224982612531565b9050836001600160a01b031681600001516001600160a01b0316146122805760405162a1148160e81b815260040160405180910390fd5b6000336001600160a01b038616148061229e575061229e85336108f1565b806122b95750336122ae84610a27565b6001600160a01b0316145b9050806122d957604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b03841661230057604051633a954ecd60e21b815260040160405180910390fd5b61230c60008487611f3d565b6001600160a01b038581166000908152600b60209081526040808320805467ffffffffffffffff198082166001600160401b0392831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600a90945282852080546001600160e01b031916909417600160a01b429092169190910217835587018084529220805491939091166123e05760065482146123e057805460208601516001600160401b0316600160a01b026001600160e01b03199091166001600160a01b038a16171781555b50505082846001600160a01b0316866001600160a01b0316600080516020614fde83398151915260405160405180910390a45050505050565b612421613292565b60148261242d83610f43565b6124379190614b8d565b111561249d5760405162461bcd60e51b815260206004820152602f60248201527f4761734d6f6e737465723a20596f752061726520616c6c6f77656420746f206760448201526e6574206f6e6c79203230204e46547360881b6064820152608401610b79565b600a82111561250f5760405162461bcd60e51b815260206004820152603860248201527f4761734d6f6e737465723a20596f752063616e206d696e74206f6e6c792031306044820152771036b4b73a1034b71037b732903a3930b739b0b1ba34b7b760411b6064820152608401610b79565b600061251a60065490565b905061252682846132d8565b610aec8184846132f2565b604080516060810182526000808252602082018190529181019190915281600654811015612632576000818152600a6020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff161515918101829052906126305780516001600160a01b0316156125c7579392505050565b50600019016000818152600a6020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff161515928101929092521561262b579392505050565b6125c7565b505b604051636f96cda160e11b815260040160405180910390fd5b612653613f5a565b61265b613f5a565b612667818686866135fc565b95945050505050565b608083015161267f9083613639565b6080830151610aec9082613639565b60045460009061269f816001614b8d565b600455835160408086015160808701515191516000936320214ca360e11b936126d79386938493923092918a91600191602401614ba5565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152905061271786838684613650565b9695505050505050565b600e80546001600160a01b03838116610100818102610100600160a81b031985161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b606061278d826040015160ff16612808565b61279d836020015160ff16612808565b6127ad846060015160ff16612808565b6127bd856080015160ff16612808565b6127cd8660a0015160ff16612808565b6127dd8760c0015160ff16612808565b6040516020016127f296959493929190614c0d565b6040516020818303038152906040529050919050565b60608160000361282f5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612859578061284381614b74565b91506128529050600a836148d6565b9150612833565b6000816001600160401b03811115612873576128736141b1565b6040519080825280601f01601f19166020018201604052801561289d576020820181803683370190505b5090505b8415612908576128b2600183614c99565b91506128bf600a86614cb0565b6128ca906030614b8d565b60f81b8183815181106128df576128df614b45565b60200101906001600160f81b031916908160001a905350612901600a866148d6565b94506128a1565b949350505050565b60008181526025602090815260408083208151808301909252805460ff161580158352600190910154928201929092529080611c8b5750602081015161295890610384614b8d565b426001600160401b031610159392505050565b6001600160a01b0381166129e15760405162461bcd60e51b815260206004820152603760248201527f526f79616c74793a20547279696e6720746f20736574207a65726f206164647260448201527632b9b99030b9903937bcb0b63a3c903932b1b2b4bb32b960491b6064820152608401610b79565b6018546001600160a01b03163314612a5d5760405162461bcd60e51b815260206004820152603960248201527f526f79616c74793a204f6e6c792063757272656e742072656365697665722063604482015278616e206368616e676520726f79616c7479206164647265737360381b6064820152608401610b79565b601880546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f5ace107b6652aa4ced8d6bc340980146396d063d09434dedf07c84c977e72ad291015b60405180910390a15050565b604051606082811b6001600160601b03191660208301529060009060340160408051808303601f19018152602a80845260608401909252925060009190602082018180368337019050509050600360fc1b81600081518110612b2357612b23614b45565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110612b5257612b52614b45565b60200101906001600160f81b031916908160001a90535060005b6014811015612cc25760006010848381518110612b8b57612b8b614b45565b0160200151612b9d919060f81c614cc4565b90506000612bac826010614ce6565b858481518110612bbe57612bbe614b45565b0160200151612bd0919060f81c614d0f565b90506000600a8360ff1610612bf257612bea836057614b20565b60f81b612c01565b612bfd836030614b20565b60f81b5b90506000600a8360ff1610612c2357612c1b836057614b20565b60f81b612c32565b612c2e836030614b20565b60f81b5b90508086612c418760026148ea565b612c4c906003614b8d565b81518110612c5c57612c5c614b45565b60200101906001600160f81b031916908160001a9053508186612c808760026148ea565b612c8b906002614b8d565b81518110612c9b57612c9b614b45565b60200101906001600160f81b031916908160001a9053505060019093019250612b6c915050565b509392505050565b60008281526022602052604090208054829060ff16600103612d3d57602054426001600160401b03161015612d0b57815461ff001916610100178255612d15565b815461ff00191682555b612d20600582614cb0565b825460ff91909116620100000262ff000019909116178255612e86565b815460ff16600203612da557612d54600582614cb0565b825460ff9190911663010000000263ff00000019909116178255600a612d7b6064836148d6565b612d859190614cb0565b825460ff91909116600160201b0264ff0000000019909116178255612e86565b815460ff16600303612ddd57612dbc600a82614cb0565b825460ff91909116600160281b0265ff000000000019909116178255612e86565b815460ff16600403612e1657612df4600a82614cb0565b825460ff91909116600160301b0266ff00000000000019909116178255612e86565b8154600560ff90911610612e86576000612e2f856137a9565b60ff1690505b8254612e469060049060ff16614d0f565b612e51906003614ce6565b60ff16811015612e8457612e658583613815565b612e706064836148d6565b915080612e7c81614b74565b915050612e35565b505b815460ff16600503611a8457612e9d600582614cb0565b612ea8906005614b20565b825460ff9190911663010000000263ff0000001990911617825550505050565b6000818152602260205260409020805460ff16600103612f2f577fcd5dd0d31a8fc85dff397bf995668a42a420c1dfa393aee6b096553e843b7319612f0c83610df9565b8254604051612ab39291869160ff61010083048116926201000090041690614d32565b80546040517fc24f3c2ec9a7f5d6258a9b849a5b1dee202eb5ea36455a944985883eb7e4f28291612ab391859160ff80821692610100830482169262010000810483169263010000008204811692600160201b8304821692600160281b8104831692600160301b909104169060018c0190614d5e565b6012546014546013546015546040516305d3b1d360e41b81526004810193909352600160a01b9091046001600160401b03166024830152600160201b810461ffff16604483015263ffffffff166064820152600160848201526000916001600160a01b031690635d3b1d309060a4016020604051808303816000875af1158015613033573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130579190614b5b565b6000818152602460209081526040909120845192935061307b929091850190613f8a565b5060005b82518160ff161015610aec576130b160405180604001604052806005815260200164636865636b60d81b8152506138fe565b604080518082019091526001815260208101426001600160401b031681525060256000858460ff16815181106130e9576130e9614b45565b6020908102919091018101518252818101929092526040016000208251815460ff19169015151781559101516001918201550161307f565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290613156903390899088908890600401614e5f565b6020604051808303816000875af1925050508015613191575060408051601f3d908101601f1916820190925261318e91810190614e92565b60015b6131ef573d8080156131bf576040519150601f19603f3d011682016040523d82523d6000602084013e6131c4565b606091505b5080516000036131e7576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b613214613292565b600e805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861202e3390565b600e5460ff16610b015760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610b79565b600e5460ff1615610b015760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610b79565b610b8c828260405180602001604052806000815250613941565b6000826001600160401b0381111561330c5761330c6141b1565b604051908082528060200260200182016040528015613335578160200160208202803683370190505b5090508360005b848110156122365760006020546133504290565b6001600160401b031610156133675750600161336b565b5060005b600060054260405160c09190911b6001600160c01b0319166020820152436028820152604881018690526068016040516020818303038152906040528051906020012060001c6133bb9190614cb0565b9050604051806101000160405280600160ff1681526020018360ff1681526020018260ff168152602001600a60ff168152602001600a60ff168152602001600a60ff168152602001600a60ff168152602001604051806101200160405280600015151515815260200160001515151581526020016000151515158152602001600015151515815260200160001515151581526020016000151515158152602001600015151515815260200160001515151581526020016000151515158152508152506022600086815260200190815260200160002060008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160000160016101000a81548160ff021916908360ff16021790555060408201518160000160026101000a81548160ff021916908360ff16021790555060608201518160000160036101000a81548160ff021916908360ff16021790555060808201518160000160046101000a81548160ff021916908360ff16021790555060a08201518160000160056101000a81548160ff021916908360ff16021790555060c08201518160000160066101000a81548160ff021916908360ff16021790555060e08201518160010190600961358e929190613fc5565b50905050838584815181106135a5576135a5614b45565b6020026020010181815250507fcd5dd0d31a8fc85dff397bf995668a42a420c1dfa393aee6b096553e843b7319868584846040516135e69493929190614d32565b60405180910390a150506001918201910161333c565b613604613f5a565b6136148560800151610100613ad5565b50509183526001600160a01b031660208301526001600160e01b031916604082015290565b6136468260038351613b2d565b610aec8282613c34565b6040516001600160601b03193060601b1660208201526034810184905260009060540160408051808303601f1901815282825280516020918201206000818152600590925291812080546001600160a01b0319166001600160a01b038a1617905590925082917fb5e6e01e79f91267dc17b4e6314d5d4d03593d2ceee0fbb452b750bd70ea5af99190a2600254604051630200057560e51b81526001600160a01b0390911690634000aea09061370e90889087908790600401614eaf565b6020604051808303816000875af115801561372d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906137519190614abb565b6129085760405162461bcd60e51b815260206004820152602360248201527f756e61626c6520746f207472616e73666572416e6443616c6c20746f206f7261604482015262636c6560e81b6064820152608401610b79565b6000818152602260205260408120815b60098160ff16101561380e57816001018160ff16600981106137dd576137dd614b45565b602081049091015460ff601f9092166101000a90041615613806578261380281614ed6565b9350505b6001016137b9565b5050919050565b60008281526022602052604081209061382d846137a9565b9050600061383c826009614d0f565b6138499060ff1685614cb0565b613854906001614b8d565b90506000805b846001018160ff166009811061387257613872614b45565b602081049091015460ff601f9092166101000a9004161561389b578161389781614ed6565b9250505b6001016138a88284614b20565b60ff168160ff161061385a5760018581016138c38284614d0f565b60ff16600981106138d6576138d6614b45565b602091828204019190066101000a81548160ff02191690831515021790555050505050505050565b610dc181604051602401613912919061413f565b60408051601f198184030181529190526020810180516001600160e01b031663104c13eb60e21b179052613c4e565b6006546001600160a01b03841661396a57604051622e076360e81b815260040160405180910390fd5b8260000361398b5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b0384166000818152600b6020908152604080832080546001600160801b031981166001600160401b038083168b018116918217600160401b67ffffffffffffffff1990941690921783900481168b01811690920217909155858452600a90925290912080546001600160e01b0319168317600160a01b42909316929092029190911790558190818501903b15613a93575b60405182906001600160a01b03881690600090600080516020614fde833981519152908290a4613a5c6000878480600101955087613121565b613a79576040516368d2bf6b60e11b815260040160405180910390fd5b808210613a23578260065414613a8e57600080fd5b613ac6565b5b6040516001830192906001600160a01b03881690600090600080516020614fde833981519152908290a4808210613a94575b50600655611a84600085838684565b613add614052565b613ae8602083614cb0565b15613b1057613af8602083614cb0565b613b03906020614c99565b613b0d9083614b8d565b91505b506020828101829052604080518085526000815290920101905290565b6017816001600160401b031611613b5157611a848360e0600585901b168317613c6f565b60ff816001600160401b031611613b8d57613b77836018611fe0600586901b1617613c6f565b50611a84836001600160401b0383166001613c87565b61ffff816001600160401b031611613bca57613bb4836019611fe0600586901b1617613c6f565b50611a84836001600160401b0383166002613c87565b63ffffffff816001600160401b031611613c0957613bf383601a611fe0600586901b1617613c6f565b50611a84836001600160401b0383166004613c87565b613c1e83601b611fe0600586901b1617613c6f565b50611a84836001600160401b0383166008613c87565b613c3c614052565b611c8b83846000015151848551613ca0565b80516a636f6e736f6c652e6c6f67602083016000808483855afa5050505050565b613c77614052565b611c8b8384600001515184613d7d565b613c8f614052565b612908848560000151518585613dcb565b613ca8614052565b8251821115613cb657600080fd5b6020850151613cc58386614b8d565b1115613cf857613cf885613ce887602001518786613ce39190614b8d565b613e3f565b613cf39060026148ea565b613e56565b600080865180518760208301019350808887011115613d175787860182525b505050602084015b60208410613d575780518252613d36602083614b8d565b9150613d43602082614b8d565b9050613d50602085614c99565b9350613d1f565b51815160001960208690036101000a019081169019919091161790525083949350505050565b613d85614052565b83602001518310613da557613da58485602001516002613cf391906148ea565b8351805160208583010184815350808503613dc1576001810182525b5093949350505050565b613dd3614052565b6020850151613de28584614b8d565b1115613df657613df685613ce88685614b8d565b60006001613e0684610100614fd1565b613e109190614c99565b9050855183868201018583198251161781525080518487011115613e345783860181525b509495945050505050565b600081831115613e50575081611012565b50919050565b8151613e628383613ad5565b50611a848382613c34565b828054613e7990614876565b90600052602060002090601f016020900481019282613e9b5760008555613ee1565b82601f10613eb45782800160ff19823516178555613ee1565b82800160010185558215613ee1579182015b82811115613ee1578235825591602001919060010190613ec6565b50613eed92915061406c565b5090565b6040805161010081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c081019190915260e08101613f37614081565b905290565b5080546000825590600052602060002090810190610dc1919061406c565b6040805160a081018252600080825260208201819052918101829052606081019190915260808101613f37614052565b828054828255906000526020600020908101928215613ee1579160200282015b82811115613ee1578251825591602001919060010190613faa565b600183019183908215613ee15791602002820160005b8382111561401857835183826101000a81548160ff0219169083151502179055509260200192600101602081600001049283019260010302613fdb565b80156140455782816101000a81549060ff0219169055600101602081600001049283019260010302614018565b5050613eed92915061406c565b604051806040016040528060608152602001600081525090565b5b80821115613eed576000815560010161406d565b6040518061012001604052806009906020820280368337509192915050565b6001600160e01b031981168114610dc157600080fd5b6000602082840312156140c857600080fd5b8135611c8b816140a0565b6001600160a01b0391909116815260200190565b60005b838110156141025781810151838201526020016140ea565b83811115611a845750506000910152565b6000815180845261412b8160208601602086016140e7565b601f01601f19169290920160200192915050565b602081526000611c8b6020830184614113565b60006020828403121561416457600080fd5b5035919050565b80356001600160a01b038116811461418257600080fd5b919050565b6000806040838503121561419a57600080fd5b6141a38361416b565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b60405160a081016001600160401b03811182821017156141e9576141e96141b1565b60405290565b60405161010081016001600160401b03811182821017156141e9576141e96141b1565b60405161012081016001600160401b03811182821017156141e9576141e96141b1565b604051601f8201601f191681016001600160401b038111828210171561425d5761425d6141b1565b604052919050565b6000806040838503121561427857600080fd5b823591506020808401356001600160401b038082111561429757600080fd5b818601915086601f8301126142ab57600080fd5b8135818111156142bd576142bd6141b1565b8060051b91506142ce848301614235565b81815291830184019184810190898411156142e857600080fd5b938501935b83851015614306578435825293850193908501906142ed565b8096505050505050509250929050565b60008060006060848603121561432b57600080fd5b6143348461416b565b92506143426020850161416b565b9150604084013590509250925092565b6000806040838503121561436557600080fd5b50508035926020909101359150565b600060a0828403121561438657600080fd5b61438e6141c7565b6143978361416b565b81526020830135602082015260408301356001600160401b03811681146143bd57600080fd5b6040820152606083013563ffffffff811681146143d957600080fd5b6060820152608083013561ffff811681146143f357600080fd5b60808201529392505050565b60006020828403121561441157600080fd5b611c8b8261416b565b803560ff8116811461418257600080fd5b8015158114610dc157600080fd5b6000808284036102208082121561444f57600080fd5b843593506020610200601f198401121561446857600080fd5b6144706141ef565b925061447d81870161441a565b835261448b6040870161441a565b8184015261449b6060870161441a565b60408401526144ac6080870161441a565b60608401526144bd60a0870161441a565b60808401526144ce60c0870161441a565b60a08401526144df60e0870161441a565b60c08401528661011f8701126144f457600080fd5b6144fc614212565b91860191808884111561450e57600080fd5b61010088015b848110156145345780356145278161442b565b8352918301918301614514565b5060e0850152509396919550909350505050565b6000806020838503121561455b57600080fd5b82356001600160401b038082111561457257600080fd5b818501915085601f83011261458657600080fd5b81358181111561459557600080fd5b8660208285010111156145a757600080fd5b60209290920196919550909350505050565b6000608082840312156145cb57600080fd5b604051608081018181106001600160401b03821117156145ed576145ed6141b1565b6040526145f98361416b565b81526146076020840161416b565b602082015260408301356040820152606083013560608201528091505092915050565b8060005b6009811015611a84578151151584526020938401939091019060010161462e565b60006102008201905060ff8084511683528060208501511660208401528060408501511660408401528060608501511660608401528060808501511660808401528060a08501511660a08401525060c08301516146b160c084018260ff169052565b5060e08301516146c460e084018261462a565b5092915050565b600080604083850312156146de57600080fd5b6146e78361416b565b915060208301356146f78161442b565b809150509250929050565b600082601f83011261471357600080fd5b81356001600160401b0381111561472c5761472c6141b1565b61473f601f8201601f1916602001614235565b81815284602083860101111561475457600080fd5b816020850160208301376000918101602001919091529392505050565b6000806040838503121561478457600080fd5b8235915060208301356001600160401b038111156147a157600080fd5b6147ad85828601614702565b9150509250929050565b600080604083850312156147ca57600080fd5b8235915060208301356146f78161442b565b600080600080608085870312156147f257600080fd5b6147fb8561416b565b93506148096020860161416b565b92506040850135915060608501356001600160401b0381111561482b57600080fd5b61483787828801614702565b91505092959194509250565b6000806040838503121561485657600080fd5b61485f8361416b565b915061486d6020840161416b565b90509250929050565b600181811c9082168061488a57607f821691505b602082108103613e5057634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000826148e5576148e56148aa565b500490565b6000816000190483118215151615614904576149046148c0565b500290565b6020808252602a908201527f4761734d6f6e737465723a204e6f7420656e6f7567682065746865727320746f604082015269206d696e74204e46547360b01b606082015260800190565b8054600090600181811c908083168061496d57607f831692505b6020808410820361498e57634e487b7160e01b600052602260045260246000fd5b8180156149a257600181146149b3576149e0565b60ff198616895284890196506149e0565b60008881526020902060005b868110156149d85781548b8201529085019083016149bf565b505084890196505b50505050505092915050565b60006149f88285614953565b8351614a088183602088016140e7565b01949350505050565b6000614a1d8285614953565b652f6d6574612f60d01b81528351614a3c8160068401602088016140e7565b01600601949350505050565b6000614a548285614953565b6b2f63616e557067726164652f60a01b81528351614a7981600c8401602088016140e7565b01600c01949350505050565b6001600160a01b0384168152606060208201819052600090614aa990830185614113565b82810360408401526127178185614113565b600060208284031215614acd57600080fd5b8151611c8b8161442b565b60208082526028908201527f536f75726365206d75737420626520746865206f7261636c65206f6620746865604082015267081c995c5d595cdd60c21b606082015260800190565b600060ff821660ff84168060ff03821115614b3d57614b3d6148c0565b019392505050565b634e487b7160e01b600052603260045260246000fd5b600060208284031215614b6d57600080fd5b5051919050565b600060018201614b8657614b866148c0565b5060010190565b60008219821115614ba057614ba06148c0565b500190565b6001600160a01b0389811682526020820189905260408201889052861660608201526001600160e01b03198516608082015260a0810184905260c0810183905261010060e08201819052600090614bfe83820185614113565b9b9a5050505050505050505050565b600087516020614c208285838d016140e7565b885191840191614c338184848d016140e7565b8851920191614c458184848c016140e7565b8751920191614c578184848b016140e7565b8651920191614c698184848a016140e7565b8551920191614c7b81848489016140e7565b64173539b7b760d91b92019182525060050198975050505050505050565b600082821015614cab57614cab6148c0565b500390565b600082614cbf57614cbf6148aa565b500690565b600060ff831680614cd757614cd76148aa565b8060ff84160491505092915050565b600060ff821660ff84168160ff0481118215151615614d0757614d076148c0565b029392505050565b600060ff821660ff841680821015614d2957614d296148c0565b90039392505050565b6001600160a01b03949094168452602084019290925260ff908116604084015216606082015260800190565b89815260ff898116602083015288811660408301528781166060830152868116608083015285811660a083015284811660c083015283811660e08301528254808216151561010084015261022083019190614dc36101208501838360081c1615159052565b614dd76101408501838360101c1615159052565b614deb6101608501838360181c1615159052565b614dff6101808501838360201c1615159052565b614e136101a08501838360281c1615159052565b614e276101c08501838360301c1615159052565b614e3b6101e08501838360381c1615159052565b614e4f6102008501838360401c1615159052565b50509a9950505050505050505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061271790830184614113565b600060208284031215614ea457600080fd5b8151611c8b816140a0565b60018060a01b03841681528260208201526060604082015260006126676060830184614113565b600060ff821660ff8103614eec57614eec6148c0565b60010192915050565b600181815b80851115614f30578160001904821115614f1657614f166148c0565b80851615614f2357918102915b93841c9390800290614efa565b509250929050565b600082614f4757506001611012565b81614f5457506000611012565b8160018114614f6a5760028114614f7457614f90565b6001915050611012565b60ff841115614f8557614f856148c0565b50506001821b611012565b5060208310610133831016604e8410600b8410161715614fb3575081810a611012565b614fbd8383614ef5565b8060001904821115614d0757614d076148c0565b6000611c8b8383614f3856feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220bfb46ac06d26ea9276b3cf0f0bbe7523a556f150515b6e3acd46ca8b174bd62364736f6c634300080d003368747470733a2f2f626166796265696279377a746434646a6663693763323332677034776d6d6674626663346478347a75786b6f6f656b6933666462657968696f6d692e697066732e6e667473746f726167652e6c696e6b2f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca000000000000000000000000c69017673c7401904354df31e8156e4e39cc5aec303638306261653963633032346633636138663036663439626462363737336600000000000000000000000000000000000000000000000000005af3107a4000000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e699098af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef00000000000000000000000000000000000000000000000000000000000001040000000000000000000000000000000000000000000000000000000000030d400000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000002a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016345785d8a0000000000000000000000000000000000000000000000000000000006d23ad5f800000000000000000000000000000000000000000000000000000000006303b610000000000000000000000000000000000000000000000000000000006303c42000000000000000000000000074a8c497bbe1d983989a09b3c46114ec3505b687000000000000000000000000000000000000000000000000000000000000005968747470733a2f2f626166796265696279377a746434646a6663693763323332677034776d6d6674626663346478347a75786b6f6f656b6933666462657968696f6d692e697066732e6e667473746f726167652e6c696e6b2f00000000000000000000000000000000000000000000000000000000000000000000000000002168747470733a2f2f6761736d6f6e737465722e6e65742f6170692f746f6b656e7300000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x6080604052600436106102e05760003560e01c806376e7eb5511610186578063b2ddb954116100d7578063e147e7df11610085578063e147e7df146108aa578063e6d7e134146108c0578063e985e9c5146108d6578063f2fde38b1461091f578063f4f3b2001461093f578063f75965fb1461095f578063f8f9dc7e1461097f57600080fd5b8063b2ddb954146107ea578063b88d4fde1461080a578063bb73e56c1461082a578063be5e08bc14610840578063c87b56dd14610860578063cd85cdb514610880578063e086e5ec1461089557600080fd5b806392754a261161013457806392754a261461072f57806395d89b411461074f57806396415bd71461076457806399a6936a14610784578063a22cb46514610797578063a3e56fa8146107b7578063a553f7d4146107d757600080fd5b806376e7eb551461064a578063792ea1541461066a5780637b53f8db1461068a5780637bdc60d9146106aa5780637c07cf29146106d75780637dd80137146106ec5780638da5cb5b1461070c57600080fd5b80633d068051116102405780636544489f116101ee5780636544489f1461058857806368feb256146105a05780636e709ac9146105c057806370a08231146105d5578063715018a6146105f557806371c54a171461060a578063727fda031461062a57600080fd5b80633d068051146104c457806342842e0e146104da5780634540771b146104fa578063511a96051461051a5780635c975abb1461053a5780635cbf3b82146105525780636352211e1461056857600080fd5b80631a8bd2da1161029d5780631a8bd2da146103e85780631fe543e3146103fd578063229fd5911461041d57806323b872dd146104325780632a55205a146104525780632f89e5a014610491578063385b23b9146104b157600080fd5b806301ffc9a7146102e557806302964ff11461033457806306fdde0314610361578063081812fc14610383578063095ea7b3146103a357806318160ddd146103c5575b600080fd5b3480156102f157600080fd5b5061031f6103003660046140b6565b6001600160e01b03191660009081526021602052604090205460ff1690565b60405190151581526020015b60405180910390f35b34801561034057600080fd5b50601854610354906001600160a01b031681565b60405161032b91906140d3565b34801561036d57600080fd5b50610376610995565b60405161032b919061413f565b34801561038f57600080fd5b5061035461039e366004614152565b610a27565b3480156103af57600080fd5b506103c36103be366004614187565b610a6b565b005b3480156103d157600080fd5b50600754600654035b60405190815260200161032b565b3480156103f457600080fd5b506103c3610af1565b34801561040957600080fd5b506103c3610418366004614265565b610b03565b34801561042957600080fd5b50610376610b90565b34801561043e57600080fd5b506103c361044d366004614316565b610c1e565b34801561045e57600080fd5b5061047261046d366004614352565b610c29565b604080516001600160a01b03909316835260208301919091520161032b565b34801561049d57600080fd5b506103c36104ac366004614374565b610c59565b6103c36104bf366004614152565b610d30565b3480156104d057600080fd5b506103da601c5481565b3480156104e657600080fd5b506103c36104f5366004614316565b610dc4565b34801561050657600080fd5b506103c3610515366004614152565b610ddf565b34801561052657600080fd5b506103c3610535366004614152565b610dec565b34801561054657600080fd5b50600e5460ff1661031f565b34801561055e57600080fd5b506103da60205481565b34801561057457600080fd5b50610354610583366004614152565b610df9565b34801561059457600080fd5b5060265460ff1661031f565b3480156105ac57600080fd5b506103c36105bb366004614152565b610e0b565b3480156105cc57600080fd5b506103c3610e18565b3480156105e157600080fd5b506103da6105f03660046143ff565b610f43565b34801561060157600080fd5b506103c3610f91565b34801561061657600080fd5b50610376610625366004614439565b610fa3565b34801561063657600080fd5b506103c3610645366004614548565b611018565b34801561065657600080fd5b506103c3610665366004614152565b61102c565b34801561067657600080fd5b506103c3610685366004614152565b611039565b34801561069657600080fd5b506103c36106a53660046145b9565b611377565b3480156106b657600080fd5b506106ca6106c5366004614152565b6113f4565b60405161032b919061464f565b3480156106e357600080fd5b506103766114d4565b3480156106f857600080fd5b506103c3610707366004614152565b6114e1565b34801561071857600080fd5b50600e5461010090046001600160a01b0316610354565b34801561073b57600080fd5b506103c361074a3660046143ff565b6114ee565b34801561075b57600080fd5b506103766114ff565b34801561077057600080fd5b506103c361077f366004614152565b61150e565b6103c3610792366004614352565b61151b565b3480156107a357600080fd5b506103c36107b23660046146cb565b6116a3565b3480156107c357600080fd5b50601354610354906001600160a01b031681565b6103c36107e5366004614771565b611738565b3480156107f657600080fd5b506103c36108053660046147b7565b6118a6565b34801561081657600080fd5b506103c36108253660046147dc565b611a40565b34801561083657600080fd5b506103da601d5481565b34801561084c57600080fd5b506103c361085b3660046147b7565b611a8a565b34801561086c57600080fd5b5061037661087b366004614152565b611b44565b34801561088c57600080fd5b506103c3611c92565b3480156108a157600080fd5b506103c3611ca2565b3480156108b657600080fd5b506103da601e5481565b3480156108cc57600080fd5b506103da601b5481565b3480156108e257600080fd5b5061031f6108f1366004614843565b6001600160a01b039182166000908152600d6020908152604080832093909416825291909152205460ff1690565b34801561092b57600080fd5b506103c361093a3660046143ff565b611d3b565b34801561094b57600080fd5b506103c361095a3660046143ff565b611db1565b34801561096b57600080fd5b506103c361097a366004614548565b611efd565b34801561098b57600080fd5b506103da601f5481565b6060600880546109a490614876565b80601f01602080910402602001604051908101604052809291908181526020018280546109d090614876565b8015610a1d5780601f106109f257610100808354040283529160200191610a1d565b820191906000526020600020905b815481529060010190602001808311610a0057829003601f168201915b5050505050905090565b6000610a3282611f11565b610a4f576040516333d1c03960e21b815260040160405180910390fd5b506000908152600c60205260409020546001600160a01b031690565b6000610a7682610df9565b9050806001600160a01b0316836001600160a01b031603610aaa5760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b03821614610ae157610ac481336108f1565b610ae1576040516367d9dca160e11b815260040160405180910390fd5b610aec838383611f3d565b505050565b610af9611f99565b610b01611ff9565b565b336001600160a01b037f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e699091614610b825760405163073e64fd60e21b81523360048201526001600160a01b037f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e699091660248201526044015b60405180910390fd5b610b8c8282612045565b5050565b60168054610b9d90614876565b80601f0160208091040260200160405190810160405280929190818152602001828054610bc990614876565b8015610c165780601f10610beb57610100808354040283529160200191610c16565b820191906000526020600020905b815481529060010190602001808311610bf957829003601f168201915b505050505081565b610aec83838361223e565b600080610c386103e8846148d6565b610c4390604b6148ea565b6018546001600160a01b03169590945092505050565b610c61611f99565b604081810151601380546001600160401b03928316600160a01b90810267ffffffffffffffff60a01b1990921691909117918290556020808601516014819055606080880151601580546080808c015161ffff908116600160201b90810265ffffffffffff1990941663ffffffff9687161793909317938490558b519890990490991687529486019390935282169684019690965204909116928101929092527f01b5d74f044c811afcaffdce6ece5445f7a76b3da636d716dcaef7f14630a26891015b60405180910390a150565b601b54426001600160401b031611610d8a5760405162461bcd60e51b815260206004820152601e60248201527f5075626c69632073616c65206973206e6f7420737461727465642079657400006044820152606401610b79565b80601e54610d9891906148ea565b341015610db75760405162461bcd60e51b8152600401610b7990614909565b610dc18133612419565b50565b610aec83838360405180602001604052806000815250611a40565b610de7611f99565b601f55565b610df4611f99565b601b55565b6000610e0482612531565b5192915050565b610e13611f99565b602055565b6026805460ff19169055601054600090610e3a9030632f97822f60e21b61264b565b9050610edb6040518060400160405280600381526020016219d95d60ea1b815250604051602001610ec3907f68747470733a2f2f6d792d6a736f6e2d7365727665722e74797069636f64652e81527f636f6d2f6c616d65726573742f6d6f636b2d6261636b656e642f63616e5570676020820152650726164652f360d41b604082015260460190565b60408051601f19818403018152919052839190612670565b610f28604051806040016040528060048152602001630e0c2e8d60e31b815250604051806040016040528060048152602001636461746160e01b815250836126709092919063ffffffff16565b600f54601154610b8c916001600160a01b031690839061268e565b60006001600160a01b038216610f6c576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600b60205260409020546001600160401b031690565b610f99611f99565b610b016000612721565b805160609060ff16600703610fe4576016610fbd8361277b565b604051602001610fce9291906149ec565b6040516020818303038152906040529050611012565b6017610fef84612808565b604051602001611000929190614a11565b60405160208183030381529060405290505b92915050565b611020611f99565b610aec60178383613e6d565b611034611f99565b601c55565b60026019540361108b5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b79565b600260195561109981610df9565b6001600160a01b0316336001600160a01b0316146111085760405162461bcd60e51b815260206004820152602660248201527f4761734d6f6e737465723a204f6e6c79206f776e65722063616e20757067726160448201526519194813919560d21b6064820152608401610b79565b600081815260226020526040902054600760ff909116106111825760405162461bcd60e51b815260206004820152602e60248201527f4761734d6f6e737465723a20546f6b656e2068616420616c726561792072656160448201526d18da1959081b585e081b195d995b60921b6064820152608401610b79565b61118b81612910565b6112495760405162461bcd60e51b815260206004820152607e60248201527f4761734d6f6e737465723a205570677261646520616c726561647920696e207060448201527f726f67726573732e20496620726571756573742077696c6c206e6f7420636f6d60648201527f706c65746520696e203135206d696e757465732c20796f752077696c6c20626560848201527f2061626c6520746f2072657175657374207570677261646520616761696e000060a482015260c401610b79565b600061125f6010543063b2ddb95460e01b61264b565b905061129c6040518060400160405280600381526020016219d95d60ea1b815250601761128b85612808565b604051602001610ec3929190614a48565b6112e9604051806040016040528060048152602001630e0c2e8d60e31b815250604051806040016040528060048152602001636461746160e01b815250836126709092919063ffffffff16565b46617a691461132b578160236000611319600f60009054906101000a90046001600160a01b03168560115461268e565b81526020810191909152604001600020555b604080518082019091526001815260208101426001600160401b0316905260009283526025602090815260409093208151815460ff191690151517815592015160019283015550601955565b61137f611f99565b602081810151600f80546001600160a01b0319166001600160a01b03909216918217905560408084015160108190556060808601516011819055835194855294840191909152908201929092527f8cbc8987595e6915129825ef9a480bce81957b43f4c4e6e9665ee88e6f4ded939101610d25565b6113fc613ef1565b600082815260226020908152604080832081516101008082018452825460ff80821684529181048216958301959095526201000085048116828501526301000000850481166060830152600160201b850481166080830152600160281b8504811660a0830152600160301b90940490931660c084015281516101208101928390529293909260e0850192909160018501916009918390855b825461010083900a900460ff1615158152602060019283018181049485019490930390920291018084116114945790505050505050815250509050919050565b60178054610b9d90614876565b6114e9611f99565b601d55565b6114f6611f99565b610dc18161296b565b6060600980546109a490614876565b611516611f99565b601e55565b602054426001600160401b031610156115865760405162461bcd60e51b815260206004820152602760248201527f4d696e74206f66206769726c20647261676f6e73206973206e6f7420737461726044820152661d1959081e595d60ca1b6064820152608401610b79565b6000828152602260205260409020805460ff610100909104166001146116015760405162461bcd60e51b815260206004820152602a60248201527f476976656e20626f79447261676f6e496420697320746865204944206f66206760448201526934b93610323930b3b7b760b11b6064820152608401610b79565b3361160b84610df9565b6001600160a01b03161461166d5760405162461bcd60e51b815260206004820152602360248201527f596f7520617265206e6f7420746865206f776e6572206f6620626f792064726160448201526233b7b760e91b6064820152608401610b79565b601f5461167a90836148ea565b3410156116995760405162461bcd60e51b8152600401610b7990614909565b610aec8233612419565b336001600160a01b038316036116cc5760405163b06307db60e01b815260040160405180910390fd5b336000818152600d602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b601c54426001600160401b0316116117925760405162461bcd60e51b815260206004820152601b60248201527f5072652d73616c65206973206e6f7420737461727465642079657400000000006044820152606401610b79565b601a54737e70a29dde0d6c7eeb9ae5437a9cad352ef663b590636cb80720906001600160a01b0316836117c433612abf565b6040518463ffffffff1660e01b81526004016117e293929190614a85565b602060405180830381865af41580156117ff573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118239190614abb565b61186f5760405162461bcd60e51b815260206004820152601a60248201527f50726573616c65207369676e61747572652069732077726f6e670000000000006044820152606401610b79565b81601d5461187d91906148ea565b34101561189c5760405162461bcd60e51b8152600401610b7990614909565b610b8c8233612419565b60008281526005602052604090205482906001600160a01b031633146118de5760405162461bcd60e51b8152600401610b7990614ad8565b60008181526005602052604080822080546001600160a01b03191690555182917f7cc135e0cebb02c3480ae5d74d377283180a2601f8f644edf7987b009316c63a91a28161195f576040518381527fc52c3a4d67df216e5611da5bf2188b1a0dd89082849b3d058585329ef16cc298906020015b60405180910390a1505050565b6000838152602360209081526040808320548084526022909252909120805461198c9060ff166001614b20565b815460ff191660ff919091161781556040805160018082528183019092526000916020808301908036833701905050905082816000815181106119d1576119d1614b45565b6020908102919091010152815460ff16600703611a21576119f983662bdc545df2bded612cca565b611a0283612ec8565b6000838152602560205260408120805460ff1916815560010155611a2a565b611a2a81612fa5565b5050506000928352505060236020526040812055565b611a4b84848461223e565b6001600160a01b0383163b15611a8457611a6784848484613121565b611a84576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b60008281526005602052604090205482906001600160a01b03163314611ac25760405162461bcd60e51b8152600401610b7990614ad8565b60008181526005602052604080822080546001600160a01b03191690555182917f7cc135e0cebb02c3480ae5d74d377283180a2601f8f644edf7987b009316c63a91a26026805460ff191660011790556040517fc307026e7c13eda98900e6d5e0712c9023c83d29d001161e175c346279e064b0906119529085815260200190565b6060611b4f82611f11565b611bb15760405162461bcd60e51b815260206004820152602d60248201527f4761734d6f6e737465723a20555249207265717565737420666f72206e6f6e2060448201526c32bc34b9ba32b7103a37b5b2b760991b6064820152608401610b79565b600082815260226020908152604080832081516101008082018452825460ff80821684529181048216958301959095526201000085048116828501526301000000850481166060830152600160201b850481166080830152600160281b8504811660a0830152600160301b90940490931660c08401528151610120810192839052909160e08401919060018401906009908288855b825461010083900a900460ff161515815260206001928301818104948501949093039092029101808411611c465790505050505050815250509050611c8b8382610fa3565b9392505050565b611c9a611f99565b610b0161320c565b611caa611f99565b604051600090339047908381818185875af1925050503d8060008114611cec576040519150601f19603f3d011682016040523d82523d6000602084013e611cf1565b606091505b5050905080610dc15760405162461bcd60e51b815260206004820152601660248201527508cc2d2d8cac840e8de40eed2e8d0c8e4c2ee408aa8960531b6044820152606401610b79565b611d43611f99565b6001600160a01b038116611da85760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610b79565b610dc181612721565b611db9611f99565b6040516370a0823160e01b81526000906001600160a01b038316906370a0823190611de89030906004016140d3565b602060405180830381865afa158015611e05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e299190614b5b565b60405163a9059cbb60e01b8152336004820152602481018290529091506000906001600160a01b0384169063a9059cbb906044016020604051808303816000875af1158015611e7c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ea09190614abb565b905080610aec5760405162461bcd60e51b815260206004820152602560248201527f576974686472617761626c653a205472616e7366657220646964206e6f74206860448201526430b83832b760d91b6064820152608401610b79565b611f05611f99565b610aec60168383613e6d565b6000600654821080156110125750506000908152600a6020526040902054600160e01b900460ff161590565b6000828152600c602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600e546001600160a01b03610100909104163314610b015760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b79565b612001613249565b600e805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405161203b91906140d3565b60405180910390a1565b60008281526024602090815260408083208054825181850281018501909352808352919290919083018282801561209b57602002820191906000526020600020905b815481526020019060010190808311612087575b505050505090506000826000815181106120b7576120b7614b45565b6020026020010151905060005b81156120e9576120d5600a836148d6565b9150806120e181614b74565b9150506120c4565b6000846000815181106120fe576120fe614b45565b6020026020010151905060005b84518160ff16101561221e5761213d858260ff168151811061212f5761212f614b45565b602002602001015183612cca565b612162858260ff168151811061215557612155614b45565b6020026020010151612ec8565b600060226000878460ff168151811061217d5761217d614b45565b6020026020010151815260200190815260200160002060000160009054906101000a900460ff16905060256000878460ff16815181106121bf576121bf614b45565b60209081029190910181015182528101919091526040016000908120805460ff1916815560010155600560ff821610612206576121ff620f4240846148d6565b9250612215565b612212612710846148d6565b92505b5060010161210b565b50600086815260246020526040812061223691613f3c565b505050505050565b600061224982612531565b9050836001600160a01b031681600001516001600160a01b0316146122805760405162a1148160e81b815260040160405180910390fd5b6000336001600160a01b038616148061229e575061229e85336108f1565b806122b95750336122ae84610a27565b6001600160a01b0316145b9050806122d957604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b03841661230057604051633a954ecd60e21b815260040160405180910390fd5b61230c60008487611f3d565b6001600160a01b038581166000908152600b60209081526040808320805467ffffffffffffffff198082166001600160401b0392831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600a90945282852080546001600160e01b031916909417600160a01b429092169190910217835587018084529220805491939091166123e05760065482146123e057805460208601516001600160401b0316600160a01b026001600160e01b03199091166001600160a01b038a16171781555b50505082846001600160a01b0316866001600160a01b0316600080516020614fde83398151915260405160405180910390a45050505050565b612421613292565b60148261242d83610f43565b6124379190614b8d565b111561249d5760405162461bcd60e51b815260206004820152602f60248201527f4761734d6f6e737465723a20596f752061726520616c6c6f77656420746f206760448201526e6574206f6e6c79203230204e46547360881b6064820152608401610b79565b600a82111561250f5760405162461bcd60e51b815260206004820152603860248201527f4761734d6f6e737465723a20596f752063616e206d696e74206f6e6c792031306044820152771036b4b73a1034b71037b732903a3930b739b0b1ba34b7b760411b6064820152608401610b79565b600061251a60065490565b905061252682846132d8565b610aec8184846132f2565b604080516060810182526000808252602082018190529181019190915281600654811015612632576000818152600a6020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff161515918101829052906126305780516001600160a01b0316156125c7579392505050565b50600019016000818152600a6020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff161515928101929092521561262b579392505050565b6125c7565b505b604051636f96cda160e11b815260040160405180910390fd5b612653613f5a565b61265b613f5a565b612667818686866135fc565b95945050505050565b608083015161267f9083613639565b6080830151610aec9082613639565b60045460009061269f816001614b8d565b600455835160408086015160808701515191516000936320214ca360e11b936126d79386938493923092918a91600191602401614ba5565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152905061271786838684613650565b9695505050505050565b600e80546001600160a01b03838116610100818102610100600160a81b031985161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b606061278d826040015160ff16612808565b61279d836020015160ff16612808565b6127ad846060015160ff16612808565b6127bd856080015160ff16612808565b6127cd8660a0015160ff16612808565b6127dd8760c0015160ff16612808565b6040516020016127f296959493929190614c0d565b6040516020818303038152906040529050919050565b60608160000361282f5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612859578061284381614b74565b91506128529050600a836148d6565b9150612833565b6000816001600160401b03811115612873576128736141b1565b6040519080825280601f01601f19166020018201604052801561289d576020820181803683370190505b5090505b8415612908576128b2600183614c99565b91506128bf600a86614cb0565b6128ca906030614b8d565b60f81b8183815181106128df576128df614b45565b60200101906001600160f81b031916908160001a905350612901600a866148d6565b94506128a1565b949350505050565b60008181526025602090815260408083208151808301909252805460ff161580158352600190910154928201929092529080611c8b5750602081015161295890610384614b8d565b426001600160401b031610159392505050565b6001600160a01b0381166129e15760405162461bcd60e51b815260206004820152603760248201527f526f79616c74793a20547279696e6720746f20736574207a65726f206164647260448201527632b9b99030b9903937bcb0b63a3c903932b1b2b4bb32b960491b6064820152608401610b79565b6018546001600160a01b03163314612a5d5760405162461bcd60e51b815260206004820152603960248201527f526f79616c74793a204f6e6c792063757272656e742072656365697665722063604482015278616e206368616e676520726f79616c7479206164647265737360381b6064820152608401610b79565b601880546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f5ace107b6652aa4ced8d6bc340980146396d063d09434dedf07c84c977e72ad291015b60405180910390a15050565b604051606082811b6001600160601b03191660208301529060009060340160408051808303601f19018152602a80845260608401909252925060009190602082018180368337019050509050600360fc1b81600081518110612b2357612b23614b45565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110612b5257612b52614b45565b60200101906001600160f81b031916908160001a90535060005b6014811015612cc25760006010848381518110612b8b57612b8b614b45565b0160200151612b9d919060f81c614cc4565b90506000612bac826010614ce6565b858481518110612bbe57612bbe614b45565b0160200151612bd0919060f81c614d0f565b90506000600a8360ff1610612bf257612bea836057614b20565b60f81b612c01565b612bfd836030614b20565b60f81b5b90506000600a8360ff1610612c2357612c1b836057614b20565b60f81b612c32565b612c2e836030614b20565b60f81b5b90508086612c418760026148ea565b612c4c906003614b8d565b81518110612c5c57612c5c614b45565b60200101906001600160f81b031916908160001a9053508186612c808760026148ea565b612c8b906002614b8d565b81518110612c9b57612c9b614b45565b60200101906001600160f81b031916908160001a9053505060019093019250612b6c915050565b509392505050565b60008281526022602052604090208054829060ff16600103612d3d57602054426001600160401b03161015612d0b57815461ff001916610100178255612d15565b815461ff00191682555b612d20600582614cb0565b825460ff91909116620100000262ff000019909116178255612e86565b815460ff16600203612da557612d54600582614cb0565b825460ff9190911663010000000263ff00000019909116178255600a612d7b6064836148d6565b612d859190614cb0565b825460ff91909116600160201b0264ff0000000019909116178255612e86565b815460ff16600303612ddd57612dbc600a82614cb0565b825460ff91909116600160281b0265ff000000000019909116178255612e86565b815460ff16600403612e1657612df4600a82614cb0565b825460ff91909116600160301b0266ff00000000000019909116178255612e86565b8154600560ff90911610612e86576000612e2f856137a9565b60ff1690505b8254612e469060049060ff16614d0f565b612e51906003614ce6565b60ff16811015612e8457612e658583613815565b612e706064836148d6565b915080612e7c81614b74565b915050612e35565b505b815460ff16600503611a8457612e9d600582614cb0565b612ea8906005614b20565b825460ff9190911663010000000263ff0000001990911617825550505050565b6000818152602260205260409020805460ff16600103612f2f577fcd5dd0d31a8fc85dff397bf995668a42a420c1dfa393aee6b096553e843b7319612f0c83610df9565b8254604051612ab39291869160ff61010083048116926201000090041690614d32565b80546040517fc24f3c2ec9a7f5d6258a9b849a5b1dee202eb5ea36455a944985883eb7e4f28291612ab391859160ff80821692610100830482169262010000810483169263010000008204811692600160201b8304821692600160281b8104831692600160301b909104169060018c0190614d5e565b6012546014546013546015546040516305d3b1d360e41b81526004810193909352600160a01b9091046001600160401b03166024830152600160201b810461ffff16604483015263ffffffff166064820152600160848201526000916001600160a01b031690635d3b1d309060a4016020604051808303816000875af1158015613033573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130579190614b5b565b6000818152602460209081526040909120845192935061307b929091850190613f8a565b5060005b82518160ff161015610aec576130b160405180604001604052806005815260200164636865636b60d81b8152506138fe565b604080518082019091526001815260208101426001600160401b031681525060256000858460ff16815181106130e9576130e9614b45565b6020908102919091018101518252818101929092526040016000208251815460ff19169015151781559101516001918201550161307f565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290613156903390899088908890600401614e5f565b6020604051808303816000875af1925050508015613191575060408051601f3d908101601f1916820190925261318e91810190614e92565b60015b6131ef573d8080156131bf576040519150601f19603f3d011682016040523d82523d6000602084013e6131c4565b606091505b5080516000036131e7576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b613214613292565b600e805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861202e3390565b600e5460ff16610b015760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610b79565b600e5460ff1615610b015760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610b79565b610b8c828260405180602001604052806000815250613941565b6000826001600160401b0381111561330c5761330c6141b1565b604051908082528060200260200182016040528015613335578160200160208202803683370190505b5090508360005b848110156122365760006020546133504290565b6001600160401b031610156133675750600161336b565b5060005b600060054260405160c09190911b6001600160c01b0319166020820152436028820152604881018690526068016040516020818303038152906040528051906020012060001c6133bb9190614cb0565b9050604051806101000160405280600160ff1681526020018360ff1681526020018260ff168152602001600a60ff168152602001600a60ff168152602001600a60ff168152602001600a60ff168152602001604051806101200160405280600015151515815260200160001515151581526020016000151515158152602001600015151515815260200160001515151581526020016000151515158152602001600015151515815260200160001515151581526020016000151515158152508152506022600086815260200190815260200160002060008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160000160016101000a81548160ff021916908360ff16021790555060408201518160000160026101000a81548160ff021916908360ff16021790555060608201518160000160036101000a81548160ff021916908360ff16021790555060808201518160000160046101000a81548160ff021916908360ff16021790555060a08201518160000160056101000a81548160ff021916908360ff16021790555060c08201518160000160066101000a81548160ff021916908360ff16021790555060e08201518160010190600961358e929190613fc5565b50905050838584815181106135a5576135a5614b45565b6020026020010181815250507fcd5dd0d31a8fc85dff397bf995668a42a420c1dfa393aee6b096553e843b7319868584846040516135e69493929190614d32565b60405180910390a150506001918201910161333c565b613604613f5a565b6136148560800151610100613ad5565b50509183526001600160a01b031660208301526001600160e01b031916604082015290565b6136468260038351613b2d565b610aec8282613c34565b6040516001600160601b03193060601b1660208201526034810184905260009060540160408051808303601f1901815282825280516020918201206000818152600590925291812080546001600160a01b0319166001600160a01b038a1617905590925082917fb5e6e01e79f91267dc17b4e6314d5d4d03593d2ceee0fbb452b750bd70ea5af99190a2600254604051630200057560e51b81526001600160a01b0390911690634000aea09061370e90889087908790600401614eaf565b6020604051808303816000875af115801561372d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906137519190614abb565b6129085760405162461bcd60e51b815260206004820152602360248201527f756e61626c6520746f207472616e73666572416e6443616c6c20746f206f7261604482015262636c6560e81b6064820152608401610b79565b6000818152602260205260408120815b60098160ff16101561380e57816001018160ff16600981106137dd576137dd614b45565b602081049091015460ff601f9092166101000a90041615613806578261380281614ed6565b9350505b6001016137b9565b5050919050565b60008281526022602052604081209061382d846137a9565b9050600061383c826009614d0f565b6138499060ff1685614cb0565b613854906001614b8d565b90506000805b846001018160ff166009811061387257613872614b45565b602081049091015460ff601f9092166101000a9004161561389b578161389781614ed6565b9250505b6001016138a88284614b20565b60ff168160ff161061385a5760018581016138c38284614d0f565b60ff16600981106138d6576138d6614b45565b602091828204019190066101000a81548160ff02191690831515021790555050505050505050565b610dc181604051602401613912919061413f565b60408051601f198184030181529190526020810180516001600160e01b031663104c13eb60e21b179052613c4e565b6006546001600160a01b03841661396a57604051622e076360e81b815260040160405180910390fd5b8260000361398b5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b0384166000818152600b6020908152604080832080546001600160801b031981166001600160401b038083168b018116918217600160401b67ffffffffffffffff1990941690921783900481168b01811690920217909155858452600a90925290912080546001600160e01b0319168317600160a01b42909316929092029190911790558190818501903b15613a93575b60405182906001600160a01b03881690600090600080516020614fde833981519152908290a4613a5c6000878480600101955087613121565b613a79576040516368d2bf6b60e11b815260040160405180910390fd5b808210613a23578260065414613a8e57600080fd5b613ac6565b5b6040516001830192906001600160a01b03881690600090600080516020614fde833981519152908290a4808210613a94575b50600655611a84600085838684565b613add614052565b613ae8602083614cb0565b15613b1057613af8602083614cb0565b613b03906020614c99565b613b0d9083614b8d565b91505b506020828101829052604080518085526000815290920101905290565b6017816001600160401b031611613b5157611a848360e0600585901b168317613c6f565b60ff816001600160401b031611613b8d57613b77836018611fe0600586901b1617613c6f565b50611a84836001600160401b0383166001613c87565b61ffff816001600160401b031611613bca57613bb4836019611fe0600586901b1617613c6f565b50611a84836001600160401b0383166002613c87565b63ffffffff816001600160401b031611613c0957613bf383601a611fe0600586901b1617613c6f565b50611a84836001600160401b0383166004613c87565b613c1e83601b611fe0600586901b1617613c6f565b50611a84836001600160401b0383166008613c87565b613c3c614052565b611c8b83846000015151848551613ca0565b80516a636f6e736f6c652e6c6f67602083016000808483855afa5050505050565b613c77614052565b611c8b8384600001515184613d7d565b613c8f614052565b612908848560000151518585613dcb565b613ca8614052565b8251821115613cb657600080fd5b6020850151613cc58386614b8d565b1115613cf857613cf885613ce887602001518786613ce39190614b8d565b613e3f565b613cf39060026148ea565b613e56565b600080865180518760208301019350808887011115613d175787860182525b505050602084015b60208410613d575780518252613d36602083614b8d565b9150613d43602082614b8d565b9050613d50602085614c99565b9350613d1f565b51815160001960208690036101000a019081169019919091161790525083949350505050565b613d85614052565b83602001518310613da557613da58485602001516002613cf391906148ea565b8351805160208583010184815350808503613dc1576001810182525b5093949350505050565b613dd3614052565b6020850151613de28584614b8d565b1115613df657613df685613ce88685614b8d565b60006001613e0684610100614fd1565b613e109190614c99565b9050855183868201018583198251161781525080518487011115613e345783860181525b509495945050505050565b600081831115613e50575081611012565b50919050565b8151613e628383613ad5565b50611a848382613c34565b828054613e7990614876565b90600052602060002090601f016020900481019282613e9b5760008555613ee1565b82601f10613eb45782800160ff19823516178555613ee1565b82800160010185558215613ee1579182015b82811115613ee1578235825591602001919060010190613ec6565b50613eed92915061406c565b5090565b6040805161010081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c081019190915260e08101613f37614081565b905290565b5080546000825590600052602060002090810190610dc1919061406c565b6040805160a081018252600080825260208201819052918101829052606081019190915260808101613f37614052565b828054828255906000526020600020908101928215613ee1579160200282015b82811115613ee1578251825591602001919060010190613faa565b600183019183908215613ee15791602002820160005b8382111561401857835183826101000a81548160ff0219169083151502179055509260200192600101602081600001049283019260010302613fdb565b80156140455782816101000a81549060ff0219169055600101602081600001049283019260010302614018565b5050613eed92915061406c565b604051806040016040528060608152602001600081525090565b5b80821115613eed576000815560010161406d565b6040518061012001604052806009906020820280368337509192915050565b6001600160e01b031981168114610dc157600080fd5b6000602082840312156140c857600080fd5b8135611c8b816140a0565b6001600160a01b0391909116815260200190565b60005b838110156141025781810151838201526020016140ea565b83811115611a845750506000910152565b6000815180845261412b8160208601602086016140e7565b601f01601f19169290920160200192915050565b602081526000611c8b6020830184614113565b60006020828403121561416457600080fd5b5035919050565b80356001600160a01b038116811461418257600080fd5b919050565b6000806040838503121561419a57600080fd5b6141a38361416b565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b60405160a081016001600160401b03811182821017156141e9576141e96141b1565b60405290565b60405161010081016001600160401b03811182821017156141e9576141e96141b1565b60405161012081016001600160401b03811182821017156141e9576141e96141b1565b604051601f8201601f191681016001600160401b038111828210171561425d5761425d6141b1565b604052919050565b6000806040838503121561427857600080fd5b823591506020808401356001600160401b038082111561429757600080fd5b818601915086601f8301126142ab57600080fd5b8135818111156142bd576142bd6141b1565b8060051b91506142ce848301614235565b81815291830184019184810190898411156142e857600080fd5b938501935b83851015614306578435825293850193908501906142ed565b8096505050505050509250929050565b60008060006060848603121561432b57600080fd5b6143348461416b565b92506143426020850161416b565b9150604084013590509250925092565b6000806040838503121561436557600080fd5b50508035926020909101359150565b600060a0828403121561438657600080fd5b61438e6141c7565b6143978361416b565b81526020830135602082015260408301356001600160401b03811681146143bd57600080fd5b6040820152606083013563ffffffff811681146143d957600080fd5b6060820152608083013561ffff811681146143f357600080fd5b60808201529392505050565b60006020828403121561441157600080fd5b611c8b8261416b565b803560ff8116811461418257600080fd5b8015158114610dc157600080fd5b6000808284036102208082121561444f57600080fd5b843593506020610200601f198401121561446857600080fd5b6144706141ef565b925061447d81870161441a565b835261448b6040870161441a565b8184015261449b6060870161441a565b60408401526144ac6080870161441a565b60608401526144bd60a0870161441a565b60808401526144ce60c0870161441a565b60a08401526144df60e0870161441a565b60c08401528661011f8701126144f457600080fd5b6144fc614212565b91860191808884111561450e57600080fd5b61010088015b848110156145345780356145278161442b565b8352918301918301614514565b5060e0850152509396919550909350505050565b6000806020838503121561455b57600080fd5b82356001600160401b038082111561457257600080fd5b818501915085601f83011261458657600080fd5b81358181111561459557600080fd5b8660208285010111156145a757600080fd5b60209290920196919550909350505050565b6000608082840312156145cb57600080fd5b604051608081018181106001600160401b03821117156145ed576145ed6141b1565b6040526145f98361416b565b81526146076020840161416b565b602082015260408301356040820152606083013560608201528091505092915050565b8060005b6009811015611a84578151151584526020938401939091019060010161462e565b60006102008201905060ff8084511683528060208501511660208401528060408501511660408401528060608501511660608401528060808501511660808401528060a08501511660a08401525060c08301516146b160c084018260ff169052565b5060e08301516146c460e084018261462a565b5092915050565b600080604083850312156146de57600080fd5b6146e78361416b565b915060208301356146f78161442b565b809150509250929050565b600082601f83011261471357600080fd5b81356001600160401b0381111561472c5761472c6141b1565b61473f601f8201601f1916602001614235565b81815284602083860101111561475457600080fd5b816020850160208301376000918101602001919091529392505050565b6000806040838503121561478457600080fd5b8235915060208301356001600160401b038111156147a157600080fd5b6147ad85828601614702565b9150509250929050565b600080604083850312156147ca57600080fd5b8235915060208301356146f78161442b565b600080600080608085870312156147f257600080fd5b6147fb8561416b565b93506148096020860161416b565b92506040850135915060608501356001600160401b0381111561482b57600080fd5b61483787828801614702565b91505092959194509250565b6000806040838503121561485657600080fd5b61485f8361416b565b915061486d6020840161416b565b90509250929050565b600181811c9082168061488a57607f821691505b602082108103613e5057634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000826148e5576148e56148aa565b500490565b6000816000190483118215151615614904576149046148c0565b500290565b6020808252602a908201527f4761734d6f6e737465723a204e6f7420656e6f7567682065746865727320746f604082015269206d696e74204e46547360b01b606082015260800190565b8054600090600181811c908083168061496d57607f831692505b6020808410820361498e57634e487b7160e01b600052602260045260246000fd5b8180156149a257600181146149b3576149e0565b60ff198616895284890196506149e0565b60008881526020902060005b868110156149d85781548b8201529085019083016149bf565b505084890196505b50505050505092915050565b60006149f88285614953565b8351614a088183602088016140e7565b01949350505050565b6000614a1d8285614953565b652f6d6574612f60d01b81528351614a3c8160068401602088016140e7565b01600601949350505050565b6000614a548285614953565b6b2f63616e557067726164652f60a01b81528351614a7981600c8401602088016140e7565b01600c01949350505050565b6001600160a01b0384168152606060208201819052600090614aa990830185614113565b82810360408401526127178185614113565b600060208284031215614acd57600080fd5b8151611c8b8161442b565b60208082526028908201527f536f75726365206d75737420626520746865206f7261636c65206f6620746865604082015267081c995c5d595cdd60c21b606082015260800190565b600060ff821660ff84168060ff03821115614b3d57614b3d6148c0565b019392505050565b634e487b7160e01b600052603260045260246000fd5b600060208284031215614b6d57600080fd5b5051919050565b600060018201614b8657614b866148c0565b5060010190565b60008219821115614ba057614ba06148c0565b500190565b6001600160a01b0389811682526020820189905260408201889052861660608201526001600160e01b03198516608082015260a0810184905260c0810183905261010060e08201819052600090614bfe83820185614113565b9b9a5050505050505050505050565b600087516020614c208285838d016140e7565b885191840191614c338184848d016140e7565b8851920191614c458184848c016140e7565b8751920191614c578184848b016140e7565b8651920191614c698184848a016140e7565b8551920191614c7b81848489016140e7565b64173539b7b760d91b92019182525060050198975050505050505050565b600082821015614cab57614cab6148c0565b500390565b600082614cbf57614cbf6148aa565b500690565b600060ff831680614cd757614cd76148aa565b8060ff84160491505092915050565b600060ff821660ff84168160ff0481118215151615614d0757614d076148c0565b029392505050565b600060ff821660ff841680821015614d2957614d296148c0565b90039392505050565b6001600160a01b03949094168452602084019290925260ff908116604084015216606082015260800190565b89815260ff898116602083015288811660408301528781166060830152868116608083015285811660a083015284811660c083015283811660e08301528254808216151561010084015261022083019190614dc36101208501838360081c1615159052565b614dd76101408501838360101c1615159052565b614deb6101608501838360181c1615159052565b614dff6101808501838360201c1615159052565b614e136101a08501838360281c1615159052565b614e276101c08501838360301c1615159052565b614e3b6101e08501838360381c1615159052565b614e4f6102008501838360401c1615159052565b50509a9950505050505050505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061271790830184614113565b600060208284031215614ea457600080fd5b8151611c8b816140a0565b60018060a01b03841681528260208201526060604082015260006126676060830184614113565b600060ff821660ff8103614eec57614eec6148c0565b60010192915050565b600181815b80851115614f30578160001904821115614f1657614f166148c0565b80851615614f2357918102915b93841c9390800290614efa565b509250929050565b600082614f4757506001611012565b81614f5457506000611012565b8160018114614f6a5760028114614f7457614f90565b6001915050611012565b60ff841115614f8557614f856148c0565b50506001821b611012565b5060208310610133831016604e8410600b8410161715614fb3575081810a611012565b614fbd8383614ef5565b8060001904821115614d0757614d076148c0565b6000611c8b8383614f3856feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220bfb46ac06d26ea9276b3cf0f0bbe7523a556f150515b6e3acd46ca8b174bd62364736f6c634300080d0033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca000000000000000000000000c69017673c7401904354df31e8156e4e39cc5aec303638306261653963633032346633636138663036663439626462363737336600000000000000000000000000000000000000000000000000005af3107a4000000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e699098af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef00000000000000000000000000000000000000000000000000000000000001040000000000000000000000000000000000000000000000000000000000030d400000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000002a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016345785d8a0000000000000000000000000000000000000000000000000000000006d23ad5f800000000000000000000000000000000000000000000000000000000006303b610000000000000000000000000000000000000000000000000000000006303c42000000000000000000000000074a8c497bbe1d983989a09b3c46114ec3505b687000000000000000000000000000000000000000000000000000000000000005968747470733a2f2f626166796265696279377a746434646a6663693763323332677034776d6d6674626663346478347a75786b6f6f656b6933666462657968696f6d692e697066732e6e667473746f726167652e6c696e6b2f00000000000000000000000000000000000000000000000000000000000000000000000000002168747470733a2f2f6761736d6f6e737465722e6e65742f6170692f746f6b656e7300000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _chainlinkConfig (tuple): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]
Arg [1] : _chainlinkVRFConfig (tuple): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]
Arg [2] : _ipfsMetadataURL (string): https://bafybeiby7ztd4djfci7c232gp4wmmftbfc4dx4zuxkooeki3fdbeyhiomi.ipfs.nftstorage.link/
Arg [3] : _backendBaseURL (string): https://gasmonster.net/api/tokens
Arg [4] : _preSalePriceOfNFT (uint256): 0
Arg [5] : _publicSalePriceOfNFT (uint256): 100000000000000000
Arg [6] : _discountedGirlDragonPrice (uint256): 7500000000000
Arg [7] : _preSaleTimestamp (uint256): 1661187600
Arg [8] : _publicSaleTimestamp (uint256): 1661191200
Arg [9] : royaltyReceiver (address): 0x74A8C497Bbe1d983989A09B3C46114EC3505b687

-----Encoded View---------------
24 Constructor Arguments found :
Arg [0] : 000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca
Arg [1] : 000000000000000000000000c69017673c7401904354df31e8156e4e39cc5aec
Arg [2] : 3036383062616539636330323466336361386630366634396264623637373366
Arg [3] : 00000000000000000000000000000000000000000000000000005af3107a4000
Arg [4] : 000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e69909
Arg [5] : 8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000104
Arg [7] : 0000000000000000000000000000000000000000000000000000000000030d40
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000220
Arg [10] : 00000000000000000000000000000000000000000000000000000000000002a0
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [12] : 000000000000000000000000000000000000000000000000016345785d8a0000
Arg [13] : 000000000000000000000000000000000000000000000000000006d23ad5f800
Arg [14] : 000000000000000000000000000000000000000000000000000000006303b610
Arg [15] : 000000000000000000000000000000000000000000000000000000006303c420
Arg [16] : 00000000000000000000000074a8c497bbe1d983989a09b3c46114ec3505b687
Arg [17] : 0000000000000000000000000000000000000000000000000000000000000059
Arg [18] : 68747470733a2f2f626166796265696279377a746434646a6663693763323332
Arg [19] : 677034776d6d6674626663346478347a75786b6f6f656b693366646265796869
Arg [20] : 6f6d692e697066732e6e667473746f726167652e6c696e6b2f00000000000000
Arg [21] : 0000000000000000000000000000000000000000000000000000000000000021
Arg [22] : 68747470733a2f2f6761736d6f6e737465722e6e65742f6170692f746f6b656e
Arg [23] : 7300000000000000000000000000000000000000000000000000000000000000


Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.