mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 15:07:59 +00:00
Introduce capabilities filtering for off-chain runtime calls. (#3454)
* Introduce capabilities filtering for calls. * Bump impl version. * Allow RichOffchainCall to only read offchain db. * Fix code. * Panic on invalid calls. * Merge execution contexts and expose capabilities. * Fix repr * Re-enable keystore for offchain calls.
This commit is contained in:
committed by
Bastian Köcher
parent
d81df14391
commit
0128d0db84
@@ -552,9 +552,9 @@ impl<'a> ToClientSideDecl<'a> {
|
||||
fn fold_trait_item_method(&mut self, method: TraitItemMethod)
|
||||
-> (TraitItemMethod, Option<TraitItemMethod>, TraitItemMethod) {
|
||||
let crate_ = self.crate_;
|
||||
let context_other = quote!( #crate_::runtime_api::ExecutionContext::Other );
|
||||
let context = quote!( #crate_::runtime_api::ExecutionContext::OffchainCall(None) );
|
||||
let fn_impl = self.create_method_runtime_api_impl(method.clone());
|
||||
let fn_decl = self.create_method_decl(method.clone(), context_other);
|
||||
let fn_decl = self.create_method_decl(method.clone(), context);
|
||||
let fn_decl_ctx = self.create_method_decl_with_context(method);
|
||||
|
||||
(fn_decl, fn_impl, fn_decl_ctx)
|
||||
|
||||
Reference in New Issue
Block a user