Transfer Rules
Transferring Dunes is a lot more straightforward than with drc-20s.
The first data push in a protocol message is decoded as a sequence of integers.
These integers are interpreted as a sequence of (ID, OUTPUT, AMOUNT) tuples. If the number of decoded integers is not a multiple of three, the protocol message message is invalid.
ID is the numeric ID of the run to assign
OUTPUT is the index of the output to assign it to
AMOUNT is the amount of the run to assign
ID is encoded as a delta. This allows multiple assignments of the same dune to avoid repeating the full dune ID. For example, the tuples:
[(100, 1, 20), (0, 2 10), (20, 1, 5)]
Make the following assignments:
ID 100, output 1, 20 dunes
ID 100, output 2, 10 dunes
ID 120, output 1, 5 dunes
The AMOUNT 0 is shorthand for "all remaining dunes".
After processing all tuple assignments, any unassigned dunes are assigned to the first non-OP_RETURN output, if any.
Excess assignments are ignored.
Dunes may be burned by assigning them to the OP_RETURN output containing the protocol message.
Last updated