- NodeJS. Download here
- Solidity VSCode Extension by Nomic Foundation.
- VSCode Live Server Extension by Ritwick Dey.
solc and Hardhat will be installed alongside the dependencies
Verify publishers before installing any extension.
- In your terminal or git bash (for windows), create a new working directory, for example:
mkdir solidity-smart-contract-practice
- Download RivETH
curl -L -0 https://github.com/Temi-Tade/RivETH/archive/refs/heads/main.zip --output RivETH.zip && unzip RivETH.zip -d temp && mv temp/RivETH-main/* . && rm -rf temp RivETH.zip
RivETH folder. cd RivETH and open it on VSCode.
- Install dependencies: npm install- In the
RivETH directory in your terminal, start a local hardhat node:npx hardhat node- In a separate terminal and in your working directory, compile the smart contract's solidity code:
./compile [FILE_NAME]or with
make [FILE_NAME],you do not need to add the
.sol extension. Replace [FILE_NAME] with the name of the file you want to compile.
- Start VSCode live server extension to open RivETH in your browser.
- You can find pre-written solidity smart contracts in the
contracts/folder. Note that these contracts have not been reviewed and are not to be used in production. - Do not save or write any file to the
artifacts/folder. The solidity compiler will automatically write files to this folder. - Use the same name for the solidity file and contract (e.g.
MyContract.solandcontract MyContract{...}). - To effect changes to a contract after making changes, click the "Load" button to get the latest ABI and bytecode and redeploy the contract.
RivETH is open source, you can help improve it by contributing. To contribute:
- Create a fork of the main repo.
- Clone your forked repo.
- Create an issue with the specific bug fix/change/feature you want to make/add.
- Work on your bug fix/change/feature and push your changes to the forked repo.
- Create a pull request with the bug fix/change/feature you worked on.
- Your PR will be reviewed and then merged if deemed fit.