julien/lovepublic Fork 0
69c46a2
Commits
Clone
git clone https://git.rickub.com/julien/love.git
git clone ssh://git@rickub.com/julien/love.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

update docs for erc20

julienbrg committed 2026-09-17T20:22:53+02:00 Browse files
69c46a2 parent: 4c8048e
modified .env.example +0 -3
@@ -1,7 +1,4 @@
11 # RPC endpoints
2-MAINNET_RPC_URL=
3-SEPOLIA_RPC_URL=
4-BASE_RPC_URL=https://mainnet.base.org
52 BASE_SEPOLIA_RPC_URL=https://sepolia.base.org
63
74 # Block explorer verification
@@ -1,7 +1,4 @@
1 # RPC endpoints1 # RPC endpoints
2-MAINNET_RPC_URL=
3-SEPOLIA_RPC_URL=
4-BASE_RPC_URL=https://mainnet.base.org
5 BASE_SEPOLIA_RPC_URL=https://sepolia.base.org2 BASE_SEPOLIA_RPC_URL=https://sepolia.base.org
6 3
7 # Block explorer verification4 # Block explorer verification
modified CHANGELOG.md +5 -3
@@ -10,9 +10,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010 ### Added
1111
1212 - Foundry project scaffolding (`forge-std`, CI workflow, `.gitignore`).
13-- `Love` contract recording units of love sent between addresses.
14-- Unit, revert and fuzz tests for `Love`.
13+- `Love`, an ERC-20 token (`LOVE`, 18 decimals) on OpenZeppelin v5, with an
14+ unrestricted public `mint(address,uint256)` — anyone can mint any amount.
15+- Metadata, mint, transfer, approve/`transferFrom`, revert and fuzz tests.
1516 - Deployment script `script/Love.s.sol`.
1617 - `foundry.toml` with pinned solc 0.8.30, optimizer, fmt rules, fuzz/invariant
17- defaults, and RPC/Etherscan endpoints driven by env vars.
18+ defaults, and Base Sepolia RPC/Etherscan endpoints driven by env vars.
19+- `remappings.txt` for `@openzeppelin/contracts/` and `forge-std/`.
1820 - `.env.example` documenting required environment variables.
@@ -10,9 +10,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
10 ### Added10 ### Added
11 11
12 - Foundry project scaffolding (`forge-std`, CI workflow, `.gitignore`).12 - Foundry project scaffolding (`forge-std`, CI workflow, `.gitignore`).
13-- `Love` contract recording units of love sent between addresses.13+- `Love`, an ERC-20 token (`LOVE`, 18 decimals) on OpenZeppelin v5, with an
14-- Unit, revert and fuzz tests for `Love`.14+ unrestricted public `mint(address,uint256)` — anyone can mint any amount.
15+- Metadata, mint, transfer, approve/`transferFrom`, revert and fuzz tests.
15 - Deployment script `script/Love.s.sol`.16 - Deployment script `script/Love.s.sol`.
16 - `foundry.toml` with pinned solc 0.8.30, optimizer, fmt rules, fuzz/invariant17 - `foundry.toml` with pinned solc 0.8.30, optimizer, fmt rules, fuzz/invariant
17- defaults, and RPC/Etherscan endpoints driven by env vars.18+ defaults, and Base Sepolia RPC/Etherscan endpoints driven by env vars.
19+- `remappings.txt` for `@openzeppelin/contracts/` and `forge-std/`.
18 - `.env.example` documenting required environment variables.20 - `.env.example` documenting required environment variables.
modified README.md +19 -2
@@ -2,8 +2,17 @@
22
33 A [Foundry](https://getfoundry.sh) project.
44
5-`Love` is a minimal contract that records units of love sent from one address to
6-another — a placeholder to build on.
5+`Love` (`LOVE`, 18 decimals) is a basic ERC-20 built on
6+[OpenZeppelin](https://github.com/OpenZeppelin/openzeppelin-contracts), with one
7+deliberate twist: `mint` has **no access control**.
8+
9+```solidity
10+function mint(address to, uint256 amount) external;
11+```
12+
13+Anyone can mint any amount to any address. Supply starts at zero and is
14+unbounded, so the token carries no economic value — it is a faucet / demo token.
15+Do not deploy it to mainnet expecting otherwise.
716
817 ## Setup
918
@@ -44,3 +53,11 @@ Drop `--broadcast` for a dry run.
4453 | `test/` | Tests |
4554 | `script/` | Deployment scripts |
4655 | `lib/` | Dependencies |
56+
57+## Mint
58+
59+```shell
60+cast send <LOVE_ADDRESS> "mint(address,uint256)" <RECIPIENT> 1000000000000000000 \
61+ --rpc-url base_sepolia \
62+ --account "$DEPLOYER_ACCOUNT"
63+```
@@ -2,8 +2,17 @@
2 2
3 A [Foundry](https://getfoundry.sh) project.3 A [Foundry](https://getfoundry.sh) project.
4 4
5-`Love` is a minimal contract that records units of love sent from one address to5+`Love` (`LOVE`, 18 decimals) is a basic ERC-20 built on
6-another — a placeholder to build on.6+[OpenZeppelin](https://github.com/OpenZeppelin/openzeppelin-contracts), with one
7+deliberate twist: `mint` has **no access control**.
8+
9+```solidity
10+function mint(address to, uint256 amount) external;
11+```
12+
13+Anyone can mint any amount to any address. Supply starts at zero and is
14+unbounded, so the token carries no economic value — it is a faucet / demo token.
15+Do not deploy it to mainnet expecting otherwise.
7 16
8 ## Setup17 ## Setup
9 18
@@ -44,3 +53,11 @@ Drop `--broadcast` for a dry run.
44 | `test/` | Tests |53 | `test/` | Tests |
45 | `script/` | Deployment scripts |54 | `script/` | Deployment scripts |
46 | `lib/` | Dependencies |55 | `lib/` | Dependencies |
56+
57+## Mint
58+
59+```shell
60+cast send <LOVE_ADDRESS> "mint(address,uint256)" <RECIPIENT> 1000000000000000000 \
61+ --rpc-url base_sepolia \
62+ --account "$DEPLOYER_ACCOUNT"
63+```