stakelink / substrate-payctl

Simple command line application to control the payouts of Substrate validators (Polkadot and Kusama among others).
MIT License
33 stars 8 forks source link

Fixes for compatibility with latest Kusama runtime #12

Closed mario-sangar closed 3 years ago

mario-sangar commented 3 years ago

Fixes for compatibility with latest Kusama runtime

Description

I discovered that the list command was returning incorrect values for rewards on Kusama and Westend, but not on Polkadot. Going down the rabbit hole investigating that, I made "some" changes on the code and I include them all in here.

Changes

Suggestion to bump version

I think these changes don't affect the usage of the tool from the user's perspective, but I would suggest to bump the version of the tool to 1.1.0.

Let me know what you think about this and the changes above, I hope you find them useful :grin:

I just saw that @arjanz has made a PR. I think his changes are also included in this PR so far, but please, take a look at both :)

mario-sangar commented 3 years ago

The mapping of network to SS58 address format was extracted from the Substrate repo:

https://github.com/paritytech/substrate/blob/3c2bd9a6ba1052daa8711dfb22b902e7591ab690/primitives/core/src/crypto.rs#L479