Add account_update SQL table with balances and nonces

This commit is contained in:
Eduard S
2021-02-19 10:55:52 +01:00
parent d6ec1910da
commit ed4d39fcd1
11 changed files with 251 additions and 17 deletions

View File

@@ -263,3 +263,13 @@ type IdxNonce struct {
Idx Idx `db:"idx"`
Nonce Nonce `db:"nonce"`
}
// AccountUpdate represents an account balance and/or nonce update after a
// processed batch
type AccountUpdate struct {
EthBlockNum int64 `meddler:"eth_block_num"`
BatchNum BatchNum `meddler:"batch_num"`
Idx Idx `meddler:"idx"`
Nonce Nonce `meddler:"nonce"`
Balance *big.Int `meddler:"balance,bigint"`
}

View File

@@ -77,6 +77,7 @@ type BatchData struct {
L1CoordinatorTxs []L1Tx
L2Txs []L2Tx
CreatedAccounts []Account
UpdatedAccounts []AccountUpdate
ExitTree []ExitInfo
Batch Batch
}