PollFactory
A factory contract which deploys Poll contracts. It allows the MACI contract size to stay within the limit set by EIP-170.
InvalidMaxValues
error InvalidMaxValues()
constructor
constructor() public payable
The PollFactory constructor
deploy
function deploy(uint256 _duration, struct Params.MaxValues _maxValues, struct Params.TreeDepths _treeDepths, struct DomainObjs.PubKey _coordinatorPubKey, address _maci, uint256 _emptyBallotRoot) public virtual returns (address pollAddr)
Deploy a new Poll contract and AccQueue contract for messages.
Parameters
| Name | Type | Description |
|---|---|---|
| _duration | uint256 | The duration of the poll |
| _maxValues | struct Params.MaxValues | The max values for the poll |
| _treeDepths | struct Params.TreeDepths | The depths of the merkle trees |
| _coordinatorPubKey | struct DomainObjs.PubKey | The coordinator's public key |
| _maci | address | The MACI contract interface reference |
| _emptyBallotRoot | uint256 | The root of the empty ballot tree |
Return Values
| Name | Type | Description |
|---|---|---|
| pollAddr | address | The deployed Poll contract |