@vocdoni/davinci-contracts
Version:
Smart contracts powering DAVINCI's digital voting protocol
882 lines (881 loc) • 24.6 kB
JavaScript
"use strict";
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
exports.IProcessRegistry__factory = void 0;
const ethers_1 = require("ethers");
const _abi = [
{
inputs: [],
name: "CannotAcceptResult",
type: "error",
},
{
inputs: [],
name: "CensusNotUpdatable",
type: "error",
},
{
inputs: [
{
internalType: "uint8",
name: "limbIndex",
type: "uint8",
},
],
name: "InvalidBlobCommitmentLimb",
type: "error",
},
{
inputs: [],
name: "InvalidBlockNumber",
type: "error",
},
{
inputs: [],
name: "InvalidCensusAddress",
type: "error",
},
{
inputs: [],
name: "InvalidCensusConfig",
type: "error",
},
{
inputs: [],
name: "InvalidCensusOrigin",
type: "error",
},
{
inputs: [],
name: "InvalidCensusRoot",
type: "error",
},
{
inputs: [],
name: "InvalidCensusURI",
type: "error",
},
{
inputs: [],
name: "InvalidDuration",
type: "error",
},
{
inputs: [],
name: "InvalidGroupSize",
type: "error",
},
{
inputs: [],
name: "InvalidMaxCount",
type: "error",
},
{
inputs: [],
name: "InvalidMaxMinValueBounds",
type: "error",
},
{
inputs: [],
name: "InvalidMaxValue",
type: "error",
},
{
inputs: [],
name: "InvalidMaxVoters",
type: "error",
},
{
inputs: [],
name: "InvalidMinTotalCost",
type: "error",
},
{
inputs: [],
name: "InvalidMinValue",
type: "error",
},
{
inputs: [],
name: "InvalidProcessId",
type: "error",
},
{
inputs: [],
name: "InvalidStartTime",
type: "error",
},
{
inputs: [],
name: "InvalidStateRoot",
type: "error",
},
{
inputs: [],
name: "InvalidStatus",
type: "error",
},
{
inputs: [],
name: "InvalidTimeBounds",
type: "error",
},
{
inputs: [],
name: "InvalidUniqueValues",
type: "error",
},
{
inputs: [],
name: "InvalidValueSumBounds",
type: "error",
},
{
inputs: [],
name: "MaxPossibleResultCapExceeded",
type: "error",
},
{
inputs: [],
name: "MaxVotersReached",
type: "error",
},
{
inputs: [],
name: "ProcessAlreadyExists",
type: "error",
},
{
inputs: [],
name: "ProcessNotEnded",
type: "error",
},
{
inputs: [],
name: "ProcessNotFound",
type: "error",
},
{
inputs: [],
name: "ProofInvalid",
type: "error",
},
{
inputs: [],
name: "Unauthorized",
type: "error",
},
{
inputs: [],
name: "UnknownProcessIdPrefix",
type: "error",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "bytes31",
name: "processId",
type: "bytes31",
},
{
indexed: false,
internalType: "bytes32",
name: "censusRoot",
type: "bytes32",
},
{
indexed: false,
internalType: "string",
name: "censusURI",
type: "string",
},
],
name: "CensusUpdated",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "bytes31",
name: "processId",
type: "bytes31",
},
{
indexed: true,
internalType: "address",
name: "creator",
type: "address",
},
],
name: "ProcessCreated",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "bytes31",
name: "processId",
type: "bytes31",
},
{
indexed: false,
internalType: "uint256",
name: "duration",
type: "uint256",
},
],
name: "ProcessDurationChanged",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "bytes31",
name: "processId",
type: "bytes31",
},
{
indexed: false,
internalType: "uint256",
name: "maxVoters",
type: "uint256",
},
],
name: "ProcessMaxVotersChanged",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "bytes31",
name: "processId",
type: "bytes31",
},
{
indexed: true,
internalType: "address",
name: "sender",
type: "address",
},
{
indexed: false,
internalType: "uint256[]",
name: "result",
type: "uint256[]",
},
],
name: "ProcessResultsSet",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "bytes31",
name: "processId",
type: "bytes31",
},
{
indexed: true,
internalType: "address",
name: "sender",
type: "address",
},
{
indexed: false,
internalType: "uint256",
name: "oldStateRoot",
type: "uint256",
},
{
indexed: false,
internalType: "uint256",
name: "newStateRoot",
type: "uint256",
},
{
indexed: false,
internalType: "uint256",
name: "newVotersCount",
type: "uint256",
},
{
indexed: false,
internalType: "uint256",
name: "newOverwrittenVotesCount",
type: "uint256",
},
],
name: "ProcessStateTransitioned",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "bytes31",
name: "processId",
type: "bytes31",
},
{
indexed: false,
internalType: "enum DAVINCITypes.ProcessStatus",
name: "oldStatus",
type: "uint8",
},
{
indexed: false,
internalType: "enum DAVINCITypes.ProcessStatus",
name: "newStatus",
type: "uint8",
},
],
name: "ProcessStatusChanged",
type: "event",
},
{
inputs: [
{
internalType: "address",
name: "organizationId",
type: "address",
},
],
name: "getNextProcessId",
outputs: [
{
internalType: "bytes31",
name: "",
type: "bytes31",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "bytes31",
name: "processId",
type: "bytes31",
},
],
name: "getProcess",
outputs: [
{
components: [
{
internalType: "enum DAVINCITypes.ProcessStatus",
name: "status",
type: "uint8",
},
{
internalType: "address",
name: "organizationId",
type: "address",
},
{
components: [
{
internalType: "uint256",
name: "x",
type: "uint256",
},
{
internalType: "uint256",
name: "y",
type: "uint256",
},
],
internalType: "struct DAVINCITypes.EncryptionKey",
name: "encryptionKey",
type: "tuple",
},
{
internalType: "uint256",
name: "latestStateRoot",
type: "uint256",
},
{
internalType: "uint256[]",
name: "result",
type: "uint256[]",
},
{
internalType: "uint256",
name: "startTime",
type: "uint256",
},
{
internalType: "uint256",
name: "duration",
type: "uint256",
},
{
internalType: "uint256",
name: "maxVoters",
type: "uint256",
},
{
internalType: "uint256",
name: "votersCount",
type: "uint256",
},
{
internalType: "uint256",
name: "overwrittenVotesCount",
type: "uint256",
},
{
internalType: "uint256",
name: "creationBlock",
type: "uint256",
},
{
internalType: "uint256",
name: "batchNumber",
type: "uint256",
},
{
internalType: "string",
name: "metadataURI",
type: "string",
},
{
components: [
{
internalType: "bool",
name: "uniqueValues",
type: "bool",
},
{
internalType: "uint8",
name: "numFields",
type: "uint8",
},
{
internalType: "uint8",
name: "groupSize",
type: "uint8",
},
{
internalType: "uint8",
name: "costExponent",
type: "uint8",
},
{
internalType: "uint256",
name: "maxValue",
type: "uint256",
},
{
internalType: "uint256",
name: "minValue",
type: "uint256",
},
{
internalType: "uint256",
name: "maxValueSum",
type: "uint256",
},
{
internalType: "uint256",
name: "minValueSum",
type: "uint256",
},
],
internalType: "struct DAVINCITypes.BallotMode",
name: "ballotMode",
type: "tuple",
},
{
components: [
{
internalType: "enum DAVINCITypes.CensusOrigin",
name: "censusOrigin",
type: "uint8",
},
{
internalType: "bytes32",
name: "censusRoot",
type: "bytes32",
},
{
internalType: "address",
name: "contractAddress",
type: "address",
},
{
internalType: "string",
name: "censusURI",
type: "string",
},
{
internalType: "bool",
name: "onchainAllowAnyValidRoot",
type: "bool",
},
],
internalType: "struct DAVINCITypes.Census",
name: "census",
type: "tuple",
},
],
internalType: "struct DAVINCITypes.Process",
name: "process",
type: "tuple",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "bytes31",
name: "processId",
type: "bytes31",
},
],
name: "getProcessEndTime",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "getRVerifierVKeyHash",
outputs: [
{
internalType: "bytes32",
name: "",
type: "bytes32",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "getSTVerifierVKeyHash",
outputs: [
{
internalType: "bytes32",
name: "",
type: "bytes32",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "enum DAVINCITypes.ProcessStatus",
name: "status",
type: "uint8",
},
{
internalType: "uint256",
name: "startTime",
type: "uint256",
},
{
internalType: "uint256",
name: "duration",
type: "uint256",
},
{
internalType: "uint256",
name: "maxVoters",
type: "uint256",
},
{
components: [
{
internalType: "bool",
name: "uniqueValues",
type: "bool",
},
{
internalType: "uint8",
name: "numFields",
type: "uint8",
},
{
internalType: "uint8",
name: "groupSize",
type: "uint8",
},
{
internalType: "uint8",
name: "costExponent",
type: "uint8",
},
{
internalType: "uint256",
name: "maxValue",
type: "uint256",
},
{
internalType: "uint256",
name: "minValue",
type: "uint256",
},
{
internalType: "uint256",
name: "maxValueSum",
type: "uint256",
},
{
internalType: "uint256",
name: "minValueSum",
type: "uint256",
},
],
internalType: "struct DAVINCITypes.BallotMode",
name: "ballotMode",
type: "tuple",
},
{
components: [
{
internalType: "enum DAVINCITypes.CensusOrigin",
name: "censusOrigin",
type: "uint8",
},
{
internalType: "bytes32",
name: "censusRoot",
type: "bytes32",
},
{
internalType: "address",
name: "contractAddress",
type: "address",
},
{
internalType: "string",
name: "censusURI",
type: "string",
},
{
internalType: "bool",
name: "onchainAllowAnyValidRoot",
type: "bool",
},
],
internalType: "struct DAVINCITypes.Census",
name: "census",
type: "tuple",
},
{
internalType: "string",
name: "metadata",
type: "string",
},
{
components: [
{
internalType: "uint256",
name: "x",
type: "uint256",
},
{
internalType: "uint256",
name: "y",
type: "uint256",
},
],
internalType: "struct DAVINCITypes.EncryptionKey",
name: "encryptionKey",
type: "tuple",
},
],
name: "newProcess",
outputs: [
{
internalType: "bytes31",
name: "",
type: "bytes31",
},
],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "bytes31",
name: "processId",
type: "bytes31",
},
{
components: [
{
internalType: "enum DAVINCITypes.CensusOrigin",
name: "censusOrigin",
type: "uint8",
},
{
internalType: "bytes32",
name: "censusRoot",
type: "bytes32",
},
{
internalType: "address",
name: "contractAddress",
type: "address",
},
{
internalType: "string",
name: "censusURI",
type: "string",
},
{
internalType: "bool",
name: "onchainAllowAnyValidRoot",
type: "bool",
},
],
internalType: "struct DAVINCITypes.Census",
name: "census",
type: "tuple",
},
],
name: "setProcessCensus",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "bytes31",
name: "processId",
type: "bytes31",
},
{
internalType: "uint256",
name: "duration",
type: "uint256",
},
],
name: "setProcessDuration",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "bytes31",
name: "processId",
type: "bytes31",
},
{
internalType: "uint256",
name: "maxVoters",
type: "uint256",
},
],
name: "setProcessMaxVoters",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "bytes31",
name: "processId",
type: "bytes31",
},
{
internalType: "bytes",
name: "proof",
type: "bytes",
},
{
internalType: "bytes",
name: "input",
type: "bytes",
},
],
name: "setProcessResults",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "bytes31",
name: "processId",
type: "bytes31",
},
{
internalType: "enum DAVINCITypes.ProcessStatus",
name: "newStatus",
type: "uint8",
},
],
name: "setProcessStatus",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "bytes31",
name: "processId",
type: "bytes31",
},
{
internalType: "bytes",
name: "proof",
type: "bytes",
},
{
internalType: "bytes",
name: "input",
type: "bytes",
},
],
name: "submitStateTransition",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
];
class IProcessRegistry__factory {
static createInterface() {
return new ethers_1.Interface(_abi);
}
static connect(address, runner) {
return new ethers_1.Contract(address, _abi, runner);
}
}
exports.IProcessRegistry__factory = IProcessRegistry__factory;
IProcessRegistry__factory.abi = _abi;