-
The NameDayToken is an ERC-20 contract mintable by addresses with specific ENS names and transferable only during the specific name day.
Example: You setup an Alice token that is mintable by all *alice*.eth holders and only transferable during Alice's day (16/12 of each year).
-
The NameDayTokenFactory contract allow you to deploy a NameDayToken easily.
- string name_ : ERC-20 token name (eg: AliceToken)
- string symbol_ : ERC-20 token symbol (eg: ALICE)
- string dayName_ : The day name (eg: alice). This name will be used to determine whether the address has an ENS name that contains this nameDay (eg: alice)
- uint256 nameDayTimestamp_ : The timestamp of the day when the token will be mintable and transferable (in seconds) (eg: 1702684800)
- uint256 mintPerUserPerYear_ : The number of token that an address can mint pear year during the name day (in wei) (eg: 1e20)
- uint256 maxSupply_ : The max supply of the token (in wei) (eg: 1e24)
Allows mint mintPerUserPerYear
NameDayToken.
- string ensName : The ENS name the sender should own.
⚠️ The ENS name should contains the dayName (eg: alicecooper)
Allows you to deploy a NameDayToken
- all the arguments of the NameDayToken contrsuctor.
Test must be run only on sepolia testnet:
forge test -vv --fork-url https://ethereum-sepolia.publicnode.com
Tests run on other networks will fail because the ENS owner addresses specified in the tests are only valid on the Sepolia test network.
I use "martinToken" as example in the tests because I (0xMartinGbz) personnaly own all the Sepolia ENSs specified in them. This ensures that the tests will always work, as nobody can change the addresses resolution and then cause test issues.
The project has been created for learning purposes only.