roleAdminChangedEvent

Creates an event object for the RoleAdminChanged event.

Example

import { getContractEvents } from "thirdweb";
import { roleAdminChangedEvent } from "thirdweb/extensions/permissions";
const events = await getContractEvents({
contract,
events: [
roleAdminChangedEvent({
role: ...,
previousAdminRole: ...,
newAdminRole: ...,
})
],
});
function roleAdminChangedEvent(
filters: Partial<{
newAdminRole: `0x${string}`;
previousAdminRole: `0x${string}`;
role: `0x${string}`;
}>,
readonly inputs: readonly [
{
readonly indexed: true;
readonly name: "role";
readonly type: "bytes32";
},
{
readonly indexed: true;
readonly name: "previousAdminRole";
readonly type: "bytes32";
},
{
readonly indexed: true;
readonly name: "newAdminRole";
readonly type: "bytes32";
},
];
readonly name: "RoleAdminChanged";
readonly type: "event";
}>;

Parameters

Optional filters to apply to the event.

Type

let filters: Partial<{
newAdminRole: `0x${string}`;
previousAdminRole: `0x${string}`;
role: `0x${string}`;
}>;

Returns

let returnType: PreparedEvent<{
readonly inputs: readonly [
{
readonly indexed: true;
readonly name: "role";
readonly type: "bytes32";
},
{
readonly indexed: true;
readonly name: "previousAdminRole";
readonly type: "bytes32";
},
{
readonly indexed: true;
readonly name: "newAdminRole";
readonly type: "bytes32";
},
];
readonly name: "RoleAdminChanged";
readonly type: "event";
}>;

The prepared event object.