schema

package
v0.0.0-...-d62eb6d Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VotingStatus  = 0
	PendingStatus = 1
	SucceedStatus = 2
	TimeoutStatus = 3
)
View Source
const (
	BlockPending  = "pending"
	BlockValid    = "valid"
	BlockRollback = "rollback"
	BlockInvalid  = "invalid"
)
View Source
const (
	EventPending  = "pending"
	EventValid    = "valid"
	EventRollback = "rollback"
	EventInvalid  = "invalid"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Base

type Base struct {
	ID        int64     `json:"id"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

type Blockchain

type Blockchain struct {
	EventID     int64  `json:"event_id"`
	BlockTime   int64  `json:"block_time"`
	BlockNumber int64  `json:"block_number"`
	LogIndex    int64  `json:"log_index"`
	TxHash      string `json:"tx_hash"`
}

type Proposal

type Proposal struct {
	Base
	ProposalID      uint64 `json:"proposal_id"`
	Proposer        string `json:"proposer"`
	StateRootHash   string `json:"state_root_hash"`
	ProofRootHash   string `json:"proof_root_hash"`
	StartBatchNum   uint64 `json:"start_batch_num"`
	EndBatchNum     uint64 `json:"end_batch_num"`
	BtcCommitTxHash string `json:"btc_commit_tx_hash"`
	BtcRevealTxHash string `json:"btc_reveal_tx_hash"`
	BlockHeight     uint64 `json:"block_height"`
	Winner          string `json:"winner"`
	Status          uint64 `json:"status"`
}

func (Proposal) TableName

func (Proposal) TableName() string

type SyncBlock

type SyncBlock struct {
	Base
	Blockchain  string `json:"blockchain"`
	Miner       string `json:"miner"`
	BlockTime   int64  `json:"block_time"`
	BlockNumber int64  `json:"block_number"`
	BlockHash   string `json:"block_hash"`
	TxCount     int64  `json:"tx_count"`
	EventCount  int64  `json:"event_count"`
	ParentHash  string `json:"parent_hash"`
	Status      string `json:"status"`
	CheckCount  int64  `json:"check_count"`
}

func (SyncBlock) TableName

func (SyncBlock) TableName() string

type SyncBlockHistory

type SyncBlockHistory SyncBlock

func (SyncBlockHistory) TableName

func (SyncBlockHistory) TableName() string

type SyncEvent

type SyncEvent struct {
	Base
	SyncBlockID     int64  `json:"sync_block_id"`
	Blockchain      string `json:"blockchain"`
	BlockTime       int64  `json:"block_time"`
	BlockNumber     int64  `json:"block_number"`
	BlockHash       string `json:"block_hash"`
	BlockLogIndexed int64  `json:"block_log_indexed"`
	TxIndex         int64  `json:"tx_index"`
	TxHash          string `json:"tx_hash"`
	EventName       string `json:"event_name"`
	EventHash       string `json:"event_hash"`
	ContractAddress string `json:"contract_address"`
	Data            string `json:"data"`
	Status          string `json:"status"`
	RetryCount      int64  `json:"retry_count"`
}

func (SyncEvent) TableName

func (SyncEvent) TableName() string

type SyncEventHistory

type SyncEventHistory SyncEvent

func (SyncEventHistory) TableName

func (SyncEventHistory) TableName() string

Jump to

Keyboard shortcuts

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