A simple smart contract that lets users associate a name with their favorite number. It allows storing and retrieving favorite numbers by name.
This project is a basic Solidity smart contract that maps a name (string) to a favorite number (uint256). It's ideal for demonstrating how to use mappings, structs, and strings in smart contracts.
Users can:
- Set a favorite number associated with a name
- Retrieve a favorite number by querying the name
Deployed on: Flow EVM Testnet
π Contract Address: 0x7ac1bA4c0A4a411126B8b67CDc408CC3d2d7358f
Replace the above with your actual deployed address once live.
- Solidity: Smart contract language
- Flow EVM Testnet: Blockchain test network
- Remix IDE / Hardhat (recommended): For development and testing
- Metamask: Wallet for interacting with Flow EVM
- Add name uniqueness checks
- Allow users to update only their own name-number pairs
- Emit events on set operations
- Create a frontend (React/Vue) to interact with the contract
- Add support for deleting entries
- Gas optimization and string length validation
Feel free to fork, improve, or contribute to this contract!