Open sithu opened 7 years ago
that contract was removed. see yourself. You have to remove mutisig part. It was with a security problem that contract... like the one from Parity...
and Gnosis wallet needs more than 2 parameters, you have to look contract code to see which ones
@gelinger777 Thanks for your response. Did you mean I need to have like this?
team_multisig:
contract_name: Wallet
contract_file: GnosisWallet.sol
TypeError: Incorrect argument count. Expected '2'. Got '3' you have to go to Gnosis Wallet and see which arguments its expects, and remove 1 argument you are passing which is not needed
@gelinger777 After fixing incorrect argument issues, EVM throws this invalid JUMP exception.
(venv) ~/project/ico$ deploy-contracts --deployment-file=crowdsales/example.yml --deployment-name=testnet --address=0x960e0e7236ad5d628ea7a7d35543f74e082a3a42
Web3 provider is RPC connection http://127.0.0.1:8545
Owner address is 0x960e0e7236ad5d628ea7a7d35543f74e082a3a42
Owner balance is 100 ETH
Starting MultiSigWallet deployment, with arguments {'_owners': ['0x960e0e7236ad5d628ea7a7d35543f74e082a3a42', '0xf8d6b88eb4cecba45459bf2a5d68a680284fefc1'], '_required': 2}
MultiSigWallet address is 0x7f9a6269bfa686c41a2fcceb67c4ecd999a1a930
MultiSigWallet constructor arguments payload is 0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002000000000000000000000000960e0e7236ad5d628ea7a7d35543f74e082a3a42000000000000000000000000f8d6b88eb4cecba45459bf2a5d68a680284fefc1
MultiSigWallet libraries are {}
Starting PresaleFundCollector deployment, with arguments {'_owner': '0x7f9a6269bfa686c41a2fcceb67c4ecd999a1a930', '_freezeEndsAt': 1504763321, '_weiMinimumLimit': 750000000000000000000}
PresaleFundCollector address is 0x1459455ca7f7669c5c62c85f5cbf378443b44980
PresaleFundCollector constructor arguments payload is 0x0000000000000000000000007f9a6269bfa686c41a2fcceb67c4ecd999a1a9300000000000000000000000000000000000000000000000000000000059b0ddb9000000000000000000000000000000000000000000000028a857425466f80000
PresaleFundCollector libraries are {'SafeMathLib': '0x5b613db4a79b96f788d6cf2b63b10116a052d696'}
Starting CrowdsaleToken deployment, with arguments {'_name': 'Example-testnet', '_symbol': 'CHIPS', '_initialSupply': 1000, '_decimals': 2, '_mintable': False}
CrowdsaleToken address is 0xc28598776b4e2026d58606cdb784640e98104ed1
CrowdsaleToken constructor arguments payload is 0x00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000003e800000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f4578616d706c652d746573746e6574000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000054348495053000000000000000000000000000000000000000000000000000000
CrowdsaleToken libraries are {'SafeMathLib': '0x7f8b365ad5082095ec37c5996290b35bc804f7e7'}
Starting MilestonePricing deployment, with arguments {'_milestones': [1512282000, 10000000000000000, 1513282000, 11000000000000000, 1514282000, 12000000000000000, 1515282000, 13000000000000000]}
Traceback (most recent call last):
File "/Users/saung/project/eth/ico/ico/deploy.py", line 64, in deploy_contract
contract, txhash = chain.provider.deploy_contract(contract_name, deploy_transaction=transaction, deploy_kwargs=kwargs)
File "/Users/saung/project/eth/ico/venv/lib/python3.6/site-packages/populus/contracts/provider.py", line 154, in deploy_contract
kwargs=deploy_kwargs,
File "/Users/saung/project/eth/ico/venv/lib/python3.6/site-packages/web3/contract.py", line 298, in deploy
txn_hash = cls.web3.eth.sendTransaction(deploy_transaction)
File "/Users/saung/project/eth/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/saung/project/eth/ico/venv/lib/python3.6/site-packages/web3/eth.py", line 239, in sendTransaction
transaction=formatted_transaction,
File "/Users/saung/project/eth/ico/venv/lib/python3.6/site-packages/web3/utils/transactions.py", line 47, in get_buffered_gas_estimate
gas_estimate = web3.eth.estimateGas(gas_estimate_transaction)
File "/Users/saung/project/eth/ico/venv/lib/python3.6/site-packages/web3/utils/functional.py", line 14, in inner
value = fn(*args, **kwargs)
File "/Users/saung/project/eth/ico/venv/lib/python3.6/site-packages/web3/eth.py", line 282, in estimateGas
[formatted_transaction],
File "/Users/saung/project/eth/ico/venv/lib/python3.6/site-packages/web3/providers/manager.py", line 51, in request_blocking
raise ValueError(response["error"])
ValueError: {'message': 'Error: VM Exception while executing eth_estimateGas: invalid JUMP at b52fbbff06a2845c5117667bc7d3106c2f44c7254a91705e6d91528ac984b385/fdb6da40927d4e0f7f61b0bb240289ca1a64dfa7:339\n at /usr/local/lib/node_modules/ethereumjs-testrpc/build/cli.node.js:59880:17\n at /usr/local/lib/node_modules/ethereumjs-testrpc/build/cli.node.js:88044:5\n at /usr/local/lib/node_modules/ethereumjs-testrpc/build/cli.node.js:11863:9\n at /usr/local/lib/node_modules/ethereumjs-testrpc/build/cli.node.js:8423:16\n at replenish (/usr/local/lib/node_modules/ethereumjs-testrpc/build/cli.node.js:8943:25)\n at iterateeCallback (/usr/local/lib/node_modules/ethereumjs-testrpc/build/cli.node.js:8933:17)\n at /usr/local/lib/node_modules/ethereumjs-testrpc/build/cli.node.js:8908:16\n at /usr/local/lib/node_modules/ethereumjs-testrpc/build/cli.node.js:11860:13\n at /usr/local/lib/node_modules/ethereumjs-testrpc/build/cli.node.js:88040:9\n at /usr/local/lib/node_modules/ethereumjs-testrpc/build/cli.node.js:73948:7', 'code': -32000}
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/saung/project/eth/ico/venv/bin/deploy-contracts", line 11, in <module>
load_entry_point('ico', 'console_scripts', 'deploy-contracts')()
File "/Users/saung/project/eth/ico/venv/lib/python3.6/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/Users/saung/project/eth/ico/venv/lib/python3.6/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/Users/saung/project/eth/ico/venv/lib/python3.6/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/saung/project/eth/ico/venv/lib/python3.6/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/Users/saung/project/eth/ico/ico/cmd/deploycontracts.py", line 22, in main
deploy_crowdsale_from_file(project, deployment_file, deployment_name, address)
File "/Users/saung/project/eth/ico/ico/deploy.py", line 263, in deploy_crowdsale_from_file
return _deploy_contracts(project, chain, web3, yaml_filename, chain_data, deploy_address)
File "/Users/saung/project/eth/ico/ico/deploy.py", line 247, in _deploy_contracts
runtime_data, statistics, contracts = deploy_crowdsale(project, chain, chain_data, deploy_address)
File "/Users/saung/project/eth/ico/ico/deploy.py", line 130, in deploy_crowdsale
contracts[name] = deploy_contract(project, chain, deploy_address, expanded_contract_def, chain_name, need_unlock=need_unlock)
File "/Users/saung/project/eth/ico/ico/deploy.py", line 66, in deploy_contract
raise RuntimeError("Could not deploy contract {}, constructor arguments {}".format(contract_name, kwargs)) from e
RuntimeError: Could not deploy contract MilestonePricing, constructor arguments {'_milestones': [1512282000, 10000000000000000, 1513282000, 11000000000000000, 1514282000, 12000000000000000, 1515282000, 13000000000000000]}
(venv) ~/project/ico$
last milestone should be 0. then it will deploy.
@gelinger777 Even with the 0 pricing, the deploy-contracts still failed.
pricing_strategy:
contract_name: MilestonePricing
contract_file: MilestonePricing.sol
arguments:
_milestones:
- 1512282000
- "{{ to_wei('0.010', 'ether') }}"
- 1513282000
- "{{ to_wei('0.011', 'ether') }}"
- 1514282000
- "{{ to_wei('0.012', 'ether') }}"
- 1515282000
- "{{ to_wei('0.000', 'ether') }}"
(venv) ~/project/ico$ deploy-contracts --deployment-file=crowdsales/example.yml --deployment-name=testnet --address=0x960e0e7236ad5d628ea7a7d35543f74e082a3a42
Web3 provider is RPC connection http://127.0.0.1:8545
Owner address is 0x960e0e7236ad5d628ea7a7d35543f74e082a3a42
Owner balance is 99.580211416 ETH
Starting MultiSigWallet deployment, with arguments {'_owners': ['0x960e0e7236ad5d628ea7a7d35543f74e082a3a42', '0xf8d6b88eb4cecba45459bf2a5d68a680284fefc1'], '_required': 2}
MultiSigWallet address is 0xae47cb11728c811a4bb9ad51ccfd1f0496cbd125
MultiSigWallet constructor arguments payload is 0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002000000000000000000000000960e0e7236ad5d628ea7a7d35543f74e082a3a42000000000000000000000000f8d6b88eb4cecba45459bf2a5d68a680284fefc1
MultiSigWallet libraries are {}
Starting PresaleFundCollector deployment, with arguments {'_owner': '0xae47cb11728c811a4bb9ad51ccfd1f0496cbd125', '_freezeEndsAt': 1504835959, '_weiMinimumLimit': 750000000000000000000}
PresaleFundCollector address is 0x2767d2b3f528502294e15ad29c29d0c1192454a4
PresaleFundCollector constructor arguments payload is 0x000000000000000000000000ae47cb11728c811a4bb9ad51ccfd1f0496cbd1250000000000000000000000000000000000000000000000000000000059b1f977000000000000000000000000000000000000000000000028a857425466f80000
PresaleFundCollector libraries are {'SafeMathLib': '0x576efef7b6d611761d6b31b6be1547d727cd06c1'}
Starting CrowdsaleToken deployment, with arguments {'_name': 'Example-testnet', '_symbol': 'CHIPS', '_initialSupply': 1000, '_decimals': 2, '_mintable': False}
CrowdsaleToken address is 0x335521892ebf4b1f8db929963842dc4a668aa43c
CrowdsaleToken constructor arguments payload is 0x00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000003e800000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f4578616d706c652d746573746e6574000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000054348495053000000000000000000000000000000000000000000000000000000
CrowdsaleToken libraries are {'SafeMathLib': '0x3f26491aa18c3d59c054983b94aa77f76402e0a6'}
Starting MilestonePricing deployment, with arguments {'_milestones': [1512282000, 10000000000000000, 1513282000, 11000000000000000, 1514282000, 12000000000000000, 1515282000, 0]}
MilestonePricing address is 0x171462bf11e14efbc7194a87c8efef8f0df85177
MilestonePricing constructor arguments payload is 0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000005a239790000000000000000000000000000000000000000000000000002386f26fc10000000000000000000000000000000000000000000000000000000000005a32d9d00000000000000000000000000000000000000000000000000027147114878000000000000000000000000000000000000000000000000000000000005a421c10000000000000000000000000000000000000000000000000002aa1efb94e0000000000000000000000000000000000000000000000000000000000005a515e500000000000000000000000000000000000000000000000000000000000000000
MilestonePricing libraries are {'SafeMathLib': '0xd5345871683d1d049ef6102be0b0600a48b88686'}
Starting MintedTokenCappedCrowdsale deployment, with arguments {'_token': '0x335521892ebf4b1f8db929963842dc4a668aa43c', '_pricingStrategy': '0x171462bf11e14efbc7194a87c8efef8f0df85177', '_multisigWallet': '0xae47cb11728c811a4bb9ad51ccfd1f0496cbd125', '_start': 1492272000, '_end': 1494864000, '_minimumFundingGoal': 7500, '_maximumSellableTokens': 4000000}
MintedTokenCappedCrowdsale address is 0x52bf9e32ea7fb7d11a61e46f26b8a2030eee3b59
MintedTokenCappedCrowdsale constructor arguments payload is 0x000000000000000000000000335521892ebf4b1f8db929963842dc4a668aa43c000000000000000000000000171462bf11e14efbc7194a87c8efef8f0df85177000000000000000000000000ae47cb11728c811a4bb9ad51ccfd1f0496cbd1250000000000000000000000000000000000000000000000000000000058f24380000000000000000000000000000000000000000000000000000000005919d0800000000000000000000000000000000000000000000000000000000000001d4c00000000000000000000000000000000000000000000000000000000003d0900
MintedTokenCappedCrowdsale libraries are {'SafeMathLib': '0x14fd9e1a9e747a13ab02ccffdb791c1d9e1b11df'}
Starting BonusFinalizeAgent deployment, with arguments {'_token': '0x335521892ebf4b1f8db929963842dc4a668aa43c', '_crowdsale': '0x52bf9e32ea7fb7d11a61e46f26b8a2030eee3b59', '_bonusBasePoints': 2500, '_teamMultisig': '0xae47cb11728c811a4bb9ad51ccfd1f0496cbd125'}
BonusFinalizeAgent address is 0x69fffa44b0a11224e763377ba9b6b5dbefbe1c9f
BonusFinalizeAgent constructor arguments payload is 0x000000000000000000000000335521892ebf4b1f8db929963842dc4a668aa43c00000000000000000000000052bf9e32ea7fb7d11a61e46f26b8a2030eee3b5900000000000000000000000000000000000000000000000000000000000009c4000000000000000000000000ae47cb11728c811a4bb9ad51ccfd1f0496cbd125
BonusFinalizeAgent libraries are {'SafeMathLib': '0x4074091779a311afdabe301ff54fbad4597d70fd'}
Performing post-deployment contract actions
Action: # Enable new token minting by a crowdsale contract
Action: token.transact({"from": deploy_address}).setMintAgent(crowdsale.address, True)
Traceback (most recent call last):
File "/Users/saung/project/eth/ico/ico/deploy.py", line 188, in exec_lines
exec(buffer, context)
File "<string>", line 1, in <module>
File "/Users/saung/project/eth/ico/venv/lib/python3.6/site-packages/web3/contract.py", line 809, in transact_with_contract_function
txn_hash = contract.web3.eth.sendTransaction(transact_transaction)
File "/Users/saung/project/eth/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/saung/project/eth/ico/venv/lib/python3.6/site-packages/web3/eth.py", line 239, in sendTransaction
transaction=formatted_transaction,
File "/Users/saung/project/eth/ico/venv/lib/python3.6/site-packages/web3/utils/transactions.py", line 47, in get_buffered_gas_estimate
gas_estimate = web3.eth.estimateGas(gas_estimate_transaction)
File "/Users/saung/project/eth/ico/venv/lib/python3.6/site-packages/web3/utils/functional.py", line 14, in inner
value = fn(*args, **kwargs)
File "/Users/saung/project/eth/ico/venv/lib/python3.6/site-packages/web3/eth.py", line 282, in estimateGas
[formatted_transaction],
File "/Users/saung/project/eth/ico/venv/lib/python3.6/site-packages/web3/providers/manager.py", line 51, in request_blocking
raise ValueError(response["error"])
ValueError: {'message': 'Error: VM Exception while executing eth_estimateGas: invalid JUMP at f8aad2816498bfd8b4cf17b6e3ea8c2668c5bfb7a28a744d912b25cd9c762d6e/335521892ebf4b1f8db929963842dc4a668aa43c:2878\n at /usr/local/lib/node_modules/ethereumjs-testrpc/build/cli.node.js:59880:17\n at /usr/local/lib/node_modules/ethereumjs-testrpc/build/cli.node.js:88044:5\n at /usr/local/lib/node_modules/ethereumjs-testrpc/build/cli.node.js:11863:9\n at /usr/local/lib/node_modules/ethereumjs-testrpc/build/cli.node.js:8423:16\n at replenish (/usr/local/lib/node_modules/ethereumjs-testrpc/build/cli.node.js:8943:25)\n at iterateeCallback (/usr/local/lib/node_modules/ethereumjs-testrpc/build/cli.node.js:8933:17)\n at /usr/local/lib/node_modules/ethereumjs-testrpc/build/cli.node.js:8908:16\n at /usr/local/lib/node_modules/ethereumjs-testrpc/build/cli.node.js:11860:13\n at /usr/local/lib/node_modules/ethereumjs-testrpc/build/cli.node.js:88040:9\n at /usr/local/lib/node_modules/ethereumjs-testrpc/build/cli.node.js:73948:7', 'code': -32000}
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/saung/project/eth/ico/venv/bin/deploy-contracts", line 11, in <module>
load_entry_point('ico', 'console_scripts', 'deploy-contracts')()
File "/Users/saung/project/eth/ico/venv/lib/python3.6/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/Users/saung/project/eth/ico/venv/lib/python3.6/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/Users/saung/project/eth/ico/venv/lib/python3.6/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/saung/project/eth/ico/venv/lib/python3.6/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/Users/saung/project/eth/ico/ico/cmd/deploycontracts.py", line 22, in main
deploy_crowdsale_from_file(project, deployment_file, deployment_name, address)
File "/Users/saung/project/eth/ico/ico/deploy.py", line 263, in deploy_crowdsale_from_file
return _deploy_contracts(project, chain, web3, yaml_filename, chain_data, deploy_address)
File "/Users/saung/project/eth/ico/ico/deploy.py", line 248, in _deploy_contracts
perform_post_actions(chain, runtime_data, contracts)
File "/Users/saung/project/eth/ico/ico/deploy.py", line 206, in perform_post_actions
exec_lines(post_actions, context, print_prefix="Action:")
File "/Users/saung/project/eth/ico/ico/deploy.py", line 190, in exec_lines
raise RuntimeError("Failed when running: {}".format(buffer)) from e
RuntimeError: Failed when running: token.transact({"from": deploy_address}).setMintAgent(crowdsale.address, True)
(venv) ~/project/ico$
you error has nothing to do with pricingStrategy. You error comes from setting a Mint Agent to MintedTokenCappedCrowdsale address. you have to digg why.
@gelinger777 Since I found the new allocated-token-sale-example, it deployed the the whole crowd sale, but failed at this below test buy.
deploy-contracts --address=0xbfba749c5cbeb3c34411972861af8f2b03319bcb --deployment-file=crowdsales/allocated-token-sale-example.yml --deployment-name=mainnet
# Do a test buy using a test address.
# This ensures are variables are set and the
# funds flow in the multisig wallet.
confirm_tx(crowdsale.transact({"from": deploy_address, "value": to_wei("0.02", "ether")}).buy())
Verification: confirm_tx(crowdsale.transact({"from": deploy_address, "value": to_wei("0.02", "ether")}).buy())
Traceback (most recent call last):
File "/Users/saung/project/eth/ico/ico/deploy.py", line 188, in exec_lines
exec(buffer, context)
File "<string>", line 1, in <module>
File "/Users/saung/project/eth/ico/venv/lib/python3.6/site-packages/web3/contract.py", line 809, in transact_with_contract_function
txn_hash = contract.web3.eth.sendTransaction(transact_transaction)
File "/Users/saung/project/eth/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/saung/project/eth/ico/venv/lib/python3.6/site-packages/web3/eth.py", line 239, in sendTransaction
transaction=formatted_transaction,
File "/Users/saung/project/eth/ico/venv/lib/python3.6/site-packages/web3/utils/transactions.py", line 47, in get_buffered_gas_estimate
gas_estimate = web3.eth.estimateGas(gas_estimate_transaction)
File "/Users/saung/project/eth/ico/venv/lib/python3.6/site-packages/web3/utils/functional.py", line 14, in inner
value = fn(*args, **kwargs)
File "/Users/saung/project/eth/ico/venv/lib/python3.6/site-packages/web3/eth.py", line 282, in estimateGas
[formatted_transaction],
File "/Users/saung/project/eth/ico/venv/lib/python3.6/site-packages/web3/providers/manager.py", line 51, in request_blocking
raise ValueError(response["error"])
ValueError: {'message': 'Error: VM Exception while executing eth_estimateGas: invalid JUMP at 8dc100bb98800f8613ece66da1fbec104a1850bc24a27e7098f0d3cce358418e/d1d36a290954a89a32f23966cc0a000163f83db6:6748\n at /usr/local/lib/node_modules/ethereumjs-testrpc/build/cli.node.js:59880:17\n at /usr/local/lib/node_modules/ethereumjs-testrpc/build/cli.node.js:88044:5\n at /usr/local/lib/node_modules/ethereumjs-testrpc/build/cli.node.js:11863:9\n at /usr/local/lib/node_modules/ethereumjs-testrpc/build/cli.node.js:8423:16\n at replenish (/usr/local/lib/node_modules/ethereumjs-testrpc/build/cli.node.js:8943:25)\n at iterateeCallback (/usr/local/lib/node_modules/ethereumjs-testrpc/build/cli.node.js:8933:17)\n at /usr/local/lib/node_modules/ethereumjs-testrpc/build/cli.node.js:8908:16\n at /usr/local/lib/node_modules/ethereumjs-testrpc/build/cli.node.js:11860:13\n at /usr/local/lib/node_modules/ethereumjs-testrpc/build/cli.node.js:88040:9\n at /usr/local/lib/node_modules/ethereumjs-testrpc/build/cli.node.js:73948:7', 'code': -32000}
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/saung/project/eth/ico/venv/bin/deploy-contracts", line 11, in <module>
load_entry_point('ico', 'console_scripts', 'deploy-contracts')()
File "/Users/saung/project/eth/ico/venv/lib/python3.6/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/Users/saung/project/eth/ico/venv/lib/python3.6/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/Users/saung/project/eth/ico/venv/lib/python3.6/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/saung/project/eth/ico/venv/lib/python3.6/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/Users/saung/project/eth/ico/ico/cmd/deploycontracts.py", line 22, in main
deploy_crowdsale_from_file(project, deployment_file, deployment_name, address)
File "/Users/saung/project/eth/ico/ico/deploy.py", line 263, in deploy_crowdsale_from_file
return _deploy_contracts(project, chain, web3, yaml_filename, chain_data, deploy_address)
File "/Users/saung/project/eth/ico/ico/deploy.py", line 249, in _deploy_contracts
perform_verify_actions(chain, runtime_data, contracts)
File "/Users/saung/project/eth/ico/ico/deploy.py", line 226, in perform_verify_actions
exec_lines(verify_actions, context, print_prefix="Verification:")
File "/Users/saung/project/eth/ico/ico/deploy.py", line 190, in exec_lines
raise RuntimeError("Failed when running: {}".format(buffer)) from e
RuntimeError: Failed when running: confirm_tx(crowdsale.transact({"from": deploy_address, "value": to_wei("0.02", "ether")}).buy())
are you testing on testrpc?
@gelinger777 Yes.
My gut feeling is thata deploy_address
cannot buy because uis not whitelisted on both Crowdsale and PricingStrategy contracts. Can you paste your full YAML script?
Hi @miohtama and @gelinger777 ,
Full YAML, local testrpc accounts, and error log: https://gist.github.com/sithu/a05bfc0af4ac73a6642c5cc7bbbb2683
Thanking you in advance!
-Sithu
I can't help here, because it's testrpc and not a real blockchain. I suggest you install parity node, start it with command $parity --chain=kovan which is fully free test chain, request free ethereum via faucet, then deploy contracts and see if it works ..
Hi like you said I ran parity with ropsten chain.
But I could not deploy the contract. I opened the port 8545 and it can be accessed thru meta mask
but i could not deploy contract. please check this.
(venv) [root@localhost ico]# deploy-contracts --deployment-name testnet2 --deployment-file Testcontract.yaml --address 0x0061F6A22D3696F0E57EC9726927e4A5B979a49F
Web3 provider is RPC connection http://localhost:8545
Owner address is 0x0061F6A22D3696F0E57EC9726927e4A5B979a49F
Owner balance is 13 ETH
Already deployed contract, team_multisig 0x1c58fa977b43d242e5fa9d22c4a66631a58d8fdf
Starting PresaleFundCollector deployment, with arguments {'_owner': '0x1c58fa977b43d242e5fa9d22c4a66631a58d8fdf', '_freezeEndsAt': 1520776769, '_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 "
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='localhost', 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='localhost', 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
The error is here urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='localhost', port=8545): Read timed out. (read timeout=180)
. So it is in fact timing out. Can you ensure it is using right IP addres and port? Please send an example using command line curl
command that the node JSON-RPC API is responsive.
Really appreciate your reply. answering to your question. I can able to connect with Meta mask too but I dont why the deploy contracts command was not working. (venv) [root@localhost ico]# curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getBalance","params":["0x0061F6A22D3696F0E57EC9726927e4A5B979a49F", "latest"],"id":1}' http://localhost:8545 {"jsonrpc":"2.0","result":"0xb469471f80140000","id":1}
How to whitelisted on both Crowdsale and PricingStrategy contracts. ?
Somehow I managed to fix the issue by including Unlock parameter in parity. Here is the sample command parity -l 5 --chain ropsten --bootnodes "enode://20c9ad97c081d63397d7b685a412227a40e23c8bdc6688c6f37e97cfbc22d2b4d1db1510d8f61e6a8866ad7f0e17c02b14182d37ea7c3c8b9c2683aeb6b733a1@52.169.14.227:30303,enode://6ce05930c72abc632c58e2e4324f7c7ea478cec0ed4fa2528982cf34483094e9cbc9216e7aa349691242576d552a2a56aaeae426c5303ded677ce455ba1acd9d@13.84.180.240:30303" --rpccorsdomain "*" --unlock 0xe6bfd0a63256ad36cab82cb79b71d7d58a8c2417 --password pass.txt
Now the issue is gas price. Where to set the gas price or how to fix the following timeout issue.
(venv) [root@localhost ico]# deploy-contracts --deployment-name testnet --deployment-file Testcontract.yml --address 0xe6bfd0a63256ad36cab82cb79b71d7d58a8c2417 Web3 provider is RPC connection http://127.0.0.1:8545 Owner address is 0xe6bfd0a63256ad36cab82cb79b71d7d58a8c2417 Owner balance is 12.82240808182649152 ETH Already deployed contract, team_multisig 0xe6bfd0a63256ad36cab82cb79b71d7d58a8c2417 Starting PresaleFundCollector deployment, with arguments {'_owner': '0xe6bfd0a63256ad36cab82cb79b71d7d58a8c2417', '_freezeEndsAt': 1521696435, '_weiMinimumLimit': 750000000000000000000} 0x245bb7a77d822f632ca4da92d536f0191592247b8b52b702115e066879c350b6 Traceback (most recent call last): File "/token/testtoken/ico/ico/deploy.py", line 65, in deploy_contract contract, txhash = chain.provider.deploy_contract(contract_name, deploy_transaction=transaction, deploy_kwargs=kwargs) File "/token/testtoken/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/testtoken/ico/venv/lib64/python3.6/site-packages/populus/contracts/provider.py", line 143, in get_or_deploy_contract deploy_kwargs=deploy_kwargs, File "/token/testtoken/ico/venv/lib64/python3.6/site-packages/populus/contracts/provider.py", line 123, in deploy_contract contract_address = self.chain.wait.for_contract_address(deploy_transaction_hash) File "/token/testtoken/ico/venv/lib64/python3.6/site-packages/populus/wait.py", line 34, in for_contract_address txn_receipt = self.for_receipt(txn_hash, kwargs) File "/token/testtoken/ico/venv/lib64/python3.6/site-packages/populus/wait.py", line 48, in for_receipt return wait_for_transaction_receipt(self.web3, txn_hash, kwargs) File "/token/testtoken/ico/venv/lib64/python3.6/site-packages/populus/utils/wait.py", line 34, in wait_for_transaction_receipt poll_interval_fn=lambda: poll_interval if poll_interval is not None else random.random(), File "/token/testtoken/ico/venv/lib64/python3.6/site-packages/populus/utils/wait.py", line 22, in poll_until _timeout.sleep(poll_interval_fn()) File "/token/testtoken/ico/venv/lib64/python3.6/site-packages/populus/utils/compat/compat_stdlib.py", line 74, in sleep self.check() File "/token/testtoken/ico/venv/lib64/python3.6/site-packages/populus/utils/compat/compat_stdlib.py", line 67, in check raise self populus.utils.compat.compat_stdlib.Timeout: 120 seconds
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/token/testtoken/ico/venv/bin/deploy-contracts", line 11, in
Hi,
My deploy-contracts command was failing with this below error:
Is it true that deploy-contracts must run first before deploy-presale step?
Then, I tried to change the example.yml to:
Now, it gave me different error:
It looks like format in the example.yml doesn't match with the actual contract.
Thanking you in advance.
-Sithu