We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I wath get the price from pancakeswap router contract: https://bscscan.com/address/0x10ED43C718714eb63d5aA57B78B54704E256024E
https://bscscan.com/address/0x10ED43C718714eb63d5aA57B78B54704E256024E
abi:
{"internalType":"address[]","name":"path","type":"address[]"}],"name":"getAmountsOut","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"view","type":"function"}
code:
$eth = new Ethereum($url); $w = new SmartContract($abi, self::PANCAKE_SWAP_ROUTER_CONTRACT_ADDRESS, $eth); $price = $w->getAmountsOut( new EthQ(1, ['abi' => 'uint256']) new EthD($path, ['abi' => 'address[]']) )->val();
I dont know how to new the address[] ABI type object then got the err:
address[]
substr() expects parameter 1 to be string, array given
How can I fix it?
The text was updated successfully, but these errors were encountered:
Did you ever get this solved?
Sorry, something went wrong.
No branches or pull requests
I wath get the price from pancakeswap router contract:
https://bscscan.com/address/0x10ED43C718714eb63d5aA57B78B54704E256024E
abi:
code:
I dont know how to new the
address[]
ABI type objectthen got the err:
How can I fix it?
The text was updated successfully, but these errors were encountered: