Solidity Smart Contract on Tron - error on get contract with tronWeb

579 Views Asked by At

I've developed a Smart Contract on Tron ShastaNet. A previous similar contract was generated, and using it with tronWeb I don't have any issue.

With this new contract, I got this error on Browser Console:

TypeError: Cannot read properties of null (reading 'map')
    at Qe.format (pageHook.js:20:138878)
    at Qe.format (pageHook.js:20:138728)
    at pageHook.js:20:147799
    at Array.map (<anonymous>)
    at st.format (pageHook.js:20:147789)
    at pageHook.js:20:153235
    at Array.forEach (<anonymous>)
    at new kt (pageHook.js:20:152959)
    at pageHook.js:12:199401
    at new e (pageHook.js:12:199585)

The contract on ShastaNet is TQ1aYRBRyhjofitG9KmWUk2tavvhwqXfTE, and the error is generated by this command:

tronWeb.contract().at("TQ1aYRBRyhjofitG9KmWUk2tavvhwqXfTE")
.then ( contract => {
   ....
})
.catch( err => {
   console.log(err); // here I got the error!
});

The code is gone to catch after the request of contract, the "resolve" of Promise does not executed.

0

There are 0 best solutions below