inkdevhub / drink

De-chained Ready-to-play ink! playground
Apache License 2.0
69 stars 15 forks source link

Call runtime #40

Closed pmikolajczyk41 closed 1 year ago

pmikolajczyk41 commented 1 year ago

closes #36

While the current solution is quite clean, its usage might turn out to be onerous (the vanilla way is to have a target pallet as a dependency). However, one can always prepare the object call manually without pallet (e.g. with subxt), encode it and then decode it :shrug:

This problem will rise in ink! integration, where we have to implement:

fn runtime_call<'a>(
        &mut self,
        _origin: &Keypair,
        _pallet_name: &'a str,
        _call_name: &'a str,
        _call_data: Vec<Value>,
    )

where Value comes from subxt. For this however, I will try to change the API there a bit (it was designed for subxt only). Then, integration with this new code should be much easier.