0xFableOrg / roll-op

The simplest way to spin your own dev / prod rollup, fully configurable.
BSD 3-Clause Clear License
92 stars 25 forks source link

The deployment of the 4337 contracts fail the first few times because of "insufficient funds". #58

Closed norswap closed 11 months ago

norswap commented 1 year ago
| Error: insufficient funds for intrinsic transaction cost [ See: https://links.ethers.org/v5-errors-INSUFFICIENT_FUNDS ] (error={"name":"ProviderError","_stack":"ProviderError: HttpProviderError\n    at processTicksAndRejections (node:internal/process/task_queues:96:5)
|     at processTicksAndRejections (node:internal/process/task_queues:96:5)

See https://github.com/0xFableOrg/roll-op/pull/55 for more details.

norswap commented 1 year ago

Feeling like rewriting using a Foundry deploy script would probably fix the issue.

However, doing so would mean the deployment is no longer deterministic. How big of an issue is this?

We could make the deployment deterministic, but it would require deploying the Create2 factory contract to the chain, at a well-known address (Foundry turns CREATE2 calls in the deploy scripts into calls to this factory).

This requires sending a legacy transaction to deploy the factory, whose calldata is here: https://twitter.com/norswap/status/1588537558878720005 (note how this question was stupid, I could have looked that up from the block explorer on any chain where it was deployed).

eerkaijun commented 11 months ago

This has now been fixed. The two commits in the account abstraction repo fixes this:

  1. https://github.com/0xFableOrg/account-abstraction/commit/a9857c5fef48e024e220fe4386409328688138a0 - wait for transaction to complete
  2. https://github.com/0xFableOrg/account-abstraction/commit/f3296ad40976c627f95156d67e63cc65b087e5da - update Hardhat version solves the insufficient funds issue