hermez-node/common/l2tx.go
common/l2tx.goRaw
1package common
2
3import (
4 "math/big"
5)
6
7// L2Tx is a struct that represents an already forged L2 tx
8type L2Tx struct {
9 // Stored in DB: mandatory fileds
10 TxID TxID `meddler:"tx_id"`
11 BatchNum BatchNum `meddler:"batch_num"` // batchNum in which this tx was forged.
12 Position int `meddler:"position"`
13 FromIdx Idx `meddler:"from_idx"`
14 ToIdx Idx `meddler:"to_idx"`
15 Amount *big.Int `meddler:"amount,bigint"`
16 Fee FeeSelector `meddler:"fee"`
17 Nonce Nonce `meddler:"nonce"`
18 // Extra metadata, may be uninitialized
19 Type TxType `meddler:"-"` // optional, descrives which kind of tx it's
20}