I am trying to store a decimal number in a smart contract struct which represent the price of an item.
The field in the struct is uint
and I want to store values like 0.001
which is the cost in ether. When I read the cost value I get a BigNumber similar to this:
BigNumber { s: 1, e: 0, c: [ 0 ] }
How can I read the value 0.0001 from the frontend?