VoterFactories
Description:
A factory contract responsible for deploying new instances of the Voter
contract. It includes owner and factory address controls to restrict who can deploy voters and call certain setup functions.
Constructor
Description:
Initializes the VoterFactory
contract, setting the deployer as the initial owner
. The factory
address (presumably another controlling contract) is not set initially and must be configured later via setFactory
.
createVoter
Description:
Deploys a new Voter
contract instance using the provided parameters. Only callable by the designated factory
address. Stores the address of the newly created Voter
in lastVoter
.
Input Parameters:
_ve
address
The address of the VotingEscrow
contract for the new Voter.
_gauges
address
The address of the GaugeFactory
for the new Voter.
_bribes
address
The address of the BribeFactory
for the new Voter.
_reward_token
address
The address of the base reward token for the new Voter.
Return Value:
address
The address of the newly deployed Voter contract.
_setIncentivesManager
Description:
Allows the designated factory
address to call the setIncentivesManager
function on a specific, already deployed Voter
contract instance.
Input Parameters:
_voter
address
The address of the target Voter
contract.
_incentivesManager
address
The address of the IncentivesManager
to set.
_createGauge
Description:
Allows the designated factory
address to call the createGauge
function on a specific, already deployed Voter
contract instance, passing through the pool token address.
Input Parameters:
_voter
address
The address of the target Voter
contract.
_tokenAddress
address
The address of the pool token for which to create the gauge.
Return Value:
address
The address of the newly created gauge.
setFactory
Description:
Allows the owner
of the VoterFactory
to set or update the factory
address, which is authorized to call deployment and setup functions like createVoter
.
Input Parameters:
_factory
address
The address authorized to act as the factory.
Last updated