Giter VIP home page Giter VIP logo

ahmetozlu / smart_contract_helloworld Goto Github PK

View Code? Open in Web Editor NEW
10.0 3.0 1.0 28 KB

:fire: Smart contract hello world tutorial: write and deploy your first Ethereum smart contract!

Home Page: https://www.youtube.com/watch?v=Oxdop144I7Q

License: MIT License

Solidity 57.87% JavaScript 42.13%
smart-contract truffle ganache blockchain smart-contract-hello-world smart-contract-tutorial ethereum-contract ethereum-smartcontracts solidity-examples solidity-tutorial

smart_contract_helloworld's Introduction

Smart Contract Hello World

This repository presents practices about:

  • Setup a blockchain.
  • Develop Ethereum smart contract.
  • Deploy the contract and test it.

Quick Demo

The main instructions are given below and also the tutorial video of this project can be found on my YouTube channel.

First, clone the repository and build the project using truffle by this command:

truffle build

After building the project and starting ganache which provides ethereum blockchain network on your local, our smart contract can be deployed using truffle by this command:

truffle migrate

Now, our smart contract has been built and deployed so we can perform test on it by these commands respectively:

var hw;
Main.deployed().then(function(d){hw = d;});
hw.setUserName("Ahmet")
hw.printMessage.call() // prints Hello Ahmet!

Moreover, you can use developed unit test class to perform unit testing:

truffle test

Installation

Setup

  • Truffle

    sudo npm install -g [email protected] --unsafe-perm=true
    
  • Ganache installation guide can be found in here.

Citation

If you use this code for your publications, please cite it as:

@ONLINE{vdtct,
    author = "Ahmet Özlü",
    title  = "Smart Contract Hello World",
    year   = "2021",
    url    = "https://github.com/ahmetozlu/smart_contract_helloworld"
}

Author

Ahmet Özlü

License

This system is available under the MIT license. See the LICENSE file for more info.

smart_contract_helloworld's People

Contributors

ahmetozlu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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