TokenMarketNet / smart-contracts

Ethereum smart contracts for security and utility tokens
https://tokenmarket.net/
Other
1.34k stars 561 forks source link

Deploying a contract in Centos 7 X64 #112

Closed saravana87 closed 6 years ago

saravana87 commented 6 years ago

Hi,

I have installed Python3.6, Parity and necessary app to run the deploy-contract command.

Also, created a multi-signature contract using 3 different accounts and configured in YAML file.

It seems RPC port also opened but I couldnt run the following command.

Is there any other setting I should do. ?

(venv) [root@localhost ico]# deploy-contracts --deployment-name testnet --deployment-file Testcontract.yaml --address 0xad2f8d581b5b867c23e5d1b4434a3fa80d3d6564 Web3 provider is RPC connection http://127.0.0.1:8545 Owner address is 0xad2f8d581b5b867c23e5d1b4434a3fa80d3d6564 Owner balance is 4 ETH Already deployed contract, team_multisig 0x1c58fa977b43d242e5fa9d22c4a66631a58d8fdf Starting PresaleFundCollector deployment, with arguments {'_owner': '0x1c58fa977b43d242e5fa9d22c4a66631a58d8fdf', '_freezeEndsAt': 1520758646, '_weiMinimumLimit': 750000000000000000000} Traceback (most recent call last): File "/token/ico/venv/lib64/python3.6/site-packages/urllib3/connectionpool.py", line 387, in _make_request six.raise_from(e, None) File "", line 2, in raise_from File "/token/ico/venv/lib64/python3.6/site-packages/urllib3/connectionpool.py", line 383, in _make_request httplib_response = conn.getresponse() File "/usr/lib64/python3.6/http/client.py", line 1331, in getresponse response.begin() File "/usr/lib64/python3.6/http/client.py", line 297, in begin version, status, reason = self._read_status() File "/usr/lib64/python3.6/http/client.py", line 258, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") File "/usr/lib64/python3.6/socket.py", line 586, in readinto return self._sock.recv_into(b) socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/token/ico/venv/lib64/python3.6/site-packages/requests/adapters.py", line 440, in send timeout=timeout File "/token/ico/venv/lib64/python3.6/site-packages/urllib3/connectionpool.py", line 639, in urlopen _stacktrace=sys.exc_info()[2]) File "/token/ico/venv/lib64/python3.6/site-packages/urllib3/util/retry.py", line 357, in increment raise six.reraise(type(error), error, _stacktrace) File "/token/ico/venv/lib64/python3.6/site-packages/urllib3/packages/six.py", line 686, in reraise raise value File "/token/ico/venv/lib64/python3.6/site-packages/urllib3/connectionpool.py", line 601, in urlopen chunked=chunked) File "/token/ico/venv/lib64/python3.6/site-packages/urllib3/connectionpool.py", line 389, in _make_request self._raise_timeout(err=e, url=url, timeout_value=read_timeout) File "/token/ico/venv/lib64/python3.6/site-packages/urllib3/connectionpool.py", line 309, in _raise_timeout raise ReadTimeoutError(self, url, "Read timed out. (read timeout=%s)" % timeout_value) urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='127.0.0.1', port=8545): Read timed out. (read timeout=180)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/token/ico/ico/deploy.py", line 66, in deploy_contract contract, txhash = chain.provider.deploy_contract(contract_name, deploy_transaction=transaction, deploy_kwargs=kwargs) File "/token/ico/venv/lib64/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 "/token/ico/venv/lib64/python3.6/site-packages/populus/contracts/provider.py", line 143, in get_or_deploy_contract deploy_kwargs=deploy_kwargs, File "/token/ico/venv/lib64/python3.6/site-packages/populus/contracts/provider.py", line 121, in deploy_contract kwargs=deploy_kwargs, File "/token/ico/venv/lib64/python3.6/site-packages/web3/contract.py", line 310, in deploy txn_hash = cls.web3.eth.sendTransaction(deploy_transaction) File "/token/ico/venv/lib64/python3.6/site-packages/eth_utils/string.py", line 85, in inner return force_obj_to_text(fn(args, kwargs)) File "/token/ico/venv/lib64/python3.6/site-packages/web3/eth.py", line 249, in sendTransaction [formatters.input_transaction_formatter(self, formatted_transaction)], File "/token/ico/venv/lib64/python3.6/site-packages/web3/providers/manager.py", line 27, in request_blocking response_raw = self.provider.make_request(method, params) File "/token/ico/venv/lib64/python3.6/site-packages/web3/providers/rpc.py", line 52, in make_request self.get_request_kwargs() File "/token/ico/venv/lib64/python3.6/site-packages/web3/utils/compat/compat_requests.py", line 21, in make_post_request response = session.post(endpoint_uri, data=data, args, kwargs) File "/token/ico/venv/lib64/python3.6/site-packages/requests/sessions.py", line 555, in post return self.request('POST', url, data=data, json=json, kwargs) File "/token/ico/venv/lib64/python3.6/site-packages/requests/sessions.py", line 508, in request resp = self.send(prep, send_kwargs) File "/token/ico/venv/lib64/python3.6/site-packages/requests/sessions.py", line 618, in send r = adapter.send(request, kwargs) File "/token/ico/venv/lib64/python3.6/site-packages/requests/adapters.py", line 521, in send raise ReadTimeout(e, request=request) requests.exceptions.ReadTimeout: HTTPConnectionPool(host='127.0.0.1', port=8545): Read timed out. (read timeout=180)

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

Traceback (most recent call last): File "/token/ico/venv/bin/deploy-contracts", line 11, in load_entry_point('ico', 'console_scripts', 'deploy-contracts')() File "/token/ico/venv/lib64/python3.6/site-packages/click/core.py", line 722, in call return self.main(args, kwargs) File "/token/ico/venv/lib64/python3.6/site-packages/click/core.py", line 697, in main rv = self.invoke(ctx) File "/token/ico/venv/lib64/python3.6/site-packages/click/core.py", line 895, in invoke return ctx.invoke(self.callback, ctx.params) File "/token/ico/venv/lib64/python3.6/site-packages/click/core.py", line 535, in invoke return callback(args, **kwargs) File "/token/ico/ico/cmd/deploycontracts.py", line 29, in main deploy_crowdsale_from_file(project, deployment_file, deployment_name, address) File "/token/ico/ico/deploy.py", line 286, in deploy_crowdsale_from_file return _deploy_contracts(project, chain, web3, yaml_filename, chain_data, deploy_address) File "/token/ico/ico/deploy.py", line 270, in _deploy_contracts runtime_data, statistics, contracts = deploy_crowdsale(project, chain, yaml_filename, chain_data, deploy_address) File "/token/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 "/token/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 PresaleFundCollector, constructor arguments {'_owner': '0x1c58fa977b43d242e5fa9d22c4a66631a58d8fdf', '_freezeEndsAt': 1520758646, '_weiMinimumLimit': 750000000000000000000}

saravana87 commented 6 years ago

Using parity --unlock command. I added the deployed address and make the issue fixed.

Ex: sudo parity --chain ropsten --bootnodes "enode://20c9ad97c081d63397d7b685a412227a40e23c8bdc6688c6f37e97cfbc22d2b4d1db1510d8f61e6a8866ad7f0e17c02b14182d37ea7c3c8b9c2683aeb6b733a1@52.169.14.227:30303,enode://6ce05930c72abc632c58e2e4324f7c7ea478cec0ed4fa2528982cf34483094e9cbc9216e7aa349691242576d552a2a56aaeae426c5303ded677ce455ba1acd9d@13.84.180.240:30303" --rpcaddr=0.0.0.0 --rpccorsdomain "*" --jsonrpc-hosts="all" --unlock

--password