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

Invalid contract address provided #559

Open
daochild opened this issue Sep 16, 2024 · 1 comment
Open

Invalid contract address provided #559

daochild opened this issue Sep 16, 2024 · 1 comment

Comments

@daochild
Copy link

I got errors on executing methods triggerConstantContract, estimateEnergy

Error: the string "Invalid contract address provided" was thrown, throw an Error :)

Version: [email protected]

Params:
contract address
0x743a1b8fe35eb3412b1Ca3D311D9a06101651256 

selector
0xac9650d8 

options
{ feeLimit: 1000000000, callValue: 0, shouldPollResponse: false } 

params
['0x252dba42000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000743a1b8fe35eb3412b1ca3d311d9a061016512560000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000442cbb15c00000000000000000000000000000000000000000000000000000000', '0x252dba4200000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000'] 

sender
0x32dCf961bD024E44fDAa5A957B17486590088Bd2

Code example here: https://github.com/daochild/tron-multicall/blob/main/test/multicall.js#L56-L84

@Satan-web3
Copy link
Contributor

Tron address is different from Ethereum address. You need to use Tron address when using Contact class. For example, a Tron address should be:

`41${multicall.address.substring(2)}`

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