import { Contract, ContractFactory, Interface } from "ethers";
const _abi = [
    {
        "inputs": [
            {
                "internalType": "uint256",
                "name": "size",
                "type": "uint256"
            },
            {
                "internalType": "uint256",
                "name": "minimum",
                "type": "uint256"
            }
        ],
        "name": "BelowMinCommitteeSize",
        "type": "error"
    },
    {
        "inputs": [
            {
                "internalType": "uint256",
                "name": "threshold",
                "type": "uint256"
            },
            {
                "internalType": "uint256",
                "name": "minimum",
                "type": "uint256"
            }
        ],
        "name": "BelowMinThreshold",
        "type": "error"
    },
    {
        "inputs": [
            {
                "internalType": "uint256",
                "name": "value",
                "type": "uint256"
            }
        ],
        "name": "BpsExceedsMax",
        "type": "error"
    },
    {
        "inputs": [
            {
                "internalType": "uint256",
                "name": "e3Id",
                "type": "uint256"
            }
        ],
        "name": "CiphertextOutputAlreadyPublished",
        "type": "error"
    },
    {
        "inputs": [
            {
                "internalType": "uint256",
                "name": "e3Id",
                "type": "uint256"
            },
            {
                "internalType": "uint256",
                "name": "expiration",
                "type": "uint256"
            }
        ],
        "name": "CommitteeDutiesCompleted",
        "type": "error"
    },
    {
        "inputs": [
            {
                "internalType": "enum IInterfold.CommitteeSize",
                "name": "committeeSize",
                "type": "uint8"
            }
        ],
        "name": "CommitteeSizeNotConfigured",
        "type": "error"
    },
    {
        "inputs": [
            {
                "internalType": "enum IInterfold.CommitteeSize",
                "name": "committeeSize",
                "type": "uint8"
            }
        ],
        "name": "CommitteeSizeTooSmall",
        "type": "error"
    },
    {
        "inputs": [
            {
                "internalType": "uint256",
                "name": "e3Id",
                "type": "uint256"
            }
        ],
        "name": "E3AlreadyComplete",
        "type": "error"
    },
    {
        "inputs": [
            {
                "internalType": "uint256",
                "name": "e3Id",
                "type": "uint256"
            }
        ],
        "name": "E3AlreadyFailed",
        "type": "error"
    },
    {
        "inputs": [
            {
                "internalType": "uint256",
                "name": "e3Id",
                "type": "uint256"
            },
            {
                "internalType": "uint256",
                "name": "inputDeadline",
                "type": "uint256"
            }
        ],
        "name": "InputDeadlineNotReached",
        "type": "error"
    },
    {
        "inputs": [
            {
                "internalType": "uint256",
                "name": "duration",
                "type": "uint256"
            }
        ],
        "name": "InvalidDuration",
        "type": "error"
    },
    {
        "inputs": [
            {
                "internalType": "uint256",
                "name": "end",
                "type": "uint256"
            }
        ],
        "name": "InvalidInputDeadlineEnd",
        "type": "error"
    },
    {
        "inputs": [
            {
                "internalType": "uint256",
                "name": "start",
                "type": "uint256"
            }
        ],
        "name": "InvalidInputDeadlineStart",
        "type": "error"
    },
    {
        "inputs": [
            {
                "internalType": "uint256",
                "name": "e3Id",
                "type": "uint256"
            },
            {
                "internalType": "enum IInterfold.E3Stage",
                "name": "expected",
                "type": "uint8"
            },
            {
                "internalType": "enum IInterfold.E3Stage",
                "name": "actual",
                "type": "uint8"
            }
        ],
        "name": "InvalidStage",
        "type": "error"
    },
    {
        "inputs": [],
        "name": "InvalidThresholdValues",
        "type": "error"
    },
    {
        "inputs": [],
        "name": "InvalidTimeoutWindow",
        "type": "error"
    },
    {
        "inputs": [],
        "name": "MinSizeBelowMinThreshold",
        "type": "error"
    },
    {
        "inputs": [
            {
                "internalType": "uint256",
                "name": "value",
                "type": "uint256"
            }
        ],
        "name": "PaymentRequired",
        "type": "error"
    },
    {
        "inputs": [
            {
                "internalType": "uint256",
                "name": "threshold",
                "type": "uint256"
            }
        ],
        "name": "ThresholdTooSmall",
        "type": "error"
    },
    {
        "inputs": [],
        "name": "TreasuryRequired",
        "type": "error"
    },
    {
        "inputs": [
            {
                "internalType": "uint256",
                "name": "value",
                "type": "uint256"
            }
        ],
        "name": "UtilizationBpsExceedsMax",
        "type": "error"
    },
    {
        "inputs": [
            {
                "internalType": "uint256",
                "name": "cnAmount",
                "type": "uint256"
            },
            {
                "internalType": "uint256",
                "name": "n",
                "type": "uint256"
            },
            {
                "internalType": "uint256",
                "name": "e3Id",
                "type": "uint256"
            }
        ],
        "name": "computeNodeAmounts",
        "outputs": [
            {
                "internalType": "uint256[]",
                "name": "amounts",
                "type": "uint256[]"
            }
        ],
        "stateMutability": "pure",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "defaultPricingConfig",
        "outputs": [
            {
                "components": [
                    {
                        "internalType": "uint256",
                        "name": "keyGenFixedPerNode",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "keyGenPerEncryptionProof",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "coordinationPerPair",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "availabilityPerNodePerSec",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "decryptionPerNode",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "publicationBase",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "verificationPerProof",
                        "type": "uint256"
                    },
                    {
                        "internalType": "address",
                        "name": "protocolTreasury",
                        "type": "address"
                    },
                    {
                        "internalType": "uint16",
                        "name": "marginBps",
                        "type": "uint16"
                    },
                    {
                        "internalType": "uint16",
                        "name": "protocolShareBps",
                        "type": "uint16"
                    },
                    {
                        "internalType": "uint16",
                        "name": "dkgUtilizationBps",
                        "type": "uint16"
                    },
                    {
                        "internalType": "uint16",
                        "name": "computeUtilizationBps",
                        "type": "uint16"
                    },
                    {
                        "internalType": "uint16",
                        "name": "decryptUtilizationBps",
                        "type": "uint16"
                    },
                    {
                        "internalType": "uint32",
                        "name": "minCommitteeSize",
                        "type": "uint32"
                    },
                    {
                        "internalType": "uint32",
                        "name": "minThreshold",
                        "type": "uint32"
                    }
                ],
                "internalType": "struct IInterfold.PricingConfig",
                "name": "cfg",
                "type": "tuple"
            }
        ],
        "stateMutability": "pure",
        "type": "function"
    },
    {
        "inputs": [
            {
                "components": [
                    {
                        "internalType": "uint256",
                        "name": "keyGenFixedPerNode",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "keyGenPerEncryptionProof",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "coordinationPerPair",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "availabilityPerNodePerSec",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "decryptionPerNode",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "publicationBase",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "verificationPerProof",
                        "type": "uint256"
                    },
                    {
                        "internalType": "address",
                        "name": "protocolTreasury",
                        "type": "address"
                    },
                    {
                        "internalType": "uint16",
                        "name": "marginBps",
                        "type": "uint16"
                    },
                    {
                        "internalType": "uint16",
                        "name": "protocolShareBps",
                        "type": "uint16"
                    },
                    {
                        "internalType": "uint16",
                        "name": "dkgUtilizationBps",
                        "type": "uint16"
                    },
                    {
                        "internalType": "uint16",
                        "name": "computeUtilizationBps",
                        "type": "uint16"
                    },
                    {
                        "internalType": "uint16",
                        "name": "decryptUtilizationBps",
                        "type": "uint16"
                    },
                    {
                        "internalType": "uint32",
                        "name": "minCommitteeSize",
                        "type": "uint32"
                    },
                    {
                        "internalType": "uint32",
                        "name": "minThreshold",
                        "type": "uint32"
                    }
                ],
                "internalType": "struct IInterfold.PricingConfig",
                "name": "pc",
                "type": "tuple"
            },
            {
                "components": [
                    {
                        "internalType": "uint256",
                        "name": "dkgWindow",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "computeWindow",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "decryptionWindow",
                        "type": "uint256"
                    }
                ],
                "internalType": "struct IInterfold.E3TimeoutConfig",
                "name": "tc",
                "type": "tuple"
            },
            {
                "internalType": "uint256",
                "name": "sortitionWindow",
                "type": "uint256"
            },
            {
                "internalType": "uint32[2]",
                "name": "threshold",
                "type": "uint32[2]"
            },
            {
                "internalType": "uint256",
                "name": "inputWindowStart",
                "type": "uint256"
            },
            {
                "internalType": "uint256",
                "name": "inputWindowEnd",
                "type": "uint256"
            }
        ],
        "name": "quote",
        "outputs": [
            {
                "internalType": "uint256",
                "name": "fee",
                "type": "uint256"
            }
        ],
        "stateMutability": "pure",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "uint32[2]",
                "name": "threshold",
                "type": "uint32[2]"
            },
            {
                "internalType": "uint32",
                "name": "minCommitteeSize",
                "type": "uint32"
            },
            {
                "internalType": "uint32",
                "name": "minThreshold",
                "type": "uint32"
            }
        ],
        "name": "validateCommitteeThresholds",
        "outputs": [],
        "stateMutability": "pure",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "uint256",
                "name": "e3Id",
                "type": "uint256"
            },
            {
                "internalType": "uint8",
                "name": "current",
                "type": "uint8"
            }
        ],
        "name": "validateMarkFailedStage",
        "outputs": [],
        "stateMutability": "pure",
        "type": "function"
    },
    {
        "inputs": [
            {
                "components": [
                    {
                        "internalType": "uint256",
                        "name": "keyGenFixedPerNode",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "keyGenPerEncryptionProof",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "coordinationPerPair",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "availabilityPerNodePerSec",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "decryptionPerNode",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "publicationBase",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "verificationPerProof",
                        "type": "uint256"
                    },
                    {
                        "internalType": "address",
                        "name": "protocolTreasury",
                        "type": "address"
                    },
                    {
                        "internalType": "uint16",
                        "name": "marginBps",
                        "type": "uint16"
                    },
                    {
                        "internalType": "uint16",
                        "name": "protocolShareBps",
                        "type": "uint16"
                    },
                    {
                        "internalType": "uint16",
                        "name": "dkgUtilizationBps",
                        "type": "uint16"
                    },
                    {
                        "internalType": "uint16",
                        "name": "computeUtilizationBps",
                        "type": "uint16"
                    },
                    {
                        "internalType": "uint16",
                        "name": "decryptUtilizationBps",
                        "type": "uint16"
                    },
                    {
                        "internalType": "uint32",
                        "name": "minCommitteeSize",
                        "type": "uint32"
                    },
                    {
                        "internalType": "uint32",
                        "name": "minThreshold",
                        "type": "uint32"
                    }
                ],
                "internalType": "struct IInterfold.PricingConfig",
                "name": "config",
                "type": "tuple"
            }
        ],
        "name": "validatePricingConfig",
        "outputs": [],
        "stateMutability": "pure",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "uint256",
                "name": "e3Id",
                "type": "uint256"
            },
            {
                "internalType": "uint8",
                "name": "current",
                "type": "uint8"
            },
            {
                "internalType": "uint256",
                "name": "computeDeadline",
                "type": "uint256"
            },
            {
                "internalType": "uint256",
                "name": "inputWindowEnd",
                "type": "uint256"
            },
            {
                "internalType": "bytes32",
                "name": "ciphertextOutput",
                "type": "bytes32"
            },
            {
                "internalType": "uint256",
                "name": "nowTs",
                "type": "uint256"
            }
        ],
        "name": "validatePublishCiphertext",
        "outputs": [],
        "stateMutability": "pure",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "uint32[2]",
                "name": "threshold",
                "type": "uint32[2]"
            },
            {
                "internalType": "uint8",
                "name": "committeeSize",
                "type": "uint8"
            },
            {
                "internalType": "uint32",
                "name": "minCommitteeSize",
                "type": "uint32"
            },
            {
                "internalType": "uint32",
                "name": "minThreshold",
                "type": "uint32"
            }
        ],
        "name": "validateQuoteThresholds",
        "outputs": [],
        "stateMutability": "pure",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "uint256[2]",
                "name": "inputWindow",
                "type": "uint256[2]"
            },
            {
                "internalType": "uint256",
                "name": "nowTs",
                "type": "uint256"
            },
            {
                "internalType": "uint256",
                "name": "computeWindow",
                "type": "uint256"
            },
            {
                "internalType": "uint256",
                "name": "decryptionWindow",
                "type": "uint256"
            },
            {
                "internalType": "uint256",
                "name": "maxDuration",
                "type": "uint256"
            },
            {
                "internalType": "uint256",
                "name": "quotedFee",
                "type": "uint256"
            }
        ],
        "name": "validateRequest",
        "outputs": [],
        "stateMutability": "pure",
        "type": "function"
    },
    {
        "inputs": [
            {
                "components": [
                    {
                        "internalType": "uint256",
                        "name": "dkgWindow",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "computeWindow",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "decryptionWindow",
                        "type": "uint256"
                    }
                ],
                "internalType": "struct IInterfold.E3TimeoutConfig",
                "name": "config",
                "type": "tuple"
            },
            {
                "internalType": "uint256",
                "name": "maxTimeoutWindow",
                "type": "uint256"
            }
        ],
        "name": "validateTimeoutConfig",
        "outputs": [],
        "stateMutability": "pure",
        "type": "function"
    }
];
const _bytecode = " ";
const isSuperArgs = (xs) => xs.length > 1;
export class InterfoldPricing__factory extends ContractFactory {
    constructor(...args) {
        if (isSuperArgs(args)) {
            super(...args);
        }
        else {
            super(_abi, _bytecode, args[0]);
        }
    }
    getDeployTransaction(overrides) {
        return super.getDeployTransaction(overrides || {});
    }
    ;
    deploy(overrides) {
        return super.deploy(overrides || {});
    }
    connect(runner) {
        return super.connect(runner);
    }
    static bytecode = _bytecode;
    static abi = _abi;
    static createInterface() {
        return new Interface(_abi);
    }
    attach(address) {
        return super.attach(address);
    }
    static connect(address, runner) {
        return new Contract(address, _abi, runner);
    }
}
