Skip to main content

Module role

Module role 

Source

Re-exportsยง

use crate::cmd::send::SendTxArgs; ๐Ÿ”’
use crate::tempo::print_payload; ๐Ÿ”’
use crate::tempo::tempo_provider; ๐Ÿ”’
use crate::tx::SendTxOpts; ๐Ÿ”’
use crate::tx::TxParams; ๐Ÿ”’
use alloy_ens::NameOrAddress; ๐Ÿ”’
use alloy_primitives::Address; ๐Ÿ”’
use alloy_primitives::B256; ๐Ÿ”’
use alloy_primitives::keccak256; ๐Ÿ”’
use alloy_provider::Provider; ๐Ÿ”’
use alloy_signer::Signer; ๐Ÿ”’
use alloy_sol_types::SolCall; ๐Ÿ”’
use eyre::Result; ๐Ÿ”’
use eyre::WrapErr; ๐Ÿ”’
use foundry_cli::opts::RpcOpts; ๐Ÿ”’
use serde_json::json; ๐Ÿ”’
use std::fmt; ๐Ÿ”’
use std::str::FromStr; ๐Ÿ”’
use tempo_alloy::TempoNetwork; ๐Ÿ”’
use tempo_contracts::precompiles::IRolesAuth; ๐Ÿ”’

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.