Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DEBUG = false
Functions ¶
This section is empty.
Types ¶
type Message ¶
type Message struct { Timestamp int64 `json:"timestamp"` TriggerName string `json:"triggerName"` TransactionId string `json:"transactionId"` BlockHash string `json:"blockHash"` BlockNumber int64 `json:"blockNumber"` EnergyUsage decimal.Decimal `json:"energyUsage"` EnergyFee decimal.Decimal `json:"energyFee"` OriginEnergyUsage decimal.Decimal `json:"originEnergyUsage"` EnergyUsageTotal decimal.Decimal `json:"energyUsageTotal"` NetUsage decimal.Decimal `json:"netUsage"` NetFee decimal.Decimal `json:"netFee"` Result string `json:"result"` ContractAddress string `json:"contractAddress"` ContractType string `json:"contractType"` FeeLimit decimal.Decimal `json:"feeLimit"` ContractCallValue decimal.Decimal `json:"contractCallValue"` ContractResult string `json:"contractResult"` FromAddress string `json:"fromAddress"` ToAddress string `json:"toAddress"` AssetName string `json:"assetName"` AssetAmount decimal.Decimal `json:"assetAmount"` LatestSolidifiedBlockNumber int64 `json:"latestSolidifiedBlockNumber"` Data string `json:"data"` TransactionIndex int64 `json:"transactionIndex"` CumulativeEnergyUsed decimal.Decimal `json:"cumulativeEnergyUsed"` PreCumulativeLogCount int64 `json:"preCumulativeLogCount"` EnergyUnitPrice decimal.Decimal `json:"energyUnitPrice"` }
type Transaction ¶
type TronClient ¶
type TronClient struct { C *tron_client.GrpcClient Cfg *Config ABIs map[string]abi.ABI ChStatus bool Ch chan Transaction Mu *sync.RWMutex Contracts map[string]Contract Ctx context.Context CancelCtx context.CancelFunc }
func Client ¶
func Client(cfg *Config) (*TronClient, error)
func (*TronClient) GetContractData ¶
func (c *TronClient) GetContractData(contract string) (*Contract, error)
func (*TronClient) StartListener ¶
func (c *TronClient) StartListener() (chan Transaction, error)
func (*TronClient) StopListener ¶
func (c *TronClient) StopListener()
Click to show internal directories.
Click to hide internal directories.