TokenMarketNet/smart-contracts

Cannot unmarshal non-string into Go value of type common.Address

Closed this issue · 1 comments

When I run the example.yml file as such:

deploy-contracts --deployment-file=crowdsales/example.yml --deployment-name=ropsten --address=0x123456sample

I receive back the following error stack and the contract is not deployed:

Owner address is 0x123456sample
Owner balance is 4.9749654176 ETH
Already deployed contract, team_multisig 0x40a05d4ce308bf600cb275d7a3e9113518f59c54
Starting PresaleFundCollector deployment, with arguments  {'_owner': '0x40a05d4ce308bf600cb275d7a3e9113518f59c54', '_freezeEndsAt': 1514882128, '_weiMinimumLimit': 750000000000000000000}
Traceback (most recent call last):
  File "/Users/rhyeal/github/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/rhyeal/github/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/rhyeal/github/ico/venv/lib/python3.6/site-packages/populus/contracts/provider.py", line 143, in get_or_deploy_contract
    deploy_kwargs=deploy_kwargs,
  File "/Users/rhyeal/github/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/rhyeal/github/ico/venv/lib/python3.6/site-packages/populus/contracts/provider.py", line 92, in get_contract
    contract_addresses,
  File "/Users/rhyeal/github/ico/venv/lib/python3.6/site-packages/eth_utils/functional.py", line 33, in inner
    return callback(fn(*args, **kwargs))
  File "/Users/rhyeal/github/ico/venv/lib/python3.6/site-packages/populus/contracts/provider.py", line 40, in filter_addresses_by_bytecode_match
    verify_contract_bytecode(web3, expected_bytecode, address)
  File "/Users/rhyeal/github/ico/venv/lib/python3.6/site-packages/populus/utils/contracts.py", line 184, in verify_contract_bytecode
    chain_bytecode = web3.eth.getCode(address)
  File "/Users/rhyeal/github/ico/venv/lib/python3.6/site-packages/eth_utils/string.py", line 85, in inner
    return force_obj_to_text(fn(*args, **kwargs))
  File "/Users/rhyeal/github/ico/venv/lib/python3.6/site-packages/web3/eth.py", line 147, in getCode
    formatters.input_block_identifier_formatter(block_identifier),
  File "/Users/rhyeal/github/ico/venv/lib/python3.6/site-packages/web3/providers/manager.py", line 35, in request_blocking
    raise ValueError(response["error"])
ValueError: {'code': -32602, 'message': 'invalid argument 0: json: cannot unmarshal non-string into Go value of type common.Address'}

It seems that line 66 of the ico/deploy.py file, specifically the first JSON object deploy_transaction is parsing the from value as a non-string, despite a single quote, double quote, or no quote hard coded value being put in there. Obviously I can't deploy any contracts as a result to further test the code I'm writing, so this is a blocker for me using the ico package.

Any thoughts on what's causing the issue?

--address=0x123456sample <--- Does not look like an Ethereum address?