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

Deploy contract always returns: None of the known addresses matched the expected bytecode #113

Open
chut opened this issue Feb 17, 2018 · 1 comment

Comments

@chut
Copy link

chut commented Feb 17, 2018

Have things mostly running. Just trying to run against a local chain. Coinbase account seems to be set properly and unlocked.

I seem to be running the file exactly as specified in the example yaml file. However, I receive the same error no matter what I try. Input and output is below.

This is what I run:
deploy-contracts --address=coinbase --deployment-file=crowdsales/crowdsale-token-example.yml --deployment-name=local-token

The YAML file is unmodified.

And the output.

Web3 provider is RPC connection http://127.0.0.1:8548
Owner address is 0x410d1dd23f1e692bc9a255c495d88e55960b776d
Owner balance is 1000000003445 ETH
Starting CrowdsaleToken deployment, with arguments  {'_name': 'MooToken', '_symbol': 'MOO', '_initialSupply': 100000000000000000000000000000, '_decimals': 18, '_mintable': False}
Traceback (most recent call last):
  File "/Users/calum/code/test_ico/ico/ico/deploy.py", line 66, in deploy_contract
    contract, txhash = chain.provider.deploy_contract(contract_name, deploy_transaction=transaction, deploy_kwargs=kwargs)
  File "/Users/calum/code/test_ico/ico/venv/lib/python3.6/site-packages/populus/contracts/provider.py", line 115, in deploy_contract
    self.get_or_deploy_contract(dependency_name, deploy_transaction=deploy_transaction)
  File "/Users/calum/code/test_ico/ico/venv/lib/python3.6/site-packages/populus/contracts/provider.py", line 143, in get_or_deploy_contract
    deploy_kwargs=deploy_kwargs,
  File "/Users/calum/code/test_ico/ico/venv/lib/python3.6/site-packages/populus/contracts/provider.py", line 127, in deploy_contract
    return self.get_contract(contract_identifier), deploy_transaction_hash
  File "/Users/calum/code/test_ico/ico/venv/lib/python3.6/site-packages/populus/contracts/provider.py", line 95, in get_contract
    raise BytecodeMismatch("None of the known addresses matched the expected bytecode")
populus.contracts.exceptions.BytecodeMismatch: None of the known addresses matched the expected bytecode

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/calum/code/test_ico/ico/venv/bin/deploy-contracts", line 11, in <module>
    load_entry_point('ico', 'console_scripts', 'deploy-contracts')()
  File "/Users/calum/code/test_ico/ico/venv/lib/python3.6/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/Users/calum/code/test_ico/ico/venv/lib/python3.6/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/Users/calum/code/test_ico/ico/venv/lib/python3.6/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/calum/code/test_ico/ico/venv/lib/python3.6/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/Users/calum/code/test_ico/ico/ico/cmd/deploycontracts.py", line 29, in main
    deploy_crowdsale_from_file(project, deployment_file, deployment_name, address)
  File "/Users/calum/code/test_ico/ico/ico/deploy.py", line 286, in deploy_crowdsale_from_file
    return _deploy_contracts(project, chain, web3, yaml_filename, chain_data, deploy_address)
  File "/Users/calum/code/test_ico/ico/ico/deploy.py", line 270, in _deploy_contracts
    runtime_data, statistics, contracts = deploy_crowdsale(project, chain, yaml_filename, chain_data, deploy_address)
  File "/Users/calum/code/test_ico/ico/ico/deploy.py", line 133, in deploy_crowdsale
    contracts[name] = deploy_contract(project, chain, deploy_address, expanded_contract_def, chain_name, need_unlock=need_unlock)
  File "/Users/calum/code/test_ico/ico/ico/deploy.py", line 68, in deploy_contract
    raise RuntimeError("Could not deploy contract {}, constructor arguments {}".format(contract_name, kwargs)) from e
RuntimeError: Could not deploy contract CrowdsaleToken, constructor arguments {'_name': 'MooToken', '_symbol': 'MOO', '_initialSupply': 100000000000000000000000000000, '_decimals': 18, '_mintable': False}

Any ideas on what I might be doing wrong here?

@cballantyne
Copy link

I was getting same error trying to deploy CrowdsaleToken. I thought I must have my environment messed up. However in the end I was able to deploy 1 simple contract like Greeter.sol to my local chain. So the problem I think is something with that particular contract or some other contract it depends on. Maybe try a simple 1 contract deployment to rule out any other issues.

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

2 participants