Last active
June 20, 2023 17:47
-
-
Save M4cs/42e7a19b55a188f54e81baedf94d10d3 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 privatekey = '0X_PRIVATE_KEY'; | |
const provider = new ethers.JsonRpcProvider('ALCHEMY_OR_INFURA_KEY'); | |
const wallet = new ethers.Wallet(privatekey, provider); | |
const addresses = []; | |
async function batchETHScribe() { | |
let count = 0; | |
for (const address in addresses) { | |
const data = `data:,${count}-test`; | |
const hex = ethers.hexlify(ethers.toUtf8Bytes(data)); | |
let tx = { | |
to: address, | |
value: 0, | |
data: hex | |
}; | |
const txn = await wallet.sendTransaction(tx); | |
const rec = await txn.wait(); | |
console.log(rec); | |
count++; | |
} | |
} | |
(async () => { | |
await batchETHScribe() | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment