mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 02:57:57 +00:00
Wasm executor should provide stubs for unknown externs (wasmi) (#4550)
Related to #4456
This commit is contained in:
@@ -18,7 +18,23 @@ use sp_runtime::{print, traits::{BlakeTwo256, Hash}};
|
||||
#[cfg(not(feature = "std"))]
|
||||
use sp_core::{ed25519, sr25519};
|
||||
|
||||
extern "C" {
|
||||
#[allow(dead_code)]
|
||||
fn missing_external();
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn yet_another_missing_external();
|
||||
}
|
||||
|
||||
sp_core::wasm_export_functions! {
|
||||
fn test_calling_missing_external() {
|
||||
unsafe { missing_external() }
|
||||
}
|
||||
|
||||
fn test_calling_yet_another_missing_external() {
|
||||
unsafe { yet_another_missing_external() }
|
||||
}
|
||||
|
||||
fn test_data_in(input: Vec<u8>) -> Vec<u8> {
|
||||
print("set_storage");
|
||||
storage::set(b"input", &input);
|
||||
|
||||
Reference in New Issue
Block a user