Documentation ¶
Index ¶
Constants ¶
View Source
const ( TableName = "l1_rollup_tx" StatusPending = 1 StatusHandled = 2 TxTypeCommit = 1 TxTypeVerifyAndExecute = 2 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type L1RollupTx ¶
type L1RollupTx struct { gorm.Model // txVerification hash L1TxHash string // txVerification status, 1 - pending, 2 - handled TxStatus int // txVerification type: commit / verify TxType uint8 // layer-2 block height L2BlockHeight int64 }
func (*L1RollupTx) TableName ¶
func (*L1RollupTx) TableName() string
type L1RollupTxModel ¶
type L1RollupTxModel interface { CreateL1RollupTxTable() error DropL1RollupTxTable() error CreateL1RollupTx(tx *L1RollupTx) error GetLatestHandledTx(txType int64) (tx *L1RollupTx, err error) GetLatestPendingTx(txType int64) (tx *L1RollupTx, err error) GetL1RollupTxsByStatus(txStatus int) (txs []*L1RollupTx, err error) GetL1RollupTxsByHash(hash string) (txs []*L1RollupTx, err error) DeleteL1RollupTx(tx *L1RollupTx) error UpdateL1RollupTxsInTransact(tx *gorm.DB, txs []*L1RollupTx) error }
func NewL1RollupTxModel ¶
func NewL1RollupTxModel(db *gorm.DB) L1RollupTxModel
Click to show internal directories.
Click to hide internal directories.