UNPKG

@thirdweb-dev/contracts-js

Version:
830 lines • 16 kB
[ { "type": "constructor", "inputs": [ { "name": "_defaultTimeUnit", "type": "uint80", "internalType": "uint80" }, { "name": "_defaultAdmin", "type": "address", "internalType": "address" }, { "name": "_defaultRewardsPerUnitTime", "type": "uint256", "internalType": "uint256" }, { "name": "_stakingToken", "type": "address", "internalType": "address" }, { "name": "_rewardToken", "type": "address", "internalType": "address" }, { "name": "_nativeTokenWrapper", "type": "address", "internalType": "address" } ], "stateMutability": "nonpayable" }, { "type": "receive", "stateMutability": "payable" }, { "type": "function", "name": "claimRewards", "inputs": [ { "name": "_tokenId", "type": "uint256", "internalType": "uint256" } ], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "contractURI", "inputs": [], "outputs": [ { "name": "", "type": "string", "internalType": "string" } ], "stateMutability": "view" }, { "type": "function", "name": "depositRewardTokens", "inputs": [ { "name": "_amount", "type": "uint256", "internalType": "uint256" } ], "outputs": [], "stateMutability": "payable" }, { "type": "function", "name": "getDefaultRewardsPerUnitTime", "inputs": [], "outputs": [ { "name": "_rewardsPerUnitTime", "type": "uint256", "internalType": "uint256" } ], "stateMutability": "view" }, { "type": "function", "name": "getDefaultTimeUnit", "inputs": [], "outputs": [ { "name": "_timeUnit", "type": "uint256", "internalType": "uint256" } ], "stateMutability": "view" }, { "type": "function", "name": "getRewardTokenBalance", "inputs": [], "outputs": [ { "name": "", "type": "uint256", "internalType": "uint256" } ], "stateMutability": "view" }, { "type": "function", "name": "getRewardsPerUnitTime", "inputs": [ { "name": "_tokenId", "type": "uint256", "internalType": "uint256" } ], "outputs": [ { "name": "_rewardsPerUnitTime", "type": "uint256", "internalType": "uint256" } ], "stateMutability": "view" }, { "type": "function", "name": "getStakeInfo", "inputs": [ { "name": "_staker", "type": "address", "internalType": "address" } ], "outputs": [ { "name": "_tokensStaked", "type": "uint256[]", "internalType": "uint256[]" }, { "name": "_tokenAmounts", "type": "uint256[]", "internalType": "uint256[]" }, { "name": "_totalRewards", "type": "uint256", "internalType": "uint256" } ], "stateMutability": "view" }, { "type": "function", "name": "getStakeInfoForToken", "inputs": [ { "name": "_tokenId", "type": "uint256", "internalType": "uint256" }, { "name": "_staker", "type": "address", "internalType": "address" } ], "outputs": [ { "name": "_tokensStaked", "type": "uint256", "internalType": "uint256" }, { "name": "_rewards", "type": "uint256", "internalType": "uint256" } ], "stateMutability": "view" }, { "type": "function", "name": "getTimeUnit", "inputs": [ { "name": "_tokenId", "type": "uint256", "internalType": "uint256" } ], "outputs": [ { "name": "_timeUnit", "type": "uint256", "internalType": "uint256" } ], "stateMutability": "view" }, { "type": "function", "name": "indexedTokens", "inputs": [ { "name": "", "type": "uint256", "internalType": "uint256" } ], "outputs": [ { "name": "", "type": "uint256", "internalType": "uint256" } ], "stateMutability": "view" }, { "type": "function", "name": "isIndexed", "inputs": [ { "name": "", "type": "uint256", "internalType": "uint256" } ], "outputs": [ { "name": "", "type": "bool", "internalType": "bool" } ], "stateMutability": "view" }, { "type": "function", "name": "multicall", "inputs": [ { "name": "data", "type": "bytes[]", "internalType": "bytes[]" } ], "outputs": [ { "name": "results", "type": "bytes[]", "internalType": "bytes[]" } ], "stateMutability": "nonpayable" }, { "type": "function", "name": "onERC1155BatchReceived", "inputs": [ { "name": "operator", "type": "address", "internalType": "address" }, { "name": "from", "type": "address", "internalType": "address" }, { "name": "ids", "type": "uint256[]", "internalType": "uint256[]" }, { "name": "values", "type": "uint256[]", "internalType": "uint256[]" }, { "name": "data", "type": "bytes", "internalType": "bytes" } ], "outputs": [ { "name": "", "type": "bytes4", "internalType": "bytes4" } ], "stateMutability": "nonpayable" }, { "type": "function", "name": "onERC1155Received", "inputs": [ { "name": "", "type": "address", "internalType": "address" }, { "name": "", "type": "address", "internalType": "address" }, { "name": "", "type": "uint256", "internalType": "uint256" }, { "name": "", "type": "uint256", "internalType": "uint256" }, { "name": "", "type": "bytes", "internalType": "bytes" } ], "outputs": [ { "name": "", "type": "bytes4", "internalType": "bytes4" } ], "stateMutability": "view" }, { "type": "function", "name": "owner", "inputs": [], "outputs": [ { "name": "", "type": "address", "internalType": "address" } ], "stateMutability": "view" }, { "type": "function", "name": "rewardToken", "inputs": [], "outputs": [ { "name": "", "type": "address", "internalType": "address" } ], "stateMutability": "view" }, { "type": "function", "name": "setContractURI", "inputs": [ { "name": "_uri", "type": "string", "internalType": "string" } ], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "setDefaultRewardsPerUnitTime", "inputs": [ { "name": "_defaultRewardsPerUnitTime", "type": "uint256", "internalType": "uint256" } ], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "setDefaultTimeUnit", "inputs": [ { "name": "_defaultTimeUnit", "type": "uint80", "internalType": "uint80" } ], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "setOwner", "inputs": [ { "name": "_newOwner", "type": "address", "internalType": "address" } ], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "setRewardsPerUnitTime", "inputs": [ { "name": "_tokenId", "type": "uint256", "internalType": "uint256" }, { "name": "_rewardsPerUnitTime", "type": "uint256", "internalType": "uint256" } ], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "setTimeUnit", "inputs": [ { "name": "_tokenId", "type": "uint256", "internalType": "uint256" }, { "name": "_timeUnit", "type": "uint80", "internalType": "uint80" } ], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "stake", "inputs": [ { "name": "_tokenId", "type": "uint256", "internalType": "uint256" }, { "name": "_amount", "type": "uint64", "internalType": "uint64" } ], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "stakers", "inputs": [ { "name": "", "type": "uint256", "internalType": "uint256" }, { "name": "", "type": "address", "internalType": "address" } ], "outputs": [ { "name": "conditionIdOflastUpdate", "type": "uint64", "internalType": "uint64" }, { "name": "amountStaked", "type": "uint64", "internalType": "uint64" }, { "name": "timeOfLastUpdate", "type": "uint128", "internalType": "uint128" }, { "name": "unclaimedRewards", "type": "uint256", "internalType": "uint256" } ], "stateMutability": "view" }, { "type": "function", "name": "stakersArray", "inputs": [ { "name": "", "type": "uint256", "internalType": "uint256" }, { "name": "", "type": "uint256", "internalType": "uint256" } ], "outputs": [ { "name": "", "type": "address", "internalType": "address" } ], "stateMutability": "view" }, { "type": "function", "name": "stakingToken", "inputs": [], "outputs": [ { "name": "", "type": "address", "internalType": "address" } ], "stateMutability": "view" }, { "type": "function", "name": "supportsInterface", "inputs": [ { "name": "interfaceId", "type": "bytes4", "internalType": "bytes4" } ], "outputs": [ { "name": "", "type": "bool", "internalType": "bool" } ], "stateMutability": "view" }, { "type": "function", "name": "withdraw", "inputs": [ { "name": "_tokenId", "type": "uint256", "internalType": "uint256" }, { "name": "_amount", "type": "uint64", "internalType": "uint64" } ], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "withdrawRewardTokens", "inputs": [ { "name": "_amount", "type": "uint256", "internalType": "uint256" } ], "outputs": [], "stateMutability": "nonpayable" }, { "type": "event", "name": "ContractURIUpdated", "inputs": [ { "name": "prevURI", "type": "string", "indexed": false, "internalType": "string" }, { "name": "newURI", "type": "string", "indexed": false, "internalType": "string" } ], "anonymous": false }, { "type": "event", "name": "OwnerUpdated", "inputs": [ { "name": "prevOwner", "type": "address", "indexed": true, "internalType": "address" }, { "name": "newOwner", "type": "address", "indexed": true, "internalType": "address" } ], "anonymous": false }, { "type": "event", "name": "RewardsClaimed", "inputs": [ { "name": "staker", "type": "address", "indexed": true, "internalType": "address" }, { "name": "rewardAmount", "type": "uint256", "indexed": false, "internalType": "uint256" } ], "anonymous": false }, { "type": "event", "name": "TokensStaked", "inputs": [ { "name": "staker", "type": "address", "indexed": true, "internalType": "address" }, { "name": "tokenId", "type": "uint256", "indexed": true, "internalType": "uint256" }, { "name": "amount", "type": "uint256", "indexed": false, "internalType": "uint256" } ], "anonymous": false }, { "type": "event", "name": "TokensWithdrawn", "inputs": [ { "name": "staker", "type": "address", "indexed": true, "internalType": "address" }, { "name": "tokenId", "type": "uint256", "indexed": true, "internalType": "uint256" }, { "name": "amount", "type": "uint256", "indexed": false, "internalType": "uint256" } ], "anonymous": false }, { "type": "event", "name": "UpdatedDefaultRewardsPerUnitTime", "inputs": [ { "name": "oldRewardsPerUnitTime", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "newRewardsPerUnitTime", "type": "uint256", "indexed": false, "internalType": "uint256" } ], "anonymous": false }, { "type": "event", "name": "UpdatedDefaultTimeUnit", "inputs": [ { "name": "oldTimeUnit", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "newTimeUnit", "type": "uint256", "indexed": false, "internalType": "uint256" } ], "anonymous": false }, { "type": "event", "name": "UpdatedRewardsPerUnitTime", "inputs": [ { "name": "_tokenId", "type": "uint256", "indexed": true, "internalType": "uint256" }, { "name": "oldRewardsPerUnitTime", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "newRewardsPerUnitTime", "type": "uint256", "indexed": false, "internalType": "uint256" } ], "anonymous": false }, { "type": "event", "name": "UpdatedTimeUnit", "inputs": [ { "name": "_tokenId", "type": "uint256", "indexed": true, "internalType": "uint256" }, { "name": "oldTimeUnit", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "newTimeUnit", "type": "uint256", "indexed": false, "internalType": "uint256" } ], "anonymous": false }, { "type": "error", "name": "ContractMetadataUnauthorized", "inputs": [] }, { "type": "error", "name": "CurrencyTransferLibMismatchedValue", "inputs": [ { "name": "expected", "type": "uint256", "internalType": "uint256" }, { "name": "actual", "type": "uint256", "internalType": "uint256" } ] }, { "type": "error", "name": "OwnableUnauthorized", "inputs": [] } ]