Giter Site home page Giter Site logo

ykts's Introduction

YKTS Ethereum DApp and Smart Contract(s)

Contents

This repository contains sample YKTS DApp and smart contracts developed for Ethereum platform. All smart contracts are deployed on Ethereum's Rinkeby testnet. Metamask browser extension is used for testing and development
Please check out the *.js files in app directory.

Simple Flow

Screenshot

Setting Up

Please refer to the following step-by-step guides to setup and start development with Truffle

Development and Testing

Basic commands for development and testing are as follows

# everytime you had a fresh checkout, get dependencies via
$ npm install

# compile smart contracts
$ truffle compile

# test smart contracts
$ truffle test

# create an .env file to store wallet seed and infura api keys in project root dir
$ cat .env
MNEMONIC=<wallet (Metamask) seed phrases>
INFURA_PROJECT_ID==<infura project id>

# deploy smart contracts on Rinkeby (used for testing!)
$ truffle migrate --network rinkeby

# deploy smart contracts on various networks
$ truffle migrate --network localhost
$ truffle migrate --network mainnet
$ truffle migrate --network ropsten

# serve static content with lite-server at localhost:3000
$ npm run dev

A sample migration will look as follows, current smart contract (see Etherscan) cost is 0.0518081 ETH

$ truffle migrate --network rinkeby

Compiling your contracts...
===========================
> Everything is up to date, there is nothing to compile.



Migrations dry-run (simulation)
===============================
> Network name:    'rinkeby-fork'
> Network id:      4
> Block gas limit: 10004062 (0x98a65e)


1_initial_migration.js
======================

   Deploying 'YKTS'
   ----------------
   > block number:        6768719
   > block timestamp:     1593686265
   > account:             0x6119AB391d0A2870D4e97E83a8aFe7FbFb558400
   > balance:             9.153492385
   > gas used:            2515405 (0x2661cd)
   > gas price:           2 gwei
   > value sent:          0 ETH
   > total cost:          0.00503081 ETH

   -------------------------------------
   > Total cost:          0.00503081 ETH


Summary
=======
> Total deployments:   1
> Final cost:          0.00503081 ETH





Starting migrations...
======================
> Network name:    'rinkeby'
> Network id:      4
> Block gas limit: 10000000 (0x989680)


1_initial_migration.js
======================

   Deploying 'YKTS'
   ----------------
   > transaction hash:    0xaf270175c0b0027a26d2ffeb3717fcc17c5c98515aae37e73a26e8cf27acbe0f
   > Blocks: 0            Seconds: 9
   > contract address:    0x2553Cf82F711c808278EA24F39A6678B53f593af
   > block number:        6768721
   > block timestamp:     1593686289
   > account:             0x6119AB391d0A2870D4e97E83a8aFe7FbFb558400
   > balance:             9.106715095
   > gas used:            2590405 (0x2786c5)
   > gas price:           20 gwei
   > value sent:          0 ETH
   > total cost:          0.0518081 ETH

   > Saving artifacts
   -------------------------------------
   > Total cost:           0.0518081 ETH


Summary
=======
> Total deployments:   1
> Final cost:          0.0518081 ETH

Test accounts are as follows:

Account 1: 0x6119AB391d0A2870D4e97E83a8aFe7FbFb558400 (admin)
Account 2: 0x5686D0cf1cE96fcA54D4d940feCC244f1B5B8D45 (notary)
Account 3: 0x0061496184B3Ac4BF935247Dd52Ab96b3B99f613 (entity)
Account 4: 0xdc8f590c97cA11afcc55155D9FB9BA761F0d791f (broker1)
Account 5: 0x1432d11664ea7579BF73B31A92d732eFb003751d (broker2)

ykts's People

Contributors

kozyilmaz avatar

Stargazers

 avatar regenesturk avatar  avatar Mehmet Can Kanpolat avatar

Watchers

Mete Can Eriş avatar James Cloos avatar  avatar  avatar regenesturk 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.