Created
April 1, 2020 23:57
-
-
Save JesseAbram/314120820849a6f6917163a8ee01b3a4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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