A simple Solidity smart contract and test project.
-
Clone the repository:
git clone https://github.com/BlockChain-R/my-first-smart-contract.git
-
Install the dependencies:
npm install
To start a local blockchain using Ganache
npm run start
This will start a local blockchain on port 7545
npm run compile
This will generate the contract bytecode and ABI in the build/ directory.
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.
- 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.
Please report any issues or bugs to the issue tracker on GitHub.