-
Notifications
You must be signed in to change notification settings - Fork 14
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
ft_watcher: sol swap layer #356
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bingyuyap
commented
Aug 16, 2024
watcher/src/fastTransfer/swapLayer/helper/decodeSwapLayerMessage.ts
Outdated
Show resolved
Hide resolved
bingyuyap
commented
Aug 16, 2024
watcher/src/fastTransfer/swapLayer/helper/decodeSwapLayerMessage.ts
Outdated
Show resolved
Hide resolved
watcher/src/watchers/__tests__/fastTransfer/SolanaSwapLayerParser.test.ts
Outdated
Show resolved
Hide resolved
watcher/src/watchers/__tests__/fastTransfer/SolanaSwapLayerParser.test.ts
Outdated
Show resolved
Hide resolved
bingyuyap
force-pushed
the
bing/ft_sol_swap_layer
branch
2 times, most recently
from
August 17, 2024 11:51
523c651
to
dc77bb9
Compare
panoel
reviewed
Aug 19, 2024
panoel
reviewed
Aug 19, 2024
panoel
reviewed
Aug 19, 2024
panoel
reviewed
Aug 19, 2024
panoel
reviewed
Aug 19, 2024
panoel
previously approved these changes
Aug 19, 2024
bingyuyap
force-pushed
the
bing/ft_sol_swap_layer
branch
from
August 20, 2024 23:19
38615bf
to
772677e
Compare
bingyuyap
force-pushed
the
bing/ft_sol_swap_layer
branch
2 times, most recently
from
August 20, 2024 23:49
3f3d3c7
to
90467ce
Compare
panoel
approved these changes
Aug 26, 2024
ft_watcher: test: mock tests ft_watcher: working solana swap layer parser ft_watcher: fix tests ft_watcher: fix swap recipients and token balances ft_watcher: remove unused mock files ft_watcher: update mock file names ft_watcher: move getTokenBalance ft_watcher: clean sol parser ft_watcher: add batched parseFill ft_watcher: update names ft_watcher: minor tweaks ft_watcher: formatter ft_watcher: fix tests ft_watcher: add comment Signed-off-by: bingyuyap <bingyu.yap.21@gmail.com>
Signed-off-by: bingyuyap <bingyu.yap.21@gmail.com>
bingyuyap
force-pushed
the
bing/ft_sol_swap_layer
branch
from
August 26, 2024 14:41
90467ce
to
0b4dca1
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds the Solana Swap Layer parser - to parse the completion of Fast Transfer that ends on Solana.
This PR might seem big but actually 7,339 line of the code are from IDL and test mock data. There is no Devnet Swap Layer now so we would have to mock these data.
We are parsing 6 complete ix:
complete_transfer_direct
complete_transfer_payload
complete_transfer_relay
complete_swap_direct
complete_swap_payload
complete_swap_relay
and a
release_inbound
ixcomplete_*_payload
ix is for dApps building on top of swap layer. It usesstaged_inbound
as an intermediary account to store the payload, which is released by therelease_inbound
. Hence there is a need to parse this ix and link it back to thecomplete_*_payload
viastaged_inbound
pubkey.TODO:
complete_*_relay
should haverelaying_fee
but afaik the only way to find out is through thefill
account which is closed at the end, hence we aren't able to grab the fee now. I am in the process of clarifying this with drew and karl but it is the weekend so I will open another PR for this.