Conversation
Probably this could help: https://paritytech.github.io/polkadot-sdk/master/sc_chain_spec/fn.set_code_substitute_in_json_chain_spec.html |
@ales-otf I tried this but couldn't figure it out. It seems the |
BTW, it looks like we can omit using the script and just hardcode everything, as there is with_code method. |
|
@ales-otf that is the genesis JSON not the chain spec JSON |
yeah, I've updated my comment |
Good spot! I will have a go at this.
I don't think |
Yeah, that's exactly what I meant. We now need to use this script to keep the genesis mostly because of the genesis code. The rest comes frome that Opened an issue for this. |
This is definitely out of scope of this PR. I've just spotted the method and this idea came to mind. |
|
A bit hacky but figured out a solution for setting |
ales-otf
left a comment
There was a problem hiding this comment.
Please, look the comment - this change is important.
And just an additional not much important styling thing, which would improve readability and debugging — to encapsulate this whole part related to setting the substitute into a separate function.
2585477due to panic by adding acodeSubstitutethat patches the buggy code with one that doesn't panic.node/src/chain_spec/finney.rsso Finney chainspec always builds with thecodeSubstituesfield.