airgap-it / tezos-rust-sdk

MIT License
20 stars 10 forks source link

rename tokens_per_roll to minimal_stake #16

Closed fraidev closed 1 year ago

fraidev commented 1 year ago

Hey!

I tried to use the get_constants RPC method, but it's not working because it's not possible to parse tokens_per_roll field, which was renamed to minimal_stake and is not marked with the default Serde attribute.

Error: error decoding response body: missing field `tokens_per_roll` at line 1 column 3009

So, I renamed tokens_per_roll to minimal_stake.

But I don't know if makes sense for the project to remove the old field or add to it default.

RomarQ commented 1 year ago

A good solution would be to add a variant type to categorize the constants per protocol version. This will be a breaking change, for now making the field tokens_per_roll optional seems fine.

I will try to have a look at the PR tomorrow.