1

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.

Klode
  • 353
  • 3
  • 18
  • I've analyzed the contract in order to identify the issue. In this contract there is the problem: https://pastebin.com/UhWMbQ8w - With this contract, available here: ```TTmSSy3twJr5ttfcV6HUHMkse9edNzCZ9B```, using tronWeb i got the error above. – Klode Mar 27 '22 at 11:59
  • I really hate using this garbage api. – shunz19 Mar 21 '23 at 04:43

0 Answers0