Skip to main content
Version: v2.0_alpha

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) public virtual returns (address pollAddr)

Deploy a new Poll contract and AccQueue contract for messages.

Parameters

NameTypeDescription
_durationuint256The duration of the poll
_maxValuesstruct Params.MaxValuesThe max values for the poll
_treeDepthsstruct Params.TreeDepthsThe depths of the merkle trees
_coordinatorPubKeystruct DomainObjs.PubKeyThe coordinator's public key
_maciaddressThe MACI contract interface reference

Return Values

NameTypeDescription
pollAddraddressThe deployed Poll contract