MaintenanceMode
Calls
blockAccount
Blocks an account from transacting on the network
Namespace
api.tx.maintenanceMode.blockAccount
Type
function blockAccount(
account: SeedPrimitivesSignatureAccountId20,
blocked: bool
)
blockCall
Blocks a call from being executed pallet_name: The name of the pallet as per the runtime file. i.e. FeeProxy call_name: The snake_case name for the call. i.e. set_fee Both pallet and call names are not case sensitive
Namespace
api.tx.maintenanceMode.blockCall
Type
function blockCall(
pallet_name: Bytes,
call_name: Bytes,
blocked: bool
)
blockEvmTarget
Blocks an account from transacting on the network Can be used to block individual precompile addresses or contracts
Namespace
api.tx.maintenanceMode.blockEvmTarget
Type
function blockEvmTarget(
target_address: H160,
blocked: bool
)
blockPallet
Blocks an entire pallets calls from being executed pallet_name: The name of the pallet as per the runtime file. i.e. FeeProxy Pallet names are not case sensitive
Namespace
api.tx.maintenanceMode.blockPallet
Type
function blockPallet(
pallet_name: Bytes,
blocked: bool
)
enableMaintenanceMode
Enable maintenance mode which prevents all non sudo calls
Namespace
api.tx.maintenanceMode.enableMaintenanceMode
Type
function enableMaintenanceMode(
enabled: bool
)
Storage
blockedAccounts
Map from account to blocked status
Namespace
api.query.maintenanceMode.blockedAccounts
Type
function blockedAccounts(
SeedPrimitivesSignatureAccountId20
): bool
blockedCalls
Map from call to blocked status map (PalletNameBytes, FunctionNameBytes) => bool
Namespace
api.query.maintenanceMode.blockedCalls
Type
function blockedCalls(
(Bytes,Bytes)
): bool
blockedEVMAddresses
Map from EVM target address to blocked status
Namespace
api.query.maintenanceMode.blockedEVMAddresses
Type
function blockedEVMAddresses(
H160
): bool
blockedPallets
Map from pallet to blocked status map PalletNameBytes => bool
Namespace
api.query.maintenanceMode.blockedPallets
Type
function blockedPallets(
Bytes
): bool
maintenanceModeActive
Determines whether maintenance mode is currently active
Namespace
api.query.maintenanceMode.maintenanceModeActive
Type
function maintenanceModeActive(
): bool
Events
AccountBlocked
An account was blocked
Namespace
api.events.maintenanceMode.AccountBlocked
Type
type AccountBlocked = {
account: SeedPrimitivesSignatureAccountId20,
blocked: bool
}
CallBlocked
An account was blocked
Namespace
api.events.maintenanceMode.CallBlocked
Type
type CallBlocked = {
pallet_name: Bytes,
call_name: Bytes,
blocked: bool
}
EVMTargetBlocked
An account was blocked
Namespace
api.events.maintenanceMode.EVMTargetBlocked
Type
type EVMTargetBlocked = {
target_address: H160,
blocked: bool
}
MaintenanceModeActivated
Maintenance mode was activated
Namespace
api.events.maintenanceMode.MaintenanceModeActivated
Type
type MaintenanceModeActivated = {
enabled: bool
}
PalletBlocked
An account was blocked
Namespace
api.events.maintenanceMode.PalletBlocked
Type
type PalletBlocked = {
pallet_name: Bytes,
blocked: bool
}
Errors
AccountBlocked
This account is not authorized to execute this transaction
Namespace
api.errors.maintenanceMode.AccountBlocked
CannotBlock
This pallet or call cannot be blocked
Namespace
api.errors.maintenanceMode.CannotBlock
InvalidCallName
The call name is not valid utf-8 characters
Namespace
api.errors.maintenanceMode.InvalidCallName
InvalidPalletName
The pallet name is not valid utf-8 characters
Namespace
api.errors.maintenanceMode.InvalidPalletName
MaintenanceModeActive
This call is disabled as the chain is in maintenance mode
Namespace
api.errors.maintenanceMode.MaintenanceModeActive
Constants
stringLimit
The maximum length of a pallet or call name, stored on-chain
Namespace
api.consts.maintenanceMode.stringLimit
Type
type stringLimit = u32