Open gleb-urvanov opened 6 years ago
Can you try to run populus compile
before running the command? It should show what contracts it compiles and what are available.
Sure, here is the output:
(venv) anonymous@anonymous-machine:~/workspace/ico$ populus compile
Traceback (most recent call last):
File "/home/anonymous/workspace/ico/venv/bin/populus", line 11, in <module>
sys.exit(main())
File "/home/anonymous/workspace/ico/venv/lib/python3.5/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/home/anonymous/workspace/ico/venv/lib/python3.5/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/home/anonymous/workspace/ico/venv/lib/python3.5/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/anonymous/workspace/ico/venv/lib/python3.5/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/anonymous/workspace/ico/venv/lib/python3.5/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/home/anonymous/workspace/ico/venv/lib/python3.5/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/anonymous/workspace/ico/venv/lib/python3.5/site-packages/populus/cli/compile_cmd.py", line 40, in compile_cmd
_, compiled_contracts = compile_project_contracts(project)
File "/home/anonymous/workspace/ico/venv/lib/python3.5/site-packages/populus/compilation/__init__.py", line 56, in compile_project_contracts
compiled_contracts = post_process_compiled_contracts(base_compiled_contracts)
File "/home/anonymous/workspace/ico/venv/lib/python3.5/site-packages/populus/utils/compile.py", line 155, in post_process_compiled_contracts
add_full_dependencies_to_compiled_contracts,
File "cytoolz/functoolz.pyx", line 586, in cytoolz.functoolz.pipe (cytoolz/functoolz.c:10663)
File "cytoolz/functoolz.pyx", line 562, in cytoolz.functoolz.c_pipe (cytoolz/functoolz.c:10494)
File "/home/anonymous/workspace/ico/venv/lib/python3.5/site-packages/eth_utils/functional.py", line 33, in inner
return callback(fn(*args, **kwargs))
File "/home/anonymous/workspace/ico/venv/lib/python3.5/site-packages/populus/utils/compile.py", line 122, in add_direct_dependencies_to_compiled_contracts
in itertools.chain(contract_data['linkrefs'], contract_data['linkrefs_runtime'])
KeyError: 'linkrefs'
Are you installing ico
package as per README instructions? I believe you might have some sort of version conflict in your Python dependency packages.
Yes, did the installation as described here: https://ico.readthedocs.io/en/latest/install.html, already tried to do the same from a scratch, the result is the same. I'm running clean Ubuntu 16.04 on a virtual machine, if it matters. Do you have any idea about the direction I should dig in to find the solution?
Here is the list of versions of tools mentioned in installation instructions:
build-essential ---------------- 12.1ubuntu2
libssl-dev --------------------- 1.0.2g-1ubuntu4.10
python3 ------------------------ 3.5.1-3
python3-venv ------------------- 3.5.1-3
python3-setuptools ------------- 20.7.0-1
python3-dev -------------------- 3.5.1-3
cmake -------------------------- 3.5.1-1ubuntu3
libboost-all-dev --------------- 1.58.0.1ubuntu1
@gleb-urvanov Can you do pip freeze
to show all your package versions?
hey folks - exactly same situation here !
@miohtama here's my pip freeze - basically fresh install on ubuntu on Windows
anyconfig==0.9.3 argh==0.26.2 bitcoin==1.1.42 certifi==2017.7.27.1 cffi==1.10.0 chardet==3.0.4 click==6.7 contextlib2==0.5.5 cytoolz==0.9.0 eth-testrpc==1.3.0 ethereum==1.6.1 ethereum-abi-utils==0.4.0 ethereum-utils==0.3.2 -e git+git@github.com:alexksso/ico.git@9e48fab4ef683f6e1e9fc86f34cb7555589f2d57#egg=ico idna==2.5 Jinja2==2.9.6 json-rpc==1.10.3 jsonschema==2.6.0 MarkupSafe==1.0 pathtools==0.1.2 pbkdf2==1.3 pkg-resources==0.0.0 populus==1.9.0 py==1.4.34 py-geth==1.9.0 py-solc==1.4.0 pycparser==2.18 pycryptodome==3.4.6 pyethash==0.1.27 pylru==1.0.9 pysha3==1.0.2 pytest==3.2.0 PyYAML==3.12 repoze.lru==0.6 requests==2.18.3 rlp==0.5.1 ruamel.yaml==0.15.23 scrypt==0.8.0 secp256k1==0.13.2 semantic-version==2.6.0 toolz==0.8.2 toposort==1.5 urllib3==1.22 watchdog==0.8.3 web3==3.11.1 Werkzeug==0.12.2
Here is the good know version set from Travis:
anyconfig==0.9.3
apipkg==1.4
argh==0.26.2
bitcoin==1.1.42
certifi==2017.7.27.1
cffi==1.10.0
chardet==3.0.4
click==6.7
contextlib2==0.5.5
cytoolz==0.9.0
eth-testrpc==1.3.0
ethereum==1.6.1
ethereum-abi-utils==0.4.0
ethereum-utils==0.3.2
execnet==1.5.0
-e git+https://github.com/TokenMarketNet/ico.git@f98ab14566fda8b2bcb4c9308c542ee2eb794187#egg=ico
idna==2.5
Jinja2==2.9.6
json-rpc==1.10.3
jsonschema==2.6.0
MarkupSafe==1.0
pathtools==0.1.2
pbkdf2==1.3
populus==1.9.0
py==1.4.34
py-geth==1.9.0
py-solc==1.4.0
pycparser==2.18
pycryptodome==3.4.6
pyethash==0.1.27
pylru==1.0.9
pysha3==1.0.2
pytest==3.2.0
pytest-forked==0.2
pytest-xdist==1.20.1
PyYAML==3.12
repoze.lru==0.6
requests==2.18.3
rlp==0.5.1
ruamel.yaml==0.15.23
scrypt==0.8.0
secp256k1==0.13.2
semantic-version==2.6.0
toolz==0.8.2
toposort==1.5
urllib3==1.22
watchdog==0.8.3
web3==3.11.1
Werkzeug==0.12.2
Can you run which populus
to make sure it runs Populus command from within the virtual environment and not from somewhere else?
hello. same issue here as well. running Ubuntu 16.04. updated the requirements.txt, same output populus running from /home/default/ico/venv/bin/populus
There's some fixes for populus for solidity v0.4.18 and v0.4.19.
I am able to compile now.
@jonasjuan yes it's good: ~/git/ico(master*) » which populus alex@KssoXPS13 /mnt/c/Users/alex/Documents/git/ico/venv/bin/populus
Sooo ... what was the trick to make it work?
@alexksso I was reading this https://github.com/ethereum/populus/pull/399 and kinda follow through. Some new settings in solc v0.4.19.
Ah, so it is specific to the solc
version. This is why it was so hard to track down.
@jonasjuan Could you submit a pull request and change this line and test it with solc 0.4.19:
https://github.com/TokenMarketNet/ico/blob/master/populus.json#L178
@miohtama Okay im new at this. I created the branceh, tried pushing from terminal and i got permission denied.
EDIT: i think i figured out the push thing. thanks.
EDIT: Hmm, Im not really sure what to do now. Comparing the files yield identical thus no pull request.
Also, is the empty zeppelin folder meant to be filled with the current ones from openzepplin? i'm assuming thats the case so i did so all this while.
@jonasjuan zeppelin folder is git submodule - if you do git clone --recursive
it is automatically populated, otherwise you need to do some git submodule
magic
@jonasjuan You should be able to open PR when you do git push
to your own forked Github repository. Then Create pull request button appears on your own Github repository.
I've submitted a pull request #93
@Fonger for some reason your PR makes no difference for me... I just got the raw file and replaced my populous.json
UPDATE: actually I downloaded the json to the wrong folder heh. I did have to update the chain, but seems to work now.
While trying to deploy example contracts to testnet I'm always getting "populus.contracts.exceptions.UnknownContract" exception. Here are logs for example.yml:
What is missing and how to build and deploy the contracts properly?