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

Transfer event disambiguation request #621

Open
clockworkgr opened this issue Aug 9, 2024 · 0 comments
Open

Transfer event disambiguation request #621

clockworkgr opened this issue Aug 9, 2024 · 0 comments

Comments

@clockworkgr
Copy link

Hello,

Not sure if this affects others apart from myself but I believe it will be useful in the long run.

I am working on a generic cosmos indexing solution and when it comes to balance tracking, the easiest and most efficient way is to use the coin_spent/coin_received events as triggered on addCoins and subUnlockedCoins which are called on all exposed BankKeeper methods (incl. MintCoins). Listening for events of type types.EventTypeTransfer is not appropriate as these are not emitted on coin minting cases.

The change here: https://github.com/osmosis-labs/cosmos-sdk/blob/osmo/v0.47.5/x/bank/keeper/send.go#L290-L307 to the non-event emitting addCoinsImproved is perfectly understandable from a performance standpoint for epoch sends handling but completely breaks the indexing solution above.

The problem is that the events emitted for sendManyCoins are of the same type as the ones for standard transfers, i.e. types.EventTypeTransfer which as explained above are problematic as the only balance tracking tool.

Not entirely certain how this can be improved. Perhaps an additional attribute to the event to clarify the triggering origin?

Thanks,

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

No branches or pull requests

1 participant