@api3/contracts
Version:
Contracts through which API3 services are delivered
251 lines • 12.8 kB
TypeScript
import type { BaseContract, BytesLike, FunctionFragment, Result, Interface, EventFragment, AddressLike, ContractRunner, ContractMethod, Listener } from "ethers";
import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedLogDescription, TypedListener, TypedContractMethod } from "../common";
export interface AccessControlRegistryInterface extends Interface {
getFunction(nameOrSignature: "DEFAULT_ADMIN_ROLE" | "getRoleAdmin" | "grantRole" | "hasRole" | "initializeManager" | "initializeRoleAndGrantToSender" | "multicall" | "renounceRole" | "revokeRole" | "supportsInterface" | "tryMulticall"): FunctionFragment;
getEvent(nameOrSignatureOrTopic: "InitializedManager" | "InitializedRole" | "RoleAdminChanged" | "RoleGranted" | "RoleRevoked"): EventFragment;
encodeFunctionData(functionFragment: "DEFAULT_ADMIN_ROLE", values?: undefined): string;
encodeFunctionData(functionFragment: "getRoleAdmin", values: [BytesLike]): string;
encodeFunctionData(functionFragment: "grantRole", values: [BytesLike, AddressLike]): string;
encodeFunctionData(functionFragment: "hasRole", values: [BytesLike, AddressLike]): string;
encodeFunctionData(functionFragment: "initializeManager", values: [AddressLike]): string;
encodeFunctionData(functionFragment: "initializeRoleAndGrantToSender", values: [BytesLike, string]): string;
encodeFunctionData(functionFragment: "multicall", values: [BytesLike[]]): string;
encodeFunctionData(functionFragment: "renounceRole", values: [BytesLike, AddressLike]): string;
encodeFunctionData(functionFragment: "revokeRole", values: [BytesLike, AddressLike]): string;
encodeFunctionData(functionFragment: "supportsInterface", values: [BytesLike]): string;
encodeFunctionData(functionFragment: "tryMulticall", values: [BytesLike[]]): string;
decodeFunctionResult(functionFragment: "DEFAULT_ADMIN_ROLE", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "getRoleAdmin", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "initializeManager", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "initializeRoleAndGrantToSender", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "multicall", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "renounceRole", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "supportsInterface", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "tryMulticall", data: BytesLike): Result;
}
export declare namespace InitializedManagerEvent {
type InputTuple = [
rootRole: BytesLike,
manager: AddressLike,
sender: AddressLike
];
type OutputTuple = [rootRole: string, manager: string, sender: string];
interface OutputObject {
rootRole: string;
manager: string;
sender: string;
}
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
type Filter = TypedDeferredTopicFilter<Event>;
type Log = TypedEventLog<Event>;
type LogDescription = TypedLogDescription<Event>;
}
export declare namespace InitializedRoleEvent {
type InputTuple = [
role: BytesLike,
adminRole: BytesLike,
description: string,
sender: AddressLike
];
type OutputTuple = [
role: string,
adminRole: string,
description: string,
sender: string
];
interface OutputObject {
role: string;
adminRole: string;
description: string;
sender: string;
}
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
type Filter = TypedDeferredTopicFilter<Event>;
type Log = TypedEventLog<Event>;
type LogDescription = TypedLogDescription<Event>;
}
export declare namespace RoleAdminChangedEvent {
type InputTuple = [
role: BytesLike,
previousAdminRole: BytesLike,
newAdminRole: BytesLike
];
type OutputTuple = [
role: string,
previousAdminRole: string,
newAdminRole: string
];
interface OutputObject {
role: string;
previousAdminRole: string;
newAdminRole: string;
}
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
type Filter = TypedDeferredTopicFilter<Event>;
type Log = TypedEventLog<Event>;
type LogDescription = TypedLogDescription<Event>;
}
export declare namespace RoleGrantedEvent {
type InputTuple = [
role: BytesLike,
account: AddressLike,
sender: AddressLike
];
type OutputTuple = [role: string, account: string, sender: string];
interface OutputObject {
role: string;
account: string;
sender: string;
}
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
type Filter = TypedDeferredTopicFilter<Event>;
type Log = TypedEventLog<Event>;
type LogDescription = TypedLogDescription<Event>;
}
export declare namespace RoleRevokedEvent {
type InputTuple = [
role: BytesLike,
account: AddressLike,
sender: AddressLike
];
type OutputTuple = [role: string, account: string, sender: string];
interface OutputObject {
role: string;
account: string;
sender: string;
}
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
type Filter = TypedDeferredTopicFilter<Event>;
type Log = TypedEventLog<Event>;
type LogDescription = TypedLogDescription<Event>;
}
export interface AccessControlRegistry extends BaseContract {
connect(runner?: ContractRunner | null): AccessControlRegistry;
waitForDeployment(): Promise<this>;
interface: AccessControlRegistryInterface;
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>;
DEFAULT_ADMIN_ROLE: TypedContractMethod<[], [string], "view">;
getRoleAdmin: TypedContractMethod<[role: BytesLike], [string], "view">;
grantRole: TypedContractMethod<[
role: BytesLike,
account: AddressLike
], [
void
], "nonpayable">;
hasRole: TypedContractMethod<[
role: BytesLike,
account: AddressLike
], [
boolean
], "view">;
initializeManager: TypedContractMethod<[
manager: AddressLike
], [
void
], "nonpayable">;
initializeRoleAndGrantToSender: TypedContractMethod<[
adminRole: BytesLike,
description: string
], [
string
], "nonpayable">;
multicall: TypedContractMethod<[data: BytesLike[]], [string[]], "nonpayable">;
renounceRole: TypedContractMethod<[
role: BytesLike,
account: AddressLike
], [
void
], "nonpayable">;
revokeRole: TypedContractMethod<[
role: BytesLike,
account: AddressLike
], [
void
], "nonpayable">;
supportsInterface: TypedContractMethod<[
interfaceId: BytesLike
], [
boolean
], "view">;
tryMulticall: TypedContractMethod<[
data: BytesLike[]
], [
[boolean[], string[]] & {
successes: boolean[];
returndata: string[];
}
], "nonpayable">;
getFunction<T extends ContractMethod = ContractMethod>(key: string | FunctionFragment): T;
getFunction(nameOrSignature: "DEFAULT_ADMIN_ROLE"): TypedContractMethod<[], [string], "view">;
getFunction(nameOrSignature: "getRoleAdmin"): TypedContractMethod<[role: BytesLike], [string], "view">;
getFunction(nameOrSignature: "grantRole"): TypedContractMethod<[
role: BytesLike,
account: AddressLike
], [
void
], "nonpayable">;
getFunction(nameOrSignature: "hasRole"): TypedContractMethod<[
role: BytesLike,
account: AddressLike
], [
boolean
], "view">;
getFunction(nameOrSignature: "initializeManager"): TypedContractMethod<[manager: AddressLike], [void], "nonpayable">;
getFunction(nameOrSignature: "initializeRoleAndGrantToSender"): TypedContractMethod<[
adminRole: BytesLike,
description: string
], [
string
], "nonpayable">;
getFunction(nameOrSignature: "multicall"): TypedContractMethod<[data: BytesLike[]], [string[]], "nonpayable">;
getFunction(nameOrSignature: "renounceRole"): TypedContractMethod<[
role: BytesLike,
account: AddressLike
], [
void
], "nonpayable">;
getFunction(nameOrSignature: "revokeRole"): TypedContractMethod<[
role: BytesLike,
account: AddressLike
], [
void
], "nonpayable">;
getFunction(nameOrSignature: "supportsInterface"): TypedContractMethod<[interfaceId: BytesLike], [boolean], "view">;
getFunction(nameOrSignature: "tryMulticall"): TypedContractMethod<[
data: BytesLike[]
], [
[boolean[], string[]] & {
successes: boolean[];
returndata: string[];
}
], "nonpayable">;
getEvent(key: "InitializedManager"): TypedContractEvent<InitializedManagerEvent.InputTuple, InitializedManagerEvent.OutputTuple, InitializedManagerEvent.OutputObject>;
getEvent(key: "InitializedRole"): TypedContractEvent<InitializedRoleEvent.InputTuple, InitializedRoleEvent.OutputTuple, InitializedRoleEvent.OutputObject>;
getEvent(key: "RoleAdminChanged"): TypedContractEvent<RoleAdminChangedEvent.InputTuple, RoleAdminChangedEvent.OutputTuple, RoleAdminChangedEvent.OutputObject>;
getEvent(key: "RoleGranted"): TypedContractEvent<RoleGrantedEvent.InputTuple, RoleGrantedEvent.OutputTuple, RoleGrantedEvent.OutputObject>;
getEvent(key: "RoleRevoked"): TypedContractEvent<RoleRevokedEvent.InputTuple, RoleRevokedEvent.OutputTuple, RoleRevokedEvent.OutputObject>;
filters: {
"InitializedManager(bytes32,address,address)": TypedContractEvent<InitializedManagerEvent.InputTuple, InitializedManagerEvent.OutputTuple, InitializedManagerEvent.OutputObject>;
InitializedManager: TypedContractEvent<InitializedManagerEvent.InputTuple, InitializedManagerEvent.OutputTuple, InitializedManagerEvent.OutputObject>;
"InitializedRole(bytes32,bytes32,string,address)": TypedContractEvent<InitializedRoleEvent.InputTuple, InitializedRoleEvent.OutputTuple, InitializedRoleEvent.OutputObject>;
InitializedRole: TypedContractEvent<InitializedRoleEvent.InputTuple, InitializedRoleEvent.OutputTuple, InitializedRoleEvent.OutputObject>;
"RoleAdminChanged(bytes32,bytes32,bytes32)": TypedContractEvent<RoleAdminChangedEvent.InputTuple, RoleAdminChangedEvent.OutputTuple, RoleAdminChangedEvent.OutputObject>;
RoleAdminChanged: TypedContractEvent<RoleAdminChangedEvent.InputTuple, RoleAdminChangedEvent.OutputTuple, RoleAdminChangedEvent.OutputObject>;
"RoleGranted(bytes32,address,address)": TypedContractEvent<RoleGrantedEvent.InputTuple, RoleGrantedEvent.OutputTuple, RoleGrantedEvent.OutputObject>;
RoleGranted: TypedContractEvent<RoleGrantedEvent.InputTuple, RoleGrantedEvent.OutputTuple, RoleGrantedEvent.OutputObject>;
"RoleRevoked(bytes32,address,address)": TypedContractEvent<RoleRevokedEvent.InputTuple, RoleRevokedEvent.OutputTuple, RoleRevokedEvent.OutputObject>;
RoleRevoked: TypedContractEvent<RoleRevokedEvent.InputTuple, RoleRevokedEvent.OutputTuple, RoleRevokedEvent.OutputObject>;
};
}
//# sourceMappingURL=AccessControlRegistry.d.ts.map