Sushi Wallet

Staking smart contract that acts as a layer on top of Router and MasterChef to join Sushiswap's liquidity mining program with a straightforward approach.

Description

The main purpose of this contract is to handle most of the transactions required to farm LP tokens in a single transaction, giving the user the ability to skip most of them and thus saving time and gas. Also, it can withdraw LP tokens and remove liquidity at the same time!

The interactions with MasterChef and Router are on behalf of the user, so no tokens or ETH will stay in the contract since it's only a intermediary.

Run Locally

Clone the project

git clone https://github.com/luislucena16/sushi-challenge.git

Go to the project directory

cd sushi-challenge

Install dependencies

Using npm

npm install

Local Development

Configure your .env file search the RPC node in the link and paste this:

Note: We will use the addresses of the smart contracts deployed on the fuji test network

Then use the following command:

npx hardhat node

Open another terminal window and compile your contracts, run this command:

Compile contracts

npm run compile

Deploy contracts

npm run deploy
npm run mint
npm run add-liquidity
npm run add-pool
npm run deposit
npm run withdraw
npm run emergency-withdraw
npm run get-wallet-data

Running Tests

To run tests, run the following command

npm run test

Clean Cache

npm run clean