how to transfer USDT on pulsechain using ethers.js library in typescript?

I have using ethers.js library for transfer token on two networks : BEP-20 and Pulse-chain , when I send USDT on BEP-20 it works fine, but for USDT on pulsechain I get error gas estimate (missing revert data)

here is the message response of tx.wait() :

missing revert data (action=”estimateGas”, data=null, reason=null, transaction=…

and my type script code is :


import { HttpException } from '@nestjs/common';
import { CommandHandler, ICommandHandler } from '@nestjs/cqrs';
import { InternalServerError, Invalid_Network, Invalid_Token } from 'src/common/translates/Error.Translate';
import { ethers } from 'ethers';
import { Request_Was_Successful1 } from 'src/common/translates/successful.Translate';
import { DepositCommand } from './deposit.command';
import { InjectRepository } from '@nestjs/typeorm';
import { TokenEntity } from 'src/domains/transaction/entities/token.entity';
import { Repository } from 'typeorm';

@CommandHandler(DepositCommand)
export class DepositCommandHandler implements ICommandHandler<DepositCommand> {
    constructor(
        @InjectRepository(TokenEntity)
        private readonly tokenRepository: Repository<TokenEntity>
    ) { }

    async execute(command: DepositCommand): Promise<any> {
        try {
            const { networkName, tokenName, amount, toAddress } = command.body;
            const token = await this.tokenRepository.findOne({
                where: [{
                    tokenName: tokenName,
                    networkName: networkName
                }]
            });
            if (!token) {
                throw new HttpException(Invalid_Token, Invalid_Token.status_code);
            }
            let wallet: any;
            const mainWalletPrivateKey = process.env.MAIN_WALLET_PRIVATE_KEY;
            if (networkName.toLowerCase() == 'bep-20') {
                const bscProvider = await this.getResponsiveNode();
                wallet = new ethers.Wallet(mainWalletPrivateKey, bscProvider);
            } else if (networkName.toLowerCase() == 'pulse-chain') {
                const pulseChainProvider = new ethers.JsonRpcProvider('https://rpc.pulsechain.com');
                // const pulseChainProvider = new ethers.JsonRpcProvider('https://rpc-pulsechain.g4mm4.io');
                // const pulseChainProvider = new ethers.JsonRpcProvider('https://pulsechain-rpc.publicnode.com');
                wallet = new ethers.Wallet(mainWalletPrivateKey, pulseChainProvider);
            } else {
                throw new HttpException(Invalid_Network, Invalid_Network.status_code);
            }
            const contract = new ethers.Contract(token.contractAddress, JSON.parse(token.contractABI), wallet);
            const decimals = await contract.decimals();
            const amountInSmallestUnit = ethers.parseUnits(amount.toString(), decimals);

            for (let attempt = 1; attempt <= 5; attempt++) {
                const tx = await contract.transfer(toAddress, amountInSmallestUnit);
                const receipt = await tx.wait();
                console.log('receipt', receipt);
                if (receipt.status === 1) {
                    const Request_Was_Successful = Request_Was_Successful1({
                        tx_receipt_hash: receipt.hash
                    });
                    throw new HttpException(
                        {
                            ...Request_Was_Successful,
                        },
                        Request_Was_Successful.status_code,
                    );
                }
            }
        } catch (error) {
            console.log('error', error);

            if (error.status === undefined) {
                const formatError = InternalServerError(error.message);
                throw new HttpException(formatError, formatError.status_code);
            } else throw error;
        }
    }

    async getResponsiveNode() {
        const rpcNodes = [
            'https://bsc-dataseed1.binance.org/',
            'https://bsc-dataseed2.binance.org/',
            'https://bsc-dataseed3.binance.org/',
            'https://bsc-dataseed4.binance.org/'
        ];
        for (let node of rpcNodes) {
            try {
                const provider = new ethers.JsonRpcProvider(node);
                await provider.getBlockNumber();
                console.log(`Responsive node found: ${node}`);
                return provider;
            } catch (error) {
                console.log(`Node ${node} is not responsive.`);
            }
        }
        throw new Error('No responsive nodes found');
    }
}

I added the {gasLimit: 20000} to the transfer method and then it subract pls from my wallet and does not transfer the usdt :

                const tx = await contract.transfer(toAddress, amountInSmallestUnit, {gasLimit: 20000});
                const receipt = await tx.wait();

and return transaction reverted

thanks in advance

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật