Hi,
I am trying to transfer ERC-1555 token from one wallet to another wallet using the following code,
$eth->getTransactionCount($from,function($err,$data) use (&$from_addr_nonce){
$from_addr_nonce = gmp_intval($data->value);
});
$from_addr_nonce = Utils::toHex($from_addr_nonce,true);
$web3 = new Web3($binance_url);
$eth = $web3->eth;
$eth->gasPrice(function ($err, $resp) use (&$gasP) {
if ($err !== null) {
throw new \Exception($err->getMessage());
}
$gasP = $resp;
});
$params = [
'nonce' => $from_addr_nonce,
'from' => $from,
'to' => $contractAddress,
'data' => $data
];
$data = "0x".$contract->getData('transfer',$user_wallet->address,$nftMint->token_id);
$transaction = new EthTransaction([
'nonce' => $from_addr_nonce,
'from' => $from,
'to' => $contractAddress,
'gas' => $gasP,
'gasPrice' => sprintf('0x%s', $gasP->toHex()),
'gasLimit' => sprintf('0x%s', '895D0'),
'value' =>"1",
// 'value' =>$amount,
'chainId' => $chain_id,
'data' => $data
]);
$signedTx = $transaction->sign($privKey);
$txId = '';
// Sending transaction to the blockchain
$contract->eth->sendRawTransaction(sprintf('0x%s', $signedTx), function ($err, $tx) use (&$txId) {
if ($err !== null) {
throw new \Exception($err->getMessage());
}
$txId = $tx;
});
return response()->json($txId);
But i got error and i not seen any function for transferring this.
Hi, I am trying to transfer ERC-1555 token from one wallet to another wallet using the following code, $eth->getTransactionCount($from,function($err,$data) use (&$from_addr_nonce){ $from_addr_nonce = gmp_intval($data->value); });