stakelink / substrate-payctl

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

Scalecodec 0.11.* incompatibility #10

Closed arjanz closed 3 years ago

arjanz commented 3 years ago

scalecodec >0.11.0 treats a tuple in RUST like a real tuple in Python now, in stead of a dict, which leads to breaking changes.

For example in : https://github.com/stakelink/substrate-payctl/blob/693aefcffbb603da2c5666639d11bf065269e2dc/payctl/utils.py#L36

This should be now:

            for reward_points_item in reward_points.value['individual']:
                eras_rewards_point[era]['individual'][reward_points_item[0]] = reward_points_item[1]

Also Substrate addresses are now always SS58 encoded (also in a nested struct), so you don't have to do that manually anymore (when also updated to latest substrate-interface, but could also lead to some breaking changes.

I thought I'll reach out to give some pointer before you have to dive deep into the code figuring out what got changed :)

If I find the time I'll make a PR

apuigsech commented 3 years ago

Fixed on #12.