I'm currently trying to set the token price of my ERC-20 token.The problem I'm having is trying to set the price to ETH(0.01) per token, but the closest value I keep getting to is ETH(0.001) per token when making a transaction to buy.

// Denominations example   
// ether = 1,000,000,000,000,000,000
var tokenPrice = 1000000000000; 
deployer.deploy(DappTokenSale, DappToken.address, tokenPrice);

I've tried passing in different values with no effect in getting ETH(0.01), and well tried just setting the value in the contract without passing in this large number.

1 Answer 1


Solved. I had to do a complete reset of Metamask accounts and blockchain server, values are working as expected now.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.