From 94cbe26599816a2e75d3a611066afce3e012543f Mon Sep 17 00:00:00 2001 From: mrq Date: Tue, 29 Oct 2024 16:07:23 +0100 Subject: [PATCH] drip for lending --- src/dripper.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/dripper.ts b/src/dripper.ts index f3c136d..34dcf0e 100644 --- a/src/dripper.ts +++ b/src/dripper.ts @@ -72,10 +72,16 @@ const drip = async (address: string): Promise => { console.log('dripping to', address, ' => ', hydraDxAddress); if (api && api.isConnected) { - const {currencies} = api.tx; + const {currencies, utility} = api.tx; // TODO: make configurable - const tx = currencies.transfer(hydraDxAddress, "20", new BN('1000000000000000000')); // ETH + const tx = utility.batchAll([ + currencies.transfer(hydraDxAddress, "20", new BN('2222000000000000000')), // ETH + currencies.transfer(hydraDxAddress, "5", new BN('22220000000000')), // DOT + currencies.transfer(hydraDxAddress, "10", new BN('2222000000')), // USDT + currencies.transfer(hydraDxAddress, "21", new BN('2222000000')), // USDC + currencies.transfer(hydraDxAddress, "3", new BN('22220000')), // WBTC + ]); await tx .signAndSend(fundingAccount, {nonce: nextNonce()})