hardhat – How to Deploy on Private Chain with Zero Fees Using Hardhat

gnosis-safehardhathardhat-deploy

Using Hardhat, I am trying to deploy a contract on my private chain which has no gas fees.
When doing the deploy, hardhat throughs a "insufficient funds" error …
I would like to override the gasprice to 0 , but cant find where to do that.

I tried to add this to my hardhat.config.ts to my custom network object config:

gasPrice: 0,
gas: "auto",
gasMultiplier: 0,

but it didn't do the trick….

can someone please help on that ?
thanks in advance

Best Answer

i've found the issue. it was actually coming from gnosis-safe where they have a system in place to have deterministic addresses for their smart contracts and they are using presigned transactions.

I just disabled the deterministic deployment option and it worked \o/