@thirdweb-dev/contracts-js
Version:
936 lines • 17.8 kB
JSON
[
{
"type": "constructor",
"inputs": [
{
"name": "_nativeTokenWrapper",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "nonpayable"
},
{
"type": "receive",
"stateMutability": "payable"
},
{
"type": "function",
"name": "DEFAULT_ADMIN_ROLE",
"inputs": [],
"outputs": [
{
"name": "",
"type": "bytes32",
"internalType": "bytes32"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "claimRewards",
"inputs": [],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "contractType",
"inputs": [],
"outputs": [
{
"name": "",
"type": "bytes32",
"internalType": "bytes32"
}
],
"stateMutability": "pure"
},
{
"type": "function",
"name": "contractURI",
"inputs": [],
"outputs": [
{
"name": "",
"type": "string",
"internalType": "string"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "contractVersion",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint8",
"internalType": "uint8"
}
],
"stateMutability": "pure"
},
{
"type": "function",
"name": "depositRewardTokens",
"inputs": [
{
"name": "_amount",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "payable"
},
{
"type": "function",
"name": "getRewardRatio",
"inputs": [],
"outputs": [
{
"name": "_numerator",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "_denominator",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "getRewardTokenBalance",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "getRoleAdmin",
"inputs": [
{
"name": "role",
"type": "bytes32",
"internalType": "bytes32"
}
],
"outputs": [
{
"name": "",
"type": "bytes32",
"internalType": "bytes32"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "getRoleMember",
"inputs": [
{
"name": "role",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "index",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "member",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "getRoleMemberCount",
"inputs": [
{
"name": "role",
"type": "bytes32",
"internalType": "bytes32"
}
],
"outputs": [
{
"name": "count",
"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": "_rewards",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "getTimeUnit",
"inputs": [],
"outputs": [
{
"name": "_timeUnit",
"type": "uint80",
"internalType": "uint80"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "grantRole",
"inputs": [
{
"name": "role",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "account",
"type": "address",
"internalType": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "hasRole",
"inputs": [
{
"name": "role",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "account",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "hasRoleWithSwitch",
"inputs": [
{
"name": "role",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "account",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "initialize",
"inputs": [
{
"name": "_defaultAdmin",
"type": "address",
"internalType": "address"
},
{
"name": "_contractURI",
"type": "string",
"internalType": "string"
},
{
"name": "_trustedForwarders",
"type": "address[]",
"internalType": "address[]"
},
{
"name": "_rewardToken",
"type": "address",
"internalType": "address"
},
{
"name": "_stakingToken",
"type": "address",
"internalType": "address"
},
{
"name": "_timeUnit",
"type": "uint80",
"internalType": "uint80"
},
{
"name": "_rewardRatioNumerator",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "_rewardRatioDenominator",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "isTrustedForwarder",
"inputs": [
{
"name": "forwarder",
"type": "address",
"internalType": "address"
}
],
"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": "renounceRole",
"inputs": [
{
"name": "role",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "account",
"type": "address",
"internalType": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "revokeRole",
"inputs": [
{
"name": "role",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "account",
"type": "address",
"internalType": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "rewardToken",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "rewardTokenDecimals",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint16",
"internalType": "uint16"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "setContractURI",
"inputs": [
{
"name": "_uri",
"type": "string",
"internalType": "string"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "setRewardRatio",
"inputs": [
{
"name": "_numerator",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "_denominator",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "setTimeUnit",
"inputs": [
{
"name": "_timeUnit",
"type": "uint80",
"internalType": "uint80"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "stake",
"inputs": [
{
"name": "_amount",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "payable"
},
{
"type": "function",
"name": "stakers",
"inputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "timeOfLastUpdate",
"type": "uint128",
"internalType": "uint128"
},
{
"name": "conditionIdOflastUpdate",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "amountStaked",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "unclaimedRewards",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "stakersArray",
"inputs": [
{
"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": "stakingTokenBalance",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "stakingTokenDecimals",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint16",
"internalType": "uint16"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "withdraw",
"inputs": [
{
"name": "_amount",
"type": "uint256",
"internalType": "uint256"
}
],
"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": "Initialized",
"inputs": [
{
"name": "version",
"type": "uint8",
"indexed": false,
"internalType": "uint8"
}
],
"anonymous": false
},
{
"type": "event",
"name": "RewardTokensDepositedByAdmin",
"inputs": [
{
"name": "_amount",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"type": "event",
"name": "RewardTokensWithdrawnByAdmin",
"inputs": [
{
"name": "_amount",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"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": "RoleAdminChanged",
"inputs": [
{
"name": "role",
"type": "bytes32",
"indexed": true,
"internalType": "bytes32"
},
{
"name": "previousAdminRole",
"type": "bytes32",
"indexed": true,
"internalType": "bytes32"
},
{
"name": "newAdminRole",
"type": "bytes32",
"indexed": true,
"internalType": "bytes32"
}
],
"anonymous": false
},
{
"type": "event",
"name": "RoleGranted",
"inputs": [
{
"name": "role",
"type": "bytes32",
"indexed": true,
"internalType": "bytes32"
},
{
"name": "account",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "sender",
"type": "address",
"indexed": true,
"internalType": "address"
}
],
"anonymous": false
},
{
"type": "event",
"name": "RoleRevoked",
"inputs": [
{
"name": "role",
"type": "bytes32",
"indexed": true,
"internalType": "bytes32"
},
{
"name": "account",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "sender",
"type": "address",
"indexed": true,
"internalType": "address"
}
],
"anonymous": false
},
{
"type": "event",
"name": "TokensStaked",
"inputs": [
{
"name": "staker",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "amount",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"type": "event",
"name": "TokensWithdrawn",
"inputs": [
{
"name": "staker",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "amount",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"type": "event",
"name": "UpdatedMinStakeAmount",
"inputs": [
{
"name": "oldAmount",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "newAmount",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"type": "event",
"name": "UpdatedRewardRatio",
"inputs": [
{
"name": "oldNumerator",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "newNumerator",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "oldDenominator",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "newDenominator",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"type": "event",
"name": "UpdatedTimeUnit",
"inputs": [
{
"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": "PermissionsAlreadyGranted",
"inputs": [
{
"name": "account",
"type": "address",
"internalType": "address"
},
{
"name": "role",
"type": "bytes32",
"internalType": "bytes32"
}
]
},
{
"type": "error",
"name": "PermissionsInvalidPermission",
"inputs": [
{
"name": "expected",
"type": "address",
"internalType": "address"
},
{
"name": "actual",
"type": "address",
"internalType": "address"
}
]
},
{
"type": "error",
"name": "PermissionsUnauthorizedAccount",
"inputs": [
{
"name": "account",
"type": "address",
"internalType": "address"
},
{
"name": "neededRole",
"type": "bytes32",
"internalType": "bytes32"
}
]
}
]