omgnetwork / plasma-mvp

OmiseGO's research implementation of Minimal Viable Plasma
MIT License
561 stars 158 forks source link

Error when running make root-chain #18

Closed shapeshed closed 6 years ago

shapeshed commented 6 years ago
Traceback (most recent call last):
  File "deployment.py", line 3, in <module>
    Deployer().create_contract("RootChain/RootChain.sol")
  File "/home/go/src/plasma-mvp/plasma/root_chain/deployer.py", line 54, in create_contract
    contract_instance = self.w3.eth.contract(abi, contract_address, ContractFactoryClass=ConciseContract)
TypeError: contract() takes from 1 to 2 positional arguments but 3 were given
make: *** [Makefile:11: root-chain] Error 1

TestRPC log is

Listening on localhost:8545
eth_accounts
eth_sendTransaction

  Transaction: 0x174ab053557367f27cf0ce051796e36bed0c0ff11ecc4616efda4d7ada7aec24
  Contract created: 0x1f63ad696aae56f34aabf2015e883128ca1ef018
  Gas usage: 3567286
  Block Number: 1
  Block Time: Thu Jan 18 2018 11:03:34 GMT+0000 (GMT)

eth_getTransactionReceipt
elenadimitrova commented 6 years ago

I get something similar running against ganache-cli v7. It shows no transactions in its log.

python deployment.py
Traceback (most recent call last):
  File "deployment.py", line 1, in <module>
    from plasma.root_chain.deployer import Deployer
ImportError: No module named plasma.root_chain.deployer
make: *** [root-chain] Error 1
federicobond commented 6 years ago

Which version of Python are you using? Have you done python setup.py install before running make?

shapeshed commented 6 years ago

See https://ethereum.stackexchange.com/questions/36324/creating-a-web3py-contract-typeerror-contract-takes-from-1-to-2-positional

smartcontracts commented 6 years ago

@shapeshed Yeah this is an artifact of the recent Web3.py update from v3 to v4

nvonpentz commented 6 years ago

I followed the directions in the README, but I fail at step 2 make root-chain

python deployment.py
Traceback (most recent call last):
  File "deployment.py", line 1, in <module>
    from plasma.root_chain.deployer import Deployer
  File "/Users/nick/Code/ethereum/plasma-mvp/plasma/root_chain/deployer.py", line 31
    'sources': {**{path.split('/')[-1]: {'urls': [path]}}, **contracts}},  # Noqa E999
                 ^
SyntaxError: invalid syntax
make: *** [root-chain] Error 1

ethereumjs-testrpc@6.0.3 Python 2.7.10

Any help is appreciated.

smartcontracts commented 6 years ago

Hi, could you try running on py3 and seeing if that changes anything? We should probably be backwards compatible with py2, but I'm not sure that we currently are.

nvonpentz commented 6 years ago

@kfichter Yep, it seems that py3 is required. I also needed to install solc (different from solcjs) and downgrade the compiler from 0.4.21 to 0.4.18 with

brew unlink solidity
brew install https://raw.githubusercontent.com/ethereum/homebrew-ethereum/2aea171d7d6901b97d5f1f71bd07dd88ed5dfb42/solidity.rb
smartcontracts commented 6 years ago

Fixed in #26