RewarderFactory

Git Source

Inherits: IRewarderFactory, Ownable

Author: Sperax Foundation.

This contract deploys new rewarders and keeps track of them.

State Variables

oracle

address public oracle;

rewarderImplementation

address public rewarderImplementation;

Functions

constructor

Constructor.

constructor(address _oracle) Ownable(msg.sender);

Parameters

NameTypeDescription

_oracle

address

Address of the master price oracle of USDs.

deployRewarder

Function to deploy new rewarder.

function deployRewarder(address _rwdToken) external returns (address rewarder);

Parameters

NameTypeDescription

_rwdToken

address

Address of the reward token for which the rewarder is to be deployed.

Returns

NameTypeDescription

rewarder

address

Rewarder's address.

updateRewarderImplementation

Update rewarder implementation's address

function updateRewarderImplementation(address _newRewarderImplementation) external onlyOwner;

Parameters

NameTypeDescription

_newRewarderImplementation

address

New Rewarder Implementation

updateOracle

Function to update the oracle's address.

function updateOracle(address _newOracle) public onlyOwner;

Parameters

NameTypeDescription

_newOracle

address

Address of the new oracle.

_validateNonZeroAddr

Validate address.

function _validateNonZeroAddr(address _addr) private pure;

Parameters

NameTypeDescription

_addr

address

Address to be validated.