-
Notifications
You must be signed in to change notification settings - Fork 73
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
getTRC20报错 #14
Comments
看上去抱错应该不是这块代码报出来 |
你可以试着参照测试用例调用 |
[2021-08-19 00:39:04] local.ERROR: During class fetch: Uncaught ErrorException: Required parameter $from follows optional parameter $private_key in /www/wwwroot/test/vendor/iexbase/tron-api/src/Concerns/ManagesUniversal.php:62 具体写法: new \Tron\TRX 和 new \Tron\TRC20 报错是同样的; 扩展包也卸载过,重新安装过,同样的报错;使用的是laravel框架 |
不好意思,是PHP环境的问题,我按照扩展包和运行PHP不是同一个环境;现在正常了 |
//const URI = 'https://api.shasta.trongrid.io'; // shasta testnet
const URI = 'https://api.trongrid.io';//测试地址?
const ADDRESS = 'TGytofNKuSReFmFxsgnNx19em3BAVBTpVB';
const PRIVATE_KEY = '0xf1b4b7d86a3eff98f1bace9cb2665d0cad3a3f949bc74a7ffb2aaa968c07f521';
const BLOCK_ID = 13402554;
const TX_HASH = '539e6c2429f19a8626fadc1211985728e310f5bd5d2749c88db2e3f22a8fdf69';
const CONTRACT = [
'contract_address' => 'TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t', // USDT TRC20
'decimals' => 6,
];
报错如下
During class fetch: Uncaught ErrorException: Required parameter $from follows optional parameter $private_key
The text was updated successfully, but these errors were encountered: