Skip to content

Compilation , Building , Atomated testing , Deployment of ethereum project. My first project in ethereum using solidity. Inbox Contract

Notifications You must be signed in to change notification settings

tkAcharya/Inbox-Ethereum-Code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 

Repository files navigation

Build Status

EthereumAutomatedCompileDeploymentTest

Compilation , Building , Atomated testing , Deployment of ethereum project. My first project in ethereum using solidity.

1. Clone the project

$ git clone https://github.com/tkAcharya/Inbox-Ethereum-Code
$ cd Inbox-Ethereum-Code/Inbox

2. Install the modules required for the project

$ npm install
$ npm install --save solc ganache-cli web3 mocha

3. Run the test file

$ npm test

NOTE : This should give you a sample of addresses , and should run the basic tests present to verify the compilation and message modification

The below step is not required for local setup

4. Deploy the Contract to Rinkeby Test Network

  • Download and setup the metamask extension of chrome (Store the passphrase with you)
  • You need to create a free account on infura.io
  • Create a project in the infura and store the endpoint for rinkeby network
  • Install the following packages(if not present)
$ npm install –-save [email protected]
$ npm install dotenv
  • Write the passphrase of metamask in the mnemonic field in .env file
  • Write the rinkeby test network link in the link field in .env file
  • Run node deploy.js

5. Verify the deployed Contract to Rinkeby Test Network

After running the deploy file , you would have got a message like "Contract Deployed to "

Copy the xyz and paste it in rinkebyNetwork

You will be able to view your contract info in the dashboard.

Features

  • Offline support
  • Cross-platform
  • Awesome sounds
  • No singup/login required
  • Auto launch
  • Auto updates

Ethereum Code Beautifiers for different editors

Learnt from Udemy Course Link


If facing some issues :

  1. Always remove node_modules folder and then do <node install updates> to get all the dependencies

  2. If facing ganache or web3 related issues (web3 is in constant modification so , use the versioning instead .26) After that run <npm install --save mocha ganache-cli [email protected]>

  3. Put the console.log and verify if any variable from the compile is coming as undefined. Now run to verify if the whole code is working

Basic Terminologies in the Solidity Code :

  • Contracts : this contains .sol file mentioning our contract

  • test : this contains the test.js file (using some mocha code)

  • package.json : we keep this inside our root directory (have some script inside it , and it also captures different dependency being used)

  • compile.js : compiles our soldity files (node compile.js)

  • deploy.js : script file to take the compiled code and deploy it.

  • Running the tests : npm run test

About

Compilation , Building , Atomated testing , Deployment of ethereum project. My first project in ethereum using solidity. Inbox Contract

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published