"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Poll__factory = void 0;
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
const ethers_1 = require("ethers");
const _abi = [
    {
        inputs: [],
        name: "AlreadyInitialized",
        type: "error",
    },
    {
        inputs: [],
        name: "BatchHashesAlreadyPadded",
        type: "error",
    },
    {
        inputs: [],
        name: "DefaultZeroBadIndex",
        type: "error",
    },
    {
        inputs: [],
        name: "DepthTooLarge",
        type: "error",
    },
    {
        inputs: [],
        name: "InvalidBatchLength",
        type: "error",
    },
    {
        inputs: [],
        name: "InvalidMessage",
        type: "error",
    },
    {
        inputs: [],
        name: "InvalidPollProof",
        type: "error",
    },
    {
        inputs: [],
        name: "InvalidPublicKey",
        type: "error",
    },
    {
        inputs: [],
        name: "NotRelayer",
        type: "error",
    },
    {
        inputs: [],
        name: "NumberOfLeavesCannotBeZero",
        type: "error",
    },
    {
        inputs: [],
        name: "PollAlreadyInit",
        type: "error",
    },
    {
        inputs: [],
        name: "StateAlreadyMerged",
        type: "error",
    },
    {
        inputs: [],
        name: "StateLeafNotFound",
        type: "error",
    },
    {
        inputs: [],
        name: "TooManyMessages",
        type: "error",
    },
    {
        inputs: [],
        name: "TooManySignups",
        type: "error",
    },
    {
        inputs: [],
        name: "TooManyVoteOptions",
        type: "error",
    },
    {
        inputs: [],
        name: "UserAlreadyJoined",
        type: "error",
    },
    {
        inputs: [],
        name: "VotingPeriodNotOver",
        type: "error",
    },
    {
        inputs: [],
        name: "VotingPeriodNotStarted",
        type: "error",
    },
    {
        inputs: [],
        name: "VotingPeriodOver",
        type: "error",
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: true,
                internalType: "uint256",
                name: "_chainHash",
                type: "uint256",
            },
        ],
        name: "ChainHashUpdated",
        type: "event",
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: true,
                internalType: "bytes32",
                name: "_ipfsHash",
                type: "bytes32",
            },
        ],
        name: "IpfsHashAdded",
        type: "event",
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: true,
                internalType: "uint256",
                name: "_stateRoot",
                type: "uint256",
            },
            {
                indexed: true,
                internalType: "uint256",
                name: "_totalSignups",
                type: "uint256",
            },
        ],
        name: "MergeState",
        type: "event",
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: true,
                internalType: "uint256",
                name: "_pollPublicKeyX",
                type: "uint256",
            },
            {
                indexed: true,
                internalType: "uint256",
                name: "_pollPublicKeyY",
                type: "uint256",
            },
            {
                indexed: false,
                internalType: "uint256",
                name: "_voiceCreditBalance",
                type: "uint256",
            },
            {
                indexed: false,
                internalType: "uint256",
                name: "_nullifier",
                type: "uint256",
            },
            {
                indexed: false,
                internalType: "uint256",
                name: "_pollStateIndex",
                type: "uint256",
            },
        ],
        name: "PollJoined",
        type: "event",
    },
    {
        anonymous: false,
        inputs: [
            {
                components: [
                    {
                        internalType: "uint256[10]",
                        name: "data",
                        type: "uint256[10]",
                    },
                ],
                indexed: false,
                internalType: "struct DomainObjs.Message",
                name: "_message",
                type: "tuple",
            },
            {
                components: [
                    {
                        internalType: "uint256",
                        name: "x",
                        type: "uint256",
                    },
                    {
                        internalType: "uint256",
                        name: "y",
                        type: "uint256",
                    },
                ],
                indexed: false,
                internalType: "struct DomainObjs.PublicKey",
                name: "_encryptionPublicKey",
                type: "tuple",
            },
        ],
        name: "PublishMessage",
        type: "event",
    },
    {
        inputs: [],
        name: "MESSAGE_DATA_LENGTH",
        outputs: [
            {
                internalType: "uint8",
                name: "",
                type: "uint8",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "actualStateTreeDepth",
        outputs: [
            {
                internalType: "uint8",
                name: "",
                type: "uint8",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "uint256",
                name: "",
                type: "uint256",
            },
        ],
        name: "batchHashes",
        outputs: [
            {
                internalType: "uint256",
                name: "",
                type: "uint256",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "chainHash",
        outputs: [
            {
                internalType: "uint256",
                name: "",
                type: "uint256",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "coordinatorPublicKey",
        outputs: [
            {
                internalType: "uint256",
                name: "x",
                type: "uint256",
            },
            {
                internalType: "uint256",
                name: "y",
                type: "uint256",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "coordinatorPublicKeyHash",
        outputs: [
            {
                internalType: "uint256",
                name: "",
                type: "uint256",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "currentSbCommitment",
        outputs: [
            {
                internalType: "uint256",
                name: "",
                type: "uint256",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "emptyBallotRoot",
        outputs: [
            {
                internalType: "uint256",
                name: "",
                type: "uint256",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "endDate",
        outputs: [
            {
                internalType: "uint256",
                name: "",
                type: "uint256",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "extContracts",
        outputs: [
            {
                internalType: "contract IMACI",
                name: "maci",
                type: "address",
            },
            {
                internalType: "contract IVerifier",
                name: "verifier",
                type: "address",
            },
            {
                internalType: "contract IVerifyingKeysRegistry",
                name: "verifyingKeysRegistry",
                type: "address",
            },
            {
                internalType: "contract IBasePolicy",
                name: "policy",
                type: "address",
            },
            {
                internalType: "contract IInitialVoiceCreditProxy",
                name: "initialVoiceCreditProxy",
                type: "address",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "getAppendedBytes",
        outputs: [
            {
                internalType: "bytes",
                name: "appendedBytes",
                type: "bytes",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "getBatchHashes",
        outputs: [
            {
                internalType: "uint256[]",
                name: "",
                type: "uint256[]",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "getMaciContract",
        outputs: [
            {
                internalType: "contract IMACI",
                name: "maci",
                type: "address",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "uint256",
                name: "_index",
                type: "uint256",
            },
        ],
        name: "getPublicJoinedCircuitInputs",
        outputs: [
            {
                internalType: "uint256[]",
                name: "publicInputs",
                type: "uint256[]",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "uint256",
                name: "_nullifier",
                type: "uint256",
            },
            {
                internalType: "uint256",
                name: "_index",
                type: "uint256",
            },
            {
                components: [
                    {
                        internalType: "uint256",
                        name: "x",
                        type: "uint256",
                    },
                    {
                        internalType: "uint256",
                        name: "y",
                        type: "uint256",
                    },
                ],
                internalType: "struct DomainObjs.PublicKey",
                name: "_publicKey",
                type: "tuple",
            },
        ],
        name: "getPublicJoiningCircuitInputs",
        outputs: [
            {
                internalType: "uint256[]",
                name: "publicInputs",
                type: "uint256[]",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "getStartAndEndDate",
        outputs: [
            {
                internalType: "uint256",
                name: "pollStartDate",
                type: "uint256",
            },
            {
                internalType: "uint256",
                name: "pollEndDate",
                type: "uint256",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "uint256",
                name: "element",
                type: "uint256",
            },
        ],
        name: "getStateIndex",
        outputs: [
            {
                internalType: "uint40",
                name: "",
                type: "uint40",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "uint256[2]",
                name: "array",
                type: "uint256[2]",
            },
        ],
        name: "hash2",
        outputs: [
            {
                internalType: "uint256",
                name: "result",
                type: "uint256",
            },
        ],
        stateMutability: "pure",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "uint256[3]",
                name: "array",
                type: "uint256[3]",
            },
        ],
        name: "hash3",
        outputs: [
            {
                internalType: "uint256",
                name: "result",
                type: "uint256",
            },
        ],
        stateMutability: "pure",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "uint256[4]",
                name: "array",
                type: "uint256[4]",
            },
        ],
        name: "hash4",
        outputs: [
            {
                internalType: "uint256",
                name: "result",
                type: "uint256",
            },
        ],
        stateMutability: "pure",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "uint256[5]",
                name: "array",
                type: "uint256[5]",
            },
        ],
        name: "hash5",
        outputs: [
            {
                internalType: "uint256",
                name: "result",
                type: "uint256",
            },
        ],
        stateMutability: "pure",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "uint256",
                name: "left",
                type: "uint256",
            },
            {
                internalType: "uint256",
                name: "right",
                type: "uint256",
            },
        ],
        name: "hashLeftRight",
        outputs: [
            {
                internalType: "uint256",
                name: "result",
                type: "uint256",
            },
        ],
        stateMutability: "pure",
        type: "function",
    },
    {
        inputs: [
            {
                components: [
                    {
                        internalType: "uint256[10]",
                        name: "data",
                        type: "uint256[10]",
                    },
                ],
                internalType: "struct DomainObjs.Message",
                name: "_message",
                type: "tuple",
            },
            {
                components: [
                    {
                        internalType: "uint256",
                        name: "x",
                        type: "uint256",
                    },
                    {
                        internalType: "uint256",
                        name: "y",
                        type: "uint256",
                    },
                ],
                internalType: "struct DomainObjs.PublicKey",
                name: "_encryptionPublicKey",
                type: "tuple",
            },
        ],
        name: "hashMessageAndPublicKey",
        outputs: [
            {
                internalType: "uint256",
                name: "msgHash",
                type: "uint256",
            },
        ],
        stateMutability: "pure",
        type: "function",
    },
    {
        inputs: [
            {
                components: [
                    {
                        components: [
                            {
                                internalType: "uint256",
                                name: "x",
                                type: "uint256",
                            },
                            {
                                internalType: "uint256",
                                name: "y",
                                type: "uint256",
                            },
                        ],
                        internalType: "struct DomainObjs.PublicKey",
                        name: "publicKey",
                        type: "tuple",
                    },
                    {
                        internalType: "uint256",
                        name: "voiceCreditBalance",
                        type: "uint256",
                    },
                ],
                internalType: "struct DomainObjs.StateLeaf",
                name: "_stateLeaf",
                type: "tuple",
            },
        ],
        name: "hashStateLeaf",
        outputs: [
            {
                internalType: "uint256",
                name: "ciphertext",
                type: "uint256",
            },
        ],
        stateMutability: "pure",
        type: "function",
    },
    {
        inputs: [],
        name: "initialize",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function",
    },
    {
        inputs: [],
        name: "initialized",
        outputs: [
            {
                internalType: "bool",
                name: "",
                type: "bool",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "uint256",
                name: "",
                type: "uint256",
            },
        ],
        name: "ipfsHashes",
        outputs: [
            {
                internalType: "bytes32",
                name: "",
                type: "bytes32",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "isBatchHashesPadded",
        outputs: [
            {
                internalType: "bool",
                name: "",
                type: "bool",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "uint256",
                name: "_nullifier",
                type: "uint256",
            },
            {
                components: [
                    {
                        internalType: "uint256",
                        name: "x",
                        type: "uint256",
                    },
                    {
                        internalType: "uint256",
                        name: "y",
                        type: "uint256",
                    },
                ],
                internalType: "struct DomainObjs.PublicKey",
                name: "_publicKey",
                type: "tuple",
            },
            {
                internalType: "uint256",
                name: "_stateRootIndex",
                type: "uint256",
            },
            {
                internalType: "uint256[8]",
                name: "_proof",
                type: "uint256[8]",
            },
            {
                internalType: "bytes",
                name: "_signUpPolicyData",
                type: "bytes",
            },
            {
                internalType: "bytes",
                name: "_initialVoiceCreditProxyData",
                type: "bytes",
            },
        ],
        name: "joinPoll",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function",
    },
    {
        inputs: [],
        name: "maxSignups",
        outputs: [
            {
                internalType: "uint256",
                name: "",
                type: "uint256",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "mergeState",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function",
    },
    {
        inputs: [],
        name: "mergedStateRoot",
        outputs: [
            {
                internalType: "uint256",
                name: "",
                type: "uint256",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "messageBatchSize",
        outputs: [
            {
                internalType: "uint8",
                name: "",
                type: "uint8",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "numMessages",
        outputs: [
            {
                internalType: "uint256",
                name: "",
                type: "uint256",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "uint256[2]",
                name: "dataToPad",
                type: "uint256[2]",
            },
        ],
        name: "padAndHashMessage",
        outputs: [
            {
                components: [
                    {
                        internalType: "uint256[10]",
                        name: "data",
                        type: "uint256[10]",
                    },
                ],
                internalType: "struct DomainObjs.Message",
                name: "message",
                type: "tuple",
            },
            {
                components: [
                    {
                        internalType: "uint256",
                        name: "x",
                        type: "uint256",
                    },
                    {
                        internalType: "uint256",
                        name: "y",
                        type: "uint256",
                    },
                ],
                internalType: "struct DomainObjs.PublicKey",
                name: "padKey",
                type: "tuple",
            },
            {
                internalType: "uint256",
                name: "msgHash",
                type: "uint256",
            },
        ],
        stateMutability: "pure",
        type: "function",
    },
    {
        inputs: [],
        name: "padLastBatch",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function",
    },
    {
        inputs: [],
        name: "pollId",
        outputs: [
            {
                internalType: "uint256",
                name: "",
                type: "uint256",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "uint256",
                name: "",
                type: "uint256",
            },
        ],
        name: "pollNullifiers",
        outputs: [
            {
                internalType: "bool",
                name: "",
                type: "bool",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "uint256",
                name: "",
                type: "uint256",
            },
        ],
        name: "pollStateRootsOnJoin",
        outputs: [
            {
                internalType: "uint256",
                name: "",
                type: "uint256",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "pollStateTree",
        outputs: [
            {
                internalType: "uint40",
                name: "maxIndex",
                type: "uint40",
            },
            {
                internalType: "uint40",
                name: "numberOfLeaves",
                type: "uint40",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                components: [
                    {
                        internalType: "uint256[10]",
                        name: "data",
                        type: "uint256[10]",
                    },
                ],
                internalType: "struct DomainObjs.Message",
                name: "_message",
                type: "tuple",
            },
            {
                components: [
                    {
                        internalType: "uint256",
                        name: "x",
                        type: "uint256",
                    },
                    {
                        internalType: "uint256",
                        name: "y",
                        type: "uint256",
                    },
                ],
                internalType: "struct DomainObjs.PublicKey",
                name: "_encryptionPublicKey",
                type: "tuple",
            },
        ],
        name: "publishMessage",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function",
    },
    {
        inputs: [
            {
                components: [
                    {
                        internalType: "uint256[10]",
                        name: "data",
                        type: "uint256[10]",
                    },
                ],
                internalType: "struct DomainObjs.Message[]",
                name: "_messages",
                type: "tuple[]",
            },
            {
                components: [
                    {
                        internalType: "uint256",
                        name: "x",
                        type: "uint256",
                    },
                    {
                        internalType: "uint256",
                        name: "y",
                        type: "uint256",
                    },
                ],
                internalType: "struct DomainObjs.PublicKey[]",
                name: "_encryptionPublicKeys",
                type: "tuple[]",
            },
        ],
        name: "publishMessageBatch",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "uint256[]",
                name: "_messageHashes",
                type: "uint256[]",
            },
            {
                internalType: "bytes32",
                name: "_ipfsHash",
                type: "bytes32",
            },
        ],
        name: "relayMessagesBatch",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "address",
                name: "",
                type: "address",
            },
        ],
        name: "relayers",
        outputs: [
            {
                internalType: "bool",
                name: "",
                type: "bool",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "uint256[]",
                name: "array",
                type: "uint256[]",
            },
        ],
        name: "sha256Hash",
        outputs: [
            {
                internalType: "uint256",
                name: "result",
                type: "uint256",
            },
        ],
        stateMutability: "pure",
        type: "function",
    },
    {
        inputs: [],
        name: "startDate",
        outputs: [
            {
                internalType: "uint256",
                name: "",
                type: "uint256",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "stateMerged",
        outputs: [
            {
                internalType: "bool",
                name: "",
                type: "bool",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "totalSignups",
        outputs: [
            {
                internalType: "uint256",
                name: "signups",
                type: "uint256",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "totalSignupsAndMessages",
        outputs: [
            {
                internalType: "uint256",
                name: "numSUps",
                type: "uint256",
            },
            {
                internalType: "uint256",
                name: "numMsgs",
                type: "uint256",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "treeDepths",
        outputs: [
            {
                internalType: "uint8",
                name: "tallyProcessingStateTreeDepth",
                type: "uint8",
            },
            {
                internalType: "uint8",
                name: "voteOptionTreeDepth",
                type: "uint8",
            },
            {
                internalType: "uint8",
                name: "stateTreeDepth",
                type: "uint8",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "uint256",
                name: "_index",
                type: "uint256",
            },
            {
                internalType: "uint256[8]",
                name: "_proof",
                type: "uint256[8]",
            },
        ],
        name: "verifyJoinedPollProof",
        outputs: [
            {
                internalType: "bool",
                name: "isValid",
                type: "bool",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "uint256",
                name: "_nullifier",
                type: "uint256",
            },
            {
                internalType: "uint256",
                name: "_index",
                type: "uint256",
            },
            {
                components: [
                    {
                        internalType: "uint256",
                        name: "x",
                        type: "uint256",
                    },
                    {
                        internalType: "uint256",
                        name: "y",
                        type: "uint256",
                    },
                ],
                internalType: "struct DomainObjs.PublicKey",
                name: "_publicKey",
                type: "tuple",
            },
            {
                internalType: "uint256[8]",
                name: "_proof",
                type: "uint256[8]",
            },
        ],
        name: "verifyJoiningPollProof",
        outputs: [
            {
                internalType: "bool",
                name: "isValid",
                type: "bool",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "voteOptions",
        outputs: [
            {
                internalType: "uint256",
                name: "",
                type: "uint256",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
];
const _bytecode = " $ce9c2c925f157047e54fa833ec4e61409f$__9063248f667790610e24908590600401613730565b602060405180830381865af4158015610e41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e659190613761565b92915050565b60185460009064ffffffffff16815b8164ffffffffff168164ffffffffff1611610ec65764ffffffffff8116600090815260196020526040902054849003610eb4579392505050565b80610ebe8161377a565b915050610e7a565b50604051631bfab01360e31b815260040160405180910390fd5b6000600080516020613c57833981519152600283604051602001610f049190613798565b60408051601f1981840301815290829052610f1e916137c3565b602060405180830381855afa158015610f3b573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190610f5e9190613761565b610e6591906137f5565b6000610f726129dc565b83815260208101839052610f8581611002565b949350505050565b828114610fad5760405163ca3487f760e01b815260040160405180910390fd5b8260005b81811015610ffa57610ff2868683818110610fce57610fce613340565b90506101400201858584818110610fe757610fe7613340565b9050604002016109d8565b600101610fb1565b505050505050565b6040516314d2f97b60e11b815260009073__$6574937f64fc1d7710ec0e28b7a36713bb$__906329a5f2f690610e24908590600401613817565b601e818154811061104c57600080fd5b600091825260209091200154905081565b60006110676129be565b825151815282516020908101518183015283015160408201526110898161118d565b9392505050565b611098611882565b565b6015818154811061104c57600080fd5b6007544210156110cd57604051630931513d60e11b815260040160405180910390fd5b60175460ff16611098576017805460ff19166001179055600f54600b546110f79160ff16906137f5565b1561109857601654601580546001810182556000919091527f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec4750155565b604051630926f44b60e31b815260009073__$20527677031d76601747626a9845039fe4$__90634937a25890610e2490859060040161383f565b601a818154811061104c57600080fd5b6060611188611c2b565b905090565b6040516304b98e1d60e31b815260009073__$dc01a9744591ab014bc46a3b7671cdaefb$ $6574937f64fc1d7710ec0e28b7a36713bb$ $6574937f64fc1d7710ec0e28b7a36713bb$__6329a5f2f66040518060400160405280868560ff168151811061272d5761272d613340565b6020026020010151815260200161274385611f6e565b8152506040518263ffffffff1660e01b81526004016127629190613817565b602060405180830381865af415801561277f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127a39190613761565b836127af836001613c17565b60ff16815181106127c2576127c2613340565b60200260200101818152505061298d565b60006127e0826001613c17565b60ff168664ffffffffff16901c64ffffffffff16905060018364ffffffffff16901c64ffffffffff168111156128855760008760010160006128398560016128289190613c17565b60018864ffffffffff16901c611f49565b64ffffffffff16815260200190815260200160002054905080858460016128609190613c17565b60ff168151811061287357612873613340565b6020026020010181815250505061298b565b600087600101600061289e85600188611cbf91906138b3565b64ffffffffff16815260200190815260200160002054905073__$6574937f64fc1d7710ec0e28b7a36713bb$ ";
const isSuperArgs = (xs) => {
    return (typeof xs[0] === "string" ||
        Array.isArray(xs[0]) ||
        "_isInterface" in xs[0]);
};
class Poll__factory extends ethers_1.ContractFactory {
    constructor(...args) {
        if (isSuperArgs(args)) {
            super(...args);
        }
        else {
            const [linkLibraryAddresses, signer] = args;
            super(_abi, Poll__factory.linkBytecode(linkLibraryAddresses), signer);
        }
    }
    static linkBytecode(linkLibraryAddresses) {
        let linkedBytecode = _bytecode;
        linkedBytecode = linkedBytecode.replace(new RegExp("__\\$ce9c2c925f157047e54fa833ec4e61409f\\$__", "g"), linkLibraryAddresses["contracts/crypto/PoseidonT5.sol:PoseidonT5"]
            .replace(/^0x/, "")
            .toLowerCase());
        linkedBytecode = linkedBytecode.replace(new RegExp("__\\$6574937f64fc1d7710ec0e28b7a36713bb\\$__", "g"), linkLibraryAddresses["contracts/crypto/PoseidonT3.sol:PoseidonT3"]
            .replace(/^0x/, "")
            .toLowerCase());
        linkedBytecode = linkedBytecode.replace(new RegExp("__\\$20527677031d76601747626a9845039fe4\\$__", "g"), linkLibraryAddresses["contracts/crypto/PoseidonT6.sol:PoseidonT6"]
            .replace(/^0x/, "")
            .toLowerCase());
        linkedBytecode = linkedBytecode.replace(new RegExp("__\\$dc01a9744591ab014bc46a3b7671cdaefb\\$__", "g"), linkLibraryAddresses["contracts/crypto/PoseidonT4.sol:PoseidonT4"]
            .replace(/^0x/, "")
            .toLowerCase());
        return linkedBytecode;
    }
    getDeployTransaction(overrides) {
        return super.getDeployTransaction(overrides || {});
    }
    deploy(overrides) {
        return super.deploy(overrides || {});
    }
    connect(runner) {
        return super.connect(runner);
    }
    static createInterface() {
        return new ethers_1.Interface(_abi);
    }
    static connect(address, runner) {
        return new ethers_1.Contract(address, _abi, runner);
    }
}
exports.Poll__factory = Poll__factory;
Poll__factory.bytecode = _bytecode;
Poll__factory.abi = _abi;
//# sourceMappingURL=Poll__factory.js.map