@towns-protocol/generated
Version:
## How to generate contract types
1,296 lines (1,295 loc) • 25.5 kB
text/typescript
export default [
{
"type": "function",
"name": "__RewardsDistribution_init",
"inputs": [
{
"name": "stakeToken",
"type": "address",
"internalType": "address"
},
{
"name": "rewardToken",
"type": "address",
"internalType": "address"
},
{
"name": "rewardDuration",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "changeBeneficiary",
"inputs": [
{
"name": "depositId",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "newBeneficiary",
"type": "address",
"internalType": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "claimReward",
"inputs": [
{
"name": "beneficiary",
"type": "address",
"internalType": "address"
},
{
"name": "recipient",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "reward",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "currentReward",
"inputs": [
{
"name": "beneficiary",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "currentRewardPerTokenAccumulated",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "currentSpaceDelegationReward",
"inputs": [
{
"name": "operator",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "delegationProxyById",
"inputs": [
{
"name": "depositId",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "depositById",
"inputs": [
{
"name": "depositId",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "deposit",
"type": "tuple",
"internalType": "struct StakingRewards.Deposit",
"components": [
{
"name": "amount",
"type": "uint96",
"internalType": "uint96"
},
{
"name": "owner",
"type": "address",
"internalType": "address"
},
{
"name": "commissionEarningPower",
"type": "uint96",
"internalType": "uint96"
},
{
"name": "delegatee",
"type": "address",
"internalType": "address"
},
{
"name": "pendingWithdrawal",
"type": "uint96",
"internalType": "uint96"
},
{
"name": "beneficiary",
"type": "address",
"internalType": "address"
}
]
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "getDepositsByDepositor",
"inputs": [
{
"name": "depositor",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "",
"type": "uint256[]",
"internalType": "uint256[]"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "getPeriodRewardAmount",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "implementation",
"inputs": [],
"outputs": [
{
"name": "result",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "increaseStake",
"inputs": [
{
"name": "depositId",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "amount",
"type": "uint96",
"internalType": "uint96"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "initiateWithdraw",
"inputs": [
{
"name": "depositId",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "amount",
"type": "uint96",
"internalType": "uint96"
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "isRewardNotifier",
"inputs": [
{
"name": "notifier",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "lastTimeRewardDistributed",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "notifyRewardAmount",
"inputs": [
{
"name": "reward",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "permitAndIncreaseStake",
"inputs": [
{
"name": "depositId",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "amount",
"type": "uint96",
"internalType": "uint96"
},
{
"name": "nonce",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "deadline",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "signature",
"type": "bytes",
"internalType": "bytes"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "permitAndStake",
"inputs": [
{
"name": "amount",
"type": "uint96",
"internalType": "uint96"
},
{
"name": "delegatee",
"type": "address",
"internalType": "address"
},
{
"name": "beneficiary",
"type": "address",
"internalType": "address"
},
{
"name": "nonce",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "deadline",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "signature",
"type": "bytes",
"internalType": "bytes"
}
],
"outputs": [
{
"name": "depositId",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "redelegate",
"inputs": [
{
"name": "depositId",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "delegatee",
"type": "address",
"internalType": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "setPeriodRewardAmount",
"inputs": [
{
"name": "amount",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "setRewardNotifier",
"inputs": [
{
"name": "notifier",
"type": "address",
"internalType": "address"
},
{
"name": "enabled",
"type": "bool",
"internalType": "bool"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "stake",
"inputs": [
{
"name": "amount",
"type": "uint96",
"internalType": "uint96"
},
{
"name": "delegatee",
"type": "address",
"internalType": "address"
},
{
"name": "beneficiary",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "depositId",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "stakeOnBehalf",
"inputs": [
{
"name": "amount",
"type": "uint96",
"internalType": "uint96"
},
{
"name": "delegatee",
"type": "address",
"internalType": "address"
},
{
"name": "beneficiary",
"type": "address",
"internalType": "address"
},
{
"name": "owner",
"type": "address",
"internalType": "address"
},
{
"name": "",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "",
"type": "bytes",
"internalType": "bytes"
}
],
"outputs": [
{
"name": "depositId",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "stakedByDepositor",
"inputs": [
{
"name": "depositor",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "amount",
"type": "uint96",
"internalType": "uint96"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "stakingState",
"inputs": [],
"outputs": [
{
"name": "state",
"type": "tuple",
"internalType": "struct IRewardsDistributionBase.StakingState",
"components": [
{
"name": "riverToken",
"type": "address",
"internalType": "address"
},
{
"name": "totalStaked",
"type": "uint96",
"internalType": "uint96"
},
{
"name": "rewardDuration",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "rewardEndTime",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "lastUpdateTime",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "rewardRate",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "rewardPerTokenAccumulated",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "nextDepositId",
"type": "uint256",
"internalType": "uint256"
}
]
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "treasureByBeneficiary",
"inputs": [
{
"name": "beneficiary",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "treasure",
"type": "tuple",
"internalType": "struct StakingRewards.Treasure",
"components": [
{
"name": "earningPower",
"type": "uint96",
"internalType": "uint96"
},
{
"name": "rewardPerTokenAccumulated",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "unclaimedRewardSnapshot",
"type": "uint256",
"internalType": "uint256"
}
]
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "upgradeDelegationProxy",
"inputs": [
{
"name": "newImplementation",
"type": "address",
"internalType": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "withdraw",
"inputs": [
{
"name": "depositId",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "amount",
"type": "uint96",
"internalType": "uint96"
}
],
"stateMutability": "nonpayable"
},
{
"type": "event",
"name": "ChangeBeneficiary",
"inputs": [
{
"name": "depositId",
"type": "uint256",
"indexed": true,
"internalType": "uint256"
},
{
"name": "newBeneficiary",
"type": "address",
"indexed": true,
"internalType": "address"
}
],
"anonymous": false
},
{
"type": "event",
"name": "ClaimReward",
"inputs": [
{
"name": "beneficiary",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "recipient",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "reward",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"type": "event",
"name": "ClaimerSet",
"inputs": [
{
"name": "delegator",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "claimer",
"type": "address",
"indexed": true,
"internalType": "address"
}
],
"anonymous": false
},
{
"type": "event",
"name": "CrossDomainMessengerSet",
"inputs": [
{
"name": "messenger",
"type": "address",
"indexed": false,
"internalType": "address"
}
],
"anonymous": false
},
{
"type": "event",
"name": "DelegationDigestSet",
"inputs": [
{
"name": "digest",
"type": "bytes32",
"indexed": false,
"internalType": "bytes32"
}
],
"anonymous": false
},
{
"type": "event",
"name": "DelegationProxyDeployed",
"inputs": [
{
"name": "depositId",
"type": "uint256",
"indexed": true,
"internalType": "uint256"
},
{
"name": "delegatee",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "proxy",
"type": "address",
"indexed": false,
"internalType": "address"
}
],
"anonymous": false
},
{
"type": "event",
"name": "DelegationRemoved",
"inputs": [
{
"name": "delegator",
"type": "address",
"indexed": true,
"internalType": "address"
}
],
"anonymous": false
},
{
"type": "event",
"name": "DelegationSet",
"inputs": [
{
"name": "delegator",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "operator",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "quantity",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"type": "event",
"name": "IncreaseStake",
"inputs": [
{
"name": "depositId",
"type": "uint256",
"indexed": true,
"internalType": "uint256"
},
{
"name": "amount",
"type": "uint96",
"indexed": false,
"internalType": "uint96"
}
],
"anonymous": false
},
{
"type": "event",
"name": "Initialized",
"inputs": [
{
"name": "version",
"type": "uint32",
"indexed": false,
"internalType": "uint32"
}
],
"anonymous": false
},
{
"type": "event",
"name": "InitiateWithdraw",
"inputs": [
{
"name": "owner",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "depositId",
"type": "uint256",
"indexed": true,
"internalType": "uint256"
},
{
"name": "amount",
"type": "uint96",
"indexed": false,
"internalType": "uint96"
}
],
"anonymous": false
},
{
"type": "event",
"name": "InterfaceAdded",
"inputs": [
{
"name": "interfaceId",
"type": "bytes4",
"indexed": true,
"internalType": "bytes4"
}
],
"anonymous": false
},
{
"type": "event",
"name": "InterfaceRemoved",
"inputs": [
{
"name": "interfaceId",
"type": "bytes4",
"indexed": true,
"internalType": "bytes4"
}
],
"anonymous": false
},
{
"type": "event",
"name": "NotifyRewardAmount",
"inputs": [
{
"name": "notifier",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "reward",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"type": "event",
"name": "OwnershipTransferred",
"inputs": [
{
"name": "previousOwner",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "newOwner",
"type": "address",
"indexed": true,
"internalType": "address"
}
],
"anonymous": false
},
{
"type": "event",
"name": "PeriodRewardAmountSet",
"inputs": [
{
"name": "amount",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"type": "event",
"name": "ProxyDelegationSet",
"inputs": [
{
"name": "proxyDelegation",
"type": "address",
"indexed": false,
"internalType": "address"
}
],
"anonymous": false
},
{
"type": "event",
"name": "Redelegate",
"inputs": [
{
"name": "depositId",
"type": "uint256",
"indexed": true,
"internalType": "uint256"
},
{
"name": "delegatee",
"type": "address",
"indexed": true,
"internalType": "address"
}
],
"anonymous": false
},
{
"type": "event",
"name": "RewardNotifierSet",
"inputs": [
{
"name": "notifier",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "enabled",
"type": "bool",
"indexed": false,
"internalType": "bool"
}
],
"anonymous": false
},
{
"type": "event",
"name": "RewardsDistributionInitialized",
"inputs": [
{
"name": "stakeToken",
"type": "address",
"indexed": false,
"internalType": "address"
},
{
"name": "rewardToken",
"type": "address",
"indexed": false,
"internalType": "address"
},
{
"name": "rewardDuration",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"type": "event",
"name": "SpaceRewardsSwept",
"inputs": [
{
"name": "space",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "operator",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "scaledReward",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"type": "event",
"name": "Stake",
"inputs": [
{
"name": "owner",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "delegatee",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "beneficiary",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "depositId",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "amount",
"type": "uint96",
"indexed": false,
"internalType": "uint96"
}
],
"anonymous": false
},
{
"type": "event",
"name": "Upgraded",
"inputs": [
{
"name": "implementation",
"type": "address",
"indexed": true,
"internalType": "address"
}
],
"anonymous": false
},
{
"type": "event",
"name": "Withdraw",
"inputs": [
{
"name": "depositId",
"type": "uint256",
"indexed": true,
"internalType": "uint256"
},
{
"name": "amount",
"type": "uint96",
"indexed": false,
"internalType": "uint96"
}
],
"anonymous": false
},
{
"type": "error",
"name": "DelegationAlreadySet",
"inputs": [
{
"name": "delegator",
"type": "address",
"internalType": "address"
},
{
"name": "operator",
"type": "address",
"internalType": "address"
}
]
},
{
"type": "error",
"name": "DelegationNotSet",
"inputs": []
},
{
"type": "error",
"name": "Initializable_InInitializingState",
"inputs": []
},
{
"type": "error",
"name": "Initializable_NotInInitializingState",
"inputs": []
},
{
"type": "error",
"name": "Introspection_AlreadySupported",
"inputs": []
},
{
"type": "error",
"name": "Introspection_NotSupported",
"inputs": []
},
{
"type": "error",
"name": "InvalidAccountNonce",
"inputs": [
{
"name": "account",
"type": "address",
"internalType": "address"
},
{
"name": "currentNonce",
"type": "uint256",
"internalType": "uint256"
}
]
},
{
"type": "error",
"name": "InvalidClaimer",
"inputs": [
{
"name": "claimer",
"type": "address",
"internalType": "address"
}
]
},
{
"type": "error",
"name": "InvalidDelegator",
"inputs": [
{
"name": "delegator",
"type": "address",
"internalType": "address"
}
]
},
{
"type": "error",
"name": "InvalidOperator",
"inputs": [
{
"name": "operator",
"type": "address",
"internalType": "address"
}
]
},
{
"type": "error",
"name": "InvalidOwner",
"inputs": [
{
"name": "owner",
"type": "address",
"internalType": "address"
}
]
},
{
"type": "error",
"name": "InvalidQuantity",
"inputs": [
{
"name": "quantity",
"type": "uint256",
"internalType": "uint256"
}
]
},
{
"type": "error",
"name": "NewImplementationHasNoCode",
"inputs": []
},
{
"type": "error",
"name": "Ownable__NotOwner",
"inputs": [
{
"name": "account",
"type": "address",
"internalType": "address"
}
]
},
{
"type": "error",
"name": "Ownable__ZeroAddress",
"inputs": []
},
{
"type": "error",
"name": "RewardsDistribution__CannotWithdrawFromSelf",
"inputs": []
},
{
"type": "error",
"name": "RewardsDistribution__ExpiredDeadline",
"inputs": []
},
{
"type": "error",
"name": "RewardsDistribution__InvalidSignature",
"inputs": []
},
{
"type": "error",
"name": "RewardsDistribution__NoPendingWithdrawal",
"inputs": []
},
{
"type": "error",
"name": "RewardsDistribution__NotActiveOperator",
"inputs": []
},
{
"type": "error",
"name": "RewardsDistribution__NotBeneficiary",
"inputs": []
},
{
"type": "error",
"name": "RewardsDistribution__NotClaimer",
"inputs": []
},
{
"type": "error",
"name": "RewardsDistribution__NotDepositOwner",
"inputs": []
},
{
"type": "error",
"name": "RewardsDistribution__NotOperatorOrSpace",
"inputs": []
},
{
"type": "error",
"name": "RewardsDistribution__NotRewardNotifier",
"inputs": []
}
] as const