client

package
v0.0.0-...-de16a70 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 11, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLimit

func GetLimit(gasPrice *big.Int, energy uint64) int64

Types

type TronClient

type TronClient struct {
	*client.GrpcClient
}

func NewTronGrpcClient

func NewTronGrpcClient(grpcUrl string) (*TronClient, error)

func (*TronClient) Allowance

func (c *TronClient) Allowance(contractAddress, owner, spender string) (*big.Int, error)

func (*TronClient) BlockNumber

func (c *TronClient) BlockNumber(_ context.Context) (uint64, error)

func (*TronClient) BroadcastTx

func (c *TronClient) BroadcastTx(tx *api.TransactionExtention) (*api.Return, error)

func (*TronClient) EstimateGas

func (c *TronClient) EstimateGas(from, to, data []byte) (uint64, error)

func (*TronClient) GetBridgeTokenList

func (c *TronClient) GetBridgeTokenList(contractAddress string) ([]contract.FxBridgeToken, error)

func (*TronClient) GetTokenStatus

func (c *TronClient) GetTokenStatus(contractAddress, tokenAddress string) (bool, bool, bool, error)

func (*TronClient) LastBatchNonce

func (c *TronClient) LastBatchNonce(contractAddress string, erc20Address string) (uint64, error)

func (*TronClient) QueryBlockEvent

func (c *TronClient) QueryBlockEvent(contractAddress string, blockNumber uint64) (
	[]contract.IEvent, error,
)

func (*TronClient) QueryOracleSetUpdatedEvent

func (c *TronClient) QueryOracleSetUpdatedEvent(contractAddress string, blockNumber uint64) ([]*contract.FxBridgeTronOracleSetUpdatedEvent, error)

func (*TronClient) StateFxBridgeId

func (c *TronClient) StateFxBridgeId(contractAddress string) (string, error)

func (*TronClient) StateLastOracleSetHeight

func (c *TronClient) StateLastOracleSetHeight(contractAddress string) (uint64, error)

func (*TronClient) StateLastOracleSetNonce

func (c *TronClient) StateLastOracleSetNonce(contractAddress string) (uint64, error)

func (*TronClient) SuggestGasPrice

func (c *TronClient) SuggestGasPrice(ctx context.Context) (*big.Int, error)

func (*TronClient) TriggerContract

func (c *TronClient) TriggerContract(ct *contract.TriggerSmartContract, feeLimit int64) (*api.TransactionExtention, error)

func (*TronClient) WithMint

func (c *TronClient) WithMint(txId []byte, timeOut time.Duration) (info *core.TransactionInfo, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL