ETH Price: $3,113.26 (+1.39%)
Gas: 4 Gwei

Contract

0x233843ffD05b8277b5c46Cf567Bf5cdef27444C1
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Transfer Ownersh...160923442022-12-01 20:28:59586 days ago1669926539IN
0x233843ff...ef27444C1
0 ETH0.0003632712.69792442
Create Single Tr...150758912022-07-04 11:54:26736 days ago1656935666IN
0x233843ff...ef27444C1
0 ETH0.001173121.20934024
Create Single Tr...150758902022-07-04 11:54:21736 days ago1656935661IN
0x233843ff...ef27444C1
0 ETH0.0012479122.5618368
Create Single Tr...150758862022-07-04 11:53:27736 days ago1656935607IN
0x233843ff...ef27444C1
0 ETH0.0012587622.75790262
Create Single Tr...150758852022-07-04 11:53:20736 days ago1656935600IN
0x233843ff...ef27444C1
0 ETH0.0013558124.5124976
Create Single Tr...150758832022-07-04 11:53:11736 days ago1656935591IN
0x233843ff...ef27444C1
0 ETH0.0015523928.06657249
Create Single Tr...150758802022-07-04 11:52:25736 days ago1656935545IN
0x233843ff...ef27444C1
0 ETH0.0020310828.04942885
Create Single Tr...150758792022-07-04 11:52:01736 days ago1656935521IN
0x233843ff...ef27444C1
0 ETH0.0013884225.10212165
Create Single Tr...150758772022-07-04 11:51:38736 days ago1656935498IN
0x233843ff...ef27444C1
0 ETH0.0011840821.40767989
Create Single Tr...150758752022-07-04 11:50:52736 days ago1656935452IN
0x233843ff...ef27444C1
0 ETH0.0009528917.23177523
Create Single Tr...150758742022-07-04 11:50:42736 days ago1656935442IN
0x233843ff...ef27444C1
0 ETH0.0011959316.51588252
Create Single Tr...150758712022-07-04 11:50:15736 days ago1656935415IN
0x233843ff...ef27444C1
0 ETH0.0009925617.94520065
Create Single Tr...150758682022-07-04 11:49:43736 days ago1656935383IN
0x233843ff...ef27444C1
0 ETH0.0012947417.88056086
Create Single Tr...150758672022-07-04 11:49:27736 days ago1656935367IN
0x233843ff...ef27444C1
0 ETH0.0009330816.86987851
Create Single Tr...150758652022-07-04 11:49:18736 days ago1656935358IN
0x233843ff...ef27444C1
0 ETH0.0010686819.32141692
Create Single Tr...150758632022-07-04 11:48:59736 days ago1656935339IN
0x233843ff...ef27444C1
0 ETH0.0011132920.12794179
Create Single Tr...150758622022-07-04 11:48:46736 days ago1656935326IN
0x233843ff...ef27444C1
0 ETH0.0014447819.95254817
Update Tribe Spe...150350172022-06-27 15:19:35743 days ago1656343175IN
0x233843ff...ef27444C1
0 ETH0.0029512377.26954269
Update Tribe Spe...150350152022-06-27 15:18:19743 days ago1656343099IN
0x233843ff...ef27444C1
0 ETH0.0030317173.9550432
Update Tribe Spe...150350142022-06-27 15:17:57743 days ago1656343077IN
0x233843ff...ef27444C1
0 ETH0.0029557972.08209044
Update Tribe Spe...150350132022-06-27 15:17:18743 days ago1656343038IN
0x233843ff...ef27444C1
0 ETH0.0026337164.24641046
Update Tribe Spe...150350112022-06-27 15:16:42743 days ago1656343002IN
0x233843ff...ef27444C1
0 ETH0.0025155261.36313121
Update Tribe Spe...150350102022-06-27 15:16:25743 days ago1656342985IN
0x233843ff...ef27444C1
0 ETH0.0023871158.24792732
Create Single Tr...149268052022-06-08 12:58:47762 days ago1654693127IN
0x233843ff...ef27444C1
0 ETH0.0041257956.97750364
Create Single Tr...149268022022-06-08 12:58:05762 days ago1654693085IN
0x233843ff...ef27444C1
0 ETH0.0047694265.86608586
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
AKCCore

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion
File 1 of 13 : AKCCore.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";

contract AKCCore is Ownable, AccessControl, IERC721Receiver {

    /** 
     * @dev ROLES 
     */
    bytes32 public constant CREATOR_ROLE = keccak256("MINTER_ROLE");
    bytes32 public constant CLAIMER_ROLE = keccak256("BURNER_ROLE");
    bytes32 public constant MODIFIER_ROLE = keccak256("BURNER_ROLE");

    /** 
     * @dev CORE DATA STRUCTURES 
     */
    struct Tribe {
        uint256 createdAt;
        uint256 lastClaimedTimeStamp;
        uint256 spec;
    }

    struct TribeSpec {
        uint256 price;
        uint256 rps;
        string name;
    }    

    /** 
     * @dev TRACKING DATA 
     */
    mapping(address => uint256[]) public userToTribes;
    mapping(address => mapping(uint256 => uint256)) public userToEarnings;
    TribeSpec[] public tribeSpecs;

    /**
     * @dev CREATION LOGIC
     */
    uint256 maxBatchTribes = 50;

    /**
     * @dev AKC STAKING
     */
    IERC721 public akc;
    mapping(address => mapping(uint256 => uint256)) public userToAKC; // spec to akc id
    uint256 public akcStakeBoost = 8;
    uint256 public capsuleSpecId = 257;
    uint256 public capsuleEarnRate = 2 ether;

    /**
     * @dev AFFILIATE
     */
    uint256 public affiliatePercentage = 5;
    uint256 public affiliateKickback = 5;
    mapping(address => uint256) public userToAffiliateEarnings;
    

    /**
     * @dev EVENTS
     */
    event TribeCreated(address indexed owner, uint256 indexed tribeSpec);
    event ClaimedReward(address indexed owner, uint256 indexed reward);
    event StakeAKC(address indexed staker, uint256 indexed akc, uint256 indexed spec);
    event UnStakeAKC(address indexed staker, uint256 indexed akc, uint256 indexed spec);
    event CreateNewTribeSpecEvent(uint256 indexed price, uint256 indexed rps, string indexed name);
    event UpdateTribeSpecEvent(uint256 indexed price, uint256 indexed rps, string indexed name);
    event SuspendTribesOfUserEvent(address indexed user);

    event SetMaxBatchTribesEvent(uint256 indexed newBatch);
    event SetAkcStakeBoostEvent(uint256 indexed akcStakeBoost);

    constructor(
        uint256[] memory tribePrices,
        uint256[] memory tribeRPS,
        string[] memory names,
        address _akc
    ) {
        _setupRole(CREATOR_ROLE, msg.sender);
        _setupRole(CLAIMER_ROLE, msg.sender);
        _setupRole(MODIFIER_ROLE, msg.sender);
        _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);

        require(tribePrices.length > 0, "HAVE TO SPECIFY INITIALIZER TRIBES");
        require(tribePrices.length == tribeRPS.length, "TRIBE PRICES MUST MATCH RPS");
        require(tribePrices.length == names.length, "TRIBE PRICES MUST MATCH NAMES");

        for (uint i = 0; i < tribePrices.length; i++) {
            uint256 price = tribePrices[i];
            uint256 rps = tribeRPS[i];
            string memory name = names[i];

            createNewTribeSpec(price, rps, name);          
        }

        akc = IERC721(_akc);
    }


    /** === CREATING === */


    function createSingleTribe(address newOwner, uint256 spec) 
        external 
        onlyRole(CREATOR_ROLE) {
            require(spec < tribeSpecs.length, "INVALID TRIBE SPEC");

            uint256 tribe = block.timestamp;
            tribe |= block.timestamp << 32;
            tribe |= spec << 64;

            userToTribes[newOwner].push(tribe);

            emit TribeCreated(newOwner, spec);
    }

    function createManyTribes(address[] calldata newOwners, uint256[] calldata specs)
        external 
        onlyRole(CREATOR_ROLE) {
            require(newOwners.length == specs.length, "NEWOWNERS MUST MATCH SPEC");
            require(newOwners.length < maxBatchTribes, "NEWOWNERS EXCEEDS MAX BATCH");

            for (uint i = 0; i < newOwners.length; i++) {
                address newOwner = newOwners[i];
                uint256 spec = specs[i];

                require(spec < tribeSpecs.length, "INVALID TRIBE SPEC");

                uint256 tribe = block.timestamp;
                tribe |= block.timestamp << 32;
                tribe |= spec << 64;

                userToTribes[newOwner].push(tribe);

                emit TribeCreated(newOwner, spec);
            }
        }


    /** === CLAIMING === */


    function claimRewardOfTribeByIndex(address tribeOwner, uint256 tribeIndex) 
        public
        onlyRole(CLAIMER_ROLE)
        returns(uint256) {
            require(userToTribes[tribeOwner].length > tribeIndex, "TRIBE INDEX OUT OF BOUNDS");

            uint256 tribe = userToTribes[tribeOwner][tribeIndex];
            uint256 spec = getSpecFromTribe(tribe);
            uint256 lastClaimedTimeStamp = getLastClaimedTimeFromTribe(tribe);

            TribeSpec memory tribeSpec = tribeSpecs[spec];
            
            uint256 newTribe = getCreatedAtFromTribe(tribe);  
            newTribe |= block.timestamp << 32;
            newTribe |= spec << 64;
            userToTribes[tribeOwner][tribeIndex] = newTribe;

            uint256 interval = (block.timestamp - lastClaimedTimeStamp);
            uint256 reward = tribeSpec.rps * interval / 86400;

            uint256 akcBoost;
            if (userToAKC[tribeOwner][spec] != 0) {
                uint256 stakeTime = getAkcTimestampFromAKCData(userToAKC[tribeOwner][spec]);
                akcBoost = stakeTime > lastClaimedTimeStamp ? 
                            (tribeSpec.rps * (block.timestamp - stakeTime) / 86400) * akcStakeBoost / 100 : 
                            reward * akcStakeBoost / 100;
            }

            /// @dev Time BOOST
            uint256 timeBoost;            
            if (interval / 86400 >= 90) {
                timeBoost = reward * 50 / 100;
            } else if (interval / 86400 >= 60) {
                timeBoost = reward * 40 / 100;
            } else if (interval / 86400 >= 30) {
                timeBoost = reward * 25 / 100;
            } else if (interval / 86400 >= 14) {
                timeBoost = reward * 12 / 100;
            } else if (interval / 86400 >= 7) {
                timeBoost = reward * 5 / 100;
            } else if (interval / 86400 >= 3) {
                timeBoost = reward * 2 / 100;
            }

            reward = reward + akcBoost + timeBoost;

            userToEarnings[tribeOwner][spec] += reward;

            return reward;
        }
    
    function claimRewardFromCapsule(address tribeOwner)
        internal 
        returns (uint256) {
            uint256 capsuleData = userToAKC[tribeOwner][capsuleSpecId];
            if (capsuleData == 0) {
                return 0;
            }

            uint256 kongId = getAkcIdFromAKCData(capsuleData);
            uint256 lastClaimed = getAkcTimestampFromAKCData(capsuleData);
            uint256 interval = (block.timestamp - lastClaimed);
            uint256 reward = capsuleEarnRate * interval / 86400;

            uint256 newData = kongId;
            newData |= block.timestamp << 128;
            userToAKC[tribeOwner][capsuleSpecId] = newData;         

            return reward;
        }

    function claimAllRewards(address tribeOwner)
        external
        onlyRole(CLAIMER_ROLE)
        returns(uint256) {
            require(userToTribes[tribeOwner].length > 0 || userToAKC[tribeOwner][capsuleSpecId] != 0, "USER DOESN'T OWN ANY TRIBES");
            uint256 totalReward = 0;

            for (uint i = 0; i < userToTribes[tribeOwner].length; i++) {
                totalReward += claimRewardOfTribeByIndex(tribeOwner, i);
            }

            totalReward += claimRewardFromCapsule(tribeOwner);

            emit ClaimedReward(tribeOwner, totalReward);

            return totalReward;
        }


     /** === STAKING === */


     function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4) {
        return IERC721Receiver.onERC721Received.selector;
    }

    function stakeAKC(address staker, uint256 akcId, uint256 spec)
        external
        onlyRole(CLAIMER_ROLE) {
            require(spec < tribeSpecs.length || spec == capsuleSpecId, "SPEC OUT OF BOUNDS");
            require(userToAKC[staker][spec] == 0, "ANOTHER KONG ALREADY STAKED IN SPEC");
            require(getTotalTribesByspec(staker, spec) > 0 || spec == capsuleSpecId, "USER DOES NOT OWN SPEC");
            require(akc.ownerOf(akcId) == address(this), "KONG NOT TRANSFERED TO CONTRACT");

            uint256 data = akcId;
            data |= block.timestamp << 128;
            userToAKC[staker][spec] = data;            

            emit StakeAKC(staker, akcId, spec);
        }

    function unstakeAKC(address staker, uint256 akcId, uint256 spec)
        external
        onlyRole(CLAIMER_ROLE) {
            require(userToAKC[staker][spec] != 0, "NO KONG STAKED IN SPEC");
            require(akc.ownerOf(akcId) != address(this), "KONG STILL IN CONTRACT");

            uint256 akcFromData = getAkcIdFromAKCData(userToAKC[staker][spec]);
            require(akcFromData == akcId, "CANNOT UNSTAKE AKC YOU DON'T OWN");

            delete userToAKC[staker][spec];

            emit UnStakeAKC(staker, akcId, spec);   
        }
    

    /** === AFFILIATE === */


    function registerAffiliate(address affiliate, uint256 earned)
        external
        onlyRole(CLAIMER_ROLE) {
            uint256 affData = userToAffiliateEarnings[affiliate];            
            uint amount = getAmountOfAffiliatesFromAffiliate(affData);
            uint256 totalEarned = getEarnedFromAffiliate(affData);

            uint256 newData = (totalEarned + earned) / (10**14);
            newData |= (amount + 1) << 128;
            userToAffiliateEarnings[affiliate] = newData;
        }


    /** === GETTERS === */


    function getCreatedAtFromTribe(uint256 tribe)
        public
        pure
        returns(uint256) {
            return uint256(uint32(tribe));
        }
    
    function getLastClaimedTimeFromTribe(uint256 tribe)
        public
        pure
        returns(uint256) {
            return uint256(uint32(tribe >> 32));
        }
    
    function getSpecFromTribe(uint256 tribe)
        public
        pure
        returns(uint256) {
            return uint256(uint8(tribe >> 64));
        }

    function getAkcIdFromAKCData(uint256 akcData)
        public
        pure
        returns(uint256) {
            return uint256(uint128(akcData));
        }

    function getAkcTimestampFromAKCData(uint256 akcData)
        public
        pure
        returns(uint256) {
            return uint256(uint128(akcData >> 128));
        }
    
    function getEarnedFromAffiliate(uint256 affiliateData)
        public
        pure
        returns(uint256) {
            return uint256(uint128(affiliateData)) * (10 ** 14);
        }
        
    function getAmountOfAffiliatesFromAffiliate(uint256 affiliateData)
        public
        pure
        returns(uint256) {
            return uint256(uint128(affiliateData >> 128));
        }


    /** === VIEWING === */


    function getTribeAmount(address tribeOwner)
        external
        view
        returns(uint256) {
            return userToTribes[tribeOwner].length;
        }
    
    function getTribeSpecAmount()
        external
        view 
        returns(uint256) {
            return tribeSpecs.length;
        }

    function getTotalTribesByspec(address tribeOwner, uint256 spec)
        public
        view
        returns(uint256) {
            //require(userToTribes[tribeOwner].length > 0, "USER DOESN'T OWN ANY TRIBES");
            if (spec >= tribeSpecs.length) {
                return 0;
            }
            uint256 total = 0;

            for (uint i = 0; i < userToTribes[tribeOwner].length; i++) {
                if (getSpecFromTribe(userToTribes[tribeOwner][i]) == spec) {
                    total++;
                }
            }

            return total;
        }
    
    function getTribeStructFromTribe(uint256 tribe) 
        public
        pure
        returns (Tribe memory _tribe) {
            _tribe.createdAt = getCreatedAtFromTribe(tribe);
            _tribe.lastClaimedTimeStamp = getLastClaimedTimeFromTribe(tribe);
            _tribe.spec = getSpecFromTribe(tribe);
        }
    
    function getLastClaimedOfUser(address tribeOwner)
        external
        view
        returns(uint256) {
            if (userToTribes[tribeOwner].length == 0) {
                return 0;
            } else {
                uint256 firstTribe = userToTribes[tribeOwner][0];
                return getLastClaimedTimeFromTribe(firstTribe);
            }
        }

    function getTribeAmountBySpec(address tribeOwner, uint256 spec) 
        external
        view
        returns(uint256) {
            require(userToTribes[tribeOwner].length > 0, "USER DOESN'T OWN ANY TRIBES");

            uint256 counter = 0;
            for (uint i = 0; i < userToTribes[tribeOwner].length; i++) {
                uint256 tribe = userToTribes[tribeOwner][i];
                uint256 tribeSpec = getSpecFromTribe(tribe);
                if (tribeSpec == spec) {
                    counter++;
                }
            }

            return counter;
        }

    function getTribeOfUserByIndexAndSpec(address tribeOwner, uint256 tribeIndex, uint256 spec)
        external
        view
        returns (Tribe memory) {
            require(userToTribes[tribeOwner].length > tribeIndex, "TRIBE INDEX OUT OF BOUNDS");
            require(spec < tribeSpecs.length, "INVALID TRIBE SPEC");

            uint256 counter = 0;
            uint256 tribeInstance;
            for (uint i = 0; i < userToTribes[tribeOwner].length; i++) {
                uint256 tribe = userToTribes[tribeOwner][i];
                uint256 tribeSpec = getSpecFromTribe(tribe);
                if (tribeSpec == spec) {
                    if (counter == tribeIndex) {
                        tribeInstance = tribe;
                        break;
                    } else {
                        counter++;
                    }
                }
            }

            return getTribeStructFromTribe(tribeInstance);
        }

    function getTribeRewardByIndex(address tribeOwner, uint256 tribeIndex)
        public
        view
        returns (uint256) {
            require(userToTribes[tribeOwner].length > tribeIndex, "TRIBE INDEX OUT OF BOUNDS");

            uint256 tribe = userToTribes[tribeOwner][tribeIndex];
            uint256 spec = getSpecFromTribe(tribe);
            uint256 lastClaimedTimeStamp = getLastClaimedTimeFromTribe(tribe);

            TribeSpec memory tribeSpec = tribeSpecs[spec];
                        
            uint256 interval = (block.timestamp - lastClaimedTimeStamp);
            uint256 reward = tribeSpec.rps * interval / 86400;

            uint256 akcBoost;
            if (userToAKC[tribeOwner][spec] != 0) {
                uint256 stakeTime = getAkcTimestampFromAKCData(userToAKC[tribeOwner][spec]);
                akcBoost = stakeTime > lastClaimedTimeStamp ? 
                            (tribeSpec.rps * (block.timestamp - stakeTime) / 86400) * akcStakeBoost / 100 : 
                            reward * akcStakeBoost / 100;
            }

            /// @dev Time BOOST
            uint256 timeBoost;            
            if (interval / 86400 >= 60) {
                timeBoost = reward * 40 / 100;
            } else if (interval / 86400 >= 30) {
                timeBoost = reward * 25 / 100;
            } else if (interval / 86400 >= 14) {
                timeBoost = reward * 12 / 100;
            } else if (interval / 86400 >= 7) {
                timeBoost = reward * 5 / 100;
            } else if (interval / 86400 >= 3) {
                timeBoost = reward * 2 / 100;
            }

            reward = reward + akcBoost + timeBoost;         

            return reward;
        }

    function getTribeRewardByIndexAndSpec(address tribeOwner, uint256 tribeIndex, uint256 targetSpec)
        public
        view
        returns (uint256) {
            require(userToTribes[tribeOwner].length > tribeIndex, "TRIBE INDEX OUT OF BOUNDS");

            uint256 tribe = userToTribes[tribeOwner][tribeIndex];
            uint256 spec = getSpecFromTribe(tribe);

            if (spec != targetSpec)
                return 0;

            uint256 lastClaimedTimeStamp = getLastClaimedTimeFromTribe(tribe);

            TribeSpec memory tribeSpec = tribeSpecs[spec];
                       
            uint256 interval = (block.timestamp - lastClaimedTimeStamp);
            uint256 reward = tribeSpec.rps * interval / 86400;

            uint256 akcBoost;
            if (userToAKC[tribeOwner][spec] != 0) {
                uint256 stakeTime = getAkcTimestampFromAKCData(userToAKC[tribeOwner][spec]);
                akcBoost = stakeTime > lastClaimedTimeStamp ? 
                            (tribeSpec.rps * (block.timestamp - stakeTime) / 86400) * akcStakeBoost / 100 : 
                            reward * akcStakeBoost / 100;
            }

            /// @dev Time BOOST
            uint256 timeBoost;            
            if (interval / 86400 >= 60) {
                timeBoost = reward * 40 / 100;
            } else if (interval / 86400 >= 30) {
                timeBoost = reward * 25 / 100;
            } else if (interval / 86400 >= 14) {
                timeBoost = reward * 12 / 100;
            } else if (interval / 86400 >= 7) {
                timeBoost = reward * 5 / 100;
            } else if (interval / 86400 >= 3) {
                timeBoost = reward * 2 / 100;
            }

            reward = reward + akcBoost + timeBoost;

            return reward;
        }
    
    function getTribeRewardByIndexAndTimestamp(address tribeOwner, uint256 tribeIndex, uint256 timestamp)
        public
        view
        returns (uint256) {
            require(userToTribes[tribeOwner].length > tribeIndex, "TRIBE INDEX OUT OF BOUNDS");

            uint256 tribe = userToTribes[tribeOwner][tribeIndex];
            uint256 spec = getSpecFromTribe(tribe);

            uint256 lastClaimedTimeStamp = getCreatedAtFromTribe(tribe);
            lastClaimedTimeStamp = lastClaimedTimeStamp > timestamp ? lastClaimedTimeStamp : timestamp;

            TribeSpec memory tribeSpec = tribeSpecs[spec];
                       
            uint256 interval = (block.timestamp - lastClaimedTimeStamp);
            uint256 reward = tribeSpec.rps * interval / 86400;

            uint256 akcBoost;
            if (userToAKC[tribeOwner][spec] != 0) {
                uint256 stakeTime = getAkcTimestampFromAKCData(userToAKC[tribeOwner][spec]);
                akcBoost = stakeTime > lastClaimedTimeStamp ? 
                            (tribeSpec.rps * (block.timestamp - stakeTime) / 86400) * akcStakeBoost / 100 : 
                            reward * akcStakeBoost / 100;
            }

            /// @dev Time BOOST
            uint256 timeBoost;
            interval = block.timestamp - getLastClaimedTimeFromTribe(tribe);       
            if (interval / 86400 >= 60) {
                timeBoost = reward * 40 / 100;
            } else if (interval / 86400 >= 30) {
                timeBoost = reward * 25 / 100;
            } else if (interval / 86400 >= 14) {
                timeBoost = reward * 12 / 100;
            } else if (interval / 86400 >= 7) {
                timeBoost = reward * 5 / 100;
            } else if (interval / 86400 >= 3) {
                timeBoost = reward * 2 / 100;
            }

            reward = reward + akcBoost + timeBoost;

            return reward;
        }

    function getTribeRewardByIndexAndTimestampDisregardCreate(address tribeOwner, uint256 tribeIndex, uint256 timestamp)
        public
        view
        returns (uint256) {
            require(userToTribes[tribeOwner].length > tribeIndex, "TRIBE INDEX OUT OF BOUNDS");

            uint256 tribe = userToTribes[tribeOwner][tribeIndex];
            uint256 spec = getSpecFromTribe(tribe);
            uint256 lastClaimedTimeStamp = getLastClaimedTimeFromTribe(tribe);            

            TribeSpec memory tribeSpec = tribeSpecs[spec];
                       
            uint256 interval = (block.timestamp - timestamp);
            uint256 reward = tribeSpec.rps * interval / 86400;

            uint256 akcBoost;
            if (userToAKC[tribeOwner][spec] != 0) {                
                akcBoost = reward * akcStakeBoost / 100;
            }

            /// @dev Time BOOST
            uint256 timeBoost;            
            interval = block.timestamp - lastClaimedTimeStamp;
            if (interval / 86400 >= 60) {
                timeBoost = reward * 40 / 100;
            } else if (interval / 86400 >= 30) {
                timeBoost = reward * 25 / 100;
            } else if (interval / 86400 >= 14) {
                timeBoost = reward * 12 / 100;
            } else if (interval / 86400 >= 7) {
                timeBoost = reward * 5 / 100;
            } else if (interval / 86400 >= 3) {
                timeBoost = reward * 2 / 100;
            }

            reward = reward + akcBoost + timeBoost;

            return reward;
        }

    function getTribeRewardByIndexAndTimestampAndSpec(address tribeOwner, uint256 tribeIndex, uint256 timestamp, uint256 targetSpec)
        public
        view
        returns (uint256) {
            require(userToTribes[tribeOwner].length > tribeIndex, "TRIBE INDEX OUT OF BOUNDS");

            uint256 tribe = userToTribes[tribeOwner][tribeIndex];
            uint256 spec = getSpecFromTribe(tribe);

            if (spec != targetSpec)
                return 0;

            uint256 lastClaimedTimeStamp = getCreatedAtFromTribe(tribe);
            lastClaimedTimeStamp = lastClaimedTimeStamp > timestamp ? lastClaimedTimeStamp : timestamp;

            TribeSpec memory tribeSpec = tribeSpecs[spec];
                       
            uint256 interval = (block.timestamp - lastClaimedTimeStamp);
            uint256 reward = tribeSpec.rps * interval / 86400;

            uint256 akcBoost;
            if (userToAKC[tribeOwner][spec] != 0) {
                uint256 stakeTime = getAkcTimestampFromAKCData(userToAKC[tribeOwner][spec]);
                akcBoost = stakeTime > lastClaimedTimeStamp ? 
                            (tribeSpec.rps * (block.timestamp - stakeTime) / 86400) * akcStakeBoost / 100 : 
                            reward * akcStakeBoost / 100;
            }

            /// @dev Time BOOST
            uint256 timeBoost;     
            interval = block.timestamp - getLastClaimedTimeFromTribe(tribe);       
            if (interval / 86400 >= 60) {
                timeBoost = reward * 40 / 100;
            } else if (interval / 86400 >= 30) {
                timeBoost = reward * 25 / 100;
            } else if (interval / 86400 >= 14) {
                timeBoost = reward * 12 / 100;
            } else if (interval / 86400 >= 7) {
                timeBoost = reward * 5 / 100;
            } else if (interval / 86400 >= 3) {
                timeBoost = reward * 2 / 100;
            }

            reward = reward + akcBoost + timeBoost;

            return reward;
        }
    
    function getCapsuleRewards(address capsuleOwner, uint256 timestamp)
        public
        view
        returns(uint256) {
            uint256 capsuleData = userToAKC[capsuleOwner][capsuleSpecId];
            if (capsuleData == 0) {
                return 0;
            }
            
            uint256 lastClaimed = getAkcTimestampFromAKCData(capsuleData);
            if (timestamp != 0)
                lastClaimed = timestamp;
            uint256 interval = (block.timestamp - lastClaimed);
            uint256 reward = capsuleEarnRate * interval / 86400;               

            return reward;
        }
    
    function getAllRewards(address tribeOwner)
        external
        view
        returns(uint256) {
            //require(userToTribes[tribeOwner].length > 0, "USER DOESN'T OWN ANY TRIBES");
            uint256 totalReward = 0;

            for (uint i = 0; i < userToTribes[tribeOwner].length; i++) {
                totalReward += getTribeRewardByIndex(tribeOwner, i);
            }

            totalReward += getCapsuleRewards(tribeOwner, 0);

            return totalReward;
        }

    function getAllRewardsBySpec(address tribeOwner, uint256 spec)
        external
        view
        returns(uint256) {
            //require(userToTribes[tribeOwner].length > 0, "USER DOESN'T OWN ANY TRIBES");
            uint256 totalReward = 0;

            for (uint i = 0; i < userToTribes[tribeOwner].length; i++) {
                totalReward += getTribeRewardByIndexAndSpec(tribeOwner, i, spec);
            }

            return totalReward;
        }
    
    function getAllRewardsByTimestamp(address tribeOwner, uint256 timestamp)
        public
        view
        returns(uint256) {
            //require(userToTribes[tribeOwner].length > 0, "USER DOESN'T OWN ANY TRIBES");
            uint256 totalReward = 0;

            for (uint i = 0; i < userToTribes[tribeOwner].length; i++) {
                totalReward += getTribeRewardByIndexAndTimestamp(tribeOwner, i, timestamp);
            }

            totalReward += getCapsuleRewards(tribeOwner, timestamp);

            return totalReward;
        }

    function getAllRewardsByTimestampDisregardCreate(address tribeOwner, uint256 timestamp)
        public
        view
        returns(uint256) {
            //require(userToTribes[tribeOwner].length > 0, "USER DOESN'T OWN ANY TRIBES");
            uint256 totalReward = 0;

            for (uint i = 0; i < userToTribes[tribeOwner].length; i++) {
                totalReward += getTribeRewardByIndexAndTimestampDisregardCreate(tribeOwner, i, timestamp);
            }

            totalReward += getCapsuleRewards(tribeOwner, timestamp);

            return totalReward;
        }
        
    function getAllRewardsByTimestampAndSpec(address tribeOwner, uint256 timestamp, uint256 spec)
        external
        view
        returns(uint256) {
            //require(userToTribes[tribeOwner].length > 0, "USER DOESN'T OWN ANY TRIBES");
            uint256 totalReward = 0;

            for (uint i = 0; i < userToTribes[tribeOwner].length; i++) {
                totalReward += getTribeRewardByIndexAndTimestampAndSpec(tribeOwner, i, timestamp, spec);
            }

             return totalReward;
        }

    function getAllStakedKongsOfUser(address staker)
        external
        view
        returns(uint256[] memory) {
            uint256[] memory kongs = new uint256[](tribeSpecs.length);
            for (uint i = 0; i < tribeSpecs.length; i++) {
                uint data = userToAKC[staker][i];
                uint kong = getAkcIdFromAKCData(data);
                kongs[i] = kong;
            }
            return kongs;
        }
    
    function getAllRewardsOfUsersByTimestamp(address[] calldata wallets, uint256 timestamp)
        external
        view
        returns (uint256[] memory) {
            uint256[] memory rewards = new uint256[](wallets.length);
            for (uint i = 0; i < wallets.length; i++) {
                uint reward = getAllRewardsByTimestamp(wallets[i], timestamp);
                rewards[i] = reward;
            }
            return rewards;
        }

    function getDiscountFactor(address tribeOwner)
        external
        view
        returns(uint256) {
            uint256 discount;
            uint256 tribeAmount = userToTribes[tribeOwner].length;
            
            if (tribeAmount >= 50) {
                discount = 20;
            } else if (tribeAmount >= 20) {
                discount = 15;
            } else if (tribeAmount >= 15) {
                discount = 12;
            } else if (tribeAmount >= 10) {
                discount = 8;
            } else if (tribeAmount >= 5) {
                discount = 4;
            } else if (tribeAmount >= 2) {
                discount = 2;
            }
            
            return discount;
        }
    

    /** === MODIFIER ONLY === */


    function createNewTribeSpec(uint256 price, uint256 rps, string memory name)
        public
        onlyRole(MODIFIER_ROLE) {
            TribeSpec memory tribeSpec = TribeSpec({
                price: price,
                rps: rps,
                name: name
            });

            tribeSpecs.push(tribeSpec);

            emit CreateNewTribeSpecEvent(price, rps, name);
        }

    function updateTribeSpec(uint256 index, uint256 newPrice, uint256 newRps)
        external
        onlyRole(MODIFIER_ROLE) {
            require(index < tribeSpecs.length, "INDEX OUT OF BOUNDS");

            TribeSpec storage tribeSpec = tribeSpecs[index];
            tribeSpec.price = newPrice;
            tribeSpec.rps = newRps;

            emit UpdateTribeSpecEvent(newPrice, newRps, tribeSpec.name);
        }
    
    function suspendTribesOfUser(address tribeOwner) 
        external 
        onlyRole(MODIFIER_ROLE) {
            require(userToTribes[tribeOwner].length > 0, "USER HAS NO TRIBES");            
            delete userToTribes[tribeOwner];

            emit SuspendTribesOfUserEvent(tribeOwner);
        }
    
    function setMaxBatchTribes(uint256 newBatch)
        external 
        onlyRole(MODIFIER_ROLE) {
            maxBatchTribes = newBatch;

            emit SetMaxBatchTribesEvent(newBatch);
        }
    
    function setAKCStakingBoostPercentage(uint256 newPercentage)
        external
        onlyRole(MODIFIER_ROLE) {
            akcStakeBoost = newPercentage;

            emit SetAkcStakeBoostEvent(newPercentage);
        }
    
    function akcNFTApproveForAll(address approved, bool isApproved)
        external
        onlyRole(MODIFIER_ROLE) {
            akc.setApprovalForAll(approved, isApproved);
        }

    function setCapsuleEarnRate(uint256 newRate)
        external
        onlyRole(MODIFIER_ROLE) {
            capsuleEarnRate = newRate;
        }

    function setAffiliatePercentage(uint256 newPercentage)
        external
        onlyRole(MODIFIER_ROLE) {
            affiliatePercentage = newPercentage;
        }

    function setAffiliateKickBack(uint256 newKickback)
        external
        onlyRole(MODIFIER_ROLE) {
            affiliateKickback = newKickback;
        }
    
    function withdrawEth(uint256 percentage, address _to)
        external
        onlyOwner
    {
        payable(_to).transfer((address(this).balance * percentage) / 100);
    }

    function withdrawERC20(
        uint256 percentage,
        address _erc20Address,
        address _to
    ) external onlyOwner {
        uint256 amountERC20 = ERC20(_erc20Address).balanceOf(address(this));
        ERC20(_erc20Address).transfer(_to, (amountERC20 * percentage) / 100);
    }

    function withdrawStuckKong(uint256 kongId, address _to) external onlyOwner {
        require(akc.ownerOf(kongId) == address(this), "CORE DOES NOT OWN KONG");
        akc.transferFrom(address(this), _to, kongId);
    }
}

File 2 of 13 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControl.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role, _msgSender());
        _;
    }

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

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view virtual override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(uint160(account), 20),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @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) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @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) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @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 revoked `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     *
     * NOTE: This function is deprecated in favor of {_grantRole}.
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * Internal function without access restriction.
     */
    function _grantRole(bytes32 role, address account) internal virtual {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * Internal function without access restriction.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

File 4 of 13 : ERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.0;

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

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

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

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

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

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

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

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

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

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

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

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

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public virtual override returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, amount);
        _transfer(from, to, amount);
        return true;
    }

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

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

        return true;
    }

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

        _beforeTokenTransfer(from, to, amount);

        uint256 fromBalance = _balances[from];
        require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[from] = fromBalance - amount;
        }
        _balances[to] += amount;

        emit Transfer(from, to, amount);

        _afterTokenTransfer(from, to, amount);
    }

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

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

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

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

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

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

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

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

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

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

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

    /**
     * @dev Spend `amount` form the allowance of `owner` toward `spender`.
     *
     * Does not update the allowance amount in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Might emit an {Approval} event.
     */
    function _spendAllowance(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            require(currentAllowance >= amount, "ERC20: insufficient allowance");
            unchecked {
                _approve(owner, spender, currentAllowance - amount);
            }
        }
    }

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

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

File 5 of 13 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

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

File 6 of 13 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

File 7 of 13 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @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.
     *
     * _Available since v3.1._
     */
    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 `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

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

pragma solidity ^0.8.0;

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

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

File 9 of 13 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

pragma solidity ^0.8.0;

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

File 12 of 13 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 13 of 13 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";

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

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"uint256[]","name":"tribePrices","type":"uint256[]"},{"internalType":"uint256[]","name":"tribeRPS","type":"uint256[]"},{"internalType":"string[]","name":"names","type":"string[]"},{"internalType":"address","name":"_akc","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"ClaimedReward","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"rps","type":"uint256"},{"indexed":true,"internalType":"string","name":"name","type":"string"}],"name":"CreateNewTribeSpecEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"akcStakeBoost","type":"uint256"}],"name":"SetAkcStakeBoostEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"newBatch","type":"uint256"}],"name":"SetMaxBatchTribesEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"staker","type":"address"},{"indexed":true,"internalType":"uint256","name":"akc","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"spec","type":"uint256"}],"name":"StakeAKC","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"}],"name":"SuspendTribesOfUserEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"uint256","name":"tribeSpec","type":"uint256"}],"name":"TribeCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"staker","type":"address"},{"indexed":true,"internalType":"uint256","name":"akc","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"spec","type":"uint256"}],"name":"UnStakeAKC","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"rps","type":"uint256"},{"indexed":true,"internalType":"string","name":"name","type":"string"}],"name":"UpdateTribeSpecEvent","type":"event"},{"inputs":[],"name":"CLAIMER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CREATOR_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MODIFIER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"affiliateKickback","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"affiliatePercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"akc","outputs":[{"internalType":"contract IERC721","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"approved","type":"address"},{"internalType":"bool","name":"isApproved","type":"bool"}],"name":"akcNFTApproveForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"akcStakeBoost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"capsuleEarnRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"capsuleSpecId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tribeOwner","type":"address"}],"name":"claimAllRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tribeOwner","type":"address"},{"internalType":"uint256","name":"tribeIndex","type":"uint256"}],"name":"claimRewardOfTribeByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"newOwners","type":"address[]"},{"internalType":"uint256[]","name":"specs","type":"uint256[]"}],"name":"createManyTribes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"rps","type":"uint256"},{"internalType":"string","name":"name","type":"string"}],"name":"createNewTribeSpec","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"},{"internalType":"uint256","name":"spec","type":"uint256"}],"name":"createSingleTribe","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"akcData","type":"uint256"}],"name":"getAkcIdFromAKCData","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"akcData","type":"uint256"}],"name":"getAkcTimestampFromAKCData","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"tribeOwner","type":"address"}],"name":"getAllRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tribeOwner","type":"address"},{"internalType":"uint256","name":"spec","type":"uint256"}],"name":"getAllRewardsBySpec","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tribeOwner","type":"address"},{"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"getAllRewardsByTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tribeOwner","type":"address"},{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"uint256","name":"spec","type":"uint256"}],"name":"getAllRewardsByTimestampAndSpec","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tribeOwner","type":"address"},{"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"getAllRewardsByTimestampDisregardCreate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"wallets","type":"address[]"},{"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"getAllRewardsOfUsersByTimestamp","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"staker","type":"address"}],"name":"getAllStakedKongsOfUser","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"affiliateData","type":"uint256"}],"name":"getAmountOfAffiliatesFromAffiliate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"capsuleOwner","type":"address"},{"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"getCapsuleRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tribe","type":"uint256"}],"name":"getCreatedAtFromTribe","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"tribeOwner","type":"address"}],"name":"getDiscountFactor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"affiliateData","type":"uint256"}],"name":"getEarnedFromAffiliate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"tribeOwner","type":"address"}],"name":"getLastClaimedOfUser","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tribe","type":"uint256"}],"name":"getLastClaimedTimeFromTribe","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tribe","type":"uint256"}],"name":"getSpecFromTribe","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"tribeOwner","type":"address"},{"internalType":"uint256","name":"spec","type":"uint256"}],"name":"getTotalTribesByspec","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tribeOwner","type":"address"}],"name":"getTribeAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tribeOwner","type":"address"},{"internalType":"uint256","name":"spec","type":"uint256"}],"name":"getTribeAmountBySpec","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tribeOwner","type":"address"},{"internalType":"uint256","name":"tribeIndex","type":"uint256"},{"internalType":"uint256","name":"spec","type":"uint256"}],"name":"getTribeOfUserByIndexAndSpec","outputs":[{"components":[{"internalType":"uint256","name":"createdAt","type":"uint256"},{"internalType":"uint256","name":"lastClaimedTimeStamp","type":"uint256"},{"internalType":"uint256","name":"spec","type":"uint256"}],"internalType":"struct AKCCore.Tribe","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tribeOwner","type":"address"},{"internalType":"uint256","name":"tribeIndex","type":"uint256"}],"name":"getTribeRewardByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tribeOwner","type":"address"},{"internalType":"uint256","name":"tribeIndex","type":"uint256"},{"internalType":"uint256","name":"targetSpec","type":"uint256"}],"name":"getTribeRewardByIndexAndSpec","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tribeOwner","type":"address"},{"internalType":"uint256","name":"tribeIndex","type":"uint256"},{"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"getTribeRewardByIndexAndTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tribeOwner","type":"address"},{"internalType":"uint256","name":"tribeIndex","type":"uint256"},{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"uint256","name":"targetSpec","type":"uint256"}],"name":"getTribeRewardByIndexAndTimestampAndSpec","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tribeOwner","type":"address"},{"internalType":"uint256","name":"tribeIndex","type":"uint256"},{"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"getTribeRewardByIndexAndTimestampDisregardCreate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTribeSpecAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tribe","type":"uint256"}],"name":"getTribeStructFromTribe","outputs":[{"components":[{"internalType":"uint256","name":"createdAt","type":"uint256"},{"internalType":"uint256","name":"lastClaimedTimeStamp","type":"uint256"},{"internalType":"uint256","name":"spec","type":"uint256"}],"internalType":"struct AKCCore.Tribe","name":"_tribe","type":"tuple"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"affiliate","type":"address"},{"internalType":"uint256","name":"earned","type":"uint256"}],"name":"registerAffiliate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newPercentage","type":"uint256"}],"name":"setAKCStakingBoostPercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newKickback","type":"uint256"}],"name":"setAffiliateKickBack","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newPercentage","type":"uint256"}],"name":"setAffiliatePercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newRate","type":"uint256"}],"name":"setCapsuleEarnRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newBatch","type":"uint256"}],"name":"setMaxBatchTribes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"staker","type":"address"},{"internalType":"uint256","name":"akcId","type":"uint256"},{"internalType":"uint256","name":"spec","type":"uint256"}],"name":"stakeAKC","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tribeOwner","type":"address"}],"name":"suspendTribesOfUser","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tribeSpecs","outputs":[{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"rps","type":"uint256"},{"internalType":"string","name":"name","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"staker","type":"address"},{"internalType":"uint256","name":"akcId","type":"uint256"},{"internalType":"uint256","name":"spec","type":"uint256"}],"name":"unstakeAKC","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"uint256","name":"newPrice","type":"uint256"},{"internalType":"uint256","name":"newRps","type":"uint256"}],"name":"updateTribeSpec","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"userToAKC","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userToAffiliateEarnings","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"userToEarnings","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"userToTribes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"percentage","type":"uint256"},{"internalType":"address","name":"_erc20Address","type":"address"},{"internalType":"address","name":"_to","type":"address"}],"name":"withdrawERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"percentage","type":"uint256"},{"internalType":"address","name":"_to","type":"address"}],"name":"withdrawEth","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"kongId","type":"uint256"},{"internalType":"address","name":"_to","type":"address"}],"name":"withdrawStuckKong","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6080604052603260055560088055610101600955671bc16d674ec80000600a556005600b556005600c553480156200003657600080fd5b5060405162005579380380620055798339810160408190526200005991620008e2565b6200006433620002a2565b620000907f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633620002f2565b620000ab6000805160206200555983398151915233620002f2565b620000c66000805160206200555983398151915233620002f2565b620000d3600033620002f2565b6000845111620001355760405162461bcd60e51b815260206004820152602260248201527f4841564520544f205350454349465920494e495449414c495a45522054524942604482015261455360f01b60648201526084015b60405180910390fd5b8251845114620001885760405162461bcd60e51b815260206004820152601b60248201527f545249424520505249434553204d555354204d4154434820525053000000000060448201526064016200012c565b8151845114620001db5760405162461bcd60e51b815260206004820152601d60248201527f545249424520505249434553204d555354204d41544348204e414d455300000060448201526064016200012c565b60005b845181101562000277576000858281518110620001ff57620001ff62000a56565b60200260200101519050600085838151811062000220576200022062000a56565b60200260200101519050600085848151811062000241576200024162000a56565b602002602001015190506200025e8383836200030260201b60201c565b50505080806200026e9062000a82565b915050620001de565b50600680546001600160a01b0319166001600160a01b03929092169190911790555062000bfd915050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b620002fe828262000425565b5050565b600080516020620055598339815191526200031e8133620004ad565b6040805160608101825285815260208082018681529282018581526004805460018101825560009190915283517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b600390920291820190815594517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c82015590518051939485949093620003d7937f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19d019201906200070a565b50505082604051620003ea919062000a9e565b60405190819003812090859087907fe07102dae624713416fa7c0adb7c5d674cdfce8b0eb051643e41452b4b3c737a90600090a45050505050565b60008281526001602090815260408083206001600160a01b038516845290915290205460ff16620002fe5760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b60008281526001602090815260408083206001600160a01b038516845290915290205460ff16620002fe57620004f9816001600160a01b031660146200054a60201b62003bea1760201c565b6200050f83602062003bea6200054a821b17811c565b6040516020016200052292919062000abc565b60408051601f198184030181529082905262461bcd60e51b82526200012c9160040162000b35565b606060006200055b83600262000b6a565b6200056890600262000b8c565b6001600160401b03811115620005825762000582620007b0565b6040519080825280601f01601f191660200182016040528015620005ad576020820181803683370190505b509050600360fc1b81600081518110620005cb57620005cb62000a56565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110620005fd57620005fd62000a56565b60200101906001600160f81b031916908160001a90535060006200062384600262000b6a565b6200063090600162000b8c565b90505b6001811115620006b2576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811062000668576200066862000a56565b1a60f81b82828151811062000681576200068162000a56565b60200101906001600160f81b031916908160001a90535060049490941c93620006aa8162000ba7565b905062000633565b508315620007035760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016200012c565b9392505050565b828054620007189062000bc1565b90600052602060002090601f0160209004810192826200073c576000855562000787565b82601f106200075757805160ff191683800117855562000787565b8280016001018555821562000787579182015b82811115620007875782518255916020019190600101906200076a565b506200079592915062000799565b5090565b5b808211156200079557600081556001016200079a565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715620007f157620007f1620007b0565b604052919050565b60006001600160401b03821115620008155762000815620007b0565b5060051b60200190565b600082601f8301126200083157600080fd5b815160206200084a6200084483620007f9565b620007c6565b82815260059290921b840181019181810190868411156200086a57600080fd5b8286015b848110156200088757805183529183019183016200086e565b509695505050505050565b60005b83811015620008af57818101518382015260200162000895565b83811115620008bf576000848401525b50505050565b80516001600160a01b0381168114620008dd57600080fd5b919050565b60008060008060808587031215620008f957600080fd5b84516001600160401b03808211156200091157600080fd5b6200091f888389016200081f565b95506020915081870151818111156200093757600080fd5b6200094589828a016200081f565b9550506040870151818111156200095b57600080fd5b8701601f810189136200096d57600080fd5b80516200097e6200084482620007f9565b81815260059190911b8201840190848101908b8311156200099e57600080fd5b8584015b8381101562000a3357805186811115620009bc5760008081fd5b8501603f81018e13620009cf5760008081fd5b8781015187811115620009e657620009e6620007b0565b620009fa601f8201601f19168a01620007c6565b8181528f604083850101111562000a115760008081fd5b62000a23828b83016040860162000892565b85525050918601918601620009a2565b5080975050505050505062000a4b60608601620008c5565b905092959194509250565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820162000a975762000a9762000a6c565b5060010190565b6000825162000ab281846020870162000892565b9190910192915050565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835162000af681601785016020880162000892565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835162000b2981602884016020880162000892565b01602801949350505050565b602081526000825180602084015262000b5681604085016020870162000892565b601f01601f19169190910160400192915050565b600081600019048311821515161562000b875762000b8762000a6c565b500290565b6000821982111562000ba25762000ba262000a6c565b500190565b60008162000bb95762000bb962000a6c565b506000190190565b600181811c9082168062000bd657607f821691505b60208210810362000bf757634e487b7160e01b600052602260045260246000fd5b50919050565b61494c8062000c0d6000396000f3fe608060405234801561001057600080fd5b50600436106104a75760003560e01c80639007dc2d1161026b578063ab1096c911610150578063e6a1a016116100c8578063f2fde38b11610097578063fac5dbc61161007c578063fac5dbc614610ad4578063fc5f18d314610760578063fefd9cbd14610ae757600080fd5b8063f2fde38b14610aae578063f361c61514610ac157600080fd5b8063e6a1a01614610a62578063e6ba1db414610a75578063e74d1d3d14610a88578063e991560f14610a9b57600080fd5b8063c1ed14ec1161011f578063d547741f11610104578063d547741f14610a06578063d5ab3c2f14610a19578063e5f8d2ad14610a3957600080fd5b8063c1ed14ec146109e0578063cf68f49b146109f357600080fd5b8063ab1096c91461097c578063bb40cfa61461098f578063bdbae869146109ba578063c0432387146109cd57600080fd5b80639e6a4523116101e3578063a1faa62c116101b2578063a5dc785511610197578063a5dc785514610943578063a8a29f9a14610956578063a990593f1461096957600080fd5b8063a1faa62c14610928578063a217fddf1461093b57600080fd5b80639e6a4523146108e65780639eb6aa6c146108f9578063a158657c1461090c578063a164fea91461091f57600080fd5b806395bbf65e1161023a57806398fb99501161021f57806398fb9950146108b75780639a3fa3bb146108c05780639da45abb146108d357600080fd5b806395bbf65e1461088657806398dfa2f7146108a057600080fd5b80639007dc2d14610828578063911d945b1461083157806391a575441461084457806391d148541461084d57600080fd5b8063519c222e1161039157806375aca83d11610309578063827a9108116102d85780638aeda25a116102bd5780638aeda25a146107d45780638da5cb5b146107fb5780638ed254541461082057600080fd5b8063827a9108146107c157806389ce8f321461071e57600080fd5b806375aca83d1461077557806375c2fd3b146107885780637927bf081461079b5780637f2cdaf2146107ae57600080fd5b806360b558af116103605780636b82e4c1116103455780636b82e4c114610745578063715018a6146107585780637575aa8a1461076057600080fd5b806360b558af1461071e578063618254a21461073257600080fd5b8063519c222e146106dc578063535f2e17146106e5578063581860fa146106f85780635d29dab41461070b57600080fd5b8063248a9ca31161042457806336568abe116103f35780633f3c535a116103d85780633f3c535a146106a3578063437a9666146106b657806344889230146106c957600080fd5b806336568abe1461066e5780633de469c61461068157600080fd5b8063248a9ca3146106115780632ece9c5a146106355780632f2ff15d14610648578063362a3fad1461065b57600080fd5b80630a5ab8681161047b578063150b7a0211610460578063150b7a021461058d57806317800d79146105de57806321f332b5146105f157600080fd5b80630a5ab8681461053157806312b6583a1461056257600080fd5b8062cc7e81146104ac57806301ffc9a7146104c157806306f53cc0146104e95780630a31a3aa1461051e575b600080fd5b6104bf6104ba36600461413d565b610afe565b005b6104d46104cf36600461416d565b610ca9565b60405190151581526020015b60405180910390f35b6104fc6104f7366004614197565b610d12565b60408051825181526020808401519082015291810151908201526060016104e0565b6104fc61052c3660046141cc565b610e97565b61055461053f3660046141cc565b6fffffffffffffffffffffffffffffffff1690565b6040519081526020016104e0565b6105546105703660046141e5565b600360209081526000928352604080842090915290825290205481565b6105c561059b366004614211565b7f150b7a020000000000000000000000000000000000000000000000000000000095945050505050565b6040516001600160e01b031990911681526020016104e0565b6105546105ec3660046141e5565b610ee6565b6106046105ff3660046142b0565b610f90565b6040516104e091906142cd565b61055461061f3660046141cc565b6000908152600160208190526040909120015490565b6105546106433660046142b0565b61105f565b6104bf61065636600461413d565b6110e1565b6105546106693660046142b0565b61110d565b6104bf61067c36600461413d565b611170565b61069461068f3660046141cc565b6111fc565b6040516104e09392919061436d565b6105546106b13660046141cc565b6112be565b6104bf6106c43660046141cc565b6112e2565b6105546106d73660046141e5565b61132f565b610554600a5481565b6105546106f33660046141e5565b611767565b6105546107063660046141e5565b611acc565b6104bf610719366004614395565b611b1a565b61055461072c3660046141cc565b60801c90565b6104bf6107403660046141e5565b611c96565b6105546107533660046142b0565b611d35565b6104bf611da1565b6105546000805160206148f783398151915281565b6104bf6107833660046143e5565b611e07565b610554610796366004614197565b611ea5565b6105546107a93660046141e5565b61221c565b6104bf6107bc366004614197565b612287565b6104bf6107cf366004614197565b6124b3565b6105547f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b6000546001600160a01b03165b6040516001600160a01b0390911681526020016104e0565b600454610554565b61055460085481565b6104bf61083f36600461445f565b612749565b610554600b5481565b6104d461085b36600461413d565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6105546108943660046141cc565b60201c63ffffffff1690565b6105546108ae3660046141cc565b63ffffffff1690565b61055460095481565b6105546108ce3660046141e5565b61292b565b6104bf6108e13660046141e5565b612979565b6105546108f43660046141e5565b612a55565b6104bf6109073660046144cb565b612b48565b6104bf61091a36600461413d565b612c30565b610554600c5481565b610554610936366004614197565b612cd5565b610554600081565b6104bf6109513660046141cc565b612f80565b6105546109643660046141e5565b612f9f565b6104bf6109773660046141cc565b612fd0565b61055461098a3660046144f7565b612fef565b61055461099d3660046141e5565b600760209081526000928352604080842090915290825290205481565b6104bf6109c83660046142b0565b613386565b6104bf6109db366004614548565b61345d565b6104bf6109ee3660046141cc565b613579565b600654610808906001600160a01b031681565b6104bf610a1436600461413d565b6135c6565b610554610a273660046142b0565b600d6020526000908152604090205481565b610554610a473660046142b0565b6001600160a01b031660009081526002602052604090205490565b610554610a703660046141e5565b6135ed565b610554610a83366004614197565b613672565b610604610a9636600461460c565b613885565b610554610aa93660046142b0565b613947565b6104bf610abc3660046142b0565b613a9a565b610554610acf366004614197565b613b7c565b6104bf610ae23660046141cc565b613bcb565b610554610af53660046141cc565b60401c60ff1690565b6000546001600160a01b03163314610b5d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6006546040516331a9108f60e11b81526004810184905230916001600160a01b031690636352211e90602401602060405180830381865afa158015610ba6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bca9190614658565b6001600160a01b031614610c205760405162461bcd60e51b815260206004820152601660248201527f434f524520444f4553204e4f54204f574e204b4f4e47000000000000000000006044820152606401610b54565b6006546040517f23b872dd0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03838116602483015260448201859052909116906323b872dd90606401600060405180830381600087803b158015610c8d57600080fd5b505af1158015610ca1573d6000803e3d6000fd5b505050505050565b60006001600160e01b031982167f7965db0b000000000000000000000000000000000000000000000000000000001480610d0c57507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b610d3660405180606001604052806000815260200160008152602001600081525090565b6001600160a01b0384166000908152600260205260409020548310610d9d5760405162461bcd60e51b815260206004820152601960248201527f545249424520494e444558204f5554204f4620424f554e4453000000000000006044820152606401610b54565b6004548210610de35760405162461bcd60e51b8152602060048201526012602482015271494e56414c4944205452494245205350454360701b6044820152606401610b54565b600080805b6001600160a01b038716600090815260026020526040902054811015610e81576001600160a01b0387166000908152600260205260408120805483908110610e3257610e32614675565b600091825260209091200154905060ff604082901c16868103610e6c57878503610e5e57509150610e81565b84610e68816146a1565b9550505b50508080610e79906146a1565b915050610de8565b50610e8b81610e97565b925050505b9392505050565b610ebb60405180606001604052806000815260200160008152602001600081525090565b63ffffffff82168152602082901c63ffffffff166020820152604082901c60ff166040820152919050565b6004546000908210610efa57506000610d0c565b6000805b6001600160a01b038516600090815260026020526040902054811015610f88576001600160a01b038516600090815260026020526040902080548591610f639184908110610f4e57610f4e614675565b60009182526020909120015460401c60ff1690565b03610f765781610f72816146a1565b9250505b80610f80816146a1565b915050610efe565b509392505050565b60045460609060009067ffffffffffffffff811115610fb157610fb1614532565b604051908082528060200260200182016040528015610fda578160200160208202803683370190505b50905060005b600454811015611058576001600160a01b0384166000908152600760209081526040808320848452909152812054906fffffffffffffffffffffffffffffffff821690508084848151811061103757611037614675565b60200260200101818152505050508080611050906146a1565b915050610fe0565b5092915050565b6001600160a01b03811660009081526002602052604081205481906032811061108b5760149150611058565b6014811061109c57600f9150611058565b600f81106110ad57600c9150611058565b600a81106110be5760089150611058565b600581106110cf5760049150611058565b60028110611058575060029392505050565b600082815260016020819052604090912001546110fe8133613dcb565b6111088383613e4b565b505050565b600080805b6001600160a01b03841660009081526002602052604090205481101561115a5761113c8482611767565b61114690836146ba565b915080611152816146a1565b915050611112565b506111668360006135ed565b610e9090826146ba565b6001600160a01b03811633146111ee5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610b54565b6111f88282613ed2565b5050565b6004818154811061120c57600080fd5b906000526020600020906003020160009150905080600001549080600101549080600201805461123b906146d2565b80601f0160208091040260200160405190810160405280929190818152602001828054611267906146d2565b80156112b45780601f10611289576101008083540402835291602001916112b4565b820191906000526020600020905b81548152906001019060200180831161129757829003601f168201915b5050505050905083565b6000610d0c6fffffffffffffffffffffffffffffffff8316655af3107a4000614706565b6000805160206148f78339815191526112fb8133613dcb565b600882905560405182907f20937a6448d4a6866f115c90bc56ee7117b8c6f2fbc7db5ce803dc2c70c2b66b90600090a25050565b60006000805160206148f783398151915261134a8133613dcb565b6001600160a01b03841660009081526002602052604090205483106113b15760405162461bcd60e51b815260206004820152601960248201527f545249424520494e444558204f5554204f4620424f554e4453000000000000006044820152606401610b54565b6001600160a01b03841660009081526002602052604081208054859081106113db576113db614675565b60009182526020822001549150604082901c60ff1690506000602083901c63ffffffff16905060006004838154811061141657611416614675565b90600052602060002090600302016040518060600160405290816000820154815260200160018201548152602001600282018054611453906146d2565b80601f016020809104026020016040519081016040528092919081815260200182805461147f906146d2565b80156114cc5780601f106114a1576101008083540402835291602001916114cc565b820191906000526020600020905b8154815290600101906020018083116114af57829003601f168201915b505050505081525050905060006114e68563ffffffff1690565b6001600160a01b038a1660009081526002602090815260409182902080549288901b4290921b9093171792508291908a90811061152557611525614675565b600091825260208220019190915561153d8442614725565b90506000620151808285602001516115559190614706565b61155f919061473c565b6001600160a01b038c1660009081526007602090815260408083208a8452909152812054919250901561161e576001600160a01b038c1660009081526007602090815260408083208a845290915290205460801c8681116115d9576064600854846115ca9190614706565b6115d4919061473c565b61161a565b600854606490620151806115ed8442614725565b89602001516115fc9190614706565b611606919061473c565b6116109190614706565b61161a919061473c565b9150505b6000605a61162f620151808661473c565b10611652576064611641846032614706565b61164b919061473c565b9050611704565b603c611661620151808661473c565b10611673576064611641846028614706565b601e611682620151808661473c565b10611694576064611641846019614706565b600e6116a3620151808661473c565b106116b557606461164184600c614706565b60076116c4620151808661473c565b106116d6576064611641846005614706565b60036116e5620151808661473c565b106117045760646116f7846002614706565b611701919061473c565b90505b8061170f83856146ba565b61171991906146ba565b6001600160a01b038e1660009081526003602090815260408083208c84529091528120805492955085929091906117519084906146ba565b90915550929d9c50505050505050505050505050565b6001600160a01b03821660009081526002602052604081205482106117ce5760405162461bcd60e51b815260206004820152601960248201527f545249424520494e444558204f5554204f4620424f554e4453000000000000006044820152606401610b54565b6001600160a01b03831660009081526002602052604081208054849081106117f8576117f8614675565b60009182526020822001549150604082901c60ff1690506000602083901c63ffffffff16905060006004838154811061183357611833614675565b90600052602060002090600302016040518060600160405290816000820154815260200160018201548152602001600282018054611870906146d2565b80601f016020809104026020016040519081016040528092919081815260200182805461189c906146d2565b80156118e95780601f106118be576101008083540402835291602001916118e9565b820191906000526020600020905b8154815290600101906020018083116118cc57829003601f168201915b5050505050815250509050600082426119029190614725565b905060006201518082846020015161191a9190614706565b611924919061473c565b6001600160a01b038a16600090815260076020908152604080832089845290915281205491925090156119e3576001600160a01b038a16600090815260076020908152604080832089845290915290205460801c85811161199e5760646008548461198f9190614706565b611999919061473c565b6119df565b600854606490620151806119b28442614725565b88602001516119c19190614706565b6119cb919061473c565b6119d59190614706565b6119df919061473c565b9150505b6000603c6119f4620151808661473c565b10611a17576064611a06846028614706565b611a10919061473c565b9050611aa8565b601e611a26620151808661473c565b10611a38576064611a06846019614706565b600e611a47620151808661473c565b10611a59576064611a0684600c614706565b6007611a68620151808661473c565b10611a7a576064611a06846005614706565b6003611a89620151808661473c565b10611aa8576064611a9b846002614706565b611aa5919061473c565b90505b80611ab383856146ba565b611abd91906146ba565b9b9a5050505050505050505050565b600080805b6001600160a01b038516600090815260026020526040902054811015610f8857611afc858286611ea5565b611b0690836146ba565b915080611b12816146a1565b915050611ad1565b6000546001600160a01b03163314611b745760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b54565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa158015611bd4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bf8919061475e565b90506001600160a01b03831663a9059cbb836064611c168886614706565b611c20919061473c565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015611c6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c8f9190614777565b5050505050565b6000805160206148f7833981519152611caf8133613dcb565b6001600160a01b0383166000908152600d602052604081205490611cd38260801c90565b90506000611ce0836112be565b90506000655af3107a4000611cf587846146ba565b611cff919061473c565b90506080611d0e8460016146ba565b6001600160a01b039098166000908152600d6020526040902097901b179095555050505050565b6001600160a01b0381166000908152600260205260408120548103611d5c57506000919050565b6001600160a01b038216600090815260026020526040812080548290611d8457611d84614675565b60009182526020918290200154915081901c63ffffffff16610e90565b6000546001600160a01b03163314611dfb5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b54565b611e056000613f55565b565b6000805160206148f7833981519152611e208133613dcb565b6006546040517fa22cb4650000000000000000000000000000000000000000000000000000000081526001600160a01b03858116600483015284151560248301529091169063a22cb46590604401600060405180830381600087803b158015611e8857600080fd5b505af1158015611e9c573d6000803e3d6000fd5b50505050505050565b6001600160a01b0383166000908152600260205260408120548310611f0c5760405162461bcd60e51b815260206004820152601960248201527f545249424520494e444558204f5554204f4620424f554e4453000000000000006044820152606401610b54565b6001600160a01b0384166000908152600260205260408120805485908110611f3657611f36614675565b600091825260209091200154905060ff604082901c16838114611f5e57600092505050610e90565b6000602083901c63ffffffff169050600060048381548110611f8257611f82614675565b90600052602060002090600302016040518060600160405290816000820154815260200160018201548152602001600282018054611fbf906146d2565b80601f0160208091040260200160405190810160405280929190818152602001828054611feb906146d2565b80156120385780601f1061200d57610100808354040283529160200191612038565b820191906000526020600020905b81548152906001019060200180831161201b57829003601f168201915b5050505050815250509050600082426120519190614725565b90506000620151808284602001516120699190614706565b612073919061473c565b6001600160a01b038b1660009081526007602090815260408083208984529091528120549192509015612132576001600160a01b038b16600090815260076020908152604080832089845290915290205460801c8581116120ed576064600854846120de9190614706565b6120e8919061473c565b61212e565b600854606490620151806121018442614725565b88602001516121109190614706565b61211a919061473c565b6121249190614706565b61212e919061473c565b9150505b6000603c612143620151808661473c565b10612166576064612155846028614706565b61215f919061473c565b90506121f7565b601e612175620151808661473c565b10612187576064612155846019614706565b600e612196620151808661473c565b106121a857606461215584600c614706565b60076121b7620151808661473c565b106121c9576064612155846005614706565b60036121d8620151808661473c565b106121f75760646121ea846002614706565b6121f4919061473c565b90505b8061220283856146ba565b61220c91906146ba565b9c9b505050505050505050505050565b600080805b6001600160a01b03851660009081526002602052604090205481101561226a5761224c858286613672565b61225690836146ba565b915080612262816146a1565b915050612221565b5061227584846135ed565b61227f90826146ba565b949350505050565b6000805160206148f78339815191526122a08133613dcb565b6001600160a01b038416600090815260076020908152604080832085845290915281205490036123125760405162461bcd60e51b815260206004820152601660248201527f4e4f204b4f4e47205354414b454420494e2053504543000000000000000000006044820152606401610b54565b6006546040516331a9108f60e11b81526004810185905230916001600160a01b031690636352211e90602401602060405180830381865afa15801561235b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061237f9190614658565b6001600160a01b0316036123d55760405162461bcd60e51b815260206004820152601660248201527f4b4f4e47205354494c4c20494e20434f4e5452414354000000000000000000006044820152606401610b54565b6001600160a01b03841660009081526007602090815260408083208584529091529020546fffffffffffffffffffffffffffffffff1683811461245a5760405162461bcd60e51b815260206004820181905260248201527f43414e4e4f5420554e5354414b4520414b4320594f5520444f4e2754204f574e6044820152606401610b54565b6001600160a01b0385166000818152600760209081526040808320878452909152808220829055518592879290917f96517f1291b59f235b114397be516ff179f92b63e1a677d99f417d48b3e52c599190a45050505050565b6000805160206148f78339815191526124cc8133613dcb565b6004548210806124dd575060095482145b6125295760405162461bcd60e51b815260206004820152601260248201527f53504543204f5554204f4620424f554e445300000000000000000000000000006044820152606401610b54565b6001600160a01b0384166000908152600760209081526040808320858452909152902054156125c05760405162461bcd60e51b815260206004820152602360248201527f414e4f54484552204b4f4e4720414c5245414459205354414b454420494e205360448201527f50454300000000000000000000000000000000000000000000000000000000006064820152608401610b54565b60006125cc8584610ee6565b11806125d9575060095482145b6126255760405162461bcd60e51b815260206004820152601660248201527f5553455220444f4553204e4f54204f574e2053504543000000000000000000006044820152606401610b54565b6006546040516331a9108f60e11b81526004810185905230916001600160a01b031690636352211e90602401602060405180830381865afa15801561266e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126929190614658565b6001600160a01b0316146126e85760405162461bcd60e51b815260206004820152601f60248201527f4b4f4e47204e4f54205452414e53464552454420544f20434f4e5452414354006044820152606401610b54565b6001600160a01b03841660008181526007602090815260408083208684529091528082204260801b87179081905590519092859287927fb10fe2417d8edbe36a47d56306a06fbe05fa13d1adbd01d610b38ab2db19f6789190a45050505050565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a66127748133613dcb565b8382146127c35760405162461bcd60e51b815260206004820152601960248201527f4e45574f574e455253204d555354204d415443482053504543000000000000006044820152606401610b54565b60055484106128145760405162461bcd60e51b815260206004820152601b60248201527f4e45574f574e4552532045584345454453204d415820424154434800000000006044820152606401610b54565b60005b84811015610ca157600086868381811061283357612833614675565b905060200201602081019061284891906142b0565b9050600085858481811061285e5761285e614675565b90506020020135905060048054905081106128b05760405162461bcd60e51b8152602060048201526012602482015271494e56414c4944205452494245205350454360701b6044820152606401610b54565b6001600160a01b03821660008181526002602090815260408083208054600181018255908452828420429384901b90931786831b179201829055519092849290917fbdfc794afcbb463a4c14b1a5eeadd3387a2833d09237a91749f13f3f6ebb58e39190a35050508080612923906146a1565b915050612817565b600080805b6001600160a01b03851660009081526002602052604090205481101561226a5761295b858286612cd5565b61296590836146ba565b915080612971816146a1565b915050612930565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a66129a48133613dcb565b60045482106129ea5760405162461bcd60e51b8152602060048201526012602482015271494e56414c4944205452494245205350454360701b6044820152606401610b54565b6001600160a01b03831660008181526002602090815260408083208054600181018255908452828420429384901b90931787831b179201829055519092859290917fbdfc794afcbb463a4c14b1a5eeadd3387a2833d09237a91749f13f3f6ebb58e39190a350505050565b6001600160a01b038216600090815260026020526040812054612aba5760405162461bcd60e51b815260206004820152601b60248201527f5553455220444f45534e2754204f574e20414e592054524942455300000000006044820152606401610b54565b6000805b6001600160a01b038516600090815260026020526040902054811015610f88576001600160a01b0385166000908152600260205260408120805483908110612b0857612b08614675565b600091825260209091200154905060ff604082901c16858103612b335783612b2f816146a1565b9450505b50508080612b40906146a1565b915050612abe565b6000805160206148f7833981519152612b618133613dcb565b6004548410612bb25760405162461bcd60e51b815260206004820152601360248201527f494e444558204f5554204f4620424f554e4453000000000000000000000000006044820152606401610b54565b600060048581548110612bc757612bc7614675565b6000918252602090912060039091020184815560018101849055604051909150612bf5906002830190614794565b60405190819003812090849086907f4b1850b00fc0a4cfc6a9f2404737110084be798fabafeeb30320d675a17fe11f90600090a45050505050565b6000546001600160a01b03163314612c8a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b54565b6001600160a01b0381166108fc6064612ca38547614706565b612cad919061473c565b6040518115909202916000818181858888f19350505050158015611108573d6000803e3d6000fd5b6001600160a01b0383166000908152600260205260408120548310612d3c5760405162461bcd60e51b815260206004820152601960248201527f545249424520494e444558204f5554204f4620424f554e4453000000000000006044820152606401610b54565b6001600160a01b0384166000908152600260205260408120805485908110612d6657612d66614675565b600091825260209091200154905060ff604082901c1663ffffffff8216848111612d905784612d92565b805b9050600060048381548110612da957612da9614675565b90600052602060002090600302016040518060600160405290816000820154815260200160018201548152602001600282018054612de6906146d2565b80601f0160208091040260200160405190810160405280929190818152602001828054612e12906146d2565b8015612e5f5780601f10612e3457610100808354040283529160200191612e5f565b820191906000526020600020905b815481529060010190602001808311612e4257829003601f168201915b505050505081525050905060008242612e789190614725565b9050600062015180828460200151612e909190614706565b612e9a919061473c565b6001600160a01b038b1660009081526007602090815260408083208984529091528120549192509015612f59576001600160a01b038b16600090815260076020908152604080832089845290915290205460801c858111612f1457606460085484612f059190614706565b612f0f919061473c565b612f55565b60085460649062015180612f288442614725565b8860200151612f379190614706565b612f41919061473c565b612f4b9190614706565b612f55919061473c565b9150505b6000612f6f63ffffffff60208a901c1642614725565b9350603c612143620151808661473c565b6000805160206148f7833981519152612f998133613dcb565b50600a55565b60026020528160005260406000208181548110612fbb57600080fd5b90600052602060002001600091509150505481565b6000805160206148f7833981519152612fe98133613dcb565b50600c55565b6001600160a01b03841660009081526002602052604081205484106130565760405162461bcd60e51b815260206004820152601960248201527f545249424520494e444558204f5554204f4620424f554e4453000000000000006044820152606401610b54565b6001600160a01b038516600090815260026020526040812080548690811061308057613080614675565b600091825260209091200154905060ff604082901c168381146130a85760009250505061227f565b63ffffffff82168581116130bc57856130be565b805b90506000600483815481106130d5576130d5614675565b90600052602060002090600302016040518060600160405290816000820154815260200160018201548152602001600282018054613112906146d2565b80601f016020809104026020016040519081016040528092919081815260200182805461313e906146d2565b801561318b5780601f106131605761010080835404028352916020019161318b565b820191906000526020600020905b81548152906001019060200180831161316e57829003601f168201915b5050505050815250509050600082426131a49190614725565b90506000620151808284602001516131bc9190614706565b6131c6919061473c565b6001600160a01b038c1660009081526007602090815260408083208984529091528120549192509015613285576001600160a01b038c16600090815260076020908152604080832089845290915290205460801c858111613240576064600854846132319190614706565b61323b919061473c565b613281565b600854606490620151806132548442614725565b88602001516132639190614706565b61326d919061473c565b6132779190614706565b613281919061473c565b9150505b600061329b63ffffffff60208a901c1642614725565b9350603c6132ac620151808661473c565b106132cf5760646132be846028614706565b6132c8919061473c565b9050613360565b601e6132de620151808661473c565b106132f05760646132be846019614706565b600e6132ff620151808661473c565b106133115760646132be84600c614706565b6007613320620151808661473c565b106133325760646132be846005614706565b6003613341620151808661473c565b10613360576064613353846002614706565b61335d919061473c565b90505b8061336b83856146ba565b61337591906146ba565b9d9c50505050505050505050505050565b6000805160206148f783398151915261339f8133613dcb565b6001600160a01b0382166000908152600260205260409020546134045760405162461bcd60e51b815260206004820152601260248201527f5553455220484153204e4f2054524942455300000000000000000000000000006044820152606401610b54565b6001600160a01b038216600090815260026020526040812061342591614071565b6040516001600160a01b038316907fbd3c489256cfbe2f1ae0b1fa1214ce04885f152a389bf18cebe417598d8694e290600090a25050565b6000805160206148f78339815191526134768133613dcb565b6040805160608101825285815260208082018681529282018581526004805460018101825560009190915283517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b600390920291820190815594517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c8201559051805193948594909361352d937f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19d0192019061408f565b5050508260405161353e919061482f565b60405190819003812090859087907fe07102dae624713416fa7c0adb7c5d674cdfce8b0eb051643e41452b4b3c737a90600090a45050505050565b6000805160206148f78339815191526135928133613dcb565b600582905560405182907fe1b64904cef7c560a16acef63d8ddc37dfc1c2574695e5db49757caffa80470890600090a25050565b600082815260016020819052604090912001546135e38133613dcb565b6111088383613ed2565b6001600160a01b03821660009081526007602090815260408083206009548452909152812054808203613624576000915050610d0c565b60006136308260801c90565b9050831561363b5750825b60006136478242614725565b905060006201518082600a5461365d9190614706565b613667919061473c565b979650505050505050565b6001600160a01b03831660009081526002602052604081205483106136d95760405162461bcd60e51b815260206004820152601960248201527f545249424520494e444558204f5554204f4620424f554e4453000000000000006044820152606401610b54565b6001600160a01b038416600090815260026020526040812080548590811061370357613703614675565b60009182526020822001549150604082901c60ff1690506000602083901c63ffffffff16905060006004838154811061373e5761373e614675565b9060005260206000209060030201604051806060016040529081600082015481526020016001820154815260200160028201805461377b906146d2565b80601f01602080910402602001604051908101604052809291908181526020018280546137a7906146d2565b80156137f45780601f106137c9576101008083540402835291602001916137f4565b820191906000526020600020905b8154815290600101906020018083116137d757829003601f168201915b50505050508152505090506000864261380d9190614725565b90506000620151808284602001516138259190614706565b61382f919061473c565b6001600160a01b038b16600090815260076020908152604080832089845290915281205491925090156138795760646008548361386c9190614706565b613876919061473c565b90505b6000612f6f8642614725565b606060008367ffffffffffffffff8111156138a2576138a2614532565b6040519080825280602002602001820160405280156138cb578160200160208202803683370190505b50905060005b8481101561393e57600061390b8787848181106138f0576138f0614675565b905060200201602081019061390591906142b0565b8661292b565b90508083838151811061392057613920614675565b60209081029190910101525080613936816146a1565b9150506138d1565b50949350505050565b60006000805160206148f78339815191526139628133613dcb565b6001600160a01b0383166000908152600260205260409020541515806139ac57506001600160a01b0383166000908152600760209081526040808320600954845290915290205415155b6139f85760405162461bcd60e51b815260206004820152601b60248201527f5553455220444f45534e2754204f574e20414e592054524942455300000000006044820152606401610b54565b6000805b6001600160a01b038516600090815260026020526040902054811015613a4457613a26858261132f565b613a3090836146ba565b915080613a3c816146a1565b9150506139fc565b50613a4e84613fbd565b613a5890826146ba565b905080846001600160a01b03167fd0813ff03c470dcc7baa9ce36914dc2febdfd276d639deffaac383fd3db42ba360405160405180910390a391505b50919050565b6000546001600160a01b03163314613af45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b54565b6001600160a01b038116613b705760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610b54565b613b7981613f55565b50565b600080805b6001600160a01b03861660009081526002602052604090205481101561393e57613bad86828787612fef565b613bb790836146ba565b915080613bc3816146a1565b915050613b81565b6000805160206148f7833981519152613be48133613dcb565b50600b55565b60606000613bf9836002614706565b613c049060026146ba565b67ffffffffffffffff811115613c1c57613c1c614532565b6040519080825280601f01601f191660200182016040528015613c46576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110613c7d57613c7d614675565b60200101906001600160f81b031916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110613cc857613cc8614675565b60200101906001600160f81b031916908160001a9053506000613cec846002614706565b613cf79060016146ba565b90505b6001811115613d7c577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110613d3857613d38614675565b1a60f81b828281518110613d4e57613d4e614675565b60200101906001600160f81b031916908160001a90535060049490941c93613d758161484b565b9050613cfa565b508315610e905760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b54565b60008281526001602090815260408083206001600160a01b038516845290915290205460ff166111f857613e09816001600160a01b03166014613bea565b613e14836020613bea565b604051602001613e25929190614862565b60408051601f198184030181529082905262461bcd60e51b8252610b54916004016148e3565b60008281526001602090815260408083206001600160a01b038516845290915290205460ff166111f85760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b60008281526001602090815260408083206001600160a01b038516845290915290205460ff16156111f85760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03811660009081526007602090815260408083206009548452909152812054808203613ff35750600092915050565b6fffffffffffffffffffffffffffffffff8116608082901c60006140178242614725565b905060006201518082600a5461402d9190614706565b614037919061473c565b6001600160a01b039097166000908152600760209081526040808320600954845290915290204260801b9094179093555093949350505050565b5080546000825590600052602060002090810190613b799190614113565b82805461409b906146d2565b90600052602060002090601f0160209004810192826140bd5760008555614103565b82601f106140d657805160ff1916838001178555614103565b82800160010185558215614103579182015b828111156141035782518255916020019190600101906140e8565b5061410f929150614113565b5090565b5b8082111561410f5760008155600101614114565b6001600160a01b0381168114613b7957600080fd5b6000806040838503121561415057600080fd5b82359150602083013561416281614128565b809150509250929050565b60006020828403121561417f57600080fd5b81356001600160e01b031981168114610e9057600080fd5b6000806000606084860312156141ac57600080fd5b83356141b781614128565b95602085013595506040909401359392505050565b6000602082840312156141de57600080fd5b5035919050565b600080604083850312156141f857600080fd5b823561420381614128565b946020939093013593505050565b60008060008060006080868803121561422957600080fd5b853561423481614128565b9450602086013561424481614128565b935060408601359250606086013567ffffffffffffffff8082111561426857600080fd5b818801915088601f83011261427c57600080fd5b81358181111561428b57600080fd5b89602082850101111561429d57600080fd5b9699959850939650602001949392505050565b6000602082840312156142c257600080fd5b8135610e9081614128565b6020808252825182820181905260009190848201906040850190845b81811015614305578351835292840192918401916001016142e9565b50909695505050505050565b60005b8381101561432c578181015183820152602001614314565b8381111561433b576000848401525b50505050565b60008151808452614359816020860160208601614311565b601f01601f19169290920160200192915050565b83815282602082015260606040820152600061438c6060830184614341565b95945050505050565b6000806000606084860312156143aa57600080fd5b8335925060208401356143bc81614128565b915060408401356143cc81614128565b809150509250925092565b8015158114613b7957600080fd5b600080604083850312156143f857600080fd5b823561440381614128565b91506020830135614162816143d7565b60008083601f84011261442557600080fd5b50813567ffffffffffffffff81111561443d57600080fd5b6020830191508360208260051b850101111561445857600080fd5b9250929050565b6000806000806040858703121561447557600080fd5b843567ffffffffffffffff8082111561448d57600080fd5b61449988838901614413565b909650945060208701359150808211156144b257600080fd5b506144bf87828801614413565b95989497509550505050565b6000806000606084860312156144e057600080fd5b505081359360208301359350604090920135919050565b6000806000806080858703121561450d57600080fd5b843561451881614128565b966020860135965060408601359560600135945092505050565b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561455d57600080fd5b8335925060208401359150604084013567ffffffffffffffff8082111561458357600080fd5b818601915086601f83011261459757600080fd5b8135818111156145a9576145a9614532565b604051601f8201601f19908116603f011681019083821181831017156145d1576145d1614532565b816040528281528960208487010111156145ea57600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b60008060006040848603121561462157600080fd5b833567ffffffffffffffff81111561463857600080fd5b61464486828701614413565b909790965060209590950135949350505050565b60006020828403121561466a57600080fd5b8151610e9081614128565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016146b3576146b361468b565b5060010190565b600082198211156146cd576146cd61468b565b500190565b600181811c908216806146e657607f821691505b602082108103613a9457634e487b7160e01b600052602260045260246000fd5b60008160001904831182151516156147205761472061468b565b500290565b6000828210156147375761473761468b565b500390565b60008261475957634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561477057600080fd5b5051919050565b60006020828403121561478957600080fd5b8151610e90816143d7565b600080835481600182811c9150808316806147b057607f831692505b602080841082036147cf57634e487b7160e01b86526022600452602486fd5b8180156147e357600181146147f457614821565b60ff19861689528489019650614821565b60008a81526020902060005b868110156148195781548b820152908501908301614800565b505084890196505b509498975050505050505050565b60008251614841818460208701614311565b9190910192915050565b60008161485a5761485a61468b565b506000190190565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161489a816017850160208801614311565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516148d7816028840160208801614311565b01602801949350505050565b602081526000610e90602083018461434156fe3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a848a2646970667358221220e45e68ee29ad47669643a26385c29017a0a59ba24842d2ffabdb42c8ddc81fe064736f6c634300080d00333c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a8480000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000dbcab7a768ea9a00b2ffa5a2eb387cad609e211400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000056bc75e2d6310000000000000000000000000000000000000000000000000000ad78ebc5ac6200000000000000000000000000000000000000000000000000015af1d78b58c40000000000000000000000000000000000000000000000000002b5e3af16b18800000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000022b1c8c1227a0000000000000000000000000000000000000000000000000000482a1c730008000000000000000000000000000000000000000000000000000098a7d9b8314c00000000000000000000000000000000000000000000000000014d1120d7b16000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000034c61620000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000853746172736869700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004436974790000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000054172656e61000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106104a75760003560e01c80639007dc2d1161026b578063ab1096c911610150578063e6a1a016116100c8578063f2fde38b11610097578063fac5dbc61161007c578063fac5dbc614610ad4578063fc5f18d314610760578063fefd9cbd14610ae757600080fd5b8063f2fde38b14610aae578063f361c61514610ac157600080fd5b8063e6a1a01614610a62578063e6ba1db414610a75578063e74d1d3d14610a88578063e991560f14610a9b57600080fd5b8063c1ed14ec1161011f578063d547741f11610104578063d547741f14610a06578063d5ab3c2f14610a19578063e5f8d2ad14610a3957600080fd5b8063c1ed14ec146109e0578063cf68f49b146109f357600080fd5b8063ab1096c91461097c578063bb40cfa61461098f578063bdbae869146109ba578063c0432387146109cd57600080fd5b80639e6a4523116101e3578063a1faa62c116101b2578063a5dc785511610197578063a5dc785514610943578063a8a29f9a14610956578063a990593f1461096957600080fd5b8063a1faa62c14610928578063a217fddf1461093b57600080fd5b80639e6a4523146108e65780639eb6aa6c146108f9578063a158657c1461090c578063a164fea91461091f57600080fd5b806395bbf65e1161023a57806398fb99501161021f57806398fb9950146108b75780639a3fa3bb146108c05780639da45abb146108d357600080fd5b806395bbf65e1461088657806398dfa2f7146108a057600080fd5b80639007dc2d14610828578063911d945b1461083157806391a575441461084457806391d148541461084d57600080fd5b8063519c222e1161039157806375aca83d11610309578063827a9108116102d85780638aeda25a116102bd5780638aeda25a146107d45780638da5cb5b146107fb5780638ed254541461082057600080fd5b8063827a9108146107c157806389ce8f321461071e57600080fd5b806375aca83d1461077557806375c2fd3b146107885780637927bf081461079b5780637f2cdaf2146107ae57600080fd5b806360b558af116103605780636b82e4c1116103455780636b82e4c114610745578063715018a6146107585780637575aa8a1461076057600080fd5b806360b558af1461071e578063618254a21461073257600080fd5b8063519c222e146106dc578063535f2e17146106e5578063581860fa146106f85780635d29dab41461070b57600080fd5b8063248a9ca31161042457806336568abe116103f35780633f3c535a116103d85780633f3c535a146106a3578063437a9666146106b657806344889230146106c957600080fd5b806336568abe1461066e5780633de469c61461068157600080fd5b8063248a9ca3146106115780632ece9c5a146106355780632f2ff15d14610648578063362a3fad1461065b57600080fd5b80630a5ab8681161047b578063150b7a0211610460578063150b7a021461058d57806317800d79146105de57806321f332b5146105f157600080fd5b80630a5ab8681461053157806312b6583a1461056257600080fd5b8062cc7e81146104ac57806301ffc9a7146104c157806306f53cc0146104e95780630a31a3aa1461051e575b600080fd5b6104bf6104ba36600461413d565b610afe565b005b6104d46104cf36600461416d565b610ca9565b60405190151581526020015b60405180910390f35b6104fc6104f7366004614197565b610d12565b60408051825181526020808401519082015291810151908201526060016104e0565b6104fc61052c3660046141cc565b610e97565b61055461053f3660046141cc565b6fffffffffffffffffffffffffffffffff1690565b6040519081526020016104e0565b6105546105703660046141e5565b600360209081526000928352604080842090915290825290205481565b6105c561059b366004614211565b7f150b7a020000000000000000000000000000000000000000000000000000000095945050505050565b6040516001600160e01b031990911681526020016104e0565b6105546105ec3660046141e5565b610ee6565b6106046105ff3660046142b0565b610f90565b6040516104e091906142cd565b61055461061f3660046141cc565b6000908152600160208190526040909120015490565b6105546106433660046142b0565b61105f565b6104bf61065636600461413d565b6110e1565b6105546106693660046142b0565b61110d565b6104bf61067c36600461413d565b611170565b61069461068f3660046141cc565b6111fc565b6040516104e09392919061436d565b6105546106b13660046141cc565b6112be565b6104bf6106c43660046141cc565b6112e2565b6105546106d73660046141e5565b61132f565b610554600a5481565b6105546106f33660046141e5565b611767565b6105546107063660046141e5565b611acc565b6104bf610719366004614395565b611b1a565b61055461072c3660046141cc565b60801c90565b6104bf6107403660046141e5565b611c96565b6105546107533660046142b0565b611d35565b6104bf611da1565b6105546000805160206148f783398151915281565b6104bf6107833660046143e5565b611e07565b610554610796366004614197565b611ea5565b6105546107a93660046141e5565b61221c565b6104bf6107bc366004614197565b612287565b6104bf6107cf366004614197565b6124b3565b6105547f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b6000546001600160a01b03165b6040516001600160a01b0390911681526020016104e0565b600454610554565b61055460085481565b6104bf61083f36600461445f565b612749565b610554600b5481565b6104d461085b36600461413d565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6105546108943660046141cc565b60201c63ffffffff1690565b6105546108ae3660046141cc565b63ffffffff1690565b61055460095481565b6105546108ce3660046141e5565b61292b565b6104bf6108e13660046141e5565b612979565b6105546108f43660046141e5565b612a55565b6104bf6109073660046144cb565b612b48565b6104bf61091a36600461413d565b612c30565b610554600c5481565b610554610936366004614197565b612cd5565b610554600081565b6104bf6109513660046141cc565b612f80565b6105546109643660046141e5565b612f9f565b6104bf6109773660046141cc565b612fd0565b61055461098a3660046144f7565b612fef565b61055461099d3660046141e5565b600760209081526000928352604080842090915290825290205481565b6104bf6109c83660046142b0565b613386565b6104bf6109db366004614548565b61345d565b6104bf6109ee3660046141cc565b613579565b600654610808906001600160a01b031681565b6104bf610a1436600461413d565b6135c6565b610554610a273660046142b0565b600d6020526000908152604090205481565b610554610a473660046142b0565b6001600160a01b031660009081526002602052604090205490565b610554610a703660046141e5565b6135ed565b610554610a83366004614197565b613672565b610604610a9636600461460c565b613885565b610554610aa93660046142b0565b613947565b6104bf610abc3660046142b0565b613a9a565b610554610acf366004614197565b613b7c565b6104bf610ae23660046141cc565b613bcb565b610554610af53660046141cc565b60401c60ff1690565b6000546001600160a01b03163314610b5d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6006546040516331a9108f60e11b81526004810184905230916001600160a01b031690636352211e90602401602060405180830381865afa158015610ba6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bca9190614658565b6001600160a01b031614610c205760405162461bcd60e51b815260206004820152601660248201527f434f524520444f4553204e4f54204f574e204b4f4e47000000000000000000006044820152606401610b54565b6006546040517f23b872dd0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03838116602483015260448201859052909116906323b872dd90606401600060405180830381600087803b158015610c8d57600080fd5b505af1158015610ca1573d6000803e3d6000fd5b505050505050565b60006001600160e01b031982167f7965db0b000000000000000000000000000000000000000000000000000000001480610d0c57507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b610d3660405180606001604052806000815260200160008152602001600081525090565b6001600160a01b0384166000908152600260205260409020548310610d9d5760405162461bcd60e51b815260206004820152601960248201527f545249424520494e444558204f5554204f4620424f554e4453000000000000006044820152606401610b54565b6004548210610de35760405162461bcd60e51b8152602060048201526012602482015271494e56414c4944205452494245205350454360701b6044820152606401610b54565b600080805b6001600160a01b038716600090815260026020526040902054811015610e81576001600160a01b0387166000908152600260205260408120805483908110610e3257610e32614675565b600091825260209091200154905060ff604082901c16868103610e6c57878503610e5e57509150610e81565b84610e68816146a1565b9550505b50508080610e79906146a1565b915050610de8565b50610e8b81610e97565b925050505b9392505050565b610ebb60405180606001604052806000815260200160008152602001600081525090565b63ffffffff82168152602082901c63ffffffff166020820152604082901c60ff166040820152919050565b6004546000908210610efa57506000610d0c565b6000805b6001600160a01b038516600090815260026020526040902054811015610f88576001600160a01b038516600090815260026020526040902080548591610f639184908110610f4e57610f4e614675565b60009182526020909120015460401c60ff1690565b03610f765781610f72816146a1565b9250505b80610f80816146a1565b915050610efe565b509392505050565b60045460609060009067ffffffffffffffff811115610fb157610fb1614532565b604051908082528060200260200182016040528015610fda578160200160208202803683370190505b50905060005b600454811015611058576001600160a01b0384166000908152600760209081526040808320848452909152812054906fffffffffffffffffffffffffffffffff821690508084848151811061103757611037614675565b60200260200101818152505050508080611050906146a1565b915050610fe0565b5092915050565b6001600160a01b03811660009081526002602052604081205481906032811061108b5760149150611058565b6014811061109c57600f9150611058565b600f81106110ad57600c9150611058565b600a81106110be5760089150611058565b600581106110cf5760049150611058565b60028110611058575060029392505050565b600082815260016020819052604090912001546110fe8133613dcb565b6111088383613e4b565b505050565b600080805b6001600160a01b03841660009081526002602052604090205481101561115a5761113c8482611767565b61114690836146ba565b915080611152816146a1565b915050611112565b506111668360006135ed565b610e9090826146ba565b6001600160a01b03811633146111ee5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610b54565b6111f88282613ed2565b5050565b6004818154811061120c57600080fd5b906000526020600020906003020160009150905080600001549080600101549080600201805461123b906146d2565b80601f0160208091040260200160405190810160405280929190818152602001828054611267906146d2565b80156112b45780601f10611289576101008083540402835291602001916112b4565b820191906000526020600020905b81548152906001019060200180831161129757829003601f168201915b5050505050905083565b6000610d0c6fffffffffffffffffffffffffffffffff8316655af3107a4000614706565b6000805160206148f78339815191526112fb8133613dcb565b600882905560405182907f20937a6448d4a6866f115c90bc56ee7117b8c6f2fbc7db5ce803dc2c70c2b66b90600090a25050565b60006000805160206148f783398151915261134a8133613dcb565b6001600160a01b03841660009081526002602052604090205483106113b15760405162461bcd60e51b815260206004820152601960248201527f545249424520494e444558204f5554204f4620424f554e4453000000000000006044820152606401610b54565b6001600160a01b03841660009081526002602052604081208054859081106113db576113db614675565b60009182526020822001549150604082901c60ff1690506000602083901c63ffffffff16905060006004838154811061141657611416614675565b90600052602060002090600302016040518060600160405290816000820154815260200160018201548152602001600282018054611453906146d2565b80601f016020809104026020016040519081016040528092919081815260200182805461147f906146d2565b80156114cc5780601f106114a1576101008083540402835291602001916114cc565b820191906000526020600020905b8154815290600101906020018083116114af57829003601f168201915b505050505081525050905060006114e68563ffffffff1690565b6001600160a01b038a1660009081526002602090815260409182902080549288901b4290921b9093171792508291908a90811061152557611525614675565b600091825260208220019190915561153d8442614725565b90506000620151808285602001516115559190614706565b61155f919061473c565b6001600160a01b038c1660009081526007602090815260408083208a8452909152812054919250901561161e576001600160a01b038c1660009081526007602090815260408083208a845290915290205460801c8681116115d9576064600854846115ca9190614706565b6115d4919061473c565b61161a565b600854606490620151806115ed8442614725565b89602001516115fc9190614706565b611606919061473c565b6116109190614706565b61161a919061473c565b9150505b6000605a61162f620151808661473c565b10611652576064611641846032614706565b61164b919061473c565b9050611704565b603c611661620151808661473c565b10611673576064611641846028614706565b601e611682620151808661473c565b10611694576064611641846019614706565b600e6116a3620151808661473c565b106116b557606461164184600c614706565b60076116c4620151808661473c565b106116d6576064611641846005614706565b60036116e5620151808661473c565b106117045760646116f7846002614706565b611701919061473c565b90505b8061170f83856146ba565b61171991906146ba565b6001600160a01b038e1660009081526003602090815260408083208c84529091528120805492955085929091906117519084906146ba565b90915550929d9c50505050505050505050505050565b6001600160a01b03821660009081526002602052604081205482106117ce5760405162461bcd60e51b815260206004820152601960248201527f545249424520494e444558204f5554204f4620424f554e4453000000000000006044820152606401610b54565b6001600160a01b03831660009081526002602052604081208054849081106117f8576117f8614675565b60009182526020822001549150604082901c60ff1690506000602083901c63ffffffff16905060006004838154811061183357611833614675565b90600052602060002090600302016040518060600160405290816000820154815260200160018201548152602001600282018054611870906146d2565b80601f016020809104026020016040519081016040528092919081815260200182805461189c906146d2565b80156118e95780601f106118be576101008083540402835291602001916118e9565b820191906000526020600020905b8154815290600101906020018083116118cc57829003601f168201915b5050505050815250509050600082426119029190614725565b905060006201518082846020015161191a9190614706565b611924919061473c565b6001600160a01b038a16600090815260076020908152604080832089845290915281205491925090156119e3576001600160a01b038a16600090815260076020908152604080832089845290915290205460801c85811161199e5760646008548461198f9190614706565b611999919061473c565b6119df565b600854606490620151806119b28442614725565b88602001516119c19190614706565b6119cb919061473c565b6119d59190614706565b6119df919061473c565b9150505b6000603c6119f4620151808661473c565b10611a17576064611a06846028614706565b611a10919061473c565b9050611aa8565b601e611a26620151808661473c565b10611a38576064611a06846019614706565b600e611a47620151808661473c565b10611a59576064611a0684600c614706565b6007611a68620151808661473c565b10611a7a576064611a06846005614706565b6003611a89620151808661473c565b10611aa8576064611a9b846002614706565b611aa5919061473c565b90505b80611ab383856146ba565b611abd91906146ba565b9b9a5050505050505050505050565b600080805b6001600160a01b038516600090815260026020526040902054811015610f8857611afc858286611ea5565b611b0690836146ba565b915080611b12816146a1565b915050611ad1565b6000546001600160a01b03163314611b745760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b54565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa158015611bd4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bf8919061475e565b90506001600160a01b03831663a9059cbb836064611c168886614706565b611c20919061473c565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015611c6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c8f9190614777565b5050505050565b6000805160206148f7833981519152611caf8133613dcb565b6001600160a01b0383166000908152600d602052604081205490611cd38260801c90565b90506000611ce0836112be565b90506000655af3107a4000611cf587846146ba565b611cff919061473c565b90506080611d0e8460016146ba565b6001600160a01b039098166000908152600d6020526040902097901b179095555050505050565b6001600160a01b0381166000908152600260205260408120548103611d5c57506000919050565b6001600160a01b038216600090815260026020526040812080548290611d8457611d84614675565b60009182526020918290200154915081901c63ffffffff16610e90565b6000546001600160a01b03163314611dfb5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b54565b611e056000613f55565b565b6000805160206148f7833981519152611e208133613dcb565b6006546040517fa22cb4650000000000000000000000000000000000000000000000000000000081526001600160a01b03858116600483015284151560248301529091169063a22cb46590604401600060405180830381600087803b158015611e8857600080fd5b505af1158015611e9c573d6000803e3d6000fd5b50505050505050565b6001600160a01b0383166000908152600260205260408120548310611f0c5760405162461bcd60e51b815260206004820152601960248201527f545249424520494e444558204f5554204f4620424f554e4453000000000000006044820152606401610b54565b6001600160a01b0384166000908152600260205260408120805485908110611f3657611f36614675565b600091825260209091200154905060ff604082901c16838114611f5e57600092505050610e90565b6000602083901c63ffffffff169050600060048381548110611f8257611f82614675565b90600052602060002090600302016040518060600160405290816000820154815260200160018201548152602001600282018054611fbf906146d2565b80601f0160208091040260200160405190810160405280929190818152602001828054611feb906146d2565b80156120385780601f1061200d57610100808354040283529160200191612038565b820191906000526020600020905b81548152906001019060200180831161201b57829003601f168201915b5050505050815250509050600082426120519190614725565b90506000620151808284602001516120699190614706565b612073919061473c565b6001600160a01b038b1660009081526007602090815260408083208984529091528120549192509015612132576001600160a01b038b16600090815260076020908152604080832089845290915290205460801c8581116120ed576064600854846120de9190614706565b6120e8919061473c565b61212e565b600854606490620151806121018442614725565b88602001516121109190614706565b61211a919061473c565b6121249190614706565b61212e919061473c565b9150505b6000603c612143620151808661473c565b10612166576064612155846028614706565b61215f919061473c565b90506121f7565b601e612175620151808661473c565b10612187576064612155846019614706565b600e612196620151808661473c565b106121a857606461215584600c614706565b60076121b7620151808661473c565b106121c9576064612155846005614706565b60036121d8620151808661473c565b106121f75760646121ea846002614706565b6121f4919061473c565b90505b8061220283856146ba565b61220c91906146ba565b9c9b505050505050505050505050565b600080805b6001600160a01b03851660009081526002602052604090205481101561226a5761224c858286613672565b61225690836146ba565b915080612262816146a1565b915050612221565b5061227584846135ed565b61227f90826146ba565b949350505050565b6000805160206148f78339815191526122a08133613dcb565b6001600160a01b038416600090815260076020908152604080832085845290915281205490036123125760405162461bcd60e51b815260206004820152601660248201527f4e4f204b4f4e47205354414b454420494e2053504543000000000000000000006044820152606401610b54565b6006546040516331a9108f60e11b81526004810185905230916001600160a01b031690636352211e90602401602060405180830381865afa15801561235b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061237f9190614658565b6001600160a01b0316036123d55760405162461bcd60e51b815260206004820152601660248201527f4b4f4e47205354494c4c20494e20434f4e5452414354000000000000000000006044820152606401610b54565b6001600160a01b03841660009081526007602090815260408083208584529091529020546fffffffffffffffffffffffffffffffff1683811461245a5760405162461bcd60e51b815260206004820181905260248201527f43414e4e4f5420554e5354414b4520414b4320594f5520444f4e2754204f574e6044820152606401610b54565b6001600160a01b0385166000818152600760209081526040808320878452909152808220829055518592879290917f96517f1291b59f235b114397be516ff179f92b63e1a677d99f417d48b3e52c599190a45050505050565b6000805160206148f78339815191526124cc8133613dcb565b6004548210806124dd575060095482145b6125295760405162461bcd60e51b815260206004820152601260248201527f53504543204f5554204f4620424f554e445300000000000000000000000000006044820152606401610b54565b6001600160a01b0384166000908152600760209081526040808320858452909152902054156125c05760405162461bcd60e51b815260206004820152602360248201527f414e4f54484552204b4f4e4720414c5245414459205354414b454420494e205360448201527f50454300000000000000000000000000000000000000000000000000000000006064820152608401610b54565b60006125cc8584610ee6565b11806125d9575060095482145b6126255760405162461bcd60e51b815260206004820152601660248201527f5553455220444f4553204e4f54204f574e2053504543000000000000000000006044820152606401610b54565b6006546040516331a9108f60e11b81526004810185905230916001600160a01b031690636352211e90602401602060405180830381865afa15801561266e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126929190614658565b6001600160a01b0316146126e85760405162461bcd60e51b815260206004820152601f60248201527f4b4f4e47204e4f54205452414e53464552454420544f20434f4e5452414354006044820152606401610b54565b6001600160a01b03841660008181526007602090815260408083208684529091528082204260801b87179081905590519092859287927fb10fe2417d8edbe36a47d56306a06fbe05fa13d1adbd01d610b38ab2db19f6789190a45050505050565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a66127748133613dcb565b8382146127c35760405162461bcd60e51b815260206004820152601960248201527f4e45574f574e455253204d555354204d415443482053504543000000000000006044820152606401610b54565b60055484106128145760405162461bcd60e51b815260206004820152601b60248201527f4e45574f574e4552532045584345454453204d415820424154434800000000006044820152606401610b54565b60005b84811015610ca157600086868381811061283357612833614675565b905060200201602081019061284891906142b0565b9050600085858481811061285e5761285e614675565b90506020020135905060048054905081106128b05760405162461bcd60e51b8152602060048201526012602482015271494e56414c4944205452494245205350454360701b6044820152606401610b54565b6001600160a01b03821660008181526002602090815260408083208054600181018255908452828420429384901b90931786831b179201829055519092849290917fbdfc794afcbb463a4c14b1a5eeadd3387a2833d09237a91749f13f3f6ebb58e39190a35050508080612923906146a1565b915050612817565b600080805b6001600160a01b03851660009081526002602052604090205481101561226a5761295b858286612cd5565b61296590836146ba565b915080612971816146a1565b915050612930565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a66129a48133613dcb565b60045482106129ea5760405162461bcd60e51b8152602060048201526012602482015271494e56414c4944205452494245205350454360701b6044820152606401610b54565b6001600160a01b03831660008181526002602090815260408083208054600181018255908452828420429384901b90931787831b179201829055519092859290917fbdfc794afcbb463a4c14b1a5eeadd3387a2833d09237a91749f13f3f6ebb58e39190a350505050565b6001600160a01b038216600090815260026020526040812054612aba5760405162461bcd60e51b815260206004820152601b60248201527f5553455220444f45534e2754204f574e20414e592054524942455300000000006044820152606401610b54565b6000805b6001600160a01b038516600090815260026020526040902054811015610f88576001600160a01b0385166000908152600260205260408120805483908110612b0857612b08614675565b600091825260209091200154905060ff604082901c16858103612b335783612b2f816146a1565b9450505b50508080612b40906146a1565b915050612abe565b6000805160206148f7833981519152612b618133613dcb565b6004548410612bb25760405162461bcd60e51b815260206004820152601360248201527f494e444558204f5554204f4620424f554e4453000000000000000000000000006044820152606401610b54565b600060048581548110612bc757612bc7614675565b6000918252602090912060039091020184815560018101849055604051909150612bf5906002830190614794565b60405190819003812090849086907f4b1850b00fc0a4cfc6a9f2404737110084be798fabafeeb30320d675a17fe11f90600090a45050505050565b6000546001600160a01b03163314612c8a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b54565b6001600160a01b0381166108fc6064612ca38547614706565b612cad919061473c565b6040518115909202916000818181858888f19350505050158015611108573d6000803e3d6000fd5b6001600160a01b0383166000908152600260205260408120548310612d3c5760405162461bcd60e51b815260206004820152601960248201527f545249424520494e444558204f5554204f4620424f554e4453000000000000006044820152606401610b54565b6001600160a01b0384166000908152600260205260408120805485908110612d6657612d66614675565b600091825260209091200154905060ff604082901c1663ffffffff8216848111612d905784612d92565b805b9050600060048381548110612da957612da9614675565b90600052602060002090600302016040518060600160405290816000820154815260200160018201548152602001600282018054612de6906146d2565b80601f0160208091040260200160405190810160405280929190818152602001828054612e12906146d2565b8015612e5f5780601f10612e3457610100808354040283529160200191612e5f565b820191906000526020600020905b815481529060010190602001808311612e4257829003601f168201915b505050505081525050905060008242612e789190614725565b9050600062015180828460200151612e909190614706565b612e9a919061473c565b6001600160a01b038b1660009081526007602090815260408083208984529091528120549192509015612f59576001600160a01b038b16600090815260076020908152604080832089845290915290205460801c858111612f1457606460085484612f059190614706565b612f0f919061473c565b612f55565b60085460649062015180612f288442614725565b8860200151612f379190614706565b612f41919061473c565b612f4b9190614706565b612f55919061473c565b9150505b6000612f6f63ffffffff60208a901c1642614725565b9350603c612143620151808661473c565b6000805160206148f7833981519152612f998133613dcb565b50600a55565b60026020528160005260406000208181548110612fbb57600080fd5b90600052602060002001600091509150505481565b6000805160206148f7833981519152612fe98133613dcb565b50600c55565b6001600160a01b03841660009081526002602052604081205484106130565760405162461bcd60e51b815260206004820152601960248201527f545249424520494e444558204f5554204f4620424f554e4453000000000000006044820152606401610b54565b6001600160a01b038516600090815260026020526040812080548690811061308057613080614675565b600091825260209091200154905060ff604082901c168381146130a85760009250505061227f565b63ffffffff82168581116130bc57856130be565b805b90506000600483815481106130d5576130d5614675565b90600052602060002090600302016040518060600160405290816000820154815260200160018201548152602001600282018054613112906146d2565b80601f016020809104026020016040519081016040528092919081815260200182805461313e906146d2565b801561318b5780601f106131605761010080835404028352916020019161318b565b820191906000526020600020905b81548152906001019060200180831161316e57829003601f168201915b5050505050815250509050600082426131a49190614725565b90506000620151808284602001516131bc9190614706565b6131c6919061473c565b6001600160a01b038c1660009081526007602090815260408083208984529091528120549192509015613285576001600160a01b038c16600090815260076020908152604080832089845290915290205460801c858111613240576064600854846132319190614706565b61323b919061473c565b613281565b600854606490620151806132548442614725565b88602001516132639190614706565b61326d919061473c565b6132779190614706565b613281919061473c565b9150505b600061329b63ffffffff60208a901c1642614725565b9350603c6132ac620151808661473c565b106132cf5760646132be846028614706565b6132c8919061473c565b9050613360565b601e6132de620151808661473c565b106132f05760646132be846019614706565b600e6132ff620151808661473c565b106133115760646132be84600c614706565b6007613320620151808661473c565b106133325760646132be846005614706565b6003613341620151808661473c565b10613360576064613353846002614706565b61335d919061473c565b90505b8061336b83856146ba565b61337591906146ba565b9d9c50505050505050505050505050565b6000805160206148f783398151915261339f8133613dcb565b6001600160a01b0382166000908152600260205260409020546134045760405162461bcd60e51b815260206004820152601260248201527f5553455220484153204e4f2054524942455300000000000000000000000000006044820152606401610b54565b6001600160a01b038216600090815260026020526040812061342591614071565b6040516001600160a01b038316907fbd3c489256cfbe2f1ae0b1fa1214ce04885f152a389bf18cebe417598d8694e290600090a25050565b6000805160206148f78339815191526134768133613dcb565b6040805160608101825285815260208082018681529282018581526004805460018101825560009190915283517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b600390920291820190815594517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c8201559051805193948594909361352d937f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19d0192019061408f565b5050508260405161353e919061482f565b60405190819003812090859087907fe07102dae624713416fa7c0adb7c5d674cdfce8b0eb051643e41452b4b3c737a90600090a45050505050565b6000805160206148f78339815191526135928133613dcb565b600582905560405182907fe1b64904cef7c560a16acef63d8ddc37dfc1c2574695e5db49757caffa80470890600090a25050565b600082815260016020819052604090912001546135e38133613dcb565b6111088383613ed2565b6001600160a01b03821660009081526007602090815260408083206009548452909152812054808203613624576000915050610d0c565b60006136308260801c90565b9050831561363b5750825b60006136478242614725565b905060006201518082600a5461365d9190614706565b613667919061473c565b979650505050505050565b6001600160a01b03831660009081526002602052604081205483106136d95760405162461bcd60e51b815260206004820152601960248201527f545249424520494e444558204f5554204f4620424f554e4453000000000000006044820152606401610b54565b6001600160a01b038416600090815260026020526040812080548590811061370357613703614675565b60009182526020822001549150604082901c60ff1690506000602083901c63ffffffff16905060006004838154811061373e5761373e614675565b9060005260206000209060030201604051806060016040529081600082015481526020016001820154815260200160028201805461377b906146d2565b80601f01602080910402602001604051908101604052809291908181526020018280546137a7906146d2565b80156137f45780601f106137c9576101008083540402835291602001916137f4565b820191906000526020600020905b8154815290600101906020018083116137d757829003601f168201915b50505050508152505090506000864261380d9190614725565b90506000620151808284602001516138259190614706565b61382f919061473c565b6001600160a01b038b16600090815260076020908152604080832089845290915281205491925090156138795760646008548361386c9190614706565b613876919061473c565b90505b6000612f6f8642614725565b606060008367ffffffffffffffff8111156138a2576138a2614532565b6040519080825280602002602001820160405280156138cb578160200160208202803683370190505b50905060005b8481101561393e57600061390b8787848181106138f0576138f0614675565b905060200201602081019061390591906142b0565b8661292b565b90508083838151811061392057613920614675565b60209081029190910101525080613936816146a1565b9150506138d1565b50949350505050565b60006000805160206148f78339815191526139628133613dcb565b6001600160a01b0383166000908152600260205260409020541515806139ac57506001600160a01b0383166000908152600760209081526040808320600954845290915290205415155b6139f85760405162461bcd60e51b815260206004820152601b60248201527f5553455220444f45534e2754204f574e20414e592054524942455300000000006044820152606401610b54565b6000805b6001600160a01b038516600090815260026020526040902054811015613a4457613a26858261132f565b613a3090836146ba565b915080613a3c816146a1565b9150506139fc565b50613a4e84613fbd565b613a5890826146ba565b905080846001600160a01b03167fd0813ff03c470dcc7baa9ce36914dc2febdfd276d639deffaac383fd3db42ba360405160405180910390a391505b50919050565b6000546001600160a01b03163314613af45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b54565b6001600160a01b038116613b705760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610b54565b613b7981613f55565b50565b600080805b6001600160a01b03861660009081526002602052604090205481101561393e57613bad86828787612fef565b613bb790836146ba565b915080613bc3816146a1565b915050613b81565b6000805160206148f7833981519152613be48133613dcb565b50600b55565b60606000613bf9836002614706565b613c049060026146ba565b67ffffffffffffffff811115613c1c57613c1c614532565b6040519080825280601f01601f191660200182016040528015613c46576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110613c7d57613c7d614675565b60200101906001600160f81b031916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110613cc857613cc8614675565b60200101906001600160f81b031916908160001a9053506000613cec846002614706565b613cf79060016146ba565b90505b6001811115613d7c577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110613d3857613d38614675565b1a60f81b828281518110613d4e57613d4e614675565b60200101906001600160f81b031916908160001a90535060049490941c93613d758161484b565b9050613cfa565b508315610e905760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b54565b60008281526001602090815260408083206001600160a01b038516845290915290205460ff166111f857613e09816001600160a01b03166014613bea565b613e14836020613bea565b604051602001613e25929190614862565b60408051601f198184030181529082905262461bcd60e51b8252610b54916004016148e3565b60008281526001602090815260408083206001600160a01b038516845290915290205460ff166111f85760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b60008281526001602090815260408083206001600160a01b038516845290915290205460ff16156111f85760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03811660009081526007602090815260408083206009548452909152812054808203613ff35750600092915050565b6fffffffffffffffffffffffffffffffff8116608082901c60006140178242614725565b905060006201518082600a5461402d9190614706565b614037919061473c565b6001600160a01b039097166000908152600760209081526040808320600954845290915290204260801b9094179093555093949350505050565b5080546000825590600052602060002090810190613b799190614113565b82805461409b906146d2565b90600052602060002090601f0160209004810192826140bd5760008555614103565b82601f106140d657805160ff1916838001178555614103565b82800160010185558215614103579182015b828111156141035782518255916020019190600101906140e8565b5061410f929150614113565b5090565b5b8082111561410f5760008155600101614114565b6001600160a01b0381168114613b7957600080fd5b6000806040838503121561415057600080fd5b82359150602083013561416281614128565b809150509250929050565b60006020828403121561417f57600080fd5b81356001600160e01b031981168114610e9057600080fd5b6000806000606084860312156141ac57600080fd5b83356141b781614128565b95602085013595506040909401359392505050565b6000602082840312156141de57600080fd5b5035919050565b600080604083850312156141f857600080fd5b823561420381614128565b946020939093013593505050565b60008060008060006080868803121561422957600080fd5b853561423481614128565b9450602086013561424481614128565b935060408601359250606086013567ffffffffffffffff8082111561426857600080fd5b818801915088601f83011261427c57600080fd5b81358181111561428b57600080fd5b89602082850101111561429d57600080fd5b9699959850939650602001949392505050565b6000602082840312156142c257600080fd5b8135610e9081614128565b6020808252825182820181905260009190848201906040850190845b81811015614305578351835292840192918401916001016142e9565b50909695505050505050565b60005b8381101561432c578181015183820152602001614314565b8381111561433b576000848401525b50505050565b60008151808452614359816020860160208601614311565b601f01601f19169290920160200192915050565b83815282602082015260606040820152600061438c6060830184614341565b95945050505050565b6000806000606084860312156143aa57600080fd5b8335925060208401356143bc81614128565b915060408401356143cc81614128565b809150509250925092565b8015158114613b7957600080fd5b600080604083850312156143f857600080fd5b823561440381614128565b91506020830135614162816143d7565b60008083601f84011261442557600080fd5b50813567ffffffffffffffff81111561443d57600080fd5b6020830191508360208260051b850101111561445857600080fd5b9250929050565b6000806000806040858703121561447557600080fd5b843567ffffffffffffffff8082111561448d57600080fd5b61449988838901614413565b909650945060208701359150808211156144b257600080fd5b506144bf87828801614413565b95989497509550505050565b6000806000606084860312156144e057600080fd5b505081359360208301359350604090920135919050565b6000806000806080858703121561450d57600080fd5b843561451881614128565b966020860135965060408601359560600135945092505050565b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561455d57600080fd5b8335925060208401359150604084013567ffffffffffffffff8082111561458357600080fd5b818601915086601f83011261459757600080fd5b8135818111156145a9576145a9614532565b604051601f8201601f19908116603f011681019083821181831017156145d1576145d1614532565b816040528281528960208487010111156145ea57600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b60008060006040848603121561462157600080fd5b833567ffffffffffffffff81111561463857600080fd5b61464486828701614413565b909790965060209590950135949350505050565b60006020828403121561466a57600080fd5b8151610e9081614128565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016146b3576146b361468b565b5060010190565b600082198211156146cd576146cd61468b565b500190565b600181811c908216806146e657607f821691505b602082108103613a9457634e487b7160e01b600052602260045260246000fd5b60008160001904831182151516156147205761472061468b565b500290565b6000828210156147375761473761468b565b500390565b60008261475957634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561477057600080fd5b5051919050565b60006020828403121561478957600080fd5b8151610e90816143d7565b600080835481600182811c9150808316806147b057607f831692505b602080841082036147cf57634e487b7160e01b86526022600452602486fd5b8180156147e357600181146147f457614821565b60ff19861689528489019650614821565b60008a81526020902060005b868110156148195781548b820152908501908301614800565b505084890196505b509498975050505050505050565b60008251614841818460208701614311565b9190910192915050565b60008161485a5761485a61468b565b506000190190565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161489a816017850160208801614311565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516148d7816028840160208801614311565b01602801949350505050565b602081526000610e90602083018461434156fe3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a848a2646970667358221220e45e68ee29ad47669643a26385c29017a0a59ba24842d2ffabdb42c8ddc81fe064736f6c634300080d0033

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

0000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000dbcab7a768ea9a00b2ffa5a2eb387cad609e211400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000056bc75e2d6310000000000000000000000000000000000000000000000000000ad78ebc5ac6200000000000000000000000000000000000000000000000000015af1d78b58c40000000000000000000000000000000000000000000000000002b5e3af16b18800000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000022b1c8c1227a0000000000000000000000000000000000000000000000000000482a1c730008000000000000000000000000000000000000000000000000000098a7d9b8314c00000000000000000000000000000000000000000000000000014d1120d7b16000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000034c61620000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000853746172736869700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004436974790000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000054172656e61000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : tribePrices (uint256[]): 100000000000000000000,200000000000000000000,400000000000000000000,800000000000000000000
Arg [1] : tribeRPS (uint256[]): 2500000000000000000,5200000000000000000,11000000000000000000,24000000000000000000
Arg [2] : names (string[]): Lab,Starship,City,Arena
Arg [3] : _akc (address): 0xDBCab7A768EA9a00B2fFA5A2eB387cAD609E2114

-----Encoded View---------------
27 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [2] : 00000000000000000000000000000000000000000000000000000000000001c0
Arg [3] : 000000000000000000000000dbcab7a768ea9a00b2ffa5a2eb387cad609e2114
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [5] : 0000000000000000000000000000000000000000000000056bc75e2d63100000
Arg [6] : 00000000000000000000000000000000000000000000000ad78ebc5ac6200000
Arg [7] : 000000000000000000000000000000000000000000000015af1d78b58c400000
Arg [8] : 00000000000000000000000000000000000000000000002b5e3af16b18800000
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [10] : 00000000000000000000000000000000000000000000000022b1c8c1227a0000
Arg [11] : 000000000000000000000000000000000000000000000000482a1c7300080000
Arg [12] : 00000000000000000000000000000000000000000000000098a7d9b8314c0000
Arg [13] : 0000000000000000000000000000000000000000000000014d1120d7b1600000
Arg [14] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [15] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [16] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [17] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [18] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [19] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [20] : 4c61620000000000000000000000000000000000000000000000000000000000
Arg [21] : 0000000000000000000000000000000000000000000000000000000000000008
Arg [22] : 5374617273686970000000000000000000000000000000000000000000000000
Arg [23] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [24] : 4369747900000000000000000000000000000000000000000000000000000000
Arg [25] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [26] : 4172656e61000000000000000000000000000000000000000000000000000000


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
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.