Skip to content

Instantly share code, notes, and snippets.

@JesseAbram
Created April 1, 2020 23:57
Show Gist options
  • Save JesseAbram/314120820849a6f6917163a8ee01b3a4 to your computer and use it in GitHub Desktop.
Save JesseAbram/314120820849a6f6917163a8ee01b3a4 to your computer and use it in GitHub Desktop.
const ethers = require('ethers');
const {TEAMS_API, BOT_PRIVATE_KEY} = require("./credentials")
const provider = new ethers.providers.JsonRpcProvider(TEAMS_API);
const wallet = new ethers.Wallet(BOT_PRIVATE_KEY, provider);
const transaction = async () => {
let value = ethers.utils.parseEther('0.000000001');
const tx = {
to: wallet.address,
value
}
const receipt = await wallet.sendTransaction(tx)
console.log(receipt.hash)
}
const main = () => {
setInterval(transaction, 10000)
}
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment