VoteEscrowFactory
Description:
A factory contract used to deploy new instances of the VoteEscrow
contract. Includes controls to restrict deployment and certain setup calls to an authorized factory
address, managed by the contract owner
.
Constructor
Description:
Initializes the VoteEscrowFactory
, setting the deployer (msg.sender
) as the initial owner
. The factory
address is not set and needs to be configured via setFactory
.
createVoteEscrow
Description:
Deploys a new VoteEscrow
contract instance. Only callable by the authorized factory
address. Stores the address of the newly deployed contract in lastVoteEscrow
.
Input Parameters:
token_addr
address
The address of the underlying ERC20 token for the new VoteEscrow
.
user_registry
address
The address of the UserRegistry
for the new VoteEscrow
.
Return Value:
address
The address of the newly deployed VoteEscrow contract.
_setVoter
Description:
Allows the authorized factory
address to call the setVoter
function on a specific, already deployed VoteEscrow
contract instance.
Input Parameters:
_voteEscrow
address
The address of the target VoteEscrow
contract.
_voter
address
The address to set as the voter on the target.
_setIncentivesManager
Description:
Allows the authorized factory
address to call the setIncentivesManager
function on a specific, already deployed VoteEscrow
contract instance.
Input Parameters:
_voteEscrow
address
The address of the target VoteEscrow
contract.
_incentivesManager
address
The address of the IncentivesManager
to set on the target.
setFactory
Description:
Allows the owner
of the VoteEscrowFactory
to set or update the factory
address, which is authorized to deploy new VoteEscrow
contracts and call setup functions.
Input Parameters:
_factory
address
The address authorized to act as the factory.
Last updated