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

feat: burn rune through forcing Cenotaph #3683

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

nghuyenthevinh2000
Copy link

@nghuyenthevinh2000 nghuyenthevinh2000 commented Apr 25, 2024

fixes: #3640

add a command to burn all specific runes in a wallet

Logic

  1. Add Burn impl in subcommand/wallet: forcing burn through Cenotaph EdictOutput Flaw

Test

  1. Add a happy case test burning_rune_works():
  • send 100 rune to address B
  • burn rune in address A (which contains 900 rune), confirming that balances only return 100 rune
  • confirm that rune info return burned amount of 900

I think it can be fine - grained further to burn exact amount in a wallet through protocol recognized burn addresses. However, changes to updater are required to recognize the burn addresses. Changes to updater can be a lenghtly review process as it touches the core, so probably in another PR. Which burn addresses can be a topic for debates @raphjaph

However, in this PR, I still include burn address constants for reviews

// satoshi first block address
 pub const MAINNET_BURN_ADDRESS: &'static str = "1FvzCLoTPGANNjWoUo6jUGuAG3wg1w4YjR";
 // just a random testnet address
 pub const TESTNET_BURN_ADDRESS: &'static str = "tb1prqr6lpxeqcyfff8n7c748ad7szyh8hwmf9nly598r5uqewkm4kms0nevay";
 // just a random regnet address
 pub const REGNET_BURN_ADDRESS: &'static str = "bcrt1pyf99p0qrt8dsx8a8hnd7edzpnnpsndf9ce6hhx55s9f9v84e48eqdlyd6n";

@onchainguy-btc
Copy link
Contributor

onchainguy-btc commented Apr 29, 2024

I implemented a generic burn in #3437. Can extend that to support runes?

@raphjaph
Copy link
Collaborator

I'll have a look at generic burning first (#3437) but probably we don't want to do protocol level burning through cenotaphs but rather by sending to an OP_RETURN.

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

Successfully merging this pull request may close these issues.

Feature request: command to burn runes
3 participants