Closed Eyad994 closed 1 year ago
I have used this code but cannot transfer tokens from one account to another. Can you help me?
$providerRPC = new GethRPC($eth,$provider); $eth = new \FurqanSiddiqui\Ethereum\Ethereum(); $erc20 = new \FurqanSiddiqui\Ethereum\ERC20\ERC20($eth); $eth->contracts(); $erc20->useRPCClient($providerRPC); $token = $erc20->token($contractAddress); $payer = $fromAccount; $payee = $toAccount; $amount = '3'; $data = $token->encodedTransferData($eth->getAccount($payee), $amount); $tx = new \FurqanSiddiqui\Ethereum\Transactions\TxBuilder($eth); $transaction = $tx->gas(new \FurqanSiddiqui\Ethereum\Math\WEIValue('1'), 70000) ->to($eth->getAccount($payer)) ->value(new \FurqanSiddiqui\Ethereum\Math\WEIValue('0')) ->data($data); dd($transaction);
This link doesn't work https://www.furqansiddiqui.com/transfer-erc20-token-from-one-account-to-another-using-php/
https://www.furqansiddiqui.com/transfer-erc20-token-from-one-account-to-another-using-php/
I have used this code but cannot transfer tokens from one account to another. Can you help me?
This link doesn't work
https://www.furqansiddiqui.com/transfer-erc20-token-from-one-account-to-another-using-php/