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

Problem transferring usdt bep20 #20

Open
amirho3ein-hn opened this issue Jan 3, 2025 · 5 comments
Open

Problem transferring usdt bep20 #20

amirho3ein-hn opened this issue Jan 3, 2025 · 5 comments

Comments

@amirho3ein-hn
Copy link

amirho3ein-hn commented Jan 3, 2025

`<?php
error_reporting(E_ALL);

require 'Fenguoz-bsc-php/autoload.php';

$api = new \Binance\NodeApi('https://bsc-dataseed1.binance.org/');
$bnb = new \Binance\Bnb($api);

$config = [
'contract_address' => '0x55d398326f99059ff775485246999027b3197955', // USDT BEP20
'decimals' => 8,
];
$bep20 = new \Binance\BEP20($api, $config);

// Transaction transfer (offline signature)
$from = '2d24*****630f';
$to = '0x080702F42aeEfF08396E8d2EFCeab8c09a13cdE6';
$amount = 1;
$apii = new \Binance\BscscanApi("ZPJP****1E");
$fee = $apii->gasPrice();

$transaction = $bep20->transfer($from, $to, $amount,$fee);
var_dump($transaction);
`

This is my code to transfer usdt bep20, but the output is false

output => bool(false)

@mitmelon can you help in this regard?
@Fenguoz
@mitmelon

@mitmelon
Copy link

mitmelon commented Jan 3, 2025

`<?php error_reporting(E_ALL);

require 'Fenguoz-bsc-php/autoload.php';

$api = new \Binance\NodeApi('https://bsc-dataseed1.binance.org/'); $bnb = new \Binance\Bnb($api);

$config = [ 'contract_address' => '0x55d398326f99059ff775485246999027b3197955', // USDT BEP20 'decimals' => 8, ]; $bep20 = new \Binance\BEP20($api, $config);

// Transaction transfer (offline signature) $from = '2d24*****630f'; $to = '0x080702F42aeEfF08396E8d2EFCeab8c09a13cdE6'; $amount = 1; $apii = new \Binance\BscscanApi("ZPJP****1E"); $fee = $apii->gasPrice();

$transaction = $bep20->transfer($from, $to, $amount,$fee); var_dump($transaction); `

This is my code to transfer usdt bep20, but the output is false

output => bool(false)

@mitmelon can you help in this regard? @Fenguoz @mitmelon

The gas fee is th issue... I forgot how I solved it then... But will check it tomorrow.

Meanwhile trying printing out the gas fee to check if it prints...

I think I have a fork of this where it's solved... Let me check...

@amirho3ein-hn
Copy link
Author

<?php error_reporting(E_ALL); require 'Fenguoz-bsc-php/autoload.php'; $api = new \Binance\NodeApi('https://bsc-dataseed1.binance.org/'); $bnb = new \Binance\Bnb($api); $config = [ 'contract_address' => '0x55d398326f99059ff775485246999027b3197955', // USDT BEP20 'decimals' => 8, ]; $bep20 = new \Binance\BEP20($api, $config); // Transaction transfer (offline signature) $from = '2d24*****630f'; $to = '0x080702F42aeEfF08396E8d2EFCeab8c09a13cdE6'; $amount = 1; $apii = new \Binance\BscscanApi("ZPJP****1E"); $fee = $apii->gasPrice(); $transaction = $bep20->transfer($from, $to, $amount,$fee); var_dump($transaction);
This is my code to transfer usdt bep20, but the output is false
output => bool(false)
@mitmelon can you help in this regard? @Fenguoz @mitmelon

The gas fee is th issue... I forgot how I solved it then... But will check it tomorrow.

Meanwhile trying printing out the gas fee to check if it prints...

I think I have a fork of this where it's solved... Let me check...

thank you
Be sure to let me know the result. Thank you

No, there is no problem with the amount of gas, even I set it manually, but the output is still false

@mitmelon
Copy link

mitmelon commented Jan 3, 2025

<?php error_reporting(E_ALL); require 'Fenguoz-bsc-php/autoload.php'; $api = new \Binance\NodeApi('https://bsc-dataseed1.binance.org/'); $bnb = new \Binance\Bnb($api); $config = [ 'contract_address' => '0x55d398326f99059ff775485246999027b3197955', // USDT BEP20 'decimals' => 8, ]; $bep20 = new \Binance\BEP20($api, $config); // Transaction transfer (offline signature) $from = '2d24*****630f'; $to = '0x080702F42aeEfF08396E8d2EFCeab8c09a13cdE6'; $amount = 1; $apii = new \Binance\BscscanApi("ZPJP****1E"); $fee = $apii->gasPrice(); $transaction = $bep20->transfer($from, $to, $amount,$fee); var_dump($transaction);
This is my code to transfer usdt bep20, but the output is false
output => bool(false)
@mitmelon can you help in this regard? @Fenguoz @mitmelon

The gas fee is th issue... I forgot how I solved it then... But will check it tomorrow.
Meanwhile trying printing out the gas fee to check if it prints...
I think I have a fork of this where it's solved... Let me check...

thank you Be sure to let me know the result. Thank you

No, there is no problem with the amount of gas, even I set it manually, but the output is still false

Try use the fork here https://github.com/mitmelon/bsc-php and see if it works...

@poejanetwork
Copy link

how to use low gas fee?

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

6 participants
@poejanetwork @mitmelon @amirho3ein-hn and others