Incorrent number of parameters for MilestonePricing in example.sol
thorin-schiffer opened this issue · 1 comments
thorin-schiffer commented
Looks like this
pricing_strategy:
contract_name: MilestonePricing
contract_file: MilestonePricing.sol
arguments:
_preicoPrice: "{{ to_wei('0.008', 'ether') }}"
_preicoContractAddress: "{{contracts.preico.address}}"
_milestones:
- 1492272000
- "{{ to_wei('0.010', 'ether') }}"
- 1492876800
- "{{ to_wei('0.011', 'ether') }}"
- 1493481600
- "{{ to_wei('0.012', 'ether') }}"
- 1494691200
- "{{ to_wei('0.013', 'ether') }}"
causes this
tarting MilestonePricing deployment, with arguments {'_milestones': [1492272000, 10000000000000000, 1492876800, 11000000000000000, 1493481600, 12000000000000000, 1494691200, 13000000000000000], '_preicoContractAddress': '0xdbf49e6f5b5408356d03eac2c04dde3e69ee52c0', '_preicoPrice': 8000000000000000}
Traceback (most recent call last):
File "/home/sergey/PycharmProjects/ico/ico/deploy.py", line 66, in deploy_contract
contract, txhash = chain.provider.deploy_contract(contract_name, deploy_transaction=transaction, deploy_kwargs=kwargs)
File "/home/sergey/.virtualenvs/ico/lib/python3.5/site-packages/populus/contracts/provider.py", line 121, in deploy_contract
kwargs=deploy_kwargs,
File "/home/sergey/.virtualenvs/ico/lib/python3.5/site-packages/web3/contract.py", line 307, in deploy
deploy_transaction['data'] = cls._encode_constructor_data(args, kwargs)
File "/home/sergey/.virtualenvs/ico/lib/python3.5/site-packages/eth_utils/string.py", line 85, in inner
return force_obj_to_text(fn(*args, **kwargs))
File "/home/sergey/.virtualenvs/ico/lib/python3.5/site-packages/web3/contract.py", line 745, in _encode_constructor_data
arguments = merge_args_and_kwargs(constructor_abi, args, kwargs)
File "/home/sergey/.virtualenvs/ico/lib/python3.5/site-packages/eth_utils/string.py", line 71, in inner
return fn(*text_args, **text_kwargs)
File "/home/sergey/.virtualenvs/ico/lib/python3.5/site-packages/web3/utils/abi.py", line 166, in merge_args_and_kwargs
len(args) + len(kwargs),
TypeError: Incorrect argument count. Expected '1'. Got '3'
because MilestonePricing
contract's constructor has only one paremeter: _milestones
. Changed in 2745fa7
My question is then where can I configure _preicoContractAddress
and _preicoPrice
.
ciasom commented
I think you can set them by calling setPreicoAddress afterwards.