feat: ASI manifest #353
Merged
Jonathansumner merged 5 commits intofeat/aasi-merger-cmdfrom May 22, 2024
Merged
Conversation
pbukva
reviewed
May 20, 2024
Comment on lines
+24
to
+25
| Amount types.Coins `json:"amount"` | ||
| NewSupplyTotal types.Coins `json:"new_supply_total"` |
Collaborator
There was a problem hiding this comment.
I would suggest to rename data members:
Suggested change
| Amount types.Coins `json:"amount"` | |
| NewSupplyTotal types.Coins `json:"new_supply_total"` | |
| MintedAmount types.Coins `json:"minted_amount"` | |
| ResultingSupplyTotal types.Coins `json:"resulting_supply_total"` |
pbukva
reviewed
May 20, 2024
| type ASIUpgradeManifest struct { | ||
| IBC *ASIUpgradeTransfers `json:"ibc,omitempty"` | ||
| Reconciliation *ASIUpgradeTransfers `json:"reconciliation,omitempty"` | ||
| SupplyMint []ASIUpgradeSupplyMint `json:"supply_mint"` |
Collaborator
There was a problem hiding this comment.
- I'm not quite sure why is this an array. This can be simply directly value type, or pointer to type.
- In the example below I used the pointer to type in order to have additional degree of freedom - to enable complete exclusion of the Supply data member from json completelly, if really required. Though honestly, it is not required - it can be directly value type
ASIUpgradeSupplyMint, since itsCoinsdata members are arrays themselves.
- In the example below I used the pointer to type in order to have additional degree of freedom - to enable complete exclusion of the Supply data member from json completelly, if really required. Though honestly, it is not required - it can be directly value type
- I would rename this data member to simply
Supply:
Suggested change
| SupplyMint []ASIUpgradeSupplyMint `json:"supply_mint"` | |
| SupplyMint *ASIUpgradeSupplyMint `json:"supply_mint"` |
pbukva
reviewed
May 20, 2024
| Amount: sdk.NewCoins(additionalSupplyCoin), | ||
| NewSupplyTotal: sdk.NewCoins(newSupplyCoins), | ||
| } | ||
| manifest.SupplyMint = append(manifest.SupplyMint, mintRecord) |
Collaborator
There was a problem hiding this comment.
As per my inline comments above:
Suggested change
| manifest.SupplyMint = append(manifest.SupplyMint, mintRecord) | |
| manifest.Supply = supplyRecord |
pbukva
reviewed
May 20, 2024
| overflowAddressBalanceCoins = overflowAddressBalanceCoins.Add(additionalSupplyCoin) | ||
|
|
||
| // add the new supply mint record to the manifest | ||
| mintRecord := ASIUpgradeSupplyMint{ |
Collaborator
There was a problem hiding this comment.
Nit pick - feel free to ignore.
Suggested change
| mintRecord := ASIUpgradeSupplyMint{ | |
| supplyRecord := ASIUpgradeSupplyMint{ |
pbukva
reviewed
May 21, 2024
Comment on lines
+29
to
+31
| SupplyMint []ASIUpgradeSupplyMint `json:"supply_mint"` | ||
| IBC *ASIUpgradeTransfers `json:"ibc,omitempty"` | ||
| Reconciliation *ASIUpgradeTransfers `json:"reconciliation,omitempty"` |
Collaborator
There was a problem hiding this comment.
Suggested change
| SupplyMint []ASIUpgradeSupplyMint `json:"supply_mint"` | |
| IBC *ASIUpgradeTransfers `json:"ibc,omitempty"` | |
| Reconciliation *ASIUpgradeTransfers `json:"reconciliation,omitempty"` | |
| Supply *ASIUpgradeSupply `json:"supply,omitempty"` | |
| IBC *ASIUpgradeTransfers `json:"ibc,omitempty"` | |
| Reconciliation *ASIUpgradeTransfers `json:"reconciliation,omitempty"` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.