sudoRegisterEvvm Function
Function Type: external
Access Control: isSuperUser
Function Signature: sudoRegisterEvvm(uint256,uint256,address)
SuperUser registration function for whitelisted EVVM IDs that allows the superUser to register EVVMs with specific IDs in the reserved range (1-999). These IDs are intended for official EVVM deployments that have been vetted and approved by the ecosystem governance. Only the current superUser can call this function, which is managed through a time-delayed governance system.
Parameters
| Field | Type | Description |
|---|---|---|
evvmId | uint256 | The specific reserved ID (1-999) to assign |
chainId | uint256 | The chain ID where the EVVM is deployed |
evvmAddress | address | The contract address of the EVVM instance |
Workflow
- Access Control: Validates that the caller is the current superUser using the
isSuperUsermodifier. Reverts withInvalidUserif not authorized. - Input Validation: Checks that
evvmIdis within the reserved range (1-999), that bothchainIdandevvmAddressare not zero, and that the chain ID is registered. Reverts withInvalidInputon validation failure. - Duplicate Prevention: Verifies that the
evvmAddressis not already registered for the specifiedchainIdand that theevvmIdis not already in use. Reverts withAlreadyRegisteredorEvvmIdAlreadyRegisteredrespectively. - Registration Storage: Stores the metadata in the registry mapping and marks the address as registered for the chain.
- Return Assignment: Returns the assigned EVVM ID (same as the input
evvmId).