Skip to content

vardamanpk/my-first-smart-contract

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My First Smart Contract

A simple Solidity smart contract and test project.

Installation

  1. Clone the repository:

    git clone https://github.com/BlockChain-R/my-first-smart-contract.git
  2. Install the dependencies:

     npm install

Usage

Starting a local blockchain:

To start a local blockchain using Ganache

npm run start

This will start a local blockchain on port 7545

Compile the smart contract:

npm run compile

This will generate the contract bytecode and ABI in the build/ directory.

Running tests:

To run the project tests using Jest, run:

npm run test

This will run the tests in the test/ directory. The tests will deploy the contract to the local blockchain and run the tests.

Dependencies

  • web3 - A collection of libraries that allow you to interact with a local or remote Ethereum node using HTTP, IPC, or WebSocket.
  • ganache-cli - A command-line interface for running a local Ethereum network for testing and development.
  • jest - A JavaScript testing framework that can be used for testing Solidity contracts.
  • solc - A Solidity compiler that can be used to compile Solidity contracts to bytecode and ABI.

License

MIT

Issues

Please report any issues or bugs to the issue tracker on GitHub.

About

A simple Solidity smart contract and test project.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 85.3%
  • Solidity 14.7%