import { Contract , Signer } from "ethers" ; import { Provider } from "@ethersproject/providers" ; import type { RibbonStakingRewards } from "./RibbonStakingRewards" ; export class RibbonStakingRewardsFactory { static connect ( address , signerOrProvider ) { return new Contract ( address , _abi , signerOrProvider ) as RibbonStakingRewards ; } } const _abi = [ { inputs : [ { internalType : "address" , name : "_owner" , type : "address" , } , { internalType : "address" , name : "_rewardsDistribution" , type : "address" , } , { internalType : "address" , name : "_rewardsToken" , type : "address" , } , { internalType : "address" , name : "_stakingToken" , type : "address" , } , { internalType : "uint256" , name : "_startEmission" , type : "uint256" , } , ] , stateMutability : "nonpayable" , type : "constructor" , } , { anonymous : false , inputs : [ { indexed : false , internalType : "address" , name : "oldOwner" , type : "address" , } , { indexed : false , internalType : "address" , name : "newOwner" , type : "address" , } , ] , name : "OwnerChanged" , type : "event" , } , { anonymous : false , inputs : [ { indexed : false , internalType : "address" , name : "newOwner" , type : "address" , } , ] , name : "OwnerNominated" , type : "event" , } , { anonymous : false , inputs : [ { indexed : false , internalType : "bool" , name : "isPaused" , type : "bool" , } , ] , name : "PauseChanged" , type : "event" , } , { anonymous : false , inputs : [ { indexed : false , internalType : "address" , name : "token" , type : "address" , } , { indexed : false , internalType : "uint256" , name : "amount" , type : "uint256" , } , ] , name : "Recovered" , type : "event" , } , { anonymous : false , inputs : [ { indexed : false , internalType : "uint256" , name : "reward" , type : "uint256" , } , ] , name : "RewardAdded" , type : "event" , } , { anonymous : false , inputs : [ { indexed : true , internalType : "address" , name : "user" , type : "address" , } , { indexed : false , internalType : "uint256" , name : "reward" , type : "uint256" , } , ] , name : "RewardPaid" , type : "event" , } , { anonymous : false , inputs : [ { indexed : false , internalType : "uint256" , name : "newDuration" , type : "uint256" , } , ] , name : "RewardsDurationUpdated" , type : "event" , } , { anonymous : false , inputs : [ { indexed : true , internalType : "address" , name : "user" , type : "address" , } , { indexed : false , internalType : "uint256" , name : "amount" , type : "uint256" , } , ] , name : "Staked" , type : "event" , } , { anonymous : false , inputs : [ { indexed : true , internalType : "address" , name : "user" , type : "address" , } , { indexed : false , internalType : "uint256" , name : "amount" , type : "uint256" , } , ] , name : "Withdrawn" , type : "event" , } , { inputs : [ ] , name : "acceptOwnership" , outputs : [ ] , stateMutability : "nonpayable" , type : "function" , } , { inputs : [ { internalType : "address" , name : "account" , type : "address" , } , ] , name : "balanceOf" , outputs : [ { internalType : "uint256" , name : "" , type : "uint256" , } , ] , stateMutability : "view" , type : "function" , } , { inputs : [ { internalType : "address" , name : "account" , type : "address" , } , ] , name : "earned" , outputs : [ { internalType : "uint256" , name : "" , type : "uint256" , } , ] , stateMutability : "view" , type : "function" , } , { inputs : [ ] , name : "exit" , outputs : [ ] , stateMutability : "nonpayable" , type : "function" , } , { inputs : [ ] , name : "getReward" , outputs : [ ] , stateMutability : "nonpayable" , type : "function" , } , { inputs : [ ] , name : "getRewardForDuration" , outputs : [ { internalType : "uint256" , name : "" , type : "uint256" , } , ] , stateMutability : "view" , type : "function" , } , { inputs : [ ] , name : "lastPauseTime" , outputs : [ { internalType : "uint256" , name : "" , type : "uint256" , } , ] , stateMutability : "view" , type : "function" , } , { inputs : [ ] , name : "lastTimeRewardApplicable" , outputs : [ { internalType : "uint256" , name : "" , type : "uint256" , } , ] , stateMutability : "view" , type : "function" , } , { inputs : [ ] , name : "lastUpdateTime" , outputs : [ { internalType : "uint256" , name : "" , type : "uint256" , } , ] , stateMutability : "view" , type : "function" , } , { inputs : [ { internalType : "address" , name : "_owner" , type : "address" , } , ] , name : "nominateNewOwner" , outputs : [ ] , stateMutability : "nonpayable" , type : "function" , } , { inputs : [ ] , name : "nominatedOwner" , outputs : [ { internalType : "address" , name : "" , type : "address" , } , ] , stateMutability : "view" , type : "function" , } , { inputs : [ { internalType : "uint256" , name : "reward" , type : "uint256" , } , ] , name : "notifyRewardAmount" , outputs : [ ] , stateMutability : "nonpayable" , type : "function" , } , { inputs : [ ] , name : "owner" , outputs : [ { internalType : "address" , name : "" , type : "address" , } , ] , stateMutability : "view" , type : "function" , } , { inputs : [ ] , name : "paused" , outputs : [ { internalType : "bool" , name : "" , type : "bool" , } , ] , stateMutability : "view" , type : "function" , } , { inputs : [ ] , name : "periodFinish" , outputs : [ { internalType : "uint256" , name : "" , type : "uint256" , } , ] , stateMutability : "view" , type : "function" , } , { inputs : [ { internalType : "address" , name : "tokenAddress" , type : "address" , } , { internalType : "uint256" , name : "tokenAmount" , type : "uint256" , } , ] , name : "recoverERC20" , outputs : [ ] , stateMutability : "nonpayable" , type : "function" , } , { inputs : [ ] , name : "rewardPerToken" , outputs : [ { internalType : "uint256" , name : "" , type : "uint256" , } , ] , stateMutability : "view" , type : "function" , } , { inputs : [ ] , name : "rewardPerTokenStored" , outputs : [ { internalType : "uint256" , name : "" , type : "uint256" , } , ] , stateMutability : "view" , type : "function" , } , { inputs : [ ] , name : "rewardRate" , outputs : [ { internalType : "uint256" , name : "" , type : "uint256" , } , ] , stateMutability : "view" , type : "function" , } , { inputs : [ { internalType : "address" , name : "" , type : "address" , } , ] , name : "rewards" , outputs : [ { internalType : "uint256" , name : "" , type : "uint256" , } , ] , stateMutability : "view" , type : "function" , } , { inputs : [ ] , name : "rewardsDistribution" , outputs : [ { internalType : "address" , name : "" , type : "address" , } , ] , stateMutability : "view" , type : "function" , } , { inputs : [ ] , name : "rewardsDuration" , outputs : [ { internalType : "uint256" , name : "" , type : "uint256" , } , ] , stateMutability : "view" , type : "function" , } , { inputs : [ ] , name : "rewardsToken" , outputs : [ { internalType : "contract IERC20" , name : "" , type : "address" , } , ] , stateMutability : "view" , type : "function" , } , { inputs : [ { internalType : "bool" , name : "_paused" , type : "bool" , } , ] , name : "setPaused" , outputs : [ ] , stateMutability : "nonpayable" , type : "function" , } , { inputs : [ { internalType : "address" , name : "_rewardsDistribution" , type : "address" , } , ] , name : "setRewardsDistribution" , outputs : [ ] , stateMutability : "nonpayable" , type : "function" , } , { inputs : [ { internalType : "uint256" , name : "_rewardsDuration" , type : "uint256" , } , ] , name : "setRewardsDuration" , outputs : [ ] , stateMutability : "nonpayable" , type : "function" , } , { inputs : [ { internalType : "uint256" , name : "amount" , type : "uint256" , } , ] , name : "stake" , outputs : [ ] , stateMutability : "nonpayable" , type : "function" , } , { inputs : [ ] , name : "stakingToken" , outputs : [ { internalType : "contract IERC20" , name : "" , type : "address" , } , ] , stateMutability : "view" , type : "function" , } , { inputs : [ ] , name : "startEmission" , outputs : [ { internalType : "uint256" , name : "" , type : "uint256" , } , ] , stateMutability : "view" , type : "function" , } , { inputs : [ ] , name : "totalSupply" , outputs : [ { internalType : "uint256" , name : "" , type : "uint256" , } , ] , stateMutability : "view" , type : "function" , } , { inputs : [ { internalType : "uint256" , name : "timestamp" , type : "uint256" , } , ] , name : "updatePeriodFinish" , outputs : [ ] , stateMutability : "nonpayable" , type : "function" , } , { inputs : [ { internalType : "address" , name : "" , type : "address" , } , ] , name : "userRewardPerTokenPaid" , outputs : [ { internalType : "uint256" , name : "" , type : "uint256" , } , ] , stateMutability : "view" , type : "function" , } , { inputs : [ { internalType : "uint256" , name : "amount" , type : "uint256" , } , ] , name : "withdraw" , outputs : [ ] , stateMutability : "nonpayable" , type : "function" , } , ] ;