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

Allow burn to have a callback just like Send #717

Closed
ferencdg opened this issue May 6, 2022 · 6 comments
Closed

Allow burn to have a callback just like Send #717

ferencdg opened this issue May 6, 2022 · 6 comments

Comments

@ferencdg
Copy link

ferencdg commented May 6, 2022

it would be nice to have contracts (usually the owner) notified that certain tokens have been burned just like it is done with the Send message

@ueco-jb
Copy link
Member

ueco-jb commented May 6, 2022

Is cw-plus right place for such request?
Could you share more details what you have in mind with Send message callback?

@ferencdg
Copy link
Author

ferencdg commented May 9, 2022

Is cw-plus right place for such request? Could you share more details what you have in mind with Send message callback?

sorry what I meant is your cw20 implementation
https://github.com/CosmWasm/cw-plus/blob/main/packages/cw20/README.md

the send allows calling back a contract:
Send{contract, amount, msg}

however the Burn doesn't
Burn{amount}

but contracts might want to be notified too that some users burnt some tokens (possibly a token managed by the contract that needs to be called)

@mr-rooftop
Copy link

yes that would be very useful!

@ethanfrey
Copy link
Member

Currently, you could Send it to the contract, and that contract will do whatever action is expected, and then return another message to burn the tokens it just received.

Understood that is not the UX you want, but it will serve as a placeholder

@ethanfrey
Copy link
Member

Also, Burn was designed as an analog to Transfer (which doesn't call a contract).
We would need a new name for this method. And I'm still not sure it would be that heavily used such that my workaround (above) wouldn't be sufficient

@ferencdg
Copy link
Author

ferencdg commented May 18, 2022 via email

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

4 participants