HomePhabricator

[Cashtab] [Chronik] [Tx Gen] Token transaction refactor - part 1 createToken

Description

[Cashtab] [Chronik] [Tx Gen] Token transaction refactor - part 1 createToken

Summary:
T2503

Refactor the createToken function to utilize the newly landed generateTxInput & generateTxOutput utility functions, as well as the new approach of signing input UTXOs, building tx and broadcasting via the chronik client.

At this point in the diff avoid burning tokens because that's still being broadcasted via bch-api, which will confuse chronik and result in 'Invalid SLP burns' errors when trying to create another token.

Test Plan:
npm test and ensure the chronikfied unit tests all pass
npm start
create a new token with no image and ensure successful creation (check decimals, supply...) and able to be sent
verify via explorer that the XEC change (if exists) is returned to the creator
create a new token with an image and ensure successful creation (check decimals, supply...) and able to be sent

Reviewers: bytesofman, #bitcoin_abc

Reviewed By: bytesofman, #bitcoin_abc

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

Details

Provenance
emackAuthored on Oct 19 2022, 13:52
emackPushed on Oct 25 2022, 06:39
Reviewer
Restricted Project
Differential Revision
D12299: [Cashtab] [Chronik] [Tx Gen] Token transaction refactor - part 1 createToken
Parents
rABCce74285270d4: [Cashtab Extension] fixed roaming nav menu when extension popped out
Branches
Unknown
Tags
Unknown