entity

package
v0.0.1-alpha-16 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fee added in v1.4.0

type Fee struct {
	TransactionID string `gorm:"primaryKey"`
	ScheduleID    string // ScheduleID of the transaction. Can be empty if execution failed
	Amount        string
	Status        string
	TransferID    sql.NullString
}

Fee is a db model used only to mark native Hedera transfer fees to validators

type Message

type Message struct {
	TransferID           string
	Transfer             Transfer `gorm:"foreignKey:TransferID;references:TransactionID;"`
	Hash                 string
	Signature            string `gorm:"unique"`
	Signer               string
	TransactionTimestamp int64
}

Message is a db model used to track the messages signed by validators for a given transfer

type Schedule added in v1.4.0

type Schedule struct {
	TransactionID string `gorm:"primaryKey"` // TransactionID  of the original scheduled transaction
	ScheduleID    string // ScheduleID of the transaction. Can be empty if execution failed
	HasReceiver   bool   // True if the scheduled transaction includes the receiver of the TransferID in itself
	Operation     string // type of scheduled transaction (TokenMint, TokenBurn, CryptoTransfer)
	Status        string
	TransferID    sql.NullString // foreign key to the transfer ID
}

Schedule is a db model used to track scheduled transactions for a given transfer

type Status

type Status struct {
	EntityID string
	Last     int64 // Either timestamp or block number
}

Status is a table containing information for latest blocks/timestamps for the watched Hedera accounts, topic and evm contracts

type Transfer

type Transfer struct {
	TransactionID string `gorm:"primaryKey"`
	SourceChainID int64
	TargetChainID int64
	NativeChainID int64
	SourceAsset   string
	TargetAsset   string
	NativeAsset   string
	Receiver      string
	Amount        string
	Fee           string
	Status        string
	Messages      []Message  `gorm:"foreignKey:TransferID"`
	Fees          []Fee      `gorm:"foreignKey:TransferID"`
	Schedules     []Schedule `gorm:"foreignKey:TransferID"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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