subsquid / squid-sdk

The main repo of the squid SDK
GNU General Public License v3.0
1.21k stars 147 forks source link

map storage by pallet name instead of prefix #266

Closed belopash closed 5 months ago

belopash commented 5 months ago

This is not correct as pallet prefix can be changed between runtimes?, yet it is hardcoded in the generated code

Here is a plan. ....

Right, forgot about that.

By the way, which part should be backwards compatible? I thougth it was about runtime.description.storage[prefix]

Should "Runtime.getStorage(), Runtime.queryStorage() and friends" try to find a storage by a prefix if there is no pallet? I mean should we create "fake" storages in a runtime description there a prefix will be used as a pallet name?