| 123456789101112131415161718192021222324 |
- package service
- import (
- "github.com/fbsobreira/gotron-sdk/pkg/client"
- "github.com/fbsobreira/gotron-sdk/pkg/proto/api"
- "math/big"
- )
- const (
- tronUsdt = "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t"
- tronUsdc = "TEkxiTehnzSmSe2XqrBj4w32RUN966rdz8"
- )
- func buildTransferTrx(tronClient *client.GrpcClient, from, to string, amount int64) (*api.TransactionExtention, error) {
- return tronClient.Transfer(from, to, amount)
- }
- func buildTransferUsdtOfTron(tronClient *client.GrpcClient, from, to string, amount *big.Int) (*api.TransactionExtention, error) {
- return tronClient.TRC20Send(from, to, tronUsdt, amount, 100000000)
- }
- func buildTransferUsdcOfTron(tronClient *client.GrpcClient, from, to string, amount *big.Int) (*api.TransactionExtention, error) {
- return tronClient.TRC20Send(from, to, tronUsdc, amount, 100000000)
- }
|