entity

package
v0.0.5-rc-2 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2022 License: Apache-2.0 Imports: 5 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 NanoTime added in v1.4.0

type NanoTime struct {
	time.Time
}

func (*NanoTime) Scan added in v1.4.0

func (n *NanoTime) Scan(value interface{}) error

func (NanoTime) Value added in v1.4.0

func (n NanoTime) Value() (driver.Value, error)

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 uint64
	TargetChainID uint64
	NativeChainID uint64
	SourceAsset   string
	TargetAsset   string
	NativeAsset   string
	Receiver      string
	Amount        string
	Fee           string
	Status        string
	SerialNumber  int64
	Metadata      string
	IsNft         bool     `gorm:"default:false"`
	Timestamp     NanoTime `sql:"type:bigint" gorm:"index:,sort:desc"`
	Originator    string
	Messages      []Message  `gorm:"foreignKey:TransferID"`
	Fees          []Fee      `gorm:"foreignKey:TransferID"`
	Schedules     []Schedule `gorm:"foreignKey:TransferID"`
}

func (*Transfer) ToDto added in v1.4.0

func (t *Transfer) ToDto() *transferModel.Transfer

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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