Magport / Magnet

Polkadot’s Appchain development stack, leveraging the Coretime model, aims to enhance ecosystem diversity by enabling the creation of appchains that use DOT as the gas fee.

Home Page:https://magnet.magport.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Remove rococo runtime dependencies

sulijia opened this issue · comments

In order to obtain events on the rococo relay chain, the order pallet introduces the rococo runtime dependency.
In order to submit signed transactions to the rococo relay chain, the node code introduces the rococo runtime dependency.
We should remove this dependency, otherwise upgrading rococo or switching to connecting to polkadot will be affected.
The work that needs to be completed is:

  1. The OnDemandOrderPlaced event on the relay chain can be parsed in the order pallet. The source code that needs to be replaced is as follows:
    let v_price: Vec = head_data
    .iter()
    .filter_map(|item| {
    if let rococo_runtime::RuntimeEvent::OnDemandAssignmentProvider(
    parachains_assigner_on_demand::Event::OnDemandOrderPlaced {
    para_id: pid,
    spot_price: sprice,
    },
    ) = item.event
    {
    if pid == para_id {
    Some(sprice)
    } else {
    None
    }
    } else {
    None
    }
    })
    .collect();
  2. Able to complete offline signature in node without relying on rococo runtime, for example, you can use subxt

Import runtime Call / Storage metadata without import the whole runtime
https://github.com/paritytech/substrate/issues/8158