diff --git a/runtime/moonbase/src/lib.rs b/runtime/moonbase/src/lib.rs index b94a7be284..7c66cdc9d9 100644 --- a/runtime/moonbase/src/lib.rs +++ b/runtime/moonbase/src/lib.rs @@ -827,32 +827,7 @@ impl pallet_evm_precompile_proxy::EvmProxyCallFilter for ProxyType { ) -> bool { use pallet_evm::PrecompileSet as _; match self { - ProxyType::Any => { - match PrecompileName::from_address(call.to.0) { - // Any precompile that can execute a subcall should be forbidden here, - // to ensure that unauthorized smart contract can't be called - // indirectly. - // To be safe, we only allow the precompiles we need. - Some( - PrecompileName::AuthorMappingPrecompile - | PrecompileName::ParachainStakingPrecompile, - ) => true, - Some(ref precompile) if is_governance_precompile(precompile) => true, - // All non-whitelisted precompiles are forbidden - Some(_) => false, - // Allow evm transfer to "simple" account (no code nor precompile) - // For the moment, no smart contract other than precompiles is allowed. - // In the future, we may create a dynamic whitelist to authorize some audited - // smart contracts through governance. - None => { - // If the address is not recognized, allow only evm transfert to "simple" - // accounts (no code nor precompile). - // Note: Checking the presence of the code is not enough because some - // precompiles have no code. - !recipient_has_code && !PrecompilesValue::get().is_precompile(call.to.0) - } - } - } + ProxyType::Any => true, ProxyType::NonTransfer => { call.value == U256::zero() && match PrecompileName::from_address(call.to.0) {