Open polyphia opened 1 year ago
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 !
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
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