Skip to content

Allow creating offers for runes #4183

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

Open
casey opened this issue Jan 16, 2025 · 10 comments
Open

Allow creating offers for runes #4183

casey opened this issue Jan 16, 2025 · 10 comments

Comments

@casey
Copy link
Collaborator

casey commented Jan 16, 2025

Offers for runes are trickier than for inscriptions, since the bidder must specify not only which rune they wish to buy, but which UTXO or UTXOs containing those runes they want to create an offer for.

As a first pass on this feature, we should allow:

  • ord wallet offer create --rune <AMOUNT>:<NAME> --utxo <UTXO>
  • ord wallet offer accept --rune <AMOUNT>:<NAME>

Where UTXO is the utxo containing the runes to bid on, is the amount to purchase, and <NAME> is the name of the rune.

The offer should send all other runes to the seller recipient address.

@joshdoman
Copy link

Should this issue include sub-balance rune buy offers? It would be fairy easy to add to PR #4282 but I don't want to unnecessarily expand the scope if that should be a separate PR.

@casey
Copy link
Collaborator Author

casey commented Mar 20, 2025

By sub-balance rune buy offer, you mean an offer to buy less of rune X than the total amount in <UTXO>? I think this is super easy to do as a follow-up, so I would say let's keep the initial PR small.

@casey casey closed this as completed Mar 20, 2025
@casey
Copy link
Collaborator Author

casey commented Mar 20, 2025

Gah, didn't mean to close T_T

@casey casey reopened this Mar 20, 2025
@joshdoman
Copy link

Sounds good! Should I also remove the functionality to handle multiple UTXOs and make that a separate PR? I added that this morning after re-reading the issue and seeing you mention UTXOs plural. In the interest of keeping PRs small, it could make sense to separate that out.

@casey
Copy link
Collaborator Author

casey commented Mar 20, 2025

Yah, I would say that should go in a follow up.

@joshdoman
Copy link

Sounds good, I'll remove it from the PR.

@casey
Copy link
Collaborator Author

casey commented Mar 20, 2025

I actually think that, if it makes the PR simpler, we could also remove anything which requires adding a runestone. So, you can buy all the runes of a single type in a UTXO, and if there's anything else in there, it barfs. I just looked at the PR, and it's still very large, 3200, so I'm just thinking anything that can be removed should be.

@casey
Copy link
Collaborator Author

casey commented Mar 20, 2025

I'm also not sure if the commands should operate in different "buying runes" vs "buying inscriptions" modes. It really depends on which one makes the code simpler.

@joshdoman
Copy link

We can do that. Looking like it'll be ~4 PRs: one for no-runestone offers, one for multiple runes in a UTXO, one for multiple UTXOs, and one for offers less than the balance held in a UTXO (not necessarily in that order).

I'm also not sure if the commands should operate in different "buying runes" vs "buying inscriptions" modes. It really depends on which one makes the code simpler.

We can talk about it but I personally do think it makes the code simpler separating it out.

@casey
Copy link
Collaborator Author

casey commented Mar 20, 2025

Sounds good, just posted on the PR, so you can follow up on my comments there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: To Do
Development

No branches or pull requests

3 participants