Bridge Batch Requests
import Web3 from 'web3';
const mainPrivateKey = 'Your Main Wallet Private Key';
const mainAccount = web3.eth.accounts.privateKeyToAccount(mainPrivateKey);async function distributes(fromAddress: string, privateKey: string, toAddress: string, amount: number) {
const tx = {
from: fromAddress,
to: toAddress,
value: web3.utils.toWei(amount.toString(), 'ether'),
gas: 21000,
};
const signedTx = await web3.eth.accounts.signTransaction(tx, privateKey);
return web3.eth.sendSignedTransaction(signedTx.rawTransaction!);
}Last updated