Skip to content

This repo contains starter code to develop a ethereum project on local machine. It also contains simple local environment to test solidity contracts using 'mocha' and 'ganache' and to deploy those contracts using infura

License

Notifications You must be signed in to change notification settings

suhasranganath/Ethereum-Dev-Starter-Code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ethereum Dev Starter Code

This repo contains starter code to develop a ethereum project on local machine. It also contains simple local environment to test solidity contracts using mocha and to deploy those contracts using infura.

Steps to get started.

  1. Clone the repo
    $ git clone https://github.com/suhasranganath/Ethereum-Dev-Starter-Code.git 
  2. Install node packages
    $ npm install 
  3. Update the current simple contract code( contracts/Inbox.sol ) with your contract code
  4. Update compile.js so that it exports 'Interface' and 'Bytecode' of your new contract
    Eg: Replace ':Inbox' with ':Contract_Name'.
  5. Compile your contract
    $ node compile.js 
  6. Add your test code to Inbox.test.js file.
  7. Test your contract
    $ npm run test 
  8. Update Mnemonic Words(12 words) and Infura api in deploy.js
  9. Deploy your code to test/mainnet
    $ node deploy.js 
  10. Folder Structure

    Below is the folder structure of the repo.

    Folder Structure

    1. contracts/Index.sol - Simple solidity contract code
    2. test/Index.test.sol - Mocha test code for the contract code
    3. compile.js - Uses solidity compiler solc to compile and exports Interface and Bytecode of the contract.
    4. deploy.js - Deployment code. Uses Infura api to connect and deploy contract to test/mainnet ethereum networks

About

This repo contains starter code to develop a ethereum project on local machine. It also contains simple local environment to test solidity contracts using 'mocha' and 'ganache' and to deploy those contracts using infura

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published