Update Coordinator & BatchBuilder & TxSelector to new SQL schemas changes

This commit is contained in:
arnaucube
2020-08-17 12:36:36 +02:00
parent cb1b820256
commit c702442287
10 changed files with 80 additions and 25 deletions

View File

@@ -58,3 +58,16 @@ const (
// TxTypeTransferToBJJ TBD
TxTypeTransferToBJJ TxType = "TxTypeTransferToBJJ"
)
// Tx is a struct used by the TxSelector & BatchBuilder as a generic type generated from L1Tx & PoolL2Tx
type Tx struct {
TxID TxID
FromIdx Idx // FromIdx is used by L1Tx/Deposit to indicate the Idx receiver of the L1Tx.LoadAmount (deposit)
ToIdx Idx // ToIdx is ignored in L1Tx/Deposit, but used in the L1Tx/DepositAndTransfer
TokenID TokenID
Amount *big.Int
Nonce uint64 // effective 48 bits used
Fee FeeSelector
Type TxType // optional, descrives which kind of tx it's
BatchNum BatchNum // batchNum in which this tx was forged. Presence indicates "forged" state.
}