-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
package main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module github.com/0xPolygon/cdk | ||
|
||
go 1.22 |
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package ethsyncer | ||
|
||
import ( | ||
"github.com/0xPolygon/cdk/syncer/storage" | ||
) | ||
|
||
type EthSyncer struct { | ||
Storage storage.StorageService | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package syncer | ||
|
||
type EventSyncer interface { | ||
GetData() []byte | ||
} | ||
|
||
type EventProcessor interface { | ||
Process(data []byte) error | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
package syncer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package inmem | ||
|
||
type Inmem struct { | ||
} | ||
|
||
func (inmem *Inmem) GetData() []byte { | ||
return []byte("Inmem") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package storage | ||
|
||
// Storage is an interface for the storage of the syncer | ||
type StorageService interface { | ||
GetData() []byte | ||
GetLatestVerifiedBlock() uint64 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package syncer | ||
|
||
type Syncer interface { | ||
// Start starts the syncer | ||
Start() error | ||
// Stop stops the syncer | ||
Stop() error | ||
// Synced returns true if the syncer is synced | ||
Synced() bool | ||
// SyncedChan returns a channel that is closed when the syncer is synced | ||
SyncedChan() <-chan struct{} | ||
// LatestVerifiedBlock returns the latest verified block | ||
LatestVerifiedBlock() uint64 | ||
// LatestBlock returns the latest block | ||
LatestBlock() uint64 | ||
// SyncedBlock returns the latest block that is synced | ||
SyncedBlock() uint64 | ||
// SyncedBlockChan returns a channel that is closed when the latest block is synced | ||
SyncedBlockChan() <-chan struct{} | ||
} | ||
|
||
type Sync struct { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
package e2e |