Coder Social home page Coder Social logo

smartcontracts-truffle's Introduction

GRON Digital Smart Contracts

Introduction

This repo contains a truffle framework project and GRON digital smart contracts.

Setup / pre-requisites

  1. Install/build Ganache
  2. Install Truffle - be sure version 4.0.4 or above is installed.
  3. Install Node version 8 and above.
brew install node # mac os only 
npm install -g truffle
npm install -g ethereumjs-testrpc

#
testrpc # start ganache / test-rpc

# in a seprate terminal
truffle compile # compiles smart contracts
truffle migrate # deploys smart contracts to test-rpc
truffle test # run unit tests

Deployment via MyEtherWallet

MyEtherWallet deployment enables deployment without the need for running and syncrhonising a network node. Instead, contract deployments are handled by submitting a REST API call to a community node such as EtherScan.io.

The following steps describe the manual deployment steps:

  1. Preparation:
    1. Create a funding wallet and make sure it has sufficient ether for contract deployments
    2. Create a control wallet
    3. Run truffle compile to build the GRO and GROVesting contracts. This will generate files json files that contain ABI and byteCode data for each contract.
    4. Calculate the priceNumerator (10000)
    5. Calculate the starting block for the funding rounds
    6. Calculate the end block for the funding rounds
  2. Deployment steps (using the funding wallet):
    1. Select the appropriate network in the top right of the MyEtherWallet app
    2. Deploy the GRO contract using the GRO contract bytecode, found in the GRO.json build file.
    3. Copy the GRO deployed contract address
    4. Use the GRO contract ABI, found in GRO.json, to call the GRO initialiseContract method
    5. Deploy the Vesting contract using the Vesting contract bytecode found in the GROVesting.json build file.
    6. Copy the Vesting deployed contract address
    7. Use the Vesting contract ABI, found ing GROVesting.json, to call the initialiseContract method
    8. Call the setVestingContract method in the GRO contract using the new Vesting contract address

smartcontracts-truffle's People

Contributors

seanpatches avatar

Watchers

 avatar James Cloos avatar Sean O'Reilly avatar Louis avatar

Forkers

emptybytes

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.