Skip to content

KEEP_CONTRACT_OWNER_ACCOUNT_PRIVATE_KEY shouldn't be required by default for deployments #84

Open
@cygnusv

Description

@cygnusv

Trying to deploy something on mainnet I got this ropsten related error:
Invalid account: #1 for network: ropsten - Expected string, received undefined

It seems that even though I'm deploying on mainnet, the ropsten accounts configuration is still processed and since process.env.CONTRACT_OWNER_ACCOUNT_PRIVATE_KEY is set, it also expects process.env.KEEP_CONTRACT_OWNER_ACCOUNT_PRIVATE_KEY, which I shouldn't have set for deployments not related to legacy Keep.

For reference, this is ropsten config on hardhat.config.ts:

ropsten: {
      url: process.env.CHAIN_API_URL || "",
      chainId: 3,
      accounts: process.env.CONTRACT_OWNER_ACCOUNT_PRIVATE_KEY
        ? [
            process.env.CONTRACT_OWNER_ACCOUNT_PRIVATE_KEY,
            process.env.KEEP_CONTRACT_OWNER_ACCOUNT_PRIVATE_KEY,
          ]
        : undefined,
      tags: ["tenderly"],
    },

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions