Giter Site home page Giter Site logo

jitendragangwar123 / learn-solidity-with-examples Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 182 KB

This repository contains various smart contract examples built using Solidity. These examples are designed to showcase different functionalities, use cases, and features of smart contracts on the Ethereum blockchain.

Solidity 100.00%
ethereum smart-contracts solidity defi erc-20 erc-721 nfts erc1155

learn-solidity-with-examples's Introduction

Learn-Solidity-With-Examples

  • This repository contains various smart contract examples built using Solidity. These examples are designed to showcase different functionalities, use cases, and features of smart contracts on the Ethereum blockchain. Developers and enthusiasts can explore these contracts to gain a better understanding of how to create, deploy, and interact with smart contracts for a wide range of applications and scenarios.

Blockchain-Roadmap

Blockchain-Roadmap Link.

Table Of Contents

natspec:-

  • The standard in the Solidity community is to use a format called natspec, which looks like this:-
/**
 * @title A contract for basic math operations
 * @author Jitendra Gangwar
 * @notice For now, this contract just adds a multiply function
 */
contract Math {
  /**
   * @notice Multiplies 2 numbers together
   * @param x the first uint.
   * @param y the second uint.
   * @return z the product of (x * y)
   * @dev This function does not currently check for overflows
   */
  function multiply(uint x, uint y) returns (uint z) {
    // This is just a normal comment, and wont get picked up by natspec
    z = x * y;
  }
}
- @title and @author are straightforward.
- @notice explains to a user what the contract / function does. 
- @dev is for explaining extra details to developers.
- @param and @return are for describing what each parameter and return value of a function are for.
  • Note that you don't always have to use all of these tags for every function โ€” all tags are optional. But at the very least, leave a @dev note explaining what each function does.

learn-solidity-with-examples's People

Contributors

jitendragangwar123 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  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.