Contract 0x48e6f88f1ab05677675de9d14a705f8a137ea2bc

Txn Hash Method
Block
From
To
Value [Txn Fee]
0x083c599f138d074511824fa723070d85d84706515e06f9e7d1583444fce1fa8eStart Research199079132021-10-24 1:09:152 mins ago0x60c1c5103ffc20f5e6b88a3e2841c4a18532a7ee IN  0x48e6f88f1ab05677675de9d14a705f8a137ea2bc0 FTM0.019772166669
0x92bdaae46e3a4d46f4ef67588be917051e5f8ba187eaf0ed6dc9d71648693f85Start Research199036652021-10-24 0:07:301 hr 4 mins ago0xe2bba0d2401229fd7e5d7c136b581920094b7e99 IN  0x48e6f88f1ab05677675de9d14a705f8a137ea2bc0 FTM0.008836730529
0x10b7e38fa1f5247e52c31e4c26549e942172760657f86ec8ae229f4a09c3ee22Start Research199036562021-10-24 0:07:241 hr 4 mins ago0xe2bba0d2401229fd7e5d7c136b581920094b7e99 IN  0x48e6f88f1ab05677675de9d14a705f8a137ea2bc0 FTM0.008836730529
0x5938dd37c6f9fcf655b50f203d59800235551d66fd744e27d9b137291b3cc132Start Research199036512021-10-24 0:07:201 hr 4 mins ago0xe2bba0d2401229fd7e5d7c136b581920094b7e99 IN  0x48e6f88f1ab05677675de9d14a705f8a137ea2bc0 FTM0.008836730529
0x952003cbdcf27194728d6fcba288724f57af7892939061bec81b3d0624aa9ab8Start Research199036382021-10-24 0:07:101 hr 4 mins ago0xe2bba0d2401229fd7e5d7c136b581920094b7e99 IN  0x48e6f88f1ab05677675de9d14a705f8a137ea2bc0 FTM0.008836730529
0x5ca518a9882953e835944bebbb07a4dd00c59d2476881b869d2e99856b11ba7eStart Research199036322021-10-24 0:07:031 hr 5 mins ago0xe2bba0d2401229fd7e5d7c136b581920094b7e99 IN  0x48e6f88f1ab05677675de9d14a705f8a137ea2bc0 FTM0.008836730529
0x1097a202df74f5143fa04e4c284512febb78125df0849979b559a8daf66166b5Start Research199036292021-10-24 0:06:561 hr 5 mins ago0xe2bba0d2401229fd7e5d7c136b581920094b7e99 IN  0x48e6f88f1ab05677675de9d14a705f8a137ea2bc0 FTM0.008836730529
0x43a7b6f19a7a98eb28900b63bb71e6a4dec1c74647520ba223ce3c57853de9aaStart Research199036212021-10-24 0:06:501 hr 5 mins ago0xe2bba0d2401229fd7e5d7c136b581920094b7e99 IN  0x48e6f88f1ab05677675de9d14a705f8a137ea2bc0 FTM0.008836730529
0x5156877be162c1e64a5f52a04baa22bd87f5d8f86425ebfd21fc3416f7411fdeStart Research199036112021-10-24 0:06:431 hr 5 mins ago0xe2bba0d2401229fd7e5d7c136b581920094b7e99 IN  0x48e6f88f1ab05677675de9d14a705f8a137ea2bc0 FTM0.008836730529
0x052befdd6e09b66bb11d0c709c36846d139d3394da0b1fbb9645dd3d9d7b76a7Start Research199036012021-10-24 0:06:351 hr 5 mins ago0xe2bba0d2401229fd7e5d7c136b581920094b7e99 IN  0x48e6f88f1ab05677675de9d14a705f8a137ea2bc0 FTM0.008836730529
0xe2fe40cc02a72d7146a18e1478f39d823d953ae149850f04af83943bca857410Start Research199035892021-10-24 0:06:201 hr 5 mins ago0xe2bba0d2401229fd7e5d7c136b581920094b7e99 IN  0x48e6f88f1ab05677675de9d14a705f8a137ea2bc0 FTM0.008837987698
0x7ca73b20a640f97d2f56a1abace22c58bdd82c6496025d0f92611436dd1bbab6Start Research199035582021-10-24 0:05:561 hr 6 mins ago0xe2bba0d2401229fd7e5d7c136b581920094b7e99 IN  0x48e6f88f1ab05677675de9d14a705f8a137ea2bc0 FTM0.008837987698
0xed0bb5ce7f870881bb903d05fe6dc4fc745fddc922152b50e81c5d1264e07e83Level Up199031942021-10-24 0:00:251 hr 11 mins ago0x85eb9eb4cc536d29747a3bae2ece1f66c2e57723 IN  0x48e6f88f1ab05677675de9d14a705f8a137ea2bc0 FTM0.014980375479
0xe3968a86c5f7cf81a81a7b4eddaa3e18c6bac101cdcf4a77d7e27cc9e372ab09Level Up199031512021-10-23 23:59:491 hr 12 mins ago0x85eb9eb4cc536d29747a3bae2ece1f66c2e57723 IN  0x48e6f88f1ab05677675de9d14a705f8a137ea2bc0 FTM0.013820723037
0xae3ef67b3d647d1f1245dcd1cf537f75748fb49abb5b4e62636ffe131896372bLevel Up199031182021-10-23 23:59:191 hr 12 mins ago0x85eb9eb4cc536d29747a3bae2ece1f66c2e57723 IN  0x48e6f88f1ab05677675de9d14a705f8a137ea2bc0 FTM0.014774238458
0x43dfd69da82104c3c0ddea56eea30c0e81ee71b1cec1ac315a6be14eb1368df6Level Up199031062021-10-23 23:59:071 hr 13 mins ago0x85eb9eb4cc536d29747a3bae2ece1f66c2e57723 IN  0x48e6f88f1ab05677675de9d14a705f8a137ea2bc0 FTM0.013806552327
0x6c9857e7eeeb149e75eb0f7fa9feb7154118655b544164903f6e07cd9efb97afStart Research199030682021-10-23 23:58:361 hr 13 mins ago0x13e67a0b8abd18104ba6afb263ef478520aaa590 IN  0x48e6f88f1ab05677675de9d14a705f8a137ea2bc0 FTM0.00661668
0xb760719fe77210be9c6d423d81a1311f87f58deb61d387773e11c94b52ccd040Start Research199030572021-10-23 23:58:261 hr 13 mins ago0x13e67a0b8abd18104ba6afb263ef478520aaa590 IN  0x48e6f88f1ab05677675de9d14a705f8a137ea2bc0 FTM0.00661668
0xd26af5192f2cc7405d78125711e622004ac8ad7373faddf9b6f853e92ba553e4Start Research199030432021-10-23 23:58:151 hr 13 mins ago0x13e67a0b8abd18104ba6afb263ef478520aaa590 IN  0x48e6f88f1ab05677675de9d14a705f8a137ea2bc0 FTM0.00661668
0xb1ab29511f8e61910e3f2d732e45d405e3303a4253eecb4ae4447758153dbeb7Start Research199030352021-10-23 23:58:051 hr 14 mins ago0x13e67a0b8abd18104ba6afb263ef478520aaa590 IN  0x48e6f88f1ab05677675de9d14a705f8a137ea2bc0 FTM0.00661668
0xdab10ffb9decff633f35f26ef34a871520637256ec03a42d2f7b63a7d4f5ceacStart Research199030242021-10-23 23:57:571 hr 14 mins ago0x13e67a0b8abd18104ba6afb263ef478520aaa590 IN  0x48e6f88f1ab05677675de9d14a705f8a137ea2bc0 FTM0.00661668
0xb165965ce3df111a8708a943dd3a58bf9f8e4fd92a64d343fc03e2ab4341ecf6Start Research199030162021-10-23 23:57:511 hr 14 mins ago0x85eb9eb4cc536d29747a3bae2ece1f66c2e57723 IN  0x48e6f88f1ab05677675de9d14a705f8a137ea2bc0 FTM0.008916511148
0x5823a68779225ad01547dc7a70d75ed0b846375e983d3827653043c3d3b81ac8Start Research199030102021-10-23 23:57:461 hr 14 mins ago0x13e67a0b8abd18104ba6afb263ef478520aaa590 IN  0x48e6f88f1ab05677675de9d14a705f8a137ea2bc0 FTM0.00661668
0x1a19536cfd62ff90eddbf379538ac8736bbf90f74aa1fb5981056cc384bce2a5Discover199029902021-10-23 23:57:271 hr 14 mins ago0x85eb9eb4cc536d29747a3bae2ece1f66c2e57723 IN  0x48e6f88f1ab05677675de9d14a705f8a137ea2bc0 FTM0.038859854455
0x75729db04008a64a6ab3aa7ad921ecefdcea188ddfdbf27bbdeebcec40c64914Start Research199029572021-10-23 23:57:051 hr 15 mins ago0x85eb9eb4cc536d29747a3bae2ece1f66c2e57723 IN  0x48e6f88f1ab05677675de9d14a705f8a137ea2bc0 FTM0.008873750853
[ Download CSV Export 
Latest 1 internal transaction
Parent Txn Hash Block From To Value
0x60c5357dd62bb46c5d54276e8c97a3feb4174163db6c0a91214bba67a7694ddb182154872021-10-03 14:07:0020 days 11 hrs ago 0x39ab6cfe9765c641e6daa46593382a7efb402260  Contract Creation0 FTM
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
TheRarityForestV3

Compiler Version
v0.8.0+commit.c7dfd78e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 8 : theRarityForestV3.sol
//SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.0;

import "@openzeppelin/contracts/utils/Counters.sol";
import "./ERC721EnumerableFixed.sol";
import "./interfaces/IRarity.sol";
import "./interfaces/ITheRarityForest.sol";
import "./interfaces/ITheRarityForestV2.sol";
import "./interfaces/IRarityXPProxy.sol";

/// [MIT License]
/// @title Base64
/// @notice Provides a function for encoding some bytes in base64
/// @author Brecht Devos <[email protected]>
library Base64 {
    bytes internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";

    /// @notice Encodes some bytes to the base64 representation
    function encode(bytes memory data) internal pure returns (string memory) {
        uint256 len = data.length;
        if (len == 0) return "";

        // multiply by 4/3 rounded up
        uint256 encodedLen = 4 * ((len + 2) / 3);

        // Add some extra buffer at the end
        bytes memory result = new bytes(encodedLen + 32);

        bytes memory table = TABLE;

        assembly {
            let tablePtr := add(table, 1)
            let resultPtr := add(result, 32)

            for {
                let i := 0
            } lt(i, len) {

            } {
                i := add(i, 3)
                let input := and(mload(add(data, i)), 0xffffff)

                let out := mload(add(tablePtr, and(shr(18, input), 0x3F)))
                out := shl(8, out)
                out := add(out, and(mload(add(tablePtr, and(shr(12, input), 0x3F))), 0xFF))
                out := shl(8, out)
                out := add(out, and(mload(add(tablePtr, and(shr(6, input), 0x3F))), 0xFF))
                out := shl(8, out)
                out := add(out, and(mload(add(tablePtr, and(input, 0x3F))), 0xFF))
                out := shl(224, out)

                mstore(resultPtr, out)

                resultPtr := add(resultPtr, 4)
            }

            switch mod(len, 3)
            case 1 {
                mstore(sub(resultPtr, 2), shl(240, 0x3d3d))
            }
            case 2 {
                mstore(sub(resultPtr, 1), shl(248, 0x3d))
            }

            mstore(result, encodedLen)
        }

        return string(result);
    }
}

contract TheRarityForestV3 is ERC721Enumerable {

    using Counters for Counters.Counter;
    using Strings for uint256;

    constructor(address _rarityAddr, address _rarityForestAddr, address _rarityForestV2Addr, address _xpAddr) ERC721(_rarityAddr) {
        rarityContract = IRarity(_rarityAddr);
        rarityForestContract = ITheRarityForest(_rarityForestAddr);
        rarityForestContractV2 = ITheRarityForestV2(_rarityForestV2Addr);
        _xp = IRarityXPProxy(_xpAddr);
    }

    IRarity public rarityContract;
    ITheRarityForest public rarityForestContract;
    ITheRarityForestV2 public rarityForestContractV2;
    IRarityXPProxy public _xp;
    uint256 private globalSeed;
    string constant public name = "TheRarityForestV3";
    string constant public symbol = "TRFv3";
    mapping(uint256 => Research) researchs; //summonerId => Research
    mapping(uint256 => string) items;
    mapping(uint256 => uint256) magic;
    mapping(uint256 => uint256) level;
    Counters.Counter public _tokenIdCounter;
    address public rescuer;
    address constant EXTENDED = address(0x0f5861aaf5F010202919C9126149c6B0c76Cf469);

    string[] sevenDaysItems = [
        "Dead King crown", 
        "Black gauntlet",
        "Haunted ring",
        "Ancient book",
        "Enchanted book",
        "Gold ring",
        "Treasure map",
        "Spell book",
        "Silver sword",
        "Ancient Prince Andre's Sword",
        "Old damaged coin",
        "Magic necklace",
        "Mechanical hand"
    ];
    string[] sixDaysItems = [
        "Silver sword",
        "Haunted ring",
        "War helmet",
        "Fire boots",
        "War trophy",
        "Elf skull",
        "Unknown ring",
        "Silver ring",
        "War book",
        "Gold pot",
        "Demon head",
        "Unknown key",
        "Cursed book",
        "Giant plant seed",
        "Old farmer sickle",
        "War trophy",
        "Enchanted useless tool"
    ];
    string[] fiveDaysItems = [
        "Dragon egg",
        "Bear claw",
        "Silver sword",
        "Rare ring",
        "Glove with diamonds",
        "Haunted cloak",
        "Dead hero cape",
        "Cursed talisman",
        "Enchanted talisman",
        "Haunted ring",
        "Time crystal",
        "Warrior watch",
        "Paladin eye",
        "Metal horse saddle",
        "Witcher book",
        "Witch book",
        "Unknown animal eye"
    ];
    string[] fourDaysItems = [
        "Slain warrior armor",
        "Witcher book",
        "Cursed talisman",
        "Antique ring",
        "Ancient Prince Andre's Sword",
        "King's son sword",
        "Old damaged coin",
        "Thunder hammer",
        "Time crystal",
        "Skull fragment",
        "Hawk eye",
        "Meteorite fragment",
        "Mutant fisheye",
        "Wolf necklace",
        "Shadowy rabbit paw",
        "Paladin eye",
        "Red Tanned Gloves",
        "Paladin heart",
        "Cat Claw glove"
    ];

    event ResearchStarted(uint256 summonerId, uint256 initBlockTs, uint256 endBlockTs, uint256 timeInDays);
    event TreasureDiscovered(uint256 summonerId, uint256 treasureId);
    event TreasureLevelUp(uint256 treasureId, uint256 newLevel);

    struct Research {
        uint256 timeInDays;
        uint256 initBlockTs; //Block when research started
        bool discovered;
        uint256 summonerId;
        address owner;
        uint256 endBlockTs; //Block when research will end
    }

    struct Treasure {
        uint256 summonerId;
        uint256 treasureId;
        string itemName;
        uint256 magic;
        uint256 level;
    }

    modifier onlyExtended() {
		require (msg.sender == EXTENDED, "!owner");
		_;
	}

    //Set rescuer
    function setRescuer(address _rescuer) public {
        require(rescuer == address(0), "already setted");
        rescuer = _rescuer;
    }

    //Se XP proxy
    function setXPProxy(address newAddress) public onlyExtended() {
        _xp = IRarityXPProxy(newAddress);
    }

    //Gen random
    function _random(string memory input) internal pure returns (uint256) {
        return uint256(keccak256(abi.encodePacked(input)));
    }

    //Return required XP to levelup a treasure
    function xpRequired(uint currentLevel) public pure returns (uint xpToNextLevel) {
        xpToNextLevel = currentLevel * 1000e18;
        for (uint i = 1; i < currentLevel; i++) {
            xpToNextLevel += currentLevel * 1000e18;
        }
    }

    //Get random treasure
    function _randomTreasure(Research memory research) internal returns (string memory _itemName, uint256 _magic, uint256 _level) {
        string memory _string = string(
            abi.encodePacked(
                research.summonerId, 
                research.owner, 
                research.initBlockTs, 
                globalSeed,
                block.timestamp
            )
        );
        uint256 index = _random(_string);
        globalSeed = index;

        _magic = index % 11;
        _level = index % 6;

        if (research.timeInDays == 7) {
            _itemName = sevenDaysItems[index % sevenDaysItems.length];
        }
        if (research.timeInDays == 6) {
            _itemName = sixDaysItems[index % sixDaysItems.length];
        }
        if (research.timeInDays == 5) {
            _itemName = fiveDaysItems[index % fiveDaysItems.length];
        }
        if (research.timeInDays == 4) {
            _itemName = fourDaysItems[index % fourDaysItems.length];
        }
        
    }

    //Is owner of summoner or is approved
    function _isApprovedOrOwnerOfSummoner(uint256 summonerId, address _owner) internal view virtual returns (bool) {
        //_owner => expected owner
        address spender = address(this);
        address owner = rarityContract.ownerOf(summonerId);
        return (owner == _owner || rarityContract.getApproved(summonerId) == spender || rarityContract.isApprovedForAll(owner, spender));
    }

    //Mint a new ERC721
    function safeMint(uint to) internal returns (uint256) {
        uint256 counter = _tokenIdCounter.current();
        _safeMint(to, counter, "");
        _tokenIdCounter.increment();
        return counter;
    }

    function tokenURI(uint256 tokenId) public view returns (string memory) {
        string[7] memory parts;
        parts[0] = '<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMinYMin meet" viewBox="0 0 350 350"><style>.base { fill: white; font-family: serif; font-size: 14px; }</style><rect width="100%" height="100%" fill="black" /><text x="10" y="20" class="base">';

        parts[1] = string(abi.encodePacked("name", " ", items[tokenId]));

        parts[2] = '</text><text x="10" y="40" class="base">';

        parts[3] = string(abi.encodePacked("magic", " ", magic[tokenId].toString()));

        parts[4] = '</text><text x="10" y="60" class="base">';

        parts[5] = string(abi.encodePacked("level", " ", level[tokenId].toString()));

        parts[6] = '</text></svg>';

        string memory output = string(abi.encodePacked(parts[0], parts[1], parts[2], parts[3], parts[4], parts[5], parts[6]));

        string memory json = Base64.encode(bytes(string(abi.encodePacked('{"name": "treasure #', tokenId.toString(), '", "description": "Rarity is achieved through good luck and intelligence", "image": "data:image/svg+xml;base64,', Base64.encode(bytes(output)), '"}'))));
        output = string(abi.encodePacked('data:application/json;base64,', json));

        return output;
    }

    //Research for new treasuries
    function startResearch(uint256 summonerId, uint256 timeInDays) public returns (uint256) {
        //timeInDays -> time to research the forest
        require(timeInDays >= 4 && timeInDays <= 7, "not valid");
        require(_isApprovedOrOwnerOfSummoner(summonerId, msg.sender), "not your summoner");
        (,,,uint256 summonerLevel) = rarityContract.summoner(summonerId);
        require(summonerLevel >= 2, "not level >= 2");
        require(researchs[summonerId].timeInDays == 0 || researchs[summonerId].discovered == true, "not empty or not discovered yet"); //If empty or already discovered
        researchs[summonerId] = Research(timeInDays, block.timestamp, false, summonerId, msg.sender, block.timestamp + (timeInDays * 1 days));
        emit ResearchStarted(summonerId, researchs[summonerId].initBlockTs, researchs[summonerId].endBlockTs, timeInDays);
        return summonerId;
    }

    //Discover a treasure
    function discover(uint256 summonerId) public returns (uint256) {
        Research memory research = researchs[summonerId];
        require(_isApprovedOrOwnerOfSummoner(summonerId, msg.sender), "not your summoner");
        require(!research.discovered, "already discovered");
        require(research.timeInDays > 0, "not initialized");
        require(research.endBlockTs < block.timestamp, "not finish yet");
        //mint erc721 based on pseudo random things
        uint256 newTokenId = safeMint(summonerId);
        (items[newTokenId], magic[newTokenId], level[newTokenId]) = _randomTreasure(research);
        research.discovered = true;
        researchs[summonerId] = research;
        emit TreasureDiscovered(summonerId, newTokenId);
        return newTokenId;
    }

    //Level up an item, spending summoner XP (need approval)
    function levelUp(uint256 tokenId) public {
        uint256 summonerId = ownerOf(tokenId);
        require(_isApprovedOrOwnerOfSummoner(summonerId, msg.sender), "not your treasure");
        uint256 current = level[tokenId];
        _xp.spend_xp(summonerId, xpRequired(current));
        level[tokenId] += 1;
        emit TreasureLevelUp(tokenId, current + 1);
    }

    //Get all treasures by summoner (adventurer)
    function getTreasuresBySummoner(uint256 summonerId) public view returns (Treasure[] memory) {
        require(summonerId != uint(0), "cannot retrieve zero address");
        uint256 arrayLength = balanceOf(summonerId);
        Treasure[] memory _treasures = new Treasure[](arrayLength);
        for (uint256 i = 0; i < arrayLength; i++) {
            uint256 tokenId = tokenOfOwnerByIndex(summonerId, i);
            (uint256 _summonerId, string memory _itemName, uint _magic, uint _level) = treasure(tokenId);
            _treasures[i] = Treasure(_summonerId, tokenId ,_itemName, _magic, _level);
        }
        return _treasures;
    }

    //Get research status by summoner (if is in progress "discovered" bool is in FALSE)
    function getResearchBySummoner(uint256 summonerId) public view returns (Research memory) {
        require(summonerId != uint(0), "cannot retrieve zero address");
        return researchs[summonerId];
    }

    //Migrate treasure from V1 to V3
    function restoreTreasure(uint256 tokenId, uint256 receiver) public {
        require(receiver != uint(0), "receiver is zero address");
        rarityForestContract.transferFrom(msg.sender, address(0x000000000000000000000000000000000000dEaD), tokenId); //Burn
        uint256 newTokenId = safeMint(receiver);
        (items[newTokenId], magic[newTokenId], level[newTokenId]) = rarityForestContract.treasure(tokenId);
    }

    //Save treasure from V2 to V3
    function saveTreasure(uint256 tokenId) public {
        require(msg.sender == rescuer, "not rescuer");
        uint owner = rarityForestContractV2.ownerOf(tokenId);
        uint256 newTokenId = safeMint(owner);
        (, items[newTokenId], magic[newTokenId], level[newTokenId]) = rarityForestContractV2.treasure(tokenId);
    }

    //View your treasure
    function treasure(uint tokenId) public view returns (uint256 _summonerId, string memory _itemName, uint _magic, uint _level) {
        _summonerId = ownerOf(tokenId);
        _itemName = items[tokenId];
        _magic = magic[tokenId];
        _level = level[tokenId];
    }

}

File 2 of 8 : Counters.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @title Counters
 * @author Matt Condon (@shrugs)
 * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
 * of elements in a mapping, issuing ERC721 ids, or counting request ids.
 *
 * Include with `using Counters for Counters.Counter;`
 */
library Counters {
    struct Counter {
        // This variable should never be directly accessed by users of the library: interactions must be restricted to
        // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
        // this feature: see https://github.com/ethereum/solidity/issues/4637
        uint256 _value; // default: 0
    }

    function current(Counter storage counter) internal view returns (uint256) {
        return counter._value;
    }

    function increment(Counter storage counter) internal {
        unchecked {
            counter._value += 1;
        }
    }

    function decrement(Counter storage counter) internal {
        uint256 value = counter._value;
        require(value > 0, "Counter: decrement overflow");
        unchecked {
            counter._value = value - 1;
        }
    }

    function reset(Counter storage counter) internal {
        counter._value = 0;
    }
}

File 3 of 8 : ERC721EnumerableFixed.sol
//SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.0;

import "@openzeppelin/contracts/utils/Strings.sol";
import "./interfaces/IRarity.sol";

/*
    This is a modified version of ERC721, updated to use UINT in ADDRESS. 
    In this case, we attach this NFT to another NFT.
    Note that uint(0) is equivalent to address(0), so holder of the first NFT is burner address and can't access to some functions in contract
*/

interface IERC721 {
    event Transfer(uint indexed from, uint indexed to, uint256 indexed tokenId);
    event Approval(uint indexed owner, uint indexed approved, uint256 indexed tokenId);
    event ApprovalForAll(uint indexed owner, uint indexed operator, bool approved);
    function balanceOf(uint owner) external view returns (uint256 balance);
    function ownerOf(uint256 tokenId) external view returns (uint owner);
    function transferFrom(
        uint from,
        uint to,
        uint256 tokenId
    ) external;
    function approve(uint from, uint to, uint256 tokenId) external;
    function getApproved(uint256 tokenId) external view returns (uint operator);
    function setApprovalForAll(uint from, uint operator, bool _approved) external;
    function isApprovedForAll(uint owner, uint operator) external view returns (bool);
}

contract ERC721 is IERC721 {
    using Strings for uint256;

    constructor(address _rarityAddr){
        rm = IRarity(_rarityAddr);
    }

    IRarity public rm;

    mapping(uint256 => uint) private _owners;
    mapping(uint => uint256) private _balances;
    mapping(uint256 => uint) private _tokenApprovals;
    mapping(uint => mapping(uint => bool)) private _operatorApprovals;

    function balanceOf(uint owner) public view virtual override returns (uint256) {
        require(owner != uint(0), "ERC721: balance query for the zero address");
        return _balances[owner];
    }

    function ownerOf(uint256 tokenId) public view virtual override returns (uint) {
        uint owner = _owners[tokenId];
        require(owner != uint(0), "ERC721: owner query for nonexistent token");
        return owner;
    }

    function _baseURI() internal view virtual returns (string memory) {
        return "";
    }

    function approve(uint from, uint to, uint256 tokenId) public virtual override {
        uint owner = ERC721.ownerOf(tokenId);
        require(_isApprovedOrOwnerOfSummoner(from), "not owner of summoner");

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

        _approve(to, tokenId);
    }

    function getApproved(uint256 tokenId) public view virtual override returns (uint) {
        require(_exists(tokenId), "ERC721: approved query for nonexistent token");

        return _tokenApprovals[tokenId];
    }

    function setApprovalForAll(uint from, uint operator, bool approved) public virtual override {
        require(operator != from, "ERC721: approve to caller");
        require(_isApprovedOrOwnerOfSummoner(from), "not owner of summoner");
        _operatorApprovals[from][operator] = approved;
        emit ApprovalForAll(from, operator, approved);
    }

    function isApprovedForAll(uint owner, uint operator) public view virtual override returns (bool) {
        return _operatorApprovals[owner][operator];
    }

    function transferFrom(
        uint from,
        uint to,
        uint256 tokenId
    ) public virtual override {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwnerOfSummoner(from), "ERC721: transfer caller is not owner nor approved");
        _transfer(from, to, tokenId);
    }

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

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

    function _isApprovedOrOwnerOfSummoner(uint _summoner) internal view returns (bool) {
        return rm.getApproved(_summoner) == msg.sender || rm.ownerOf(_summoner) == msg.sender || rm.isApprovedForAll(rm.ownerOf(_summoner), msg.sender);
    }

    /**
     * @dev Safely mints `tokenId` and transfers it to `to`.
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(uint to, uint256 tokenId) internal virtual {
        _safeMint(to, tokenId, "");
    }

    /**
     * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter.
     */
    function _safeMint(
        uint to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _mint(to, tokenId);
    }

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

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

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

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

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

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

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

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

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

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

        _beforeTokenTransfer(from, to, tokenId);

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

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

        emit Transfer(from, to, tokenId);
    }

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

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

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

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

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

/**
 * @dev This implements an optional extension of {ERC721} defined in the EIP that adds
 * enumerability of all the token ids in the contract as well as all token ids owned by each
 * account.
 */
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {

    // Mapping from owner to list of owned token IDs
    mapping(uint => mapping(uint256 => uint256)) private _ownedTokens;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 4 of 8 : IRarity.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.0;

interface IRarity {
    function ownerOf(uint256 tokenId) external view returns (address owner);
    function summoner(uint _summoner) external view returns (uint _xp, uint _log, uint _class, uint _level);
    function spend_xp(uint _summoner, uint _xp) external;
    function getApproved(uint256 tokenId) external view returns (address);
    function isApprovedForAll(address owner, address operator) external view returns (bool);
    function next_summoner() external view returns (uint);
    function summon(uint _class) external;
}

File 5 of 8 : ITheRarityForest.sol
// SPDX-License-Identifier: Unlicense
pragma solidity 0.8.0;

interface ITheRarityForest {
    function transferFrom(address from, address to, uint256 tokenId) external;
    function treasure(uint tokenId) external view returns (string memory _itemName, uint _magic, uint _level);
}

File 6 of 8 : ITheRarityForestV2.sol
// SPDX-License-Identifier: Unlicense
pragma solidity 0.8.0;

interface ITheRarityForestV2 {
    function transferFrom(uint from, uint to, uint256 tokenId) external;
    function treasure(uint tokenId) external view returns (uint _summonerId, string memory _itemName, uint _magic, uint _level);
    function ownerOf(uint256 tokenId) external view returns (uint owner);
}

File 7 of 8 : IRarityXPProxy.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.0;

interface IRarityXPProxy {
    function spend_xp(uint _summoner, uint _xp) external returns (bool);
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_rarityAddr","type":"address"},{"internalType":"address","name":"_rarityForestAddr","type":"address"},{"internalType":"address","name":"_rarityForestV2Addr","type":"address"},{"internalType":"address","name":"_xpAddr","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"owner","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"approved","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"owner","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"operator","type":"uint256"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"summonerId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"initBlockTs","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endBlockTs","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timeInDays","type":"uint256"}],"name":"ResearchStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"from","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"to","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"summonerId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"treasureId","type":"uint256"}],"name":"TreasureDiscovered","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"treasureId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newLevel","type":"uint256"}],"name":"TreasureLevelUp","type":"event"},{"inputs":[],"name":"_tokenIdCounter","outputs":[{"internalType":"uint256","name":"_value","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_xp","outputs":[{"internalType":"contract IRarityXPProxy","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"from","type":"uint256"},{"internalType":"uint256","name":"to","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"owner","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"summonerId","type":"uint256"}],"name":"discover","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"summonerId","type":"uint256"}],"name":"getResearchBySummoner","outputs":[{"components":[{"internalType":"uint256","name":"timeInDays","type":"uint256"},{"internalType":"uint256","name":"initBlockTs","type":"uint256"},{"internalType":"bool","name":"discovered","type":"bool"},{"internalType":"uint256","name":"summonerId","type":"uint256"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"endBlockTs","type":"uint256"}],"internalType":"struct TheRarityForestV3.Research","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"summonerId","type":"uint256"}],"name":"getTreasuresBySummoner","outputs":[{"components":[{"internalType":"uint256","name":"summonerId","type":"uint256"},{"internalType":"uint256","name":"treasureId","type":"uint256"},{"internalType":"string","name":"itemName","type":"string"},{"internalType":"uint256","name":"magic","type":"uint256"},{"internalType":"uint256","name":"level","type":"uint256"}],"internalType":"struct TheRarityForestV3.Treasure[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"owner","type":"uint256"},{"internalType":"uint256","name":"operator","type":"uint256"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"levelUp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rarityContract","outputs":[{"internalType":"contract IRarity","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rarityForestContract","outputs":[{"internalType":"contract ITheRarityForest","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rarityForestContractV2","outputs":[{"internalType":"contract ITheRarityForestV2","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rescuer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"receiver","type":"uint256"}],"name":"restoreTreasure","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rm","outputs":[{"internalType":"contract IRarity","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"saveTreasure","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"from","type":"uint256"},{"internalType":"uint256","name":"operator","type":"uint256"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_rescuer","type":"address"}],"name":"setRescuer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newAddress","type":"address"}],"name":"setXPProxy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"summonerId","type":"uint256"},{"internalType":"uint256","name":"timeInDays","type":"uint256"}],"name":"startResearch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"owner","type":"uint256"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"from","type":"uint256"},{"internalType":"uint256","name":"to","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"treasure","outputs":[{"internalType":"uint256","name":"_summonerId","type":"uint256"},{"internalType":"string","name":"_itemName","type":"string"},{"internalType":"uint256","name":"_magic","type":"uint256"},{"internalType":"uint256","name":"_level","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"currentLevel","type":"uint256"}],"name":"xpRequired","outputs":[{"internalType":"uint256","name":"xpToNextLevel","type":"uint256"}],"stateMutability":"pure","type":"function"}]

600f6102208181526e2232b0b21025b4b7339031b937bbb760891b610240526080908152600e6102608181526d109b1858dac819d85d5b9d1b195d60921b6102805260a052600c6102a08181526b4861756e7465642072696e6760a01b6102c05260c0526102e08181526b416e6369656e7420626f6f6b60a01b6103005260e0526103208281526d456e6368616e74656420626f6f6b60901b6103405261010052600961036090815268476f6c642072696e6760b81b61038052610120526103a08181526b05472656173757265206d61760a41b6103c05261014052600a6103e0908152695370656c6c20626f6f6b60b01b61040052610160526104209081526b14da5b1d995c881cdddbdc9960a21b6104405261018052601c6104609081527f416e6369656e74205072696e636520416e64726527732053776f726400000000610480526101a05260106104a09081526f27b632103230b6b0b3b2b21031b7b4b760811b6104c0526101c0526104e09081526d4d61676963206e65636b6c61636560901b610500526101e0526105606040526105209182526e135958da185b9a58d85b081a185b99608a1b6105405261020091909152620001c690601490600d62000ada565b506040805161026081018252600c61022082018181526b14da5b1d995c881cdddbdc9960a21b6102408401528252825180840184528181526b4861756e7465642072696e6760a01b6020828101919091528084019190915283518085018552600a8082526915d85c881a195b1b595d60b21b828401528486019190915284518086018652818152694669726520626f6f747360b01b81840152606085015284518086018652818152695761722074726f70687960b01b8184018190526080860191909152855180870187526009815268115b19881cdadd5b1b60ba1b8185015260a0860152855180870187529384526b556e6b6e6f776e2072696e6760a01b8484015260c085019390935284518086018652600b8082526a53696c7665722072696e6760a81b8285015260e08601919091528551808701875260088082526757617220626f6f6b60c01b82860152610100870191909152865180880188529081526711dbdb19081c1bdd60c21b81850152610120860152855180870187528281526911195b5bdb881a19585960b21b81850152610140860152855180870187528181526a556e6b6e6f776e206b657960a81b81850152610160860152855180870187529081526a43757273656420626f6f6b60a81b8184015261018085015284518086018652601081526f11da585b9d081c1b185b9d081cd9595960821b818401526101a0850152845180860186526011808252704f6c64206661726d6572207369636b6c6560781b828501526101c086019190915285518087018752918252818301939093526101e08401528351808501909452601684527f456e6368616e746564207573656c65737320746f6f6c00000000000000000000908401526102008201929092526200045c916015919062000b3e565b506040805161026081018252600a610220820181815269447261676f6e2065676760b01b6102408401528252825180840184526009808252684265617220636c617760b81b6020838101919091528085019290925284518086018652600c8082526b14da5b1d995c881cdddbdc9960a21b82850152858701919091528551808701875291825268526172652072696e6760b81b82840152606085019190915284518086018652601381527f476c6f76652077697468206469616d6f6e64730000000000000000000000000081840152608085015284518086018652600d8082526c4861756e74656420636c6f616b60981b8285015260a086019190915285518087018752600e81526d44656164206865726f206361706560901b8185015260c086015285518087018752600f81526e21bab939b2b2103a30b634b9b6b0b760891b8185015260e08601528551808701875260128082527122b731b430b73a32b2103a30b634b9b6b0b760711b82860152610100870191909152865180880188528381526b4861756e7465642072696e6760a01b81860152610120870152865180880188528381526b151a5b594818dc9e5cdd185b60a21b81860152610140870152865180880188529182526c0aec2e4e4d2dee440eec2e8c6d609b1b8285015261016086019190915285518087018752600b81526a50616c6164696e2065796560a81b8185015261018086015285518087018752818152714d6574616c20686f72736520736164646c6560701b818501526101a0860152855180870187529182526b5769746368657220626f6f6b60a01b828401526101c08501919091528451808601865292835269576974636820626f6f6b60b01b838301526101e0840192909252835180850190945290835271556e6b6e6f776e20616e696d616c2065796560701b908301526102008101919091526200071d90601690601162000b3e565b50604080516102a081018252601361026082018181527f536c61696e2077617272696f722061726d6f7200000000000000000000000000610280840152825282518084018452600c8082526b5769746368657220626f6f6b60a01b6020838101919091528085019290925284518086018652600f81526e21bab939b2b2103a30b634b9b6b0b760891b8184015284860152845180860186528181526b416e74697175652072696e6760a01b81840152606085015284518086018652601c81527f416e6369656e74205072696e636520416e64726527732053776f7264000000008184015260808501528451808601865260108082526f12da5b99c9dcc81cdbdb881cdddbdc9960821b8285015260a0860191909152855180870187529081526f27b632103230b6b0b3b2b21031b7b4b760811b8184015260c085015284518086018652600e8082526d2a343ab73232b9103430b6b6b2b960911b8285015260e0860191909152855180870187529182526b151a5b594818dc9e5cdd185b60a21b82840152610100850191909152845180860186528181526d14dadd5b1b08199c9859db595b9d60921b818401526101208501528451808601865260088152674861776b2065796560c01b818401526101408501528451808601865260128082527113595d195bdc9a5d1948199c9859db595b9d60721b82850152610160860191909152855180870187528281526d4d7574616e74206669736865796560901b8185015261018086015285518087018752600d8082526c576f6c66206e65636b6c61636560981b828601526101a08701919091528651808801885291825271536861646f7779207261626269742070617760701b828501526101c086019190915285518087018752600b81526a50616c6164696e2065796560a81b818501526101e08601528551808701875260118152705265642054616e6e656420476c6f76657360781b81850152610200860152855180870187529081526c14185b18591a5b881a19585c9d609a1b81840152610220850152845180860190955284526d43617420436c617720676c6f766560901b9084015261024082019290925262000a48916017919062000b90565b5034801562000a5657600080fd5b506040516200432b3803806200432b83398101604081905262000a799162000d07565b600080546001600160a01b039586166001600160a01b03199182168117909255600980548216909217909155600a805494861694821694909417909355600b805492851692841692909217909155600c805491909316911617905562000da0565b82805482825590600052602060002090810192821562000b2c579160200282015b8281111562000b2c578251805162000b1b91849160209091019062000be2565b509160200191906001019062000afb565b5062000b3a92915062000c6d565b5090565b82805482825590600052602060002090810192821562000b2c579160200282015b8281111562000b2c578251805162000b7f91849160209091019062000be2565b509160200191906001019062000b5f565b82805482825590600052602060002090810192821562000b2c579160200282015b8281111562000b2c578251805162000bd191849160209091019062000be2565b509160200191906001019062000bb1565b82805462000bf09062000d63565b90600052602060002090601f01602090048101928262000c14576000855562000c5f565b82601f1062000c2f57805160ff191683800117855562000c5f565b8280016001018555821562000c5f579182015b8281111562000c5f57825182559160200191906001019062000c42565b5062000b3a92915062000c8e565b8082111562000b3a57600062000c84828262000ca5565b5060010162000c6d565b5b8082111562000b3a576000815560010162000c8f565b50805462000cb39062000d63565b6000825580601f1062000cc7575062000ce7565b601f01602090049060005260206000209081019062000ce7919062000c8e565b50565b80516001600160a01b038116811462000d0257600080fd5b919050565b6000806000806080858703121562000d1d578384fd5b62000d288562000cea565b935062000d386020860162000cea565b925062000d486040860162000cea565b915062000d586060860162000cea565b905092959194509250565b60028104600182168062000d7857607f821691505b6020821081141562000d9a57634e487b7160e01b600052602260045260246000fd5b50919050565b61357b8062000db06000396000f3fe608060405234801561001057600080fd5b50600436106101e55760003560e01c8063896266a91161010f578063c87b56dd116100a2578063e177164f11610071578063e177164f146103ef578063e5a50123146103f7578063ea8494c11461040a578063f6a8bc3a14610412576101e5565b8063c87b56dd146103ae578063cd5cecf8146103c1578063ce177ba1146103d4578063d44a546e146103e7576101e5565b80639cc7f708116100de5780639cc7f70814610345578063a1cc1b8214610358578063a28c278b1461037b578063b866c8a41461039b576101e5565b8063896266a9146103025780638d9188d51461030a57806395d89b411461032a57806398552bb714610332576101e5565b8063510fc61a116101875780636e759454116101565780636e759454146102c15780637291d2cc146102d457806377600891146102e757806384c4bd4b146102fa576101e5565b8063510fc61a146102805780635c207b37146102885780636352211e1461029b5780636acbd3fb146102ae576101e5565b806318160ddd116101c357806318160ddd1461023d578063310ed7f01461024557806338a63183146102585780634f6ccce71461026d576101e5565b806306fdde03146101ea578063081812fc146102085780630ce90ec214610228575b600080fd5b6101f2610432565b6040516101ff9190612be4565b60405180910390f35b61021b61021636600461265b565b61045f565b6040516101ff91906131f4565b61023b61023636600461265b565b6104a5565b005b61021b6105df565b61023b610253366004612739565b6105e5565b61026061061a565b6040516101ff9190612af5565b61021b61027b36600461265b565b610629565b610260610684565b61023b61029636600461265b565b610693565b61021b6102a936600461265b565b610815565b61023b6102bc3660046126e0565b610847565b61023b6102cf366004612701565b610991565b61021b6102e23660046126e0565b610a3c565b61021b6102f536600461265b565b610c83565b61021b610e75565b610260610e7b565b61031d6103183660046126e0565b610e8a565b6040516101ff9190612bd9565b6101f2610eaa565b61021b61034036600461265b565b610ecb565b61021b61035336600461265b565b610f24565b61036b61036636600461265b565b610f56565b6040516101ff94939291906131fd565b61038e61038936600461265b565b611028565b6040516101ff91906131aa565b61023b6103a9366004612739565b6110b4565b6101f26103bc36600461265b565b611125565b61023b6103cf3660046125b2565b611313565b61023b6103e23660046125b2565b61135e565b6102606113b3565b6102606113c2565b61021b6104053660046126e0565b6113d1565b610260611418565b61042561042036600461265b565b611427565b6040516101ff9190612b47565b60405180604001604052806011815260200170546865526172697479466f72657374563360781b81525081565b600061046a8261155a565b61048f5760405162461bcd60e51b815260040161048690612f4b565b60405180910390fd5b506000818152600360205260409020545b919050565b60006104b082610815565b90506104bc813361156e565b6104d85760405162461bcd60e51b8152600401610486906130ad565b600082815260116020526040902054600c546001600160a01b031663e58410bb8361050284610ecb565b6040518363ffffffff1660e01b815260040161051f929190613229565b602060405180830381600087803b15801561053957600080fd5b505af115801561054d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061057191906125f1565b50600083815260116020526040812080546001929061059190849061325e565b909155507f71ddc2edf9c299a87b070a30e69041861ddc4ed37d6db3f0484c759cc85b65a79050836105c483600161325e565b6040516105d2929190613229565b60405180910390a1505050565b60075490565b6105ee8361172e565b61060a5760405162461bcd60e51b81526004016104869061305c565b610615838383611946565b505050565b6013546001600160a01b031681565b60006106336105df565b82106106515760405162461bcd60e51b8152600401610486906130d8565b6007828154811061067257634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b6000546001600160a01b031681565b6013546001600160a01b031633146106bd5760405162461bcd60e51b815260040161048690612cd9565b600b546040516331a9108f60e11b81526000916001600160a01b031690636352211e906106ee9085906004016131f4565b60206040518083038186803b15801561070657600080fd5b505afa15801561071a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061073e9190612673565b9050600061074b82611a29565b600b546040516350e60dc160e11b81529192506001600160a01b03169063a1cc1b829061077c9086906004016131f4565b60006040518083038186803b15801561079457600080fd5b505afa1580156107a8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107d0919081019061268b565b6000858152600f6020908152604080832060108352818420601184529190932084905584905584519495509293919261080c929086019061240b565b50505050505050565b600081815260016020526040812054806108415760405162461bcd60e51b815260040161048690612e82565b92915050565b806108645760405162461bcd60e51b815260040161048690612ca2565b600a546040516323b872dd60e01b81526001600160a01b03909116906323b872dd9061089a90339061dead908790600401612b23565b600060405180830381600087803b1580156108b457600080fd5b505af11580156108c8573d6000803e3d6000fd5b5050505060006108d782611a29565b600a546040516350e60dc160e11b81529192506001600160a01b03169063a1cc1b82906109089086906004016131f4565b60006040518083038186803b15801561092057600080fd5b505afa158015610934573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261095c919081019061260d565b6000848152600f60209081526040808320601083528184206011845291909320849055849055845161080c929186019061240b565b828214156109b15760405162461bcd60e51b815260040161048690612d6d565b6109ba8361172e565b6109d65760405162461bcd60e51b815260040161048690613124565b600083815260046020908152604080832085845290915290819020805460ff191683151517905551829084907fe08356808518f185b1eebe6f778106965c2df3a69af4d7139fa9451067146eb790610a2f908590612bd9565b60405180910390a3505050565b600060048210158015610a50575060078211155b610a6c5760405162461bcd60e51b815260040161048690612f00565b610a76833361156e565b610a925760405162461bcd60e51b815260040161048690612cfe565b60095460405163c363b9eb60e01b81526000916001600160a01b03169063c363b9eb90610ac39087906004016131f4565b60806040518083038186803b158015610adb57600080fd5b505afa158015610aef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b139190612764565b93505050506002811015610b395760405162461bcd60e51b815260040161048690613034565b6000848152600e60205260409020541580610b6a57506000848152600e602052604090206002015460ff1615156001145b610b865760405162461bcd60e51b815260040161048690613153565b6040805160c0810182528481524260208201526000918101919091526060810185905233608082015260a08101610bc0856201518061328a565b610bca904261325e565b90526000858152600e60209081526040918290208351815590830151600182018190558383015160028301805460ff19169115159190911790556060840151600383015560808401516004830180546001600160a01b0319166001600160a01b0390921691909117905560a090930151600590910181905590517f9e18fb6a420664a545c5c7512938203fe2da893adea30fb1a5c132ee2856d9ee92610c739288928890613237565b60405180910390a1509192915050565b6000818152600e60209081526040808320815160c08101835281548152600182015493810193909352600281015460ff161515918301919091526003810154606083015260048101546001600160a01b031660808301526005015460a0820152610ced833361156e565b610d095760405162461bcd60e51b815260040161048690612cfe565b806040015115610d2b5760405162461bcd60e51b815260040161048690613008565b8051610d495760405162461bcd60e51b815260040161048690612c42565b428160a0015110610d6c5760405162461bcd60e51b815260040161048690612f23565b6000610d7784611a29565b9050610d8282611a5c565b6000848152600f602090815260408083206010835281842060118452919093208490558490558451610db7929186019061240b565b5050600160408581018281526000898152600e6020908152908390208851815590880151938101939093555160028301805460ff19169115159190911790556060860151600383015560808601516004830180546001600160a01b0319166001600160a01b0390921691909117905560a0860151600590920191909155517f74b7aa91ba7458f619367e190ef8c68f97680c2cea342ab37fde0f56abb786329250610e66915086908490613229565b60405180910390a19392505050565b60125481565b600a546001600160a01b031681565b600091825260046020908152604080842092845291905290205460ff1690565b60405180604001604052806005815260200164545246763360d81b81525081565b6000610ee082683635c9adc5dea0000061328a565b905060015b82811015610f1e57610f0083683635c9adc5dea0000061328a565b610f0a908361325e565b915080610f1681613321565b915050610ee5565b50919050565b600081610f435760405162461bcd60e51b815260040161048690612e38565b5060009081526002602052604090205490565b60006060600080610f6685610815565b6000868152600f60205260409020805491955090610f83906132ec565b80601f0160208091040260200160405190810160405280929190818152602001828054610faf906132ec565b8015610ffc5780601f10610fd157610100808354040283529160200191610ffc565b820191906000526020600020905b815481529060010190602001808311610fdf57829003601f168201915b505050600097885250506010602090815260408088205460119092529096205494969095949350915050565b61103061248f565b8161104d5760405162461bcd60e51b815260040161048690612da4565b506000908152600e6020908152604091829020825160c08101845281548152600182015492810192909252600281015460ff161515928201929092526003820154606082015260048201546001600160a01b0316608082015260059091015460a082015290565b60006110bf82610815565b90506110ca8461172e565b6110e65760405162461bcd60e51b815260040161048690613124565b808414806110f957506110f98185610e8a565b6111155760405162461bcd60e51b815260040161048690612ddb565b61111f8383611e01565b50505050565b606061112f6124d0565b60405180610120016040528060fd81526020016133e160fd913981526000838152600f6020908152604091829020915161116a929101612873565b60408051601f19818403018152919052816001602002018190525060405180606001604052806028815260200161351e602891396040808301919091526000848152601060205220546111bc90611e4a565b6040516020016111cc919061292e565b60408051808303601f190181529181526060808401929092528051918201905260288082526133b96020830139608082015260008381526011602052604090205461121690611e4a565b6040516020016112269190612a96565b60408051601f1981840301815291815260a0830191825280518082018252600d81526c1e17ba32bc3a1f1e17b9bb339f60991b60208083019190915260c0850182905284518186015186850151606088015160808901519751965160009861129a98959794969395929490939091016127e1565b604051602081830303815290604052905060006112e76112b986611e4a565b6112c284611f6d565b6040516020016112d3929190612965565b604051602081830303815290604052611f6d565b9050806040516020016112fa9190612a51565b60408051808303601f1901815291905295945050505050565b6013546001600160a01b03161561133c5760405162461bcd60e51b815260040161048690612fe0565b601380546001600160a01b0319166001600160a01b0392909216919091179055565b33730f5861aaf5f010202919c9126149c6b0c76cf469146113915760405162461bcd60e51b81526004016104869061318a565b600c80546001600160a01b0319166001600160a01b0392909216919091179055565b600b546001600160a01b031681565b6009546001600160a01b031681565b60006113dc83610f24565b82106113fa5760405162461bcd60e51b815260040161048690612bf7565b50600091825260056020908152604080842092845291905290205490565b600c546001600160a01b031681565b6060816114465760405162461bcd60e51b815260040161048690612da4565b600061145183610f24565b905060008167ffffffffffffffff81111561147c57634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156114b557816020015b6114a26124f7565b81526020019060019003908161149a5790505b50905060005b828110156115525760006114cf86836113d1565b90506000806000806114e085610f56565b93509350935093506040518060a001604052808581526020018681526020018481526020018381526020018281525087878151811061152f57634e487b7160e01b600052603260045260246000fd5b60200260200101819052505050505050808061154a90613321565b9150506114bb565b509392505050565b600090815260016020526040902054151590565b6009546040516331a9108f60e11b8152600091309183916001600160a01b031690636352211e906115a39088906004016131f4565b60206040518083038186803b1580156115bb57600080fd5b505afa1580156115cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115f391906125d5565b9050836001600160a01b0316816001600160a01b0316148061169d575060095460405163020604bf60e21b81526001600160a01b0380851692169063081812fc906116429089906004016131f4565b60206040518083038186803b15801561165a57600080fd5b505afa15801561166e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061169291906125d5565b6001600160a01b0316145b80611725575060095460405163e985e9c560e01b81526001600160a01b039091169063e985e9c5906116d59084908690600401612b09565b60206040518083038186803b1580156116ed57600080fd5b505afa158015611701573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061172591906125f1565b95945050505050565b6000805460405163020604bf60e21b815233916001600160a01b03169063081812fc9061175f9086906004016131f4565b60206040518083038186803b15801561177757600080fd5b505afa15801561178b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117af91906125d5565b6001600160a01b0316148061184a57506000546040516331a9108f60e11b815233916001600160a01b031690636352211e906117ef9086906004016131f4565b60206040518083038186803b15801561180757600080fd5b505afa15801561181b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061183f91906125d5565b6001600160a01b0316145b8061084157506000546040516331a9108f60e11b81526001600160a01b039091169063e985e9c5908290636352211e906118889087906004016131f4565b60206040518083038186803b1580156118a057600080fd5b505afa1580156118b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118d891906125d5565b336040518363ffffffff1660e01b81526004016118f6929190612b09565b60206040518083038186803b15801561190e57600080fd5b505afa158015611922573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061084191906125f1565b8261195082610815565b1461196d5760405162461bcd60e51b815260040161048690612f97565b8161198a5760405162461bcd60e51b815260040161048690612d29565b6119958383836120e1565b6119a0600082611e01565b60008381526002602052604081208054600192906119bf9084906132a9565b909155505060008281526002602052604081208054600192906119e390849061325e565b9091555050600081815260016020526040808220849055518291849186917faf6151f5085accf2d57e1e7bf7601d3b3982e0de7e9a90f032f8554de9c104f691a4505050565b600080611a366012612134565b9050611a52838260405180602001604052806000815250612138565b6108416012612142565b60606000806000846060015185608001518660200151600d5442604051602001611a8a959493929190612ac0565b60405160208183030381529060405290506000611aa68261214b565b600d8190559050611ab8600b8261333c565b9350611ac560068261333c565b865190935060071415611b945760148054611ae0908361333c565b81548110611afe57634e487b7160e01b600052603260045260246000fd5b906000526020600020018054611b13906132ec565b80601f0160208091040260200160405190810160405280929190818152602001828054611b3f906132ec565b8015611b8c5780601f10611b6157610100808354040283529160200191611b8c565b820191906000526020600020905b815481529060010190602001808311611b6f57829003601f168201915b505050505094505b855160061415611c605760158054611bac908361333c565b81548110611bca57634e487b7160e01b600052603260045260246000fd5b906000526020600020018054611bdf906132ec565b80601f0160208091040260200160405190810160405280929190818152602001828054611c0b906132ec565b8015611c585780601f10611c2d57610100808354040283529160200191611c58565b820191906000526020600020905b815481529060010190602001808311611c3b57829003601f168201915b505050505094505b855160051415611d2c5760168054611c78908361333c565b81548110611c9657634e487b7160e01b600052603260045260246000fd5b906000526020600020018054611cab906132ec565b80601f0160208091040260200160405190810160405280929190818152602001828054611cd7906132ec565b8015611d245780601f10611cf957610100808354040283529160200191611d24565b820191906000526020600020905b815481529060010190602001808311611d0757829003601f168201915b505050505094505b855160041415611df85760178054611d44908361333c565b81548110611d6257634e487b7160e01b600052603260045260246000fd5b906000526020600020018054611d77906132ec565b80601f0160208091040260200160405190810160405280929190818152602001828054611da3906132ec565b8015611df05780601f10611dc557610100808354040283529160200191611df0565b820191906000526020600020905b815481529060010190602001808311611dd357829003601f168201915b505050505094505b50509193909250565b60008181526003602052604090208290558082611e1d82610815565b6040517f08aaf4f7dd1adfa5bfe7067dea5b4ebd7e119d43257438a9189f37d7044eb09a90600090a45050565b606081611e6f57506040805180820190915260018152600360fc1b60208201526104a0565b8160005b8115611e995780611e8381613321565b9150611e929050600a83613276565b9150611e73565b60008167ffffffffffffffff811115611ec257634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611eec576020820181803683370190505b5090505b8415611f6557611f016001836132a9565b9150611f0e600a8661333c565b611f1990603061325e565b60f81b818381518110611f3c57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350611f5e600a86613276565b9450611ef0565b949350505050565b805160609080611f8d5750506040805160208101909152600081526104a0565b60006003611f9c83600261325e565b611fa69190613276565b611fb190600461328a565b90506000611fc082602061325e565b67ffffffffffffffff811115611fe657634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612010576020820181803683370190505b50905060006040518060600160405280604081526020016134de604091399050600181016020830160005b8681101561209c576003818a01810151603f601282901c8116860151600c83901c8216870151600684901c831688015192909316870151600891821b60ff94851601821b92841692909201901b91160160e01b83526004909201910161203b565b5060038606600181146120b657600281146120c7576120d3565b613d3d60f01b6001198301526120d3565b603d60f81b6000198301525b505050918152949350505050565b6120ec838383610615565b826120ff576120fa8161217c565b612110565b8183146121105761211083826121c0565b816121235761211e81612249565b610615565b828214610615576106158282612322565b5490565b6106158383612358565b80546001019055565b60008160405160200161215e91906127c5565b60408051601f19818403018152919052805160209091012092915050565b600780546000838152600860205260408120829055600182018355919091527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6880155565b600060016121cd84610f24565b6121d791906132a9565b6000838152600660205260409020549091508082146122205760008481526005602090815260408083208584528252808320548484528184208190558352600690915290208190555b506000918252600660209081526040808420849055938352600581528383209183525290812055565b60075460009061225b906001906132a9565b6000838152600860205260408120546007805493945090928490811061229157634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905080600783815481106122c057634e487b7160e01b600052603260045260246000fd5b600091825260208083209091019290925582815260089091526040808220849055858252812055600780548061230657634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b600061232d83610f24565b6000938452600560209081526040808620838752825280862085905593855260069052919092205550565b816123755760405162461bcd60e51b815260040161048690612ecb565b61237e8161155a565b1561239b5760405162461bcd60e51b815260040161048690612c6b565b6123a7600083836120e1565b60008281526002602052604081208054600192906123c690849061325e565b909155505060008181526001602052604080822084905551829184917faf6151f5085accf2d57e1e7bf7601d3b3982e0de7e9a90f032f8554de9c104f6908290a45050565b828054612417906132ec565b90600052602060002090601f016020900481019282612439576000855561247f565b82601f1061245257805160ff191683800117855561247f565b8280016001018555821561247f579182015b8281111561247f578251825591602001919060010190612464565b5061248b929150612526565b5090565b6040518060c0016040528060008152602001600081526020016000151581526020016000815260200160006001600160a01b03168152602001600081525090565b6040518060e001604052806007905b60608152602001906001900390816124df5790505090565b6040518060a0016040528060008152602001600081526020016060815260200160008152602001600081525090565b5b8082111561248b5760008155600101612527565b600082601f83011261254b578081fd5b815167ffffffffffffffff808211156125665761256661337c565b604051601f8301601f19168101602001828111828210171561258a5761258a61337c565b6040528281528483016020018610156125a1578384fd5b6117258360208301602088016132c0565b6000602082840312156125c3578081fd5b81356125ce81613392565b9392505050565b6000602082840312156125e6578081fd5b81516125ce81613392565b600060208284031215612602578081fd5b81516125ce816133aa565b600080600060608486031215612621578182fd5b835167ffffffffffffffff811115612637578283fd5b6126438682870161253b565b93505060208401519150604084015190509250925092565b60006020828403121561266c578081fd5b5035919050565b600060208284031215612684578081fd5b5051919050565b600080600080608085870312156126a0578081fd5b84519350602085015167ffffffffffffffff8111156126bd578182fd5b6126c98782880161253b565b604087015160609097015195989097509350505050565b600080604083850312156126f2578182fd5b50508035926020909101359150565b600080600060608486031215612715578283fd5b8335925060208401359150604084013561272e816133aa565b809150509250925092565b60008060006060848603121561274d578283fd5b505081359360208301359350604090920135919050565b60008060008060808587031215612779578384fd5b505082516020840151604085015160609095015191969095509092509050565b600081518084526127b18160208601602086016132c0565b601f01601f19169290920160200192915050565b600082516127d78184602087016132c0565b9190910192915050565b6000885160206127f48285838e016132c0565b8951918401916128078184848e016132c0565b89519201916128198184848d016132c0565b885192019161282b8184848c016132c0565b875192019161283d8184848b016132c0565b865192019161284f8184848a016132c0565b855192019161286181848489016132c0565b919091019a9950505050505050505050565b6000636e616d6560e01b8252600160fd1b60048301526005818454836002820490506001808316806128a657607f831692505b60208084108214156128c657634e487b7160e01b88526022600452602488fd5b8180156128da57600181146128ef5761291f565b60ff1986168a890152848a018801965061291f565b6128f88b613252565b895b868110156129155781548c82018b01529085019083016128fa565b505087858b010196505b50949998505050505050505050565b6000646d6167696360d81b8252600160fd1b600583015282516129588160068501602087016132c0565b9190910160060192915050565b737b226e616d65223a20227472656173757265202360601b815282516000906129958160148501602088016132c0565b7f222c20226465736372697074696f6e223a2022526172697479206973206163686014918401918201527f6965766564207468726f75676820676f6f64206c75636b20616e6420696e746560348201527f6c6c6967656e6365222c2022696d616765223a2022646174613a696d6167652f60548201526e1cdd99cade1b5b0ed8985cd94d8d0b608a1b60748201528351612a368160838401602088016132c0565b61227d60f01b60839290910191820152608501949350505050565b60007f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c00000082528251612a8981601d8501602087016132c0565b91909101601d0192915050565b6000641b195d995b60da1b8252600160fd1b600583015282516129588160068501602087016132c0565b94855260609390931b6bffffffffffffffffffffffff1916602085015260348401919091526054830152607482015260940190565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b60208082528251828201819052600091906040908185019080840286018301878501865b83811015612bcb57603f19898403018552815160a0815185528882015189860152878201518189870152612ba182870182612799565b60608481015190880152608093840151939096019290925250509386019390860190600101612b6b565b509098975050505050505050565b901515815260200190565b6000602082526125ce6020830184612799565b6020808252602b908201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560408201526a74206f6620626f756e647360a81b606082015260800190565b6020808252600f908201526e1b9bdd081a5b9a5d1a585b1a5e9959608a1b604082015260600190565b6020808252601c908201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604082015260600190565b60208082526018908201527f7265636569766572206973207a65726f20616464726573730000000000000000604082015260600190565b6020808252600b908201526a3737ba103932b9b1bab2b960a91b604082015260600190565b6020808252601190820152703737ba103cb7bab91039bab6b6b7b732b960791b604082015260600190565b60208082526024908201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646040820152637265737360e01b606082015260800190565b60208082526019908201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604082015260600190565b6020808252601c908201527f63616e6e6f74207265747269657665207a65726f206164647265737300000000604082015260600190565b60208082526038908201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760408201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606082015260800190565b6020808252602a908201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604082015269726f206164647265737360b01b606082015260800190565b60208082526029908201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460408201526832b73a103a37b5b2b760b91b606082015260800190565b6020808252818101527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604082015260600190565b6020808252600990820152681b9bdd081d985b1a5960ba1b604082015260600190565b6020808252600e908201526d1b9bdd08199a5b9a5cda081e595d60921b604082015260600190565b6020808252602c908201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b60208082526029908201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960408201526839903737ba1037bbb760b91b606082015260800190565b6020808252600e908201526d185b1c9958591e481cd95d1d195960921b604082015260600190565b602080825260129082015271185b1c9958591e48191a5cd8dbdd995c995960721b604082015260600190565b6020808252600e908201526d3737ba103632bb32b6101f1e901960911b604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252601190820152706e6f7420796f757220747265617375726560781b604082015260600190565b6020808252602c908201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60408201526b7574206f6620626f756e647360a01b606082015260800190565b6020808252601590820152743737ba1037bbb732b91037b31039bab6b6b7b732b960591b604082015260600190565b6020808252601f908201527f6e6f7420656d707479206f72206e6f7420646973636f76657265642079657400604082015260600190565b60208082526006908201526510b7bbb732b960d11b604082015260600190565b8151815260208083015190820152604080830151151590820152606080830151908201526080808301516001600160a01b03169082015260a0918201519181019190915260c00190565b90815260200190565b6000858252608060208301526132166080830186612799565b6040830194909452506060015292915050565b918252602082015260400190565b93845260208401929092526040830152606082015260800190565b60009081526020902090565b6000821982111561327157613271613350565b500190565b60008261328557613285613366565b500490565b60008160001904831182151516156132a4576132a4613350565b500290565b6000828210156132bb576132bb613350565b500390565b60005b838110156132db5781810151838201526020016132c3565b8381111561111f5750506000910152565b60028104600182168061330057607f821691505b60208210811415610f1e57634e487b7160e01b600052602260045260246000fd5b600060001982141561333557613335613350565b5060010190565b60008261334b5761334b613366565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146133a757600080fd5b50565b80151581146133a757600080fdfe3c2f746578743e3c7465787420783d2231302220793d2236302220636c6173733d2262617365223e3c73766720786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323030302f73766722207072657365727665417370656374526174696f3d22784d696e594d696e206d656574222076696577426f783d223020302033353020333530223e3c7374796c653e2e62617365207b2066696c6c3a2077686974653b20666f6e742d66616d696c793a2073657269663b20666f6e742d73697a653a20313470783b207d3c2f7374796c653e3c726563742077696474683d223130302522206865696768743d2231303025222066696c6c3d22626c61636b22202f3e3c7465787420783d2231302220793d2232302220636c6173733d2262617365223e4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f3c2f746578743e3c7465787420783d2231302220793d2234302220636c6173733d2262617365223ea264697066735822122094755deac5491b519c23f10d34abc721f5d13da2588600b29ae0ba69dae10eb064736f6c63430008000033000000000000000000000000ce761d788df608bd21bdd59d6f4b54b2e27f25bb000000000000000000000000b37d3d79ea86b0334d9322c695339d577a3d57be0000000000000000000000009e894cd5dcc5bad1ed3663077871d9d010f654b5000000000000000000000000640bdeff13ae5527424acd868f65357270b05eb8

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

000000000000000000000000ce761d788df608bd21bdd59d6f4b54b2e27f25bb000000000000000000000000b37d3d79ea86b0334d9322c695339d577a3d57be0000000000000000000000009e894cd5dcc5bad1ed3663077871d9d010f654b5000000000000000000000000640bdeff13ae5527424acd868f65357270b05eb8

-----Decoded View---------------
Arg [0] : _rarityAddr (address): 0xce761d788df608bd21bdd59d6f4b54b2e27f25bb
Arg [1] : _rarityForestAddr (address): 0xb37d3d79ea86b0334d9322c695339d577a3d57be
Arg [2] : _rarityForestV2Addr (address): 0x9e894cd5dcc5bad1ed3663077871d9d010f654b5
Arg [3] : _xpAddr (address): 0x640bdeff13ae5527424acd868f65357270b05eb8

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000ce761d788df608bd21bdd59d6f4b54b2e27f25bb
Arg [1] : 000000000000000000000000b37d3d79ea86b0334d9322c695339d577a3d57be
Arg [2] : 0000000000000000000000009e894cd5dcc5bad1ed3663077871d9d010f654b5
Arg [3] : 000000000000000000000000640bdeff13ae5527424acd868f65357270b05eb8


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Validator ID :
0 FTM

Amount Staked
0

Amount Delegated
0

Staking Total
0

Staking Start Epoch
0

Staking Start Time
0

Proof of Importance
0

Origination Score
0

Validation Score
0

Active
0

Online
0

Downtime
0 s
Address Amount claimed Rewards Created On Epoch Created On
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.