Contract 0x6cea74621d90a9cd43864abcb09e2e9ce4661922 5

Contract Overview

Balance:
0 AVAX

AVAX Value:
$0.00

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x954ba883c3919981038ca04429356fe9e20892cef38641d534e83b00b560c1c3Claim149736742022-05-21 5:26:3830 mins ago0xe8b734244edbce801f31aac7e8c3c22a1b1f2cad IN  0x6cea74621d90a9cd43864abcb09e2e9ce46619220 AVAX0.012269699657 27.35225
0xfef32690e497b7f6b67254eb2ee3e6180e5077407846869ea6cfb8c78ed5e445Claim149724212022-05-21 4:44:471 hr 12 mins ago0x61c775d9611151217ca31a930b1c4c2f13825ed1 IN  0x6cea74621d90a9cd43864abcb09e2e9ce46619220 AVAX0.015025849128 27.35225
0xe339caed7780092f5200703551fc078a2edd6cc0be45ba8fc42a4bcd2cd3f069Claim149716542022-05-21 4:19:061 hr 37 mins ago0x0524950578ab5c1cfea2cb094c536c3d6224d966 IN  0x6cea74621d90a9cd43864abcb09e2e9ce46619220 AVAX0.01324249035 27.425
0x1dac04598aa5ba0280e98ea340a9d83550b7a2688e5d05e82796aa45bbbffb20Claim149681312022-05-21 2:20:493 hrs 35 mins ago0x1c7d1270d3dfa7984d3bc37bea2c2e8386a04a05 IN  0x6cea74621d90a9cd43864abcb09e2e9ce46619220 AVAX0.0114342465 26.5
0xd7bb2d80777d1ecf2a561c547d312ee8ec0abc18ce28ed0875ea684a82f3fd59Claim149676302022-05-21 2:04:003 hrs 52 mins ago0x4d9656c58537a20b5f414ece60773db6ce81d8d1 IN  0x6cea74621d90a9cd43864abcb09e2e9ce46619220 AVAX0.023172087689 27.35225
0x997121e8f4b97136591087640be500e1862864ef8d76e11d9488d91b7ac6d80fClaim149622882022-05-20 23:05:426 hrs 51 mins ago0x70d9c585249e261947e9dcf0ddff04f6b45e1c25 IN  0x6cea74621d90a9cd43864abcb09e2e9ce46619220 AVAX0.016365347675 27.425
0xb54d5754bf2c3d57aab713d940a3057903eea1fd39d3a9abba67ae39dff0d6c8Claim149620282022-05-20 22:56:596 hrs 59 mins ago0x61f96d3e5db16b0aaaef5a698dcc6f266dd0e4e2 IN  0x6cea74621d90a9cd43864abcb09e2e9ce46619220 AVAX0.02507188015 27.425
0x44d7a8a285401210f271a4862686baa0099312fc167727f45990c3d46b0faefdClaim149603882022-05-20 22:02:237 hrs 54 mins ago0x2666c1b3d01c7410415dbcf935a5a145b92007b6 IN  0x6cea74621d90a9cd43864abcb09e2e9ce46619220 AVAX0.018878184 27
0xbe37fe296ca95da1757f2d25044c9b51533350f8167ad781a04fc7dcbbb3de18Stake149583072022-05-20 20:53:079 hrs 3 mins ago0x1f1a9c926392503a04f378a222dc0db9fb797e46 IN  0x6cea74621d90a9cd43864abcb09e2e9ce46619220 AVAX0.03743448476 26.41
0x9e5138b3a15420b07d46f7678876fc88b2195c97f020e4d48132324c57fb186eClaim149576052022-05-20 20:29:419 hrs 27 mins ago0x1f1a9c926392503a04f378a222dc0db9fb797e46 IN  0x6cea74621d90a9cd43864abcb09e2e9ce46619220 AVAX0.032121291989 26.520462116
0x2e878805c05acd4fed209550f91a0a3ce02ad1ab0793fb2d32cd91e23496f28cClaim149575772022-05-20 20:28:449 hrs 28 mins ago0x1f1a9c926392503a04f378a222dc0db9fb797e46 IN  0x6cea74621d90a9cd43864abcb09e2e9ce46619220 AVAX0.03279883935 26.614419968
0xfb294d466105a05321835570c9e2ed16dab723d104339ec271252bc20937eb6fClaim149561932022-05-20 19:42:4210 hrs 14 mins ago0xbf9f12a44c64f31403ce4b656673ba6f08484c05 IN  0x6cea74621d90a9cd43864abcb09e2e9ce46619220 AVAX0.020043659421 26.7111319
0xad43d9d4c580bccc7f193c064f1d1f4d36c083361118508bfd446c9aa9a08746Claim149556222022-05-20 19:23:5010 hrs 32 mins ago0x5d0b74f73ada5525afedd44845e51ca3af11004b IN  0x6cea74621d90a9cd43864abcb09e2e9ce46619220 AVAX0.0118873965 26.5
0x51827227b4e9308c765920552fa57f66b7fd758d9d73d9b4f614fe5fb4067458Claim149539992022-05-20 18:30:0311 hrs 26 mins ago0x2bda7341b81997810cc5c3df8c905441b16685bb IN  0x6cea74621d90a9cd43864abcb09e2e9ce46619220 AVAX0.0118873965 26.5
0x155fcaa6cf904b120ce3e195828c7c0b8d2feb997cb5789cb11de691c23b67c0Claim149539142022-05-20 18:27:1411 hrs 29 mins ago0x529f06311962e072f5fbee33066ad14fb1d85016 IN  0x6cea74621d90a9cd43864abcb09e2e9ce46619220 AVAX0.0040914798 29.85
0x8974360dd685520097fe31edd59d5cf414799612a03a2a883a922a464d4b0090Claim149539032022-05-20 18:26:5111 hrs 29 mins ago0x529f06311962e072f5fbee33066ad14fb1d85016 IN  0x6cea74621d90a9cd43864abcb09e2e9ce46619220 AVAX0.0118873965 26.5
0xb75f628ea3ce08db6f2f0689611f7ef863369f3fc1eab95168b8f00f0f0781adClaim149538262022-05-20 18:24:1911 hrs 32 mins ago0x5bc8b7a68656fd89092626310e2bddce5023162a IN  0x6cea74621d90a9cd43864abcb09e2e9ce46619220 AVAX0.0114342465 26.5
0x73e953676be003ff04c634f50c6f85620f785039f55ff68d7df831e921154a09Claim149537992022-05-20 18:23:2511 hrs 33 mins ago0x84fa6200e513b4391840de64741830a381e2f11a IN  0x6cea74621d90a9cd43864abcb09e2e9ce46619220 AVAX0.0118870785 26.5
0x6b2b394740bb42f528f22364db006d477b30c2aa9b43e811459bdfcf452fb8e3Claim149537982022-05-20 18:23:2311 hrs 33 mins ago0x4caf8d58e1d9dbb6026500a2d365a9c663b600bc IN  0x6cea74621d90a9cd43864abcb09e2e9ce46619220 AVAX0.0062490445 26.5
0x88c25145866123a9e541cbf869add33871084c6c24a2c5c31a0b04acdbe9e364Claim149537782022-05-20 18:22:4311 hrs 34 mins ago0x4caf8d58e1d9dbb6026500a2d365a9c663b600bc IN  0x6cea74621d90a9cd43864abcb09e2e9ce46619220 AVAX0.0105464435 26.5
0x6d2611382b435d06f9307e7f2c824b071e5877a71a61a3c5306ba316ffb06a95Claim149537632022-05-20 18:22:1211 hrs 34 mins ago0x4caf8d58e1d9dbb6026500a2d365a9c663b600bc IN  0x6cea74621d90a9cd43864abcb09e2e9ce46619220 AVAX0.0118873965 26.5
0x07191dc486fde5fe80ed5fd20c5d54e9befae80e3bd3106d4dcf48d8d119ccdfClaim149537582022-05-20 18:22:0111 hrs 34 mins ago0x2c955fce99fa6175c01b4fe5dec2bf3d365f9b6d IN  0x6cea74621d90a9cd43864abcb09e2e9ce46619220 AVAX0.0158133715 26.5
0xa09abe441424e35f4b9f9fbbce79201ec5dcaca48483cbbe5eed74503eb7110cClaim149537132022-05-20 18:20:3211 hrs 36 mins ago0xb1b71e646bbfb871e36d4ee0570bcab404fd2906 IN  0x6cea74621d90a9cd43864abcb09e2e9ce46619220 AVAX0.013251712796 26.505440007
0x3c220aedaab9d048c54bfd42205d4182a46f4a289699d3b8c2f57fe1201f4f0eClaim149536862022-05-20 18:19:3711 hrs 37 mins ago0x20e27e5dc1a3bdd8ac29a650a7f6f2b05403f283 IN  0x6cea74621d90a9cd43864abcb09e2e9ce46619220 AVAX0.018245312732 26.825346
0xe0d362ecd7810ddaf208d66c4b2702e3b4a4b46b689dac6fa1b3e3d6a67fea4bStake149520902022-05-20 17:26:4812 hrs 30 mins ago0xb8f6b3d25a02762bc0c4b07acff3157cf4001214 IN  0x6cea74621d90a9cd43864abcb09e2e9ce46619220 AVAX0.0243533675 26.5
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
TheFryingPanV2

Compiler Version
v0.8.12+commit.f00d7308

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 12 : TheFryingPanV2.sol
// SPDX-License-Identifier: MIT LICENSE
pragma solidity 0.8.12;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/security/Pausable.sol";

interface IRandomizer {
	function random(
		uint256 from,
		uint256 to,
		uint256 salty
	) external view returns (uint256);
}

interface IGREASE {
	function mint(address to, uint256 amount) external;
	function burn(address from, uint256 amount) external;
	function updateOriginAccess() external;
	function transferFrom(
		address sender,
		address recipient,
		uint256 amount
	) external returns (bool);
}

interface IEGG {
	function burn(address from, uint256 amount) external;
}

interface IBACON {
	function ownerOf(uint256 tokenId) external view returns (address owner);
	function transferFrom(
		address from,
		address to,
		uint256 tokenId
	) external;
	function safeTransferFrom(
		address from,
		address to,
		uint256 tokenId,
		bytes calldata data
	) external;
	function getTokenTraits(uint256 tokenId) external view returns (bool, uint256);
}

interface IFRYINGPANV1 {
	function currentStakingLevel(address user) external view returns (uint256 hideoutLevel, uint256 policeStationLevel, uint256 maxBacons, uint256 maxCops);
}

contract TheFryingPanV2 is Ownable, Pausable, IERC721Receiver, ReentrancyGuard {
    // STATE VARIABLES

	uint8 public constant MAX_ALPHA = 10;
	uint256 public ALPHA_RATIO = 1000; // can adjust the alpha ratio of gains per alpha level if needed

	// store a stake's token, owner, and earning values
	struct Stake {
		uint256 tokenId;
		uint256 value;
		address owner;
	}

	struct StakingLevel {
		uint256 hideoutLevel; // for bacon
		uint256 policeStationLevel; // for cop
		uint256 maxBacons;
		uint256 maxCops;
	}

	// reference to the Bacon NFT contract
	IBACON public bacon;
	IEGG public egg;
	IGREASE public grease;
	IRandomizer randomizer;
	IFRYINGPANV1 public fryingPanV1;

	// maps the max stake tokens per address
	mapping(address => StakingLevel) public stakingLevelPerAddress;

	// maps address if max stake is set for address
	mapping(address => bool) public isStakingLevelPerAddressSet;

	// maps staked bacon counter by address
	mapping(address => uint256) public stakedBaconCounterByAddress;

	// maps staked cop counter by address
	mapping(address => uint256) public stakedCopCounterByAddress;

	// maps tokenId to stake
	mapping(uint256 => Stake) public Pan;

	// maps alpha to all Bacon stakes
	mapping(uint256 => Stake[]) public pack;

	// tracks location of each Bacon in Pack
	mapping(uint256 => uint256) public packIndices;

	// tracks the generated grease per address
	mapping(address => uint256) public generatedGREASEByAddress;

	// tracks the generated grease per token id
	mapping(uint256 => uint256) public generatedGREASEByTokenId;

	// maps address to upgrade v2 migrated accounts
	mapping(address => bool) public isUpgradeMigratedByAddress;

	// total alpha scores staked
	uint256 public totalAlphaStaked = 0;

	// any rewards distributed when no copbacons are staked
	uint256 public unaccountedRewards = 0;

	// amount of $GREASE due for each alpha point staked
	uint256 public GreasePerAlpha = 0;

	// bacon earn $GREASE per day
	uint256 public DAILY_GREASE_RATE = 6900 ether;

	// bacon must have 2 days worth of $GREASE to unstake or else it's too cold
	uint256 public MINIMUM_TO_EXIT = 2 days;

	// default cop bacons take a 20% tax on all $GREASE claimed
	uint256 public GREASE_CLAIM_TAX_PERCENTAGE = 20;

	// amount of $GREASE earned so far
	uint256 public totalGREASEEarned;

	// number of bacon staked in the Pan
	uint256 public totalBaconStaked;

	// number of cop staked in the Pan
	uint256 public totalCopStaked;

	// the last time $GREASE was claimed
	uint256 public lastClaimTimestamp;

	// start of stake time
	uint256 public stakeStartTime = block.timestamp - 1; // TODO: set time of deployment

	// emergency rescue to allow unstaking without any checks but without $GREASE
	bool public rescueEnabled = false;

    // EVENTS

    event TokenStaked(address indexed owner, uint256 indexed tokenId, uint256 value);
	event BaconCopClaimed(uint256 indexed tokenId, uint256 earned, bool unstaked);
	event BaconClaimed(uint256 indexed tokenId, uint256 earned, bool unstaked);

    // CONSTRUCTOR

	constructor() {}

    // READ FUNCTIONS

    /**
	 * @dev Get current staking level
	 * @return hideoutLevel
	 * @return policeStationLevel
	 * @return maxBacons
	 * @return maxCops
	 */
	function currentStakingLevel(address user)
		external
		view
		returns (
			uint256 hideoutLevel,
			uint256 policeStationLevel,
			uint256 maxBacons,
			uint256 maxCops
		)
	{
		StakingLevel memory stakingLevel = stakingLevelPerAddress[user];

		// check if stakingLevelPerAddress is set. If not, set to default values
		if (!isStakingLevelPerAddressSet[user]) {
			stakingLevel = StakingLevel({
				hideoutLevel: 0, // default
				policeStationLevel: 0, // default
				maxBacons: 10,
				maxCops: 3
			});
		}

		return (
			stakingLevel.hideoutLevel,
			stakingLevel.policeStationLevel,
			stakingLevel.maxBacons,
			stakingLevel.maxCops
		);
	}

    /**
	 * Get owed $GREASE from staked tokenId
	 * @param tokenId staked token id
	 * @return owed in $GREASE
	 */
	function getOwedGrease(uint256 tokenId) public view returns (uint256 owed) {
		require(bacon.ownerOf(tokenId) == address(this), "Token is not staked.");

		Stake memory _stake = Pan[tokenId]; // default to pan

		// for bacon
		if (!isCop(tokenId)) {
			owed = ((block.timestamp - _stake.value) * DAILY_GREASE_RATE) / 1 days;
			return owed;
		}

		// for bacon cop
		uint256 alpha = _alphaForBacon(tokenId); // inverse it. The higher the alpha, the lower the GREASE owed
		_stake = pack[alpha][packIndices[tokenId]];

		owed = (((11 - alpha) * ALPHA_RATIO) / 1000) * (GreasePerAlpha - _stake.value); // Calculate portion of tokens based on alpha

		return owed;
	}

	function getBaconLevel(uint256 tokenId) public view returns (uint256) {
		return _ceil(1 + generatedGREASEByTokenId[tokenId] / 20_000, 10**18);
	}

    function isCop(uint256 tokenId) public view returns (bool _isCop) {
		(_isCop, ) = bacon.getTokenTraits(tokenId);
	}

	/**
	 * gets the alphaengh score for a Bacon (higher is better)
	 * @param tokenId the ID of the Bacon to get the alpha score for
	 * @return the alpha score of the Bacon
	 */
	function _alphaForBacon(uint256 tokenId) internal view returns (uint256) {
		(, uint256 alphaIndex) = bacon.getTokenTraits(tokenId);
		(tokenId);
		return alphaIndex; // higher is better
	}

	/**
	 * chooses a random Bacon thief when a newly minted token is stolen
	 * @param seed a random value to choose a Bacon from
	 * @return the owner of the randomly selected Bacon thief
	 */
	function randomCopOwner(uint256 seed) external view returns (address) {
        // default to 0x0
		return address(0x0);
	}

	function onERC721Received(
		address,
		address,
		uint256,
		bytes calldata
	) external pure override returns (bytes4) {
		return IERC721Receiver.onERC721Received.selector;
	}

	// WRITE FUNCTIONS

    /** STAKING **/

	/*
	 * adds CopBacon and Bacon to the FryingPan
	 * requires allowance
	 * @param tokenId the ID of the CopBacon or Bacon to stake
	 */
	function stake(uint256[] calldata tokenIds) external notContract whenNotPaused nonReentrant {
		require(block.timestamp > stakeStartTime, "not live");
		require(tokenIds.length < 11, "max 10 per transaction");

		// check if stakingLevelPerAddress is set. If not, set to default values
		if (!isStakingLevelPerAddressSet[msg.sender]) {
			stakingLevelPerAddress[msg.sender] = StakingLevel({
				hideoutLevel: 0, // default
				policeStationLevel: 0, // default
				maxBacons: 10,
				maxCops: 3
			});

			isStakingLevelPerAddressSet[msg.sender] = true;
		}

		// check for max stake per address conditions
		uint256 noOfBacons = 0;
		uint256 noOfCops = 0;

		for (uint256 i = 0; i < tokenIds.length; i++) {
			uint256 tokenId = tokenIds[i];
			if (!isCop(tokenId)) {
				noOfBacons += 1;
			} else {
				noOfCops += 1;
			}
		}

		if (
			(stakedBaconCounterByAddress[msg.sender] + noOfBacons >
				stakingLevelPerAddress[msg.sender].maxBacons) ||
			(stakedCopCounterByAddress[msg.sender] + noOfCops >
				stakingLevelPerAddress[msg.sender].maxCops)
		) {
			revert("TheFryingPan: max staked limit reached. Please upgrade staking level.");
		}

		for (uint256 i = 0; i < tokenIds.length; i++) {
			uint256 tokenId = tokenIds[i];
			require(bacon.ownerOf(tokenId) == msg.sender, "msg.sender not owner of tokenID");
			bacon.transferFrom(msg.sender, address(this), tokenId);
			if (!isCop(tokenId)) {
				_addBaconToPan(tokenId);
			} else {
				_addBaconCopToPack(tokenId);
			}
		}
	}

	/**
	 * adds a single Bacon to the Pan
	 * @param tokenId the ID of the Bacon to add to the Pan
	 */
	function _addBaconToPan(uint256 tokenId) internal _updateEarnings {
		Pan[tokenId] = Stake({ owner: msg.sender, tokenId: tokenId, value: block.timestamp });
		totalBaconStaked += 1;
		stakedBaconCounterByAddress[msg.sender] += 1;
		emit TokenStaked(msg.sender, tokenId, block.timestamp);
	}

	/**
	 * adds a single CopBacon to the Pack
	 * @param tokenId the ID of the CopBacon to add to the Pack
	 */
	function _addBaconCopToPack(uint256 tokenId) internal {
		uint256 alpha = _alphaForBacon(tokenId);
		totalAlphaStaked += alpha;
		totalCopStaked += 1;
		packIndices[tokenId] = pack[alpha].length; // Store the location of the Bacon in the Pack
		pack[alpha].push(Stake({ owner: msg.sender, tokenId: tokenId, value: GreasePerAlpha })); // Add the Bacon to the Pack
		stakedCopCounterByAddress[msg.sender] += 1;
		emit TokenStaked(msg.sender, tokenId, GreasePerAlpha);
	}

	/** CLAIMING / UNSTAKING */

	/**
	 * realize $GREASE earnings and optionally unstake tokens from the Pan / Pack
	 * to unstake a Bacon it will require it has 2 days worth of $GREASE unclaimed
	 * @param tokenIds the IDs of the tokens to claim earnings from
	 * @param unstake whether or not to unstake ALL of the tokens listed in tokenIds
	 */
	function claim(uint256[] calldata tokenIds, bool unstake)
		external
		notContract
		_updateEarnings
		whenNotPaused
		nonReentrant
	{
		uint256 owed = 0;
		for (uint256 i = 0; i < tokenIds.length; i++) {
			if (!isCop(tokenIds[i])) {
				//Bacon pay Bacon tax
				owed += _claimBaconFromPan(tokenIds[i], unstake);
			} else {
				//Bacon realise earnings
				owed += _claimBaconCopFromPack(tokenIds[i], unstake);
			}
		}
		grease.updateOriginAccess();
		if (owed != 0) {
			grease.mint(msg.sender, owed);
			generatedGREASEByAddress[msg.sender] = generatedGREASEByAddress[msg.sender] + owed;
		}
	}

	/**
	 * realize $GREASE earnings for a single Bacon and optionally unstake it
	 * if not unstaking, pay a 20% tax to the staked Wolves
	 * if unstaking, there is a 50% chance all $GREASE is stolen
	 * @param tokenId the ID of the Bacon to claim earnings from
	 * @param unstake whether or not to unstake the Bacon
	 * @return owed - the amount of $GREASE earned
	 */
	function _claimBaconFromPan(uint256 tokenId, bool unstake) internal returns (uint256 owed) {
		Stake memory _stake = Pan[tokenId];
		require(_stake.owner == msg.sender, "msg.sender not stake.owner");
		require(
			!(block.timestamp - _stake.value < MINIMUM_TO_EXIT),
			"block.timestamp - stake.value < MINIMUM_TO_EXIT"
		);

		owed = getOwedGrease(tokenId);

		if (unstake) {
			if (randomizer.random(0, 100, tokenId) > 50) {
				// 50% chance of all $GREASE stolen
				_payBaconTax(owed);
				owed = 0;
			}
			bacon.safeTransferFrom(address(this), msg.sender, tokenId, ""); // send back Bacon
			delete Pan[tokenId];
			stakedBaconCounterByAddress[msg.sender] -= 1;
			totalBaconStaked -= 1;
		} else {
			_payBaconTax((owed * GREASE_CLAIM_TAX_PERCENTAGE) / 100); // percentage tax to staked cops
			owed = (owed * (100 - GREASE_CLAIM_TAX_PERCENTAGE)) / 100; // remainder goes to Bacon owner
			Pan[tokenId] = Stake({
				owner: msg.sender,
				tokenId: uint256(tokenId),
				value: uint256(block.timestamp)
			}); // reset stake
		}

		generatedGREASEByTokenId[tokenId] = generatedGREASEByTokenId[tokenId] + owed;
		emit BaconClaimed(tokenId, owed, unstake);
	}

	/**
	 * realize $GREASE earnings for a single Bacon and optionally unstake it
	 * Cops earn $GREASE proportional to their alpha rank
	 * @param tokenId the ID of the Bacon to claim earnings from
	 * @param unstake whether or not to unstake the Bacon
	 * @return owed - the amount of $GREASE earned
	 */
	function _claimBaconCopFromPack(uint256 tokenId, bool unstake) internal returns (uint256 owed) {
		require(bacon.ownerOf(tokenId) == address(this), "AINT A PART OF THE PACK");
		uint256 alpha = _alphaForBacon(tokenId);
		Stake memory _stake = pack[alpha][packIndices[tokenId]];
		require(_stake.owner == msg.sender, "msg.sender is not stake.owner 0");

		owed = getOwedGrease(tokenId);
		if (unstake) {
			totalAlphaStaked -= alpha; // Remove alpha from total staked
			bacon.safeTransferFrom(address(this), msg.sender, tokenId, ""); // Send back Bacon
			Stake memory lastStake = pack[alpha][pack[alpha].length - 1];
			pack[alpha][packIndices[tokenId]] = lastStake; // Shuffle last Bacon to current position
			packIndices[lastStake.tokenId] = packIndices[tokenId];
			pack[alpha].pop(); // Remove duplicate
			delete packIndices[tokenId]; // Delete old mapping
			stakedCopCounterByAddress[msg.sender] -= 1;
			totalCopStaked -= 1;
		} else {
			pack[alpha][packIndices[tokenId]] = Stake({
				owner: msg.sender,
				tokenId: uint256(tokenId),
				value: uint256(GreasePerAlpha)
			}); // reset stake
		}

		generatedGREASEByTokenId[tokenId] = generatedGREASEByTokenId[tokenId] + owed;
		emit BaconCopClaimed(tokenId, owed, unstake);
	}

	/**
	 * emergency unstake tokens
	 * @param tokenIds the IDs of the tokens to claim earnings from
	 */
	function rescue(uint256[] calldata tokenIds) external notContract whenNotPaused nonReentrant {
		require(rescueEnabled, "RESCUE DISABLED");

		uint256 tokenId;
		Stake memory _stake;
		Stake memory lastStake;
		uint256 alpha;
		for (uint256 i = 0; i < tokenIds.length; i++) {
			tokenId = tokenIds[i];
			if (!isCop(tokenId)) {
				_stake = Pan[tokenId];
				require(_stake.owner == msg.sender, "msg.sender is not stake.owner 1");
				bacon.safeTransferFrom(address(this), msg.sender, tokenId, ""); // send back Bacon
				delete Pan[tokenId];
				stakedBaconCounterByAddress[msg.sender] -= 1;
				totalBaconStaked -= 1;
				emit BaconClaimed(tokenId, 0, true);
			} else {
				alpha = _alphaForBacon(tokenId);
				_stake = pack[alpha][packIndices[tokenId]];
				require(_stake.owner == msg.sender, "msg.sender is not stake.owner 2");
				totalAlphaStaked -= alpha; // Remove alpha from total staked
				bacon.safeTransferFrom(address(this), msg.sender, tokenId, ""); // Send back Bacon
				lastStake = pack[alpha][pack[alpha].length - 1];
				pack[alpha][packIndices[tokenId]] = lastStake; // Shuffle last Bacon to current position
				packIndices[lastStake.tokenId] = packIndices[tokenId];
				pack[alpha].pop(); // Remove duplicate
				delete packIndices[tokenId]; // Delete old mapping
				stakedCopCounterByAddress[msg.sender] -= 1;
				totalCopStaked -= 1;
				emit BaconCopClaimed(tokenId, 0, true);
			}
		}
	}

	/** STAKE UPGRADE */

	/**
	 * @dev Upgrade hideout staking level
	 */
	function upgradeHideoutStakingLevel() external notContract whenNotPaused nonReentrant {
		// check if stakingLevelPerAddress is set. If not, set to default values
		if (!isStakingLevelPerAddressSet[msg.sender]) {
			stakingLevelPerAddress[msg.sender] = StakingLevel({
				hideoutLevel: 0, // default
				policeStationLevel: 0, // default
				maxBacons: 10,
				maxCops: 3
			});

			isStakingLevelPerAddressSet[msg.sender] = true;
		}

		// get next upgrade requirements
		uint256 nextStakingLevel = stakingLevelPerAddress[msg.sender].hideoutLevel + 1;
		uint256 upgradeCost = (200 * nextStakingLevel) + 200; // 200(n)+200
		upgradeCost = upgradeCost * 10**18;

		// burn token and level up
		egg.burn(msg.sender, upgradeCost);

		stakingLevelPerAddress[msg.sender].hideoutLevel =
			stakingLevelPerAddress[msg.sender].hideoutLevel +
			1;
		stakingLevelPerAddress[msg.sender].maxBacons = stakingLevelPerAddress[msg.sender].maxBacons + 3;
	}

	/**
	 * @dev Upgrade police station staking level
	 */
	function upgradePoliceStationStakingLevel() external notContract whenNotPaused nonReentrant {
		// check if stakingLevelPerAddress is set. If not, set to default values
		if (!isStakingLevelPerAddressSet[msg.sender]) {
			stakingLevelPerAddress[msg.sender] = StakingLevel({
				hideoutLevel: 0, // default
				policeStationLevel: 0, // default
				maxBacons: 10,
				maxCops: 3
			});

			isStakingLevelPerAddressSet[msg.sender] = true;
		}

		// get next upgrade requirements
		uint256 nextStakingLevel = stakingLevelPerAddress[msg.sender].policeStationLevel + 1;
		uint256 upgradeCost = (200 * nextStakingLevel) + 200; // 200(n)+200
		upgradeCost = upgradeCost * 10**18;

		// burn token and level up
		egg.burn(msg.sender, upgradeCost);

		stakingLevelPerAddress[msg.sender].policeStationLevel =
			stakingLevelPerAddress[msg.sender].policeStationLevel +
			1;
		stakingLevelPerAddress[msg.sender].maxCops = stakingLevelPerAddress[msg.sender].maxCops + 1;
	}

	/**
	 * @dev migrate upgrades status from v1 to v2
	*/
	function migrateUpgrade() external notContract whenNotPaused nonReentrant {
		require(!isUpgradeMigratedByAddress[msg.sender], "TheFryingPanV2: already migrated");

		uint256 hideoutLevel;
		uint256 policeStationLevel;

		// get from v1
		(hideoutLevel, policeStationLevel, ,) = fryingPanV1.currentStakingLevel(msg.sender);

		// corrected calculation
		uint256 maxBacons = (3 * hideoutLevel) + 10;
		uint256 maxCops = policeStationLevel + 3;

		stakingLevelPerAddress[msg.sender] = StakingLevel({
			hideoutLevel: hideoutLevel,
			policeStationLevel: policeStationLevel,
			maxBacons: maxBacons,
			maxCops: maxCops
		});

		isStakingLevelPerAddressSet[msg.sender] = true;
		isUpgradeMigratedByAddress[msg.sender] = true;
	}

	/** ACCOUNTING */

	/**
	 * add $GREASE to claimable pot for the Pack
	 * @param amount $GREASE to add to the pot
	 */
	function _payBaconTax(uint256 amount) internal {
		if (totalAlphaStaked == 0) {
			// if there's no staked cops
			unaccountedRewards += amount; // keep track of $GREASE due to cops
			return;
		}
		
		// makes sure to include any unaccounted $GREASE
		GreasePerAlpha += (amount + unaccountedRewards) / totalAlphaStaked;
		unaccountedRewards = 0;
	}

	/** ADMIN */

	function setPaused(bool _setPaused) public onlyOwner {
		return (_setPaused) ? _pause() : _unpause();
	}

	/**
	 * allows owner to enable "rescue mode"
	 * simplifies accounting, prioritizes tokens out in emergency
	 */
	function setStakeStartTime(uint256 newTime) external onlyOwner {
		stakeStartTime = newTime;
	}

	function setDailyGreaseRate(uint256 _newRate) external onlyOwner {
		DAILY_GREASE_RATE = _newRate;
	}

	function setMinimumTimeToExit(uint256 _newMinimumTimeToExit) external onlyOwner {
		MINIMUM_TO_EXIT = _newMinimumTimeToExit;
	}

	function setGreaseClaimPercentage(uint256 _newGreaseClaimPercentage) external onlyOwner {
		GREASE_CLAIM_TAX_PERCENTAGE = _newGreaseClaimPercentage;
	}

	function setRescueEnabled(bool _enabled) external onlyOwner {
		rescueEnabled = _enabled;
	}

	function setGrease(address payable _grease) external onlyOwner {
		grease = IGREASE(_grease);
	}

	function setEgg(address payable _egg) external onlyOwner {
		egg = IEGG(_egg);
	}

	function setBacon(address _bacon) external onlyOwner {
		bacon = IBACON(_bacon);
	}

	function setRandomizer(address _newRandomizer) external onlyOwner {
		randomizer = IRandomizer(_newRandomizer);
	}

	function setFryingPanV1(address _newFryingPanV1) external onlyOwner {
		fryingPanV1 = IFRYINGPANV1(_newFryingPanV1);
	}

	// if needed, economy tweaks
	function setalphaRatio(uint256 _newRatio) external onlyOwner {
		ALPHA_RATIO = _newRatio;
	}


	// override in case if migration failure
	function setUpgradeLevel(address userAddress, uint256 hideoutLevel, uint256 policeStationLevel) external onlyOwner {
		uint256 maxBacons = (3 * hideoutLevel) + 10;
		uint256 maxCops = policeStationLevel + 3;

		stakingLevelPerAddress[userAddress] = StakingLevel({
			hideoutLevel: hideoutLevel,
			policeStationLevel: policeStationLevel,
			maxBacons: maxBacons,
			maxCops: maxCops
		});

		isStakingLevelPerAddressSet[userAddress] = true;
	}

	// withdrawal to owner
	function withdraw() external onlyOwner {
		uint256 totalBalance = address(this).balance;
		payable(owner()).transfer(totalBalance);
	}

	function reclaimERC20(IERC20 erc20Token) external onlyOwner {
		erc20Token.transfer(msg.sender, erc20Token.balanceOf(address(this)));
	}

	function reclaimERC721(IERC721 erc721Token, uint256 id) external onlyOwner {
		erc721Token.safeTransferFrom(address(this), msg.sender, id);
	}

	// UTILITY FUNCTIONS

	function _ceil(uint256 a, uint256 m) internal pure returns (uint256 r) {
		return ((a + m - 1) / m) * m;
	}

	function _isContract(address _addr) internal view returns (bool) {
		uint256 size;
		assembly {
			size := extcodesize(_addr)
		}
		return size > 0;
	}

    function delBuildNumber45() internal pure {} //etherscan trick

    // MODIFIERS

    /**
	 * tracks $GREASE earnings
	 */
	modifier _updateEarnings() {
		totalGREASEEarned +=
			((block.timestamp - lastClaimTimestamp) * totalBaconStaked * DAILY_GREASE_RATE) /
			1 days;
		lastClaimTimestamp = block.timestamp;
		_;
	}

	modifier notContract() {
		require(!_isContract(msg.sender), "Contract not allowed");
		require(msg.sender == tx.origin, "Proxy contract not allowed");
		_;
	}
}

File 2 of 12 : ERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC20/ERC20.sol)

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20, IERC20Metadata {
    mapping(address => uint256) private _balances;

    mapping(address => mapping(address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless this function is
     * overridden;
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

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

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * Requirements:
     *
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);

        uint256 currentAllowance = _allowances[sender][_msgSender()];
        require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
        unchecked {
            _approve(sender, _msgSender(), currentAllowance - amount);
        }

        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        uint256 currentAllowance = _allowances[_msgSender()][spender];
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(_msgSender(), spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `sender` to `recipient`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(
        address sender,
        address recipient,
        uint256 amount
    ) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        uint256 senderBalance = _balances[sender];
        require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[sender] = senderBalance - amount;
        }
        _balances[recipient] += amount;

        emit Transfer(sender, recipient, amount);

        _afterTokenTransfer(sender, recipient, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
        }
        _totalSupply -= amount;

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

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

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been 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 _afterTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}
}

File 3 of 12 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (access/Ownable.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev 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 {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 4 of 12 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

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

File 5 of 12 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, 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 6 of 12 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/Address.sol)

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 7 of 12 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

File 8 of 12 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (security/Pausable.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        require(!paused(), "Pausable: paused");
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        require(paused(), "Pausable: not paused");
        _;
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

File 9 of 12 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC20/IERC20.sol)

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 10 of 12 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

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

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

File 11 of 12 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/Context.sol)

pragma solidity ^0.8.0;

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

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

File 12 of 12 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

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

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

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"earned","type":"uint256"},{"indexed":false,"internalType":"bool","name":"unstaked","type":"bool"}],"name":"BaconClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"earned","type":"uint256"},{"indexed":false,"internalType":"bool","name":"unstaked","type":"bool"}],"name":"BaconCopClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TokenStaked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"ALPHA_RATIO","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DAILY_GREASE_RATE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GREASE_CLAIM_TAX_PERCENTAGE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GreasePerAlpha","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_ALPHA","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINIMUM_TO_EXIT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"Pan","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"address","name":"owner","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bacon","outputs":[{"internalType":"contract IBACON","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"bool","name":"unstake","type":"bool"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"currentStakingLevel","outputs":[{"internalType":"uint256","name":"hideoutLevel","type":"uint256"},{"internalType":"uint256","name":"policeStationLevel","type":"uint256"},{"internalType":"uint256","name":"maxBacons","type":"uint256"},{"internalType":"uint256","name":"maxCops","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"egg","outputs":[{"internalType":"contract IEGG","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fryingPanV1","outputs":[{"internalType":"contract IFRYINGPANV1","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"generatedGREASEByAddress","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"generatedGREASEByTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getBaconLevel","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getOwedGrease","outputs":[{"internalType":"uint256","name":"owed","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"grease","outputs":[{"internalType":"contract IGREASE","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"isCop","outputs":[{"internalType":"bool","name":"_isCop","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isStakingLevelPerAddressSet","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isUpgradeMigratedByAddress","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastClaimTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"migrateUpgrade","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"pack","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"address","name":"owner","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"packIndices","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"seed","type":"uint256"}],"name":"randomCopOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"erc20Token","type":"address"}],"name":"reclaimERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC721","name":"erc721Token","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"reclaimERC721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"rescue","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rescueEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_bacon","type":"address"}],"name":"setBacon","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newRate","type":"uint256"}],"name":"setDailyGreaseRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_egg","type":"address"}],"name":"setEgg","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newFryingPanV1","type":"address"}],"name":"setFryingPanV1","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_grease","type":"address"}],"name":"setGrease","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newGreaseClaimPercentage","type":"uint256"}],"name":"setGreaseClaimPercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newMinimumTimeToExit","type":"uint256"}],"name":"setMinimumTimeToExit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_setPaused","type":"bool"}],"name":"setPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newRandomizer","type":"address"}],"name":"setRandomizer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_enabled","type":"bool"}],"name":"setRescueEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newTime","type":"uint256"}],"name":"setStakeStartTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"},{"internalType":"uint256","name":"hideoutLevel","type":"uint256"},{"internalType":"uint256","name":"policeStationLevel","type":"uint256"}],"name":"setUpgradeLevel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newRatio","type":"uint256"}],"name":"setalphaRatio","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakeStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"stakedBaconCounterByAddress","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"stakedCopCounterByAddress","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"stakingLevelPerAddress","outputs":[{"internalType":"uint256","name":"hideoutLevel","type":"uint256"},{"internalType":"uint256","name":"policeStationLevel","type":"uint256"},{"internalType":"uint256","name":"maxBacons","type":"uint256"},{"internalType":"uint256","name":"maxCops","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAlphaStaked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalBaconStaked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalCopStaked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalGREASEEarned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unaccountedRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"upgradeHideoutStakingLevel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"upgradePoliceStationStakingLevel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040526103e86002556000601255600060135560006014556901760cbc623bb35000006015556202a3006016556014601755600142620000429190620000cf565b601c55601d805460ff191690553480156200005c57600080fd5b5062000068336200007f565b6000805460ff60a01b1916905560018055620000f5565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600082821015620000f057634e487b7160e01b600052601160045260246000fd5b500390565b61389280620001056000396000f3fe608060405234801561001057600080fd5b50600436106103a45760003560e01c80636f257875116101e9578063c06abfc71161010f578063dbfae0d7116100ad578063ecdfa7fb1161007c578063ecdfa7fb14610879578063eff8b44014610882578063f0903e7814610895578063f2fde38b146108a857600080fd5b8063dbfae0d714610842578063dd55fcb314610855578063e537c71114610868578063eafe9e5e1461087057600080fd5b8063c50cda12116100e9578063c50cda12146107f6578063cc1b63d514610809578063cdadcc7b1461081c578063d91dd4081461082f57600080fd5b8063c06abfc71461077e578063c0ab3d7214610791578063c0c472c0146107ed57600080fd5b806387079351116101875780639caf93a2116101565780639caf93a214610722578063b11d451c14610735578063b450afae14610748578063bd911f0c1461075b57600080fd5b806387079351146106d55780638905fd4f146106f55780638da5cb5b146107085780638e3d691b1461071957600080fd5b80637419f190116101c35780637419f19014610686578063765310081461068f578063767bcab5146106a25780637e4cc12d146106b557600080fd5b80636f25787514610662578063701794c41461066b578063715018a61461067e57600080fd5b806337a386b9116102ce5780635324a9de1161026c57806366ef53cb1161023b57806366ef53cb146106095780636a3ef0571461061c5780636b7d24701461062f5780636f234fb51461064257600080fd5b80635324a9de146105c55780635c8204d7146105ce5780635c975abb146105ee578063607af3971461060057600080fd5b80634524b659116102a85780634524b6591461058d57806346d4e1e6146105a057806348f225d5146105b45780634d36f4b3146105bd57600080fd5b806337a386b91461056f57806339db714f146105785780633ccfd60b1461058557600080fd5b8063150b7a02116103465780632244cf8f116103155780632244cf8f14610527578063258d9bce14610555578063258fc4eb1461055e5780632d4d41911461056757600080fd5b8063150b7a02146104af57806316c38b3c146104e75780631c839e3c146104fa578063201ef2a41461050d57600080fd5b80630ab22e5d116103825780630ab22e5d1461042f5780630c215cc0146104645780630fbf0a931461047957806311f722fc1461048c57600080fd5b8063065747e4146103a957806306b8ae45146103d95780630796895d1461040c575b600080fd5b6007546103bc906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6103ec6103e7366004613342565b6108bb565b6040805194855260208501939093529183015260608201526080016103d0565b61041f61041a36600461335f565b610962565b60405190151581526020016103d0565b6103ec61043d366004613342565b60086020526000908152604090208054600182015460028301546003909301549192909184565b61047761047236600461335f565b6109d6565b005b6104776104873660046133c4565b610a0e565b61041f61049a366004613342565b60116020526000908152604090205460ff1681565b6104ce6104bd366004613406565b630a85bd0160e11b95945050505050565b6040516001600160e01b031990911681526020016103d0565b6104776104f53660046134b3565b610e86565b6104776105083660046134d0565b610ec8565b610515600a81565b60405160ff90911681526020016103d0565b610547610535366004613342565b600a6020526000908152604090205481565b6040519081526020016103d0565b61054760175481565b61054760185481565b610477610f87565b61054760165481565b601d5461041f9060ff1681565b610477611193565b61047761059b36600461335f565b61120c565b6103bc6105ae36600461335f565b50600090565b61054760195481565b61047761123b565b610547601a5481565b6105476105dc36600461335f565b60106020526000908152604090205481565b600054600160a01b900460ff1661041f565b610547601b5481565b61054761061736600461335f565b61145d565b61047761062a3660046133c4565b61165b565b61047761063d366004613505565b611c61565b61054761065036600461335f565b600e6020526000908152604090205481565b61054760125481565b6005546103bc906001600160a01b031681565b610477611cf5565b610547601c5481565b61047761069d3660046134b3565b611d2b565b6104776106b0366004613342565b611d68565b6105476106c3366004613342565b600f6020526000908152604090205481565b6105476106e3366004613342565b600b6020526000908152604090205481565b610477610703366004613342565b611db4565b6000546001600160a01b03166103bc565b61054760025481565b610477610730366004613342565b611ebf565b610477610743366004613342565b611f0b565b61047761075636600461335f565b611f57565b61041f610769366004613342565b60096020526000908152604090205460ff1681565b6004546103bc906001600160a01b031681565b6107c961079f36600461335f565b600c602052600090815260409020805460018201546002909201549091906001600160a01b031683565b6040805193845260208401929092526001600160a01b0316908201526060016103d0565b61054760135481565b610477610804366004613531565b611f86565b61047761081736600461335f565b612216565b6003546103bc906001600160a01b031681565b61054761083d36600461335f565b612245565b61047761085036600461335f565b612284565b6107c9610863366004613588565b6122b3565b6104776122fe565b61054760155481565b61054760145481565b610477610890366004613342565b612516565b6104776108a3366004613342565b612562565b6104776108b6366004613342565b6125ae565b6001600160a01b038116600081815260086020908152604080832081516080810183528154815260018201548185015260028201548184015260039091015460608201529383526009909152812054909182918291829160ff166109415760405180608001604052806000815260200160008152602001600a8152602001600381525090505b80516020820151604083015160609093015191989097509195509350915050565b6003546040516394e5684760e01b8152600481018390526000916001600160a01b0316906394e56847906024016040805180830381865afa1580156109ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109cf91906135aa565b5092915050565b6000546001600160a01b03163314610a095760405162461bcd60e51b8152600401610a00906135d8565b60405180910390fd5b601755565b333b15610a2d5760405162461bcd60e51b8152600401610a009061360d565b333214610a4c5760405162461bcd60e51b8152600401610a009061363b565b600054600160a01b900460ff1615610a765760405162461bcd60e51b8152600401610a0090613672565b60026001541415610a995760405162461bcd60e51b8152600401610a009061369c565b6002600155601c544211610ada5760405162461bcd60e51b81526020600482015260086024820152676e6f74206c69766560c01b6044820152606401610a00565b600b8110610b235760405162461bcd60e51b815260206004820152601660248201527536b0bc101898103832b9103a3930b739b0b1ba34b7b760511b6044820152606401610a00565b3360009081526009602052604090205460ff16610ba0576040805160808101825260008082526020808301828152600a8486019081526003606086018181523386526008855287862096518755925160018088019190915591516002870155915194909101939093556009905291909120805460ff191690911790555b60008060005b83811015610c0b576000858583818110610bc257610bc26136d3565b905060200201359050610bd481610962565b610bea57610be36001856136ff565b9350610bf8565b610bf56001846136ff565b92505b5080610c0381613717565b915050610ba6565b5033600090815260086020908152604080832060020154600a90925290912054610c369084906136ff565b1180610c69575033600090815260086020908152604080832060030154600b90925290912054610c679083906136ff565b115b15610cea5760405162461bcd60e51b815260206004820152604560248201527f546865467279696e6750616e3a206d6178207374616b6564206c696d6974207260448201527f6561636865642e20506c656173652075706772616465207374616b696e67206c60648201526432bb32b61760d91b608482015260a401610a00565b60005b83811015610e7b576000858583818110610d0957610d096136d3565b6003546040516331a9108f60e11b8152602092909202939093013560048201819052935033926001600160a01b03169150636352211e90602401602060405180830381865afa158015610d60573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d849190613732565b6001600160a01b031614610dda5760405162461bcd60e51b815260206004820152601f60248201527f6d73672e73656e646572206e6f74206f776e6572206f6620746f6b656e4944006044820152606401610a00565b6003546040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b03909116906323b872dd90606401600060405180830381600087803b158015610e2c57600080fd5b505af1158015610e40573d6000803e3d6000fd5b50505050610e4d81610962565b610e5f57610e5a81612646565b610e68565b610e688161276b565b5080610e7381613717565b915050610ced565b505060018055505050565b6000546001600160a01b03163314610eb05760405162461bcd60e51b8152600401610a00906135d8565b80610ec057610ebd61288a565b50565b610ebd612927565b6000546001600160a01b03163314610ef25760405162461bcd60e51b8152600401610a00906135d8565b6000610eff83600361374f565b610f0a90600a6136ff565b90506000610f198360036136ff565b604080516080810182529586526020808701958652868201948552606087019283526001600160a01b0390971660009081526008885281812096518755945160018088019190915593516002870155905160039095019490945550600990935220805460ff19169091179055565b333b15610fa65760405162461bcd60e51b8152600401610a009061360d565b333214610fc55760405162461bcd60e51b8152600401610a009061363b565b600054600160a01b900460ff1615610fef5760405162461bcd60e51b8152600401610a0090613672565b600260015414156110125760405162461bcd60e51b8152600401610a009061369c565b60026001553360009081526011602052604090205460ff16156110775760405162461bcd60e51b815260206004820181905260248201527f546865467279696e6750616e56323a20616c7265616479206d696772617465646044820152606401610a00565b6007546040516306b8ae4560e01b815233600482015260009182916001600160a01b03909116906306b8ae4590602401608060405180830381865afa1580156110c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110e8919061376e565b509193509150600090506110fd83600361374f565b61110890600a6136ff565b905060006111178360036136ff565b604080516080810182529586526020808701958652868201948552606087019283523360009081526008825282812097518855955160018089019190915594516002880155915160039096019590955560098152848420805460ff19908116851790915560119091529390922080549093168117909255508055565b6000546001600160a01b031633146111bd5760405162461bcd60e51b8152600401610a00906135d8565b476111d06000546001600160a01b031690565b6001600160a01b03166108fc829081150290604051600060405180830381858888f19350505050158015611208573d6000803e3d6000fd5b5050565b6000546001600160a01b031633146112365760405162461bcd60e51b8152600401610a00906135d8565b600255565b333b1561125a5760405162461bcd60e51b8152600401610a009061360d565b3332146112795760405162461bcd60e51b8152600401610a009061363b565b600054600160a01b900460ff16156112a35760405162461bcd60e51b8152600401610a0090613672565b600260015414156112c65760405162461bcd60e51b8152600401610a009061369c565b60026001553360009081526009602052604090205460ff16611348576040805160808101825260008082526020808301828152600a8486019081526003606086018181523386526008855287862096518755925160018088019190915591516002870155915194909101939093556009905291909120805460ff191690911790555b336000908152600860205260408120600190810154611366916136ff565b905060006113758260c861374f565b6113809060c86136ff565b905061139481670de0b6b3a764000061374f565b60048054604051632770a7eb60e21b81523392810192909252602482018390529192506001600160a01b0390911690639dc29fac90604401600060405180830381600087803b1580156113e657600080fd5b505af11580156113fa573d6000803e3d6000fd5b505033600090815260086020526040902060019081015461141d935091506136ff565b33600090815260086020526040902060018082019290925560030154611442916136ff565b33600090815260086020526040902060030155505060018055565b6003546040516331a9108f60e11b81526004810183905260009130916001600160a01b0390911690636352211e90602401602060405180830381865afa1580156114ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114cf9190613732565b6001600160a01b03161461151c5760405162461bcd60e51b81526020600482015260146024820152732a37b5b2b71034b9903737ba1039ba30b5b2b21760611b6044820152606401610a00565b6000828152600c6020908152604091829020825160608101845281548152600182015492810192909252600201546001600160a01b03169181019190915261156383610962565b611599576201518060155482602001514261157e91906137a4565b611588919061374f565b61159291906137bb565b9392505050565b60006115a48461298c565b6000818152600d60209081526040808320888452600e909252909120548154929350909181106115d6576115d66136d3565b6000918252602091829020604080516060810182526003909302909101805483526001810154938301849052600201546001600160a01b03169082015260145490935061162391906137a4565b6002546103e89061163584600b6137a4565b61163f919061374f565b61164991906137bb565b611653919061374f565b949350505050565b333b1561167a5760405162461bcd60e51b8152600401610a009061360d565b3332146116995760405162461bcd60e51b8152600401610a009061363b565b600054600160a01b900460ff16156116c35760405162461bcd60e51b8152600401610a0090613672565b600260015414156116e65760405162461bcd60e51b8152600401610a009061369c565b6002600155601d5460ff1661172f5760405162461bcd60e51b815260206004820152600f60248201526e149154d0d55148111254d050931151608a1b6044820152606401610a00565b6040805160608082018352600080835260208084018290528385018290528451928301855281835282018190529281018390526000805b85811015611c5457868682818110611780576117806136d3565b90506020020135945061179285610962565b611933576000858152600c6020908152604091829020825160608101845281548152600182015492810192909252600201546001600160a01b0316918101829052945033146118235760405162461bcd60e51b815260206004820152601f60248201527f6d73672e73656e646572206973206e6f74207374616b652e6f776e65722031006044820152606401610a00565b600354604051635c46a7ef60e11b81526001600160a01b039091169063b88d4fde9061185790309033908a906004016137dd565b600060405180830381600087803b15801561187157600080fd5b505af1158015611885573d6000803e3d6000fd5b5050506000868152600c602090815260408083208381556001808201859055600290910180546001600160a01b0319169055338452600a9092528220805491935091906118d39084906137a4565b925050819055506001601960008282546118ed91906137a4565b909155505060408051600081526001602082015286917fe19b8b68d8137c08645ab07f69b3163085c2908b8a726544319224f8fb88383c910160405180910390a2611c42565b61193c8561298c565b6000818152600d60209081526040808320898452600e9092529091205481549294509091811061196e5761196e6136d3565b6000918252602091829020604080516060810182526003909302909101805483526001810154938301939093526002909201546001600160a01b031691810182905294503314611a005760405162461bcd60e51b815260206004820152601f60248201527f6d73672e73656e646572206973206e6f74207374616b652e6f776e65722032006044820152606401610a00565b8160126000828254611a1291906137a4565b9091555050600354604051635c46a7ef60e11b81526001600160a01b039091169063b88d4fde90611a4b90309033908a906004016137dd565b600060405180830381600087803b158015611a6557600080fd5b505af1158015611a79573d6000803e3d6000fd5b5050506000838152600d602052604090208054909150611a9b906001906137a4565b81548110611aab57611aab6136d3565b6000918252602080832060408051606081018252600390940290910180548452600181015484840152600201546001600160a01b031683820152858452600d8252808420898552600e9092529092205482549195508592918110611b1157611b116136d3565b60009182526020808320845160039390930201918255838101516001830155604093840151600290920180546001600160a01b0319166001600160a01b0390931692909217909155878252600e8152828220548651835283832055848252600d905220805480611b8357611b83613810565b600082815260208082206003600019909401938402018281556001818101849055600290910180546001600160a01b031916905592909355878152600e83526040808220829055338252600b909352918220805491929091611be69084906137a4565b925050819055506001601a6000828254611c0091906137a4565b909155505060408051600081526001602082015286917fb2e9ca63677b55e0d6750b3a53e5dfe5013738f39b9ef62cfd62af970b779ce3910160405180910390a25b80611c4c81613717565b915050611766565b5050600180555050505050565b6000546001600160a01b03163314611c8b5760405162461bcd60e51b8152600401610a00906135d8565b604051632142170760e11b8152306004820152336024820152604481018290526001600160a01b038316906342842e0e90606401600060405180830381600087803b158015611cd957600080fd5b505af1158015611ced573d6000803e3d6000fd5b505050505050565b6000546001600160a01b03163314611d1f5760405162461bcd60e51b8152600401610a00906135d8565b611d2960006129fd565b565b6000546001600160a01b03163314611d555760405162461bcd60e51b8152600401610a00906135d8565b601d805460ff1916911515919091179055565b6000546001600160a01b03163314611d925760405162461bcd60e51b8152600401610a00906135d8565b600680546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314611dde5760405162461bcd60e51b8152600401610a00906135d8565b6040516370a0823160e01b81523060048201526001600160a01b0382169063a9059cbb90339083906370a0823190602401602060405180830381865afa158015611e2c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e509190613826565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015611e9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611208919061383f565b6000546001600160a01b03163314611ee95760405162461bcd60e51b8152600401610a00906135d8565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314611f355760405162461bcd60e51b8152600401610a00906135d8565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314611f815760405162461bcd60e51b8152600401610a00906135d8565b601555565b333b15611fa55760405162461bcd60e51b8152600401610a009061360d565b333214611fc45760405162461bcd60e51b8152600401610a009061363b565b62015180601554601954601b5442611fdc91906137a4565b611fe6919061374f565b611ff0919061374f565b611ffa91906137bb565b6018600082825461200b91906136ff565b909155505042601b55600054600160a01b900460ff161561203e5760405162461bcd60e51b8152600401610a0090613672565b600260015414156120615760405162461bcd60e51b8152600401610a009061369c565b60026001556000805b8381101561210b57612093858583818110612087576120876136d3565b90506020020135610962565b6120ca576120b98585838181106120ac576120ac6136d3565b9050602002013584612a4d565b6120c390836136ff565b91506120f9565b6120ec8585838181106120df576120df6136d3565b9050602002013584612de1565b6120f690836136ff565b91505b8061210381613717565b91505061206a565b50600560009054906101000a90046001600160a01b03166001600160a01b0316639c47ee3b6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561215c57600080fd5b505af1158015612170573d6000803e3d6000fd5b505050508060001461220c576005546040516340c10f1960e01b8152336004820152602481018390526001600160a01b03909116906340c10f1990604401600060405180830381600087803b1580156121c857600080fd5b505af11580156121dc573d6000803e3d6000fd5b5050336000908152600f60205260409020546121fb92508391506136ff565b336000908152600f60205260409020555b5050600180555050565b6000546001600160a01b031633146122405760405162461bcd60e51b8152600401610a00906135d8565b601c55565b60008181526010602052604081205461227e9061226590614e20906137bb565b6122709060016136ff565b670de0b6b3a76400006132a6565b92915050565b6000546001600160a01b031633146122ae5760405162461bcd60e51b8152600401610a00906135d8565b601655565b600d60205281600052604060002081815481106122cf57600080fd5b60009182526020909120600390910201805460018201546002909201549093509091506001600160a01b031683565b333b1561231d5760405162461bcd60e51b8152600401610a009061360d565b33321461233c5760405162461bcd60e51b8152600401610a009061363b565b600054600160a01b900460ff16156123665760405162461bcd60e51b8152600401610a0090613672565b600260015414156123895760405162461bcd60e51b8152600401610a009061369c565b60026001553360009081526009602052604090205460ff1661240b576040805160808101825260008082526020808301828152600a8486019081526003606086018181523386526008855287862096518755925160018088019190915591516002870155915194909101939093556009905291909120805460ff191690911790555b336000908152600860205260408120546124269060016136ff565b905060006124358260c861374f565b6124409060c86136ff565b905061245481670de0b6b3a764000061374f565b60048054604051632770a7eb60e21b81523392810192909252602482018390529192506001600160a01b0390911690639dc29fac90604401600060405180830381600087803b1580156124a657600080fd5b505af11580156124ba573d6000803e3d6000fd5b5050336000908152600860205260409020546124da9250905060016136ff565b336000908152600860205260409020908155600201546124fb9060036136ff565b33600090815260086020526040902060020155505060018055565b6000546001600160a01b031633146125405760405162461bcd60e51b8152600401610a00906135d8565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461258c5760405162461bcd60e51b8152600401610a00906135d8565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146125d85760405162461bcd60e51b8152600401610a00906135d8565b6001600160a01b03811661263d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a00565b610ebd816129fd565b62015180601554601954601b544261265e91906137a4565b612668919061374f565b612672919061374f565b61267c91906137bb565b6018600082825461268d91906136ff565b909155505042601b819055604080516060810182528381526020808201938452338284019081526000868152600c9092529281209151825592516001808301919091559151600290910180546001600160a01b0319166001600160a01b0390921691909117905560198054919290916127079084906136ff565b9091555050336000908152600a6020526040812080546001929061272c9084906136ff565b9091555050604051428152819033907f6173e4d2d9dd52aae0ed37afed3adcf924a490639b759ca93d32dc43366c17d29060200160405180910390a350565b60006127768261298c565b9050806012600082825461278a91906136ff565b925050819055506001601a60008282546127a491906136ff565b90915550506000818152600d602081815260408084208054878652600e845282862081905593835281516060810183528781526014548185019081523382850181815260018089018655948952868920935160039098029093019687559051868401559051600290950180546001600160a01b0319166001600160a01b0390961695909517909455928452600b90915282208054919290916128479084906136ff565b9091555050601454604051908152829033907f6173e4d2d9dd52aae0ed37afed3adcf924a490639b759ca93d32dc43366c17d29060200160405180910390a35050565b600054600160a01b900460ff166128da5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610a00565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600054600160a01b900460ff16156129515760405162461bcd60e51b8152600401610a0090613672565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861290a3390565b6003546040516394e5684760e01b81526004810183905260009182916001600160a01b03909116906394e56847906024016040805180830381865afa1580156129d9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061165391906135aa565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000828152600c60209081526040808320815160608101835281548152600182015493810193909352600201546001600160a01b03169082018190523314612ad75760405162461bcd60e51b815260206004820152601a60248201527f6d73672e73656e646572206e6f74207374616b652e6f776e65720000000000006044820152606401610a00565b6016546020820151612ae990426137a4565b1015612b4f5760405162461bcd60e51b815260206004820152602f60248201527f626c6f636b2e74696d657374616d70202d207374616b652e76616c7565203c2060448201526e1352539253555357d513d7d1561255608a1b6064820152608401610a00565b612b588461145d565b91508215612cc557600654604051631ca6415360e21b815260006004820152606460248201819052604482018790526032926001600160a01b031691637299054c9101602060405180830381865afa158015612bb8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bdc9190613826565b1115612bf057612beb826132d4565b600091505b600354604051635c46a7ef60e11b81526001600160a01b039091169063b88d4fde90612c24903090339089906004016137dd565b600060405180830381600087803b158015612c3e57600080fd5b505af1158015612c52573d6000803e3d6000fd5b5050506000858152600c602090815260408083208381556001808201859055600290910180546001600160a01b0319169055338452600a909252822080549193509190612ca09084906137a4565b92505081905550600160196000828254612cba91906137a4565b90915550612d679050565b612ce7606460175484612cd8919061374f565b612ce291906137bb565b6132d4565b60646017546064612cf891906137a4565b612d02908461374f565b612d0c91906137bb565b604080516060810182528681524260208083019182523383850190815260008a8152600c909252939020915182555160018201559051600290910180546001600160a01b0319166001600160a01b0390921691909117905591505b600084815260106020526040902054612d819083906136ff565b60008581526010602052604090819020919091555184907fe19b8b68d8137c08645ab07f69b3163085c2908b8a726544319224f8fb88383c90612dd290859087909182521515602082015260400190565b60405180910390a25092915050565b6003546040516331a9108f60e11b81526004810184905260009130916001600160a01b0390911690636352211e90602401602060405180830381865afa158015612e2f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e539190613732565b6001600160a01b031614612ea95760405162461bcd60e51b815260206004820152601760248201527f41494e5420412050415254204f4620544845205041434b0000000000000000006044820152606401610a00565b6000612eb48461298c565b6000818152600d60209081526040808320888452600e909252822054815493945091929091908110612ee857612ee86136d3565b6000918252602091829020604080516060810182526003909302909101805483526001810154938301939093526002909201546001600160a01b031691810182905291503314612f7a5760405162461bcd60e51b815260206004820152601f60248201527f6d73672e73656e646572206973206e6f74207374616b652e6f776e65722030006044820152606401610a00565b612f838561145d565b92508315613198578160126000828254612f9d91906137a4565b9091555050600354604051635c46a7ef60e11b81526001600160a01b039091169063b88d4fde90612fd690309033908a906004016137dd565b600060405180830381600087803b158015612ff057600080fd5b505af1158015613004573d6000803e3d6000fd5b5050506000838152600d60205260408120805491925090613027906001906137a4565b81548110613037576130376136d3565b6000918252602080832060408051606081018252600390940290910180548452600181015484840152600201546001600160a01b031683820152868452600d82528084208a8552600e909252909220548254919350839291811061309d5761309d6136d3565b60009182526020808320845160039390930201918255838101516001830155604093840151600290920180546001600160a01b0319166001600160a01b0390931692909217909155888252600e8152828220548451835283832055858252600d90522080548061310f5761310f613810565b600082815260208082206003600019909401938402018281556001818101849055600290910180546001600160a01b031916905592909355888152600e83526040808220829055338252600b9093529182208054919290916131729084906137a4565b925050819055506001601a600082825461318c91906137a4565b9091555061322b915050565b6040805160608101825286815260145460208083019190915233828401526000858152600d8252838120898252600e9092529290922054825491929181106131e2576131e26136d3565b6000918252602091829020835160039290920201908155908201516001820155604090910151600290910180546001600160a01b0319166001600160a01b039092169190911790555b6000858152601060205260409020546132459084906136ff565b60008681526010602052604090819020919091555185907fb2e9ca63677b55e0d6750b3a53e5dfe5013738f39b9ef62cfd62af970b779ce39061329690869088909182521515602082015260400190565b60405180910390a2505092915050565b6000818060016132b682876136ff565b6132c091906137a4565b6132ca91906137bb565b611592919061374f565b6012546132f55780601360008282546132ed91906136ff565b909155505050565b60125460135461330590836136ff565b61330f91906137bb565b6014600082825461332091906136ff565b9091555050600060135550565b6001600160a01b0381168114610ebd57600080fd5b60006020828403121561335457600080fd5b81356115928161332d565b60006020828403121561337157600080fd5b5035919050565b60008083601f84011261338a57600080fd5b50813567ffffffffffffffff8111156133a257600080fd5b6020830191508360208260051b85010111156133bd57600080fd5b9250929050565b600080602083850312156133d757600080fd5b823567ffffffffffffffff8111156133ee57600080fd5b6133fa85828601613378565b90969095509350505050565b60008060008060006080868803121561341e57600080fd5b85356134298161332d565b945060208601356134398161332d565b935060408601359250606086013567ffffffffffffffff8082111561345d57600080fd5b818801915088601f83011261347157600080fd5b81358181111561348057600080fd5b89602082850101111561349257600080fd5b9699959850939650602001949392505050565b8015158114610ebd57600080fd5b6000602082840312156134c557600080fd5b8135611592816134a5565b6000806000606084860312156134e557600080fd5b83356134f08161332d565b95602085013595506040909401359392505050565b6000806040838503121561351857600080fd5b82356135238161332d565b946020939093013593505050565b60008060006040848603121561354657600080fd5b833567ffffffffffffffff81111561355d57600080fd5b61356986828701613378565b909450925050602084013561357d816134a5565b809150509250925092565b6000806040838503121561359b57600080fd5b50508035926020909101359150565b600080604083850312156135bd57600080fd5b82516135c8816134a5565b6020939093015192949293505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526014908201527310dbdb9d1c9858dd081b9bdd08185b1b1bddd95960621b604082015260600190565b6020808252601a908201527f50726f787920636f6e7472616374206e6f7420616c6c6f776564000000000000604082015260600190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008219821115613712576137126136e9565b500190565b600060001982141561372b5761372b6136e9565b5060010190565b60006020828403121561374457600080fd5b81516115928161332d565b6000816000190483118215151615613769576137696136e9565b500290565b6000806000806080858703121561378457600080fd5b505082516020840151604085015160609095015191969095509092509050565b6000828210156137b6576137b66136e9565b500390565b6000826137d857634e487b7160e01b600052601260045260246000fd5b500490565b6001600160a01b039384168152919092166020820152604081019190915260806060820181905260009082015260a00190565b634e487b7160e01b600052603160045260246000fd5b60006020828403121561383857600080fd5b5051919050565b60006020828403121561385157600080fd5b8151611592816134a556fea2646970667358221220ba9ce95f110b488cd200dd7d7c7c9c9746158320b1a41ba9966b32571dcc64da64736f6c634300080c0033

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