From b6027ad90545b5852e6a2ce115af28fa87cc9e54 Mon Sep 17 00:00:00 2001 From: Sebastian Miasojed Date: Mon, 27 Oct 2025 13:36:34 +0100 Subject: [PATCH 01/11] Add support for Evm bytecode upload --- substrate/frame/revive/src/lib.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/substrate/frame/revive/src/lib.rs b/substrate/frame/revive/src/lib.rs index fca8db4e3dbab..a92f13fe87190 100644 --- a/substrate/frame/revive/src/lib.rs +++ b/substrate/frame/revive/src/lib.rs @@ -2094,6 +2094,20 @@ impl Pallet { .map_err(ContractAccessError::StorageWriteFailed) } + /// Uploads evm runtime code and returns the Vm binary contract blob and deposit amount + /// collected. + pub fn try_upload_evm_runtime_code( + origin: T::AccountId, + code: Vec, + storage_deposit_limit: BalanceOf, + exec_config: &ExecConfig, + ) -> Result<(ContractBlob, BalanceOf), DispatchError> { + let mut module = ContractBlob::from_evm_runtime_code(code, origin)?; + let deposit = module.store_code(exec_config, None)?; + ensure!(storage_deposit_limit >= deposit, >::StorageDepositLimitExhausted); + Ok((module, deposit)) + } + /// Uploads new code and returns the Vm binary contract blob and deposit amount collected. fn try_upload_pvm_code( origin: T::AccountId, From f87d6b127d074a29f34221f8fe64dbf24612cb4e Mon Sep 17 00:00:00 2001 From: Sebastian Miasojed Date: Mon, 27 Oct 2025 21:14:17 +0100 Subject: [PATCH 02/11] Add test --- substrate/frame/revive/fixtures/build.rs | 14 +++++-- substrate/frame/revive/fixtures/src/lib.rs | 3 ++ substrate/frame/revive/src/tests/sol.rs | 43 +++++++++++++++++++++- 3 files changed, 54 insertions(+), 6 deletions(-) diff --git a/substrate/frame/revive/fixtures/build.rs b/substrate/frame/revive/fixtures/build.rs index 126f2325dcdbe..33d8fc0aad826 100644 --- a/substrate/frame/revive/fixtures/build.rs +++ b/substrate/frame/revive/fixtures/build.rs @@ -228,7 +228,7 @@ fn compile_with_standard_json( serde_json::json!({ "*": { - "*": ["evm.bytecode"] + "*": ["evm.bytecode", "evm.deployedBytecode"] } }), @@ -298,10 +298,15 @@ fn compile_with_standard_json( } /// Extract bytecode from compiler JSON output and write binary files. +/// +/// The `bytecode_type` parameter specifies which bytecode to extract: +/// - "bytecode" for init code +/// - "deployedBytecode" for runtime code fn extract_and_write_bytecode( compiler_json: &serde_json::Value, out_dir: &Path, file_suffix: &str, + bytecode_type: &str, ) -> Result<()> { if let Some(contracts) = compiler_json["contracts"].as_object() { for (_file_key, file_contracts) in contracts { @@ -309,7 +314,7 @@ fn extract_and_write_bytecode( for (contract_name, contract_data) in contract_map { // Navigate through the JSON path to find the bytecode let mut current = contract_data; - for path_segment in ["evm", "bytecode", "object"] { + for path_segment in ["evm", bytecode_type, "object"] { if let Some(next) = current.get(path_segment) { current = next; } else { @@ -360,11 +365,12 @@ fn compile_solidity_contracts( // Compile with solc for EVM bytecode let json = compile_with_standard_json("solc", contracts_dir, &solidity_entries)?; - extract_and_write_bytecode(&json, out_dir, ".sol.bin")?; + extract_and_write_bytecode(&json, out_dir, ".sol.bin", "bytecode")?; + extract_and_write_bytecode(&json, out_dir, ".sol.runtime.bin", "deployedBytecode")?; // Compile with resolc for PVM bytecode let json = compile_with_standard_json("resolc", contracts_dir, &solidity_entries_pvm)?; - extract_and_write_bytecode(&json, out_dir, ".resolc.polkavm")?; + extract_and_write_bytecode(&json, out_dir, ".resolc.polkavm", "bytecode")?; Ok(()) } diff --git a/substrate/frame/revive/fixtures/src/lib.rs b/substrate/frame/revive/fixtures/src/lib.rs index 667e01a938588..3477f00ecfc83 100644 --- a/substrate/frame/revive/fixtures/src/lib.rs +++ b/substrate/frame/revive/fixtures/src/lib.rs @@ -31,6 +31,8 @@ pub enum FixtureType { Resolc, /// Solc (compiled Solidity contracts to EVM bytecode) Solc, + /// Solc Runtime (compiled Solidity contracts to EVM runtime bytecode) + SolcRuntime, } #[cfg(feature = "std")] @@ -40,6 +42,7 @@ impl FixtureType { Self::Rust => ".polkavm", Self::Resolc => ".resolc.polkavm", Self::Solc => ".sol.bin", + Self::SolcRuntime => ".sol.runtime.bin", } } } diff --git a/substrate/frame/revive/src/tests/sol.rs b/substrate/frame/revive/src/tests/sol.rs index 73e4ef6c9c9f2..8bdb986c9c8d7 100644 --- a/substrate/frame/revive/src/tests/sol.rs +++ b/substrate/frame/revive/src/tests/sol.rs @@ -19,7 +19,7 @@ use crate::{ assert_refcount, call_builder::VmBinaryModule, debug::DebugSettings, - test_utils::{builder::Contract, ALICE}, + test_utils::{builder::Contract, ALICE, ALICE_ADDR}, tests::{ builder, test_utils::{contract_base_deposit, ensure_stored, get_contract}, @@ -104,7 +104,6 @@ fn basic_evm_flow_works() { fn basic_evm_flow_tracing_works() { use crate::{ evm::{CallTrace, CallTracer, CallType}, - test_utils::ALICE_ADDR, tracing::trace, }; let (code, _) = compile_module_with_type("Fibonacci", FixtureType::Solc).unwrap(); @@ -199,3 +198,43 @@ fn eth_contract_too_large() { }); } } + +#[test] +fn upload_evm_runtime_code_works() { + use crate::{ + exec::Executable, + primitives::ExecConfig, + storage::{AccountInfo, ContractInfo}, + Pallet, + }; + + let (runtime_code, _runtime_hash) = + compile_module_with_type("Fibonacci", FixtureType::SolcRuntime).unwrap(); + + ExtBuilder::default().build().execute_with(|| { + let _ = ::Currency::set_balance(&ALICE, 100_000_000_000); + + let (uploaded_blob, _) = Pallet::::try_upload_evm_runtime_code( + ALICE, + runtime_code.clone(), + 1_000_000_000_000u64, + &ExecConfig::new_substrate_tx(), + ) + .unwrap(); + + let uploaded_code_hash = *uploaded_blob.code_hash(); + let nonce = Pallet::::evm_nonce(&ALICE_ADDR) + 1; + let contract_address = crate::address::create1(&ALICE_ADDR, nonce.into()); + + let contract_info = + ContractInfo::::new(&contract_address, nonce, uploaded_code_hash).unwrap(); + AccountInfo::::insert_contract(&contract_address, contract_info); + + // Call the contract and verify it works + let result = builder::bare_call(contract_address) + .data(Fibonacci::FibonacciCalls::fib(Fibonacci::fibCall { n: 10u64 }).abi_encode()) + .build_and_unwrap_result(); + let decoded = Fibonacci::fibCall::abi_decode_returns(&result.data).unwrap(); + assert_eq!(55u64, decoded, "Contract should correctly compute fibonacci(10)"); + }); +} From 794d5afe389c3c109a07571ae87c20967e24046b Mon Sep 17 00:00:00 2001 From: Sebastian Miasojed Date: Tue, 28 Oct 2025 12:03:49 +0100 Subject: [PATCH 03/11] Cleanup --- substrate/frame/revive/fixtures/build.rs | 30 +++++++++++++++++------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/substrate/frame/revive/fixtures/build.rs b/substrate/frame/revive/fixtures/build.rs index 33d8fc0aad826..dbef2989d31ce 100644 --- a/substrate/frame/revive/fixtures/build.rs +++ b/substrate/frame/revive/fixtures/build.rs @@ -48,6 +48,22 @@ enum ContractType { Solidity, } +/// Type of EVM bytecode to extract from Solidity compiler output. +#[derive(Clone, Copy)] +enum BytecodeType { + InitCode, + RuntimeCode, +} + +impl BytecodeType { + fn json_key(&self) -> &'static str { + match self { + Self::InitCode => "bytecode", + Self::RuntimeCode => "deployedBytecode", + } + } +} + impl Entry { /// Create a new contract entry from the given path. fn new(path: PathBuf, contract_type: ContractType) -> Self { @@ -298,15 +314,11 @@ fn compile_with_standard_json( } /// Extract bytecode from compiler JSON output and write binary files. -/// -/// The `bytecode_type` parameter specifies which bytecode to extract: -/// - "bytecode" for init code -/// - "deployedBytecode" for runtime code fn extract_and_write_bytecode( compiler_json: &serde_json::Value, out_dir: &Path, file_suffix: &str, - bytecode_type: &str, + bytecode_type: BytecodeType, ) -> Result<()> { if let Some(contracts) = compiler_json["contracts"].as_object() { for (_file_key, file_contracts) in contracts { @@ -314,7 +326,7 @@ fn extract_and_write_bytecode( for (contract_name, contract_data) in contract_map { // Navigate through the JSON path to find the bytecode let mut current = contract_data; - for path_segment in ["evm", bytecode_type, "object"] { + for path_segment in ["evm", bytecode_type.json_key(), "object"] { if let Some(next) = current.get(path_segment) { current = next; } else { @@ -365,12 +377,12 @@ fn compile_solidity_contracts( // Compile with solc for EVM bytecode let json = compile_with_standard_json("solc", contracts_dir, &solidity_entries)?; - extract_and_write_bytecode(&json, out_dir, ".sol.bin", "bytecode")?; - extract_and_write_bytecode(&json, out_dir, ".sol.runtime.bin", "deployedBytecode")?; + extract_and_write_bytecode(&json, out_dir, ".sol.bin", BytecodeType::InitCode)?; + extract_and_write_bytecode(&json, out_dir, ".sol.runtime.bin", BytecodeType::RuntimeCode)?; // Compile with resolc for PVM bytecode let json = compile_with_standard_json("resolc", contracts_dir, &solidity_entries_pvm)?; - extract_and_write_bytecode(&json, out_dir, ".resolc.polkavm", "bytecode")?; + extract_and_write_bytecode(&json, out_dir, ".resolc.polkavm", BytecodeType::InitCode)?; Ok(()) } From a4822a58a6e04ea73b7ff8e9b7f338b7d13b74fd Mon Sep 17 00:00:00 2001 From: "cmd[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 28 Oct 2025 11:26:12 +0000 Subject: [PATCH 04/11] Update from github-actions[bot] running command 'prdoc --audience node_dev --bump minor' --- prdoc/pr_10129.prdoc | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 prdoc/pr_10129.prdoc diff --git a/prdoc/pr_10129.prdoc b/prdoc/pr_10129.prdoc new file mode 100644 index 0000000000000..4b3d57214d6d5 --- /dev/null +++ b/prdoc/pr_10129.prdoc @@ -0,0 +1,11 @@ +title: Add upload evm code function +doc: +- audience: Node Dev + description: |- + EVM Runtime Code Upload for Foundry Integration + This feature enables direct upload of EVM runtime bytecode (deployed contract code without constructor) to the pallet-revive, supporting Foundry's code migration functionality between REVM and pallet-revive execution environments. +crates: +- name: pallet-revive + bump: minor +- name: pallet-revive-fixtures + bump: minor From 6c5abfae47cffffdbade5f06c044126f42917dcd Mon Sep 17 00:00:00 2001 From: Sebastian Miasojed Date: Tue, 28 Oct 2025 14:26:00 +0100 Subject: [PATCH 05/11] Changed function signature --- substrate/frame/revive/src/lib.rs | 3 ++- substrate/frame/revive/src/tests/sol.rs | 14 +++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/substrate/frame/revive/src/lib.rs b/substrate/frame/revive/src/lib.rs index fb6f9e7f50f19..f1fd90277cabc 100644 --- a/substrate/frame/revive/src/lib.rs +++ b/substrate/frame/revive/src/lib.rs @@ -2098,11 +2098,12 @@ impl Pallet { /// Uploads evm runtime code and returns the Vm binary contract blob and deposit amount /// collected. pub fn try_upload_evm_runtime_code( - origin: T::AccountId, + origin: H160, code: Vec, storage_deposit_limit: BalanceOf, exec_config: &ExecConfig, ) -> Result<(ContractBlob, BalanceOf), DispatchError> { + let origin = T::AddressMapper::to_account_id(&origin); let mut module = ContractBlob::from_evm_runtime_code(code, origin)?; let deposit = module.store_code(exec_config, None)?; ensure!(storage_deposit_limit >= deposit, >::StorageDepositLimitExhausted); diff --git a/substrate/frame/revive/src/tests/sol.rs b/substrate/frame/revive/src/tests/sol.rs index 8bdb986c9c8d7..f18051f338550 100644 --- a/substrate/frame/revive/src/tests/sol.rs +++ b/substrate/frame/revive/src/tests/sol.rs @@ -212,22 +212,22 @@ fn upload_evm_runtime_code_works() { compile_module_with_type("Fibonacci", FixtureType::SolcRuntime).unwrap(); ExtBuilder::default().build().execute_with(|| { - let _ = ::Currency::set_balance(&ALICE, 100_000_000_000); + let deployer = ALICE_ADDR; + let _ = Pallet::::set_evm_balance(&deployer, 1_000_000_000.into()); let (uploaded_blob, _) = Pallet::::try_upload_evm_runtime_code( - ALICE, + deployer, runtime_code.clone(), - 1_000_000_000_000u64, + u64::MAX, &ExecConfig::new_substrate_tx(), ) .unwrap(); - let uploaded_code_hash = *uploaded_blob.code_hash(); - let nonce = Pallet::::evm_nonce(&ALICE_ADDR) + 1; - let contract_address = crate::address::create1(&ALICE_ADDR, nonce.into()); + let contract_address = crate::address::create1(&deployer, 0u32.into()); let contract_info = - ContractInfo::::new(&contract_address, nonce, uploaded_code_hash).unwrap(); + ContractInfo::::new(&contract_address, 0u32.into(), *uploaded_blob.code_hash()) + .unwrap(); AccountInfo::::insert_contract(&contract_address, contract_info); // Call the contract and verify it works From 5d79e49992b030890bd0a23374d85232608a7f69 Mon Sep 17 00:00:00 2001 From: Sebastian Miasojed Date: Tue, 28 Oct 2025 15:04:12 +0100 Subject: [PATCH 06/11] Fix prdoc --- prdoc/pr_10129.prdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prdoc/pr_10129.prdoc b/prdoc/pr_10129.prdoc index 4b3d57214d6d5..4ec2f71430425 100644 --- a/prdoc/pr_10129.prdoc +++ b/prdoc/pr_10129.prdoc @@ -8,4 +8,4 @@ crates: - name: pallet-revive bump: minor - name: pallet-revive-fixtures - bump: minor + bump: major From 3c9bf9c55579eaefdf8f0904f8cdd194172a2fd9 Mon Sep 17 00:00:00 2001 From: Sebastian Miasojed Date: Wed, 29 Oct 2025 11:50:09 +0100 Subject: [PATCH 07/11] Apply comment --- substrate/frame/revive/fixtures/build.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/substrate/frame/revive/fixtures/build.rs b/substrate/frame/revive/fixtures/build.rs index dbef2989d31ce..d4af984d6bf3c 100644 --- a/substrate/frame/revive/fixtures/build.rs +++ b/substrate/frame/revive/fixtures/build.rs @@ -50,12 +50,12 @@ enum ContractType { /// Type of EVM bytecode to extract from Solidity compiler output. #[derive(Clone, Copy)] -enum BytecodeType { +enum EvmByteCodeType { InitCode, RuntimeCode, } -impl BytecodeType { +impl EvmByteCodeType { fn json_key(&self) -> &'static str { match self { Self::InitCode => "bytecode", @@ -318,7 +318,7 @@ fn extract_and_write_bytecode( compiler_json: &serde_json::Value, out_dir: &Path, file_suffix: &str, - bytecode_type: BytecodeType, + bytecode_type: EvmByteCodeType, ) -> Result<()> { if let Some(contracts) = compiler_json["contracts"].as_object() { for (_file_key, file_contracts) in contracts { @@ -377,12 +377,12 @@ fn compile_solidity_contracts( // Compile with solc for EVM bytecode let json = compile_with_standard_json("solc", contracts_dir, &solidity_entries)?; - extract_and_write_bytecode(&json, out_dir, ".sol.bin", BytecodeType::InitCode)?; - extract_and_write_bytecode(&json, out_dir, ".sol.runtime.bin", BytecodeType::RuntimeCode)?; + extract_and_write_bytecode(&json, out_dir, ".sol.bin", EvmByteCodeType::InitCode)?; + extract_and_write_bytecode(&json, out_dir, ".sol.runtime.bin", EvmByteCodeType::RuntimeCode)?; // Compile with resolc for PVM bytecode let json = compile_with_standard_json("resolc", contracts_dir, &solidity_entries_pvm)?; - extract_and_write_bytecode(&json, out_dir, ".resolc.polkavm", BytecodeType::InitCode)?; + extract_and_write_bytecode(&json, out_dir, ".resolc.polkavm", EvmByteCodeType::InitCode)?; Ok(()) } From 96f206b08927174fb328f219f37b7be0e23431a6 Mon Sep 17 00:00:00 2001 From: Sebastian Miasojed Date: Wed, 29 Oct 2025 14:39:28 +0100 Subject: [PATCH 08/11] Apply comment --- substrate/frame/revive/src/lib.rs | 31 +++++++++---------------- substrate/frame/revive/src/tests/sol.rs | 10 ++++---- 2 files changed, 17 insertions(+), 24 deletions(-) diff --git a/substrate/frame/revive/src/lib.rs b/substrate/frame/revive/src/lib.rs index f1fd90277cabc..1edae03f6ea5c 100644 --- a/substrate/frame/revive/src/lib.rs +++ b/substrate/frame/revive/src/lib.rs @@ -57,7 +57,7 @@ use crate::{ gas::GasMeter, storage::{meter::Meter as StorageMeter, AccountType, DeletionQueueManager}, tracing::if_tracing, - vm::{pvm::extract_code_and_data, CodeInfo, ContractBlob, RuntimeCosts}, + vm::{pvm::extract_code_and_data, BytecodeType, CodeInfo, ContractBlob, RuntimeCosts}, weightinfo_extension::OnFinalizeBlockParts, }; use alloc::{boxed::Box, format, vec}; @@ -1558,9 +1558,10 @@ impl Pallet { let (executable, upload_deposit) = match code { Code::Upload(code) if code.starts_with(&polkavm_common::program::BLOB_MAGIC) => { let upload_account = T::UploadOrigin::ensure_origin(origin)?; - let (executable, upload_deposit) = Self::try_upload_pvm_code( + let (executable, upload_deposit) = Self::try_upload_code( upload_account, code, + BytecodeType::Pvm, storage_deposit_limit, &exec_config, )?; @@ -1986,9 +1987,10 @@ impl Pallet { storage_deposit_limit: BalanceOf, ) -> CodeUploadResult> { let origin = T::UploadOrigin::ensure_origin(origin)?; - let (module, deposit) = Self::try_upload_pvm_code( + let (module, deposit) = Self::try_upload_code( origin, code, + BytecodeType::Pvm, storage_deposit_limit, &ExecConfig::new_substrate_tx(), )?; @@ -2095,21 +2097,6 @@ impl Pallet { .map_err(ContractAccessError::StorageWriteFailed) } - /// Uploads evm runtime code and returns the Vm binary contract blob and deposit amount - /// collected. - pub fn try_upload_evm_runtime_code( - origin: H160, - code: Vec, - storage_deposit_limit: BalanceOf, - exec_config: &ExecConfig, - ) -> Result<(ContractBlob, BalanceOf), DispatchError> { - let origin = T::AddressMapper::to_account_id(&origin); - let mut module = ContractBlob::from_evm_runtime_code(code, origin)?; - let deposit = module.store_code(exec_config, None)?; - ensure!(storage_deposit_limit >= deposit, >::StorageDepositLimitExhausted); - Ok((module, deposit)) - } - /// Pallet account, used to hold funds for contracts upload deposit. pub fn account_id() -> T::AccountId { use frame_support::PalletId; @@ -2144,13 +2131,17 @@ impl Pallet { } /// Uploads new code and returns the Vm binary contract blob and deposit amount collected. - fn try_upload_pvm_code( + fn try_upload_code( origin: T::AccountId, code: Vec, + code_type: BytecodeType, storage_deposit_limit: BalanceOf, exec_config: &ExecConfig, ) -> Result<(ContractBlob, BalanceOf), DispatchError> { - let mut module = ContractBlob::from_pvm_code(code, origin)?; + let mut module = match code_type { + BytecodeType::Pvm => ContractBlob::from_pvm_code(code, origin)?, + BytecodeType::Evm => ContractBlob::from_evm_runtime_code(code, origin)?, + }; let deposit = module.store_code(exec_config, None)?; ensure!(storage_deposit_limit >= deposit, >::StorageDepositLimitExhausted); Ok((module, deposit)) diff --git a/substrate/frame/revive/src/tests/sol.rs b/substrate/frame/revive/src/tests/sol.rs index f18051f338550..53a10eaa93609 100644 --- a/substrate/frame/revive/src/tests/sol.rs +++ b/substrate/frame/revive/src/tests/sol.rs @@ -212,18 +212,20 @@ fn upload_evm_runtime_code_works() { compile_module_with_type("Fibonacci", FixtureType::SolcRuntime).unwrap(); ExtBuilder::default().build().execute_with(|| { - let deployer = ALICE_ADDR; - let _ = Pallet::::set_evm_balance(&deployer, 1_000_000_000.into()); + let deployer = ALICE; + let deployer_addr = ALICE_ADDR; + let _ = Pallet::::set_evm_balance(&deployer_addr, 1_000_000_000.into()); - let (uploaded_blob, _) = Pallet::::try_upload_evm_runtime_code( + let (uploaded_blob, _) = Pallet::::try_upload_code( deployer, runtime_code.clone(), u64::MAX, &ExecConfig::new_substrate_tx(), + crate::vm::BytecodeType::Evm, ) .unwrap(); - let contract_address = crate::address::create1(&deployer, 0u32.into()); + let contract_address = crate::address::create1(&deployer_addr, 0u32.into()); let contract_info = ContractInfo::::new(&contract_address, 0u32.into(), *uploaded_blob.code_hash()) From b1c19df10ee26ae5f6f516ba5296c46dbc6a42e6 Mon Sep 17 00:00:00 2001 From: Sebastian Miasojed Date: Wed, 29 Oct 2025 14:53:34 +0100 Subject: [PATCH 09/11] Fix test --- substrate/frame/revive/src/tests/sol.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/substrate/frame/revive/src/tests/sol.rs b/substrate/frame/revive/src/tests/sol.rs index 53a10eaa93609..2d240f4a4baa0 100644 --- a/substrate/frame/revive/src/tests/sol.rs +++ b/substrate/frame/revive/src/tests/sol.rs @@ -219,9 +219,9 @@ fn upload_evm_runtime_code_works() { let (uploaded_blob, _) = Pallet::::try_upload_code( deployer, runtime_code.clone(), + crate::vm::BytecodeType::Evm, u64::MAX, &ExecConfig::new_substrate_tx(), - crate::vm::BytecodeType::Evm, ) .unwrap(); From d84f7b2b70e10902a3220beae2e0eedbda836079 Mon Sep 17 00:00:00 2001 From: Sebastian Miasojed Date: Thu, 30 Oct 2025 10:07:53 +0100 Subject: [PATCH 10/11] Make the call public again --- substrate/frame/revive/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/substrate/frame/revive/src/lib.rs b/substrate/frame/revive/src/lib.rs index c6393325293fe..dd17d2ada5a14 100644 --- a/substrate/frame/revive/src/lib.rs +++ b/substrate/frame/revive/src/lib.rs @@ -2129,7 +2129,7 @@ impl Pallet { } /// Uploads new code and returns the Vm binary contract blob and deposit amount collected. - fn try_upload_code( + pub fn try_upload_code( origin: T::AccountId, code: Vec, code_type: BytecodeType, From bbdf08a3051b31fb7e79a06d716690b2f2bd69e1 Mon Sep 17 00:00:00 2001 From: Sebastian Miasojed Date: Thu, 30 Oct 2025 10:33:59 +0100 Subject: [PATCH 11/11] Update prdoc --- prdoc/pr_10129.prdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prdoc/pr_10129.prdoc b/prdoc/pr_10129.prdoc index 4ec2f71430425..34c6a907b8205 100644 --- a/prdoc/pr_10129.prdoc +++ b/prdoc/pr_10129.prdoc @@ -6,6 +6,6 @@ doc: This feature enables direct upload of EVM runtime bytecode (deployed contract code without constructor) to the pallet-revive, supporting Foundry's code migration functionality between REVM and pallet-revive execution environments. crates: - name: pallet-revive - bump: minor + bump: major - name: pallet-revive-fixtures bump: major