npx hardhat run --network kovan scripts/deploy.js
- Copy generated
contractAddress
intoscripts/addressHelper.js
- Adjust approval settings in
scripts/doApproval.js
npx hardhat run --network kovan scripts/doApproval.js
- Adjust dust settings in
scripts/sweepDust.js
npx hardhat run --network kovan scripts/sweepDust.js
- Open terminal and run
npx hardhat run --network kovan scripts/takerBot.js
and leave it open and running - Open a new terminal and run
npx hardhat run --network kovan scripts/doApproval.js
- When the
makerThreshold
set inscripts/takerBot.js
is met the sweepDust() method will be called on the DustSweeper contract.
- Open terminal and run a hardhat node:
npx hardhat node
- Open another terminal and deploy DustSweeper contract:
npx hardhat --network localhost run scripts/deploy.js
- Copy the address the DustSweeper contract was deployed to into
scripts/addressHelper.js
contractAddress - In that same terminal start the bot:
npx hardhat --network localhost run scripts/takerBot.js
and wait until it console logs that it is listening - Use either
npx hardhat --network localhost run scripts/doApproval.js
or the frontend to approve tokens.