Tiny web3 protocols and applications.
The aim is to keep it simple, quick to implement and interesting to learn Solidity.
Inspired by lil-web3 by Miguel Piedrafita.
Map human-readable names like vitalik.eth to machine-readable identifiers such as Ethereum addresses like 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 and support the reverse resolution.
| interfaceITinyENS { |
| /// @notice Register a new ENS name and link it to an address. |
| /// @param name The ENS name to register. |
| function register(stringmemoryname) external; |
| |
| /// @notice Update the ENS name linked to an address. |
| /// @param newName The new ENS name. |
| function update(stringmemorynewName) external; |
| |
| /// @notice Resolve the address associated with a given ENS name. |
| /// @param name The ENS name to resolve. |
| /// @return The address associated with the ENS name. |
| function resolve(stringmemoryname) externalviewreturns (address); |
| |
| /// @notice Reverse resolve an address to its associated ENS name. |
| /// @param targetAddress The target address to reverse resolve. |
| /// @return The ENS name associated with the address. |
| function reverse(addresstargetAddress) externalviewreturns (stringmemory); |
| } |
A game where the last caller, before a 10-block inactivity period, wins the entire contract's ETH balance.
| interfaceILastCallJackpot { |
| /// @notice Call the contract and attempt to win the jackpot. |
| function call() externalpayable; |
| } |