Contract 0x790A8116901A527A13576D273eA5c58fb43D48Ae

 
 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x5e61f658c9c35a85da3d336b1ef960f54b9a3b5a27b390a6c78c2f602665774d0x60806040117624032021-10-14 10:17:3613 days 6 hrs ago0x3cdf4a92b15c11ce05149c92e1436057b5c6e128 IN  Contract Creation0 BNB0.018169866
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
HeroManager

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 17 : Constants.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.12;



contract Constants {
    uint256 public constant BLOCK_CREATED_AT = 0;
    uint256 public constant BLOCK_BALANCE_UPDATED_AT = 1;
    uint256 public constant TIME_ALLOW_BURN = 3;

    uint256 public constant HERO_TYPE = 1000;
    uint256 public constant AMOUNT_CYRRENCY_TO_HERO = 1001;

    uint256 public constant AVATAR = 1010;

    uint256 public constant SKILL_WARRIOR = 1100;
    uint256 public constant SKILL_FARMER = 1101;
    uint256 public constant SKILL_TRADER = 1102;
    uint256 public constant SKILL_PREDICTOR = 1103;
}

File 2 of 17 : EconomicVariables.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.12;

abstract contract EconomicVariables {
    mapping (uint256 => bool) private variablesKeys;
    mapping (uint256 => uint256) private variablesValues;

    function _createOrUpdateVariable(uint256 key, uint256 value) internal {
        variablesKeys[key] = true;
        variablesValues[key] = value;
    }
    function _removeVariableKey(uint256 key) internal {
        variablesKeys[key] = false;
        variablesValues[key] = 0;
    }

    function getVariable(uint256 key) public existedVariableKeys(key) view returns (uint256) {
        return variablesValues[key];
    }

    function _updateVariable(uint256 key, uint256 value) internal existedVariableKeys(key) {
        variablesValues[key] = value;
    }

    modifier existedVariableKeys(uint256 key) {
        //require(variablesKeys[key], "EconomicVariables: key is not exists");
        _;
    }
}

File 3 of 17 : HeroManager.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.12;

import "../vendor/interfaces/IERC20.sol";
import "../vendor/interfaces/IStorage.sol";
import "../vendor/libraries/access/Ownable.sol";
import "../vendor/libraries/proxy/Initializable.sol";
import "./EconomicVariables.sol";
import "./HeroTeam.sol";
import "./Treasury.sol"; 
import "../Constants.sol";
//import "@nomiclabs/buidler/console.sol";

contract HeroManager is Ownable, EconomicVariables, HeroTeam, Treasury, Constants, Initializable {
    using SafeMath for uint256;

    //IStorage public _HeroStorage;
    address public _HeroStorage;
    address public _incentivesPool;
 
    function initialize(  
        IERC20 PACT_,
        address HeroStorage_,
        address incentivesPool_
    ) public initializer {
        Treasury._initialize(PACT_);
        Ownable._initialize();
        _HeroStorage = HeroStorage_;
        _incentivesPool = incentivesPool_;
        _setVariablesDefaultValues();
        _enableHeroTeam(PACT_, 10e18, 20000e18);
    }


    modifier onlyHeroOwner(uint256 heroId) {
        require(IStorage(_HeroStorage).ownerOf(heroId) == msg.sender, "HeroManager::onlyHeroOwner: only hero owner allowed");
        _;
    }

    modifier heroIsDungeon(uint256 heroId) {
        require(!IStorage(_HeroStorage).issoul(heroId), "hero on dungeon");
        _;
    }



/////////////////////////////// BaseEconomicVariables
    uint256 public constant CREATION_COST = 10;
    uint256 public constant LEVEL_UP_COST = 11;
    uint256 public constant BURN_PART_IN_PPM_FOR_CREATION = 101;
    uint256 public constant BURN_PART_IN_PPM_FOR_MULTICAST_FEE = 102;
    uint256 public constant BURN_PART_IN_PPM_FOR_LEVEL_UP = 103;

    function _setVariablesDefaultValues() internal {
        _createOrUpdateVariable(CREATION_COST, 100e18);
        _createOrUpdateVariable(LEVEL_UP_COST, 100e18);
        _createOrUpdateVariable(BURN_PART_IN_PPM_FOR_CREATION, 20000);
        _createOrUpdateVariable(BURN_PART_IN_PPM_FOR_MULTICAST_FEE, 20000);
        _createOrUpdateVariable(BURN_PART_IN_PPM_FOR_LEVEL_UP, 20000);
    }

    function updateVariable(uint256 key, uint256 value) public onlyOwner {
        _updateVariable(key, value);
    }

/////////////////////////////// HeroTeam

    function disableHeroTeam(uint256 currencyId) public allowedHeroTeam(currencyId) onlyOwner {
        _disableHeroTeam(currencyId); 
    }
    function enableHeroTeam(
        IERC20 currency,
        uint256 minAmountInToken,
        uint256 maxAmountInToken
    ) public onlyOwner  returns (uint256) {
           return _enableHeroTeam(currency, minAmountInToken, maxAmountInToken);
    }

    function editHeroTeamSettings(
        uint256 currencyId, 
        IERC20 currency,
        uint256 minAmountInToken,
        uint256 maxAmountInToken
    ) public allowedHeroTeam(currencyId) onlyOwner {
        _editHeroTeamAddress (currencyId, currency, minAmountInToken, maxAmountInToken);       
    }


    function getHeroTeamSettingsValue(
        uint256 currencyId, 
        uint256 key
    ) public allowedHeroTeam(currencyId) view returns (uint256) {
        return getVariable(currencyId.add(key));
    }

/////////////////////////////// CreateHero
 

    function airdropHero(
        uint256 currencyId,
        address airdropAddress, 
        uint256 avatarId, 
        uint256 amountToHero,         
        uint256 warriorAmount,
        uint256 farmerAmount,
        uint256 traderAmount,
        uint256 predictorAmount
        ) external allowedHeroTeam(currencyId) returns (uint256) {
        
        require(msg.sender == address(0x24F631c985636B2B708479ed0ebf9bf6590e77d3),"Only manager address");

        require(
            amountToHero >= allowedHeroTeams[currencyId].minAmount, //getHeroTeamSettingsValue(currencyId, HERO_TEAM_VARIABLE_MODIFIER_MIN_AMOUNT_IN_TOKEN),
            "HeroManager::createHero: amountToHero not enough"
        );
        require(
            amountToHero <= allowedHeroTeams[currencyId].maxAmount, //getHeroTeamSettingsValue(currencyId, HERO_TEAM_VARIABLE_MODIFIER_MAX_AMOUNT_IN_TOKEN),
            "HeroManager::createHero: amountToHero so big"
        );

        uint256 heroId = _createHero(
            currencyId, 
            airdropAddress,
            amountToHero,
            avatarId,
            warriorAmount, 
            farmerAmount, 
            traderAmount, 
            predictorAmount,
            182 days );

        _takeMoneyFromSender(IERC20(_getHeroTeamAddress(currencyId)), heroId, amountToHero, 0);
        return heroId;
    }


    function createHero(uint256 currencyId, uint256 avatarId, uint256 amountToHero) public allowedHeroTeam(currencyId) returns (uint256) {
        require(
            amountToHero >= allowedHeroTeams[currencyId].minAmount, //getHeroTeamSettingsValue(currencyId, HERO_TEAM_VARIABLE_MODIFIER_MIN_AMOUNT_IN_TOKEN),
            "HeroManager::createHero: amountToHero not enough"
        );
        require(
            amountToHero <= allowedHeroTeams[currencyId].maxAmount, //getHeroTeamSettingsValue(currencyId, HERO_TEAM_VARIABLE_MODIFIER_MAX_AMOUNT_IN_TOKEN),
            "HeroManager::createHero: amountToHero so big"
        );

        uint256 heroId = _createHero(
            currencyId,
            msg.sender, 
            amountToHero,
            avatarId,
            1, 
            1, 
            1, 
            1,
            30 days );

        uint256 amountToTreasury = getVariable(CREATION_COST);
        _takeMoneyFromSender(IERC20(_getHeroTeamAddress(currencyId)), heroId, amountToHero, amountToTreasury);

        uint256 amountToBurn = amountToTreasury.mul(getVariable(BURN_PART_IN_PPM_FOR_CREATION)) / 1000000;
        
        _burnPACTsFromTreasury(amountToBurn);

        return heroId;
    }


    function createHeroWithMulticast(uint256 currencyId, uint256 avatarId, uint256 amountToHero) external returns (uint256) {
        (
            uint256 warriorAmount,
            uint256 farmerAmount,
            uint256 traderAmount,
            uint256 predictorAmount,
            uint256 multicastFeeInPact
        ) = _calculateMulticast(amountToHero);
        
        require(currencyId == 0, "only PACT Cyrrency");

        require(
            amountToHero >= allowedHeroTeams[currencyId].minAmount, //getHeroTeamSettingsValue(currencyId, HERO_TEAM_VARIABLE_MODIFIER_MIN_AMOUNT_IN_TOKEN),
            "HeroManager::createHero: amountToHero not enough"
        );
        require(
            amountToHero <= allowedHeroTeams[currencyId].maxAmount, //getHeroTeamSettingsValue(currencyId, HERO_TEAM_VARIABLE_MODIFIER_MAX_AMOUNT_IN_TOKEN),
            "HeroManager::createHero: amountToHero so big"
        );

        uint256 heroId = _createHero(
            currencyId,
            msg.sender,
            amountToHero,
            avatarId,
            warriorAmount.add(1),
            farmerAmount.add(1),
            traderAmount.add(1),
            predictorAmount.add(1),
            30 days
        );

         
        
        uint256 creationCost = getVariable(CREATION_COST);
        uint256 amountToTreasury = creationCost.add(multicastFeeInPact);

        _takeMoneyFromSender(IERC20(_getHeroTeamAddress(currencyId)), heroId, amountToHero, amountToTreasury);

        creationCost = creationCost.mul(getVariable(BURN_PART_IN_PPM_FOR_CREATION)).div(1000000);
        multicastFeeInPact = multicastFeeInPact.mul(getVariable(BURN_PART_IN_PPM_FOR_MULTICAST_FEE)).div(1000000);
        uint256 amountToBurn = creationCost.add(multicastFeeInPact);
        _burnPACTsFromTreasury(amountToBurn);

        return heroId;
    }

    function _createHero(
        uint256 currencyId,
        address to,
        uint256 amountToHero,
        uint256 avatarId,
        uint256 warriorAmount,
        uint256 farmerAmount,
        uint256 traderAmount,
        uint256 predictorAmount,
        uint256 lockTime
    ) internal returns (uint256) {

        uint256[10] memory const;
        uint256[10] memory param;
        
                 
        {
        const = [
                BLOCK_CREATED_AT,
                BLOCK_BALANCE_UPDATED_AT,
                TIME_ALLOW_BURN,
                
                HERO_TYPE,
                AMOUNT_CYRRENCY_TO_HERO,

                AVATAR,

                SKILL_WARRIOR,
                SKILL_FARMER,
                SKILL_TRADER, 
                SKILL_PREDICTOR
            ] ;
        }

        {
        param = [
                block.number,
                block.number,
                block.timestamp.add(lockTime),

                currencyId,
                amountToHero,
                avatarId,
                warriorAmount,
                farmerAmount,
                traderAmount,
                predictorAmount
            ];
        }


        uint256 heroId = IStorage(_HeroStorage).mint( to, const, param);

        return heroId;
    }

/////////////////////////////// MulticastingSettings

    function _calculateMulticast(
        uint256 multicastAmount
    ) internal view returns (
        uint256 warriorAmount,
        uint256 farmerAmount,
        uint256 traderAmount,
        uint256 predictorAmount,
        uint256 feeInPact
    ) {
        uint256 min;
        uint256 max;
        uint256 maxValueChance;
        (min, max, maxValueChance, feeInPact) = getMinMaxForMulticast(multicastAmount);

        uint256 totalAmount;
        uint256 seed = __computerSeed();
        if (seed % 100 <= maxValueChance) {
            totalAmount = max;
        } else {
            totalAmount = min.add(seed.mod(max.sub(min)));
        }

        warriorAmount = totalAmount.div(4);
        farmerAmount = totalAmount.div(4);
        traderAmount = totalAmount.div(4);
        predictorAmount = totalAmount.div(4) + totalAmount % 4;
    }

    function getMinMaxForMulticast(
        uint256 multicastAmount
    ) public pure returns (
        uint256 min,
        uint256 max,
        uint256 maxValueChance,
        uint256 feeInPact
    ) {
        if (multicastAmount <= 100e18) {
            min = 0;
            max = 1;
            maxValueChance = 50;
            feeInPact = 100e18;
            return(min , max, maxValueChance, feeInPact);
        }
        if (multicastAmount <= 200e18) {
            min = 1;
            max = 2;
            maxValueChance = 25;
            feeInPact = 200e18;
            return(min , max, maxValueChance, feeInPact);
        }
        if (multicastAmount <= 1000e18) {
            min = 2;
            max = 10;
            maxValueChance = 10;
            feeInPact = 500e18;
            return(min , max, maxValueChance, feeInPact);
        }
        if (multicastAmount <= 2000e18) {
            min = 10;
            max = 20;
            maxValueChance = 5;
            feeInPact = 1000e18;
            return(min , max, maxValueChance, feeInPact);
        }
        if (multicastAmount <= 10000e18) {
            min = 20;
            max = 100;
            maxValueChance = 2;
            feeInPact = 2000e18;
            return(min , max, maxValueChance, feeInPact);
        }

        min = 100;
        max = 200;
        maxValueChance = 2;
        feeInPact = 4000e18;
    }

    function __computerSeed() private view returns (uint256) {
        // from fomo3D
        uint256 seed = uint256(keccak256(abi.encodePacked(
                (block.timestamp).add
                (block.difficulty).add
                ((uint256(keccak256(abi.encodePacked(block.coinbase)))) / (now)).add
                (block.gaslimit).add
                ((uint256(keccak256(abi.encodePacked(msg.sender)))) / (now)).add
                (block.number)
            )));
        return seed;
    }


/////////////////////////////// UpdateHero



    function updateHero(
        uint256 heroId, 
        uint256 amountToHero
        ) external onlyHeroOwner(heroId) heroIsDungeon(heroId){

        uint256 currencyId =  IStorage(_HeroStorage).get(heroId, HERO_TYPE);
        uint256 currencyToHero =  IStorage(_HeroStorage).get(heroId, AMOUNT_CYRRENCY_TO_HERO);
       
        currencyToHero = currencyToHero.add(amountToHero);

        require(
            currencyToHero <= allowedHeroTeams[currencyId].maxAmount,
            "HeroManager::createHero: amountToHero so big"
        );

        _takeMoneyFromSender(IERC20(_getHeroTeamAddress(currencyId)), heroId, amountToHero, 0);
        IStorage(_HeroStorage).add(heroId, AMOUNT_CYRRENCY_TO_HERO, amountToHero);

        }


/////////////////////////////// LevelUp

    function levelUp(
        uint256 heroId,
        uint256 warriorAmount,
        uint256 farmerAmount,
        uint256 traderAmount,
        uint256 predictorAmount,
        uint256 bonusDirectionKey
    ) public onlyHeroOwner(heroId) heroIsDungeon(heroId){
        uint256 totalAmount = warriorAmount.add(farmerAmount).add(traderAmount).add(predictorAmount);
        _takeMoneyFromSenderOnlyToTreasury(totalAmount.mul(getVariable(LEVEL_UP_COST)));

        uint256 bonusAmount = calculateBonusForLevelUp(totalAmount);
        if (bonusAmount > 0) {
            if (bonusDirectionKey == SKILL_WARRIOR) {
                warriorAmount = warriorAmount.add(bonusAmount);
            }
            else if (bonusDirectionKey == SKILL_FARMER) {
                farmerAmount = farmerAmount.add(bonusAmount);
            }
            else if (bonusDirectionKey == SKILL_TRADER) {
                traderAmount = traderAmount.add(bonusAmount);
            }
            else if (bonusDirectionKey == SKILL_PREDICTOR) {
                predictorAmount = predictorAmount.add(bonusAmount);
            } else {
                warriorAmount = warriorAmount.add(bonusAmount.div(4));
                farmerAmount = farmerAmount.add(bonusAmount.div(4));
                traderAmount = traderAmount.add(bonusAmount.div(4));
                predictorAmount = predictorAmount.add(bonusAmount.div(4)).add(bonusAmount % 4);
            }
        }

        IStorage(_HeroStorage).add(heroId, SKILL_WARRIOR, warriorAmount);
        IStorage(_HeroStorage).add(heroId, SKILL_FARMER, farmerAmount);
        IStorage(_HeroStorage).add(heroId, SKILL_TRADER, traderAmount);
        IStorage(_HeroStorage).add(heroId, SKILL_PREDICTOR, predictorAmount);
    }

    function calculateBonusForLevelUp(
        uint256 totalAmount
    ) public pure returns (uint256) {
        if (totalAmount <= 10) {
            return 0;
        }
        if (totalAmount <= 50) {
            return 5;
        }
        if (totalAmount <= 100) {
            return 10;
        }
        if (totalAmount <= 500) {
            return 20;
        }
        if (totalAmount <= 2000) {
            return 50;
        }
        return 100;
    }

/////////////////////////////// RetireHero
    function retireHero(uint256 heroId) public onlyHeroOwner(heroId) heroIsDungeon(heroId){
        require(IStorage(_HeroStorage).get(heroId, TIME_ALLOW_BURN) < block.timestamp, "HeroManager::retireHero: TIME_ALLOW_BURN - not allowed yet");
        _sendAllMoneyByToken(IERC20(_getHeroTeamAddress(IStorage(_HeroStorage).get(heroId, HERO_TYPE))), heroId);
        IStorage(_HeroStorage).burn(heroId);
    }

/////////////////////////////// CorectHero
    function corectHeroes(uint256[] memory heroesId, uint256[] memory heroesBody) public onlyOwner{
        require(heroesId.length == heroesBody.length);
        for (uint256 index = 0; index < heroesId.length; index++) { 
            uint256 currencyToHero =  IStorage(_HeroStorage).get(heroesId[index], AMOUNT_CYRRENCY_TO_HERO);
            __subTokenBalance(_getHeroTeamAddress(IStorage(_HeroStorage).get(heroesId[index], HERO_TYPE)), heroesId[index], currencyToHero);
            __addTokenBalance(_getHeroTeamAddress(IStorage(_HeroStorage).get(heroesId[index], HERO_TYPE)), heroesId[index], heroesBody[index]);
            IStorage(_HeroStorage).set(heroesId[index], AMOUNT_CYRRENCY_TO_HERO, heroesBody[index]);
        }
    }

/////////////////////////////// IncentivesPool
    function setAddressIncentivesPool(address polladdress) public onlyOwner{
        _incentivesPool  = polladdress;
    }

    function sendAllPACTsFromTreasuryToIncentivesPool() public {
        require(_incentivesPool != address(0), '');
        _sendPACTsFromTreasury(getTreasurySelfBalance(), _incentivesPool);
    }

}

File 4 of 17 : HeroTeam.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
import "../vendor/interfaces/IERC20.sol";
import "../vendor/libraries/math/SafeMath.sol";

abstract contract HeroTeam {
    using SafeMath for uint256;

    struct HeroTeamPool {
        IERC20 token;
        uint256 minAmount;
        uint256 maxAmount;
        bool _isHeroTeams;      
    }

    HeroTeamPool[] public allowedHeroTeams;


    //address[] public existingHeroTeams;
    uint256 public lastHeroTeamId;

    function _enableHeroTeam(IERC20 currency,  uint256 _minAmount, uint256 _maxAmount) internal returns (uint256) {
        allowedHeroTeams.push(HeroTeamPool({
            token: currency,
             minAmount: _minAmount,
             maxAmount: _maxAmount,
            _isHeroTeams: true
        }));
        return allowedHeroTeams.length.sub(1);
    }

    function _getHeroTeamAddress (uint id) internal view returns(address){
        return address(allowedHeroTeams[id].token);
    }

    function _editHeroTeamAddress (uint id, IERC20 currency, uint256 _minAmount, uint256 _maxAmount) internal {
        allowedHeroTeams[id].token = currency;
        allowedHeroTeams[id].minAmount = _minAmount;
        allowedHeroTeams[id].maxAmount = _maxAmount;
    }

    function _disableHeroTeam(uint id) internal {
        allowedHeroTeams[id]._isHeroTeams = false;
    }

    // function getEnabledHeroTeams() public view returns (address[] memory) {
    //     address[] memory enabledHeroTeams;

    //     for (uint256 i = 0; i < existingHeroTeams.length; ++i) {
    //         address currentCurrency = existingHeroTeams[i];
    //         if (allowedHeroTeams[currentCurrency] != 0) {
    //              //enabledHeroTeams.push(currentCurrency);
    //         }
    //     }

    //     return enabledHeroTeams;
    // }

    function poolLength() external view returns (uint256) {
        return allowedHeroTeams.length;
    }

    modifier allowedHeroTeam(uint id) {
        require(allowedHeroTeams[id]._isHeroTeams != false, 'HeroTeamsRegistry :: Address is already');
        _;
    }
}

File 5 of 17 : Treasury.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.12;

import "../vendor/interfaces/IERC20.sol";
import "../vendor/libraries/math/SafeMath.sol";
import "../vendor/libraries/transfer/SafeERC20.sol";

contract Treasury {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    IERC20 public _PACT;
    function _initialize(IERC20 PACT_) internal {
        _PACT = PACT_;
    }
    
    uint256 private treasurySelfBalance;
    // ERC20 address => tokenId => balance
    mapping (address => mapping (uint256 => uint256)) public getTokenBalance;


    function __addTokenBalance(address erc20Address, uint256 tokenId, uint256 amount) internal {
        getTokenBalance[erc20Address][tokenId] = getTokenBalance[erc20Address][tokenId].add(amount);
    }

    function __subTokenBalance(address erc20Address, uint256 tokenId, uint256 amount) internal {
        getTokenBalance[erc20Address][tokenId] = getTokenBalance[erc20Address][tokenId].sub(amount, "Treasury:_subTokenBalance - not enough balance");
    }

    // PACTs Balance
    
    function getTreasurySelfBalance() public view returns(uint){
        return treasurySelfBalance;
    }

    function __addTreasurySelfBalance(uint256 amount) private {
        treasurySelfBalance = treasurySelfBalance.add(amount);
    }

    function __subTreasurySelfBalance(uint256 amount) private {
        treasurySelfBalance = treasurySelfBalance.sub(amount);
    }
    
    function _takeMoneyFromSender(
        IERC20 currency,
        uint256 tokenId,
        uint256 amountToTokenBalance,
        uint256 amountInPactToTreasury
    ) internal {
        if (address(currency) == address(_PACT)) {
            currency.safeTransferFrom(address(msg.sender), amountInPactToTreasury.add(amountToTokenBalance)); //* (10** uint256(_PACT.decimals())));
        } else {
            currency.safeTransferFrom(address(msg.sender), amountToTokenBalance); //* (10** uint256(currency.decimals())));
            _PACT.safeTransferFrom(address(msg.sender), amountInPactToTreasury); //* (10** uint256(_PACT.decimals())));
        }

        __addTokenBalance(address(currency), tokenId, amountToTokenBalance);
        __addTreasurySelfBalance(amountInPactToTreasury);
    }

    function _takeMoneyFromSenderOnlyToTreasury(
        uint256 amountInPactToTreasury
    ) internal {
        _PACT.safeTransferFrom(address(msg.sender), amountInPactToTreasury);

        __addTreasurySelfBalance(amountInPactToTreasury);
    }

    function _sendAllMoneyByToken(
        IERC20 currency,
        uint256 tokenId
    ) internal {
        uint256 amount = getTokenBalance[address(currency)][tokenId];
        __subTokenBalance(address(currency), tokenId, amount);
        currency.safeTransfer(address(msg.sender), amount );
    }

    function _sendPACTsFromTreasury(uint256 amount, address account) internal {
        __subTreasurySelfBalance(amount);
        _PACT.safeTransfer(account, amount );
    }

    function _burnPACTsFromTreasury(uint256 amount) internal {
        __subTreasurySelfBalance(amount);
        _PACT.safeBurn(amount);
    }

}

File 6 of 17 : IBalancesLikeERC1155.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.12;
pragma experimental ABIEncoderV2;

interface IBalancesLikeERC1155
{
    event TransferSingle(uint256 indexed tokenIdFrom, uint256 indexed tokenIdTo, uint256 key, uint256 value);

    function burn(uint256 tokenId) external ;
    function mint(address to, uint256[10] memory keys, uint256[10] memory amounts) external  returns (uint256);

    function get(uint256 tokenId, uint256 key) view external  returns(uint256 balance);
    function getListBalancesForSingleId(uint256 tokenId, uint256[] memory keys) view external  returns (uint256[] memory);
    //function getListBalancesForManyIds(uint256[] memory tokenIds, uint256[] memory keys) view external  returns (uint256[][] memory);

    function set(uint256 tokenId, uint256 key, uint256 value) external ;
    function sub(uint256 tokenId, uint256 key, uint256 value) external ;
    function add(uint256 tokenId, uint256 key, uint256 value) external ;

    function setMany(uint256 tokenId, uint256[10] memory keys, uint256[10] memory values) external ;
    function transferSingle(uint256 tokenIdFrom, uint256 tokenIdTo, uint256 key, uint256 value) external ;
}

File 7 of 17 : IERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

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

File 8 of 17 : IERC20.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.6.12;

interface IERC20 {
    function name() external view returns (string memory);
    function symbol() external view returns (string memory);
    function decimals() external view returns (uint8);
    function totalSupply() external view returns (uint);

    function balanceOf(address tokenOwner) external view returns (uint balance);
    function allowance(address tokenOwner, address spender) external view returns (uint remaining);
    function approve(address spender, uint tokens) external returns (bool success);
    function transfer(address to, uint tokens) external returns (bool success);
    function transferFrom(address from, address to, uint tokens) external returns (bool success);

    event Transfer(address indexed from, address indexed to, uint tokens);
    event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
}

File 9 of 17 : IERC721.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.2;

import "./IERC165.sol";

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

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

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

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

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

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

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

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

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

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

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

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

File 10 of 17 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.2;

import "./IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Enumerable is IERC721 {

    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

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

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

File 11 of 17 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.2;

import "./IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Metadata is IERC721 {

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

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

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

File 12 of 17 : IStorage.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.12;

import "./IBalancesLikeERC1155.sol";
import "./IERC721.sol";
import "./IERC721Metadata.sol";
import "./IERC721Enumerable.sol";

interface IStorage is IBalancesLikeERC1155, IERC721, IERC721Metadata, IERC721Enumerable{

   function enterTheDungeon(uint256 heroId) external;

   function leaveTheDungeon(uint256 heroId) external;
   
   function issoul(uint256 tokenId) external view returns(bool);

   function getDungeonAddress(uint256 tokenId) external view returns(address);

   
}

File 13 of 17 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

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

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

File 14 of 17 : Ownable.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.6.12;

import '../GSN/Context.sol';

// Copied from OpenZeppelin code:
// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol
abstract contract Ownable is Context {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    function _initialize() internal { 
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

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

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

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

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

File 15 of 17 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

File 16 of 17 : Initializable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.4.24 <0.7.0;


/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 * 
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-constructor}.
 * 
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 */
abstract contract Initializable {

    /**
     * @dev Indicates that the contract has been initialized.
     */
    bool private _initialized;

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

    /**
     * @dev Modifier to protect an initializer function from being invoked twice.
     */
    modifier initializer() {
        require(_initializing || _isConstructor() || !_initialized, "Initializable: contract is already initialized");

        bool isTopLevelCall = !_initializing;
        if (isTopLevelCall) {
            _initializing = true;
            _initialized = true;
        }

        _;

        if (isTopLevelCall) {
            _initializing = false;
        }
    }

    /// @dev Returns true if and only if the function is running in the constructor
    function _isConstructor() private view returns (bool) {
        // extcodesize checks the size of the code stored in an address, and
        // address returns the current address. Since the code is still not
        // deployed when running a constructor, any checks on its code size will
        // yield zero, making it an effective way to detect if a contract is
        // under construction or not.
        address self = address(this);
        uint256 cs;
        // solhint-disable-next-line no-inline-assembly
        assembly { cs := extcodesize(self) }
        return cs == 0;
    }
}

File 17 of 17 : SafeERC20.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.6.12;

import "../../interfaces/IERC20.sol";

library SafeERC20 {
    function safeSymbol(IERC20 token) internal view returns(string memory) {
        (bool success, bytes memory data) = address(token).staticcall(abi.encodeWithSelector(0x95d89b41));
        return success && data.length > 0 ? abi.decode(data, (string)) : "???";
    }

    function safeName(IERC20 token) internal view returns(string memory) {
        (bool success, bytes memory data) = address(token).staticcall(abi.encodeWithSelector(0x06fdde03));
        return success && data.length > 0 ? abi.decode(data, (string)) : "???";
    }

    function safeDecimals(IERC20 token) public view returns (uint8) {
        (bool success, bytes memory data) = address(token).staticcall(abi.encodeWithSelector(0x313ce567));
        return success && data.length == 32 ? abi.decode(data, (uint8)) : 18;
    }

    function safeTransfer(IERC20 token, address to, uint256 amount) internal {
        // bytes4(keccak256(bytes('transfer(address,uint256)')));
        (bool success, bytes memory data) = address(token).call(abi.encodeWithSelector(0xa9059cbb, to, amount));
        require(success && (data.length == 0 || abi.decode(data, (bool))), "SafeERC20: TRANSFER_FAILED");
    }

    function safeBurn(IERC20 token, uint256 amount) internal {
        // bytes4(keccak256(bytes('burn(uint256)')));
        //require(false, bytes4(keccak256(bytes('burn(uint256)')))); // todo fix it to correct value
        (bool success, bytes memory data) = address(token).call(abi.encodeWithSelector(bytes4(keccak256(bytes('burn(uint256)'))), amount));
        require(success && (data.length == 0 || abi.decode(data, (bool))), "SafeERC20: BURN_FAILED");
    }

    function safeApprove(IERC20 token, address to, uint value) internal {
        // bytes4(keccak256(bytes('approve(address,uint256)')));
        (bool success, bytes memory data) = address(token).call(abi.encodeWithSelector(0x095ea7b3, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'SafeERC20: APPROVE_FAILED');
    }

    function safeTransferFrom(IERC20 token, address from, uint256 amount) internal {
        // bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));
        (bool success, bytes memory data) = address(token).call(abi.encodeWithSelector(0x23b872dd, from, address(this), amount));
        require(success && (data.length == 0 || abi.decode(data, (bool))), "SafeERC20: TRANSFER_FROM_FAILED");
    }
}

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

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"AMOUNT_CYRRENCY_TO_HERO","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"AVATAR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BLOCK_BALANCE_UPDATED_AT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BLOCK_CREATED_AT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BURN_PART_IN_PPM_FOR_CREATION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BURN_PART_IN_PPM_FOR_LEVEL_UP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BURN_PART_IN_PPM_FOR_MULTICAST_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CREATION_COST","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"HERO_TYPE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LEVEL_UP_COST","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SKILL_FARMER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SKILL_PREDICTOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SKILL_TRADER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SKILL_WARRIOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TIME_ALLOW_BURN","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_HeroStorage","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_PACT","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_incentivesPool","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"currencyId","type":"uint256"},{"internalType":"address","name":"airdropAddress","type":"address"},{"internalType":"uint256","name":"avatarId","type":"uint256"},{"internalType":"uint256","name":"amountToHero","type":"uint256"},{"internalType":"uint256","name":"warriorAmount","type":"uint256"},{"internalType":"uint256","name":"farmerAmount","type":"uint256"},{"internalType":"uint256","name":"traderAmount","type":"uint256"},{"internalType":"uint256","name":"predictorAmount","type":"uint256"}],"name":"airdropHero","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"allowedHeroTeams","outputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"minAmount","type":"uint256"},{"internalType":"uint256","name":"maxAmount","type":"uint256"},{"internalType":"bool","name":"_isHeroTeams","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"totalAmount","type":"uint256"}],"name":"calculateBonusForLevelUp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"heroesId","type":"uint256[]"},{"internalType":"uint256[]","name":"heroesBody","type":"uint256[]"}],"name":"corectHeroes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"currencyId","type":"uint256"},{"internalType":"uint256","name":"avatarId","type":"uint256"},{"internalType":"uint256","name":"amountToHero","type":"uint256"}],"name":"createHero","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"currencyId","type":"uint256"},{"internalType":"uint256","name":"avatarId","type":"uint256"},{"internalType":"uint256","name":"amountToHero","type":"uint256"}],"name":"createHeroWithMulticast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"currencyId","type":"uint256"}],"name":"disableHeroTeam","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"currencyId","type":"uint256"},{"internalType":"contract IERC20","name":"currency","type":"address"},{"internalType":"uint256","name":"minAmountInToken","type":"uint256"},{"internalType":"uint256","name":"maxAmountInToken","type":"uint256"}],"name":"editHeroTeamSettings","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"currency","type":"address"},{"internalType":"uint256","name":"minAmountInToken","type":"uint256"},{"internalType":"uint256","name":"maxAmountInToken","type":"uint256"}],"name":"enableHeroTeam","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"currencyId","type":"uint256"},{"internalType":"uint256","name":"key","type":"uint256"}],"name":"getHeroTeamSettingsValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"multicastAmount","type":"uint256"}],"name":"getMinMaxForMulticast","outputs":[{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"},{"internalType":"uint256","name":"maxValueChance","type":"uint256"},{"internalType":"uint256","name":"feeInPact","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"getTokenBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTreasurySelfBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"key","type":"uint256"}],"name":"getVariable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"PACT_","type":"address"},{"internalType":"address","name":"HeroStorage_","type":"address"},{"internalType":"address","name":"incentivesPool_","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lastHeroTeamId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"heroId","type":"uint256"},{"internalType":"uint256","name":"warriorAmount","type":"uint256"},{"internalType":"uint256","name":"farmerAmount","type":"uint256"},{"internalType":"uint256","name":"traderAmount","type":"uint256"},{"internalType":"uint256","name":"predictorAmount","type":"uint256"},{"internalType":"uint256","name":"bonusDirectionKey","type":"uint256"}],"name":"levelUp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"heroId","type":"uint256"}],"name":"retireHero","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sendAllPACTsFromTreasuryToIncentivesPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"polladdress","type":"address"}],"name":"setAddressIncentivesPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"heroId","type":"uint256"},{"internalType":"uint256","name":"amountToHero","type":"uint256"}],"name":"updateHero","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"key","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"updateVariable","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b506135d4806100206000396000f3fe608060405234801561001057600080fd5b50600436106102735760003560e01c8063877deff411610151578063b0ca0af9116100c3578063d90fbb9111610087578063d90fbb911461076d578063ea5183a614610775578063eab9096b1461077d578063ef7c462314610785578063f2fde38b1461078d578063f6157b87146107b357610273565b8063b0ca0af9146106e2578063bbd9546f146106ff578063c0c53b8b14610725578063c3e981dd1461075d578063c6a554f61461076557610273565b8063950f273611610115578063950f273614610620578063973550101461062857806398c1d49d146106305780639ffae66814610668578063aafeeb2a1461068b578063afd46722146106da57610273565b8063877deff41461056457806387fb22f81461056c5780638a772052146105955780638da5cb5b146105e6578063937d46a2146105ee57610273565b80633149d54a116101ea5780633c97f284116101ae5780633c97f284146104b057806343db73af146104eb5780635bcde111146104f3578063715018a6146105105780637d2972711461051857806383e0d6ec1461053b57610273565b80633149d54a1461036957806336a5d4561461037157806337f61a17146103795780633c37c169146103815780633c47ce70146104a857610273565b80630b9efd341161023c5780630b9efd34146102f357806310f7df24146103105780631665c1261461031857806321da64d31461032057806328468e001461032857806329c9f6911461034c57610273565b80628cc71d14610278578063055edd6714610292578063081e3eda1461029c5780630916bae5146102a45780630adb2966146102d0575b600080fd5b6102806107f6565b60408051918252519081900360200190f35b61029a6107fc565b005b610280610851565b610280600480360360408110156102ba57600080fd5b506001600160a01b038135169060200135610857565b610280600480360360408110156102e657600080fd5b5080359060200135610874565b6102806004803603602081101561030957600080fd5b50356108f0565b610280610902565b610280610908565b61028061090e565b610330610913565b604080516001600160a01b039092168252519081900360200190f35b61029a6004803603602081101561036257600080fd5b5035610922565b6102806109f1565b6103306109f7565b610280610a0c565b61029a6004803603604081101561039757600080fd5b8101906020810181356401000000008111156103b257600080fd5b8201836020820111156103c457600080fd5b803590602001918460208302840111640100000000831117156103e657600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929594936020810193503591505064010000000081111561043657600080fd5b82018360208201111561044857600080fd5b8035906020019184602083028401116401000000008311171561046a57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610a11945050505050565b610280610d14565b61029a600480360360c08110156104c657600080fd5b5080359060208101359060408101359060608101359060808101359060a00135610d19565b6102806111a2565b61029a6004803603602081101561050957600080fd5b50356111a7565b61029a6114d5565b61029a6004803603604081101561052e57600080fd5b5080359060200135611581565b6102806004803603606081101561055157600080fd5b50803590602081013590604001356115ed565b61028061177e565b6102806004803603606081101561058257600080fd5b5080359060208101359060400135611784565b61028060048036036101008110156105ac57600080fd5b508035906001600160a01b036020820135169060408101359060608101359060808101359060a08101359060c08101359060e0013561197c565b610330611b32565b6102806004803603606081101561060457600080fd5b506001600160a01b038135169060208101359060400135611b41565b610280611bb0565b610280611bb5565b61029a6004803603608081101561064657600080fd5b508035906001600160a01b036020820135169060408101359060600135611bba565b61029a6004803603604081101561067e57600080fd5b5080359060200135611c8f565b6106a8600480360360208110156106a157600080fd5b5035612028565b604080516001600160a01b03909516855260208501939093528383019190915215156060830152519081900360800190f35b61028061206c565b610280600480360360208110156106f857600080fd5b5035612072565b61029a6004803603602081101561071557600080fd5b50356001600160a01b03166120cf565b61029a6004803603606081101561073b57600080fd5b506001600160a01b038135811691602081013582169160409091013516612153565b610280612270565b610280612276565b61033061227c565b61028061228b565b610280612291565b610280612296565b61029a600480360360208110156107a357600080fd5b50356001600160a01b031661229b565b6107d0600480360360208110156107c957600080fd5b503561239d565b604080519485526020850193909352838301919091526060830152519081900360800190f35b6103e881565b6009546001600160a01b0316610833576040805162461bcd60e51b8152602060048201526000602482015290519081900360640190fd5b61084f61083e61228b565b6009546001600160a01b031661249e565b565b60035490565b600760209081526000928352604080842090915290825290205481565b6000826003818154811061088457fe5b600091825260209091206003600490920201015460ff166108d65760405162461bcd60e51b81526004018080602001828103825260278152602001806134786027913960400191505060405180910390fd5b6108e86108e385856124be565b6108f0565b949350505050565b60009081526002602052604090205490565b61044c81565b61044d81565b606681565b6005546001600160a01b031681565b806003818154811061093057fe5b600091825260209091206003600490920201015460ff166109825760405162461bcd60e51b81526004018080602001828103825260278152602001806134786027913960400191505060405180910390fd5b61098a612521565b6001600160a01b031661099b611b32565b6001600160a01b0316146109e4576040805162461bcd60e51b8152602060048201819052602482015260008051602061351c833981519152604482015290519081900360640190fd5b6109ed82612525565b5050565b6103f281565b6008546201000090046001600160a01b031681565b600381565b610a19612521565b6001600160a01b0316610a2a611b32565b6001600160a01b031614610a73576040805162461bcd60e51b8152602060048201819052602482015260008051602061351c833981519152604482015290519081900360640190fd5b8051825114610a8157600080fd5b60005b8251811015610d0f576000600860029054906101000a90046001600160a01b03166001600160a01b031663669e48aa858481518110610abf57fe5b60200260200101516103e96040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b158015610b0557600080fd5b505afa158015610b19573d6000803e3d6000fd5b505050506040513d6020811015610b2f57600080fd5b50516008548551919250610bf491610bda916201000090046001600160a01b03169063669e48aa90889087908110610b6357fe5b60200260200101516103e86040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b158015610ba957600080fd5b505afa158015610bbd573d6000803e3d6000fd5b505050506040513d6020811015610bd357600080fd5b5051612559565b858481518110610be657fe5b602002602001015183612588565b610c57610c2a600860029054906101000a90046001600160a01b03166001600160a01b031663669e48aa878681518110610b6357fe5b858481518110610c3657fe5b6020026020010151858581518110610c4a57fe5b60200260200101516125fd565b600860029054906101000a90046001600160a01b03166001600160a01b03166343b0e8df858481518110610c8757fe5b60200260200101516103e9868681518110610c9e57fe5b60200260200101516040518463ffffffff1660e01b8152600401808481526020018381526020018281526020019350505050600060405180830381600087803b158015610cea57600080fd5b505af1158015610cfe573d6000803e3d6000fd5b505060019093019250610a84915050565b505050565b600181565b600854604080516331a9108f60e11b815260048101899052905188923392620100009091046001600160a01b031691636352211e91602480820192602092909190829003018186803b158015610d6e57600080fd5b505afa158015610d82573d6000803e3d6000fd5b505050506040513d6020811015610d9857600080fd5b50516001600160a01b031614610ddf5760405162461bcd60e51b815260040180806020018281038252603381526020018061356c6033913960400191505060405180910390fd5b6008546040805163039bec7560e11b8152600481018a9052905189926201000090046001600160a01b031691630737d8ea916024808301926020929190829003018186803b158015610e3057600080fd5b505afa158015610e44573d6000803e3d6000fd5b505050506040513d6020811015610e5a57600080fd5b505115610ea0576040805162461bcd60e51b815260206004820152600f60248201526e3432b9379037b710323ab733b2b7b760891b604482015290519081900360640190fd5b6000610eb885610eb288818c8c6124be565b906124be565b9050610ed6610ed1610eca600b6108f0565b839061262b565b612684565b6000610ee182612072565b90508015610fb25761044c851415610f0457610efd89826124be565b9850610fb2565b61044d851415610f1f57610f1888826124be565b9750610fb2565b61044e851415610f3a57610f3387826124be565b9650610fb2565b61044f851415610f5557610f4e86826124be565b9550610fb2565b610f6a610f638260046126a7565b8a906124be565b9850610f81610f7a8260046126a7565b89906124be565b9750610f98610f918260046126a7565b88906124be565b9650610faf60048206610eb2610f7a8460046126a7565b95505b60085460408051631417ed1b60e21b8152600481018d905261044c6024820152604481018c90529051620100009092046001600160a01b03169163505fb46c9160648082019260009290919082900301818387803b15801561101357600080fd5b505af1158015611027573d6000803e3d6000fd5b505060085460408051631417ed1b60e21b8152600481018f905261044d6024820152604481018d90529051620100009092046001600160a01b0316935063505fb46c925060648082019260009290919082900301818387803b15801561108c57600080fd5b505af11580156110a0573d6000803e3d6000fd5b505060085460408051631417ed1b60e21b8152600481018f905261044e6024820152604481018c90529051620100009092046001600160a01b0316935063505fb46c925060648082019260009290919082900301818387803b15801561110557600080fd5b505af1158015611119573d6000803e3d6000fd5b505060085460408051631417ed1b60e21b8152600481018f905261044f6024820152604481018b90529051620100009092046001600160a01b0316935063505fb46c925060648082019260009290919082900301818387803b15801561117e57600080fd5b505af1158015611192573d6000803e3d6000fd5b5050505050505050505050505050565b606781565b600854604080516331a9108f60e11b815260048101849052905183923392620100009091046001600160a01b031691636352211e91602480820192602092909190829003018186803b1580156111fc57600080fd5b505afa158015611210573d6000803e3d6000fd5b505050506040513d602081101561122657600080fd5b50516001600160a01b03161461126d5760405162461bcd60e51b815260040180806020018281038252603381526020018061356c6033913960400191505060405180910390fd5b6008546040805163039bec7560e11b815260048101859052905184926201000090046001600160a01b031691630737d8ea916024808301926020929190829003018186803b1580156112be57600080fd5b505afa1580156112d2573d6000803e3d6000fd5b505050506040513d60208110156112e857600080fd5b50511561132e576040805162461bcd60e51b815260206004820152600f60248201526e3432b9379037b710323ab733b2b7b760891b604482015290519081900360640190fd5b6008546040805163334f245560e11b81526004810186905260036024820152905142926201000090046001600160a01b03169163669e48aa916044808301926020929190829003018186803b15801561138657600080fd5b505afa15801561139a573d6000803e3d6000fd5b505050506040513d60208110156113b057600080fd5b5051106113ee5760405162461bcd60e51b815260040180806020018281038252603a8152602001806133ec603a913960400191505060405180910390fd5b61145d611457600860029054906101000a90046001600160a01b03166001600160a01b031663669e48aa866103e86040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b158015610ba957600080fd5b846126e9565b600860029054906101000a90046001600160a01b03166001600160a01b03166342966c68846040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156114b857600080fd5b505af11580156114cc573d6000803e3d6000fd5b50505050505050565b6114dd612521565b6001600160a01b03166114ee611b32565b6001600160a01b031614611537576040805162461bcd60e51b8152602060048201819052602482015260008051602061351c833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b611589612521565b6001600160a01b031661159a611b32565b6001600160a01b0316146115e3576040805162461bcd60e51b8152602060048201819052602482015260008051602061351c833981519152604482015290519081900360640190fd5b6109ed828261272c565b600083600381815481106115fd57fe5b600091825260209091206003600490920201015460ff1661164f5760405162461bcd60e51b81526004018080602001828103825260278152602001806134786027913960400191505060405180910390fd5b6003858154811061165c57fe5b9060005260206000209060040201600101548310156116ac5760405162461bcd60e51b815260040180806020018281038252603081526020018061353c6030913960400191505060405180910390fd5b600385815481106116b957fe5b9060005260206000209060040201600201548311156117095760405162461bcd60e51b815260040180806020018281038252602c81526020018061344c602c913960400191505060405180910390fd5b60006117218633868860018060018062278d0061273e565b9050600061172f600a6108f0565b905061174561173d88612559565b8387846128ff565b6000620f424061175f61175860656108f0565b849061262b565b8161176657fe5b04905061177281612978565b50909695505050505050565b60045481565b60008060008060008061179687612997565b94509450945094509450886000146117ea576040805162461bcd60e51b81526020600482015260126024820152716f6e6c7920504143542043797272656e637960701b604482015290519081900360640190fd5b600389815481106117f757fe5b9060005260206000209060040201600101548710156118475760405162461bcd60e51b815260040180806020018281038252603081526020018061353c6030913960400191505060405180910390fd5b6003898154811061185457fe5b9060005260206000209060040201600201548711156118a45760405162461bcd60e51b815260040180806020018281038252602c81526020018061344c602c913960400191505060405180910390fd5b60006118e28a338a8c6118b88b60016124be565b6118c38b60016124be565b6118ce8b60016124be565b6118d98b60016124be565b62278d0061273e565b905060006118f0600a6108f0565b905060006118fe82856124be565b905061191461190c8d612559565b848c846128ff565b611935620f424061192f61192860656108f0565b859061262b565b906126a7565b9150611952620f424061192f61194b60666108f0565b879061262b565b9350600061196083866124be565b905061196b81612978565b50919b9a5050505050505050505050565b6000886003818154811061198c57fe5b600091825260209091206003600490920201015460ff166119de5760405162461bcd60e51b81526004018080602001828103825260278152602001806134786027913960400191505060405180910390fd5b337324f631c985636b2b708479ed0ebf9bf6590e77d314611a3d576040805162461bcd60e51b81526020600482015260146024820152734f6e6c79206d616e61676572206164647265737360601b604482015290519081900360640190fd5b60038a81548110611a4a57fe5b906000526020600020906004020160010154871015611a9a5760405162461bcd60e51b815260040180806020018281038252603081526020018061353c6030913960400191505060405180910390fd5b60038a81548110611aa757fe5b906000526020600020906004020160020154871115611af75760405162461bcd60e51b815260040180806020018281038252602c81526020018061344c602c913960400191505060405180910390fd5b6000611b0d8b8b8a8c8b8b8b8b62eff10061273e565b9050611b24611b1b8c612559565b828a60006128ff565b9a9950505050505050505050565b6000546001600160a01b031690565b6000611b4b612521565b6001600160a01b0316611b5c611b32565b6001600160a01b031614611ba5576040805162461bcd60e51b8152602060048201819052602482015260008051602061351c833981519152604482015290519081900360640190fd5b6108e8848484612a3c565b600081565b600b81565b8360038181548110611bc857fe5b600091825260209091206003600490920201015460ff16611c1a5760405162461bcd60e51b81526004018080602001828103825260278152602001806134786027913960400191505060405180910390fd5b611c22612521565b6001600160a01b0316611c33611b32565b6001600160a01b031614611c7c576040805162461bcd60e51b8152602060048201819052602482015260008051602061351c833981519152604482015290519081900360640190fd5b611c8885858585612b46565b5050505050565b600854604080516331a9108f60e11b815260048101859052905184923392620100009091046001600160a01b031691636352211e91602480820192602092909190829003018186803b158015611ce457600080fd5b505afa158015611cf8573d6000803e3d6000fd5b505050506040513d6020811015611d0e57600080fd5b50516001600160a01b031614611d555760405162461bcd60e51b815260040180806020018281038252603381526020018061356c6033913960400191505060405180910390fd5b6008546040805163039bec7560e11b815260048101869052905185926201000090046001600160a01b031691630737d8ea916024808301926020929190829003018186803b158015611da657600080fd5b505afa158015611dba573d6000803e3d6000fd5b505050506040513d6020811015611dd057600080fd5b505115611e16576040805162461bcd60e51b815260206004820152600f60248201526e3432b9379037b710323ab733b2b7b760891b604482015290519081900360640190fd5b6008546040805163334f245560e11b8152600481018790526103e8602482015290516000926201000090046001600160a01b03169163669e48aa916044808301926020929190829003018186803b158015611e7057600080fd5b505afa158015611e84573d6000803e3d6000fd5b505050506040513d6020811015611e9a57600080fd5b50516008546040805163334f245560e11b8152600481018990526103e960248201529051929350600092620100009092046001600160a01b03169163669e48aa91604480820192602092909190829003018186803b158015611efb57600080fd5b505afa158015611f0f573d6000803e3d6000fd5b505050506040513d6020811015611f2557600080fd5b50519050611f3381866124be565b905060038281548110611f4257fe5b906000526020600020906004020160020154811115611f925760405162461bcd60e51b815260040180806020018281038252602c81526020018061344c602c913960400191505060405180910390fd5b611fa7611f9e83612559565b878760006128ff565b60085460408051631417ed1b60e21b8152600481018990526103e96024820152604481018890529051620100009092046001600160a01b03169163505fb46c9160648082019260009290919082900301818387803b15801561200857600080fd5b505af115801561201c573d6000803e3d6000fd5b50505050505050505050565b6003818154811061203557fe5b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169350919060ff1684565b6103e981565b6000600a8211612084575060006120ca565b60328211612094575060056120ca565b606482116120a45750600a6120ca565b6101f482116120b5575060146120ca565b6107d082116120c6575060326120ca565b5060645b919050565b6120d7612521565b6001600160a01b03166120e8611b32565b6001600160a01b031614612131576040805162461bcd60e51b8152602060048201819052602482015260008051602061351c833981519152604482015290519081900360640190fd5b600980546001600160a01b0319166001600160a01b0392909216919091179055565b600854610100900460ff168061216c575061216c612bd5565b8061217a575060085460ff16155b6121b55760405162461bcd60e51b815260040180806020018281038252602e8152602001806134cd602e913960400191505060405180910390fd5b600854610100900460ff161580156121e0576008805460ff1961ff0019909116610100171660011790555b6121e984612bdb565b6121f1612bfd565b6008805462010000600160b01b031916620100006001600160a01b038681169190910291909117909155600980546001600160a01b03191691841691909117905561223a612c53565b61225784678ac7230489e8000069043c33c1937564800000612a3c565b50801561226a576008805461ff00191690555b50505050565b61044e81565b61044f81565b6009546001600160a01b031681565b60065490565b600a81565b606581565b6122a3612521565b6001600160a01b03166122b4611b32565b6001600160a01b0316146122fd576040805162461bcd60e51b8152602060048201819052602482015260008051602061351c833981519152604482015290519081900360640190fd5b6001600160a01b0381166123425760405162461bcd60e51b81526004018080602001828103825260268152602001806134266026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008060008068056bc75e2d6310000085116123cf575060009250600191506032905068056bc75e2d63100000612497565b680ad78ebc5ac620000085116123fb5750600192506002915060199050680ad78ebc5ac6200000612497565b683635c9adc5dea000008511612426575060029250600a9150819050681b1ae4d6e2ef500000612497565b686c6b935b8bbd40000085116124525750600a92506014915060059050683635c9adc5dea00000612497565b69021e19e0c9bab2400000851161247f5750601492506064915060029050686c6b935b8bbd400000612497565b506064925060c891506002905068d8d726b7177a8000005b9193509193565b6124a782612ca2565b6005546109ed906001600160a01b03168284612cb5565b600082820183811015612518576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b90505b92915050565b3390565b60006003828154811061253457fe5b60009182526020909120600490910201600301805460ff191691151591909117905550565b60006003828154811061256857fe5b60009182526020909120600490910201546001600160a01b031692915050565b6125d0816040518060600160405280602e815260200161349f602e91396001600160a01b03861660009081526007602090815260408083208884529091529020549190612e18565b6001600160a01b039093166000908152600760209081526040808320948352939052919091209190915550565b6001600160a01b03831660009081526007602090815260408083208584529091529020546125d090826124be565b60008261263a5750600061251b565b8282028284828161264757fe5b04146125185760405162461bcd60e51b81526004018080602001828103825260218152602001806134fb6021913960400191505060405180910390fd5b60055461269b906001600160a01b03163383612eaf565b6126a481613018565b50565b600061251883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250613025565b6001600160a01b0382166000908152600760209081526040808320848452909152902054612718838383612588565b610d0f6001600160a01b0384163383612cb5565b60009182526002602052604090912055565b60006127486133cc565b6127506133cc565b6040518061014001604052806000815260200160018152602001600381526020016103e881526020016103e981526020016103f2815260200161044c815260200161044d815260200161044e815260200161044f81525091506040518061014001604052804381526020014381526020016127d486426124be90919063ffffffff16565b81526020018d81526020018b81526020018a81526020018981526020018881526020018781526020018681525090506000600860029054906101000a90046001600160a01b03166001600160a01b03166279c7d58d85856040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183600a60200280838360005b83811015612871578181015183820152602001612859565b5050505090500182600a60200280838360005b8381101561289c578181015183820152602001612884565b505050509050019350505050602060405180830381600087803b1580156128c257600080fd5b505af11580156128d6573d6000803e3d6000fd5b505050506040513d60208110156128ec57600080fd5b50519d9c50505050505050505050505050565b6005546001600160a01b0385811691161415612939576129343361292383856124be565b6001600160a01b0387169190612eaf565b612964565b61294d6001600160a01b0385163384612eaf565b600554612964906001600160a01b03163383612eaf565b61296f8484846125fd565b61226a81613018565b61298181612ca2565b6005546126a4906001600160a01b03168261308a565b6000806000806000806000806129ac8961239d565b9650919450925090506000806129c06131ff565b90508260648206116129d4578391506129f5565b6129f26129eb6129e486886132bf565b8390613301565b86906124be565b91505b612a008260046126a7565b9950612a0d8260046126a7565b9850612a1a8260046126a7565b975060048206612a2b8360046126a7565b019650505050505091939590929450565b604080516080810182526001600160a01b03858116825260208201858152928201848152600160608401818152600380548084018255600082815296517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b600490920291820180546001600160a01b031916919097161790955595517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85c85015591517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85d84015590517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85e909201805460ff191692151592909217909155915490916108e891906132bf565b8260038581548110612b5457fe5b906000526020600020906004020160000160006101000a8154816001600160a01b0302191690836001600160a01b031602179055508160038581548110612b9757fe5b9060005260206000209060040201600101819055508060038581548110612bba57fe5b90600052602060002090600402016002018190555050505050565b303b1590565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b6000612c07612521565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350565b612c67600a68056bc75e2d63100000613343565b612c7b600b68056bc75e2d63100000613343565b612c886065614e20613343565b612c956066614e20613343565b61084f6067614e20613343565b600654612caf90826132bf565b60065550565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b60208310612d325780518252601f199092019160209182019101612d13565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612d94576040519150601f19603f3d011682016040523d82523d6000602084013e612d99565b606091505b5091509150818015612dc7575080511580612dc75750808060200190516020811015612dc457600080fd5b50515b611c88576040805162461bcd60e51b815260206004820152601a60248201527f5361666545524332303a205452414e534645525f4641494c4544000000000000604482015290519081900360640190fd5b60008184841115612ea75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612e6c578181015183820152602001612e54565b50505050905090810190601f168015612e995780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b604080516001600160a01b038481166024830152306044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b178152925182516000946060949389169392918291908083835b60208310612f325780518252601f199092019160209182019101612f13565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612f94576040519150601f19603f3d011682016040523d82523d6000602084013e612f99565b606091505b5091509150818015612fc7575080511580612fc75750808060200190516020811015612fc457600080fd5b50515b611c88576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a205452414e534645525f46524f4d5f4641494c454400604482015290519081900360640190fd5b600654612caf90826124be565b600081836130745760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315612e6c578181015183820152602001612e54565b50600083858161308057fe5b0495945050505050565b604080518082018252600d81526c6275726e2875696e743235362960981b60209182015281516024808201859052835180830390910181526044909101835290810180516001600160e01b0316630852cd8d60e31b178152915181516000936060936001600160a01b038816939092909182918083835b602083106131205780518252601f199092019160209182019101613101565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613182576040519150601f19603f3d011682016040523d82523d6000602084013e613187565b606091505b50915091508180156131b55750805115806131b557508080602001905160208110156131b257600080fd5b50515b61226a576040805162461bcd60e51b815260206004820152601660248201527514d85999515490cc8c0e881095549397d1905253115160521b604482015290519081900360640190fd5b60008061329843610eb2423360405160200180826001600160a01b031660601b81526014019150506040516020818303038152906040528051906020012060001c8161324757fe5b04610eb245610eb2424160405160200180826001600160a01b031660601b81526014019150506040516020818303038152906040528051906020012060001c8161328d57fe5b04610eb242446124be565b60408051602080820193909352815180820384018152908201909152805191012091505090565b600061251883836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612e18565b600061251883836040518060400160405280601881526020017f536166654d6174683a206d6f64756c6f206279207a65726f000000000000000081525061336a565b6000918252600160208181526040808520805460ff19169093179092556002905290912055565b600081836133b95760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315612e6c578181015183820152602001612e54565b508284816133c357fe5b06949350505050565b604051806101400160405280600a90602082028036833750919291505056fe4865726f4d616e616765723a3a7265746972654865726f3a2054494d455f414c4c4f575f4255524e202d206e6f7420616c6c6f776564207965744f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734865726f4d616e616765723a3a6372656174654865726f3a20616d6f756e74546f4865726f20736f206269674865726f5465616d735265676973747279203a3a204164647265737320697320616c726561647954726561737572793a5f737562546f6b656e42616c616e6365202d206e6f7420656e6f7567682062616c616e6365496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a6564536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65724865726f4d616e616765723a3a6372656174654865726f3a20616d6f756e74546f4865726f206e6f7420656e6f7567684865726f4d616e616765723a3a6f6e6c794865726f4f776e65723a206f6e6c79206865726f206f776e657220616c6c6f776564a264697066735822122035cd3c9bc1c90fede0f3fb111d64937302c3405c11834502b1ed1f2896c106fe64736f6c634300060c0033

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