Skip to main content

StakingRewards.sol

This contract is used to reward stakers for their staking time.

Methods

_balances(address)

Solidity

function _balances(address) external view returns (uint256)

Parameters

NameTypeDescription
_0addressundefined

Returns

NameTypeDescription
_0uint256undefined

claimReward()

Solidity

function claimReward() external nonpayable

earned(address)

Solidity

function earned(address account) external view returns (uint256)

Parameters

NameTypeDescription
accountaddressundefined

Returns

NameTypeDescription
_0uint256undefined

exit()

Solidity

function exit() external nonpayable

initialize(address,address,uint256,uint256)

Solidity

function initialize(address _stakingToken, address _rewardToken, uint256 _rewardRate, uint256 _stakeEndTime) external nonpayable

Parameters

NameTypeDescription
_stakingTokenaddressundefined
_rewardTokenaddressundefined
_rewardRateuint256undefined
_stakeEndTimeuint256undefined

lastRewarded(address)

Solidity

function lastRewarded(address) external view returns (uint256)

Parameters

NameTypeDescription
_0addressundefined

Returns

NameTypeDescription
_0uint256undefined

owner()

Solidity

function owner() external view returns (address)
Details

Returns the address of the current owner.

Returns

NameTypeDescription
_0addressundefined

paused()

Solidity

function paused() external view returns (bool)
Details

Returns true if the contract is paused, and false otherwise.

Returns

NameTypeDescription
_0boolundefined

renounceOwnership()

Solidity

function renounceOwnership() external nonpayable
Details

Leaves the contract without owner. It will not be possible to call onlyOwner functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.

rewardEndTime()

Solidity

function rewardEndTime() external view returns (uint256)

Returns

NameTypeDescription
_0uint256undefined

rewardRate()

Solidity

function rewardRate() external view returns (uint256)

Returns

NameTypeDescription
_0uint256undefined

rewardToken()

Solidity

function rewardToken() external view returns (contract IERC20Upgradeable)

Returns

NameTypeDescription
_0contract IERC20Upgradeableundefined

rewards(address)

Solidity

function rewards(address) external view returns (uint256)

Parameters

NameTypeDescription
_0addressundefined

Returns

NameTypeDescription
_0uint256undefined

stake(uint256)

Solidity

function stake(uint256 amount) external nonpayable

Parameters

NameTypeDescription
amountuint256undefined

stakingToken()

Solidity

function stakingToken() external view returns (contract IERC20Upgradeable)

Returns

NameTypeDescription
_0contract IERC20Upgradeableundefined

transferOwnership(address)

Solidity

function transferOwnership(address newOwner) external nonpayable
Details

Transfers ownership of the contract to a new account (newOwner). Can only be called by the current owner.

Parameters

NameTypeDescription
newOwneraddressundefined

upgradeTo(address)

Solidity

function upgradeTo(address newImplementation) external nonpayable
Details

Upgrade the implementation of the proxy to newImplementation. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.

Parameters

NameTypeDescription
newImplementationaddressundefined

upgradeToAndCall(address,bytes)

Solidity

function upgradeToAndCall(address newImplementation, bytes data) external payable
Details

Upgrade the implementation of the proxy to newImplementation, and subsequently execute the function call encoded in data. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.

Parameters

NameTypeDescription
newImplementationaddressundefined
databytesundefined

withdraw(uint256)

Solidity

function withdraw(uint256 amount) external nonpayable

Parameters

NameTypeDescription
amountuint256undefined

Events

AdminChanged

Solidity

event AdminChanged(address previousAdmin, address newAdmin)

Parameters

NameTypeDescription
previousAdminaddressundefined
newAdminaddressundefined

BeaconUpgraded

Solidity

event BeaconUpgraded(address indexed beacon)

Parameters

NameTypeDescription
beacon indexedaddressundefined

OwnershipTransferred

Solidity

event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)

Parameters

NameTypeDescription
previousOwner indexedaddressundefined
newOwner indexedaddressundefined

Paused

Solidity

event Paused(address account)

Parameters

NameTypeDescription
accountaddressundefined

RewardPaid

Solidity

event RewardPaid(address indexed user, uint256 reward)

Parameters

NameTypeDescription
user indexedaddressundefined
rewarduint256undefined

Staked

Solidity

event Staked(address indexed user, uint256 amount)

Parameters

NameTypeDescription
user indexedaddressundefined
amountuint256undefined

Unpaused

Solidity

event Unpaused(address account)

Parameters

NameTypeDescription
accountaddressundefined

Upgraded

Solidity

event Upgraded(address indexed implementation)

Parameters

NameTypeDescription
implementation indexedaddressundefined

Withdrawn

Solidity

event Withdrawn(address indexed user, uint256 amount)

Parameters

NameTypeDescription
user indexedaddressundefined
amountuint256undefined