mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 08:11:03 +00:00
Allow try-runtime for contracts-rococo (#1906)
* Enable try-runtime for contracts-rococo * Fix typo from merge
This commit is contained in:
committed by
GitHub
parent
ddbf07e0b6
commit
91a6892459
@@ -626,6 +626,12 @@ pub fn run() -> Result<()> {
|
|||||||
task_manager,
|
task_manager,
|
||||||
))
|
))
|
||||||
}),
|
}),
|
||||||
|
Runtime::ContractsRococo => runner.async_run(|config| {
|
||||||
|
Ok((
|
||||||
|
cmd.run::<Block, crate::service::ContractsRococoRuntimeExecutor>(config),
|
||||||
|
task_manager,
|
||||||
|
))
|
||||||
|
}),
|
||||||
_ => Err("Chain doesn't support try-runtime".into()),
|
_ => Err("Chain doesn't support try-runtime".into()),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -150,6 +150,21 @@ impl sc_executor::NativeExecutionDispatch for CollectivesPolkadotRuntimeExecutor
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Native contracts executor instance.
|
||||||
|
pub struct ContractsRococoRuntimeExecutor;
|
||||||
|
|
||||||
|
impl sc_executor::NativeExecutionDispatch for ContractsRococoRuntimeExecutor {
|
||||||
|
type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions;
|
||||||
|
|
||||||
|
fn dispatch(method: &str, data: &[u8]) -> Option<Vec<u8>> {
|
||||||
|
contracts_rococo_runtime::api::dispatch(method, data)
|
||||||
|
}
|
||||||
|
|
||||||
|
fn native_version() -> sc_executor::NativeVersion {
|
||||||
|
contracts_rococo_runtime::native_version()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// Starts a `ServiceBuilder` for a full service.
|
/// Starts a `ServiceBuilder` for a full service.
|
||||||
///
|
///
|
||||||
/// Use this macro if you don't actually need the full service, but just the builder in order to
|
/// Use this macro if you don't actually need the full service, but just the builder in order to
|
||||||
|
|||||||
Reference in New Issue
Block a user