ETH Price: $2,865.30 (-2.65%)

Contract

0xaDB7C30AaEEfe88Ae95a72C75065394dE7bB835A
 

Overview

ETH Balance

0 ETH

ETH Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To
Claim My Contrac...19687882024-04-10 11:09:51655 days ago1712747391IN
0xaDB7C30A...dE7bB835A
0 ETH0.000021350.00073771
Claim Bosses Or ...3589382024-03-04 4:48:11693 days ago1709527691IN
0xaDB7C30A...dE7bB835A
0 ETH0.00009210.001
Set Paused3587682024-03-04 4:42:31693 days ago1709527351IN
0xaDB7C30A...dE7bB835A
0 ETH0.000107991.50000026
Stake Bosses Or ...3587612024-03-04 4:42:17693 days ago1709527337IN
0xaDB7C30A...dE7bB835A
0 ETH0.000327921.50000026
Claim Bosses Or ...3587442024-03-04 4:41:43693 days ago1709527303IN
0xaDB7C30A...dE7bB835A
0 ETH0.000115461.50000026
Claim Bosses Or ...3587242024-03-04 4:41:03693 days ago1709527263IN
0xaDB7C30A...dE7bB835A
0 ETH0.00011211.50000026
Claim Bosses Or ...3587152024-03-04 4:40:45693 days ago1709527245IN
0xaDB7C30A...dE7bB835A
0 ETH0.00011211.50000026
Claim Bosses Or ...3587142024-03-04 4:40:43693 days ago1709527243IN
0xaDB7C30A...dE7bB835A
0 ETH0.000112931.50000026
Claim Bosses Or ...3586972024-03-04 4:40:09693 days ago1709527209IN
0xaDB7C30A...dE7bB835A
0 ETH0.000225751.50000026
Claim Bosses Or ...3586902024-03-04 4:39:55693 days ago1709527195IN
0xaDB7C30A...dE7bB835A
0 ETH0.000076140.003
Claim Bosses Or ...3586872024-03-04 4:39:49693 days ago1709527189IN
0xaDB7C30A...dE7bB835A
0 ETH0.000126922.00000026
Claim Bosses Or ...3586842024-03-04 4:39:43693 days ago1709527183IN
0xaDB7C30A...dE7bB835A
0 ETH0.000073320.002
Claim Bosses Or ...3586782024-03-04 4:39:31693 days ago1709527171IN
0xaDB7C30A...dE7bB835A
0 ETH0.000116791.50000026
Stake Bosses Or ...3586642024-03-04 4:39:03693 days ago1709527143IN
0xaDB7C30A...dE7bB835A
0 ETH0.000335461.50000026
Claim Bosses Or ...3586482024-03-04 4:38:31693 days ago1709527111IN
0xaDB7C30A...dE7bB835A
0 ETH0.000111661.50000026
Stake Bosses Or ...3586392024-03-04 4:38:13693 days ago1709527093IN
0xaDB7C30A...dE7bB835A
0 ETH0.000335651.50000026
Claim Bosses Or ...3586262024-03-04 4:37:47693 days ago1709527067IN
0xaDB7C30A...dE7bB835A
0 ETH0.000074550.002
Claim Bosses Or ...3586172024-03-04 4:37:29693 days ago1709527049IN
0xaDB7C30A...dE7bB835A
0 ETH0.000105931.50000026
Claim Bosses Or ...3586112024-03-04 4:37:17693 days ago1709527037IN
0xaDB7C30A...dE7bB835A
0 ETH0.000111371.50000026
Claim Bosses Or ...3586082024-03-04 4:37:11693 days ago1709527031IN
0xaDB7C30A...dE7bB835A
0 ETH0.000111371.50000026
Claim Bosses Or ...3586002024-03-04 4:36:55693 days ago1709527015IN
0xaDB7C30A...dE7bB835A
0 ETH0.000112981.50000026
Stake Bosses Or ...3586002024-03-04 4:36:55693 days ago1709527015IN
0xaDB7C30A...dE7bB835A
0 ETH0.000325161.50000026
Stake Bosses Or ...3585932024-03-04 4:36:41693 days ago1709527001IN
0xaDB7C30A...dE7bB835A
0 ETH0.000326791.50000026
Claim Bosses Or ...3585892024-03-04 4:36:33693 days ago1709526993IN
0xaDB7C30A...dE7bB835A
0 ETH0.000115421.50000026
Stake Bosses Or ...3585752024-03-04 4:36:05693 days ago1709526965IN
0xaDB7C30A...dE7bB835A
0 ETH0.00034321.50000026
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:

Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
PulseCity

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;

import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {Pausable} from "@openzeppelin/contracts/utils/Pausable.sol";
import {IBlastRunners} from "./interfaces/IBlastRunners.sol";
import {IBusiness} from "./interfaces/IBusiness.sol";
import {ICredits} from "./interfaces/ICredits.sol";
import {IERC721Receiver} from "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import {IBlast} from "./interfaces/IBlast.sol";
import {IBlastPoints} from "./interfaces/IBlastPoints.sol";

/**
 * @title staking contract of the blastrunners game
 */
contract PulseCity is Ownable, Pausable, IERC721Receiver {
    error PulseCity__UserDoesNotOwnBusiness();
    error PulseCity__UserDoesNotOperateBusiness();
    error PulseCity__MaxEmploymentsPerBusinessReached();
    error PulseCity__UserDoesNotOwnToken();
    error PulseCity__TokenHasToBeRevealed();
    error PulseCity__InvalidToken();
    error PulseCity__WorkerNeedsBusiness();
    error PulseCity__BusinessStillOperating();
    error PulseCity__NotAWorker();
    error PulseCity__TokenNotUnstakable();
    error PulseCity__MaxCreditsReached();
    error PulseCity__EdgeRunnerNotStaked();
    error PulseCity__RescueNotEnabled();

    event TokenStaked(address owner, uint256 tokenId, uint256 value);
    event BossClaimed(uint256 tokenId, uint256 claimedCredits, bool unstaked);
    event EdgeRunnerClaimed(uint256 tokenId, uint256 claimedCredits, bool unstaked);
    event BusinessOpened(uint256 tokenId);
    event BusinessClosed(uint256 tokenId);
    event WorkerClaimed(uint256 tokenId, uint256 claimedCredits, bool unstaked);

    struct Stake {
        uint256 tokenId;
        address owner;
        uint80 value;
    }

    IBlast public constant BLAST = IBlast(0x4300000000000000000000000000000000000002);
    IBlastPoints public blastPoints;
    IBlastRunners public immutable blastRunners;
    IBusiness public immutable business;
    ICredits public immutable credits;

    uint256 public constant MAXIMUM_CREDITS = 1_000_000_000 ether;
    uint256 public constant MINIMUM_TIME_TO_UNSTAKE_BOSS = 2 days;
    uint256 public constant MINIMUM_TIME_TO_UNSTAKE_WORKER = 3 days;
    uint256 public constant BOSS_DAILY_CREDITS_RATE = 7500 ether;
    uint256 public constant WORKER_DAILY_CREDITS_RATE = 5000 ether;
    uint256 public constant BOSS_CLAIM_TAX_PERCENTAGE = 15;
    uint256 public constant WORKER_CLAIM_TAX_PERCENTAGE = 20;
    uint256 public constant MAX_WORKERS_PER_BUSINESS = 3;
    uint256 public totalBossesStaked;
    uint256 public totalEdgeRunnersStaked;
    uint256 public totalBusinessesStaked;
    uint256 public totalCreditsEarned;
    uint256 public unaccountedRewards;
    uint256 public creditsPerEdgeRunner;

    bool public rescueEnabled;

    uint256[] public stakedBosses;
    uint256[] public stakedEdgeRunners;

    mapping(uint256 tokenId => Stake) public tokenIdToStake;
    mapping(address owner => uint256[] tokenIds) public tokensByOwner;
    mapping(uint256 tokenId => address owner) public businessToOwner;
    mapping(uint256 tokenId => Stake[] stakedWorkers) public businessToWorkers;

    constructor(address _blastPointsAddress, address _pointsOperator, address _blastRunnersAddress, address _businessAddress, address _creditsAddress) Ownable(msg.sender) {
        blastRunners = IBlastRunners(_blastRunnersAddress);
        business = IBusiness(_businessAddress);
        credits = ICredits(_creditsAddress);

        // contract will be able to claim gas fees
        BLAST.configureClaimableGas();

        // configure contract to be able to distribute blast points back to stakers/LPers
        IBlastPoints(_blastPointsAddress).configurePointsOperator(_pointsOperator);
    }

    /**
     * @notice stake bosses and edgerunners
     * @param _tokenIds tokenIds to stake
     */
    function stakeBossesOrEdgerunners(uint256[] memory _tokenIds) external whenNotPaused {
        uint256 numTokens = _tokenIds.length;

        for (uint256 i; i < numTokens; i++) {
            uint256 tokenId = _tokenIds[i];

            if (isWorker(tokenId)) {
                revert PulseCity__WorkerNeedsBusiness();
            }

            if (tokenId == 0) {
                // there may be gaps in the array
                continue;
            }

            if (blastRunners.ownerOf(tokenId) != msg.sender) {
                revert PulseCity__UserDoesNotOwnToken();
            }

            blastRunners.transferFrom(msg.sender, address(this), tokenId);

            if (isBoss(tokenId)) {
                _addBossToPulseCity(msg.sender, tokenId);
            } else if (isEdgerunner(tokenId)) {
                _addEdgeRunnerToPulseCity(msg.sender, tokenId);
            } else {
                revert PulseCity__TokenHasToBeRevealed();
            }

            _addTokenToOwner(msg.sender, tokenId);
        }
    }

    /**
     * @notice stake a business
     * @param _tokenId tokenId of the business
     */
    function openBusiness(uint256 _tokenId) external whenNotPaused {
        if (business.ownerOf(_tokenId) != msg.sender) {
            revert PulseCity__UserDoesNotOwnBusiness();
        }

        totalBusinessesStaked++;
        businessToOwner[_tokenId] = msg.sender;

        business.transferFrom(msg.sender, address(this), _tokenId);

        emit BusinessOpened(_tokenId);
    }

    /**
     * @notice stake workers to a business
     * @param _tokenIds tokenIds of the workers
     * @param _businessId tokenId of the business
     */
    function addWorkersToBusiness(uint256[] memory _tokenIds, uint256 _businessId) external whenNotPaused {
        if (businessToOwner[_businessId] != msg.sender) {
            revert PulseCity__UserDoesNotOperateBusiness();
        }

        uint256 workers = _tokenIds.length;
        uint256 stakedWorkers = businessToWorkers[_businessId].length;

        if (stakedWorkers + workers > MAX_WORKERS_PER_BUSINESS) {
            revert PulseCity__MaxEmploymentsPerBusinessReached();
        }

        for (uint256 i; i < workers; i++) {
            uint256 tokenId = _tokenIds[i];

            if (!isWorker(tokenId)) {
                revert PulseCity__NotAWorker();
            }

            if (blastRunners.ownerOf(tokenId) != msg.sender) {
                revert PulseCity__UserDoesNotOwnToken();
            }

            tokenIdToStake[tokenId] = Stake({tokenId: tokenId, owner: msg.sender, value: uint80(block.timestamp)});

            businessToWorkers[_businessId].push(tokenIdToStake[tokenId]);

            blastRunners.transferFrom(msg.sender, address(this), tokenId);
        }
    }

    /**
     * @notice claim/unstake workers from a business
     * @param _tokenId tokenId of the business
     */
    function claimBusiness(uint256 _tokenId, bool _unstake) external whenNotPaused {
        if (businessToOwner[_tokenId] != msg.sender) {
            revert PulseCity__UserDoesNotOperateBusiness();
        }

        uint256 creditsOwed;

        Stake[] memory stakedWorkers = businessToWorkers[_tokenId];
        uint256 numWorkers = stakedWorkers.length;

        for (uint256 i; i < numWorkers; i++) {
            uint256 tokenId = stakedWorkers[i].tokenId;

            creditsOwed += _claimWorker(tokenId, _unstake);
        }

        if (_unstake) {
            delete businessToWorkers[_tokenId];
        }

        if (creditsOwed == 0) return;
        credits.mint(msg.sender, creditsOwed);
    }

    /**
     * @notice unstake a business
     * @notice this only works if there are no workers staked with the business
     * @param _tokenId tokenId of the business
     */
    function closeBusiness(uint256 _tokenId) external whenNotPaused {
        if (businessToOwner[_tokenId] != msg.sender) {
            revert PulseCity__UserDoesNotOperateBusiness();
        }

        if (businessToWorkers[_tokenId].length != 0) {
            revert PulseCity__BusinessStillOperating();
        }

        delete businessToOwner[_tokenId];

        business.transferFrom(address(this), msg.sender, _tokenId);

        emit BusinessClosed(_tokenId);
    }

    /**
     * @notice claim/unstake bosses and edgerunners
     * @param _tokenIds tokenIds of the bosses and edgerunners to claim / unstake
     * @param _unstake boolean value that specifies if the user wants to unstake their tokens
     */
    function claimBossesOrEdgerunners(uint256[] memory _tokenIds, bool _unstake) external whenNotPaused {
        uint256 creditsOwed;

        uint256 numTokens = _tokenIds.length;

        for (uint256 i; i < numTokens; i++) {
            uint256 tokenId = _tokenIds[i];

            if (isBoss(tokenId)) {
                creditsOwed += _claimBossFromPulseCity(tokenId, _unstake);
            } else if (isEdgerunner(tokenId)) {
                creditsOwed += _claimEdgeRunnerFromPulseCity(tokenId, _unstake);
            }

            if (_unstake) {
                _removeTokenFromOwner(msg.sender, tokenId);
            }
        }

        if (creditsOwed == 0) return;
        credits.mint(msg.sender, creditsOwed);
    }

    function rescueBossesOrEdgerunners(uint256[] memory _tokenIds) external {
        if (!rescueEnabled) {
            revert PulseCity__RescueNotEnabled();
        }

        uint256 numTokens = _tokenIds.length;

        for (uint256 i; i < numTokens; i++) {
            uint256 tokenId = _tokenIds[i];
            Stake memory stake = tokenIdToStake[tokenId];

            if (stake.owner != msg.sender) {
                revert PulseCity__UserDoesNotOwnToken();
            }

            if (isBoss(tokenId)) {
                totalEdgeRunnersStaked--;
                delete tokenIdToStake[tokenId];
                blastRunners.transferFrom(address(this), msg.sender, tokenId);
                emit EdgeRunnerClaimed(tokenId, 0, true);
            } else if (isEdgerunner(tokenId)) {
                totalBossesStaked--;
                delete tokenIdToStake[tokenId];

                blastRunners.transferFrom(address(this), msg.sender, tokenId);

                emit BossClaimed(tokenId, 0, true);
            } else {
                continue;
            }

            _removeTokenFromOwner(msg.sender, tokenId);
        }
    }

    function rescueBusinessWithWorkers(uint256 _tokenId) external {
        if (!rescueEnabled) {
            revert PulseCity__RescueNotEnabled();
        }

        if (businessToOwner[_tokenId] != msg.sender) {
            revert PulseCity__UserDoesNotOperateBusiness();
        }

        Stake[] memory stakedWorkers = businessToWorkers[_tokenId];
        uint256 numWorkers = stakedWorkers.length;

        for (uint256 i; i < numWorkers; i++) {
            uint256 tokenId = stakedWorkers[i].tokenId;

            blastRunners.transferFrom(address(this), msg.sender, tokenId);
        }

        delete businessToWorkers[_tokenId];
        delete businessToOwner[_tokenId];

        business.transferFrom(address(this), msg.sender, _tokenId);

        emit BusinessClosed(_tokenId);
    }

    /**
     * @notice enable "rescue mode" to simplify accounting and get tokens out in an emergency
     * @param _enabled enabled status
     */
    function setRescueEnabled(bool _enabled) external onlyOwner {
        rescueEnabled = _enabled;
    }

    /**
     * @notice admin setter function to set the paused status
     * @param _paused paused status
     */
    function setPaused(bool _paused) external onlyOwner {
        if (_paused) {
            _pause();
        } else {
            _unpause();
        }
    }

    /**
     * @notice claim gas fees spent on this contract
     */
    function claimMyContractsGas() external onlyOwner {
        BLAST.claimAllGas(address(this), msg.sender);
    }

    function onERC721Received(address, address from, uint256, bytes calldata) external pure returns (bytes4) {
        require(from == address(0x0), "Cannot send tokens to Pulse City directly");
        return IERC721Receiver.onERC721Received.selector;
    }

    /**
     * @notice checks wether a token is a boss
     * @param _tokenId tokenId of the nft
     */
    function isBoss(uint256 _tokenId) public view returns (bool) {
        IBlastRunners.NftType nftType = blastRunners.getNftType(_tokenId);

        if (nftType == IBlastRunners.NftType.BOSS) {
            return true;
        } else {
            return false;
        }
    }

    /**
     * @notice checks wether a token is an edgerunner
     * @param _tokenId tokenId of the nft
     */
    function isEdgerunner(uint256 _tokenId) public view returns (bool) {
        IBlastRunners.NftType nftType = blastRunners.getNftType(_tokenId);

        if (nftType == IBlastRunners.NftType.EDGERUNNER) {
            return true;
        } else {
            return false;
        }
    }

    /**
     * @notice checks wether a token is a worker
     * @param _tokenId tokenId of the nft
     */
    function isWorker(uint256 _tokenId) public view returns (bool) {
        IBlastRunners.NftType nftType = blastRunners.getNftType(_tokenId);

        if (nftType == IBlastRunners.NftType.WORKER) {
            return true;
        } else {
            return false;
        }
    }

    function randomBossOwner(uint256 _seed) public view returns (address) {
        if (totalBossesStaked == 0) {
            return address(0);
        }

        uint256 index = _seed % totalBossesStaked;

        uint256 tokenId = stakedBosses[index];

        address owner = blastRunners.ownerOf(tokenId);

        if (owner == address(this)) {
            return tokenIdToStake[tokenId].owner;
        } else {
            return address(0);
        }
    }

    /**
     * @notice returns the owner of a pseudo-randomly chosen edgerunner from all staked edgerunners
     * @param _seed seed value used for rng
     */
    function randomEdgeRunnerOwner(uint256 _seed) public view returns (address) {
        if (totalEdgeRunnersStaked == 0) {
            return address(0);
        }

        uint256 index = _seed % totalEdgeRunnersStaked;

        uint256 tokenId = stakedEdgeRunners[index];

        address owner = blastRunners.ownerOf(tokenId);

        if (owner == address(this)) {
            return tokenIdToStake[tokenId].owner;
        } else {
            return address(0);
        }
    }

    function _addTokenToOwner(address _account, uint256 _tokenId) internal {
        uint256[] storage tokenIds = tokensByOwner[_account];
        tokenIds.push(_tokenId);
    }

    function _removeTokenFromOwner(address _account, uint256 _tokenId) internal {
        uint256[] storage tokenIds = tokensByOwner[_account];
        uint256 numTokens = tokenIds.length;

        for (uint256 i = 0; i < numTokens; i++) {
            uint256 tokenId = tokenIds[i];

            if (tokenId == _tokenId) {
                tokenIds[i] = tokenIds[tokenIds.length - 1];
                tokenIds.pop();
            }
        }
    }

    function _addBossToPulseCity(address _account, uint256 _tokenId) internal {
        tokenIdToStake[_tokenId] = Stake({owner: _account, tokenId: _tokenId, value: uint80(block.timestamp)});

        totalBossesStaked++;

        stakedBosses.push(_tokenId);

        emit TokenStaked(_account, _tokenId, block.timestamp);
    }

    function _addEdgeRunnerToPulseCity(address _account, uint256 _tokenId) internal {
        tokenIdToStake[_tokenId] = Stake({owner: _account, tokenId: _tokenId, value: uint80(creditsPerEdgeRunner)});

        totalEdgeRunnersStaked++;

        stakedEdgeRunners.push(_tokenId);

        emit TokenStaked(_account, _tokenId, block.timestamp);
    }

    function _claimBossFromPulseCity(uint256 _tokenId, bool _unstake) internal returns (uint256 creditsOwed) {
        Stake memory stake = tokenIdToStake[_tokenId];

        if (stake.owner != msg.sender) {
            revert PulseCity__UserDoesNotOwnToken();
        }

        creditsOwed = ((block.timestamp - stake.value) * BOSS_DAILY_CREDITS_RATE) / 1 days;

        totalCreditsEarned += creditsOwed;

        if (totalCreditsEarned > MAXIMUM_CREDITS) {
            revert PulseCity__MaxCreditsReached();
        }

        if (_unstake) {
            if (block.timestamp - stake.value < MINIMUM_TIME_TO_UNSTAKE_BOSS) {
                revert PulseCity__TokenNotUnstakable();
            }

            if (random(_tokenId) < 35) {
                _payEdgeRunnerTax(creditsOwed);
                creditsOwed = 0;
            }

            totalBossesStaked--;
            delete tokenIdToStake[_tokenId];

            blastRunners.transferFrom(address(this), msg.sender, _tokenId);
        } else {
            _payEdgeRunnerTax((creditsOwed * BOSS_CLAIM_TAX_PERCENTAGE) / 100);
            creditsOwed = (creditsOwed * (100 - BOSS_CLAIM_TAX_PERCENTAGE)) / 100;

            tokenIdToStake[_tokenId] = Stake({owner: msg.sender, tokenId: _tokenId, value: uint80(block.timestamp)});
        }

        emit BossClaimed(_tokenId, creditsOwed, _unstake);
    }

    function _claimEdgeRunnerFromPulseCity(uint256 _tokenId, bool _unstake) internal returns (uint256 creditsOwed) {
        Stake memory stake = tokenIdToStake[_tokenId];
        if (stake.owner != msg.sender) {
            revert PulseCity__UserDoesNotOwnToken();
        }

        creditsOwed = creditsPerEdgeRunner - stake.value;
        if (_unstake) {
            totalEdgeRunnersStaked--;
            delete tokenIdToStake[_tokenId];
            blastRunners.transferFrom(address(this), msg.sender, _tokenId);
        } else {
            tokenIdToStake[_tokenId] =
                Stake({owner: msg.sender, tokenId: _tokenId, value: uint80(creditsPerEdgeRunner)});
        }

        emit EdgeRunnerClaimed(_tokenId, creditsOwed, _unstake);
    }

    function _claimWorker(uint256 _tokenId, bool _unstake) internal returns (uint256 creditsOwed) {
        Stake memory stake = tokenIdToStake[_tokenId];

        uint256[] memory tokenIdsStaked = tokensByOwner[msg.sender];

        uint256 numberTokensStaked = tokenIdsStaked.length;

        uint256 creditsMultiplier;

        for (uint256 i; i < numberTokensStaked; i++) {
            uint256 tokenId = tokenIdsStaked[i];

            if (creditsMultiplier == 30) {
                break;
            }
            if (isBoss(tokenId)) {
                creditsMultiplier += 10;
            }
        }

        creditsOwed = ((block.timestamp - stake.value) * WORKER_DAILY_CREDITS_RATE) / 1 days;
        creditsOwed = creditsOwed + ((creditsOwed * creditsMultiplier) / 100);

        totalCreditsEarned += creditsOwed;

        if (totalCreditsEarned > MAXIMUM_CREDITS) {
            revert PulseCity__MaxCreditsReached();
        }

        if (_unstake) {
            if (block.timestamp - stake.value < MINIMUM_TIME_TO_UNSTAKE_WORKER) {
                revert PulseCity__TokenNotUnstakable();
            }

            if (random(_tokenId) < 50) {
                _payEdgeRunnerTax(creditsOwed);
                creditsOwed = 0;
            }

            delete tokenIdToStake[_tokenId];

            blastRunners.transferFrom(address(this), msg.sender, _tokenId);
        } else {
            _payEdgeRunnerTax((creditsOwed * WORKER_CLAIM_TAX_PERCENTAGE) / 100);
            creditsOwed = (creditsOwed * (100 - WORKER_CLAIM_TAX_PERCENTAGE)) / 100;

            tokenIdToStake[_tokenId] = Stake({owner: msg.sender, tokenId: _tokenId, value: uint80(block.timestamp)});
        }

        emit WorkerClaimed(_tokenId, creditsOwed, _unstake);
    }

    function _payEdgeRunnerTax(uint256 _amount) internal {
        if (totalEdgeRunnersStaked == 0) {
            unaccountedRewards += _amount;
            return;
        }

        creditsPerEdgeRunner += (_amount + unaccountedRewards) / totalEdgeRunnersStaked;
        unaccountedRewards = 0;
    }

    function random(uint256 _seed) internal view returns (uint256) {
        return (
            uint256(keccak256(abi.encodePacked(msg.sender, blockhash(block.number - 1), block.timestamp, _seed))) % 100
        );
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {Context} from "../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.
 *
 * The initial owner is set to the address provided by the deployer. 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;

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

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

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling 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 {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _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);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Pausable.sol)

pragma solidity ^0.8.20;

import {Context} from "../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 {
    bool private _paused;

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

    /**
     * @dev The operation failed because the contract is paused.
     */
    error EnforcedPause();

    /**
     * @dev The operation failed because the contract is not paused.
     */
    error ExpectedPause();

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

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

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

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

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        if (paused()) {
            revert EnforcedPause();
        }
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        if (!paused()) {
            revert ExpectedPause();
        }
    }

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

// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;

import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import {IAccessControl} from "@openzeppelin/contracts/access/IAccessControl.sol";

interface IBlastRunners is IERC721, IAccessControl {
    enum NftType {
        BOSS,
        EDGERUNNER,
        WORKER
    }

    function PAID_TOKENS() external view returns (uint256);
    function MAX_TOKENS() external view returns (uint256);

    function minted() external view returns (uint256);
    function unknownMinted() external view returns (uint256);
    function bossMinted() external view returns (uint256);
    function edgeRunnerMinted() external view returns (uint256);
    function workerMinted() external view returns (uint256);

    function isRevealed(uint256 tokenId) external view returns (bool);
    function getNftType(uint256 _tokenId) external view returns (NftType);

    function mint(address to) external returns (uint256);
    function reveal(uint256 _tokenId, uint256 _seed) external;
    function isBoss(uint256 _tokenid) external view returns (bool);
}

// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;

import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol";

interface IBusiness is IERC721 {
    function minted() external view returns (uint256);

    function mint(address _to, uint256 _seed) external;
}

// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;

import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface ICredits is IERC20 {
    function mint(address to, uint256 amount) external;

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

File 7 of 14 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.20;

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

// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;

interface IBlast {
    function configureClaimableGas() external;
    function claimAllGas(address contractAddress, address recipient) external returns (uint256);
}

// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;

interface IBlastPoints {
    function configurePointsOperator(address operator) external;
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

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

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.20;

import {IERC165} from "../../utils/introspection/IERC165.sol";

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

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

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

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

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

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

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

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 tokenId) external;

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

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

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/IAccessControl.sol)

pragma solidity ^0.8.20;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev The `account` is missing a role.
     */
    error AccessControlUnauthorizedAccount(address account, bytes32 neededRole);

    /**
     * @dev The caller of a function is not the expected one.
     *
     * NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.
     */
    error AccessControlBadConfirmation();

    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `callerConfirmation`.
     */
    function renounceRole(bytes32 role, address callerConfirmation) external;
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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);

    /**
     * @dev Returns the value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)

pragma solidity ^0.8.20;

/**
 * @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
{
  "remappings": [
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "forge-std/=lib/forge-std/src/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "viaIR": false,
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_blastPointsAddress","type":"address"},{"internalType":"address","name":"_pointsOperator","type":"address"},{"internalType":"address","name":"_blastRunnersAddress","type":"address"},{"internalType":"address","name":"_businessAddress","type":"address"},{"internalType":"address","name":"_creditsAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"EnforcedPause","type":"error"},{"inputs":[],"name":"ExpectedPause","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"PulseCity__BusinessStillOperating","type":"error"},{"inputs":[],"name":"PulseCity__EdgeRunnerNotStaked","type":"error"},{"inputs":[],"name":"PulseCity__InvalidToken","type":"error"},{"inputs":[],"name":"PulseCity__MaxCreditsReached","type":"error"},{"inputs":[],"name":"PulseCity__MaxEmploymentsPerBusinessReached","type":"error"},{"inputs":[],"name":"PulseCity__NotAWorker","type":"error"},{"inputs":[],"name":"PulseCity__RescueNotEnabled","type":"error"},{"inputs":[],"name":"PulseCity__TokenHasToBeRevealed","type":"error"},{"inputs":[],"name":"PulseCity__TokenNotUnstakable","type":"error"},{"inputs":[],"name":"PulseCity__UserDoesNotOperateBusiness","type":"error"},{"inputs":[],"name":"PulseCity__UserDoesNotOwnBusiness","type":"error"},{"inputs":[],"name":"PulseCity__UserDoesNotOwnToken","type":"error"},{"inputs":[],"name":"PulseCity__WorkerNeedsBusiness","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"claimedCredits","type":"uint256"},{"indexed":false,"internalType":"bool","name":"unstaked","type":"bool"}],"name":"BossClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"BusinessClosed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"BusinessOpened","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"claimedCredits","type":"uint256"},{"indexed":false,"internalType":"bool","name":"unstaked","type":"bool"}],"name":"EdgeRunnerClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"claimedCredits","type":"uint256"},{"indexed":false,"internalType":"bool","name":"unstaked","type":"bool"}],"name":"WorkerClaimed","type":"event"},{"inputs":[],"name":"BLAST","outputs":[{"internalType":"contract IBlast","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BOSS_CLAIM_TAX_PERCENTAGE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BOSS_DAILY_CREDITS_RATE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAXIMUM_CREDITS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_WORKERS_PER_BUSINESS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINIMUM_TIME_TO_UNSTAKE_BOSS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINIMUM_TIME_TO_UNSTAKE_WORKER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WORKER_CLAIM_TAX_PERCENTAGE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WORKER_DAILY_CREDITS_RATE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"},{"internalType":"uint256","name":"_businessId","type":"uint256"}],"name":"addWorkersToBusiness","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"blastPoints","outputs":[{"internalType":"contract IBlastPoints","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"blastRunners","outputs":[{"internalType":"contract IBlastRunners","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"business","outputs":[{"internalType":"contract IBusiness","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"businessToOwner","outputs":[{"internalType":"address","name":"owner","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"businessToWorkers","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint80","name":"value","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"},{"internalType":"bool","name":"_unstake","type":"bool"}],"name":"claimBossesOrEdgerunners","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"bool","name":"_unstake","type":"bool"}],"name":"claimBusiness","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimMyContractsGas","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"closeBusiness","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"credits","outputs":[{"internalType":"contract ICredits","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"creditsPerEdgeRunner","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"isBoss","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"isEdgerunner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"isWorker","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"from","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":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"openBusiness","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"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":"randomBossOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_seed","type":"uint256"}],"name":"randomEdgeRunnerOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"}],"name":"rescueBossesOrEdgerunners","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"rescueBusinessWithWorkers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rescueEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_paused","type":"bool"}],"name":"setPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_enabled","type":"bool"}],"name":"setRescueEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"}],"name":"stakeBossesOrEdgerunners","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"stakedBosses","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"stakedEdgeRunners","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenIdToStake","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint80","name":"value","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokensByOwner","outputs":[{"internalType":"uint256","name":"tokenIds","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalBossesStaked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalBusinessesStaked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalCreditsEarned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalEdgeRunnersStaked","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"}]

60e06040523480156200001157600080fd5b5060405162003322380380620033228339810160408190526200003491620001c4565b33806200005b57604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b620000668162000157565b506000805460ff60a01b191681556001600160a01b0380851660805283811660a052821660c05260408051634e606c4760e01b8152905173430000000000000000000000000000000000000292634e606c47926004808201939182900301818387803b158015620000d657600080fd5b505af1158015620000eb573d6000803e3d6000fd5b50506040516336b91f2b60e01b81526001600160a01b038781166004830152881692506336b91f2b9150602401600060405180830381600087803b1580156200013357600080fd5b505af115801562000148573d6000803e3d6000fd5b50505050505050505062000234565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b0381168114620001bf57600080fd5b919050565b600080600080600060a08688031215620001dd57600080fd5b620001e886620001a7565b9450620001f860208701620001a7565b93506200020860408701620001a7565b92506200021860608701620001a7565b91506200022860808701620001a7565b90509295509295909350565b60805160a05160c051613032620002f0600039600081816103a8015281816109c50152611a9501526000818161061f01528181610f490152818161179d015281816118750152611b970152600081816102e7015281816106a60152818161084101528181610b3f01528181610c5201528181610e72015281816110e4015281816112fa015281816114620152818161150b0152818161161a01528181611c5e01528181611fe20152818161222d01526128cc01526130326000f3fe608060405234801561001057600080fd5b50600436106102955760003560e01c8063715018a611610167578063bc251d3a116100ce578063e74dc11c11610087578063e74dc11c1461061a578063e80779a314610641578063f03ad71214610654578063f2fde38b1461065e578063fcbe56d514610671578063fd2f55921461067a57600080fd5b8063bc251d3a146105bd578063c0c472c0146105d0578063c1f26342146105d9578063d3929e64146105ec578063da795f81146105f4578063dd3dbc651461060757600080fd5b80637b336173116101205780637b3361731461055e57806387555fca146105715780638da5cb5b1461057a5780638ed5c96d1461058b57806397d757761461059c578063b2bd6b50146105aa57600080fd5b8063715018a61461050257806375569eb71461050a57806375c8ba561461051d578063765310081461053057806377d5d2dc146105435780637b0c6b6e1461054b57600080fd5b806329bb05181161020b57806350cd6937116101c457806350cd693714610486578063561d8715146104995780635c975abb146104c2578063653db54a146104d457806366b08345146104e75780636ad26934146104f157600080fd5b806329bb0518146103ca5780633223c747146103dd5780633557e6be146103f057806339db714f1461045e5780633eae32661461046b5780634b39459a1461047357600080fd5b806316c38b3c1161025d57806316c38b3c1461034d57806318cf6482146103625780631af961c6146103755780631b9cc8c41461037d57806322c7d1d31461039057806326540fd2146103a357600080fd5b8063054810b21461029a57806307a980de146102c25780630af43c61146102d957806310bccd54146102e2578063150b7a0214610321575b600080fd5b6102ad6102a8366004612b6b565b610683565b60405190151581526020015b60405180910390f35b6102cb60025481565b6040519081526020016102b9565b6102cb60055481565b6103097f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016102b9565b61033461032f366004612b99565b61073f565b6040516001600160e01b031990911681526020016102b9565b61036061035b366004612c4d565b6107c1565b005b610309610370366004612b6b565b6107e2565b6102cb600f81565b61036061038b366004612d20565b6108f4565b6102cb6b033b2e3c9fd0803ce800000081565b6103097f000000000000000000000000000000000000000000000000000000000000000081565b6103606103d8366004612d6e565b610a2f565b6102cb6103eb366004612b6b565b610d32565b6104326103fe366004612b6b565b600b60205260009081526040902080546001909101546001600160a01b03811690600160a01b90046001600160501b031683565b604080519384526001600160a01b0390921660208401526001600160501b0316908201526060016102b9565b6008546102ad9060ff1681565b6102cb600381565b610360610481366004612b6b565b610d53565b610360610494366004612dab565b610ffa565b6103096104a7366004612b6b565b600d602052600090815260409020546001600160a01b031681565b600054600160a01b900460ff166102ad565b6102cb6104e2366004612df0565b611395565b6102cb6203f48081565b6102cb69010f0cf064dd5920000081565b6103606113c6565b610360610518366004612d6e565b6113da565b6102ad61052b366004612b6b565b6115f7565b61036061053e366004612c4d565b61168e565b6103606116a9565b610432610559366004612e1c565b61171f565b61036061056c366004612b6b565b611775565b6102cb60045481565b6000546001600160a01b0316610309565b6102cb6901969368974c05b0000081565b6103096002604360981b0181565b600154610309906001600160a01b031681565b6103606105cb366004612e3e565b611923565b6102cb60065481565b6103606105e7366004612b6b565b611b00565b6102cb601481565b6102ad610602366004612b6b565b611c3b565b6102cb610615366004612b6b565b611cd2565b6103097f000000000000000000000000000000000000000000000000000000000000000081565b61030961064f366004612b6b565b611ce2565b6102cb6202a30081565b61036061066c366004612e61565b611d1d565b6102cb60075481565b6102cb60035481565b60405163a82620d560e01b81526004810182905260009081906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a82620d590602401602060405180830381865afa1580156106ed573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107119190612e7e565b905060015b81600281111561072857610728612e9f565b036107365750600192915050565b50600092915050565b60006001600160a01b038516156107af5760405162461bcd60e51b815260206004820152602960248201527f43616e6e6f742073656e6420746f6b656e7320746f2050756c73652043697479604482015268206469726563746c7960b81b60648201526084015b60405180910390fd5b50630a85bd0160e11b95945050505050565b6107c9611d58565b80156107da576107d7611d85565b50565b6107d7611de5565b60006002546000036107f657506000919050565b6000600254836108069190612ecb565b905060006009828154811061081d5761081d612edf565b60009182526020822001546040516331a9108f60e11b8152600481018290529092507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636352211e90602401602060405180830381865afa158015610890573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108b49190612ef5565b9050306001600160a01b038216036108e957506000908152600b60205260409020600101546001600160a01b03169392505050565b506000949350505050565b6108fc611e21565b8151600090815b8181101561099a57600085828151811061091f5761091f612edf565b60200260200101519050610932816115f7565b15610952576109418186611e4c565b61094b9085612f28565b9350610977565b61095b81610683565b156109775761096a8186612159565b6109749085612f28565b93505b841561098757610987338261235a565b508061099281612f3b565b915050610903565b50816000036109a95750505050565b6040516340c10f1960e01b8152336004820152602481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906340c10f1990604401600060405180830381600087803b158015610a1157600080fd5b505af1158015610a25573d6000803e3d6000fd5b5050505050505050565b60085460ff16610a5257604051638c8257f960e01b815260040160405180910390fd5b805160005b81811015610d2d576000838281518110610a7357610a73612edf565b6020908102919091018101516000818152600b83526040908190208151606081018352815481526001909101546001600160a01b038116948201859052600160a01b90046001600160501b031691810191909152909250903314610aea5760405163129844d160e01b815260040160405180910390fd5b610af3826115f7565b15610bfd5760038054906000610b0883612f54565b90915550506000828152600b6020526040808220918255600190910180546001600160f01b0319169055516323b872dd60e01b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd90610b8090309033908790600401612f6b565b600060405180830381600087803b158015610b9a57600080fd5b505af1158015610bae573d6000803e3d6000fd5b505060408051858152600060208201526001918101919091527f56df455d60247ba0025aaa90af586e30390ad9f3edfe21a8b253713fd351f340925060600190505b60405180910390a1610d0e565b610c0682610683565b15610d075760028054906000610c1b83612f54565b90915550506000828152600b6020526040808220918255600190910180546001600160f01b0319169055516323b872dd60e01b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd90610c9390309033908790600401612f6b565b600060405180830381600087803b158015610cad57600080fd5b505af1158015610cc1573d6000803e3d6000fd5b505060408051858152600060208201526001918101919091527ff575d895a5b0e89bce32e321a1232a7660b0644f89148d09d8a4ac84da37b8cc92506060019050610bf0565b5050610d1b565b610d18338361235a565b50505b80610d2581612f3b565b915050610a57565b505050565b600a8181548110610d4257600080fd5b600091825260209091200154905081565b60085460ff16610d7657604051638c8257f960e01b815260040160405180910390fd5b6000818152600d60205260409020546001600160a01b03163314610dad57604051632db66c8160e01b815260040160405180910390fd5b6000818152600e6020908152604080832080548251818502810185019093528083529192909190849084015b82821015610e395760008481526020908190206040805160608101825260028602909201805483526001908101546001600160a01b03811684860152600160a01b90046001600160501b0316918301919091529083529092019101610dd9565b5050825192935060009150505b81811015610f06576000838281518110610e6257610e62612edf565b60200260200101516000015190507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166323b872dd3033846040518463ffffffff1660e01b8152600401610ec093929190612f6b565b600060405180830381600087803b158015610eda57600080fd5b505af1158015610eee573d6000803e3d6000fd5b50505050508080610efe90612f3b565b915050610e46565b506000838152600e60205260408120610f1e91612b24565b6000838152600d60205260409081902080546001600160a01b0319169055516323b872dd60e01b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd90610f8a90309033908890600401612f6b565b600060405180830381600087803b158015610fa457600080fd5b505af1158015610fb8573d6000803e3d6000fd5b505050507f519b5a9478dd5d49c48a5b9e53004df16bb83294c0b0e680000bd4c49ec4187f83604051610fed91815260200190565b60405180910390a1505050565b611002611e21565b6000818152600d60205260409020546001600160a01b0316331461103957604051632db66c8160e01b815260040160405180910390fd5b81516000828152600e602052604090205460036110568383612f28565b11156110755760405163189d9cfd60e21b815260040160405180910390fd5b60005b8281101561138e57600085828151811061109457611094612edf565b602002602001015190506110a781611c3b565b6110c457604051630158674160e31b815260040160405180910390fd5b6040516331a9108f60e11b81526004810182905233906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690636352211e90602401602060405180830381865afa15801561112b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061114f9190612ef5565b6001600160a01b0316146111765760405163129844d160e01b815260040160405180910390fd5b6040518060600160405280828152602001336001600160a01b03168152602001426001600160501b0316815250600b60008381526020019081526020016000206000820151816000015560208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160010160146101000a8154816001600160501b0302191690836001600160501b03160217905550905050600e6000868152602001908152602001600020600b60008381526020019081526020016000209080600181540180825580915050600190039060005260206000209060020201600090919091909150600082015481600001556001820160009054906101000a90046001600160a01b03168160010160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506001820160149054906101000a90046001600160501b03168160010160146101000a8154816001600160501b0302191690836001600160501b0316021790555050507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166323b872dd3330846040518463ffffffff1660e01b815260040161134893929190612f6b565b600060405180830381600087803b15801561136257600080fd5b505af1158015611376573d6000803e3d6000fd5b5050505050808061138690612f3b565b915050611078565b5050505050565b600c60205281600052604060002081815481106113b157600080fd5b90600052602060002001600091509150505481565b6113ce611d58565b6113d8600061242c565b565b6113e2611e21565b805160005b81811015610d2d57600083828151811061140357611403612edf565b6020026020010151905061141681611c3b565b1561143457604051631a6e63ff60e01b815260040160405180910390fd5b8060000361144257506115e5565b6040516331a9108f60e11b81526004810182905233906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690636352211e90602401602060405180830381865afa1580156114a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114cd9190612ef5565b6001600160a01b0316146114f45760405163129844d160e01b815260040160405180910390fd5b6040516323b872dd60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906323b872dd9061154490339030908690600401612f6b565b600060405180830381600087803b15801561155e57600080fd5b505af1158015611572573d6000803e3d6000fd5b5050505061157f816115f7565b156115935761158e338261247c565b6115c4565b61159c81610683565b156115ab5761158e3382612585565b60405163da3b9d4d60e01b815260040160405180910390fd5b336000908152600c6020908152604082208054600181018255908352912001555b806115ef81612f3b565b9150506113e7565b60405163a82620d560e01b81526004810182905260009081906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a82620d590602401602060405180830381865afa158015611661573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116859190612e7e565b90506000610716565b611696611d58565b6008805460ff1916911515919091179055565b6116b1611d58565b604051634aa7d2f760e11b81523060048201523360248201526002604360981b019063954fa5ee906044016020604051808303816000875af11580156116fb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107d79190612f8f565b600e602052816000526040600020818154811061173b57600080fd5b6000918252602090912060029091020180546001909101549092506001600160a01b0381169150600160a01b90046001600160501b031683565b61177d611e21565b6040516331a9108f60e11b81526004810182905233906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690636352211e90602401602060405180830381865afa1580156117e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118089190612ef5565b6001600160a01b03161461182f57604051634e203f1d60e11b815260040160405180910390fd5b6004805490600061183f83612f3b565b90915550506000818152600d60205260409081902080546001600160a01b0319163390811790915590516323b872dd60e01b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316916323b872dd916118b5919030908690600401612f6b565b600060405180830381600087803b1580156118cf57600080fd5b505af11580156118e3573d6000803e3d6000fd5b505050507f65d105a24bb9ded770e55e72d9e85f4499301e1f0cf2a18197f5803c80de1a5d8160405161191891815260200190565b60405180910390a150565b61192b611e21565b6000828152600d60205260409020546001600160a01b0316331461196257604051632db66c8160e01b815260040160405180910390fd5b6000828152600e6020908152604080832080548251818502810185019093528083528493849084015b828210156119eb5760008481526020908190206040805160608101825260028602909201805483526001908101546001600160a01b03811684860152600160a01b90046001600160501b031691830191909152908352909201910161198b565b5050825192935060009150505b81811015611a4c576000838281518110611a1457611a14612edf565b6020026020010151600001519050611a2c8187612689565b611a369086612f28565b9450508080611a4490612f3b565b9150506119f8565b508315611a6a576000858152600e60205260408120611a6a91612b24565b82600003611a79575050505050565b6040516340c10f1960e01b8152336004820152602481018490527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906340c10f1990604401600060405180830381600087803b158015611ae157600080fd5b505af1158015611af5573d6000803e3d6000fd5b505050505050505050565b611b08611e21565b6000818152600d60205260409020546001600160a01b03163314611b3f57604051632db66c8160e01b815260040160405180910390fd5b6000818152600e602052604090205415611b6c576040516393125bfb60e01b815260040160405180910390fd5b6000818152600d60205260409081902080546001600160a01b0319169055516323b872dd60e01b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd90611bd890309033908690600401612f6b565b600060405180830381600087803b158015611bf257600080fd5b505af1158015611c06573d6000803e3d6000fd5b505050507f519b5a9478dd5d49c48a5b9e53004df16bb83294c0b0e680000bd4c49ec4187f8160405161191891815260200190565b60405163a82620d560e01b81526004810182905260009081906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a82620d590602401602060405180830381865afa158015611ca5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cc99190612e7e565b90506002610716565b60098181548110610d4257600080fd5b6000600354600003611cf657506000919050565b600060035483611d069190612ecb565b90506000600a828154811061081d5761081d612edf565b611d25611d58565b6001600160a01b038116611d4f57604051631e4fbdf760e01b8152600060048201526024016107a6565b6107d78161242c565b6000546001600160a01b031633146113d85760405163118cdaa760e01b81523360048201526024016107a6565b611d8d611e21565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611dc83390565b6040516001600160a01b03909116815260200160405180910390a1565b611ded612a32565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33611dc8565b600054600160a01b900460ff16156113d85760405163d93c066560e01b815260040160405180910390fd5b6000828152600b602090815260408083208151606081018352815481526001909101546001600160a01b038116938201849052600160a01b90046001600160501b031691810191909152903314611eb65760405163129844d160e01b815260040160405180910390fd5b620151806901969368974c05b0000082604001516001600160501b031642611ede9190612fa8565b611ee89190612fbb565b611ef29190612fd2565b91508160056000828254611f069190612f28565b90915550506005546b033b2e3c9fd0803ce80000001015611f3a57604051637b98a11960e01b815260040160405180910390fd5b821561205a576202a30081604001516001600160501b031642611f5d9190612fa8565b1015611f7c576040516301845c4160e11b815260040160405180910390fd5b6023611f8785612a5c565b1015611f9b57611f9682612ac8565b600091505b60028054906000611fab83612f54565b90915550506000848152600b6020526040808220918255600190910180546001600160f01b0319169055516323b872dd60e01b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd9061202390309033908990600401612f6b565b600060405180830381600087803b15801561203d57600080fd5b505af1158015612051573d6000803e3d6000fd5b5050505061210c565b612079606461206a600f85612fbb565b6120749190612fd2565b612ac8565b6064612086600f82612fa8565b6120909084612fbb565b61209a9190612fd2565b604080516060810182528681523360208083019182526001600160501b0342811684860190815260008b8152600b90935294909120925183559051600190920180549351909116600160a01b026001600160f01b03199093166001600160a01b03929092169190911791909117905591505b6040805185815260208101849052841515918101919091527ff575d895a5b0e89bce32e321a1232a7660b0644f89148d09d8a4ac84da37b8cc906060015b60405180910390a15092915050565b6000828152600b602090815260408083208151606081018352815481526001909101546001600160a01b038116938201849052600160a01b90046001600160501b0316918101919091529033146121c35760405163129844d160e01b815260040160405180910390fd5b80604001516001600160501b03166007546121de9190612fa8565b915082156122a557600380549060006121f683612f54565b90915550506000848152600b6020526040808220918255600190910180546001600160f01b0319169055516323b872dd60e01b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd9061226e90309033908990600401612f6b565b600060405180830381600087803b15801561228857600080fd5b505af115801561229c573d6000803e3d6000fd5b50505050612318565b604080516060810182528581523360208083019182526007546001600160501b0390811684860190815260008a8152600b90935294909120925183559051600190920180549351909116600160a01b026001600160f01b03199093166001600160a01b0392909216919091179190911790555b6040805185815260208101849052841515918101919091527f56df455d60247ba0025aaa90af586e30390ad9f3edfe21a8b253713fd351f3409060600161214a565b6001600160a01b0382166000908152600c60205260408120805490915b8181101561138e57600083828154811061239357612393612edf565b9060005260206000200154905084810361241957835484906123b790600190612fa8565b815481106123c7576123c7612edf565b90600052602060002001548483815481106123e4576123e4612edf565b90600052602060002001819055508380548061240257612402612fe6565b600190038181906000526020600020016000905590555b508061242481612f3b565b915050612377565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b604080516060810182528281526001600160a01b0380851660208084019182526001600160501b034281168587019081526000888152600b909352958220945185559151600190940180549551909216600160a01b026001600160f01b0319909516939092169290921792909217905560028054916124fa83612f3b565b9091555050600980546001810182556000919091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af01819055604080516001600160a01b03841681526020810183905242918101919091527f6173e4d2d9dd52aae0ed37afed3adcf924a490639b759ca93d32dc43366c17d2906060015b60405180910390a15050565b604080516060810182528281526001600160a01b0380851660208084019182526007546001600160501b039081168587019081526000888152600b909352958220945185559151600190940180549551909216600160a01b026001600160f01b03199095169390921692909217929092179055600380549161260683612f3b565b9091555050600a80546001810182556000919091527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a801819055604080516001600160a01b03841681526020810183905242918101919091527f6173e4d2d9dd52aae0ed37afed3adcf924a490639b759ca93d32dc43366c17d290606001612579565b6000828152600b602090815260408083208151606081018352815481526001909101546001600160a01b03811682850152600160a01b90046001600160501b031681830152338452600c8352818420805483518186028101860190945280845291938593929083018282801561271e57602002820191906000526020600020905b81548152602001906001019080831161270a575b505050505090506000815190506000805b8281101561279257600084828151811061274b5761274b612edf565b6020026020010151905082601e036127635750612792565b61276c816115f7565b1561277f5761277c600a84612f28565b92505b508061278a81612f3b565b91505061272f565b506201518069010f0cf064dd5920000085604001516001600160501b0316426127bb9190612fa8565b6127c59190612fbb565b6127cf9190612fd2565b945060646127dd8287612fbb565b6127e79190612fd2565b6127f19086612f28565b945084600560008282546128059190612f28565b90915550506005546b033b2e3c9fd0803ce8000000101561283957604051637b98a11960e01b815260040160405180910390fd5b8515612944576203f48084604001516001600160501b03164261285c9190612fa8565b101561287b576040516301845c4160e11b815260040160405180910390fd5b603261288688612a5c565b101561289a5761289585612ac8565b600094505b6000878152600b6020526040808220918255600190910180546001600160f01b0319169055516323b872dd60e01b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd9061290d90309033908c90600401612f6b565b600060405180830381600087803b15801561292757600080fd5b505af115801561293b573d6000803e3d6000fd5b505050506129e7565b612954606461206a601488612fbb565b6064612961601482612fa8565b61296b9087612fbb565b6129759190612fd2565b604080516060810182528981523360208083019182526001600160501b0342811684860190815260008e8152600b90935294909120925183559051600190920180549351909116600160a01b026001600160f01b03199093166001600160a01b03929092169190911791909117905594505b60408051888152602081018790528715158183015290517f6dd046fd164e9edf766b527ffdce5c6d7c792c435be0f18c5390d4d30b72b05a9181900360600190a15050505092915050565b600054600160a01b900460ff166113d857604051638dfc202b60e01b815260040160405180910390fd5b6000606433612a6c600143612fa8565b60405160609290921b6bffffffffffffffffffffffff19166020830152406034820152426054820152607481018490526094016040516020818303038152906040528051906020012060001c612ac29190612ecb565b92915050565b600354600003612aec578060066000828254612ae49190612f28565b909155505050565b600354600654612afc9083612f28565b612b069190612fd2565b60076000828254612b179190612f28565b9091555050600060065550565b50805460008255600202906000526020600020908101906107d791905b80821115612b6757600081556001810180546001600160f01b0319169055600201612b41565b5090565b600060208284031215612b7d57600080fd5b5035919050565b6001600160a01b03811681146107d757600080fd5b600080600080600060808688031215612bb157600080fd5b8535612bbc81612b84565b94506020860135612bcc81612b84565b935060408601359250606086013567ffffffffffffffff80821115612bf057600080fd5b818801915088601f830112612c0457600080fd5b813581811115612c1357600080fd5b896020828501011115612c2557600080fd5b9699959850939650602001949392505050565b80358015158114612c4857600080fd5b919050565b600060208284031215612c5f57600080fd5b612c6882612c38565b9392505050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112612c9657600080fd5b8135602067ffffffffffffffff80831115612cb357612cb3612c6f565b8260051b604051601f19603f83011681018181108482111715612cd857612cd8612c6f565b604052938452858101830193838101925087851115612cf657600080fd5b83870191505b84821015612d1557813583529183019190830190612cfc565b979650505050505050565b60008060408385031215612d3357600080fd5b823567ffffffffffffffff811115612d4a57600080fd5b612d5685828601612c85565b925050612d6560208401612c38565b90509250929050565b600060208284031215612d8057600080fd5b813567ffffffffffffffff811115612d9757600080fd5b612da384828501612c85565b949350505050565b60008060408385031215612dbe57600080fd5b823567ffffffffffffffff811115612dd557600080fd5b612de185828601612c85565b95602094909401359450505050565b60008060408385031215612e0357600080fd5b8235612e0e81612b84565b946020939093013593505050565b60008060408385031215612e2f57600080fd5b50508035926020909101359150565b60008060408385031215612e5157600080fd5b82359150612d6560208401612c38565b600060208284031215612e7357600080fd5b8135612c6881612b84565b600060208284031215612e9057600080fd5b815160038110612c6857600080fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b600082612eda57612eda612eb5565b500690565b634e487b7160e01b600052603260045260246000fd5b600060208284031215612f0757600080fd5b8151612c6881612b84565b634e487b7160e01b600052601160045260246000fd5b80820180821115612ac257612ac2612f12565b600060018201612f4d57612f4d612f12565b5060010190565b600081612f6357612f63612f12565b506000190190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b600060208284031215612fa157600080fd5b5051919050565b81810381811115612ac257612ac2612f12565b8082028115828204841417612ac257612ac2612f12565b600082612fe157612fe1612eb5565b500490565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220829bb940a4ec5b37ae55cb9da1333c4483d8f62f320a6aa7ebde78eff55a37d564736f6c634300081400330000000000000000000000002536fe9ab3f511540f2f9e2ec2a805005c3dd800000000000000000000000000a82eb14d67dd9f0e9fda72e1a85e7d6f3c4c616d000000000000000000000000d641dde60985fab88c623188adba6be3148288d900000000000000000000000007fd77f6a74675501564f9d6ece327a0909b3757000000000000000000000000f92f745d01dcf362ad3e6e4baad24230dedcffdf

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102955760003560e01c8063715018a611610167578063bc251d3a116100ce578063e74dc11c11610087578063e74dc11c1461061a578063e80779a314610641578063f03ad71214610654578063f2fde38b1461065e578063fcbe56d514610671578063fd2f55921461067a57600080fd5b8063bc251d3a146105bd578063c0c472c0146105d0578063c1f26342146105d9578063d3929e64146105ec578063da795f81146105f4578063dd3dbc651461060757600080fd5b80637b336173116101205780637b3361731461055e57806387555fca146105715780638da5cb5b1461057a5780638ed5c96d1461058b57806397d757761461059c578063b2bd6b50146105aa57600080fd5b8063715018a61461050257806375569eb71461050a57806375c8ba561461051d578063765310081461053057806377d5d2dc146105435780637b0c6b6e1461054b57600080fd5b806329bb05181161020b57806350cd6937116101c457806350cd693714610486578063561d8715146104995780635c975abb146104c2578063653db54a146104d457806366b08345146104e75780636ad26934146104f157600080fd5b806329bb0518146103ca5780633223c747146103dd5780633557e6be146103f057806339db714f1461045e5780633eae32661461046b5780634b39459a1461047357600080fd5b806316c38b3c1161025d57806316c38b3c1461034d57806318cf6482146103625780631af961c6146103755780631b9cc8c41461037d57806322c7d1d31461039057806326540fd2146103a357600080fd5b8063054810b21461029a57806307a980de146102c25780630af43c61146102d957806310bccd54146102e2578063150b7a0214610321575b600080fd5b6102ad6102a8366004612b6b565b610683565b60405190151581526020015b60405180910390f35b6102cb60025481565b6040519081526020016102b9565b6102cb60055481565b6103097f000000000000000000000000d641dde60985fab88c623188adba6be3148288d981565b6040516001600160a01b0390911681526020016102b9565b61033461032f366004612b99565b61073f565b6040516001600160e01b031990911681526020016102b9565b61036061035b366004612c4d565b6107c1565b005b610309610370366004612b6b565b6107e2565b6102cb600f81565b61036061038b366004612d20565b6108f4565b6102cb6b033b2e3c9fd0803ce800000081565b6103097f000000000000000000000000f92f745d01dcf362ad3e6e4baad24230dedcffdf81565b6103606103d8366004612d6e565b610a2f565b6102cb6103eb366004612b6b565b610d32565b6104326103fe366004612b6b565b600b60205260009081526040902080546001909101546001600160a01b03811690600160a01b90046001600160501b031683565b604080519384526001600160a01b0390921660208401526001600160501b0316908201526060016102b9565b6008546102ad9060ff1681565b6102cb600381565b610360610481366004612b6b565b610d53565b610360610494366004612dab565b610ffa565b6103096104a7366004612b6b565b600d602052600090815260409020546001600160a01b031681565b600054600160a01b900460ff166102ad565b6102cb6104e2366004612df0565b611395565b6102cb6203f48081565b6102cb69010f0cf064dd5920000081565b6103606113c6565b610360610518366004612d6e565b6113da565b6102ad61052b366004612b6b565b6115f7565b61036061053e366004612c4d565b61168e565b6103606116a9565b610432610559366004612e1c565b61171f565b61036061056c366004612b6b565b611775565b6102cb60045481565b6000546001600160a01b0316610309565b6102cb6901969368974c05b0000081565b6103096002604360981b0181565b600154610309906001600160a01b031681565b6103606105cb366004612e3e565b611923565b6102cb60065481565b6103606105e7366004612b6b565b611b00565b6102cb601481565b6102ad610602366004612b6b565b611c3b565b6102cb610615366004612b6b565b611cd2565b6103097f00000000000000000000000007fd77f6a74675501564f9d6ece327a0909b375781565b61030961064f366004612b6b565b611ce2565b6102cb6202a30081565b61036061066c366004612e61565b611d1d565b6102cb60075481565b6102cb60035481565b60405163a82620d560e01b81526004810182905260009081906001600160a01b037f000000000000000000000000d641dde60985fab88c623188adba6be3148288d9169063a82620d590602401602060405180830381865afa1580156106ed573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107119190612e7e565b905060015b81600281111561072857610728612e9f565b036107365750600192915050565b50600092915050565b60006001600160a01b038516156107af5760405162461bcd60e51b815260206004820152602960248201527f43616e6e6f742073656e6420746f6b656e7320746f2050756c73652043697479604482015268206469726563746c7960b81b60648201526084015b60405180910390fd5b50630a85bd0160e11b95945050505050565b6107c9611d58565b80156107da576107d7611d85565b50565b6107d7611de5565b60006002546000036107f657506000919050565b6000600254836108069190612ecb565b905060006009828154811061081d5761081d612edf565b60009182526020822001546040516331a9108f60e11b8152600481018290529092507f000000000000000000000000d641dde60985fab88c623188adba6be3148288d96001600160a01b031690636352211e90602401602060405180830381865afa158015610890573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108b49190612ef5565b9050306001600160a01b038216036108e957506000908152600b60205260409020600101546001600160a01b03169392505050565b506000949350505050565b6108fc611e21565b8151600090815b8181101561099a57600085828151811061091f5761091f612edf565b60200260200101519050610932816115f7565b15610952576109418186611e4c565b61094b9085612f28565b9350610977565b61095b81610683565b156109775761096a8186612159565b6109749085612f28565b93505b841561098757610987338261235a565b508061099281612f3b565b915050610903565b50816000036109a95750505050565b6040516340c10f1960e01b8152336004820152602481018390527f000000000000000000000000f92f745d01dcf362ad3e6e4baad24230dedcffdf6001600160a01b0316906340c10f1990604401600060405180830381600087803b158015610a1157600080fd5b505af1158015610a25573d6000803e3d6000fd5b5050505050505050565b60085460ff16610a5257604051638c8257f960e01b815260040160405180910390fd5b805160005b81811015610d2d576000838281518110610a7357610a73612edf565b6020908102919091018101516000818152600b83526040908190208151606081018352815481526001909101546001600160a01b038116948201859052600160a01b90046001600160501b031691810191909152909250903314610aea5760405163129844d160e01b815260040160405180910390fd5b610af3826115f7565b15610bfd5760038054906000610b0883612f54565b90915550506000828152600b6020526040808220918255600190910180546001600160f01b0319169055516323b872dd60e01b81527f000000000000000000000000d641dde60985fab88c623188adba6be3148288d96001600160a01b0316906323b872dd90610b8090309033908790600401612f6b565b600060405180830381600087803b158015610b9a57600080fd5b505af1158015610bae573d6000803e3d6000fd5b505060408051858152600060208201526001918101919091527f56df455d60247ba0025aaa90af586e30390ad9f3edfe21a8b253713fd351f340925060600190505b60405180910390a1610d0e565b610c0682610683565b15610d075760028054906000610c1b83612f54565b90915550506000828152600b6020526040808220918255600190910180546001600160f01b0319169055516323b872dd60e01b81527f000000000000000000000000d641dde60985fab88c623188adba6be3148288d96001600160a01b0316906323b872dd90610c9390309033908790600401612f6b565b600060405180830381600087803b158015610cad57600080fd5b505af1158015610cc1573d6000803e3d6000fd5b505060408051858152600060208201526001918101919091527ff575d895a5b0e89bce32e321a1232a7660b0644f89148d09d8a4ac84da37b8cc92506060019050610bf0565b5050610d1b565b610d18338361235a565b50505b80610d2581612f3b565b915050610a57565b505050565b600a8181548110610d4257600080fd5b600091825260209091200154905081565b60085460ff16610d7657604051638c8257f960e01b815260040160405180910390fd5b6000818152600d60205260409020546001600160a01b03163314610dad57604051632db66c8160e01b815260040160405180910390fd5b6000818152600e6020908152604080832080548251818502810185019093528083529192909190849084015b82821015610e395760008481526020908190206040805160608101825260028602909201805483526001908101546001600160a01b03811684860152600160a01b90046001600160501b0316918301919091529083529092019101610dd9565b5050825192935060009150505b81811015610f06576000838281518110610e6257610e62612edf565b60200260200101516000015190507f000000000000000000000000d641dde60985fab88c623188adba6be3148288d96001600160a01b03166323b872dd3033846040518463ffffffff1660e01b8152600401610ec093929190612f6b565b600060405180830381600087803b158015610eda57600080fd5b505af1158015610eee573d6000803e3d6000fd5b50505050508080610efe90612f3b565b915050610e46565b506000838152600e60205260408120610f1e91612b24565b6000838152600d60205260409081902080546001600160a01b0319169055516323b872dd60e01b81527f00000000000000000000000007fd77f6a74675501564f9d6ece327a0909b37576001600160a01b0316906323b872dd90610f8a90309033908890600401612f6b565b600060405180830381600087803b158015610fa457600080fd5b505af1158015610fb8573d6000803e3d6000fd5b505050507f519b5a9478dd5d49c48a5b9e53004df16bb83294c0b0e680000bd4c49ec4187f83604051610fed91815260200190565b60405180910390a1505050565b611002611e21565b6000818152600d60205260409020546001600160a01b0316331461103957604051632db66c8160e01b815260040160405180910390fd5b81516000828152600e602052604090205460036110568383612f28565b11156110755760405163189d9cfd60e21b815260040160405180910390fd5b60005b8281101561138e57600085828151811061109457611094612edf565b602002602001015190506110a781611c3b565b6110c457604051630158674160e31b815260040160405180910390fd5b6040516331a9108f60e11b81526004810182905233906001600160a01b037f000000000000000000000000d641dde60985fab88c623188adba6be3148288d91690636352211e90602401602060405180830381865afa15801561112b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061114f9190612ef5565b6001600160a01b0316146111765760405163129844d160e01b815260040160405180910390fd5b6040518060600160405280828152602001336001600160a01b03168152602001426001600160501b0316815250600b60008381526020019081526020016000206000820151816000015560208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160010160146101000a8154816001600160501b0302191690836001600160501b03160217905550905050600e6000868152602001908152602001600020600b60008381526020019081526020016000209080600181540180825580915050600190039060005260206000209060020201600090919091909150600082015481600001556001820160009054906101000a90046001600160a01b03168160010160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506001820160149054906101000a90046001600160501b03168160010160146101000a8154816001600160501b0302191690836001600160501b0316021790555050507f000000000000000000000000d641dde60985fab88c623188adba6be3148288d96001600160a01b03166323b872dd3330846040518463ffffffff1660e01b815260040161134893929190612f6b565b600060405180830381600087803b15801561136257600080fd5b505af1158015611376573d6000803e3d6000fd5b5050505050808061138690612f3b565b915050611078565b5050505050565b600c60205281600052604060002081815481106113b157600080fd5b90600052602060002001600091509150505481565b6113ce611d58565b6113d8600061242c565b565b6113e2611e21565b805160005b81811015610d2d57600083828151811061140357611403612edf565b6020026020010151905061141681611c3b565b1561143457604051631a6e63ff60e01b815260040160405180910390fd5b8060000361144257506115e5565b6040516331a9108f60e11b81526004810182905233906001600160a01b037f000000000000000000000000d641dde60985fab88c623188adba6be3148288d91690636352211e90602401602060405180830381865afa1580156114a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114cd9190612ef5565b6001600160a01b0316146114f45760405163129844d160e01b815260040160405180910390fd5b6040516323b872dd60e01b81526001600160a01b037f000000000000000000000000d641dde60985fab88c623188adba6be3148288d916906323b872dd9061154490339030908690600401612f6b565b600060405180830381600087803b15801561155e57600080fd5b505af1158015611572573d6000803e3d6000fd5b5050505061157f816115f7565b156115935761158e338261247c565b6115c4565b61159c81610683565b156115ab5761158e3382612585565b60405163da3b9d4d60e01b815260040160405180910390fd5b336000908152600c6020908152604082208054600181018255908352912001555b806115ef81612f3b565b9150506113e7565b60405163a82620d560e01b81526004810182905260009081906001600160a01b037f000000000000000000000000d641dde60985fab88c623188adba6be3148288d9169063a82620d590602401602060405180830381865afa158015611661573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116859190612e7e565b90506000610716565b611696611d58565b6008805460ff1916911515919091179055565b6116b1611d58565b604051634aa7d2f760e11b81523060048201523360248201526002604360981b019063954fa5ee906044016020604051808303816000875af11580156116fb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107d79190612f8f565b600e602052816000526040600020818154811061173b57600080fd5b6000918252602090912060029091020180546001909101549092506001600160a01b0381169150600160a01b90046001600160501b031683565b61177d611e21565b6040516331a9108f60e11b81526004810182905233906001600160a01b037f00000000000000000000000007fd77f6a74675501564f9d6ece327a0909b37571690636352211e90602401602060405180830381865afa1580156117e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118089190612ef5565b6001600160a01b03161461182f57604051634e203f1d60e11b815260040160405180910390fd5b6004805490600061183f83612f3b565b90915550506000818152600d60205260409081902080546001600160a01b0319163390811790915590516323b872dd60e01b81527f00000000000000000000000007fd77f6a74675501564f9d6ece327a0909b37576001600160a01b0316916323b872dd916118b5919030908690600401612f6b565b600060405180830381600087803b1580156118cf57600080fd5b505af11580156118e3573d6000803e3d6000fd5b505050507f65d105a24bb9ded770e55e72d9e85f4499301e1f0cf2a18197f5803c80de1a5d8160405161191891815260200190565b60405180910390a150565b61192b611e21565b6000828152600d60205260409020546001600160a01b0316331461196257604051632db66c8160e01b815260040160405180910390fd5b6000828152600e6020908152604080832080548251818502810185019093528083528493849084015b828210156119eb5760008481526020908190206040805160608101825260028602909201805483526001908101546001600160a01b03811684860152600160a01b90046001600160501b031691830191909152908352909201910161198b565b5050825192935060009150505b81811015611a4c576000838281518110611a1457611a14612edf565b6020026020010151600001519050611a2c8187612689565b611a369086612f28565b9450508080611a4490612f3b565b9150506119f8565b508315611a6a576000858152600e60205260408120611a6a91612b24565b82600003611a79575050505050565b6040516340c10f1960e01b8152336004820152602481018490527f000000000000000000000000f92f745d01dcf362ad3e6e4baad24230dedcffdf6001600160a01b0316906340c10f1990604401600060405180830381600087803b158015611ae157600080fd5b505af1158015611af5573d6000803e3d6000fd5b505050505050505050565b611b08611e21565b6000818152600d60205260409020546001600160a01b03163314611b3f57604051632db66c8160e01b815260040160405180910390fd5b6000818152600e602052604090205415611b6c576040516393125bfb60e01b815260040160405180910390fd5b6000818152600d60205260409081902080546001600160a01b0319169055516323b872dd60e01b81527f00000000000000000000000007fd77f6a74675501564f9d6ece327a0909b37576001600160a01b0316906323b872dd90611bd890309033908690600401612f6b565b600060405180830381600087803b158015611bf257600080fd5b505af1158015611c06573d6000803e3d6000fd5b505050507f519b5a9478dd5d49c48a5b9e53004df16bb83294c0b0e680000bd4c49ec4187f8160405161191891815260200190565b60405163a82620d560e01b81526004810182905260009081906001600160a01b037f000000000000000000000000d641dde60985fab88c623188adba6be3148288d9169063a82620d590602401602060405180830381865afa158015611ca5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cc99190612e7e565b90506002610716565b60098181548110610d4257600080fd5b6000600354600003611cf657506000919050565b600060035483611d069190612ecb565b90506000600a828154811061081d5761081d612edf565b611d25611d58565b6001600160a01b038116611d4f57604051631e4fbdf760e01b8152600060048201526024016107a6565b6107d78161242c565b6000546001600160a01b031633146113d85760405163118cdaa760e01b81523360048201526024016107a6565b611d8d611e21565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611dc83390565b6040516001600160a01b03909116815260200160405180910390a1565b611ded612a32565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33611dc8565b600054600160a01b900460ff16156113d85760405163d93c066560e01b815260040160405180910390fd5b6000828152600b602090815260408083208151606081018352815481526001909101546001600160a01b038116938201849052600160a01b90046001600160501b031691810191909152903314611eb65760405163129844d160e01b815260040160405180910390fd5b620151806901969368974c05b0000082604001516001600160501b031642611ede9190612fa8565b611ee89190612fbb565b611ef29190612fd2565b91508160056000828254611f069190612f28565b90915550506005546b033b2e3c9fd0803ce80000001015611f3a57604051637b98a11960e01b815260040160405180910390fd5b821561205a576202a30081604001516001600160501b031642611f5d9190612fa8565b1015611f7c576040516301845c4160e11b815260040160405180910390fd5b6023611f8785612a5c565b1015611f9b57611f9682612ac8565b600091505b60028054906000611fab83612f54565b90915550506000848152600b6020526040808220918255600190910180546001600160f01b0319169055516323b872dd60e01b81527f000000000000000000000000d641dde60985fab88c623188adba6be3148288d96001600160a01b0316906323b872dd9061202390309033908990600401612f6b565b600060405180830381600087803b15801561203d57600080fd5b505af1158015612051573d6000803e3d6000fd5b5050505061210c565b612079606461206a600f85612fbb565b6120749190612fd2565b612ac8565b6064612086600f82612fa8565b6120909084612fbb565b61209a9190612fd2565b604080516060810182528681523360208083019182526001600160501b0342811684860190815260008b8152600b90935294909120925183559051600190920180549351909116600160a01b026001600160f01b03199093166001600160a01b03929092169190911791909117905591505b6040805185815260208101849052841515918101919091527ff575d895a5b0e89bce32e321a1232a7660b0644f89148d09d8a4ac84da37b8cc906060015b60405180910390a15092915050565b6000828152600b602090815260408083208151606081018352815481526001909101546001600160a01b038116938201849052600160a01b90046001600160501b0316918101919091529033146121c35760405163129844d160e01b815260040160405180910390fd5b80604001516001600160501b03166007546121de9190612fa8565b915082156122a557600380549060006121f683612f54565b90915550506000848152600b6020526040808220918255600190910180546001600160f01b0319169055516323b872dd60e01b81527f000000000000000000000000d641dde60985fab88c623188adba6be3148288d96001600160a01b0316906323b872dd9061226e90309033908990600401612f6b565b600060405180830381600087803b15801561228857600080fd5b505af115801561229c573d6000803e3d6000fd5b50505050612318565b604080516060810182528581523360208083019182526007546001600160501b0390811684860190815260008a8152600b90935294909120925183559051600190920180549351909116600160a01b026001600160f01b03199093166001600160a01b0392909216919091179190911790555b6040805185815260208101849052841515918101919091527f56df455d60247ba0025aaa90af586e30390ad9f3edfe21a8b253713fd351f3409060600161214a565b6001600160a01b0382166000908152600c60205260408120805490915b8181101561138e57600083828154811061239357612393612edf565b9060005260206000200154905084810361241957835484906123b790600190612fa8565b815481106123c7576123c7612edf565b90600052602060002001548483815481106123e4576123e4612edf565b90600052602060002001819055508380548061240257612402612fe6565b600190038181906000526020600020016000905590555b508061242481612f3b565b915050612377565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b604080516060810182528281526001600160a01b0380851660208084019182526001600160501b034281168587019081526000888152600b909352958220945185559151600190940180549551909216600160a01b026001600160f01b0319909516939092169290921792909217905560028054916124fa83612f3b565b9091555050600980546001810182556000919091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af01819055604080516001600160a01b03841681526020810183905242918101919091527f6173e4d2d9dd52aae0ed37afed3adcf924a490639b759ca93d32dc43366c17d2906060015b60405180910390a15050565b604080516060810182528281526001600160a01b0380851660208084019182526007546001600160501b039081168587019081526000888152600b909352958220945185559151600190940180549551909216600160a01b026001600160f01b03199095169390921692909217929092179055600380549161260683612f3b565b9091555050600a80546001810182556000919091527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a801819055604080516001600160a01b03841681526020810183905242918101919091527f6173e4d2d9dd52aae0ed37afed3adcf924a490639b759ca93d32dc43366c17d290606001612579565b6000828152600b602090815260408083208151606081018352815481526001909101546001600160a01b03811682850152600160a01b90046001600160501b031681830152338452600c8352818420805483518186028101860190945280845291938593929083018282801561271e57602002820191906000526020600020905b81548152602001906001019080831161270a575b505050505090506000815190506000805b8281101561279257600084828151811061274b5761274b612edf565b6020026020010151905082601e036127635750612792565b61276c816115f7565b1561277f5761277c600a84612f28565b92505b508061278a81612f3b565b91505061272f565b506201518069010f0cf064dd5920000085604001516001600160501b0316426127bb9190612fa8565b6127c59190612fbb565b6127cf9190612fd2565b945060646127dd8287612fbb565b6127e79190612fd2565b6127f19086612f28565b945084600560008282546128059190612f28565b90915550506005546b033b2e3c9fd0803ce8000000101561283957604051637b98a11960e01b815260040160405180910390fd5b8515612944576203f48084604001516001600160501b03164261285c9190612fa8565b101561287b576040516301845c4160e11b815260040160405180910390fd5b603261288688612a5c565b101561289a5761289585612ac8565b600094505b6000878152600b6020526040808220918255600190910180546001600160f01b0319169055516323b872dd60e01b81527f000000000000000000000000d641dde60985fab88c623188adba6be3148288d96001600160a01b0316906323b872dd9061290d90309033908c90600401612f6b565b600060405180830381600087803b15801561292757600080fd5b505af115801561293b573d6000803e3d6000fd5b505050506129e7565b612954606461206a601488612fbb565b6064612961601482612fa8565b61296b9087612fbb565b6129759190612fd2565b604080516060810182528981523360208083019182526001600160501b0342811684860190815260008e8152600b90935294909120925183559051600190920180549351909116600160a01b026001600160f01b03199093166001600160a01b03929092169190911791909117905594505b60408051888152602081018790528715158183015290517f6dd046fd164e9edf766b527ffdce5c6d7c792c435be0f18c5390d4d30b72b05a9181900360600190a15050505092915050565b600054600160a01b900460ff166113d857604051638dfc202b60e01b815260040160405180910390fd5b6000606433612a6c600143612fa8565b60405160609290921b6bffffffffffffffffffffffff19166020830152406034820152426054820152607481018490526094016040516020818303038152906040528051906020012060001c612ac29190612ecb565b92915050565b600354600003612aec578060066000828254612ae49190612f28565b909155505050565b600354600654612afc9083612f28565b612b069190612fd2565b60076000828254612b179190612f28565b9091555050600060065550565b50805460008255600202906000526020600020908101906107d791905b80821115612b6757600081556001810180546001600160f01b0319169055600201612b41565b5090565b600060208284031215612b7d57600080fd5b5035919050565b6001600160a01b03811681146107d757600080fd5b600080600080600060808688031215612bb157600080fd5b8535612bbc81612b84565b94506020860135612bcc81612b84565b935060408601359250606086013567ffffffffffffffff80821115612bf057600080fd5b818801915088601f830112612c0457600080fd5b813581811115612c1357600080fd5b896020828501011115612c2557600080fd5b9699959850939650602001949392505050565b80358015158114612c4857600080fd5b919050565b600060208284031215612c5f57600080fd5b612c6882612c38565b9392505050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112612c9657600080fd5b8135602067ffffffffffffffff80831115612cb357612cb3612c6f565b8260051b604051601f19603f83011681018181108482111715612cd857612cd8612c6f565b604052938452858101830193838101925087851115612cf657600080fd5b83870191505b84821015612d1557813583529183019190830190612cfc565b979650505050505050565b60008060408385031215612d3357600080fd5b823567ffffffffffffffff811115612d4a57600080fd5b612d5685828601612c85565b925050612d6560208401612c38565b90509250929050565b600060208284031215612d8057600080fd5b813567ffffffffffffffff811115612d9757600080fd5b612da384828501612c85565b949350505050565b60008060408385031215612dbe57600080fd5b823567ffffffffffffffff811115612dd557600080fd5b612de185828601612c85565b95602094909401359450505050565b60008060408385031215612e0357600080fd5b8235612e0e81612b84565b946020939093013593505050565b60008060408385031215612e2f57600080fd5b50508035926020909101359150565b60008060408385031215612e5157600080fd5b82359150612d6560208401612c38565b600060208284031215612e7357600080fd5b8135612c6881612b84565b600060208284031215612e9057600080fd5b815160038110612c6857600080fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b600082612eda57612eda612eb5565b500690565b634e487b7160e01b600052603260045260246000fd5b600060208284031215612f0757600080fd5b8151612c6881612b84565b634e487b7160e01b600052601160045260246000fd5b80820180821115612ac257612ac2612f12565b600060018201612f4d57612f4d612f12565b5060010190565b600081612f6357612f63612f12565b506000190190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b600060208284031215612fa157600080fd5b5051919050565b81810381811115612ac257612ac2612f12565b8082028115828204841417612ac257612ac2612f12565b600082612fe157612fe1612eb5565b500490565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220829bb940a4ec5b37ae55cb9da1333c4483d8f62f320a6aa7ebde78eff55a37d564736f6c63430008140033

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

0000000000000000000000002536fe9ab3f511540f2f9e2ec2a805005c3dd800000000000000000000000000a82eb14d67dd9f0e9fda72e1a85e7d6f3c4c616d000000000000000000000000d641dde60985fab88c623188adba6be3148288d900000000000000000000000007fd77f6a74675501564f9d6ece327a0909b3757000000000000000000000000f92f745d01dcf362ad3e6e4baad24230dedcffdf

-----Decoded View---------------
Arg [0] : _blastPointsAddress (address): 0x2536FE9ab3F511540F2f9e2eC2A805005C3Dd800
Arg [1] : _pointsOperator (address): 0xa82Eb14D67dd9F0E9FdA72e1a85E7d6F3C4c616d
Arg [2] : _blastRunnersAddress (address): 0xd641DDE60985fAb88c623188aDbA6BE3148288d9
Arg [3] : _businessAddress (address): 0x07fd77f6A74675501564F9D6eCe327a0909b3757
Arg [4] : _creditsAddress (address): 0xF92F745d01dCF362AD3E6E4bAad24230DEdCfFDF

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 0000000000000000000000002536fe9ab3f511540f2f9e2ec2a805005c3dd800
Arg [1] : 000000000000000000000000a82eb14d67dd9f0e9fda72e1a85e7d6f3c4c616d
Arg [2] : 000000000000000000000000d641dde60985fab88c623188adba6be3148288d9
Arg [3] : 00000000000000000000000007fd77f6a74675501564f9d6ece327a0909b3757
Arg [4] : 000000000000000000000000f92f745d01dcf362ad3e6e4baad24230dedcffdf


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.