foundry icon indicating copy to clipboard operation
foundry copied to clipboard

Error: Mac Mismatch - multi-chain deployment doesn't work with account/sender setup

Open PatrickAlphaC opened this issue 10 months ago • 2 comments

Component

Forge

Have you ensured that all of these are up to date?

  • [X] Foundry
  • [X] Foundryup

What version of Foundry are you on?

forge 0.2.0 (0c961f7 2024-04-07T00:19:01.787620000Z)

What command(s) is the bug in?

forge script

Operating System

macOS (Intel)

Describe the bug

Deploying contracts with --account xxx --sender xxx doesn't work with multi-contract deployments.

Running this:

forge script script/DeployTokenBridges.s.sol --account defaultKey --sender MY_ADDRESS --broadcast --verify

On a script with vm.createSelectFork(vm.rpcUrl("xxxx")); to deploy to 2 chains failed with:

Error: 
Mac Mismatch

However, doing a "regular" deploy with --private-key worked fine:

forge script script/DeployTokenBridges.s.sol --private-key xxxx --broadcast --verify

I'm assuming there is an issue with getting the accounts when working on multiple chains?

PatrickAlphaC avatar Apr 07 '24 20:04 PatrickAlphaC

Mac Mismatch error usually means that you've entered a wrong password for a keystore

klkvr avatar Apr 08 '24 07:04 klkvr

ah.... is there a way we can have that as the error? Perhaps "failed to decrypt key"?

PatrickAlphaC avatar Apr 11 '24 02:04 PatrickAlphaC

Hi @zerosnacks, I'd like to tackle this issue.

leovct avatar Jul 31 '24 07:07 leovct