{
    "contract": {
        "name": "WorldsEscrow",
        "address": "0x2F53e033C55eB6C87CEa259123C0a68Ca3578426",
        "abi": [
            {
                "inputs": [
                    { "internalType": "address", "name": "_rewardTokenAddress", "type": "address" },
                    { "internalType": "contract IWorlds_ERC721", "name": "_worlds", "type": "address" }
                ],
                "stateMutability": "nonpayable",
                "type": "constructor"
            },
            {
                "anonymous": false,
                "inputs": [
                    {
                        "indexed": true,
                        "internalType": "address",
                        "name": "previousOwner",
                        "type": "address"
                    },
                    { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" }
                ],
                "name": "OwnershipTransferred",
                "type": "event"
            },
            {
                "anonymous": false,
                "inputs": [
                    { "indexed": false, "internalType": "address", "name": "receiver", "type": "address" },
                    { "indexed": false, "internalType": "uint256", "name": "claimed", "type": "uint256" }
                ],
                "name": "RewardClaimed",
                "type": "event"
            },
            {
                "anonymous": false,
                "inputs": [
                    {
                        "indexed": false,
                        "internalType": "uint256",
                        "name": "accumulated",
                        "type": "uint256"
                    }
                ],
                "name": "RewardsPerWeightUpdated",
                "type": "event"
            },
            {
                "anonymous": false,
                "inputs": [
                    { "indexed": false, "internalType": "uint32", "name": "start", "type": "uint32" },
                    { "indexed": false, "internalType": "uint32", "name": "end", "type": "uint32" },
                    { "indexed": false, "internalType": "uint256", "name": "rate", "type": "uint256" }
                ],
                "name": "RewardsSet",
                "type": "event"
            },
            {
                "anonymous": false,
                "inputs": [
                    { "indexed": false, "internalType": "uint32", "name": "start", "type": "uint32" },
                    { "indexed": false, "internalType": "uint32", "name": "end", "type": "uint32" },
                    { "indexed": false, "internalType": "uint256", "name": "rate", "type": "uint256" }
                ],
                "name": "RewardsUpdated",
                "type": "event"
            },
            {
                "anonymous": false,
                "inputs": [
                    { "indexed": false, "internalType": "address", "name": "user", "type": "address" },
                    {
                        "indexed": false,
                        "internalType": "uint256",
                        "name": "userRewards",
                        "type": "uint256"
                    },
                    {
                        "indexed": false,
                        "internalType": "uint256",
                        "name": "paidRewardPerWeight",
                        "type": "uint256"
                    }
                ],
                "name": "UserRewardsUpdated",
                "type": "event"
            },
            {
                "anonymous": false,
                "inputs": [
                    { "indexed": true, "internalType": "address", "name": "user", "type": "address" },
                    { "indexed": false, "internalType": "bool", "name": "increase", "type": "bool" },
                    { "indexed": false, "internalType": "uint256", "name": "weight", "type": "uint256" },
                    { "indexed": false, "internalType": "uint256", "name": "timestamp", "type": "uint256" }
                ],
                "name": "WeightUpdated",
                "type": "event"
            },
            {
                "anonymous": false,
                "inputs": [
                    { "indexed": true, "internalType": "uint256", "name": "tokenId", "type": "uint256" },
                    { "indexed": true, "internalType": "address", "name": "user", "type": "address" }
                ],
                "name": "WorldStaked",
                "type": "event"
            },
            {
                "anonymous": false,
                "inputs": [
                    { "indexed": true, "internalType": "uint256", "name": "tokenId", "type": "uint256" },
                    { "indexed": true, "internalType": "address", "name": "user", "type": "address" }
                ],
                "name": "WorldUnstaked",
                "type": "event"
            },
            { "stateMutability": "payable", "type": "fallback" },
            {
                "inputs": [{ "internalType": "address", "name": "_user", "type": "address" }],
                "name": "checkUserRewards",
                "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
                "stateMutability": "view",
                "type": "function"
            },
            {
                "inputs": [{ "internalType": "address", "name": "_to", "type": "address" }],
                "name": "claim",
                "outputs": [],
                "stateMutability": "nonpayable",
                "type": "function"
            },
            {
                "inputs": [
                    { "internalType": "uint256", "name": "_tokenId", "type": "uint256" },
                    { "internalType": "uint32", "name": "_rentableUntil", "type": "uint32" }
                ],
                "name": "extendRentalPeriod",
                "outputs": [],
                "stateMutability": "nonpayable",
                "type": "function"
            },
            {
                "inputs": [{ "internalType": "uint256", "name": "_tokenId", "type": "uint256" }],
                "name": "getWorldInfo",
                "outputs": [
                    {
                        "components": [
                            { "internalType": "uint16", "name": "weight", "type": "uint16" },
                            { "internalType": "address", "name": "owner", "type": "address" },
                            { "internalType": "uint16", "name": "deposit", "type": "uint16" },
                            { "internalType": "uint16", "name": "rentalPerDay", "type": "uint16" },
                            { "internalType": "uint16", "name": "minRentDays", "type": "uint16" },
                            { "internalType": "uint32", "name": "rentableUntil", "type": "uint32" }
                        ],
                        "internalType": "struct IWorldsEscrow.WorldInfo",
                        "name": "",
                        "type": "tuple"
                    }
                ],
                "stateMutability": "view",
                "type": "function"
            },
            {
                "inputs": [
                    { "internalType": "uint256[]", "name": "_tokenIds", "type": "uint256[]" },
                    { "internalType": "uint256[]", "name": "_weights", "type": "uint256[]" },
                    { "internalType": "address", "name": "_stakeTo", "type": "address" },
                    { "internalType": "uint16", "name": "_deposit", "type": "uint16" },
                    { "internalType": "uint16", "name": "_rentalPerDay", "type": "uint16" },
                    { "internalType": "uint16", "name": "_minRentDays", "type": "uint16" },
                    { "internalType": "uint32", "name": "_rentableUntil", "type": "uint32" },
                    { "internalType": "uint32", "name": "_maxTimestamp", "type": "uint32" },
                    { "internalType": "bytes", "name": "_signature", "type": "bytes" }
                ],
                "name": "initialStake",
                "outputs": [],
                "stateMutability": "nonpayable",
                "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": "view",
                "type": "function"
            },
            {
                "inputs": [],
                "name": "owner",
                "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
                "stateMutability": "view",
                "type": "function"
            },
            {
                "inputs": [],
                "name": "renounceOwnership",
                "outputs": [],
                "stateMutability": "nonpayable",
                "type": "function"
            },
            {
                "inputs": [{ "internalType": "address", "name": "user", "type": "address" }],
                "name": "rewards",
                "outputs": [
                    {
                        "components": [
                            { "internalType": "uint32", "name": "stakedWeight", "type": "uint32" },
                            { "internalType": "uint96", "name": "accumulated", "type": "uint96" },
                            { "internalType": "uint96", "name": "checkpoint", "type": "uint96" }
                        ],
                        "internalType": "struct IWorldsEscrow.UserRewards",
                        "name": "",
                        "type": "tuple"
                    }
                ],
                "stateMutability": "view",
                "type": "function"
            },
            {
                "inputs": [],
                "name": "rewardsPerWeight",
                "outputs": [
                    {
                        "components": [
                            { "internalType": "uint32", "name": "totalWeight", "type": "uint32" },
                            { "internalType": "uint96", "name": "accumulated", "type": "uint96" },
                            { "internalType": "uint32", "name": "lastUpdated", "type": "uint32" },
                            { "internalType": "uint96", "name": "rate", "type": "uint96" }
                        ],
                        "internalType": "struct IWorldsEscrow.RewardsPerWeight",
                        "name": "",
                        "type": "tuple"
                    }
                ],
                "stateMutability": "view",
                "type": "function"
            },
            {
                "inputs": [],
                "name": "rewardsPeriod",
                "outputs": [
                    {
                        "components": [
                            { "internalType": "uint32", "name": "start", "type": "uint32" },
                            { "internalType": "uint32", "name": "end", "type": "uint32" }
                        ],
                        "internalType": "struct IWorldsEscrow.RewardsPeriod",
                        "name": "",
                        "type": "tuple"
                    }
                ],
                "stateMutability": "view",
                "type": "function"
            },
            {
                "inputs": [
                    { "internalType": "contract IWorldsRental", "name": "_rental", "type": "address" }
                ],
                "name": "setRentalContract",
                "outputs": [],
                "stateMutability": "nonpayable",
                "type": "function"
            },
            {
                "inputs": [{ "internalType": "address", "name": "_rewardTokenAddress", "type": "address" }],
                "name": "setRewardTokenAddress",
                "outputs": [],
                "stateMutability": "nonpayable",
                "type": "function"
            },
            {
                "inputs": [
                    { "internalType": "uint32", "name": "_start", "type": "uint32" },
                    { "internalType": "uint32", "name": "_end", "type": "uint32" },
                    { "internalType": "uint96", "name": "_rate", "type": "uint96" }
                ],
                "name": "setRewards",
                "outputs": [],
                "stateMutability": "nonpayable",
                "type": "function"
            },
            {
                "inputs": [{ "internalType": "address", "name": "_signer", "type": "address" }],
                "name": "setSigner",
                "outputs": [],
                "stateMutability": "nonpayable",
                "type": "function"
            },
            {
                "inputs": [
                    { "internalType": "bytes4", "name": "_sig", "type": "bytes4" },
                    { "internalType": "address", "name": "_target", "type": "address" }
                ],
                "name": "setUpgrade",
                "outputs": [],
                "stateMutability": "nonpayable",
                "type": "function"
            },
            {
                "inputs": [
                    { "internalType": "uint256[]", "name": "_tokenIds", "type": "uint256[]" },
                    { "internalType": "uint256[]", "name": "_weights", "type": "uint256[]" }
                ],
                "name": "setWeight",
                "outputs": [],
                "stateMutability": "nonpayable",
                "type": "function"
            },
            {
                "inputs": [
                    { "internalType": "contract IWorlds_ERC721", "name": "_worlds", "type": "address" }
                ],
                "name": "setWorldsERC721",
                "outputs": [],
                "stateMutability": "nonpayable",
                "type": "function"
            },
            {
                "inputs": [
                    { "internalType": "contract IWorldsRental", "name": "_rental", "type": "address" }
                ],
                "name": "setWorldsRental",
                "outputs": [],
                "stateMutability": "nonpayable",
                "type": "function"
            },
            {
                "inputs": [
                    { "internalType": "uint256[]", "name": "_tokenIds", "type": "uint256[]" },
                    { "internalType": "address", "name": "_stakeTo", "type": "address" },
                    { "internalType": "uint16", "name": "_deposit", "type": "uint16" },
                    { "internalType": "uint16", "name": "_rentalPerDay", "type": "uint16" },
                    { "internalType": "uint16", "name": "_minRentDays", "type": "uint16" },
                    { "internalType": "uint32", "name": "_rentableUntil", "type": "uint32" }
                ],
                "name": "stake",
                "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": "newOwner", "type": "address" }],
                "name": "transferOwnership",
                "outputs": [],
                "stateMutability": "nonpayable",
                "type": "function"
            },
            {
                "inputs": [
                    { "internalType": "uint256[]", "name": "_tokenIds", "type": "uint256[]" },
                    { "internalType": "address", "name": "_unstakeTo", "type": "address" }
                ],
                "name": "unstake",
                "outputs": [],
                "stateMutability": "nonpayable",
                "type": "function"
            },
            {
                "inputs": [
                    { "internalType": "uint256[]", "name": "_tokenIds", "type": "uint256[]" },
                    { "internalType": "uint16", "name": "_deposit", "type": "uint16" },
                    { "internalType": "uint16", "name": "_rentalPerDay", "type": "uint16" },
                    { "internalType": "uint16", "name": "_minRentDays", "type": "uint16" },
                    { "internalType": "uint32", "name": "_rentableUntil", "type": "uint32" }
                ],
                "name": "updateRent",
                "outputs": [],
                "stateMutability": "nonpayable",
                "type": "function"
            },
            {
                "inputs": [
                    { "internalType": "uint256", "name": "_tokenId", "type": "uint256" },
                    { "internalType": "string", "name": "_ipfsHash", "type": "string" },
                    { "internalType": "uint256", "name": "_nonce", "type": "uint256" },
                    { "internalType": "bytes", "name": "_updateApproverSignature", "type": "bytes" }
                ],
                "name": "updateWorld",
                "outputs": [],
                "stateMutability": "nonpayable",
                "type": "function"
            },
            {
                "inputs": [{ "internalType": "address", "name": "_user", "type": "address" }],
                "name": "userStakedWorlds",
                "outputs": [{ "internalType": "uint256[]", "name": "", "type": "uint256[]" }],
                "stateMutability": "view",
                "type": "function"
            },
            { "stateMutability": "payable", "type": "receive" }
        ]
    }
}
