Repository navigation
add owner to jetton burn actions (API-236) - #983
Merged
Merged
Conversation
When a jetton master forces a burn, jetton_burn comes from the master, so the burn action had the master as its sender, subtracted the burned amount from the master, and was invisible to the actual holder. JettonBurnAction now has Owner: the owner of the wallet the tokens were burned from. It comes from get_wallet_data (new InformationSource method JettonWalletsInfo, collected into TraceAdditionalInfo.JettonOwners), then from burn_notification's sender, and falls back to the sender. The value flow is charged to the owner, the owner is added to the bubble's accounts and to SubjectAccounts. Sender keeps its meaning, so the staking, Hipo and Affluent straws are unaffected; for a normal burn Owner == Sender. API: optional owner in JettonBurnAction and JettonOperation.
alpinskiy-top
approved these changes
Oct 13, 2026
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.
When a jetton master forces a burn (governance and stablecoin jettons),
jetton_burnreaches the holder's wallet from the master. The burn action then named the master as the sender and took the burned amount off the master in the value flow. It also wasn't attributed to the holder, who saw "Something happened but we don't understand what".JettonBurnActionnow hasOwner: the owner of the jetton wallet the tokens were burned from. It is always filled; for a normal burnOwner == Sender.Changes
core.InformationSource.JettonWalletsInforeturns the master and the owner of each jetton wallet.CollectAdditionalInfouses it in place ofJettonMastersForWallets, so it is still one lookup, and keeps owners inTraceAdditionalInfo.JettonOwners(serialized with the trace). Emulation fills owners as well.JettonMastersForWalletsstays for its other callers.JettonBurnStrawtakes the owner from additional info, then from thesenderofburn_notification, and falls back to the burn's sender. The value flow debits the owner, and the owner is added to the action's accounts and toSubjectAccounts, so the burn shows up in the owner's history.Senderkeeps its meaning, which the staking, Hipo and Affluent straws rely on.ownerinJettonBurnActionandJettonOperation, and a description forsender. On a forced burn,simple_preview.accountslists the master once instead of twice.Compatibility
core.InformationSourcegainsJettonWalletsInfo, so other implementations of it have to add the method.JettonWalletInfo.Owneris a*tongo.AccountID.core.JettonOperation.Owneris only passed through to the API here. litestorage has no jetton history, so a storage that returns jetton operations has to set it for burns.Testing
burn_notification, and the fallback to the sender; burn preview accounts; additional info JSON round trip.058304f3ba3c00b9360440e514039468e046fcaebbce42b4185b2003388266db: on master, the value flow debited the master and the owner saw no actions; nowOwneris the holder, the holder is debited 150000000 and sees the burn.ba9b4511a0631758258bc784b3f82d3d2b97f0b351d6afe4243c9773f6888f3e: identical apart fromOwner, which equals the sender.TestFindActionscan't currently run locally: the public mainnet liteservers no longer serve the golden blocks.Known limitations
get_wallet_dataor fromburn_notificationand isn't checked against the master. Jetton transfer straws trust thesenderoftransfer_notificationthe same way.burn_notification(a failed burn, a trace cached before this change),Ownerfalls back to the sender.