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

Added checksum to eth address, added teleburn to inscriptions page #1825

Merged
merged 4 commits into from
Jun 9, 2023

Conversation

rot13maxi
Copy link
Contributor

In this PR:

  • eth teleburn addresses now have checksums in them. Had to take a dependency on rust-crypto, but didn't take any eth-specific dependencies
  • added the ethereum teleburn address to the inscription detail page
  • tests!

@rot13maxi rot13maxi mentioned this pull request Feb 23, 2023
8 tasks
@cbspears
Copy link
Contributor

This looks pretty fun!

@@ -10,35 +11,10 @@ pub struct Output {
ethereum: EthereumTeleburnAddress,
}

#[derive(Debug, PartialEq)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test comment plz ignore

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review ACK

This reviews suggested changes are to "plz ignore" and that is what I do with code reviews anyways.

Copy link
Contributor

@cryptoquick cryptoquick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really love this work, but just one question.

fn from(inscription_id: InscriptionId) -> Self {
let digest = bitcoin::hashes::sha256::Hash::hash(&inscription_id.store());
Self {
address: create_address_with_checksum(&digest[0..20].to_hex()),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it make more sense to just use md160 as the hash function here? It's the same one that hashes public keys in P2WPKH addresses, and it also produces 20 bytes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There’s an implementation that @casey and rob did thats already been used to teleburn some NFTs, so i stuck with this to not invalidate that burn

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha, well, this works too!

Copy link
Collaborator

@raphjaph raphjaph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it. Just gonna merge this into the teleburn branch so we can continue discussing there.

@raphjaph raphjaph merged commit d9a6220 into ordinals:teleburn Jun 9, 2023
@rot13maxi rot13maxi deleted the teleburn branch June 9, 2023 13:23
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

Successfully merging this pull request may close these issues.

5 participants