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

Minted successful transactions reverting wrongly #14

Open
polyphia opened this issue Jul 18, 2023 · 2 comments
Open

Minted successful transactions reverting wrongly #14

polyphia opened this issue Jul 18, 2023 · 2 comments

Comments

@polyphia
Copy link

polyphia commented Jul 18, 2023

I am noticing a lot of transactions are showing as reverted during simulation even when they were successful on chain and we recreate all the same conditions in the simulation .

I thought this was an old issue related to contracts compiled with 0.8.20 but that issue has been addressed already .

Example of a token swap after the trading of a token was enabled (Simulating same block where the sequence took place)

curl -H "Content-Type: application/json" --data '[{ "chainId": 1, "from": "0xdACA53A595CCf52215093d870c6C9C1B9b9576E5", "to": "0xFBe804ACA20a6E4aD5380B55eA70Ef2919732Ed3", "data": "0xc9567bf9", "gasLimit": 30000, "value": "0", "blockNumber": 17713701 }, { "chainId": 1, "from": "0x4789dc1067636cc1B6936699c170f1BFF9De0574", "to": "0xBDa41EA6Cc112d1b65795777b9C1B76F35b6dC4E", "data": "0x627dd56a000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000fbe804aca20a6e4ad5380b55ea70ef2919732ed3000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000665d14f05984735949c000000000000000000000000000000000000000000000000000000a6fa4040718000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "gasLimit": 300000, "value": "0", "blockNumber": 17713701 }]' http://localhost:9081/api/v1/simulate-stateful/33b11f54-451d-4b54-8485-64a022a7f020

The first transaction is successful but the second one isn't, although it was successful on the simulated block .

This happens both when using simulate-stateful and simulate-bundle

@polyphia
Copy link
Author

Any update on this please ? It's quite problematic that transactions that should be successful are getting reverted so frequently :\

THis is a great project and gotta love the performance and simplicity , hopefully these small details can be addressed and are not an inherent limitation of Foundry / REVM .

Thanks !

@longhoangwkm
Copy link

longhoangwkm commented Oct 6, 2023

I think you can try with increase gasLimit value, this can be a reason to revert if not enough gas

gasLimit": 30000 seem too small for that tx

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

No branches or pull requests

2 participants