A demonstration of interacting with different DeFi applications on Ethereum.
- Solidity (Writing Smart Contract)
- Javascript (React & Testing)
- Hardhat (Development Framework)
- Ethers.js (Blockchain Interaction)
- Alchemy (Blockchain Connection)
- Curve Fianance (Defi Exchange)
- Convex Finance (Staking Platform)
- Install NodeJS. Recommended to use the latest LTS (Long-Term-Support) version, and preferably installing NodeJS via NVM.
- Create an Alchemy account, you'll need to create an app for the Ethereum chain, on the mainnet network.
npm install
Refer to the .env.example file and create a .env with the following variables:
- ALCHEMY_API_KEY=""
These variables are not required but can be made for fine tuning:
- BLOCK_NUMBER="18024700"
- OPTIMIZER="false"
- RUNS="200"
npx hardhat test
In a separate terminal execute:
npx hardhat test ./test/<name>.js
In a separate terminal execute:
npx hardhat node
In a separate terminal execute:
npx hardhat run scripts/<folder>/<name>.js --network localhost