Open ryanleecode opened 1 year ago
This would also open the door for us to validate prod-dev chain feature parity. We could produce console warnings about inconsistencies between the default and target-listed metadata.
so this issue should be seen as a follow up
Currently, specifying --target
does not actually touch the codegen; it passes an env var, which is picked up by the detectConnect
util. Although we could swap out the served chain rune, this could be treacherous for a few reasons:
Would warnings about incompatibilities suffice? Not sure we should try to do anything too fancy with --target
.
Warnings seem like the best option 👍
Based on my understanding when specifying a
target
innets.ts
, it only swaps out the connection and not the "chain rune".. i.e.westend
does not becomewestendDev
. So whatever extrinsics are created will use the original metadata regardless of what the metadata is on thetarget
chain. If there's a runtime upgrade on the prod chain and you don't bump the version inbins
, then your extrinsics can seemingly fail, without it being obvious to the end user why its failing.For example given this nets config:
Had i used anything lower than
v0.9.43
, extrinsics would fail with:Similar to #961, #1052.
Ideally Capi should have a check in place to make sure the target chain is compatible with the prod chain.