UNPKG

@vocdoni/davinci-contracts

Version:

Smart contracts powering DAVINCI's digital voting protocol

257 lines (256 loc) 14.6 kB
import type { BaseContract, BigNumberish, BytesLike, FunctionFragment, Result, Interface, EventFragment, AddressLike, ContractRunner, ContractMethod, Listener } from "ethers"; import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedLogDescription, TypedListener, TypedContractMethod } from "../common"; export interface OrganizationRegistryInterface extends Interface { getFunction(nameOrSignature: "UPGRADE_INTERFACE_VERSION" | "addAdministrator" | "createOrganization" | "deleteOrganization" | "exists" | "getOrganization" | "initialize" | "isAdministrator" | "organizationCount" | "organizations" | "owner" | "proxiableUUID" | "removeAdministrator" | "renounceOwnership" | "transferOwnership" | "updateOrganization" | "upgradeToAndCall"): FunctionFragment; getEvent(nameOrSignatureOrTopic: "Initialized" | "OrganizationCreated" | "OrganizationUpdated" | "OwnershipTransferred" | "Upgraded"): EventFragment; encodeFunctionData(functionFragment: "UPGRADE_INTERFACE_VERSION", values?: undefined): string; encodeFunctionData(functionFragment: "addAdministrator", values: [AddressLike, AddressLike]): string; encodeFunctionData(functionFragment: "createOrganization", values: [AddressLike, string, string, AddressLike[]]): string; encodeFunctionData(functionFragment: "deleteOrganization", values: [AddressLike]): string; encodeFunctionData(functionFragment: "exists", values: [AddressLike]): string; encodeFunctionData(functionFragment: "getOrganization", values: [AddressLike]): string; encodeFunctionData(functionFragment: "initialize", values?: undefined): string; encodeFunctionData(functionFragment: "isAdministrator", values: [AddressLike, AddressLike]): string; encodeFunctionData(functionFragment: "organizationCount", values?: undefined): string; encodeFunctionData(functionFragment: "organizations", values: [AddressLike]): string; encodeFunctionData(functionFragment: "owner", values?: undefined): string; encodeFunctionData(functionFragment: "proxiableUUID", values?: undefined): string; encodeFunctionData(functionFragment: "removeAdministrator", values: [AddressLike, AddressLike]): string; encodeFunctionData(functionFragment: "renounceOwnership", values?: undefined): string; encodeFunctionData(functionFragment: "transferOwnership", values: [AddressLike]): string; encodeFunctionData(functionFragment: "updateOrganization", values: [AddressLike, string, string]): string; encodeFunctionData(functionFragment: "upgradeToAndCall", values: [AddressLike, BytesLike]): string; decodeFunctionResult(functionFragment: "UPGRADE_INTERFACE_VERSION", data: BytesLike): Result; decodeFunctionResult(functionFragment: "addAdministrator", data: BytesLike): Result; decodeFunctionResult(functionFragment: "createOrganization", data: BytesLike): Result; decodeFunctionResult(functionFragment: "deleteOrganization", data: BytesLike): Result; decodeFunctionResult(functionFragment: "exists", data: BytesLike): Result; decodeFunctionResult(functionFragment: "getOrganization", data: BytesLike): Result; decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; decodeFunctionResult(functionFragment: "isAdministrator", data: BytesLike): Result; decodeFunctionResult(functionFragment: "organizationCount", data: BytesLike): Result; decodeFunctionResult(functionFragment: "organizations", data: BytesLike): Result; decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; decodeFunctionResult(functionFragment: "proxiableUUID", data: BytesLike): Result; decodeFunctionResult(functionFragment: "removeAdministrator", data: BytesLike): Result; decodeFunctionResult(functionFragment: "renounceOwnership", data: BytesLike): Result; decodeFunctionResult(functionFragment: "transferOwnership", data: BytesLike): Result; decodeFunctionResult(functionFragment: "updateOrganization", data: BytesLike): Result; decodeFunctionResult(functionFragment: "upgradeToAndCall", data: BytesLike): Result; } export declare namespace InitializedEvent { type InputTuple = [version: BigNumberish]; type OutputTuple = [version: bigint]; interface OutputObject { version: bigint; } type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>; type Filter = TypedDeferredTopicFilter<Event>; type Log = TypedEventLog<Event>; type LogDescription = TypedLogDescription<Event>; } export declare namespace OrganizationCreatedEvent { type InputTuple = [id: AddressLike, creator: AddressLike]; type OutputTuple = [id: string, creator: string]; interface OutputObject { id: string; creator: string; } type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>; type Filter = TypedDeferredTopicFilter<Event>; type Log = TypedEventLog<Event>; type LogDescription = TypedLogDescription<Event>; } export declare namespace OrganizationUpdatedEvent { type InputTuple = [id: AddressLike, updater: AddressLike]; type OutputTuple = [id: string, updater: string]; interface OutputObject { id: string; updater: string; } type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>; type Filter = TypedDeferredTopicFilter<Event>; type Log = TypedEventLog<Event>; type LogDescription = TypedLogDescription<Event>; } export declare namespace OwnershipTransferredEvent { type InputTuple = [previousOwner: AddressLike, newOwner: AddressLike]; type OutputTuple = [previousOwner: string, newOwner: string]; interface OutputObject { previousOwner: string; newOwner: string; } type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>; type Filter = TypedDeferredTopicFilter<Event>; type Log = TypedEventLog<Event>; type LogDescription = TypedLogDescription<Event>; } export declare namespace UpgradedEvent { type InputTuple = [implementation: AddressLike]; type OutputTuple = [implementation: string]; interface OutputObject { implementation: string; } type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>; type Filter = TypedDeferredTopicFilter<Event>; type Log = TypedEventLog<Event>; type LogDescription = TypedLogDescription<Event>; } export interface OrganizationRegistry extends BaseContract { connect(runner?: ContractRunner | null): OrganizationRegistry; waitForDeployment(): Promise<this>; interface: OrganizationRegistryInterface; queryFilter<TCEvent extends TypedContractEvent>(event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TypedEventLog<TCEvent>>>; queryFilter<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TypedEventLog<TCEvent>>>; on<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>; on<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>; once<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>; once<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>; listeners<TCEvent extends TypedContractEvent>(event: TCEvent): Promise<Array<TypedListener<TCEvent>>>; listeners(eventName?: string): Promise<Array<Listener>>; removeAllListeners<TCEvent extends TypedContractEvent>(event?: TCEvent): Promise<this>; UPGRADE_INTERFACE_VERSION: TypedContractMethod<[], [string], "view">; addAdministrator: TypedContractMethod<[ id: AddressLike, administrator: AddressLike ], [ void ], "nonpayable">; createOrganization: TypedContractMethod<[ id: AddressLike, name: string, metadataURI: string, administrators: AddressLike[] ], [ void ], "nonpayable">; deleteOrganization: TypedContractMethod<[ id: AddressLike ], [ void ], "nonpayable">; exists: TypedContractMethod<[id: AddressLike], [boolean], "view">; getOrganization: TypedContractMethod<[ id: AddressLike ], [ [string, string] ], "view">; initialize: TypedContractMethod<[], [void], "nonpayable">; isAdministrator: TypedContractMethod<[ id: AddressLike, account: AddressLike ], [ boolean ], "view">; organizationCount: TypedContractMethod<[], [bigint], "view">; organizations: TypedContractMethod<[ arg0: AddressLike ], [ [string, string] & { name: string; metadataURI: string; } ], "view">; owner: TypedContractMethod<[], [string], "view">; proxiableUUID: TypedContractMethod<[], [string], "view">; removeAdministrator: TypedContractMethod<[ id: AddressLike, administrator: AddressLike ], [ void ], "nonpayable">; renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; transferOwnership: TypedContractMethod<[ newOwner: AddressLike ], [ void ], "nonpayable">; updateOrganization: TypedContractMethod<[ id: AddressLike, name: string, metadataURI: string ], [ void ], "nonpayable">; upgradeToAndCall: TypedContractMethod<[ newImplementation: AddressLike, data: BytesLike ], [ void ], "payable">; getFunction<T extends ContractMethod = ContractMethod>(key: string | FunctionFragment): T; getFunction(nameOrSignature: "UPGRADE_INTERFACE_VERSION"): TypedContractMethod<[], [string], "view">; getFunction(nameOrSignature: "addAdministrator"): TypedContractMethod<[ id: AddressLike, administrator: AddressLike ], [ void ], "nonpayable">; getFunction(nameOrSignature: "createOrganization"): TypedContractMethod<[ id: AddressLike, name: string, metadataURI: string, administrators: AddressLike[] ], [ void ], "nonpayable">; getFunction(nameOrSignature: "deleteOrganization"): TypedContractMethod<[id: AddressLike], [void], "nonpayable">; getFunction(nameOrSignature: "exists"): TypedContractMethod<[id: AddressLike], [boolean], "view">; getFunction(nameOrSignature: "getOrganization"): TypedContractMethod<[id: AddressLike], [[string, string]], "view">; getFunction(nameOrSignature: "initialize"): TypedContractMethod<[], [void], "nonpayable">; getFunction(nameOrSignature: "isAdministrator"): TypedContractMethod<[ id: AddressLike, account: AddressLike ], [ boolean ], "view">; getFunction(nameOrSignature: "organizationCount"): TypedContractMethod<[], [bigint], "view">; getFunction(nameOrSignature: "organizations"): TypedContractMethod<[ arg0: AddressLike ], [ [string, string] & { name: string; metadataURI: string; } ], "view">; getFunction(nameOrSignature: "owner"): TypedContractMethod<[], [string], "view">; getFunction(nameOrSignature: "proxiableUUID"): TypedContractMethod<[], [string], "view">; getFunction(nameOrSignature: "removeAdministrator"): TypedContractMethod<[ id: AddressLike, administrator: AddressLike ], [ void ], "nonpayable">; getFunction(nameOrSignature: "renounceOwnership"): TypedContractMethod<[], [void], "nonpayable">; getFunction(nameOrSignature: "transferOwnership"): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; getFunction(nameOrSignature: "updateOrganization"): TypedContractMethod<[ id: AddressLike, name: string, metadataURI: string ], [ void ], "nonpayable">; getFunction(nameOrSignature: "upgradeToAndCall"): TypedContractMethod<[ newImplementation: AddressLike, data: BytesLike ], [ void ], "payable">; getEvent(key: "Initialized"): TypedContractEvent<InitializedEvent.InputTuple, InitializedEvent.OutputTuple, InitializedEvent.OutputObject>; getEvent(key: "OrganizationCreated"): TypedContractEvent<OrganizationCreatedEvent.InputTuple, OrganizationCreatedEvent.OutputTuple, OrganizationCreatedEvent.OutputObject>; getEvent(key: "OrganizationUpdated"): TypedContractEvent<OrganizationUpdatedEvent.InputTuple, OrganizationUpdatedEvent.OutputTuple, OrganizationUpdatedEvent.OutputObject>; getEvent(key: "OwnershipTransferred"): TypedContractEvent<OwnershipTransferredEvent.InputTuple, OwnershipTransferredEvent.OutputTuple, OwnershipTransferredEvent.OutputObject>; getEvent(key: "Upgraded"): TypedContractEvent<UpgradedEvent.InputTuple, UpgradedEvent.OutputTuple, UpgradedEvent.OutputObject>; filters: { "Initialized(uint64)": TypedContractEvent<InitializedEvent.InputTuple, InitializedEvent.OutputTuple, InitializedEvent.OutputObject>; Initialized: TypedContractEvent<InitializedEvent.InputTuple, InitializedEvent.OutputTuple, InitializedEvent.OutputObject>; "OrganizationCreated(address,address)": TypedContractEvent<OrganizationCreatedEvent.InputTuple, OrganizationCreatedEvent.OutputTuple, OrganizationCreatedEvent.OutputObject>; OrganizationCreated: TypedContractEvent<OrganizationCreatedEvent.InputTuple, OrganizationCreatedEvent.OutputTuple, OrganizationCreatedEvent.OutputObject>; "OrganizationUpdated(address,address)": TypedContractEvent<OrganizationUpdatedEvent.InputTuple, OrganizationUpdatedEvent.OutputTuple, OrganizationUpdatedEvent.OutputObject>; OrganizationUpdated: TypedContractEvent<OrganizationUpdatedEvent.InputTuple, OrganizationUpdatedEvent.OutputTuple, OrganizationUpdatedEvent.OutputObject>; "OwnershipTransferred(address,address)": TypedContractEvent<OwnershipTransferredEvent.InputTuple, OwnershipTransferredEvent.OutputTuple, OwnershipTransferredEvent.OutputObject>; OwnershipTransferred: TypedContractEvent<OwnershipTransferredEvent.InputTuple, OwnershipTransferredEvent.OutputTuple, OwnershipTransferredEvent.OutputObject>; "Upgraded(address)": TypedContractEvent<UpgradedEvent.InputTuple, UpgradedEvent.OutputTuple, UpgradedEvent.OutputObject>; Upgraded: TypedContractEvent<UpgradedEvent.InputTuple, UpgradedEvent.OutputTuple, UpgradedEvent.OutputObject>; }; }