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.
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: tainted transaction reporting #5310
feat: tainted transaction reporting #5310
Changes from 5 commits
8dcf3b1
97967bf
6072fee
89caffd
8706bd8
4cbcde1
cb6d4c3
ca6f813
84d5182
161be64
4ba1ecb
ec4ce2d
0af1b50
df4529e
8f835eb
8b18adf
961b0af
46757df
d61390c
3e4d901
c76fd40
6373909
19feaf3
506db26
8d628ec
2cb9bfd
07e76f6
a7ad89e
d290643
b75c29c
8f2b133
e9ae4a7
16ddff9
9299e6e
44db88a
6ddcb2f
041b26c
d3e78ca
825c6a0
13e8841
9c9d636
53edef2
95e88f3
6a70d60
315b278
10cdcdf
326d304
af46925
7ef3189
083ebfa
c45ec0f
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Until refund parameters are optional, this has to stay optional. We can change it after this is done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But we can't refund anything if there is no refund address?
Doesn't it make more sense to make it required here, and handle the case where we don't have it before storing this value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it doesn't make any difference other than having to deal with less complex code if we go with the option variant. In the point of the swap flow where we have (or have not) the refund address, it's already too late to do anything else than saving what we have and exit the swap logic. What do you want to save if there is just no address? The solution is to make the refund parameters a requirement, so this can not happen, but since this is not done yet, we should go with an option here and replace it after @msgmaxim has solved this in his PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, my preference is that we keep the option in this PR. Then once I change the interface to always require refund address, I will update this code too (and the code won't get compiled if I forget to do this).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just linking this (a suggestion to keep refund address optional). https://linear.app/chainflip/issue/PRO-1702/make-refund-params-not-optional#comment-f29a2edb. If we all agree that this is the right way to do it, would it make sense to this runtime check (if input asset is BTC) in this PR (considering that now would be a local change, and also the fact that we want to release this before vault contract swaps)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DepositDetails can be freely set by the caller, so we need to be defensive here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider what happens if same tx is reported twice by different parties.
I think we might need a double-map.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point