MaintenanceMode
Calls
blockAccount
Blocks an account from transacting on the network
Namespace
api.tx.maintenanceMode.blockAccountType
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.blockCallType
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.blockEvmTargetType
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.blockPalletType
function blockPallet(
pallet_name: Bytes,
blocked: bool
)enableMaintenanceMode
Enable maintenance mode which prevents all non sudo calls
Namespace
api.tx.maintenanceMode.enableMaintenanceModeType
function enableMaintenanceMode(
enabled: bool
)Storage
blockedAccounts
Map from account to blocked status
Namespace
api.query.maintenanceMode.blockedAccountsType
function blockedAccounts(
SeedPrimitivesSignatureAccountId20
): boolblockedCalls
Map from call to blocked status map (PalletNameBytes, FunctionNameBytes) => bool
Namespace
api.query.maintenanceMode.blockedCallsType
function blockedCalls(
(Bytes,Bytes)
): boolblockedEVMAddresses
Map from EVM target address to blocked status
Namespace
api.query.maintenanceMode.blockedEVMAddressesType
function blockedEVMAddresses(
H160
): boolblockedPallets
Map from pallet to blocked status map PalletNameBytes => bool
Namespace
api.query.maintenanceMode.blockedPalletsType
function blockedPallets(
Bytes
): boolmaintenanceModeActive
Determines whether maintenance mode is currently active
Namespace
api.query.maintenanceMode.maintenanceModeActiveType
function maintenanceModeActive(
): boolEvents
AccountBlocked
An account was blocked
Namespace
api.events.maintenanceMode.AccountBlockedType
type AccountBlocked = {
account: SeedPrimitivesSignatureAccountId20,
blocked: bool
}CallBlocked
An account was blocked
Namespace
api.events.maintenanceMode.CallBlockedType
type CallBlocked = {
pallet_name: Bytes,
call_name: Bytes,
blocked: bool
}EVMTargetBlocked
An account was blocked
Namespace
api.events.maintenanceMode.EVMTargetBlockedType
type EVMTargetBlocked = {
target_address: H160,
blocked: bool
}MaintenanceModeActivated
Maintenance mode was activated
Namespace
api.events.maintenanceMode.MaintenanceModeActivatedType
type MaintenanceModeActivated = {
enabled: bool
}PalletBlocked
An account was blocked
Namespace
api.events.maintenanceMode.PalletBlockedType
type PalletBlocked = {
pallet_name: Bytes,
blocked: bool
}Errors
AccountBlocked
This account is not authorized to execute this transaction
Namespace
api.errors.maintenanceMode.AccountBlockedCannotBlock
This pallet or call cannot be blocked
Namespace
api.errors.maintenanceMode.CannotBlockInvalidCallName
The call name is not valid utf-8 characters
Namespace
api.errors.maintenanceMode.InvalidCallNameInvalidPalletName
The pallet name is not valid utf-8 characters
Namespace
api.errors.maintenanceMode.InvalidPalletNameMaintenanceModeActive
This call is disabled as the chain is in maintenance mode
Namespace
api.errors.maintenanceMode.MaintenanceModeActiveConstants
stringLimit
The maximum length of a pallet or call name, stored on-chain
Namespace
api.consts.maintenanceMode.stringLimitType
type stringLimit = u32