Giter Site home page Giter Site logo

aniket-engg / solidity-school Goto Github PK

View Code? Open in Web Editor NEW
349.0 8.0 84.0 367 KB

First place for early developers to learn Solidity

Solidity 78.64% TypeScript 21.36%
solidity solidity-contracts smart-contracts solidity-school solidity-language hacktoberfest

solidity-school's Introduction

๐ŸŽ’ solidity-school

Solidity School is an initiative to prepare a code base for the solidity beginners by those who were beginners sometime. It categorize the smart contracts in multiple standards according to different difficulty levels. For now, standards are 0 to 5.

Idea of Solidity School is to Learn-n-Contribute. So a beginner will learn to code and can contribute too while learning.

๐Ÿ‘‰ Solidity school is listed on useWeb3 platform and mostly finds a place in top 5 Most popular last week resources

How to start

To start learning, one needs to start with standard 0 (std-0). Each standard will have a problem statement and an informational hint for each task. Learners can try to write the contract to solve the problem statement by using the given hint.

Once done, final contract can be compared with the one provided in this repository. If learner thinks that his or her contract is better than the one in the repo, a Pull Request can be raised to contribute.

This project needs a great support from Blockchain enthusiasts, developer and researchers to build this school in a way which can attract learners and provide them ease for learning the development.

Categorization

Categorization of contracts in standard is done to increase the understanding.

In case of any discrepancies, discussion can be done via issues/PRs.

More Details

For various other details, visit the wiki section.

Solidity Version

Currently contracts in this repo support Solidity version 0.8.17 . It will be updated following the major & minor release.

NOTE: Contracts in this repository are only for learning purpose and not recommended for production use.

solidity-school's People

Contributors

amar-exe avatar aniket-engg avatar dependabot[bot] avatar kali-decoder avatar rijuchakraborty avatar saba8814 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

solidity-school's Issues

AttendanceRegister

Standard: 2
Sequence: 5
Contract Name: AttendanceRegister

Problem Statement:
Write a contract named "AttendanceRegister" which will be deployed by teacher. There will be a function add which will take student name, class & joiningDate and will store it where:

  • Name : String to store student name
  • Class : Number from 1 to 12
  • Joining Date : Date timestamp of student joining day

Each student will be stored corresponding to a unique serial number called roll number.

Only teacher can add the data of student. An event will be emitted on success.

Use struct, modifier & mapping wherever applicable.

Add related hint, if required.

PrimeNumber

Standard: 1
Sequence: 4
Contract Name: PrimeNumber

Problem Statement:
Write a contract 'PrimeNumber' which implements a function named ifPrime.

ifPrime() accepts a number and return true if number is a prime number else false. This function should not consume any gas.

Add related hint, if required.

AllPrimeNumber

Standard: 1
Sequence: 5
Contract Name: AllPrimeNumber

Problem Statement:
Write a contract 'AllPrimeNumber' which implements a function named addPrime & getPrime.

addPrime() accepts a positive(unsigned) number and adds all the prime numbers existing from 1 to passed number in an array.

getPrime() will return the prime numbers added in previous call.

Add related hint, if required.

Time

Standard: 1
Sequence: 6
Contract Name: Time

Problem Statement:
Write a contract 'Time' which implements a function named getTime.

getTime() accepts a Unix timestamp (number of seconds since 1970-01-01 00:00:00 GMT). Method will check if this timestamp exists after the current time. If yes, it will return a timestamp after 1 hour, 20minutes and 30 seconds from passed time else return 0.

Add related hint, if required.

Is this Project Dead?

Got very excited when I saw the format of the tutorials but nothing inside except 1st 2 folders.

Rent

Standard: 2
Sequence: 4
Contract Name: Rent

Problem Statement:
Write a contract named "Rent" which will be deployed by Landlord and all ethers transferred on this contract address will be automatically transferred to landlord's address. On deployment, landlord will provide the information of tenant which will be public. Information of tenant will be name, age & occupation.

Use fallback function wherever required.

Add related hint, if required.

ThreeAndSeven

Standard: 1
Sequence: 3
Contract Name: ThreeAndSeven

Problem Statement:
Write a contract 'ThreeAndSeven' which implements a function named check.

check() accepts a number and return true if number is fully divided by 3 or 7 and greater than 10 else false. This function should not consume any gas.

Add related hint, if required.

LifeCycle

Standard: 2
Sequence: 3
Contract Name: LifeCycle

Problem Statement:
Write a function getStage(), which should take no. of months as a parameter and return the user its lifecycle stage. Stages can be:

  • Infant
  • Toddler
  • Child
  • TeenAger
  • Adult
  • Old

Use enum for stage listing. Use general conventions of age to categorise.
Add related hint, if required.

SafeCalculator

Standard: 2
Sequence: 2
Contract Name: SafeCalculator

Problem Statement:
Extend std-1/1_Calculator/Calculator.sol with performing below checks in its methods:

  • Value Overflow
  • Value Underflow
  • Invalid Operation

Use require or assert.
Add related hint, if required.

Status of the project

Just saw this project and seen that this is still on version 0.6.0, any plans to restart the project? If yes do let me know, even I can contribute.

Define standards syllabus

It will be good to give a glimpse of hierarchy of topics which will be covered in various standards.

SelfWhitelist

Standard: 1
Sequence: 7
Contract Name: SelfWhitelist

Problem Statement:
Write a contract 'SelfWhitelist' which implements two functions named whitelist & check. It maintains a list of whitelisted addresses. (Use Array)

whitelist() accepts an address as parameter and stores it in the whitelist. Passed address should be of the person calling the method.

check() checks if callee (address calling the method) exists in the whitelist and returns true otherwise false, without consuming gas.

Add related hint, if required.

Student

Standard: 2
Sequence: 1
Contract Name: Student

Problem Statement:
Write a contract 'Student' which implements a function named enroll.

enroll() takes student roll number (uint) and student name (string) as parameters and store them in a one to one mapping. Also emit en event on success with student roll number.

Add related hint, if required.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.