You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove the restriction on the number of tokens that can be associated to the account that is dictated by property "tokens.maxPerAccount"
Use a map valued linkedList <EntityNumPair, MerkleTokenRelStatus> instead of using CopyOfWriteIds array to track the associated token Ids where MerkleTokenRelStatus serves as a doubly linkedList node.
Track the latest association using a EntityNumPair on MerkleAccount using the new TokenAssociaitonMetadata which will encapsulate numAssociations -> current token association count, numZeroBalances -> zero balanced token associations among the current associations and lastAssociation -> EntityNumPair of last token association.
MerkleAccount will no longer have 3 children. It will have just 2 from this release on [merkelAccountState and Records]
Migration from older version states should work with updating the linked list with the appropriate links and setting the latest association of the MerkleAccount along with numAssociaitons and numZeroBalances.
Association and Dissociation logics should manipulate the linkedList and TokenAssociaitonMetadata as expected
GetAccountInfo/Balance will have only a limited amount of token association data in them [dictated by "tokens.maxPerAccount"`]
CryptoDelete no longer skips validating zero token balances on deleted tokens. All associated token balances must be zero and one would have to dissociate/transfer away any token balances to be eligible for deletion.
TokenBurn, TokenMint and TokenWipe operations should update the treasury's/account's numZeroBalances in their TokenAssociaitonMetadata respectively.
CryptoTransfer should update the sender's and receiver's numZeroBalances accordingly
The text was updated successfully, but these errors were encountered:
anighanta
changed the title
HIP - 1000 : Remove limit on the number of tokens that can be associated to an account
HIP - 367 : Remove limit on the number of tokens that can be associated to an account
Mar 21, 2022
"tokens.maxPerAccount"
<EntityNumPair, MerkleTokenRelStatus>
instead of using CopyOfWriteIds array to track the associated token Ids whereMerkleTokenRelStatus
serves as a doubly linkedList node.TokenAssociaitonMetadata
which will encapsulatenumAssociations
-> current token association count,numZeroBalances
-> zero balanced token associations among the current associations andlastAssociation
-> EntityNumPair of last token association.numAssociaitons
andnumZeroBalances
.TokenAssociaitonMetadata
as expectednumZeroBalances
in theirTokenAssociaitonMetadata
respectively.numZeroBalances
accordinglyThe text was updated successfully, but these errors were encountered: