Conversation
emostov
left a comment
There was a problem hiding this comment.
As far as I can understand it LGTM. Just had a comment about stuff to think about in the future in terms of generalized support of substrate based chains.
|
|
||
| _ => { | ||
| info!("Unsupported runtime: {}#{}", spec_name, spec_version); | ||
| return None; |
There was a problem hiding this comment.
This warning is a good idea, and I think it works well for now. It does make me think though that in the future we should maybe think about how to make all of sidecar easily configurable for a wide array of substrate based chains. Polkadot-js already easily supports adding types, and I am wondering if we could do something of similar effect with fee stuff in this crate.
There was a problem hiding this comment.
Instead of bailing we could just use the current Multiplier as long as the chain supplied a valid Polynomial. That would instantly support all current chains that use the ChargeTransactionPayment (should be most of them).
So maybe we should rather explicitly ban unsupported versions of our runtimes than disallowing anything we do not know.
danforbes
left a comment
There was a problem hiding this comment.
Looks awesome 🚀 Noting that as we move more logic into the Rust code we will want to create Rust unit tests.
This PR adds support for the upcoming polkadot, kusama and westend runtimes. Westend starting with runtime 10 is now also support but untested.
In addition to these changes I also added the following modifications:
FEE_DEBUG=1in the environment you get some nice debugging output