Skip to content

A simple Solidity smart contract to store and retrieve a favorite number

Notifications You must be signed in to change notification settings

abdulhafiz999/myFirstSmartContract

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SimpleStorage Smart Contract This project extends a basic storage contract to include more advanced Solidity concepts, created as part of the Hackerboost Web3 course.

Features

Favorite Number: Store and retrieve a single favorite number.

Favorite Numbers Array: Add multiple numbers to a list.

Person Struct: Add people with names and favorite numbers.

Contract State Enum: Set the contract as Active or Inactive.

Functions Overview

storeNumber: Save a favorite number.

getFavoriteNumber: View the stored favorite number.

isGreaterThan: Check if the favorite number is greater than a given value.

sumToFavoriteNumber: Get the sum of numbers from 1 to the favorite number.

addPerson: Add a person’s name and favorite number.

activateContract / deactivateContract: Set the contract to active or inactive.

isActive: Check if the contract is currently active.

Ive really improved on this weeks assignment since i pushed the code to github stress free unlike the previous week.

About

A simple Solidity smart contract to store and retrieve a favorite number

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published