Im in trouble i ve deployed a smart contract who is functionnally on testnet but in mainnet the withdrawFunds function failed

There is the smart contract


and there is the failed tx


its very difficult for me to found any solutions and the lost amount is 2.31 ETH

Please help me

1 Answer 1


It fails because the recipient is a safe contract wallet and the gas allocated for a transfer 2300 it not enough to execute the safe contract fallback.

For a while guides do not recommend using .send() or .transfer(). See here <address>.send vs <address>.transfer best practice usage? for more details.

  "from": "0x7eeaad9c49c5422ea6b65665146187a66f22c48e",
  "gas": "0x2dc6c0",
  "gasUsed": "0x99f2",
  "to": "0x020bc070dd97cee4f7e8fd2624c217da617b7db1",
  "input": "0x24600fc3",
  "error": "execution reverted",
  "calls": [
      "from": "0x020bc070dd97cee4f7e8fd2624c217da617b7db1",
      "gas": "0x8fc",
      "gasUsed": "0x8fc",
      "to": "0x218fc4decf4b2e2251bb28cdf5ccc5b93bf58f1b",
      "input": "0x",
      "error": "out of gas",
      "value": "0x202c2b606c223a00",
      "type": "CALL"
  "value": "0x0",
  "type": "CALL"
  • Perhaps naively, wondering is there anyway to use eth_createAccessList here (EIP2930), have used to unstick before, though wasn't in this case and running a quick sim through the one base provider I found with the method, while can create the access list didn't help with the simulation after. Wonder if missing something as it is suggested that EIP also works for the EOA -> contract -> contract case, and generally should work for all known cases of breakage due to gas cost increases. But I haven't explored it enough here.
    – Maka
    Apr 9 at 7:41
  • Ok. I used safe for security but my money is lost forever. Impossible to recover the funds ?
    – developper
    Apr 9 at 10:22
  • @JonathanCHARLOT It seems the issue was resolved that is really nice. I can only for the future to test thoroughly before going to production, sometimes mistakes are really expensive. In similar cases I'd suggest to contact Safe developers, they probably know how to deal with this type of situations.
    – Ismael
    Apr 9 at 19:05
  • 1
    Its resolved. The only way to use transfer to a safe is the function must be call by the safe
    – developper
    Apr 10 at 11:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.