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.
Current changes
1. POST Request Improvements
Fixes item 2 of #7421, which says:
For Flow A (pure zkSync) the POST request is now sent after the initial transfer from the nominal zkSync wallet to the Gitcoin zkSync wallet. This means if transfers fail we'll still have all the contribution data in a JSON Store and saved as contributions/subscriptions
For Flow B (L1 deposit) nothing is changed. The POST request is still sent after the deposit tx is sent, but before it is mined (and therefore before any L2 txs occur)
(Need to do more testing and updates of the tx validator locally, but this should be merged and deployed since there are a lot of other changes)
2. More conservative fees/amounts
Fixes item 1 of #7421, which says:
I'm not able to reproduce these locally, so for now we've worked around this by increasing the fee margin. This is analogous to raising the gas limit to ensure L1 txs don't fail
3. Ensure "new account" fee is used
Transfers to new accounts on zkSync are more costly than transfers to existing accounts. Previously we fetched the fee by just pretending we were sending to
0x0000000000000000000000000000000000000001
, since no one has sent to this address.However, this code would "break" and give lower fee estimates if someone ever does send to this address. To remedy this, we now check the fee by generate a random address each time and pretending we're sending to that address. The address space is large enough that we are effectively guaranteed to always have a never-been-used address there
4. Fix for zero DAI donations to Gitcoin
Fixes item 5 of #7421, which says:
5. Fix for batch zkSync checkouts using ETH
Fixes items 3 and 6 of #7421, which are the same bug:
The error was that in this situation we tried to check the ETH balance with
balanceOf
, which caused the error.6. Fix for final zkSync transfer
Fixes item 4 of #7421, which says:
7. Fix extra deposits not being included
This feature was broken in a previous PR, and now is resolved