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

NULL Response BSC #6

Open
idevlinkcom opened this issue Mar 20, 2023 · 1 comment
Open

NULL Response BSC #6

idevlinkcom opened this issue Mar 20, 2023 · 1 comment

Comments

@idevlinkcom
Copy link

idevlinkcom commented Mar 20, 2023

I face error with no response while transfer BSC to other address

My request

$uri = 'https://data-seed-prebsc-1-s1.binance.org:8545/';// Testnet
$api = new \Binance\NodeApi($uri);
$address = '0x5454c66eaa964d13b7d858d79e85c877ccbf33ab';
$bnb = new \Binance\Bnb($api);
$bnbBalance = $bnb->bnbBalance($address);

$from = '3e2f3d8c699332a08c1c1158b7ff34548aca162580f91070cba930dfc9a7406b'; // private
$to = '0x43671E7c181e4908DEeBd84bd2d71ceAD4e2E84c';
$amount = 0.01;
$bnbtransfer = $bnb->transfer($from, $to, $amount);

Just log the function like this

$raw = $transaction->sign($privateKey);
logDebug("raw");
logDebug($raw);
$res = $this->proxyApi->sendRawTransaction('0x' . $raw);
logDebug($res);
return $res;

the response is NULL or EMPTY

response: raw
-------------------------
response: f86c8085012a05f2008276c09443671E7c181e4908DEeBd84bd2d71ceAD4e2E84c872386f26fc10000808193a002c05cfc47a5e64801b88f202131f216559ec189c2ce3eb9afcd42d61956c016a02eaa65e8f346efedb917b5b3ef32d71551cd9353883071447a31fcd2e03cbddc
-------------------------
response: 

any fix?

@idevlinkcom idevlinkcom changed the title BNB or BSC NULL Response BSC Mar 21, 2023
@SuprimeKebab
Copy link

If you want to see the response that received from API, try to print it on send() function. In your case it is in NodeApi.php file right after the line:

$res = Utils::httpRequest('POST', $url, $data);

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