mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-06-09 20:01:05 +00:00
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"Baseline": 3944,
|
||||
"Computation": 7444,
|
||||
"DivisionArithmetics": 42784,
|
||||
"ERC20": 56199,
|
||||
"Events": 4784,
|
||||
"FibonacciIterative": 6019,
|
||||
"Flipper": 4392,
|
||||
"SHA1": 36107
|
||||
"Baseline": 2824,
|
||||
"Computation": 6253,
|
||||
"DivisionArithmetics": 41341,
|
||||
"ERC20": 54329,
|
||||
"Events": 3642,
|
||||
"FibonacciIterative": 4866,
|
||||
"Flipper": 3270,
|
||||
"SHA1": 34605
|
||||
}
|
||||
@@ -619,7 +619,7 @@ pub fn recompile_code(code: &[u8], engine: &Engine) -> Module {
|
||||
let mut module_config = ModuleConfig::new();
|
||||
module_config.set_gas_metering(Some(GasMeteringKind::Sync));
|
||||
|
||||
Module::new(engine, &module_config, code).unwrap()
|
||||
Module::new(engine, &module_config, code.into()).unwrap()
|
||||
}
|
||||
|
||||
pub fn instantiate_module(
|
||||
@@ -634,14 +634,14 @@ pub fn instantiate_module(
|
||||
}
|
||||
|
||||
pub fn prepare(code: &[u8], config: Option<Config>) -> (Instance<Transaction>, ExportIndex) {
|
||||
let blob = ProgramBlob::parse(code).unwrap();
|
||||
let blob = ProgramBlob::parse(code.into()).unwrap();
|
||||
|
||||
let engine = Engine::new(&config.unwrap_or_default()).unwrap();
|
||||
|
||||
let mut module_config = ModuleConfig::new();
|
||||
module_config.set_gas_metering(Some(GasMeteringKind::Sync));
|
||||
|
||||
let module = Module::from_blob(&engine, &module_config, &blob).unwrap();
|
||||
let module = Module::from_blob(&engine, &module_config, blob).unwrap();
|
||||
let export = module.lookup_export(runtime_api::CALL).unwrap();
|
||||
let func = link_host_functions(&engine)
|
||||
.instantiate_pre(&module)
|
||||
|
||||
Reference in New Issue
Block a user