-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Feature Request: MultiOutput Edict for Airdrops #3658
Comments
I would like to second this request on behalf of many in the Ordicord. This has been the number one ask since halving by those wishing to airdrop their premined runes. |
Note that according to this post from less than 2 hours ago this feature is already implemented in the protocol: To use it you set It seems like it may also airdrop to yourself. If that's the case, that's not ideal. You typically wouldn't want the airdrop to include the output where you are sending the remaining change, Also note, even if this is considered sufficient, there are some remaining things to do: For reference, the code to the current implementation is here: ord/src/index/updater/rune_updater.rs Lines 81 to 112 in 1e6cb64
|
@raphjaph the current split all works great already, what is needed rather is a flag for excluding an output # from the split all, so that we can reliably exclude change outputs |
following the pattern that's already in place, this allows the possibility for other kinds of special Edicts with new behaviors in the future, like: |
We now have the
You can actually implicitly exclude the change output by prepending an edict that allocates the surplus runes to the change output. The second edict then allocates 10 UNCOMMON•GOODS to all remaining outputs (until no more input runes left) but since we already transferred the surplus to the change output it won't receive any extra runes. Example: Airdrop 10 UNCOMMON•GOODS each to 8 people. Inputs:
Outputs:
I will close this since you can actually exclude the change output and airdrop efficiently. I will open a new issue to actually implement this logic in |
This would make it a lot simpler to do large airdrops, and would require much fewer transactions, making it more cost efficient as well.
Based on:
ord/crates/ordinals/src/edict.rs
Lines 4 to 8 in 91a14fd
I can see that the type of
output
isu32
, i.e can have a maximum value of:4,294,967,295
According to: https://bitcoinops.org/en/tools/calc-size/
You could probably fit
roughly 100,000 outputs
in a transaction that would be large enough to hit the block size limit.So, given that the higher values are actually far from achievable, I suggest when
output
has a value ofu32::MAX
, we treat it as meaning:amount
to every output (except the output to which the remaining change is sent to)This approach requires no changes to the runestone's data structure or size, so it is 'free' as far as the runestone size fitting in a
OP_RETURN
is concerned.The text was updated successfully, but these errors were encountered: