Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Extend json structs to support dip0026 multi payees #42

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

panleone
Copy link

What was done?

Introduce the struct PayoutShare and replace the field payout_address of DMNState and DMNStateDiff with payout_shares, which is Vec<PayoutShare>.

Then deserialize in such a way to convert the payout_address returned by the core wallet rpc in the one-element vector [PayoutShare{payout_address, 10000}].

(NB: clearly once DIP0026 is released on core wallet the deserialization part has to be changed)

Why was it done?

The aim of this PR is continuing the implementation (or at least give some ideas) of DIP0026 on platform, see here why the feature is needed completed on platform before being released by core wallet.

In particular with this PR merged the only steps left should be:

  1. Create an identity for each element of payout_shares in the function update_masternode_identities_v0
  2. For each identity created, create also a document of the contract reward-shares-contract

And that should be enough since the platform already pays reward-shares-contract see here

How Has This Been Tested?

The unit test deserialize_mn_listdiff is still working as expected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant