import { BaseContract, BigNumber, BytesLike, CallOverrides, ContractTransaction, Overrides, PopulatedTransaction, Signer, utils } from "ethers"; import { FunctionFragment, Result, EventFragment } from "@ethersproject/abi"; import { Listener, Provider } from "@ethersproject/providers"; import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; export interface IAccessControlInterface extends utils.Interface { contractName: "IAccessControl"; functions: { "hasRole(bytes32,address)": FunctionFragment; "getRoleAdmin(bytes32)": FunctionFragment; "grantRole(bytes32,address)": FunctionFragment; "revokeRole(bytes32,address)": FunctionFragment; "renounceRole(bytes32,address)": FunctionFragment; }; encodeFunctionData(functionFragment: "hasRole", values: [BytesLike, string]): string; encodeFunctionData(functionFragment: "getRoleAdmin", values: [BytesLike]): string; encodeFunctionData(functionFragment: "grantRole", values: [BytesLike, string]): string; encodeFunctionData(functionFragment: "revokeRole", values: [BytesLike, string]): string; encodeFunctionData(functionFragment: "renounceRole", values: [BytesLike, string]): string; decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; decodeFunctionResult(functionFragment: "getRoleAdmin", data: BytesLike): Result; decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; decodeFunctionResult(functionFragment: "renounceRole", data: BytesLike): Result; events: { "RoleAdminChanged(bytes32,bytes32,bytes32)": EventFragment; "RoleGranted(bytes32,address,address)": EventFragment; "RoleRevoked(bytes32,address,address)": EventFragment; }; getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; } export declare type RoleAdminChangedEvent = TypedEvent<[ string, string, string ], { role: string; previousAdminRole: string; newAdminRole: string; }>; export declare type RoleAdminChangedEventFilter = TypedEventFilter; export declare type RoleGrantedEvent = TypedEvent<[ string, string, string ], { role: string; account: string; sender: string; }>; export declare type RoleGrantedEventFilter = TypedEventFilter; export declare type RoleRevokedEvent = TypedEvent<[ string, string, string ], { role: string; account: string; sender: string; }>; export declare type RoleRevokedEventFilter = TypedEventFilter; export interface IAccessControl extends BaseContract { contractName: "IAccessControl"; connect(signerOrProvider: Signer | Provider | string): this; attach(addressOrName: string): this; deployed(): Promise; interface: IAccessControlInterface; queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; listeners(eventFilter?: TypedEventFilter): Array>; listeners(eventName?: string): Array; removeAllListeners(eventFilter: TypedEventFilter): this; removeAllListeners(eventName?: string): this; off: OnEvent; on: OnEvent; once: OnEvent; removeListener: OnEvent; functions: { /** * Returns `true` if `account` has been granted `role`. */ hasRole(role: BytesLike, account: string, overrides?: CallOverrides): Promise<[boolean]>; /** * Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {AccessControl-_setRoleAdmin}. */ getRoleAdmin(role: BytesLike, overrides?: CallOverrides): Promise<[string]>; /** * Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. */ grantRole(role: BytesLike, account: string, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. */ revokeRole(role: BytesLike, account: string, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. */ renounceRole(role: BytesLike, account: string, overrides?: Overrides & { from?: string | Promise; }): Promise; }; /** * Returns `true` if `account` has been granted `role`. */ hasRole(role: BytesLike, account: string, overrides?: CallOverrides): Promise; /** * Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {AccessControl-_setRoleAdmin}. */ getRoleAdmin(role: BytesLike, overrides?: CallOverrides): Promise; /** * Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. */ grantRole(role: BytesLike, account: string, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. */ revokeRole(role: BytesLike, account: string, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. */ renounceRole(role: BytesLike, account: string, overrides?: Overrides & { from?: string | Promise; }): Promise; callStatic: { /** * Returns `true` if `account` has been granted `role`. */ hasRole(role: BytesLike, account: string, overrides?: CallOverrides): Promise; /** * Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {AccessControl-_setRoleAdmin}. */ getRoleAdmin(role: BytesLike, overrides?: CallOverrides): Promise; /** * Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. */ grantRole(role: BytesLike, account: string, overrides?: CallOverrides): Promise; /** * Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. */ revokeRole(role: BytesLike, account: string, overrides?: CallOverrides): Promise; /** * Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. */ renounceRole(role: BytesLike, account: string, overrides?: CallOverrides): Promise; }; filters: { "RoleAdminChanged(bytes32,bytes32,bytes32)"(role?: BytesLike | null, previousAdminRole?: BytesLike | null, newAdminRole?: BytesLike | null): RoleAdminChangedEventFilter; RoleAdminChanged(role?: BytesLike | null, previousAdminRole?: BytesLike | null, newAdminRole?: BytesLike | null): RoleAdminChangedEventFilter; "RoleGranted(bytes32,address,address)"(role?: BytesLike | null, account?: string | null, sender?: string | null): RoleGrantedEventFilter; RoleGranted(role?: BytesLike | null, account?: string | null, sender?: string | null): RoleGrantedEventFilter; "RoleRevoked(bytes32,address,address)"(role?: BytesLike | null, account?: string | null, sender?: string | null): RoleRevokedEventFilter; RoleRevoked(role?: BytesLike | null, account?: string | null, sender?: string | null): RoleRevokedEventFilter; }; estimateGas: { /** * Returns `true` if `account` has been granted `role`. */ hasRole(role: BytesLike, account: string, overrides?: CallOverrides): Promise; /** * Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {AccessControl-_setRoleAdmin}. */ getRoleAdmin(role: BytesLike, overrides?: CallOverrides): Promise; /** * Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. */ grantRole(role: BytesLike, account: string, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. */ revokeRole(role: BytesLike, account: string, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. */ renounceRole(role: BytesLike, account: string, overrides?: Overrides & { from?: string | Promise; }): Promise; }; populateTransaction: { /** * Returns `true` if `account` has been granted `role`. */ hasRole(role: BytesLike, account: string, overrides?: CallOverrides): Promise; /** * Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {AccessControl-_setRoleAdmin}. */ getRoleAdmin(role: BytesLike, overrides?: CallOverrides): Promise; /** * Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. */ grantRole(role: BytesLike, account: string, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. */ revokeRole(role: BytesLike, account: string, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. */ renounceRole(role: BytesLike, account: string, overrides?: Overrides & { from?: string | Promise; }): Promise; }; }