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

deployCreate3Upgradable - "too many arguments: in Contract constructor" #25

Open
tab00 opened this issue Feb 25, 2023 · 3 comments
Open

Comments

@tab00
Copy link

tab00 commented Feb 25, 2023

I replaced deployUpgradable with deployCreate3Upgradable in the cross-chain-token example (and deployed Create3Deployer and passed its address in place of ConstAddressDeployer address):
https://github.com/axelarnetwork/axelar-examples/blob/main/examples/evm/cross-chain-token/index.js#L21

Deployment using npm run deploy evm/cross-chain-token local causes this error output:

Error: too many arguments: in Contract constructor (count=3, expectedCount=0, code=UNEXPECTED_ARGUMENT, version=contracts/5.7.0)
at Logger.makeError (/root/projects/axelar-examples/node_modules/@ethersproject/logger/lib/index.js:238:21)
at Logger.throwError (/root/projects/axelar-examples/node_modules/@ethersproject/logger/lib/index.js:247:20)
at Logger.checkArgumentCount (/root/projects/axelar-examples/node_modules/@ethersproject/logger/lib/index.js:313:18)
at ContractFactory.getDeployTransaction (/root/projects/axelar-examples/node_modules/@ethersproject/contracts/lib/index.js:1125:16)
at deployCreate3Contract (/root/projects/axelar-examples/node_modules/@axelar-network/axelar-gmp-sdk-solidity/scripts/create3Deployer.js:89:28)
at deployCreate3Upgradable (/root/projects/axelar-examples/node_modules/@axelar-network/axelar-gmp-sdk-solidity/scripts/upgradable.js:70:23)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.deploy (/root/projects/axelar-examples/examples/evm/cross-chain-token/index.js:21:22)
at async Promise.all (index 4)
at async deploy (/root/projects/axelar-examples/scripts/libs/deploy.js:17:5) {
reason: 'too many arguments: in Contract constructor',
code: 'UNEXPECTED_ARGUMENT',
count: 3,
expectedCount: 0

Please fix this so that we can deploy using CREATE3.
Thank you.

@tab00
Copy link
Author

tab00 commented Mar 2, 2023

deployCreate3Upgradable calls deployCreate3Contract:
https://github.com/axelarnetwork/axelar-gmp-sdk-solidity/blob/main/scripts/upgradable.js#L70

However the proxy should be inited, so it should instead call deployCreate3AndInitContract maybe like this:

  const proxy = await deployCreate3AndInitContract(
    create3DeployerAddress,
    wallet,
    proxyJson,
    key,
    additionalProxyConstructorArgs,
    [
      implementation.address,
      wallet.address,
      setupParams,      
    ],
    gasLimit,
  );

@tab00
Copy link
Author

tab00 commented Mar 2, 2023

@re1ro what do you think?

@tab00
Copy link
Author

tab00 commented Mar 3, 2023

There seems to be a problem with init in Create3Deployer:
https://github.com/axelarnetwork/axelar-gmp-sdk-solidity/blob/main/contracts/deploy/Create3Deployer.sol#L53

I get "processing response error" when I attempt deployment, and then transaction reverts.
Deployment works if I comment out that (and next) line, but it's not usable because it hasn't been inited.

There is no such problem when deploying with CREATE2 - init works.

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