safe-global / safe-smart-account

Safe allows secure management of blockchain assets.
https://safe.global
GNU Lesser General Public License v3.0
1.84k stars 907 forks source link

ProviderError: not enough gas supplied for intrinsic gas costs #716

Closed cristianopolicarpo closed 8 months ago

cristianopolicarpo commented 9 months ago

Hello Guys,

I'm experiencing the following when trying to deploy contracts on a custom network (49049) - https://floripa-explorer.wireshape.org/, and I have the following error below:

@safe-global/safe-contracts@1.4.1-build.0 deploy-all
hardhat deploy-contracts --network custom

Nothing to compile
No need to generate any newer typings.
deploying "SimulateTxAccessor" (tx: 0xa7216598d80d4b1a5d1347aa674893215b2dd836719a7d626e38059bea8c7260)...: deployed at 0x725dBa629570a34F41556540359B48b227C23963 with 70370 gas
deploying "SafeProxyFactory" (tx: 0x574e769eaa41f5887e0f7cd1e8ebd035ffacaafe739eb7757edb983600f912b2)...: deployed at 0x64d8DEDF5c125f9Fe718C339f4E026B846E0979A with 103755 gas
deploying "TokenCallbackHandler" (tx: 0x6854aca9a20f3a4db9af5739141351a00d1cfdeeb3f26a2f181a4f65e75bb728)...: deployed at 0x45a03a27D4BA1B0CC9784E3961C5f6C16aCBd381 with 84655 gas
An unexpected error occurred:

Error: ERROR processing /mnt/ws2/repositories/safe-contracts/src/deploy/deploy_handlers.ts:
ProviderError: not enough gas supplied for intrinsic gas costs
    at HttpProvider.request (/mnt/ws2/repositories/safe-contracts/node_modules/hardhat/src/internal/core/providers/http.ts:88:21)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at DeploymentsManager.executeDeployScripts (/mnt/ws2/repositories/safe-contracts/node_modules/hardhat-deploy/src/DeploymentsManager.ts:1214:19)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async DeploymentsManager.runDeploy (/mnt/ws2/repositories/safe-contracts/node_modules/hardhat-deploy/src/DeploymentsManager.ts:1060:5)
    at async SimpleTaskDefinition.action (/mnt/ws2/repositories/safe-contracts/node_modules/hardhat-deploy/src/index.ts:442:5)
    at async Environment._runTaskDefinition (/mnt/ws2/repositories/safe-contracts/node_modules/hardhat/src/internal/core/runtime-environment.ts:333:14)
    at async Environment.run (/mnt/ws2/repositories/safe-contracts/node_modules/hardhat/src/internal/core/runtime-environment.ts:166:14)
    at async SimpleTaskDefinition.action (/mnt/ws2/repositories/safe-contracts/node_modules/hardhat-deploy/src/index.ts:593:32)
    at async Environment._runTaskDefinition (/mnt/ws2/repositories/safe-contracts/node_modules/hardhat/src/internal/core/runtime-environment.ts:333:14)
    at async Environment.run (/mnt/ws2/repositories/safe-contracts/node_modules/hardhat/src/internal/core/runtime-environment.ts:166:14)
    at async SimpleTaskDefinition.action (/mnt/ws2/repositories/safe-contracts/node_modules/hardhat-deploy/src/index.ts:682:5)

Any ideas on how to resolve the issue will be greatly appreciated!

mmv08 commented 9 months ago

The error seems to be coming from your RPC node. What I'd suggest to do:

  1. Make sure that you have enough token to cover the gas costs
  2. You could try to execute the transaction yourself by checking deployment transactions on other networks
  3. Check the requests hardhat is making and see if the estimations are sane
mmv08 commented 8 months ago

I'm closing this due to inactivity. If you have any more questions, feel free to post them here or create a new issue.