pub fn apply_precompile_overrides(
state_overrides: &HashMap<Address, AccountOverride, FbBuildHasher<20>>,
precompiles: &mut PrecompilesMap,
) -> Result<(), EthSimulateError>Available on crate feature
rpc only.Expand description
Applies precompile move overrides from state overrides to the EVM’s precompiles map.
This function processes movePrecompileToAddress entries from the state overrides and
moves precompiles from their original addresses to new addresses. The original address
is cleared (precompile removed) and the precompile is installed at the destination address.
§Validation
- The source address must be a precompile (exists in the precompiles map)
- Moving multiple precompiles to the same destination is allowed
- Self-references (moving to the same address) are not explicitly forbidden here since that would be a no-op
§Arguments
state_overrides- The state overrides containing potentialmovePrecompileToAddressentriesprecompiles- Mutable reference to the EVM’s precompiles map
§Returns
Returns Ok(()) on success, or an EthSimulateError::NotAPrecompile if a source address
is not a precompile.