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.
Context
This PR fixed the price error issue found in the SDK, and adds a test to verify the fix for the transfer issue in HolographDropERC721V2.
This PR also added some tests to highlight the fact thats the issue occurs also on all other chains, but the block explorer doesn't display failed transfer that are handled by the code.
Transactions that has failed transfers
Sepolia
OP Sepolia
Base Sepolia
Zora Sepolia
Arbitrum Sepolia
BNB
Fuji
Describe Changes
OutOfFunds
error using foundryTests overview
The goal of the tests is to reproduce the exact same transaction as the one failing on sepolia and to reproduce it a second time with the new bytecode of the HolographDropERC721V2 to see if it fixes the issue.
test_V2PurchaseFreeMoeWithOldVersion
EvmError: OutOfFunds
test_V2PurchaseFreeMoeWithNewVersion
EvmError: OutOfFunds
All other tests
EvmError: OutOfFunds
Steps to run tests
Note
You need to use a forks networks at the same block as each transaction to reproduce to replicate the exact same behavior, you can use tenderly to create forks at custom blocks.
e.g.
https://rpc.tenderly.co/fork/[YOUR_FORK_UUID]
👉 Run the first test
This test reproduce the exact bugged sepolia transaction
forge test --mt test_V2PurchaseFreeMoeWithOldVersion -vvvv
You shoud see that the last transfer to
0xa57106357F9A487F6AfBaA3758e7fCcB787113c4
is failing👉 Run the second test
This test reproduce the exact [bugged sepolia transaction] but with the old bytecode replaced by new fixed one.(https://sepolia.etherscan.io/tx/0xb8dcf96afafb93d9148c1c469712ec37be17b8913a68f2c1a1d371a18d1194fb)
forge test --mt test_V2PurchaseFreeMoeWithNewVersion -vvvv
You shoud see that the last transfer to
0xa57106357F9A487F6AfBaA3758e7fCcB787113c4
is not failing anymoreRun all other tests
Running all other test allow us to confirm that the issue also occurs on other network.
forge test --mt [TEST_NAME_TO_RUN] -vvvv
You shoud see that the last transfer to
0xa57106357F9A487F6AfBaA3758e7fCcB787113c4
is failingChecklist before requesting a review