Skip to content

Instantly share code, notes, and snippets.

Avatar

Rory Hellyer webmodularity

View GitHub Profile
@webmodularity
webmodularity / sweepDust.js
Created Apr 29, 2022
DustSweeper V2 taker sweepDust implementation
View sweepDust.js
const { ethers } = require("ethers");
const axios = require('axios').default;
require('dotenv').config();
/////////////////////////
// EDIT THESE VALUES //
/////////////////////////
const makers = [
"0xFA62E6eFEc39b4Dc5E3f37D676F18B560f7dD458"
];
@webmodularity
webmodularity / gist:5c05db49a59f4a72ccca5bbcd89cbf54
Created Mar 2, 2022
DustSweeper - sweepDust.js example node script
View gist:5c05db49a59f4a72ccca5bbcd89cbf54
const { ethers } = require("ethers");
require('dotenv').config();
// Your credentials
const providerUrl = `https://mainnet.infura.io/v3/${process.env.INFURA_ID}`; // Replace with your provider info
const privateKey = process.env.PK;// Replace with your private key
async function main() {
// Example , these makers have already been swept for these tokens
const makers = [
View gist:640bb086a466ab827c51366d59964abe
const { default: EthersSafe, EthersAdapter } = require("@gnosis.pm/safe-core-sdk");
const ethers = require("ethers");
//require('dotenv').config({ path: `${__dirname}/../../.env` })
const SafeDisperseContract = require("./artifacts/SafeDisperse.json");
const ERC20Contract = require("./artifacts/ERC20.json");
const safeDisperseInterface = new ethers.utils.Interface(SafeDisperseContract.abi);
const erc20Interface = new ethers.utils.Interface(ERC20Contract.abi);
View gist:1e70a182872810b17db400ffc1016120
//const { default: EthersSafe, EthersAdapter } = require("../src/Safe.ts");
//const ethers = require("ethers");
//require('dotenv').config({ path: `${__dirname}/../../.env` })
import Safe from '../src'
import { EthAdapter, EthersAdapter, Web3Adapter } from '../src'
import { ethers } from "ethers";
const SafeDisperseContract = require("./artifacts/SafeDisperse.json");
const ERC20Contract = require("./artifacts/ERC20.json");
View gist:40143f41de3c0933d60b0542feee796e
did:3:kjzl6cwe1jw145ewp4jl1m35gmlvkxwnc6ysguvuelw8c6j6n3uq2fr8ps3qhdf