/Simple-Storage

Simple Storage Smart Contact

Primary LanguagePython

Simple Storage Smart Contract

This Solidity smart contract, SimpleStorage, allows users to store and retrieve favorite numbers. It also enables adding people's favorite numbers along with their names.

Functions

  • store(uint256 _favoritenumber): Stores the provided favorite number.
  • retrieve(): Retrieves the stored favorite number.
  • addperson(string memory _name, uint256 _favoritenumber): Adds a person's favorite number along with their name.

Data Structures

People: Represents a person with their favorite number and name.

Usage

  • Deployment: Deploy the contract to an EVM network.

Interaction:

  • Use store to store your favorite number.
  • Use retrieve to retrieve your stored favorite number.
  • Use addperson to add a person's favorite number with their name.