HomePhabricator

[Cashtab] Airdrop OP_RETURN patch

Description

[Cashtab] Airdrop OP_RETURN patch

Summary:

  • As per T2512, this diff embeds the airdrop token id into the message portion of the OP_RETURN output, rather than being its own hex'ed portion of the OP_RETURN script array.
  • sendXec() OP_RETURN script logic now appends the token id to the message string
  • parsedTxHistory() extracts the token id from the message substring and the remainder becomes the message content itself
  • Adjusted mockTxDataWithPassthrough and mockParsedTx to reflect this updated OP_RETURN parsing logic

Test Plan:

  • npm start
  • send airdrop with a message and observe only the message is displayed and verify full output hex in explorer is correct
  • ensure message is displayed correctly from an airdrop recipient wallet
  • send airdrop with no message and ensure no message is displayed and verify full output hex in explorer is correct
  • regression test the Msg button to copy the message content to clipboard
  • regression test an OP_RETURN message from electrumABC and ensure it's rendered as an external message
  • regression test a non-airdrop one to one XEC tx
  • regression test a non-airdrop one to many XEC tx
  • regression test an encrypted XEC message and verify correct output hex
  • regression test an eToken tx

Reviewers: bytesofman, #bitcoin_abc

Reviewed By: bytesofman, #bitcoin_abc

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

Details

Provenance
emackAuthored on Jun 21 2022, 04:05
emackPushed on Jun 24 2022, 01:47
Reviewer
Restricted Project
Differential Revision
D11644: [Cashtab] Airdrop OP_RETURN patch
Parents
rABCcc8d67e74c9e: Ignore lint check on randbytes since it's wrapped in a version check
Branches
Unknown
Tags
Unknown