Initial dract of the common structs

This commit is contained in:
a_bennassar
2020-07-24 13:04:17 +02:00
parent ecf731982e
commit b9936f8564
16 changed files with 310 additions and 5 deletions

24
common/batch.go Normal file
View File

@@ -0,0 +1,24 @@
package common
import (
"time"
eth "github.com/ethereum/go-ethereum/common"
)
// Batch is a struct that represents Hermez network batch
type Batch struct {
BatchNum BatchNum
SlotNum SlotNum // Slot in which the batch is forged
EthTxHash eth.Hash
BlockNum uint64 // Etherum block in which the batch is forged
Timestamp time.Time
Forger eth.Address
ExitRoot Hash
OldRoot Hash
NewRoot Hash
TotalAccounts uint64
}
// BatchNum identifies a batch
type BatchNum uint32