Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Define one top-level structure per file #179

Closed
emmanuelm41 opened this issue Jan 28, 2023 · 0 comments · Fixed by #194
Closed

Define one top-level structure per file #179

emmanuelm41 opened this issue Jan 28, 2023 · 0 comments · Fixed by #194

Comments

@emmanuelm41
Copy link
Member

emmanuelm41 commented Jan 28, 2023

Let's put every CBOR methods on one lib per actor, and attach them to bytes. We will need to rename the methods too.

Change from this

library MinerAPI {
  // ...
  using GetVestingFundsCBOR for MinerTypes.GetVestingFundsReturn;
  using GetBeneficiaryCBOR for MinerTypes.GetBeneficiaryReturn;
  using ChangeWorkerAddressCBOR for MinerTypes.ChangeWorkerAddressParams;
  using ChangePeerIDCBOR for MinerTypes.ChangePeerIDParams;
  using ChangeMultiaddrsCBOR for MinerTypes.ChangeMultiaddrsParams;
  using GetPeerIDCBOR for MinerTypes.GetPeerIDReturn;
  using GetMultiaddrsCBOR for MinerTypes.GetMultiaddrsReturn;
  using WithdrawBalanceCBOR for MinerTypes.WithdrawBalanceParams;
  using WithdrawBalanceCBOR for MinerTypes.WithdrawBalanceReturn;
  // ...
}

to

library MinerAPI {
  using MinerCBOR for *;
  using AddressCBOR for bytes;
}

🔗 zboto Link

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants