tronprotocol / tronweb

Javascript API Library for interacting with the TRON Network
MIT License
413 stars 271 forks source link

contract.send() option `pollTimes` not working in TronLink #440

Closed alienzhangyw closed 10 months ago

alienzhangyw commented 10 months ago

I'm using TronLink plugin injected tronweb to send smart contract methods:

this.#tronWeb = window.tron?.tronWeb;

// other code

const contract = await this.#tronWeb.contract(abi, address);
const txID = await contract[method](...args).send({
          shouldPollResponse: true,
          keepTxID: true,
          feeLimit: 2_000_000_000,
          pollTimes: 50,
        });
const info = await this.#tronWeb.trx.getTransaction(txID[0]);

But TronLink only pulls the transaction info for 20 times: image

So I may get the Cannot find result in solidity node error if the tx takes minutes to be confirmed and I cannot continue the next moves, meanwhile this tx is confirmed later in tron network and I cannot send a same tx again.

alienzhangyw commented 10 months ago

I find the reason. The version of TronLink injected tronweb is 5.1.1 while this feature is added in 5.3.0. image Could you please ask the TronLink team to update tronweb version? I suggest that TronLink need to open a github repo for developers to report issues. The official support telegram group is too inefficient and full of frauds.

svein1010 commented 10 months ago

This repository focus on the issue of TronWeb. Please contact TronLink team for the feature. The telegrame group link and email of TronLink team can be found in the footer of TronLink Homepage .