Skip to content
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

feat: thorchain utxo tx parsing #5986

Merged
merged 18 commits into from
Jan 15, 2024
Merged

Conversation

kaladinlight
Copy link
Contributor

@kaladinlight kaladinlight commented Jan 11, 2024

Description

Add transaction parsing for all supported thorchain transactions and associated transaction rows

Pull Request Type

  • 🐛 Bug fix (Non-breaking Change: Fixes an issue)
  • 🛠️ Chore (Non-breaking Change: Doc updates, pkg upgrades, typos, etc..)
  • 💅 New Feature (Breaking/Non-breaking Change)

Issue (if applicable)

#5967

Risk

Lowish - this is all additive, but we want to make sure the transactions are being displayed accurately

Testing

Ensure the transaction row is displaying the correct type and information for the following thorchain types on utxo chains:

  • Swap Request (Standard and Streaming)
  • Swap Received (Standard and Streaming)
  • Swap Refund (Standard and Streaming)
  • Liquidity Deposit (Savers and LP when we can test)
  • Liquidity Refund (Savers and LP when we can test)
  • Liquidity Withdraw Request (Savers and LP when we can test)
  • Liquidity Withdraw Received (Savers and LP when we can test)
  • Loan Open
  • Loan Open Refund
  • Loan Repayment
  • Loan Repayment Refund
  • Loan Collateral Received

Engineering

☝️

Operations

☝️

Screenshots (if applicable)

Swaps
swap
swapReceived
image

Streaming Swaps
streamingSwap
streamingSwapReceived
image

Savers
saversDeposit
saversWithdrawRequest
saversWithdrawReceived

LP
lpDeposit
lpWithdrawRequest
lpWithdrawReceive
image

Loan
openLoan
loanRepayment
loanReceived

@kaladinlight kaladinlight force-pushed the thorchain-utxo-tx-parsing branch from 37a85d7 to cdf5fde Compare January 11, 2024 22:51
@kaladinlight kaladinlight marked this pull request as ready for review January 12, 2024 00:01
@kaladinlight kaladinlight requested a review from a team as a code owner January 12, 2024 00:01
@gomesalexandre gomesalexandre self-requested a review January 15, 2024 11:58
Copy link
Contributor

@gomesalexandre gomesalexandre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few very nitpicky comments but overall looks stellar!

Started to test locally, but got some translation shenanigans e.g:

image image

Will get that fixed and retest.

Copy link
Contributor

@gomesalexandre gomesalexandre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Retested locally after fixing translations - overall LGTM, minus one issue with LP withdraw inbound

UTXO LP Deposit

image image

UTXO LP Withdraw

image https://viewblock.io/thorchain/tx/41D01C2860C8E6B3E4437F8EBE4EFE625DA4B9CB88CB5F519E9F849BEDC63FE1
  • Outbound is happy
image https://blockchair.com/bitcoin-cash/transaction/eb6fe3ff3846efbd530a7834812bb62ce63fb13c29d2a29709d84ead9bd6c460

Savers Deposit inbound

image image

Savers withdraw outbound

image

Savers withdraw inbound

  • isn't properly detected, though as I can see this isn't a bug but a feature, this isn't implemented and we probably don't have enough data from the Tx to make this work?
image

Loan Open

image image

Loan Close

Wasn't able to test as my deposit amount is too low

@kaladinlight kaladinlight force-pushed the thorchain-utxo-tx-parsing branch from 21ac43a to f58e07a Compare January 15, 2024 17:12
@kaladinlight
Copy link
Contributor Author

@gomesalexandre can you give me the tx for savers withdraw inbound so I can look at it?

@kaladinlight
Copy link
Contributor Author

swap back
image

@kaladinlight
Copy link
Contributor Author

kaladinlight commented Jan 15, 2024

@gomesalexandre can you give me the tx for savers withdraw inbound so I can look at it?

Ok, looks like this is a memo-less withdrawal. We can add logic to handle this, but it will be a bit more complicated. I will add a follow up ticket to address. We can add the memo to our withdrawal transactions in the meantime so we can detect display as is for savers withdrawals moving forward as well. Marginal increase in tx fee

#6001

Copy link
Contributor

@gomesalexandre gomesalexandre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested again locally, CR comments have been tackled, and the previously rugged translation is now happy

image

Get in

@kaladinlight kaladinlight merged commit 4fbcd56 into develop Jan 15, 2024
3 checks passed
@kaladinlight kaladinlight deleted the thorchain-utxo-tx-parsing branch January 15, 2024 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants