Open yangyile1990 opened 1 year ago
tx, err := Client.TRC20Send(from, to, contractAddress, amount.BigInt(), FeeLimit)
tx, err := Client.TRC20Send(from, to, contractAddress, amount.BigInt(), FeeLimit)
this can't implement trc20TranferFrom
Have you solved your problem? should I use TriggerContract?
hi guys, did you guys have find solution to use transferFrom?
ref above , i can get as trc20TranferFrom tx. it worked.
addrA, err := address.Base58ToAddress(from)
if err != nil {
return nil, err
}
addrB, err := address.Base58ToAddress(to)
if err != nil {
return nil, err
}
contract := ueth.tokenAddressFromSymbol1(symbol, "TRON")
amount :=big.NewInt(10000000)
ab := common.LeftPadBytes(amount.Bytes(), 32)
// 0x23b872dd is the erc20-transferFrom MethodSignature
req := "0x23b872dd" +
"0000000000000000000000000000000000000000000000000000000000000000"[len(addrA.Hex())-4:] + addrA.Hex()[4:] +
"0000000000000000000000000000000000000000000000000000000000000000"[len(addrB.Hex())-4:] + addrB.Hex()[4:]
req += common.Bytes2Hex(ab)
//owner is who will sign the tx
return Client.TRC20Call(owner, contract, req, false, 100000000)
I use the sdk very happy. While when I used the TRC20Approve and finish my job. I cannot find the TRC20TransferFrom. and I don't know how to use it without your sdk. So. please implement the TRC20TransferFrom. Thank you.