Skip to main content

Module role

Module role 

Source

Structsยง

Tip20Role
A TIP-20 role identifier, parsed from a role name or a raw 32-byte hash.

Enumsยง

RoleUpdate ๐Ÿ”’
Whether a role membership update grants or revokes the role.

Constantsยง

DEFAULT_ADMIN_ROLE ๐Ÿ”’
Name of the root admin role, whose identifier is the zero hash.
HASHED_ROLES ๐Ÿ”’
Names of the TIP-20 roles whose identifier is the keccak256 hash of the name.

Functionsยง

ensure_role_admin ๐Ÿ”’
Fails early when sender does not hold the admin role of role, instead of submitting a transaction the precompile rejects with a bare Unauthorized().
has_role ๐Ÿ”’
Prints whether account holds role on token.
update ๐Ÿ”’
Grants or revokes role for account on token.