github.com/0xPolygon/supernets2-node@v0.0.0-20230711153321-2fe574524eaa/etherman/types.go (about) 1 package etherman 2 3 import ( 4 "time" 5 6 "github.com/0xPolygon/supernets2-node/etherman/smartcontracts/supernets2" 7 "github.com/ethereum/go-ethereum/common" 8 ) 9 10 // Block struct 11 type Block struct { 12 BlockNumber uint64 13 BlockHash common.Hash 14 ParentHash common.Hash 15 GlobalExitRoots []GlobalExitRoot 16 ForcedBatches []ForcedBatch 17 SequencedBatches [][]SequencedBatch 18 VerifiedBatches []VerifiedBatch 19 SequencedForceBatches [][]SequencedForceBatch 20 ForkIDs []ForkID 21 ReceivedAt time.Time 22 } 23 24 // GlobalExitRoot struct 25 type GlobalExitRoot struct { 26 BlockNumber uint64 27 MainnetExitRoot common.Hash 28 RollupExitRoot common.Hash 29 GlobalExitRoot common.Hash 30 } 31 32 // SequencedBatch represents virtual batch 33 type SequencedBatch struct { 34 BatchNumber uint64 35 SequencerAddr common.Address 36 TxHash common.Hash 37 Nonce uint64 38 Coinbase common.Address 39 supernets2.Supernets2BatchData 40 } 41 42 // ForcedBatch represents a ForcedBatch 43 type ForcedBatch struct { 44 BlockNumber uint64 45 ForcedBatchNumber uint64 46 Sequencer common.Address 47 GlobalExitRoot common.Hash 48 RawTxsData []byte 49 ForcedAt time.Time 50 } 51 52 // VerifiedBatch represents a VerifiedBatch 53 type VerifiedBatch struct { 54 BlockNumber uint64 55 BatchNumber uint64 56 Aggregator common.Address 57 StateRoot common.Hash 58 TxHash common.Hash 59 } 60 61 // SequencedForceBatch is a sturct to track the ForceSequencedBatches event. 62 type SequencedForceBatch struct { 63 BatchNumber uint64 64 Coinbase common.Address 65 TxHash common.Hash 66 Timestamp time.Time 67 Nonce uint64 68 supernets2.Supernets2ForcedBatchData 69 } 70 71 // ForkID is a sturct to track the ForkID event. 72 type ForkID struct { 73 BatchNumber uint64 74 ForkID uint64 75 Version string 76 }