Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rc 20240226 hotfix #26

Merged
merged 2 commits into from
Feb 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 18 additions & 16 deletions model/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,22 +105,24 @@ func (BalanceTxn) TableName() string {
}

type Transaction struct {
ID uint64 `gorm:"primaryKey" json:"id"`
ChainId int64 `json:"chain_id" gorm:"-:all"`
Protocol string `json:"protocol" gorm:"column:protocol"` // protocol name
Chain string `json:"chain" gorm:"column:chain"` // chain name
BlockHeight uint64 `json:"block_height" gorm:"column:block_height"` // block height
PositionInBlock uint64 `json:"position_in_block" gorm:"column:position_in_block"` // Position in Block
BlockTime time.Time `json:"block_time" gorm:"column:block_time"` // block time
TxHash []byte `json:"tx_hash" gorm:"column:tx_hash"` // tx hash
From string `json:"from" gorm:"column:from"` // from address
To string `json:"to" gorm:"column:to"` // to address
Op string `json:"op" gorm:"column:op"` // op code
Gas int64 `json:"gas" gorm:"column:gas"` // gas
GasPrice int64 `json:"gas_price" gorm:"column:gas_price"` // gas price
Status int8 `json:"status" gorm:"column:status"` // tx status
CreatedAt time.Time `json:"created_at" gorm:"column:created_at"`
UpdatedAt time.Time `json:"updated_at" gorm:"column:updated_at"`
ID uint64 `gorm:"primaryKey" json:"id"`
ChainId int64 `json:"chain_id" gorm:"-:all"`
Protocol string `json:"protocol" gorm:"column:protocol"` // protocol name
Chain string `json:"chain" gorm:"column:chain"` // chain name
BlockHeight uint64 `json:"block_height" gorm:"column:block_height"` // block height
PositionInBlock uint64 `json:"position_in_block" gorm:"column:position_in_block"` // Position in Block
BlockTime time.Time `json:"block_time" gorm:"column:block_time"` // block time
TxHash []byte `json:"tx_hash" gorm:"column:tx_hash"` // tx hash
From string `json:"from" gorm:"column:from"` // from address
To string `json:"to" gorm:"column:to"` // to address
Op string `json:"op" gorm:"column:op"` // op code
Tick string `json:"tick" gorm:"column:tick"` // inscription code
Amount decimal.Decimal `json:"amt" gorm:"column:amt;type:decimal(38,18)"` // balance
Gas int64 `json:"gas" gorm:"column:gas"` // gas
GasPrice int64 `json:"gas_price" gorm:"column:gas_price"` // gas price
Status int8 `json:"status" gorm:"column:status"` // tx status
CreatedAt time.Time `json:"created_at" gorm:"column:created_at"`
UpdatedAt time.Time `json:"updated_at" gorm:"column:updated_at"`
}

func (Transaction) TableName() string {
Expand Down
Loading