Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Ronin and Ronin saigon chains. #112

Merged
merged 4 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion blockchain/game7/game7.go
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,6 @@ func ToEntireBlocksBatchFromLogProto(obj *Game7BlocksBatch) *seer_common.BlocksB
}

func ToProtoSingleBlock(obj *seer_common.BlockJson) *Game7Block {

return &Game7Block{
BlockNumber: fromHex(obj.BlockNumber).Uint64(),
Difficulty: fromHex(obj.Difficulty).Uint64(),
Expand Down
10 changes: 10 additions & 0 deletions blockchain/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ import (
"github.com/G7DAO/seer/blockchain/mantle"
"github.com/G7DAO/seer/blockchain/mantle_sepolia"
"github.com/G7DAO/seer/blockchain/polygon"
"github.com/G7DAO/seer/blockchain/ronin"
"github.com/G7DAO/seer/blockchain/ronin_saigon"
"github.com/G7DAO/seer/blockchain/sepolia"
"github.com/G7DAO/seer/blockchain/xai"
"github.com/G7DAO/seer/blockchain/xai_sepolia"
Expand All @@ -34,6 +36,8 @@ import (
)

func NewClient(chain, url string, timeout int) (BlockchainClient, error) {
fmt.Printf("Chain: %s\n", chain)
fmt.Printf("URL: %s\n", url)
if chain == "ethereum" {
client, err := ethereum.NewClient(url, timeout)
return client, err
Expand Down Expand Up @@ -82,6 +86,12 @@ func NewClient(chain, url string, timeout int) (BlockchainClient, error) {
} else if chain == "b3_sepolia" {
client, err := b3_sepolia.NewClient(url, timeout)
return client, err
} else if chain == "ronin" {
client, err := ronin.NewClient(url, timeout)
return client, err
} else if chain == "ronin_saigon" {
client, err := ronin_saigon.NewClient(url, timeout)
return client, err
} else {
return nil, errors.New("unsupported chain type")
}
Expand Down
Loading
Loading