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
please add the func (g *GrpcClient) TRC20TransferFrom #102
Comments
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, |
gotron-sdk/pkg/client/trc20.go Lines 170 to 179 in 1e82440
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.
The text was updated successfully, but these errors were encountered: