Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error During Factory Contract Deployment with yarn hardhat deploy-zksync --script deployFactoryAccount.ts #956

Open
samui68400 opened this issue Feb 24, 2024 · 0 comments

Comments

@samui68400
Copy link
Contributor

samui68400 commented Feb 24, 2024

Description

While running the deployment script to set up the factory contract using the command yarn hardhat deploy-zksync --script deployFactoryAccount.ts, an unexpected error occurred after the compilation step.
It seems like the target argument for the contract deployment is null or undefined, leading to the error. This could be due to misconfiguration or missing required parameters in the deployFactoryAccount.ts script.

Steps to Reproduce

Run the command yarn hardhat deploy-zksync --script deployFactoryAccount.ts
Observe the above error.

Expected Behavior

The deployment of the factory contract with zkSync should proceed without error, correctly generating the factory contract address.

Environment

Operating System: [Your operating system]
Node.js Version: [Your Node.js version]
Hardhat Version: [Your Hardhat version]
Other relevant environment information: [Add any other relevant information]

Additional Information

Here is the complete error message:

yarn run v1.22.10
warning ../package.json: No license field
$ /Users/xxx/custom-spendlimit-tutorial/node_modules/.bin/hardhat deploy-zksync --script deployFactoryAccount.ts
AA factory address: undefined
An unexpected error occurred:

TypeError: invalid value for Contract target (argument="target", value=null, code=INVALID_ARGUMENT, version=6.11.1)
    at makeError (/Users/xxx/custom-spendlimit-tutorial/node_modules/ethers/src.ts/utils/errors.ts:687:21)
    at assert (/Users/xxx/custom-spendlimit-tutorial/node_modules/ethers/src.ts/utils/errors.ts:715:25)
    at assertArgument (/Users/xxx/custom-spendlimit-tutorial/node_modules/ethers/src.ts/utils/errors.ts:727:5)
    at new BaseContract (/Users/xxx/custom-spendlimit-tutorial/node_modules/ethers/src.ts/contract/contract.ts:686:23)
    at new Contract (/Users/xxx/custom-spendlimit-tutorial/node_modules/ethers/src.ts/contract/contract.ts:1120:1)
    at default_1 (/Users/xxx/custom-spendlimit-tutorial/deploy/deployFactoryAccount.ts:33:21)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async ScriptManager._runScript (/Users/xxx/custom-spendlimit-tutorial/node_modules/@matterlabs/hardhat-zksync-deploy/src/script-manager.ts:78:9)
    at async ScriptManager.callDeployScripts (/Users/xxx/custom-spendlimit-tutorial/node_modules/@matterlabs/hardhat-zksync-deploy/src/script-manager.ts:71:13)
    at async SimpleTaskDefinition.zkSyncDeploy [as action] (/Users/xxx/custom-spendlimit-tutorial/node_modules/@matterlabs/hardhat-zksync-deploy/src/task-actions.ts:13:5) {
  code: 'INVALID_ARGUMENT',
  argument: 'target',
  value: undefined,
  shortMessage: 'invalid value for Contract target'
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant