HomePhabricator

[Cashtab] Upgrade SLPv1 genesis txs

Description

[Cashtab] Upgrade SLPv1 genesis txs

Summary:
Have had helper functions in here for awhile but was working on the best way to implement.

For a Genesis tx, I think it's best to preserve the existing SendXec function and simply load it with targetOutputs that match SLP spec. We do not need to select any token utxo inputs for a genesis tx.

Modify getSlpGenesisTargetOutput function to return to-spec target outputs for a fixed supply genesis tx. Implement in CreateTokenForm.js.

The resulting tx differs from the legacy tested tx only in having a better calculated fee.

Test Plan:
npm test

npm start and create an etoken with an icon to make sure this works (or trust me on this one, I did it and it does work)

image.png (74×491 px, 8 KB)

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

Differential Revision: https://reviews.bitcoinabc.org/D15510

Details

Provenance
bytesofmanAuthored on Feb 21 2024, 19:46
bytesofmanPushed on Feb 22 2024, 12:46
Reviewer
Restricted Project
Differential Revision
D15510: [Cashtab] Upgrade SLPv1 genesis txs
Parents
rABC5c74e91f6f20: [Cashtab] Improve useWalletStorage tests
Branches
Unknown
Tags
Unknown