love
A Foundry project.
Love (LOVE, 18 decimals) is a basic ERC-20 built on
OpenZeppelin, with one
deliberate twist: mint has no access control.
function mint(address to, uint256 amount) external;
Anyone can mint any amount to any address. Supply starts at zero and is
unbounded, so the token carries no economic value — it is a faucet / demo token.
Do not deploy it to mainnet expecting otherwise.
Setup
forge install
cp .env.example .env
Usage
forge build # compile
forge test # run tests
forge test -vvv # with traces
forge fmt # format
forge coverage # coverage report
forge snapshot # gas snapshot
anvil # local node
Deploy
forge script script/Love.s.sol:LoveScript \
--rpc-url base_sepolia \
--account "$DEPLOYER_ACCOUNT" \
--broadcast \
--verify
Drop --broadcast for a dry run.
Layout
| Path | Contents |
|---|---|
src/ |
Contracts |
test/ |
Tests |
script/ |
Deployment scripts |
lib/ |
Dependencies |
Mint
cast send <LOVE_ADDRESS> "mint(address,uint256)" <RECIPIENT> 1000000000000000000 \
--rpc-url base_sepolia \
--account "$DEPLOYER_ACCOUNT"
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
|