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

Missing arguments on deploy_dao script #144

Open
sraver opened this issue Jul 8, 2022 · 0 comments
Open

Missing arguments on deploy_dao script #144

sraver opened this issue Jul 8, 2022 · 0 comments

Comments

@sraver
Copy link

sraver commented Jul 8, 2022

I'm trying to deploy the contracts on a local forked network, and at some point of the process some of the contracts fail to deploy because they are missing some required arguments.

Expected behaviour

After executing

brownie run scripts/deployment/deploy_dao.py development --network mainnet-fork

should run through all the required transactions and end up successfully with all contracts deployed.

Actual behaviour

When executing

brownie run scripts/deployment/deploy_dao.py development --network mainnet-fork

it fails at with

  File "brownie/_cli/run.py", line 50, in main
    return_value, frame = run(
  File "brownie/project/scripts.py", line 103, in run
    return_value = f_locals[method_name](*args, **kwargs)
  File "./scripts/deployment/deploy_dao.py", line 70, in development
    deploy_part_two(accounts[0], token, voting_escrow)
  File "./scripts/deployment/deploy_dao.py", line 101, in deploy_part_two
    pool_proxy = PoolProxy.deploy({"from": admin, "required_confs": confs})
  File "brownie/network/contract.py", line 528, in __call__
    return tx["from"].deploy(
  File "brownie/network/account.py", line 509, in deploy
    data = contract.deploy.encode_input(*args)
  File "brownie/network/contract.py", line 557, in encode_input
    data = format_input(self.abi, args)
  File "brownie/convert/normalize.py", line 20, in format_input
    raise type(e)(f"{abi['name']} {e}") from None
ValueError: constructor Sequence has incorrect length, expected 3 but got 0

If I add the required arguments on the required line, then the error changes to:

  File "brownie/_cli/run.py", line 50, in main
    return_value, frame = run(
  File "brownie/project/scripts.py", line 103, in run
    return_value = f_locals[method_name](*args, **kwargs)
  File "./scripts/deployment/deploy_dao.py", line 70, in development
    deploy_part_two(accounts[0], token, voting_escrow)
  File "./scripts/deployment/deploy_dao.py", line 115, in deploy_part_two
    gauge = LiquidityGauge.deploy(lp_token, minter, {"from": admin, "required_confs": confs})
  File "brownie/network/contract.py", line 528, in __call__
    return tx["from"].deploy(
  File "brownie/network/account.py", line 509, in deploy
    data = contract.deploy.encode_input(*args)
  File "brownie/network/contract.py", line 557, in encode_input
    data = format_input(self.abi, args)
  File "brownie/convert/normalize.py", line 20, in format_input
    raise type(e)(f"{abi['name']} {e}") from None
ValueError: constructor Sequence has incorrect length, expected 3 but got 2

Which I could solve adding admin as the third argument on this line.
So finally the last error was:

  File "brownie/_cli/run.py", line 50, in main
    return_value, frame = run(
  File "brownie/project/scripts.py", line 103, in run
    return_value = f_locals[method_name](*args, **kwargs)
  File "./scripts/deployment/deploy_dao.py", line 70, in development
    deploy_part_two(accounts[0], token, voting_escrow)
  File "./scripts/deployment/deploy_dao.py", line 120, in deploy_part_two
    gauge = LiquidityGaugeReward.deploy(
  File "brownie/network/contract.py", line 528, in __call__
    return tx["from"].deploy(
  File "brownie/network/account.py", line 509, in deploy
    data = contract.deploy.encode_input(*args)
  File "brownie/network/contract.py", line 557, in encode_input
    data = format_input(self.abi, args)
  File "brownie/convert/normalize.py", line 20, in format_input
    raise type(e)(f"{abi['name']} {e}") from None
ValueError: constructor Sequence has incorrect length, expected 5 but got 4

Which I had to fix by adding admin as a 5th argument on this contract instantiation.

After those changes, the deploy went well. :)

Steps to reproduce

brownie run scripts/deployment/deploy_dao.py development --network mainnet-fork

I would create a PR, but I'm not sure that the arguments I set on those contracts are the ones that really have to be cos I didnt used the contracts after deployment. Specially the PoolProxy one.

Is it possible the scripts are outdated?

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