hardhat_setBalance
blocking create2 deploys on anvil
#764
Labels
status:ready
This issue is ready to be worked on
hardhat_setBalance
blocking create2 deploys on anvil
#764
This was first raised in the discord channel: https://discord.com/channels/750408878008827925/1153426756901032037/1243258480874360883
If you use
create2
as a strategy when deploying against anvil, then because anvil has a chain id of 31337, the same as Hardhat, we attempt to deploy acreateX
factory if it is not present. This requires ahardhat_setBalance
call to be made to the account that is used for deploying thecreateX
factory.In Hardhat, the rpc call
hardhat_setBalance
returns a boolean. It appears not to in anvil. Ignition on not getting the expected return result throws an error:Approach
We should loosen the
hardhat_setBalance
return type check to allow anvil to pass. In Hardhat we always return true, or throw if we where unable to set the balance; so the check on the Ignition side is redundant.Testing
This is a small fix, but we should double check
create2
runs against anvil manually.Workaround
In the meantime, manually deploying the
createX
factory then running an Ignition deploy withcreate2
strategy should work.The text was updated successfully, but these errors were encountered: