-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
How to burn tokens to zero address #11020
Comments
just send to zero address? |
I want to reduce totalSupply and distribute the reduced amount to zero address. |
Burncoins burns from module accounts. Are you trying to burn tokens owned by a user? |
I tried to implement an ERC20-like mechanism through a custom module.When user trying to burn token, I want to send it to zero address. |
you can send the tokens to the bech32 representation of the |
I think the question is sufficiently answered here 👍 |
Are you guys open to a PR that adds this? |
Yes I think so @larry0x, but we have to ensure it's only executed by the authority allowed to do it, e.g. governance. |
Hmm what's the problem letting people burn their tokens permissionlessly? |
I misunderstood then. I assumed you wanted to burn tokens from a module account. I think there should probably be both. Allowing a user to burn their assets (permissionless) and a module account (authority-based). |
i think it should all be permission less but a user could not say burn funds from x account. this goes back into the discussion of the router making sure only the signer/module from where the msg originates can call the message. Gov should not set bank as the address which is burning |
well I mean
Not sure where you got this from? For burning module tokens, you need an authority s.t. it can be executed. The same way |
Validatebasic never checked the origin just if it can be decoded. |
It did. It checked signer == <exepedted_origin>, e.g. |
Sorry I can't join the discord (because the double counter),
I want to burn tokens to zero address(like solidity
address(0)
), but I didn't find the proper way, every one can help me./x/bank/keeper/keeper.go#BurnCoins
,seems to just reduce total supply?The text was updated successfully, but these errors were encountered: