This repository contains the smart contracts for the Swap Aggregator, a blockchain solution for aggregating token swaps across multiple Automated Market Makers (AMMs) on Ethereum.
Follow these instructions to set up the project on your local machine for development and testing purposes.
- Node.js
- npm
-
Clone the Repository
git clone https://github.com/Avento-Labs/swap-aggregator-contracts
-
Install Dependencies
npm install
-
Create .env File Create an .env file in the root directory of the project and add the following environment variables:
MNEMONIC='YOUR MNEMNONIC' GOERLI_RPC_URL='YOUR ALCHEMY OR INFURA GOERLI RPC URL' MAINNET_RPC_URL='YOUR ALCHEMY OR INFURA MAINNET RPC URL'
-
Compile Contracts
npm run compile
-
Run Forked Mainnet
npm run start-node
Note: This step is important for running the API server and tests locally.
-
Deploy Contracts
npm run deploy
-
Run Tests
npm run test