Giter Club home page Giter Club logo

register-learn-solidity's Introduction

Learn solidity with the Register project

This is a set of smart contracts examples to learn Solidity fundamentals

Register-01.sol is a very basic smart contract.

Then will be created new versions, adding Solidity concepts in each of them.

I suggest to try it in Remix

Solidity concepts

Register-01

  • Comments
  • License-Identifier
  • Solidity version: pragma command
  • Creating a contract: contract command
  • Variable type: string
  • Variable visibility: private
  • Creating a function: function
  • Function visibility: external
  • Function types: view
  • Function with parameters
  • Returning data in functions

Register-02

  • Variable type: uint
  • Variable visibility: public
  • Initializing a variable
  • Increasing numbers

Register-03

  • Initializing a contract: constructor command

Register-04

  • Variable type: address
  • Owner concept
  • Global variable: msg.sender
  • Checking conditions: ifcommand
  • Permissions and access concepts

Register-05

  • Managing conditions: require command
  • Error messages

Register-06

  • Function modifiers

Register-07

  • Events

Register-08

  • All together 1
    • types string, uint, address
    • msg.sender and owner, constructor
    • require, function modifiers, events

Register-09

  • Array

Register-10

  • Loop structures: for
  • Local / memory array

Register-11

  • Key -> value concept: mapping command
  • Access control: creating a whitelist using a mapping

Register-12

  • Enum concept

Register-13

  • Structs

Register-14

  • Combining mapping and struct
  • One struct per address
  • You can only modify your own struct, no whitelist

Register-15

  • Combining mapping and array
  • Each address has a mapping with array of structs

register-learn-solidity's People

Contributors

solangegueiros avatar

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.