Is someone please able to clarify if I wanted 1000 tokens to be issued for 1 ether then what would I enter the price value in the contract.
function Crowdsale(
address ifSuccessfulSendTo,
uint fundingGoalInEthers,
uint durationInMinutes,
uint etherCostOfEachToken,
address addressOfTokenUsedAsReward
) public {
beneficiary = ifSuccessfulSendTo;
fundingGoal = fundingGoalInEthers * 1 ether;
deadline = now + durationInMinutes * 1 minutes;
price = etherCostOfEachToken * 1 ether;
tokenReward = token(addressOfTokenUsedAsReward);
}
I tried the below 3 options
0.001 but the contract won't accept anything i.e 0.xxxx
1000 and then the contract always never has enough GAS and I tried 0.0001 and it won't execute
I changed the code to be
price = etherCostOfEachToken * 0.001 ether;
and the contract runs but I get 0.0000001 of that token instead upon sending ether.
So can anyone please tell me from their experience what was the right value to put in to get 1000 tokens for 1 ether?
Thanks