UNPKG

@vocdoni/davinci-contracts

Version:

Smart contracts powering DAVINCI's digital voting protocol

636 lines (635 loc) 14.9 kB
"use strict"; /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ Object.defineProperty(exports, "__esModule", { value: true }); exports.ISequencerRegistry__factory = void 0; const ethers_1 = require("ethers"); const _abi = [ { inputs: [], name: "InsufficientCapacity", type: "error", }, { inputs: [], name: "InsufficientStake", type: "error", }, { inputs: [], name: "InvalidCapacity", type: "error", }, { inputs: [], name: "InvalidChainID", type: "error", }, { inputs: [], name: "InvalidCooldownPeriod", type: "error", }, { inputs: [], name: "InvalidProcessManagerAddress", type: "error", }, { inputs: [], name: "InvalidRewardAmount", type: "error", }, { inputs: [], name: "InvalidSequencerAddress", type: "error", }, { inputs: [], name: "InvalidStakeAmount", type: "error", }, { inputs: [], name: "SequencerAlreadyExists", type: "error", }, { inputs: [], name: "SequencerNotActive", type: "error", }, { inputs: [], name: "SequencerNotFound", type: "error", }, { inputs: [], name: "StakeAmountTooLow", type: "error", }, { inputs: [], name: "Unauthorized", type: "error", }, { inputs: [], name: "WithdrawalRequestAlreadyMade", type: "error", }, { inputs: [], name: "WithdrawalRequestNotMade", type: "error", }, { anonymous: false, inputs: [ { indexed: true, internalType: "address", name: "sequencer", type: "address", }, { indexed: false, internalType: "uint256", name: "capacity", type: "uint256", }, { indexed: false, internalType: "uint256", name: "stake", type: "uint256", }, ], name: "Deposit", type: "event", }, { anonymous: false, inputs: [ { indexed: true, internalType: "address", name: "sequencer", type: "address", }, { indexed: false, internalType: "uint256", name: "capacity", type: "uint256", }, { indexed: false, internalType: "uint256", name: "stake", type: "uint256", }, ], name: "Registered", type: "event", }, { anonymous: false, inputs: [ { indexed: true, internalType: "address", name: "sequencer", type: "address", }, { indexed: false, internalType: "uint256", name: "amount", type: "uint256", }, ], name: "RewardAdded", type: "event", }, { anonymous: false, inputs: [ { indexed: true, internalType: "address", name: "sequencer", type: "address", }, { indexed: false, internalType: "uint256", name: "amount", type: "uint256", }, ], name: "RewardClaimed", type: "event", }, { anonymous: false, inputs: [ { indexed: true, internalType: "address", name: "sequencer", type: "address", }, ], name: "SequencerDeleted", type: "event", }, { anonymous: false, inputs: [ { indexed: true, internalType: "address", name: "sequencer", type: "address", }, ], name: "SequencerDisabled", type: "event", }, { anonymous: false, inputs: [ { indexed: true, internalType: "address", name: "sequencer", type: "address", }, ], name: "SequencerEnabled", type: "event", }, { anonymous: false, inputs: [ { indexed: true, internalType: "address", name: "sequencer", type: "address", }, { indexed: false, internalType: "uint256", name: "amount", type: "uint256", }, ], name: "Slashed", type: "event", }, { anonymous: false, inputs: [ { indexed: true, internalType: "address", name: "sequencer", type: "address", }, { indexed: false, internalType: "uint256", name: "time", type: "uint256", }, ], name: "WithdrawalRequested", type: "event", }, { anonymous: false, inputs: [ { indexed: true, internalType: "address", name: "sequencer", type: "address", }, { indexed: false, internalType: "uint256", name: "amount", type: "uint256", }, ], name: "Withdrawn", type: "event", }, { inputs: [ { internalType: "address", name: "_sequencer", type: "address", }, { internalType: "uint256", name: "_amount", type: "uint256", }, ], name: "addReward", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "uint256", name: "_amount", type: "uint256", }, ], name: "addStake", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [], name: "chainID", outputs: [ { internalType: "string", name: "", type: "string", }, ], stateMutability: "view", type: "function", }, { inputs: [], name: "claimRewards", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [], name: "deleteSequencer", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address", name: "_sequencer", type: "address", }, ], name: "getCapacity", outputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "address", name: "_sequencer", type: "address", }, ], name: "getSequencer", outputs: [ { components: [ { internalType: "bool", name: "exists", type: "bool", }, { internalType: "bool", name: "active", type: "bool", }, { internalType: "uint256", name: "stake", type: "uint256", }, { internalType: "uint256", name: "capacity", type: "uint256", }, { internalType: "uint256", name: "registeredAt", type: "uint256", }, { internalType: "uint256", name: "lastWithdrawalRequest", type: "uint256", }, ], internalType: "struct ISequencerRegistry.Sequencer", name: "", type: "tuple", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "address", name: "_sequencer", type: "address", }, ], name: "isActive", outputs: [ { internalType: "bool", name: "", type: "bool", }, ], stateMutability: "view", type: "function", }, { inputs: [], name: "minStake", outputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "address", name: "_sequencer", type: "address", }, ], name: "pendingRewards", outputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], stateMutability: "view", type: "function", }, { inputs: [], name: "processManager", outputs: [ { internalType: "address", name: "", type: "address", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "uint256", name: "_capacity", type: "uint256", }, { internalType: "uint256", name: "_stake", type: "uint256", }, ], name: "register", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [], name: "requestWithdraw", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address", name: "_sequencer", type: "address", }, ], name: "setActive", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address", name: "_sequencer", type: "address", }, ], name: "setInactive", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "uint256", name: "_minStake", type: "uint256", }, ], name: "setMinStake", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address", name: "_processManager", type: "address", }, ], name: "setProcessManager", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address", name: "_vocToken", type: "address", }, ], name: "setVocToken", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "uint256", name: "_cooldown", type: "uint256", }, ], name: "setWithdrawalCooldown", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address", name: "_sequencer", type: "address", }, { internalType: "uint256", name: "_amount", type: "uint256", }, ], name: "slash", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [], name: "vocToken", outputs: [ { internalType: "address", name: "", type: "address", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "uint256", name: "_amount", type: "uint256", }, ], name: "withdraw", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [], name: "withdrawalCooldown", outputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], stateMutability: "view", type: "function", }, ]; class ISequencerRegistry__factory { static createInterface() { return new ethers_1.Interface(_abi); } static connect(address, runner) { return new ethers_1.Contract(address, _abi, runner); } } exports.ISequencerRegistry__factory = ISequencerRegistry__factory; ISequencerRegistry__factory.abi = _abi;