AcalaNetwork / chopsticks

Create parallel reality of your Substrate network.
Apache License 2.0
133 stars 80 forks source link

Is it possible to change a pallet's constant? #594

Closed laurogripa closed 9 months ago

laurogripa commented 9 months ago

Hey, folks!

I'm working on adapting Kusama's interfaces to reflect the changes done to the Society pallet (see Gav's PR)

I'm experimenting with Chopsticks lately to make my life easier and I think it's great!

But I think I hit a roadblock... I'm trying to create my own config to set some initial state for the society, I managed to change the storage fairly easily but now I need to change some constants too, both VotingPeriod and ChallengePeriod, but they seem to be hardcoded on the runtime ☹️

What are my options here?

Thanks!

ermalkaleci commented 9 months ago
ermalkaleci commented 9 months ago

@laurogripa you don't really need sudo when you can modify storage or use --mock-signature-host

xlc commented 9 months ago

You can use scheduler to dispatch root origin call to perform runtime upgrade https://hackmd.io/6bKd532rTdaxVX0hmGXX7g#Dispatch-Call

but 99% of the time wasm override is enough

laurogripa commented 9 months ago

@ermalkaleci @xlc

Oh, perfect!

I read the docs and the code looking for something with runtime but ended up overlooking the wasm-override parameter. It worked like a charm, just had to build my own custom runtime and point to it.

you can't added storage for a module that doesn't exists

I know, I know, what I meant is if there was a way to use Chopsticks to load a module that was removed, but wasm-override did the trick anyway :)

I'm going to close this issue as it's solved for me.

Thanks a lot for you attention in such a short time. This project is awesome! 💟