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

metadata string added for inscribe file #1899

Closed
wants to merge 5 commits into from

Conversation

MBenz12
Copy link

@MBenz12 MBenz12 commented Mar 8, 2023

  1. In casey ord github repo (https://github.com/casey/ord). There is a inscribe command situated at this path (https://github.com/casey/ord/blob/master/src/subcommand/wallet/inscribe.rs). We need add to start accepting a new parameter in this file.
    Purpose of this param - this param will let anyone pass an additional string param and will attach this param to the meta information of the file.

Example,
ord wallet inscribe FILE --metadata "metada_string"

  1. After the above, your inscription struct (https://github.com/casey/ord/blob/master/src/inscription.rs) will have the meta information that we attached to this. This struct powers this template (https://github.com/casey/ord/blob/master/src/templates/inscription.rs). So what we need to do is, start displaying meta information in this view.
    Currently this view looks like this (https://ordinals.com/inscription/431fea141cfc2e6f8dda9c209fbe9ce411e9e158d48661e86cbd0cc5e0bc33f5i0)
    It should show meta information somwhere that we attached

@tyjvazum
Copy link

tyjvazum commented Mar 8, 2023

With the code you've provided, nothing would actually be done with the metadata. It wouldn't be written in the inscription transaction and it wouldn't be read when an inscription is parsed from the blockchain. It'd need a tag and correct builder/parser logic for that. Take a look at https://github.com/casey/ord/pull/1713 for an example of how that can be implemented.

@MBenz12
Copy link
Author

MBenz12 commented Mar 9, 2023

thanks for your advice @tyjvazum
I've added that features,
could you please review my code again?

@tyjvazum
Copy link

tyjvazum commented Mar 9, 2023

That looks reasonable to me, but the tag should be an odd number since even numbers break backward compatibility, causing the inscription to be ignored. There should also be some tests for it. Hopefully a collaborator will merge it, because metadata is a great feature that ideally should have been in place from day one.

@coding-hunk
Copy link

Hey mate @MBenz12 ,
Glad to see you raised a PR with same technical solution which I suggested you in discord. Would have been better if you could have told me that you also want to contribute here.
Reference - Issue
We have already raised PR to Casey's open issue for traits. Would request to help us in getting that PR merged or you can further contribute in the PR to improve it further. Let's work together to make Ordinals more strong ecosystem :)

@MBenz12
Copy link
Author

MBenz12 commented Mar 16, 2023

sorry @coding-hunk
I didn't check you already created pr for this issue,
I will close my pr.
I hope to work together to make Oridinals more strong.
thanks for your contribution

@MBenz12 MBenz12 closed this Mar 16, 2023
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.

3 participants