Contract 0xa8e8850B50a07e89bd9DC89F2C79384Ac60fB159

 
 
Txn Hash
Method
Block
From
To
Value [Txn Fee]
0x9f959bb512bc0bdf0be93e10d640c3d7a9c73887ad1aff4104bdb2c8d34e34f5Set Approval For...382347612023-01-18 15:06:52137 days 9 hrs ago0x9241c3eefd92672e3968faf9aa92f2c30770fca4 IN  0xa8e8850b50a07e89bd9dc89f2c79384ac60fb1590 MATIC0.004200962549 91.028440948
0x739989ee97b5794e11f4b072e80efa1ea35fef6e8a0d14897e6b8887e26fa066Safe Transfer Fr...368775732022-12-15 22:41:56171 days 1 hr ago0xeba6a741a94a3e881c11d299929e0290a73a8544 IN  0xa8e8850b50a07e89bd9dc89f2c79384ac60fb1590 MATIC0.003352498601 38.695475439
0xbdd7596e355237379dd3461618d0ff4e5ae14bb68e19d6cffdc672c24fa72251Safe Transfer Fr...288512742022-05-27 23:38:06373 days 59 mins ago0x0dc59ef3a29d4c7ac87ba04071eee3fb5dedf356 IN  0xa8e8850b50a07e89bd9dc89f2c79384ac60fb1590 MATIC0.002977941679 33.319999993
0xe40634d435efa4772770d3746ef9b840c8a9d4bb3e720f307293f4be71e76de1Safe Transfer Fr...288512642022-05-27 23:37:46373 days 1 hr ago0x0dc59ef3a29d4c7ac87ba04071eee3fb5dedf356 IN  0xa8e8850b50a07e89bd9dc89f2c79384ac60fb1590 MATIC0.002482088533 33.418000017
0xd31ab4cbe6c727e147c038deceb718d3ebbb3c5fe83d2ed0bf093d7112731d57Safe Transfer Fr...288512512022-05-27 23:37:16373 days 1 hr ago0x0dc59ef3a29d4c7ac87ba04071eee3fb5dedf356 IN  0xa8e8850b50a07e89bd9dc89f2c79384ac60fb1590 MATIC0.003193054175 35.726880032
0x664a14a6bbc45a3a3341ce46bf79d7d218e14c3224cd7b12beb96a3c862e782eSet Approval For...199703552021-10-08 4:31:01604 days 20 hrs ago0x0ffe1c09006c525da200eb69e86d8c6b58bf0e91 IN  0xa8e8850b50a07e89bd9dc89f2c79384ac60fb1590 MATIC0.0004623410
0xd2d89e5e883eef98bb25877a2532f3520e0eed5c20556e2b886029a3aad9413cComplete Viking197446932021-10-02 4:25:32610 days 20 hrs ago0xcc001d8e687d0157edbdf46a65eba563f9d4b7cf IN  0xa8e8850b50a07e89bd9dc89f2c79384ac60fb1590 MATIC0.0024694100
0xdd59ab885489e215953f0f0ecb5e5069d1b6d2d6b2a93873582a4d483b1c3e0bComplete Viking197446862021-10-02 4:25:18610 days 20 hrs ago0xcc001d8e687d0157edbdf46a65eba563f9d4b7cf IN  0xa8e8850b50a07e89bd9dc89f2c79384ac60fb1590 MATIC0.0024694100
0x58ca1a8c32470c8c43f2e3fd6ece2d54bbfdfa7e02cba54f9f98cbf976f613bdResolve Viking197446782021-10-02 4:25:02610 days 20 hrs ago0xcc001d8e687d0157edbdf46a65eba563f9d4b7cf IN  0xa8e8850b50a07e89bd9dc89f2c79384ac60fb1590 MATIC0.0430676100
0x9d011edaced58bc909d55b5cf01f656e989d6d960a189ad5540a60ff6a83f731Resolve Viking197446712021-10-02 4:24:48610 days 20 hrs ago0xcc001d8e687d0157edbdf46a65eba563f9d4b7cf IN  0xa8e8850b50a07e89bd9dc89f2c79384ac60fb1590 MATIC0.0430707100
0xa20baf5806c18a4ba5530114ee6759cbde150af33c3ac79b9bf78dff06241e00Generate Viking197446632021-10-02 4:24:32610 days 20 hrs ago0xcc001d8e687d0157edbdf46a65eba563f9d4b7cf IN  0xa8e8850b50a07e89bd9dc89f2c79384ac60fb1590 MATIC0.0325502100
0xedc448b132ecceb58109f61043ea0e485370f8286c9ff8e77188a7c46d4c186aGenerate Viking197446562021-10-02 4:24:18610 days 20 hrs ago0xcc001d8e687d0157edbdf46a65eba563f9d4b7cf IN  0xa8e8850b50a07e89bd9dc89f2c79384ac60fb1590 MATIC0.0325502100
0x453ed6fa18e27b355f029d404f13202ac9b4f225d2b2d12c3d4fa97a0c254314Complete Viking197446482021-10-02 4:24:02610 days 20 hrs ago0xcc001d8e687d0157edbdf46a65eba563f9d4b7cf IN  0xa8e8850b50a07e89bd9dc89f2c79384ac60fb1590 MATIC0.0024694100
0xb43146dde75c533ca5eef458d40ea31ac2f266d4657f6b194c1038bde5943ca8Complete Viking197446412021-10-02 4:23:48610 days 20 hrs ago0xcc001d8e687d0157edbdf46a65eba563f9d4b7cf IN  0xa8e8850b50a07e89bd9dc89f2c79384ac60fb1590 MATIC0.0024694100
0x31f5a89bc48d719b73a25bed33e4d705e03d91422674be7c1b0c5c51257107d4Resolve Viking197446352021-10-02 4:23:32610 days 20 hrs ago0xcc001d8e687d0157edbdf46a65eba563f9d4b7cf IN  0xa8e8850b50a07e89bd9dc89f2c79384ac60fb1590 MATIC0.0431271100
0xc5d03885cfe9f377f7471b33d53b8b4a103114481c59b728184ae9417eb8899bResolve Viking197446282021-10-02 4:23:18610 days 20 hrs ago0xcc001d8e687d0157edbdf46a65eba563f9d4b7cf IN  0xa8e8850b50a07e89bd9dc89f2c79384ac60fb1590 MATIC0.043086100
0x30bf613d40b9c617cfa4f4090f971bb95ba6fa7a2c952af55a86ce30e1497ebfGenerate Viking197446202021-10-02 4:23:02610 days 20 hrs ago0xcc001d8e687d0157edbdf46a65eba563f9d4b7cf IN  0xa8e8850b50a07e89bd9dc89f2c79384ac60fb1590 MATIC0.0325502100
0x5bc6fb386911c806b3d36783afc64e320235aad4983232d181ff957b25569501Generate Viking197446132021-10-02 4:22:48610 days 20 hrs ago0xcc001d8e687d0157edbdf46a65eba563f9d4b7cf IN  0xa8e8850b50a07e89bd9dc89f2c79384ac60fb1590 MATIC0.0325502100
0x40562436948e0b000b8d243a68e8f114b52edf673ac72263a97544d9801023a3Complete Viking197446052021-10-02 4:22:32610 days 20 hrs ago0xcc001d8e687d0157edbdf46a65eba563f9d4b7cf IN  0xa8e8850b50a07e89bd9dc89f2c79384ac60fb1590 MATIC0.0024694100
0x97f7d880a7d0cfc7fcec5aa2aed55259d99b53380725dafefd2d2e7697bb4f2eComplete Viking197445982021-10-02 4:22:18610 days 20 hrs ago0xcc001d8e687d0157edbdf46a65eba563f9d4b7cf IN  0xa8e8850b50a07e89bd9dc89f2c79384ac60fb1590 MATIC0.0024694100
0x17d5706553b77eb96c6df087bd4e3438c947a07b129e7fcbd9924d504d372f4cResolve Viking197445912021-10-02 4:22:04610 days 20 hrs ago0xcc001d8e687d0157edbdf46a65eba563f9d4b7cf IN  0xa8e8850b50a07e89bd9dc89f2c79384ac60fb1590 MATIC0.0430756100
0x372d84abcaaf0395da3f53b8a24ab50987c7e81a7b3e90087afee4692260419bResolve Viking197445832021-10-02 4:21:48610 days 20 hrs ago0xcc001d8e687d0157edbdf46a65eba563f9d4b7cf IN  0xa8e8850b50a07e89bd9dc89f2c79384ac60fb1590 MATIC0.043077100
0x9f5389d31348c4b02298c44e914215b6f7a213267e3b025ce7838d339499999cGenerate Viking197445762021-10-02 4:21:34610 days 20 hrs ago0xcc001d8e687d0157edbdf46a65eba563f9d4b7cf IN  0xa8e8850b50a07e89bd9dc89f2c79384ac60fb1590 MATIC0.0325502100
0x76d1a00d996511c5878b4a838a9342e3dbbec3a761ae1d309bc9caef22c4a2ffGenerate Viking197445702021-10-02 4:21:18610 days 20 hrs ago0xcc001d8e687d0157edbdf46a65eba563f9d4b7cf IN  0xa8e8850b50a07e89bd9dc89f2c79384ac60fb1590 MATIC0.0325502100
0xde6cb9aace4ee80d710ace7c08674ad25a77d64388e7a0b18313b2fbfdbfd6e2Complete Viking197445632021-10-02 4:21:04610 days 20 hrs ago0xcc001d8e687d0157edbdf46a65eba563f9d4b7cf IN  0xa8e8850b50a07e89bd9dc89f2c79384ac60fb1590 MATIC0.0024694100
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Nornir

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 175 runs

Other Settings:
default evmVersion
File 1 of 21 : Nornir.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import '@openzeppelin/contracts/token/ERC721/ERC721.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol';
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/Strings.sol';
import '@chainlink/contracts/src/v0.8/VRFConsumerBase.sol';
import '../interfaces/IWeth.sol';
import '../interfaces/INornirResolver.sol';
import '../libraries/NornirStructs.sol';

/**
 * Main Nornir Contract serving the CryptoVikings collection
 *
 * Implements minting functionality, involving a multi-part procedure of Viking representation breakdown + storage based on a VRF-provided number
 */
contract Nornir is
	ERC721,
	ERC721Enumerable,
	ERC721URIStorage,
	Ownable,
	VRFConsumerBase
{
	using Strings for uint256;

	/** Events - all of these are for facilitating the generation/resolution procedure which occurs on mint, as well as front end user feedback for the same */
	event VikingsMinted(uint256[]);
	event VikingReady(uint256 vikingId);
	event VikingGenerated(uint256 vikingId);
	event VikingResolved(uint256 vikingId, NornirStructs.VikingStats stats, NornirStructs.VikingComponents components, NornirStructs.VikingConditions conditions);
	event VikingComplete(uint256 vikingId);
	event NameChange(uint256 id, string name);

	uint16 public constant MAX_VIKINGS = 9873;
	uint16 public constant MAX_BULK = 50;
	uint16 public constant MAX_OWNER_MINTS = 50;
	uint16 internal constant MAX_PRESALE_VIKINGS = 505;
	uint16 internal constant MAX_PRESALE_MINTS = 5;

	address public constant TREASURY = 0x10073Fb6D644113469bD8e30404BCaD6715388ff;
	address internal constant WETH_ADDRESS = 0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619;

	/* Contracts to be instantiated for internal use */
	IWeth public wETHContract;
	INornirResolver public nornirResolverContract;

	uint256 public launchBlock = 19435000;

	string public baseURI = 'https://api.cryptovikings.io/viking/';

	bool public mintingPaused = false;
	bool public presaleActive = false;
	uint256 public generatedVikingCount = 0;
	uint256 public resolvedVikingCount = 0;
	uint256 public ownerMintedCount = 0;

	/* VRF info */
	uint256 internal fee;
	bytes32 internal keyHash;
	address internal vrfCoordinator;

	/* Mapping of tokenId => VikingStats for on-chain storage of the VRF-derived numerical Viking representation */
	mapping(uint256 => NornirStructs.VikingStats) public vikingStats;
	/* Mapping of tokenId => VikingComponents for on-chain storage of the VikingStats-derived Viking Component Names */
	mapping(uint256 => NornirStructs.VikingComponents) public vikingComponents;
	/* Mapping of tokenId => VikingConditions for on-chain storage of the VikingStats-derived Viking Item Condition Names */
	mapping(uint256 => NornirStructs.VikingConditions) public vikingConditions;
	/* Mapping of tokenId => VRF-provided randomNumber for facilitating a breakup of the generation procedure */
	mapping(uint256 => uint256) public vikingIdToRandomNumber;
	/** Mapping of address => boolean for whitelisting wallets for presale */
	mapping(address => bool) public presaleWhitelist;
	/** Mapping of address => count for capping whitelisted wallet purchases in presale */
	mapping(address => uint256) public presaleMintCounts;
	/* Mapping of VRF requestId => tokenId for facilitating a breakup of the generation procedure */
	mapping(bytes32 => uint256) internal requestIdToVikingId;
	/* Mapping of name => boolean for facilitating unique-name validation */
	mapping(bytes32 => bool) internal vikingNames;

	/**
	 * Constructor - set up our external contracts and configure ourselves for VRF usage
	 */
	constructor(address _VRFCoordinator, address _LinkToken, bytes32 _keyHash) VRFConsumerBase(_VRFCoordinator, _LinkToken) ERC721('Viking', 'VKNG') {
		wETHContract = IWeth(WETH_ADDRESS);

		vrfCoordinator = _VRFCoordinator;
		keyHash = _keyHash;

		fee = 0.1 * 10**15;
	}

	/**
	 * Regular mint method for external users
	 *
	 * @param count the number of Vikings to mint
	 */
	function mintViking(uint256 count) public {
		doMint(count, false);
	}

	/**
	 * Protected mint method for Contract owner
	 *
	 * @param count the number of Vikings to mint
	 */
	function ownerMintViking(uint256 count) public onlyOwner {
		doMint(count, true);
	}

	/**
	 * Retrieve all Viking information for a given Token ID at once
	 */
	function getVikingData(uint256 vikingId) public view returns (NornirStructs.VikingStats memory, NornirStructs.VikingComponents memory, NornirStructs.VikingConditions memory) {
		return (vikingStats[vikingId], vikingComponents[vikingId], vikingConditions[vikingId]);
	}

	/**
	 * Calculate the price of minting a given number of Vikings
	 *
	 * Implements the per-NFT bulk-buy discount
	 *
	 * @param qty the number of Vikings to get the price for
	 */
	function calculatePrice(uint256 qty) public view returns (uint256) {
		require(qty > 0 && qty <= MAX_BULK, 'Can only price 1-50 Vikings');

		if (presaleActive) {
			return 50000000000000000 * qty; // 0.05 WETH each
		}

		if (qty >= 25) {
			return 65000000000000000 * qty; // 0.065 WETH each
		}

		if (qty >= 10) {
			return 75000000000000000 * qty; // 0.075 WETH each
		}

		return 85000000000000000 * qty; // 0.085 WETH each
	}

	/**
	 * Validate a given Viking Name
	 *
	 * Names must be:
	 *   - max of 25 characters
	 *   - alhpanumeric
	 *   - no leading or trailing spaces
	 *   - no internal contiguous spaces
	 */
	function validateName(string memory str) public pure returns (bool) {
		bytes memory b = bytes(str);
		if (b.length < 1) return false;
		if (b.length > 25) return false; // Cannot be longer than 25 characters
		if (b[0] == 0x20) return false; // Cannot have leading space
		if (b[b.length - 1] == 0x20) return false; // Cannot have trailing space

		bytes1 lastChar = b[0];

		for (uint256 i; i < b.length; i++) {
			bytes1 char = b[i];

			if (char == 0x20 && lastChar == 0x20) return false; // Cannot contain continous spaces

			if (
				!(char >= 0x30 && char <= 0x39) && //9-0
				!(char >= 0x41 && char <= 0x5A) && //A-Z
				!(char >= 0x61 && char <= 0x7A) && //a-z
				!(char == 0x20) //space
			) return false;

			lastChar = char;
		}

		return true;
	}

	/**
	 * Viking name change method - only the current owner can change the name and the name must be valid
	 */
	function changeName(uint256 vikingId, string memory newName) public {
		require(msg.sender == ownerOf(vikingId), 'Sender does not own Viking');
		require(validateName(newName) == true, 'Name is invalid');
		require(!vikingNames[keccak256(abi.encodePacked(newName))], 'Name is not unique');

		delete vikingNames[keccak256(abi.encodePacked(vikingStats[vikingId].name))];

		vikingStats[vikingId].name = newName;
		vikingNames[keccak256(abi.encodePacked(newName))] = true;

		emit NameChange(vikingId, newName);
	}

	/**
	 * Check if minting is live
	 */
	function isLaunched() public view returns (bool) {
		return block.number >= launchBlock;
	}

	/**
	 * Protected method for toggling mintingPaused
	 */
	function togglePaused() public onlyOwner {
		mintingPaused = !mintingPaused;
	}

	/**
	 * Protected method for toggling the presale
	 */
	function togglePresale() public onlyOwner {
		presaleActive = !presaleActive;
	}

	/**
	 * Protected method for changing the baseURI, facilitating future migrations of the CryptoVikings metadata
	 */
	function changeBaseURI(string memory newURI) public onlyOwner {
		baseURI = newURI;
	}

	/**
	 * Protected method for whitelisting a wallet address
	 */
	function whitelist(address wallet, bool status) public onlyOwner {
		presaleWhitelist[wallet] = status;
	}

	/**
	 * Protected method for changing the launch block, facilitating tweaks towards an intended launch time
	 *
	 * Block may not be changed if launch has already passed
	 */
	function changeLaunchBlock(uint256 newBlock) public onlyOwner {
		require(!isLaunched(), 'CryptoVikings already launched');

		launchBlock = newBlock;
	}

	/**
	 * Protected method for changing the NornirResolver Contract, facilitating improvements/changes/fixes to resolution
     *
	 * Resolver is not set in constructor and is required for validateMint(), so this must be called at least once
	 */
	function changeNornirResolver(address _nornirResolver) public onlyOwner {
	    nornirResolverContract = INornirResolver(_nornirResolver);
	}

	/**
	 * Protected withdraw method
	 */
	function withdraw() public payable onlyOwner {
		uint256 balance = address(this).balance;
		payable(TREASURY).transfer(balance);
	}

	/**
	 * Protected ERC-20 withdraw method
	 */
	function withdrawErc20(IERC20 token) public onlyOwner {
		token.transfer(TREASURY, token.balanceOf(address(this)));
	}

	/**
	 * Abstracted mint require block
	 *
	 * @param count the number of Vikings to mint
	 * @param isOwner whether or not we're validating an owner mint
	 */
	function validateMint(uint256 count, bool isOwner) internal view {
		require(presaleActive || block.number >= launchBlock, 'Vikings not yet released');
		require(!mintingPaused, 'Minting is paused');
		require(address(nornirResolverContract) != address(0), 'NornirResolver not set');

		uint256 supply = totalSupply();
		uint16 limit = presaleActive ? MAX_PRESALE_VIKINGS : MAX_VIKINGS;
		uint16 max = presaleActive ? MAX_PRESALE_MINTS : MAX_BULK;

		require(supply < limit, 'Sold out');
		require(count > 0, 'Mint at least 1 Viking');
		require(count <= max, 'Too many Vikings');
		require(supply + count <= limit, 'Mint exceeds limit');

		if (presaleActive) {
			require(presaleWhitelist[msg.sender], 'Wallet not whitelisted');
			require(presaleMintCounts[msg.sender] < max, 'Presale limit reached');
			require(presaleMintCounts[msg.sender] + count <= max, 'Mint exceeds presale limit');
		}

		if (isOwner) {
			// additional checks for owner mints
			require(ownerMintedCount < MAX_OWNER_MINTS, 'Max owner mints reached');
			require(ownerMintedCount + count <= MAX_OWNER_MINTS, 'Mint exceeds MAX_OWNER_MINTS');
		}
	}

	/**
	 * Abstracted mint procedure
	 *
	 * Actions payment, mints the NFT(s), and requests randomness from VRF for each minted token
	 *
	 * @param count the number of Vikings to mint
	 * @param isOwner whether or not we're actioning an owner mint
	 */
	function doMint(uint256 count, bool isOwner) internal {
		validateMint(count, isOwner);

		uint256 price = calculatePrice(count);

		// if not owner, action payment
		if (!isOwner) {
			require(wETHContract.allowance(msg.sender, address(this)) >= price, 'Not enough WETH approved');
			require(wETHContract.transferFrom(msg.sender, address(this), price) == true, 'Not enough WETH for TX');
		}

		// iterate over count, minting tokens and requesting randomness in sequence
		uint256[] memory mintedIds = new uint256[](count);

		for (uint256 i = 0; i < count; i++) {
			uint256 id = totalSupply();

			_safeMint(msg.sender, id);

			_setTokenURI(id, id.toString());

			requestIdToVikingId[requestRandomness(keyHash, fee)] = id;

			mintedIds[i] = id;

			if (isOwner) {
				ownerMintedCount++;
			}

			if (presaleActive) {
				presaleMintCounts[msg.sender]++;
			}
		}

		if (!isOwner) {
			wETHContract.transfer(address(TREASURY), price);
		}

		emit VikingsMinted(mintedIds);
	}

	/**
	 * VRF fulfillRandomness() override
	 *
	 * Associates the received random number with a token ID using the requestId as a connector before prompting the API to begin generation via VikingReady
	 *
	 * @param requestId the VRF request ID
	 * @param randomNumber the supplied random number
	 */
	function fulfillRandomness(bytes32 requestId, uint256 randomNumber) internal override {
		uint256 vikingId = requestIdToVikingId[requestId];

		vikingIdToRandomNumber[vikingId] = randomNumber;

		emit VikingReady(vikingId);
	}

	/**
	 * Protected Viking generation - step 1 of the generation/resolution procedure
     *
	 * For the given token ID, retrieve the random number and break it down into a VikingStats
	 *
	 * @param vikingId the token ID to generate a VikingStats for
	 */
	function generateViking(uint256 vikingId) public onlyOwner {
		require(vikingIdToRandomNumber[vikingId] != 0, 'Viking not minted');
		require(vikingStats[vikingId].appearance == 0, 'Viking already generated');

		uint256 randomNumber = vikingIdToRandomNumber[vikingId];

		vikingStats[vikingId] = NornirStructs.VikingStats(
			string(abi.encodePacked('Viking #', vikingId.toString())),
			(randomNumber % 100),
			(randomNumber % 10000) / 100,
			(randomNumber % 10**6) / 10**4,
			(randomNumber % 10**8) / 10**6,
			(randomNumber % 10**10) / 10**8,
			(randomNumber % 10**12) / 10**10,
			(randomNumber % 10**14) / 10**12,
			(randomNumber % 10**16) / 10**14,
			(randomNumber % 10**18) / 10**16,
			(randomNumber % 10**20) / 10**18,
			(randomNumber % 10**28) / 10**20
		);

		// in normal operation, this should match totalSupply()
		generatedVikingCount++;

		vikingNames[
			keccak256(abi.encodePacked('Viking #', vikingId.toString()))
		] = true;

		emit VikingGenerated(vikingId);
	}

	/**
	 * Protected Viking component/condition resolution procedure, calling out to the NornirResolver Contract - step 2 of the generation/resolution procedure
	 *
	 * For the given token ID, resolve all component names and item conditions using the existing associated VikingStats
	 *
	 * @param vikingId the token ID to resolve VikingComponents and VikingConditions for
	 */
	function resolveViking(uint256 vikingId) public onlyOwner {
		require(vikingStats[vikingId].appearance != 0, 'Viking not generated');
		require(bytes(vikingComponents[vikingId].weapon).length == 0, 'components already resolved');
		require(bytes(vikingConditions[vikingId].weapon).length == 0, 'Conditions already resolved');

		vikingConditions[vikingId] = nornirResolverContract.resolveConditions(vikingStats[vikingId]);
		vikingComponents[vikingId] = nornirResolverContract.resolveComponents(vikingStats[vikingId], vikingConditions[vikingId]);

		// in normal operation, this should match generatedVikingCount
		resolvedVikingCount++;

		emit VikingResolved(vikingId, vikingStats[vikingId], vikingComponents[vikingId], vikingConditions[vikingId]);
	}

	/**
	 * Protected Viking completion procedure = step 3 of the generation/resolution procedure
	 *
	 * Just emits an event that the front end can pick up to complete the walkthrough UX and enable the reveal
	 *
	 * @param vikingId the token ID to emit a completion event for
	 */
	function completeViking(uint256 vikingId) public onlyOwner {
		emit VikingComplete(vikingId);
	}

	/** ERC-721 overrides */
	function _baseURI() internal view override returns (string memory) {
		return baseURI;
	}

	function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable) {
		super._beforeTokenTransfer(from, to, tokenId);
	}

	function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) {
		super._burn(tokenId);
	}

	function tokenURI(uint256 tokenId) public view override(ERC721, ERC721URIStorage) returns (string memory) {
		return super.tokenURI(tokenId);
	}

	function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) {
		return super.supportsInterface(interfaceId);
	}
}

File 2 of 21 : ERC721.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/Strings.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension, but not including the Enumerable extension, which is available separately as
 * {ERC721Enumerable}.
 */
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;
    using Strings for uint256;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to owner address
    mapping(uint256 => address) private _owners;

    // Mapping owner address to token count
    mapping(address => uint256) private _balances;

    // Mapping from token ID to approved address
    mapping(uint256 => address) private _tokenApprovals;

    // Mapping from owner to operator approvals
    mapping(address => mapping(address => bool)) private _operatorApprovals;

    /**
     * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

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

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        require(owner != address(0), "ERC721: balance query for the zero address");
        return _balances[owner];
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        address owner = _owners[tokenId];
        require(owner != address(0), "ERC721: owner query for nonexistent token");
        return owner;
    }

    /**
     * @dev See {IERC721Metadata-name}.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev See {IERC721Metadata-symbol}.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");

        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 virtual override {
        address owner = ERC721.ownerOf(tokenId);
        require(to != owner, "ERC721: approval to current owner");

        require(
            _msgSender() == owner || isApprovedForAll(owner, _msgSender()),
            "ERC721: approve caller is not owner nor approved for all"
        );

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        require(_exists(tokenId), "ERC721: approved query for nonexistent token");

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        require(operator != _msgSender(), "ERC721: approve to caller");

        _operatorApprovals[_msgSender()][operator] = approved;
        emit ApprovalForAll(_msgSender(), operator, approved);
    }

    /**
     * @dev See {IERC721-isApprovedForAll}.
     */
    function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
        return _operatorApprovals[owner][operator];
    }

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");

        _transfer(from, to, tokenId);
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        safeTransferFrom(from, to, tokenId, "");
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public virtual override {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
        _safeTransfer(from, to, tokenId, _data);
    }

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * `_data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
    }

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted (`_mint`),
     * and stop existing when they are burned (`_burn`).
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return _owners[tokenId] != address(0);
    }

    /**
     * @dev Returns whether `spender` is allowed to manage `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
        require(_exists(tokenId), "ERC721: operator query for nonexistent token");
        address owner = ERC721.ownerOf(tokenId);
        return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
    }

    /**
     * @dev Safely mints `tokenId` and transfers it to `to`.
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(address to, uint256 tokenId) internal virtual {
        _safeMint(to, tokenId, "");
    }

    /**
     * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
     */
    function _safeMint(
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _mint(to, tokenId);
        require(
            _checkOnERC721Received(address(0), to, tokenId, _data),
            "ERC721: transfer to non ERC721Receiver implementer"
        );
    }

    /**
     * @dev Mints `tokenId` and transfers it to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - `to` cannot be the zero address.
     *
     * Emits a {Transfer} event.
     */
    function _mint(address to, uint256 tokenId) internal virtual {
        require(to != address(0), "ERC721: mint to the zero address");
        require(!_exists(tokenId), "ERC721: token already minted");

        _beforeTokenTransfer(address(0), to, tokenId);

        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(address(0), to, tokenId);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual {
        address owner = ERC721.ownerOf(tokenId);

        _beforeTokenTransfer(owner, address(0), tokenId);

        // Clear approvals
        _approve(address(0), tokenId);

        _balances[owner] -= 1;
        delete _owners[tokenId];

        emit Transfer(owner, address(0), tokenId);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function _transfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {
        require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own");
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId);

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

        _balances[from] -= 1;
        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);
    }

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

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * The call is not executed if the target address is not a contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param _data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    function _checkOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        if (to.isContract()) {
            try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
                return retval == IERC721Receiver.onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert("ERC721: transfer to non ERC721Receiver implementer");
                } else {
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}
}

File 3 of 21 : ERC721Enumerable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../ERC721.sol";
import "./IERC721Enumerable.sol";

/**
 * @dev This implements an optional extension of {ERC721} defined in the EIP that adds
 * enumerability of all the token ids in the contract as well as all token ids owned by each
 * account.
 */
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
    // Mapping from owner to list of owned token IDs
    mapping(address => mapping(uint256 => uint256)) private _ownedTokens;

    // Mapping from token ID to index of the owner tokens list
    mapping(uint256 => uint256) private _ownedTokensIndex;

    // Array with all token ids, used for enumeration
    uint256[] private _allTokens;

    // Mapping from token id to position in the allTokens array
    mapping(uint256 => uint256) private _allTokensIndex;

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

    /**
     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
        return _ownedTokens[owner][index];
    }

    /**
     * @dev See {IERC721Enumerable-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _allTokens.length;
    }

    /**
     * @dev See {IERC721Enumerable-tokenByIndex}.
     */
    function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds");
        return _allTokens[index];
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` will be burned.
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual override {
        super._beforeTokenTransfer(from, to, tokenId);

        if (from == address(0)) {
            _addTokenToAllTokensEnumeration(tokenId);
        } else if (from != to) {
            _removeTokenFromOwnerEnumeration(from, tokenId);
        }
        if (to == address(0)) {
            _removeTokenFromAllTokensEnumeration(tokenId);
        } else if (to != from) {
            _addTokenToOwnerEnumeration(to, tokenId);
        }
    }

    /**
     * @dev Private function to add a token to this extension's ownership-tracking data structures.
     * @param to address representing the new owner of the given token ID
     * @param tokenId uint256 ID of the token to be added to the tokens list of the given address
     */
    function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
        uint256 length = ERC721.balanceOf(to);
        _ownedTokens[to][length] = tokenId;
        _ownedTokensIndex[tokenId] = length;
    }

    /**
     * @dev Private function to add a token to this extension's token tracking data structures.
     * @param tokenId uint256 ID of the token to be added to the tokens list
     */
    function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
        _allTokensIndex[tokenId] = _allTokens.length;
        _allTokens.push(tokenId);
    }

    /**
     * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
     * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
     * gas optimizations e.g. when performing a transfer operation (avoiding double writes).
     * This has O(1) time complexity, but alters the order of the _ownedTokens array.
     * @param from address representing the previous owner of the given token ID
     * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
     */
    function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
        // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;
        uint256 tokenIndex = _ownedTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary
        if (tokenIndex != lastTokenIndex) {
            uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];

            _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
            _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
        }

        // This also deletes the contents at the last position of the array
        delete _ownedTokensIndex[tokenId];
        delete _ownedTokens[from][lastTokenIndex];
    }

    /**
     * @dev Private function to remove a token from this extension's token tracking data structures.
     * This has O(1) time complexity, but alters the order of the _allTokens array.
     * @param tokenId uint256 ID of the token to be removed from the tokens list
     */
    function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
        // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = _allTokens.length - 1;
        uint256 tokenIndex = _allTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
        // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
        // an 'if' statement (like in _removeTokenFromOwnerEnumeration)
        uint256 lastTokenId = _allTokens[lastTokenIndex];

        _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
        _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index

        // This also deletes the contents at the last position of the array
        delete _allTokensIndex[tokenId];
        _allTokens.pop();
    }
}

File 4 of 21 : ERC721URIStorage.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../ERC721.sol";

/**
 * @dev ERC721 token with storage based token URI management.
 */
abstract contract ERC721URIStorage is ERC721 {
    using Strings for uint256;

    // Optional mapping for token URIs
    mapping(uint256 => string) private _tokenURIs;

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        require(_exists(tokenId), "ERC721URIStorage: URI query for nonexistent token");

        string memory _tokenURI = _tokenURIs[tokenId];
        string memory base = _baseURI();

        // If there is no base URI, return the token URI.
        if (bytes(base).length == 0) {
            return _tokenURI;
        }
        // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked).
        if (bytes(_tokenURI).length > 0) {
            return string(abi.encodePacked(base, _tokenURI));
        }

        return super.tokenURI(tokenId);
    }

    /**
     * @dev Sets `_tokenURI` as the tokenURI of `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual {
        require(_exists(tokenId), "ERC721URIStorage: URI set of nonexistent token");
        _tokenURIs[tokenId] = _tokenURI;
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual override {
        super._burn(tokenId);

        if (bytes(_tokenURIs[tokenId]).length != 0) {
            delete _tokenURIs[tokenId];
        }
    }
}

File 5 of 21 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 6 of 21 : Ownable.sol
// SPDX-License-Identifier: MIT

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() {
        _setOwner(_msgSender());
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _setOwner(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");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 7 of 21 : Strings.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

File 8 of 21 : VRFConsumerBase.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./interfaces/LinkTokenInterface.sol";

import "./VRFRequestIDBase.sol";

/** ****************************************************************************
 * @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.
 * *****************************************************************************
 * @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     constuctor(<other arguments>, address _vrfCoordinator, address _link)
 * @dev       VRFConsumerBase(_vrfCoordinator, _link) 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), and have told you the minimum LINK
 * @dev price for VRF service. Make sure your contract has sufficient LINK, and
 * @dev call requestRandomness(keyHash, fee, seed), where seed is the input you
 * @dev want to generate randomness from.
 *
 * @dev Once the VRFCoordinator has received and validated the oracle's response
 * @dev to your request, it will call your contract's fulfillRandomness method.
 *
 * @dev The randomness argument to fulfillRandomness is the actual random value
 * @dev generated from your seed.
 *
 * @dev The requestId argument is generated from the keyHash and the seed by
 * @dev makeRequestId(keyHash, seed). If your contract could have concurrent
 * @dev requests open, you can use the requestId to track which seed is
 * @dev associated with which randomness. See VRFRequestIDBase.sol for more
 * @dev details. (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. (Which is critical to making unpredictable randomness! See the
 * @dev next section.)
 *
 * *****************************************************************************
 * @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 ultimate input to the VRF is mixed with the block hash of the
 * @dev block in which the request is made, user-provided seeds have no impact
 * @dev on its economic security properties. They are only included for API
 * @dev compatability with previous versions of this contract.
 *
 * @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.
 */
abstract contract VRFConsumerBase is VRFRequestIDBase {

  /**
   * @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 VRFConsumerBase 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 randomness the VRF output
   */
  function fulfillRandomness(
    bytes32 requestId,
    uint256 randomness
  )
    internal
    virtual;

  /**
   * @dev In order to keep backwards compatibility we have kept the user
   * seed field around. We remove the use of it because given that the blockhash
   * enters later, it overrides whatever randomness the used seed provides.
   * Given that it adds no security, and can easily lead to misunderstandings,
   * we have removed it from usage and can now provide a simpler API.
   */
  uint256 constant private USER_SEED_PLACEHOLDER = 0;

  /**
   * @notice requestRandomness initiates a request for VRF output given _seed
   *
   * @dev The fulfillRandomness method receives the output, once it's provided
   * @dev by the Oracle, and verified by the vrfCoordinator.
   *
   * @dev The _keyHash must already be registered with the VRFCoordinator, and
   * @dev the _fee must exceed the fee specified during registration of the
   * @dev _keyHash.
   *
   * @dev The _seed parameter is vestigial, and is kept only for API
   * @dev compatibility with older versions. It can't *hurt* to mix in some of
   * @dev your own randomness, here, but it's not necessary because the VRF
   * @dev oracle will mix the hash of the block containing your request into the
   * @dev VRF seed it ultimately uses.
   *
   * @param _keyHash ID of public key against which randomness is generated
   * @param _fee The amount of LINK to send with the request
   *
   * @return requestId unique ID for this request
   *
   * @dev The returned requestId can be used to distinguish responses to
   * @dev concurrent requests. It is passed as the first argument to
   * @dev fulfillRandomness.
   */
  function requestRandomness(
    bytes32 _keyHash,
    uint256 _fee
  )
    internal
    returns (
      bytes32 requestId
    )
  {
    LINK.transferAndCall(vrfCoordinator, _fee, abi.encode(_keyHash, USER_SEED_PLACEHOLDER));
    // This is the seed passed to VRFCoordinator. The oracle will mix this with
    // the hash of the block containing this request to obtain the seed/input
    // which is finally passed to the VRF cryptographic machinery.
    uint256 vRFSeed  = makeVRFInputSeed(_keyHash, USER_SEED_PLACEHOLDER, address(this), nonces[_keyHash]);
    // nonces[_keyHash] must stay in sync with
    // VRFCoordinator.nonces[_keyHash][this], which was incremented by the above
    // successful LINK.transferAndCall (in VRFCoordinator.randomnessRequest).
    // This provides protection against the user repeating their input seed,
    // which would result in a predictable/duplicate output, if multiple such
    // requests appeared in the same block.
    nonces[_keyHash] = nonces[_keyHash] + 1;
    return makeRequestId(_keyHash, vRFSeed);
  }

  LinkTokenInterface immutable internal LINK;
  address immutable private vrfCoordinator;

  // Nonces for each VRF key from which randomness has been requested.
  //
  // Must stay in sync with VRFCoordinator[_keyHash][this]
  mapping(bytes32 /* keyHash */ => uint256 /* nonce */) private nonces;

  /**
   * @param _vrfCoordinator address of VRFCoordinator contract
   * @param _link address of LINK token contract
   *
   * @dev https://docs.chain.link/docs/link-token-contracts
   */
  constructor(
    address _vrfCoordinator,
    address _link
  ) {
    vrfCoordinator = _vrfCoordinator;
    LINK = LinkTokenInterface(_link);
  }

  // rawFulfillRandomness is called by VRFCoordinator when it receives a valid VRF
  // proof. rawFulfillRandomness then calls fulfillRandomness, after validating
  // the origin of the call
  function rawFulfillRandomness(
    bytes32 requestId,
    uint256 randomness
  )
    external
  {
    require(msg.sender == vrfCoordinator, "Only VRFCoordinator can fulfill");
    fulfillRandomness(requestId, randomness);
  }
}

File 9 of 21 : IWeth.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/**
 * WETH Interface, describing the public API of the WETH Contract
 */
interface IWeth {
	function balanceOf(address _owner) external view returns (uint256);

	function transfer(address _to, uint256 _value) external returns (bool);

	function transferFrom(address _from, address _to, uint256 _value) external returns (bool);

	function approve(address _spender, uint256 _value) external returns (bool);

	function allowance(address _owner, address _spender) external view returns (uint256);
}

File 10 of 21 : INornirResolver.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import '../libraries/NornirStructs.sol';

/**
 * Nornir Resolver Interface, describing the public API of the NornirResolver Contract
 */
interface INornirResolver {
    function resolveConditions(NornirStructs.VikingStats memory vikingStats) external pure returns (NornirStructs.VikingConditions memory);
    function resolveComponents(NornirStructs.VikingStats memory vikingStats, NornirStructs.VikingConditions memory vikingConditions) external pure returns (NornirStructs.VikingComponents memory);
}

File 11 of 21 : NornirStructs.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/**
 * Structs required by both Nornir and NornirResolver implemented in a library for sharing
 */
library NornirStructs {

	/** VikingStats - a store for the VRF-derived numerical representation of a Viking */
    struct VikingStats {
		string name;
		uint256 boots;
		uint256 bottoms;
		uint256 helmet;
		uint256 shield;
		uint256 weapon;
		uint256 attack;
		uint256 defence;
		uint256 intelligence;
		uint256 speed;
		uint256 stamina;
		uint256 appearance;
	}

	/** VikingComponents - a store for the VikingStats-derived resolved Component asset names for a Viking */
	struct VikingComponents {
		string beard;
		string body;
		string face;
		string top;
		string boots;
		string bottoms;
		string helmet;
		string shield;
		string weapon;
	}

	/** VikingConditions - a store for the VikingStats-derived resolved Component Condition names for a Viking's Clothes + Items */
	struct VikingConditions {
		string boots;
		string bottoms;
		string helmet;
		string shield;
		string weapon;
	}
}

File 12 of 21 : IERC721.sol
// SPDX-License-Identifier: MIT

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

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

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

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

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

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

File 13 of 21 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT

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 `IERC721.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 14 of 21 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT

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 15 of 21 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

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

        (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

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 16 of 21 : Context.sol
// SPDX-License-Identifier: MIT

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 17 of 21 : ERC165.sol
// SPDX-License-Identifier: MIT

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 21 : IERC165.sol
// SPDX-License-Identifier: MIT

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 19 of 21 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Enumerable is IERC721 {
    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);

    /**
     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
     * Use along with {totalSupply} to enumerate all tokens.
     */
    function tokenByIndex(uint256 index) external view returns (uint256);
}

File 20 of 21 : 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 21 of 21 : VRFRequestIDBase.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

contract VRFRequestIDBase {

  /**
   * @notice returns the seed which is actually input to the VRF coordinator
   *
   * @dev To prevent repetition of VRF output due to repetition of the
   * @dev user-supplied seed, that seed is combined in a hash with the
   * @dev user-specific nonce, and the address of the consuming contract. The
   * @dev risk of repetition is mostly mitigated by inclusion of a blockhash in
   * @dev the final seed, but the nonce does protect against repetition in
   * @dev requests which are included in a single block.
   *
   * @param _userSeed VRF seed input provided by user
   * @param _requester Address of the requesting contract
   * @param _nonce User-specific nonce at the time of the request
   */
  function makeVRFInputSeed(
    bytes32 _keyHash,
    uint256 _userSeed,
    address _requester,
    uint256 _nonce
  )
    internal
    pure
    returns (
      uint256
    )
  {
    return uint256(keccak256(abi.encode(_keyHash, _userSeed, _requester, _nonce)));
  }

  /**
   * @notice Returns the id for this request
   * @param _keyHash The serviceAgreement ID to be used for this request
   * @param _vRFInputSeed The seed to be passed directly to the VRF
   * @return The id for this request
   *
   * @dev Note that _vRFInputSeed is not the seed passed by the consuming
   * @dev contract, but the one generated by makeVRFInputSeed
   */
  function makeRequestId(
    bytes32 _keyHash,
    uint256 _vRFInputSeed
  )
    internal
    pure
    returns (
      bytes32
    )
  {
    return keccak256(abi.encodePacked(_keyHash, _vRFInputSeed));
  }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 175
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_VRFCoordinator","type":"address"},{"internalType":"address","name":"_LinkToken","type":"address"},{"internalType":"bytes32","name":"_keyHash","type":"bytes32"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"string","name":"name","type":"string"}],"name":"NameChange","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":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":"uint256","name":"vikingId","type":"uint256"}],"name":"VikingComplete","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"vikingId","type":"uint256"}],"name":"VikingGenerated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"vikingId","type":"uint256"}],"name":"VikingReady","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"vikingId","type":"uint256"},{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"uint256","name":"boots","type":"uint256"},{"internalType":"uint256","name":"bottoms","type":"uint256"},{"internalType":"uint256","name":"helmet","type":"uint256"},{"internalType":"uint256","name":"shield","type":"uint256"},{"internalType":"uint256","name":"weapon","type":"uint256"},{"internalType":"uint256","name":"attack","type":"uint256"},{"internalType":"uint256","name":"defence","type":"uint256"},{"internalType":"uint256","name":"intelligence","type":"uint256"},{"internalType":"uint256","name":"speed","type":"uint256"},{"internalType":"uint256","name":"stamina","type":"uint256"},{"internalType":"uint256","name":"appearance","type":"uint256"}],"indexed":false,"internalType":"struct NornirStructs.VikingStats","name":"stats","type":"tuple"},{"components":[{"internalType":"string","name":"beard","type":"string"},{"internalType":"string","name":"body","type":"string"},{"internalType":"string","name":"face","type":"string"},{"internalType":"string","name":"top","type":"string"},{"internalType":"string","name":"boots","type":"string"},{"internalType":"string","name":"bottoms","type":"string"},{"internalType":"string","name":"helmet","type":"string"},{"internalType":"string","name":"shield","type":"string"},{"internalType":"string","name":"weapon","type":"string"}],"indexed":false,"internalType":"struct NornirStructs.VikingComponents","name":"components","type":"tuple"},{"components":[{"internalType":"string","name":"boots","type":"string"},{"internalType":"string","name":"bottoms","type":"string"},{"internalType":"string","name":"helmet","type":"string"},{"internalType":"string","name":"shield","type":"string"},{"internalType":"string","name":"weapon","type":"string"}],"indexed":false,"internalType":"struct NornirStructs.VikingConditions","name":"conditions","type":"tuple"}],"name":"VikingResolved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"","type":"uint256[]"}],"name":"VikingsMinted","type":"event"},{"inputs":[],"name":"MAX_BULK","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_OWNER_MINTS","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_VIKINGS","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TREASURY","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"qty","type":"uint256"}],"name":"calculatePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"newURI","type":"string"}],"name":"changeBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newBlock","type":"uint256"}],"name":"changeLaunchBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"vikingId","type":"uint256"},{"internalType":"string","name":"newName","type":"string"}],"name":"changeName","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_nornirResolver","type":"address"}],"name":"changeNornirResolver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"vikingId","type":"uint256"}],"name":"completeViking","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"vikingId","type":"uint256"}],"name":"generateViking","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"generatedVikingCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"vikingId","type":"uint256"}],"name":"getVikingData","outputs":[{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"uint256","name":"boots","type":"uint256"},{"internalType":"uint256","name":"bottoms","type":"uint256"},{"internalType":"uint256","name":"helmet","type":"uint256"},{"internalType":"uint256","name":"shield","type":"uint256"},{"internalType":"uint256","name":"weapon","type":"uint256"},{"internalType":"uint256","name":"attack","type":"uint256"},{"internalType":"uint256","name":"defence","type":"uint256"},{"internalType":"uint256","name":"intelligence","type":"uint256"},{"internalType":"uint256","name":"speed","type":"uint256"},{"internalType":"uint256","name":"stamina","type":"uint256"},{"internalType":"uint256","name":"appearance","type":"uint256"}],"internalType":"struct NornirStructs.VikingStats","name":"","type":"tuple"},{"components":[{"internalType":"string","name":"beard","type":"string"},{"internalType":"string","name":"body","type":"string"},{"internalType":"string","name":"face","type":"string"},{"internalType":"string","name":"top","type":"string"},{"internalType":"string","name":"boots","type":"string"},{"internalType":"string","name":"bottoms","type":"string"},{"internalType":"string","name":"helmet","type":"string"},{"internalType":"string","name":"shield","type":"string"},{"internalType":"string","name":"weapon","type":"string"}],"internalType":"struct NornirStructs.VikingComponents","name":"","type":"tuple"},{"components":[{"internalType":"string","name":"boots","type":"string"},{"internalType":"string","name":"bottoms","type":"string"},{"internalType":"string","name":"helmet","type":"string"},{"internalType":"string","name":"shield","type":"string"},{"internalType":"string","name":"weapon","type":"string"}],"internalType":"struct NornirStructs.VikingConditions","name":"","type":"tuple"}],"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":[],"name":"isLaunched","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"launchBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"count","type":"uint256"}],"name":"mintViking","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintingPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nornirResolverContract","outputs":[{"internalType":"contract INornirResolver","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"count","type":"uint256"}],"name":"ownerMintViking","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"ownerMintedCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presaleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"presaleMintCounts","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"presaleWhitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"requestId","type":"bytes32"},{"internalType":"uint256","name":"randomness","type":"uint256"}],"name":"rawFulfillRandomness","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"vikingId","type":"uint256"}],"name":"resolveViking","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"resolvedVikingCount","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":"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":"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":"togglePaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"togglePresale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"str","type":"string"}],"name":"validateName","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"vikingComponents","outputs":[{"internalType":"string","name":"beard","type":"string"},{"internalType":"string","name":"body","type":"string"},{"internalType":"string","name":"face","type":"string"},{"internalType":"string","name":"top","type":"string"},{"internalType":"string","name":"boots","type":"string"},{"internalType":"string","name":"bottoms","type":"string"},{"internalType":"string","name":"helmet","type":"string"},{"internalType":"string","name":"shield","type":"string"},{"internalType":"string","name":"weapon","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"vikingConditions","outputs":[{"internalType":"string","name":"boots","type":"string"},{"internalType":"string","name":"bottoms","type":"string"},{"internalType":"string","name":"helmet","type":"string"},{"internalType":"string","name":"shield","type":"string"},{"internalType":"string","name":"weapon","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"vikingIdToRandomNumber","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"vikingStats","outputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"uint256","name":"boots","type":"uint256"},{"internalType":"uint256","name":"bottoms","type":"uint256"},{"internalType":"uint256","name":"helmet","type":"uint256"},{"internalType":"uint256","name":"shield","type":"uint256"},{"internalType":"uint256","name":"weapon","type":"uint256"},{"internalType":"uint256","name":"attack","type":"uint256"},{"internalType":"uint256","name":"defence","type":"uint256"},{"internalType":"uint256","name":"intelligence","type":"uint256"},{"internalType":"uint256","name":"speed","type":"uint256"},{"internalType":"uint256","name":"stamina","type":"uint256"},{"internalType":"uint256","name":"appearance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wETHContract","outputs":[{"internalType":"contract IWeth","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"},{"internalType":"bool","name":"status","type":"bool"}],"name":"whitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"withdrawErc20","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6301288df8600f55610120604052602460c081815290620062f560e03980516200003291601091602090910190620001c5565b506011805461ffff191690556000601281905560138190556014553480156200005a57600080fd5b5060405162006319380380620063198339810160408190526200007d9162000288565b604080518082018252600681526556696b696e6760d01b602080830191825283518085019094526004845263564b4e4760e01b90840152815186938693929091620000cb91600091620001c5565b508051620000e1906001906020840190620001c5565b505050620000fe620000f86200016f60201b60201c565b62000173565b6001600160601b0319606092831b811660a052911b16608052600d80546001600160a01b0319908116737ceb23fd6bc0add59e62ac25578270cff1b9f61917909155601780546001600160a01b0395909516949091169390931790925550601655655af3107a400060155562000305565b3390565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620001d390620002c8565b90600052602060002090601f016020900481019282620001f7576000855562000242565b82601f106200021257805160ff191683800117855562000242565b8280016001018555821562000242579182015b828111156200024257825182559160200191906001019062000225565b506200025092915062000254565b5090565b5b8082111562000250576000815560010162000255565b80516001600160a01b03811681146200028357600080fd5b919050565b6000806000606084860312156200029d578283fd5b620002a8846200026b565b9250620002b8602085016200026b565b9150604084015190509250925092565b600181811c90821680620002dd57607f821691505b60208210811415620002ff57634e487b7160e01b600052602260045260246000fd5b50919050565b60805160601c60a05160601c615fbd620003386000396000818161164101526146d8015260006146a90152615fbd6000f3fe6080604052600436106103065760003560e01c806370a08231116101a1578063ae104265116100f2578063d00efb2f116100a0578063eef7b3031161006f578063eef7b303146109ca578063f1454ee7146109f9578063f2fde38b14610a19578063f59c370814610a3957600080fd5b8063d00efb2f14610921578063e1a283d614610937578063e985e9c514610951578063eb8835ab1461099a57600080fd5b8063ae10426514610854578063b88d4fde14610874578063ba30235e14610894578063c39cbef1146108c1578063c5f8776c1461043b578063c7e42b1b146108e1578063c87b56dd1461090157600080fd5b806395d89b411161014f57806395d89b41146107745780639c6769f6146107895780639ffdb65a146107be578063a22cb465146107de578063a3b2119a146107fe578063a3e9306f1461081e578063a8d0a9b51461083e57600080fd5b806370a08231146106b5578063715018a6146106d557806383380699146106ea57806387742d57146107005780638da5cb5b146107205780639355c85d1461073e57806394985ddd1461075457600080fd5b80632f745c591161025b57806342842e0e1161020957806342842e0e146105b85780634f6ccce7146105d85780635026df16146105f857806353135ca01461062957806354d8df2c146106485780636352211e146106805780636c0360eb146106a057600080fd5b80632f745c591461050e578063307aebc91461052e578063343937431461054657806336566f061461055b57806339a0c6f9146105705780633a4ce454146105905780633ccfd60b146105b057600080fd5b806318160ddd116102b857806318160ddd1461041c5780631a7eedaf1461043b578063201f54f11461046357806323b872dd1461047957806325b03b8f1461049957806327626f34146104b95780632d2c5565146104e657600080fd5b806301ffc9a71461030b57806303806c7f1461034057806306fdde0314610362578063081812fc14610384578063095ea7b3146103bc5780630a977318146103dc5780630bc70e4b146103fc575b600080fd5b34801561031757600080fd5b5061032b6103263660046150ce565b610a59565b60405190151581526020015b60405180910390f35b34801561034c57600080fd5b5061036061035b3660046153b1565b610a6a565b005b34801561036e57600080fd5b50610377610ad4565b60405161033791906158c4565b34801561039057600080fd5b506103a461039f3660046153b1565b610b66565b6040516001600160a01b039091168152602001610337565b3480156103c857600080fd5b506103606103d7366004615066565b610bee565b3480156103e857600080fd5b50600e546103a4906001600160a01b031681565b34801561040857600080fd5b50610360610417366004614f29565b610d04565b34801561042857600080fd5b506008545b604051908152602001610337565b34801561044757600080fd5b50610450603281565b60405161ffff9091168152602001610337565b34801561046f57600080fd5b5061042d60135481565b34801561048557600080fd5b50610360610494366004614f7d565b610d50565b3480156104a557600080fd5b506103606104b43660046153b1565b610d81565b3480156104c557600080fd5b5061042d6104d4366004614f29565b601d6020526000908152604090205481565b3480156104f257600080fd5b506103a47310073fb6d644113469bd8e30404bcad6715388ff81565b34801561051a57600080fd5b5061042d610529366004615066565b610e01565b34801561053a57600080fd5b50600f5443101561032b565b34801561055257600080fd5b50610360610e97565b34801561056757600080fd5b50610360610ede565b34801561057c57600080fd5b5061036061058b366004615106565b610f1c565b34801561059c57600080fd5b50600d546103a4906001600160a01b031681565b610360610f5d565b3480156105c457600080fd5b506103606105d3366004614f7d565b610fca565b3480156105e457600080fd5b5061042d6105f33660046153b1565b610fe5565b34801561060457600080fd5b506106186106133660046153b1565b611086565b6040516103379594939291906158d7565b34801561063557600080fd5b5060115461032b90610100900460ff1681565b34801561065457600080fd5b506106686106633660046153b1565b61135c565b6040516103379c9b9a99989796959493929190615a09565b34801561068c57600080fd5b506103a461069b3660046153b1565b61143c565b3480156106ac57600080fd5b506103776114b3565b3480156106c157600080fd5b5061042d6106d0366004614f29565b611541565b3480156106e157600080fd5b506103606115c8565b3480156106f657600080fd5b5061042d60125481565b34801561070c57600080fd5b5061036061071b3660046153b1565b6115fe565b34801561072c57600080fd5b50600b546001600160a01b03166103a4565b34801561074a57600080fd5b5061045061269181565b34801561076057600080fd5b5061036061076f3660046150ad565b611636565b34801561078057600080fd5b506103776116b8565b34801561079557600080fd5b506107a96107a43660046153b1565b6116c7565b60405161033799989796959493929190615944565b3480156107ca57600080fd5b5061032b6107d9366004615106565b611bd5565b3480156107ea57600080fd5b506103606107f9366004615039565b611e1c565b34801561080a57600080fd5b506103606108193660046153b1565b611ee1565b34801561082a57600080fd5b506103606108393660046153b1565b61236a565b34801561084a57600080fd5b5061042d60145481565b34801561086057600080fd5b5061042d61086f3660046153b1565b612747565b34801561088057600080fd5b5061036061088f366004614fbd565b61280b565b3480156108a057600080fd5b5061042d6108af3660046153b1565b601b6020526000908152604090205481565b3480156108cd57600080fd5b506103606108dc3660046153e1565b612843565b3480156108ed57600080fd5b506103606108fc366004614f29565b612a68565b34801561090d57600080fd5b5061037761091c3660046153b1565b612ba5565b34801561092d57600080fd5b5061042d600f5481565b34801561094357600080fd5b5060115461032b9060ff1681565b34801561095d57600080fd5b5061032b61096c366004614f45565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b3480156109a657600080fd5b5061032b6109b5366004614f29565b601c6020526000908152604090205460ff1681565b3480156109d657600080fd5b506109ea6109e53660046153b1565b612bb0565b60405161033793929190615b4a565b348015610a0557600080fd5b50610360610a143660046153b1565b6135ec565b348015610a2557600080fd5b50610360610a34366004614f29565b6135f7565b348015610a4557600080fd5b50610360610a54366004615039565b61368f565b6000610a64826136e4565b92915050565b600b546001600160a01b03163314610a9d5760405162461bcd60e51b8152600401610a9490615ac4565b60405180910390fd5b6040518181527fb7582790062b24b3b3d51b3851b6159abcfa72441c2b5c9a08d08691038d069f906020015b60405180910390a150565b606060008054610ae390615ea2565b80601f0160208091040260200160405190810160405280929190818152602001828054610b0f90615ea2565b8015610b5c5780601f10610b3157610100808354040283529160200191610b5c565b820191906000526020600020905b815481529060010190602001808311610b3f57829003601f168201915b5050505050905090565b6000610b7182613709565b610bd25760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610a94565b506000908152600460205260409020546001600160a01b031690565b6000610bf98261143c565b9050806001600160a01b0316836001600160a01b03161415610c675760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610a94565b336001600160a01b0382161480610c835750610c83813361096c565b610cf55760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610a94565b610cff8383613726565b505050565b600b546001600160a01b03163314610d2e5760405162461bcd60e51b8152600401610a9490615ac4565b600e80546001600160a01b0319166001600160a01b0392909216919091179055565b610d5a3382613794565b610d765760405162461bcd60e51b8152600401610a9490615af9565b610cff83838361387e565b600b546001600160a01b03163314610dab5760405162461bcd60e51b8152600401610a9490615ac4565b600f544310610dfc5760405162461bcd60e51b815260206004820152601e60248201527f43727970746f56696b696e677320616c7265616479206c61756e6368656400006044820152606401610a94565b600f55565b6000610e0c83611541565b8210610e6e5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610a94565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b600b546001600160a01b03163314610ec15760405162461bcd60e51b8152600401610a9490615ac4565b6011805461ff001981166101009182900460ff1615909102179055565b600b546001600160a01b03163314610f085760405162461bcd60e51b8152600401610a9490615ac4565b6011805460ff19811660ff90911615179055565b600b546001600160a01b03163314610f465760405162461bcd60e51b8152600401610a9490615ac4565b8051610f59906010906020840190614df0565b5050565b600b546001600160a01b03163314610f875760405162461bcd60e51b8152600401610a9490615ac4565b60405147907310073fb6d644113469bd8e30404bcad6715388ff9082156108fc029083906000818181858888f19350505050158015610f59573d6000803e3d6000fd5b610cff8383836040518060200160405280600081525061280b565b6000610ff060085490565b82106110535760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610a94565b6008828154811061107457634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b601a602052600090815260409020805481906110a190615ea2565b80601f01602080910402602001604051908101604052809291908181526020018280546110cd90615ea2565b801561111a5780601f106110ef5761010080835404028352916020019161111a565b820191906000526020600020905b8154815290600101906020018083116110fd57829003601f168201915b50505050509080600101805461112f90615ea2565b80601f016020809104026020016040519081016040528092919081815260200182805461115b90615ea2565b80156111a85780601f1061117d576101008083540402835291602001916111a8565b820191906000526020600020905b81548152906001019060200180831161118b57829003601f168201915b5050505050908060020180546111bd90615ea2565b80601f01602080910402602001604051908101604052809291908181526020018280546111e990615ea2565b80156112365780601f1061120b57610100808354040283529160200191611236565b820191906000526020600020905b81548152906001019060200180831161121957829003601f168201915b50505050509080600301805461124b90615ea2565b80601f016020809104026020016040519081016040528092919081815260200182805461127790615ea2565b80156112c45780601f10611299576101008083540402835291602001916112c4565b820191906000526020600020905b8154815290600101906020018083116112a757829003601f168201915b5050505050908060040180546112d990615ea2565b80601f016020809104026020016040519081016040528092919081815260200182805461130590615ea2565b80156113525780601f1061132757610100808354040283529160200191611352565b820191906000526020600020905b81548152906001019060200180831161133557829003601f168201915b5050505050905085565b60186020526000908152604090208054819061137790615ea2565b80601f01602080910402602001604051908101604052809291908181526020018280546113a390615ea2565b80156113f05780601f106113c5576101008083540402835291602001916113f0565b820191906000526020600020905b8154815290600101906020018083116113d357829003601f168201915b50505050509080600101549080600201549080600301549080600401549080600501549080600601549080600701549080600801549080600901549080600a01549080600b015490508c565b6000818152600260205260408120546001600160a01b031680610a645760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610a94565b601080546114c090615ea2565b80601f01602080910402602001604051908101604052809291908181526020018280546114ec90615ea2565b80156115395780601f1061150e57610100808354040283529160200191611539565b820191906000526020600020905b81548152906001019060200180831161151c57829003601f168201915b505050505081565b60006001600160a01b0382166115ac5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610a94565b506001600160a01b031660009081526003602052604090205490565b600b546001600160a01b031633146115f25760405162461bcd60e51b8152600401610a9490615ac4565b6115fc6000613a29565b565b600b546001600160a01b031633146116285760405162461bcd60e51b8152600401610a9490615ac4565b611633816001613a7b565b50565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146116ae5760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c006044820152606401610a94565b610f598282613e51565b606060018054610ae390615ea2565b6019602052600090815260409020805481906116e290615ea2565b80601f016020809104026020016040519081016040528092919081815260200182805461170e90615ea2565b801561175b5780601f106117305761010080835404028352916020019161175b565b820191906000526020600020905b81548152906001019060200180831161173e57829003601f168201915b50505050509080600101805461177090615ea2565b80601f016020809104026020016040519081016040528092919081815260200182805461179c90615ea2565b80156117e95780601f106117be576101008083540402835291602001916117e9565b820191906000526020600020905b8154815290600101906020018083116117cc57829003601f168201915b5050505050908060020180546117fe90615ea2565b80601f016020809104026020016040519081016040528092919081815260200182805461182a90615ea2565b80156118775780601f1061184c57610100808354040283529160200191611877565b820191906000526020600020905b81548152906001019060200180831161185a57829003601f168201915b50505050509080600301805461188c90615ea2565b80601f01602080910402602001604051908101604052809291908181526020018280546118b890615ea2565b80156119055780601f106118da57610100808354040283529160200191611905565b820191906000526020600020905b8154815290600101906020018083116118e857829003601f168201915b50505050509080600401805461191a90615ea2565b80601f016020809104026020016040519081016040528092919081815260200182805461194690615ea2565b80156119935780601f1061196857610100808354040283529160200191611993565b820191906000526020600020905b81548152906001019060200180831161197657829003601f168201915b5050505050908060050180546119a890615ea2565b80601f01602080910402602001604051908101604052809291908181526020018280546119d490615ea2565b8015611a215780601f106119f657610100808354040283529160200191611a21565b820191906000526020600020905b815481529060010190602001808311611a0457829003601f168201915b505050505090806006018054611a3690615ea2565b80601f0160208091040260200160405190810160405280929190818152602001828054611a6290615ea2565b8015611aaf5780601f10611a8457610100808354040283529160200191611aaf565b820191906000526020600020905b815481529060010190602001808311611a9257829003601f168201915b505050505090806007018054611ac490615ea2565b80601f0160208091040260200160405190810160405280929190818152602001828054611af090615ea2565b8015611b3d5780601f10611b1257610100808354040283529160200191611b3d565b820191906000526020600020905b815481529060010190602001808311611b2057829003601f168201915b505050505090806008018054611b5290615ea2565b80601f0160208091040260200160405190810160405280929190818152602001828054611b7e90615ea2565b8015611bcb5780601f10611ba057610100808354040283529160200191611bcb565b820191906000526020600020905b815481529060010190602001808311611bae57829003601f168201915b5050505050905089565b600080829050600181511015611bee5750600092915050565b601981511115611c015750600092915050565b80600081518110611c2257634e487b7160e01b600052603260045260246000fd5b6020910101516001600160f81b031916600160fd1b1415611c465750600092915050565b8060018251611c559190615e5f565b81518110611c7357634e487b7160e01b600052603260045260246000fd5b6020910101516001600160f81b031916600160fd1b1415611c975750600092915050565b600081600081518110611cba57634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b031916905060005b8251811015611e11576000838281518110611cf957634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b0319169050600160fd1b81148015611d2a5750600160fd1b6001600160f81b03198416145b15611d3b5750600095945050505050565b600360fc1b6001600160f81b0319821610801590611d675750603960f81b6001600160f81b0319821611155b158015611d9d5750604160f81b6001600160f81b0319821610801590611d9b5750602d60f91b6001600160f81b0319821611155b155b8015611dd25750606160f81b6001600160f81b0319821610801590611dd05750603d60f91b6001600160f81b0319821611155b155b8015611dec5750600160fd1b6001600160f81b0319821614155b15611dfd5750600095945050505050565b915080611e0981615edd565b915050611cce565b506001949350505050565b6001600160a01b038216331415611e755760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610a94565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600b546001600160a01b03163314611f0b5760405162461bcd60e51b8152600401610a9490615ac4565b6000818152601860205260409020600b0154611f605760405162461bcd60e51b8152602060048201526014602482015273159a5ada5b99c81b9bdd0819d95b995c985d195960621b6044820152606401610a94565b60008181526019602052604090206008018054611f7c90615ea2565b159050611fcb5760405162461bcd60e51b815260206004820152601b60248201527f636f6d706f6e656e747320616c7265616479207265736f6c76656400000000006044820152606401610a94565b6000818152601a602052604090206004018054611fe790615ea2565b1590506120365760405162461bcd60e51b815260206004820152601b60248201527f436f6e646974696f6e7320616c7265616479207265736f6c76656400000000006044820152606401610a94565b600e54600082815260186020526040908190209051636a6c7c9b60e01b81526001600160a01b0390921691636a6c7c9b9161207391600401615c15565b60006040518083038186803b15801561208b57600080fd5b505afa15801561209f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526120c791908101906152bd565b6000828152601a602090815260409091208251805191926120ed92849290910190614df0565b5060208281015180516121069260018501920190614df0565b5060408201518051612122916002840191602090910190614df0565b506060820151805161213e916003840191602090910190614df0565b506080820151805161215a916004840191602090910190614df0565b5050600e546000838152601860209081526040808320601a90925291829020915163e7f54e3960e01b81526001600160a01b03909316935063e7f54e39926121a59290600401615c28565b60006040518083038186803b1580156121bd57600080fd5b505afa1580156121d1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526121f99190810190615138565b600082815260196020908152604090912082518051919261221f92849290910190614df0565b5060208281015180516122389260018501920190614df0565b5060408201518051612254916002840191602090910190614df0565b5060608201518051612270916003840191602090910190614df0565b506080820151805161228c916004840191602090910190614df0565b5060a082015180516122a8916005840191602090910190614df0565b5060c082015180516122c4916006840191602090910190614df0565b5060e082015180516122e0916007840191602090910190614df0565b5061010082015180516122fd916008840191602090910190614df0565b5050601380549150600061231083615edd565b9091555050600081815260186020908152604080832060198352818420601a9093529281902090517f5b8230d9105fbf8551c63ab1e7409efe7abd28db3df180a806dc54aabd4dd75393610ac99386939192909190615c66565b600b546001600160a01b031633146123945760405162461bcd60e51b8152600401610a9490615ac4565b6000818152601b60205260409020546123e35760405162461bcd60e51b8152602060048201526011602482015270159a5ada5b99c81b9bdd081b5a5b9d1959607a1b6044820152606401610a94565b6000818152601860205260409020600b0154156124425760405162461bcd60e51b815260206004820152601860248201527f56696b696e6720616c72656164792067656e65726174656400000000000000006044820152606401610a94565b6000818152601b6020526040908190205481516101808101909252908061246884613ea5565b60405160200161247891906157f6565b60408051601f198184030181529190528152602001612498606484615ef8565b815260200160646124ab61271085615ef8565b6124b59190615e2c565b81526020016127106124ca620f424085615ef8565b6124d49190615e2c565b8152602001620f42406124eb6305f5e10085615ef8565b6124f59190615e2c565b81526020016305f5e10061250e6402540be40085615ef8565b6125189190615e2c565b81526020016402540be40061253264e8d4a5100085615ef8565b61253c9190615e2c565b815260200164e8d4a51000612557655af3107a400085615ef8565b6125619190615e2c565b8152602001655af3107a400061257e662386f26fc1000085615ef8565b6125889190615e2c565b8152602001662386f26fc100006125a7670de0b6b3a764000085615ef8565b6125b19190615e2c565b8152602001670de0b6b3a76400006125d268056bc75e2d6310000085615ef8565b6125dc9190615e2c565b815260200168056bc75e2d631000006126016b204fce5e3e2502611000000085615ef8565b61260b9190615e2c565b9052600083815260186020908152604090912082518051919261263392849290910190614df0565b506020820151600182015560408201516002820155606082015160038201556080820151600482015560a0820151600582015560c0820151600682015560e0820151600782015561010082015160088201556101208201516009820155610140820151600a82015561016090910151600b90910155601280549060006126b883615edd565b91905055506001601f60006126cc85613ea5565b6040516020016126dc91906157f6565b60408051808303601f190181529181528151602092830120835282820193909352908201600020805460ff191693151593909317909255518381527f493fcb304881c2fe5a08476d62749cb55b475122fbf0558b07a12d81e14ff37391015b60405180910390a15050565b60008082118015612759575060328211155b6127a55760405162461bcd60e51b815260206004820152601b60248201527f43616e206f6e6c7920707269636520312d35302056696b696e677300000000006044820152606401610a94565b601154610100900460ff16156127c657610a648266b1a2bc2ec50000615e40565b601982106127df57610a648266e6ed27d6668000615e40565b600a82106127f957610a648267010a741a46278000615e40565b610a648267012dfb0cb5e88000615e40565b6128153383613794565b6128315760405162461bcd60e51b8152600401610a9490615af9565b61283d84848484613fbe565b50505050565b61284c8261143c565b6001600160a01b0316336001600160a01b0316146128ac5760405162461bcd60e51b815260206004820152601a60248201527f53656e64657220646f6573206e6f74206f776e2056696b696e670000000000006044820152606401610a94565b6128b581611bd5565b15156001146128f85760405162461bcd60e51b815260206004820152600f60248201526e13985b59481a5cc81a5b9d985b1a59608a1b6044820152606401610a94565b601f60008260405160200161290d919061573c565b60408051601f198184030181529181528151602092830120835290820192909252016000205460ff16156129785760405162461bcd60e51b81526020600482015260126024820152714e616d65206973206e6f7420756e6971756560701b6044820152606401610a94565b60008281526018602090815260408083209051601f939261299a929101615787565b60408051601f1981840301815291815281516020928301208352828201939093529082016000908120805460ff19169055848152601882529190912082516129e492840190614df0565b506001601f6000836040516020016129fc919061573c565b60405160208183030381529060405280519060200120815260200190815260200160002060006101000a81548160ff0219169083151502179055507f7e632a301794d8d4a81ea7e20f37d1947158d36e66403af04ba85dd194b66f1b828260405161273b929190615c4d565b600b546001600160a01b03163314612a925760405162461bcd60e51b8152600401610a9490615ac4565b6040516370a0823160e01b81523060048201526001600160a01b0382169063a9059cbb907310073fb6d644113469bd8e30404bcad6715388ff9083906370a082319060240160206040518083038186803b158015612aef57600080fd5b505afa158015612b03573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b2791906153c9565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381600087803b158015612b6d57600080fd5b505af1158015612b81573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f599190615091565b6060610a6482613ff1565b612c146040518061018001604052806060815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b612c636040518061012001604052806060815260200160608152602001606081526020016060815260200160608152602001606081526020016060815260200160608152602001606081525090565b612c956040518060a0016040528060608152602001606081526020016060815260200160608152602001606081525090565b600084815260186020908152604080832060198352818420601a90935292819020815161018081019092528354909190849082908290612cd490615ea2565b80601f0160208091040260200160405190810160405280929190818152602001828054612d0090615ea2565b8015612d4d5780601f10612d2257610100808354040283529160200191612d4d565b820191906000526020600020905b815481529060010190602001808311612d3057829003601f168201915b50505050508152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815260200160098201548152602001600a8201548152602001600b8201548152505092508160405180610120016040529081600082018054612de390615ea2565b80601f0160208091040260200160405190810160405280929190818152602001828054612e0f90615ea2565b8015612e5c5780601f10612e3157610100808354040283529160200191612e5c565b820191906000526020600020905b815481529060010190602001808311612e3f57829003601f168201915b50505050508152602001600182018054612e7590615ea2565b80601f0160208091040260200160405190810160405280929190818152602001828054612ea190615ea2565b8015612eee5780601f10612ec357610100808354040283529160200191612eee565b820191906000526020600020905b815481529060010190602001808311612ed157829003601f168201915b50505050508152602001600282018054612f0790615ea2565b80601f0160208091040260200160405190810160405280929190818152602001828054612f3390615ea2565b8015612f805780601f10612f5557610100808354040283529160200191612f80565b820191906000526020600020905b815481529060010190602001808311612f6357829003601f168201915b50505050508152602001600382018054612f9990615ea2565b80601f0160208091040260200160405190810160405280929190818152602001828054612fc590615ea2565b80156130125780601f10612fe757610100808354040283529160200191613012565b820191906000526020600020905b815481529060010190602001808311612ff557829003601f168201915b5050505050815260200160048201805461302b90615ea2565b80601f016020809104026020016040519081016040528092919081815260200182805461305790615ea2565b80156130a45780601f10613079576101008083540402835291602001916130a4565b820191906000526020600020905b81548152906001019060200180831161308757829003601f168201915b505050505081526020016005820180546130bd90615ea2565b80601f01602080910402602001604051908101604052809291908181526020018280546130e990615ea2565b80156131365780601f1061310b57610100808354040283529160200191613136565b820191906000526020600020905b81548152906001019060200180831161311957829003601f168201915b5050505050815260200160068201805461314f90615ea2565b80601f016020809104026020016040519081016040528092919081815260200182805461317b90615ea2565b80156131c85780601f1061319d576101008083540402835291602001916131c8565b820191906000526020600020905b8154815290600101906020018083116131ab57829003601f168201915b505050505081526020016007820180546131e190615ea2565b80601f016020809104026020016040519081016040528092919081815260200182805461320d90615ea2565b801561325a5780601f1061322f5761010080835404028352916020019161325a565b820191906000526020600020905b81548152906001019060200180831161323d57829003601f168201915b5050505050815260200160088201805461327390615ea2565b80601f016020809104026020016040519081016040528092919081815260200182805461329f90615ea2565b80156132ec5780601f106132c1576101008083540402835291602001916132ec565b820191906000526020600020905b8154815290600101906020018083116132cf57829003601f168201915b5050505050815250509150806040518060a001604052908160008201805461331390615ea2565b80601f016020809104026020016040519081016040528092919081815260200182805461333f90615ea2565b801561338c5780601f106133615761010080835404028352916020019161338c565b820191906000526020600020905b81548152906001019060200180831161336f57829003601f168201915b505050505081526020016001820180546133a590615ea2565b80601f01602080910402602001604051908101604052809291908181526020018280546133d190615ea2565b801561341e5780601f106133f35761010080835404028352916020019161341e565b820191906000526020600020905b81548152906001019060200180831161340157829003601f168201915b5050505050815260200160028201805461343790615ea2565b80601f016020809104026020016040519081016040528092919081815260200182805461346390615ea2565b80156134b05780601f10613485576101008083540402835291602001916134b0565b820191906000526020600020905b81548152906001019060200180831161349357829003601f168201915b505050505081526020016003820180546134c990615ea2565b80601f01602080910402602001604051908101604052809291908181526020018280546134f590615ea2565b80156135425780601f1061351757610100808354040283529160200191613542565b820191906000526020600020905b81548152906001019060200180831161352557829003601f168201915b5050505050815260200160048201805461355b90615ea2565b80601f016020809104026020016040519081016040528092919081815260200182805461358790615ea2565b80156135d45780601f106135a9576101008083540402835291602001916135d4565b820191906000526020600020905b8154815290600101906020018083116135b757829003601f168201915b50505050508152505090509250925092509193909250565b611633816000613a7b565b600b546001600160a01b031633146136215760405162461bcd60e51b8152600401610a9490615ac4565b6001600160a01b0381166136865760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a94565b61163381613a29565b600b546001600160a01b031633146136b95760405162461bcd60e51b8152600401610a9490615ac4565b6001600160a01b03919091166000908152601c60205260409020805460ff1916911515919091179055565b60006001600160e01b0319821663780e9d6360e01b1480610a645750610a6482614153565b6000908152600260205260409020546001600160a01b0316151590565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061375b8261143c565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600061379f82613709565b6138005760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610a94565b600061380b8361143c565b9050806001600160a01b0316846001600160a01b031614806138465750836001600160a01b031661383b84610b66565b6001600160a01b0316145b8061387657506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b03166138918261143c565b6001600160a01b0316146138f95760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610a94565b6001600160a01b03821661395b5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610a94565b6139668383836141a3565b613971600082613726565b6001600160a01b038316600090815260036020526040812080546001929061399a908490615e5f565b90915550506001600160a01b03821660009081526003602052604081208054600192906139c8908490615e14565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b613a8582826141ae565b6000613a9083612747565b905081613c3a57600d54604051636eb1769f60e11b815233600482015230602482015282916001600160a01b03169063dd62ed3e9060440160206040518083038186803b158015613ae057600080fd5b505afa158015613af4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b1891906153c9565b1015613b665760405162461bcd60e51b815260206004820152601860248201527f4e6f7420656e6f756768205745544820617070726f76656400000000000000006044820152606401610a94565b600d546040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b03909116906323b872dd90606401602060405180830381600087803b158015613bb857600080fd5b505af1158015613bcc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613bf09190615091565b1515600114613c3a5760405162461bcd60e51b815260206004820152601660248201527509cdee840cadcdeeaced040ae8aa89040ccdee440a8b60531b6044820152606401610a94565b6000836001600160401b03811115613c6257634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015613c8b578160200160208202803683370190505b50905060005b84811015613d74576000613ca460085490565b9050613cb03382614600565b613cc281613cbd83613ea5565b61461a565b80601e6000613cd56016546015546146a5565b81526020019081526020016000208190555080838381518110613d0857634e487b7160e01b600052603260045260246000fd5b6020026020010181815250508415613d305760148054906000613d2a83615edd565b91905055505b601154610100900460ff1615613d6157336000908152601d60205260408120805491613d5b83615edd565b91905055505b5080613d6c81615edd565b915050613c91565b5082613e1457600d5460405163a9059cbb60e01b81527310073fb6d644113469bd8e30404bcad6715388ff6004820152602481018490526001600160a01b039091169063a9059cbb90604401602060405180830381600087803b158015613dda57600080fd5b505af1158015613dee573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613e129190615091565b505b7f80eeee11e3dbb72a7c4727ebea6a3329ee857594597f6d6e0ffd4bf9731a201281604051613e439190615880565b60405180910390a150505050565b6000828152601e6020908152604080832054808452601b835292819020849055518281527f4137ae11b5c80c2c704c848875e90a90b90a6aed4a738798e3bace7854d47c66910160405180910390a1505050565b606081613ec95750506040805180820190915260018152600360fc1b602082015290565b8160005b8115613ef35780613edd81615edd565b9150613eec9050600a83615e2c565b9150613ecd565b6000816001600160401b03811115613f1b57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015613f45576020820181803683370190505b5090505b841561387657613f5a600183615e5f565b9150613f67600a86615ef8565b613f72906030615e14565b60f81b818381518110613f9557634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350613fb7600a86615e2c565b9450613f49565b613fc984848461387e565b613fd584848484614830565b61283d5760405162461bcd60e51b8152600401610a9490615a72565b6060613ffc82613709565b6140625760405162461bcd60e51b815260206004820152603160248201527f45524337323155524953746f726167653a2055524920717565727920666f72206044820152703737b732bc34b9ba32b73a103a37b5b2b760791b6064820152608401610a94565b6000828152600a60205260408120805461407b90615ea2565b80601f01602080910402602001604051908101604052809291908181526020018280546140a790615ea2565b80156140f45780601f106140c9576101008083540402835291602001916140f4565b820191906000526020600020905b8154815290600101906020018083116140d757829003601f168201915b505050505090506000614105614932565b9050805160001415614118575092915050565b81511561414a578082604051602001614132929190615758565b60405160208183030381529060405292505050919050565b61387684614941565b60006001600160e01b031982166380ac58cd60e01b148061418457506001600160e01b03198216635b5e139f60e01b145b80610a6457506301ffc9a760e01b6001600160e01b0319831614610a64565b610cff838383614a0c565b601154610100900460ff16806141c65750600f544310155b6142125760405162461bcd60e51b815260206004820152601860248201527f56696b696e6773206e6f74207965742072656c656173656400000000000000006044820152606401610a94565b60115460ff16156142595760405162461bcd60e51b8152602060048201526011602482015270135a5b9d1a5b99c81a5cc81c185d5cd959607a1b6044820152606401610a94565b600e546001600160a01b03166142aa5760405162461bcd60e51b8152602060048201526016602482015275139bdc9b9a5c94995cdbdb1d995c881b9bdd081cd95d60521b6044820152606401610a94565b60006142b560085490565b601154909150600090610100900460ff166142d2576126916142d6565b6101f95b601154909150600090610100900460ff166142f25760326142f5565b60055b90508161ffff1683106143355760405162461bcd60e51b815260206004820152600860248201526714dbdb19081bdd5d60c21b6044820152606401610a94565b6000851161437e5760405162461bcd60e51b81526020600482015260166024820152754d696e74206174206c6561737420312056696b696e6760501b6044820152606401610a94565b8061ffff168511156143c55760405162461bcd60e51b815260206004820152601060248201526f546f6f206d616e792056696b696e677360801b6044820152606401610a94565b61ffff82166143d48685615e14565b11156144175760405162461bcd60e51b8152602060048201526012602482015271135a5b9d08195e18d959591cc81b1a5b5a5d60721b6044820152606401610a94565b601154610100900460ff161561454857336000908152601c602052604090205460ff1661447f5760405162461bcd60e51b815260206004820152601660248201527515d85b1b195d081b9bdd081dda1a5d195b1a5cdd195960521b6044820152606401610a94565b336000908152601d602052604090205461ffff8216116144d95760405162461bcd60e51b8152602060048201526015602482015274141c995cd85b19481b1a5b5a5d081c995858da1959605a1b6044820152606401610a94565b336000908152601d602052604090205461ffff8216906144fa908790615e14565b11156145485760405162461bcd60e51b815260206004820152601a60248201527f4d696e7420657863656564732070726573616c65206c696d69740000000000006044820152606401610a94565b83156145f95760145460321161459a5760405162461bcd60e51b815260206004820152601760248201527613585e081bdddb995c881b5a5b9d1cc81c995858da1959604a1b6044820152606401610a94565b6014546032906145ab908790615e14565b11156145f95760405162461bcd60e51b815260206004820152601c60248201527f4d696e742065786365656473204d41585f4f574e45525f4d494e5453000000006044820152606401610a94565b5050505050565b610f59828260405180602001604052806000815250614ac4565b61462382613709565b6146865760405162461bcd60e51b815260206004820152602e60248201527f45524337323155524953746f726167653a2055524920736574206f66206e6f6e60448201526d32bc34b9ba32b73a103a37b5b2b760911b6064820152608401610a94565b6000828152600a602090815260409091208251610cff92840190614df0565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634000aea07f000000000000000000000000000000000000000000000000000000000000000084866000604051602001614715929190918252602082015260400190565b6040516020818303038152906040526040518463ffffffff1660e01b815260040161474293929190615859565b602060405180830381600087803b15801561475c57600080fd5b505af1158015614770573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906147949190615091565b506000838152600c6020818152604080842054815180840189905280830186905230606082015260808082018390528351808303909101815260a0909101909252815191830191909120938790529190526147f0906001615e14565b6000858152600c60205260409020556138768482604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b60006001600160a01b0384163b15611e1157604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290614874903390899088908890600401615826565b602060405180830381600087803b15801561488e57600080fd5b505af19250505080156148be575060408051601f3d908101601f191682019092526148bb918101906150ea565b60015b614918573d8080156148ec576040519150601f19603f3d011682016040523d82523d6000602084013e6148f1565b606091505b5080516149105760405162461bcd60e51b8152600401610a9490615a72565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050613876565b606060108054610ae390615ea2565b606061494c82613709565b6149b05760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610a94565b60006149ba614932565b905060008151116149da5760405180602001604052806000815250614a05565b806149e484613ea5565b6040516020016149f5929190615758565b6040516020818303038152906040525b9392505050565b6001600160a01b038316614a6757614a6281600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b614a8a565b816001600160a01b0316836001600160a01b031614614a8a57614a8a8382614af7565b6001600160a01b038216614aa157610cff81614b94565b826001600160a01b0316826001600160a01b031614610cff57610cff8282614c6d565b614ace8383614cb1565b614adb6000848484614830565b610cff5760405162461bcd60e51b8152600401610a9490615a72565b60006001614b0484611541565b614b0e9190615e5f565b600083815260076020526040902054909150808214614b61576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090614ba690600190615e5f565b60008381526009602052604081205460088054939450909284908110614bdc57634e487b7160e01b600052603260045260246000fd5b906000526020600020015490508060088381548110614c0b57634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480614c5157634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b6000614c7883611541565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160a01b038216614d075760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610a94565b614d1081613709565b15614d5d5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610a94565b614d69600083836141a3565b6001600160a01b0382166000908152600360205260408120805460019290614d92908490615e14565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b828054614dfc90615ea2565b90600052602060002090601f016020900481019282614e1e5760008555614e64565b82601f10614e3757805160ff1916838001178555614e64565b82800160010185558215614e64579182015b82811115614e64578251825591602001919060010190614e49565b50614e70929150614e74565b5090565b5b80821115614e705760008155600101614e75565b6000614e9c614e9784615ded565b615dbd565b9050828152838383011115614eb057600080fd5b828260208301376000602084830101529392505050565b600082601f830112614ed7578081fd5b614a0583833560208501614e89565b600082601f830112614ef6578081fd5b8151614f04614e9782615ded565b818152846020838601011115614f18578283fd5b613876826020830160208701615e76565b600060208284031215614f3a578081fd5b8135614a0581615f4e565b60008060408385031215614f57578081fd5b8235614f6281615f4e565b91506020830135614f7281615f4e565b809150509250929050565b600080600060608486031215614f91578081fd5b8335614f9c81615f4e565b92506020840135614fac81615f4e565b929592945050506040919091013590565b60008060008060808587031215614fd2578081fd5b8435614fdd81615f4e565b93506020850135614fed81615f4e565b92506040850135915060608501356001600160401b0381111561500e578182fd5b8501601f8101871361501e578182fd5b61502d87823560208401614e89565b91505092959194509250565b6000806040838503121561504b578182fd5b823561505681615f4e565b91506020830135614f7281615f63565b60008060408385031215615078578182fd5b823561508381615f4e565b946020939093013593505050565b6000602082840312156150a2578081fd5b8151614a0581615f63565b600080604083850312156150bf578182fd5b50508035926020909101359150565b6000602082840312156150df578081fd5b8135614a0581615f71565b6000602082840312156150fb578081fd5b8151614a0581615f71565b600060208284031215615117578081fd5b81356001600160401b0381111561512c578182fd5b61387684828501614ec7565b600060208284031215615149578081fd5b81516001600160401b038082111561515f578283fd5b908301906101208286031215615173578283fd5b61517b615d72565b825182811115615189578485fd5b61519587828601614ee6565b8252506020830151828111156151a9578485fd5b6151b587828601614ee6565b6020830152506040830151828111156151cc578485fd5b6151d887828601614ee6565b6040830152506060830151828111156151ef578485fd5b6151fb87828601614ee6565b606083015250608083015182811115615212578485fd5b61521e87828601614ee6565b60808301525060a083015182811115615235578485fd5b61524187828601614ee6565b60a08301525060c083015182811115615258578485fd5b61526487828601614ee6565b60c08301525060e08301518281111561527b578485fd5b61528787828601614ee6565b60e08301525061010080840151838111156152a0578586fd5b6152ac88828701614ee6565b918301919091525095945050505050565b6000602082840312156152ce578081fd5b81516001600160401b03808211156152e4578283fd5b9083019060a082860312156152f7578283fd5b6152ff615d9b565b82518281111561530d578485fd5b61531987828601614ee6565b82525060208301518281111561532d578485fd5b61533987828601614ee6565b602083015250604083015182811115615350578485fd5b61535c87828601614ee6565b604083015250606083015182811115615373578485fd5b61537f87828601614ee6565b606083015250608083015182811115615396578485fd5b6153a287828601614ee6565b60808301525095945050505050565b6000602082840312156153c2578081fd5b5035919050565b6000602082840312156153da578081fd5b5051919050565b600080604083850312156153f3578182fd5b8235915060208301356001600160401b0381111561540f578182fd5b61541b85828601614ec7565b9150509250929050565b6000815180845261543d816020860160208601615e76565b601f01601f19169290920160200192915050565b6000815461545e81615ea2565b80855260206001838116801561547b576001811461548f576154bd565b60ff198516888401526040880195506154bd565b866000528260002060005b858110156154b55781548a820186015290830190840161549a565b890184019650505b505050505092915050565b600061012082518185526154de82860182615425565b915050602083015184820360208601526154f88282615425565b915050604083015184820360408601526155128282615425565b9150506060830151848203606086015261552c8282615425565b915050608083015184820360808601526155468282615425565b91505060a083015184820360a08601526155608282615425565b91505060c083015184820360c086015261557a8282615425565b91505060e083015184820360e08601526155948282615425565b91505061010080840151858303828701526155af8382615425565b9695505050505050565b6000815160a084526155ce60a0850182615425565b9050602083015184820360208601526155e78282615425565b915050604083015184820360408601526156018282615425565b9150506060830151848203606086015261561b8282615425565b915050608083015184820360808601526156358282615425565b95945050505050565b60a08252600061565160a0840183615451565b83810360208501526156668160018501615451565b9050838103604085015261567d8160028501615451565b905083810360608501526156948160038501615451565b905083810360808501526138768160048501615451565b60006101808084526156bf81850184615451565b60018401546020860152600284015460408601526003840154606086015260048401546080860152600584015460a0860152600684015460c0860152600784015460e086015260088401546101008601526009840154610120860152600a840154610140860152600b909301546101609094019390935250919050565b6000825161574e818460208701615e76565b9190910192915050565b6000835161576a818460208801615e76565b83519083019061577e818360208801615e76565b01949350505050565b600080835461579581615ea2565b600182811680156157ad57600181146157be576157ea565b60ff198416875282870194506157ea565b8786526020808720875b858110156157e15781548a8201529084019082016157c8565b50505082870194505b50929695505050505050565b6756696b696e67202360c01b815260008251615819816008850160208701615e76565b9190910160080192915050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906155af90830184615425565b60018060a01b03841681528260208201526060604082015260006156356060830184615425565b6020808252825182820181905260009190848201906040850190845b818110156158b85783518352928401929184019160010161589c565b50909695505050505050565b602081526000614a056020830184615425565b60a0815260006158ea60a0830188615425565b82810360208401526158fc8188615425565b905082810360408401526159108187615425565b905082810360608401526159248186615425565b905082810360808401526159388185615425565b98975050505050505050565b60006101208083526159588184018d615425565b9050828103602084015261596c818c615425565b90508281036040840152615980818b615425565b90508281036060840152615994818a615425565b905082810360808401526159a88189615425565b905082810360a08401526159bc8188615425565b905082810360c08401526159d08187615425565b905082810360e08401526159e48186615425565b90508281036101008401526159f98185615425565b9c9b505050505050505050505050565b61018081526000615a1e61018083018f615425565b602083019d909d5250604081019a909a5260608a0198909852608089019690965260a088019490945260c087019290925260e086015261010085015261012084015261014083015261016090910152919050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6060815260008451610180806060850152615b696101e0850183615425565b915060208701516080850152604087015160a0850152606087015160c0850152608087015160e085015260a0870151610100818187015260c08901519150610120828188015260e08a015192506101408381890152828b0151935061016092508383890152818b015185890152808b01516101a08901525050808901516101c08701525050508281036020840152615c0181866154c8565b905082810360408401526155af81856155b9565b602081526000614a0560208301846156ab565b604081526000615c3b60408301856156ab565b8281036020840152615635818561563e565b8281526040602082015260006138766040830184615425565b848152608060208201526000615c7f60808301866156ab565b8281036040840152610120808252615c9981830187615451565b90508181036020830152615cb08160018801615451565b90508181036040830152615cc78160028801615451565b90508181036060830152615cde8160038801615451565b90508181036080830152615cf58160048801615451565b905081810360a0830152615d0c8160058801615451565b905081810360c0830152615d238160068801615451565b905081810360e0830152615d3a8160078801615451565b9050818103610100830152615d528160088801615451565b9150508281036060840152615d67818561563e565b979650505050505050565b60405161012081016001600160401b0381118282101715615d9557615d95615f38565b60405290565b60405160a081016001600160401b0381118282101715615d9557615d95615f38565b604051601f8201601f191681016001600160401b0381118282101715615de557615de5615f38565b604052919050565b60006001600160401b03821115615e0657615e06615f38565b50601f01601f191660200190565b60008219821115615e2757615e27615f0c565b500190565b600082615e3b57615e3b615f22565b500490565b6000816000190483118215151615615e5a57615e5a615f0c565b500290565b600082821015615e7157615e71615f0c565b500390565b60005b83811015615e91578181015183820152602001615e79565b8381111561283d5750506000910152565b600181811c90821680615eb657607f821691505b60208210811415615ed757634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415615ef157615ef1615f0c565b5060010190565b600082615f0757615f07615f22565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461163357600080fd5b801515811461163357600080fd5b6001600160e01b03198116811461163357600080fdfea2646970667358221220beae8ce6d08ba627c608b105cbbc69c08b46d7e16b4b0f5b2d6305675e15c1e864736f6c6343000804003368747470733a2f2f6170692e63727970746f76696b696e67732e696f2f76696b696e672f0000000000000000000000003d2341adb2d31f1c5530cdc622016af293177ae0000000000000000000000000b0897686c545045afc77cf20ec7a532e3120e0f1f86195cf7690c55907b2b611ebb7343a6f649bff128701cc542f0569e2c549da

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000003d2341adb2d31f1c5530cdc622016af293177ae0000000000000000000000000b0897686c545045afc77cf20ec7a532e3120e0f1f86195cf7690c55907b2b611ebb7343a6f649bff128701cc542f0569e2c549da

-----Decoded View---------------
Arg [0] : _VRFCoordinator (address): 0x3d2341adb2d31f1c5530cdc622016af293177ae0
Arg [1] : _LinkToken (address): 0xb0897686c545045afc77cf20ec7a532e3120e0f1
Arg [2] : _keyHash (bytes32): 0xf86195cf7690c55907b2b611ebb7343a6f649bff128701cc542f0569e2c549da

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000003d2341adb2d31f1c5530cdc622016af293177ae0
Arg [1] : 000000000000000000000000b0897686c545045afc77cf20ec7a532e3120e0f1
Arg [2] : f86195cf7690c55907b2b611ebb7343a6f649bff128701cc542f0569e2c549da


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.