itering / scale.go

Golang polkadot substrate scale codec
http://subscan.io
Apache License 2.0
63 stars 36 forks source link

Support types StakingPagedExposureMetadata and StakingExposurePage #88

Closed pacmessica closed 6 months ago

pacmessica commented 6 months ago

types/registry.go is missing SpStakingPagedExposureMetadata and SpStakingExposurePage.

Just need this commit from as far as I can tell. https://github.com/pacmessica/scale.go/commit/e30daa0a255c53f0a71b1b5d599eccbfb5799a6e

freehere107 commented 6 months ago

@pacmessica Types has auto registered by runtime metadata. https://github.com/itering/scale.go/blob/master/types/scaleInfo.go

pacmessica commented 6 months ago

great!

How do I get the name of the type? Example, if I try ProcessAndUpdateData("StakingExposurePage") I get a panic: Not found decoder class StakingExposurePage.

freehere107 commented 6 months ago

@pacmessica This type name is sp_staking:ExposurePage.You may need to check this https://polkadot.subscan.io/runtime/Staking?version=1002000

image