I want to send a transaction in BSC network. I already set this params for sending
Array
(
[nonce] => 0
[address] => 0xb7a2565fa170b8b5b2bf5035665f169066a5c7fb
[toaddress] => 0xF355320a7d4F2aF95a43C64CD2e76bBE266286Aa
[gaslimit] => 21000
[gasprice] => 5
[value_wei] => 0.01
[web3ChainId] => 97
)
which is calles from this code
$transactionparams = array(
"nonce" => $gettransactioncount,
'address' => $address,
'toaddress' => $toaddress,
'gaslimit' => 21000,
'gasprice' => 5,
'value_wei' => 0.01,
'web3ChainId' => 0x61
);
Then I try to send it to BSC network and set these params
function bcdechex($dec){
$hex = '';
do {
$last = bcmod($dec, 16);
$hex = dechex($last) . $hex;
$dec = bcdiv(bcsub($dec, $last), 16);
} while ($dec > 0);
return $hex;
}
$transactionParams = [
'nonce' => "0x" . dechex($nonce),
'from' => strtolower($address),
'to' => strtolower($toaddress),
'gasLimit' => '0x' . dechex($gaslimit),
'gasPrice' => '0x' . hexdec(dechex($gasprice)),
'value' => '0x' . bcdechex($value_wei),
'chainId' => strval($web3ChainId)
];
but always return insufficient funds for gas * price + value I already try to reduce the amount of sending also try to increase the gas price and limit but no luck. Anyone know this?