Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUSD Token: contract.name is not a function #356

Closed
mahnunchik opened this issue Apr 10, 2023 · 3 comments
Closed

BUSD Token: contract.name is not a function #356

mahnunchik opened this issue Apr 10, 2023 · 3 comments

Comments

@mahnunchik
Copy link

I've faced with the issue that tronweb library doesn't detect name(), symbol(), and decimals() methods for BUSD Token TMz2SWatiAtZVVcH2ebpsbVtYwUPT9EdjH

import TronWeb from 'tronweb';

const tronWeb = new TronWeb({
  fullHost: 'https://api.trongrid.io/',
});
tronWeb.setAddress('TBQDyqoJ2ZJHTRDsrGQasyqBm4nUVLbWee');

try {
  let contract = await tronWeb.contract().at('TMz2SWatiAtZVVcH2ebpsbVtYwUPT9EdjH');
  let result = await contract.name().call();
  console.log('result: ', result);
} catch(error) {
  console.error("trigger smart contract error", error)
}
// trigger smart contract error TypeError: contract.name is not a function

Code sample from the documentation: https://developers.tron.network/docs/trc20-contract-interaction#name

  • tronweb version: 5.1.0
  • node version: 18.14.2

For the Tether USD contract API works as expected.

@Redchar1992
Copy link

BUSD allows only Proxy contracts to be called, ABI for the implementation contract at:

TTtQQxmhZTnpKhdVVJpANpX12vRjc16TxZ

@mahnunchik
Copy link
Author

Is it possible to get implementation contract address by tronweb library?

@Redchar1992
Copy link

Sorry, the BUSD contract has not been released

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants