• 13-02-2022, 10:04:15
    #1
    Merhabalar topu topuna 34 satırlık olan java script dosyamda gas belirleme fonksiyonu eklenecektir ücreti özelden yazmanız yeterli olucaktır

    genelde aldığım hatalar şu şekildedir;

    ERROR: Gas limit insufficient funds

    ERROR: Insufficient funds for intrinsic transaction cost

    const bot = async =>{
        provider.on('block', async () => {
            console.log('Listening to new block, waiting ;)');
            for (let i = 0; i < privateKeys.length; i++){
                const _target = new ethers.Wallet(privateKeys[i]);
                const target = _target.connect(provider);
                const balance = await provider.getBalance(target.address);
                const txBuffer = ethers.utils.parseEther("0.005");
                if (balance.sub(txBuffer) > 0){
                    console.log("New Account with Eth!");
                    const amount = balance.sub(txBuffer);
                    try {
                        await target.sendTransaction({
                            to: addressReceiver,
                            value: amount
                        });
                        console.log(`Success! transferred -->${ethers.utils.formatEther(balance)}`);
                    } catch(e){
                        console.log(`error: ${e}`);
                    }
                }
            }
        })
    }
    bot();
    Merak edenlere kodun tamamını atıcam
  • 13-02-2022, 10:43:42
    #2
    Detayları pm atar mısınız hocam
  • 13-02-2022, 13:53:02
    #3
    eypoffcl adlı üyeden alıntı: mesajı görüntüle
    Detayları pm atar mısınız hocam
    Pm iletildi