You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
647 B

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