Wrapping my head around
ether is getting me very confused.
For the purposes of education, I'm trying to make an ERC20 token contract that is capped at only ONE token. My understanding is that, since Solidity doesn't deal with floating point numbers, by setting my
decimals to 18, I actually have 1e18 "parts" to this "one token" of mine.
Please correct me if my understanding is wrong. But I'm going to keep going.
So I've been trying to follow this tutorial and it makes use of:
- A token contract that inherits from
- A crowdsale contract that inherits from
In order to change this to a capped supply token, I just made the token contract inherit from
CappedToken instead, added the necessary constructor method, and initialized the cap amount on deployment.
The crowdsale contract takes a
rate value, which I assume is how many tokens to return to the user for 1
There are basically 3 parameters at this point:
I'm a bit confused at this point because I keep getting cryptic reverts when I try to send in 1
wei. Shouldn't 1
wei buy me 1 of my coins?