From 438f6c84f8d3f04d3416c17dda3a9d5a83ed2976 Mon Sep 17 00:00:00 2001 From: Solovyov1796 Date: Fri, 26 Apr 2024 12:39:56 +0800 Subject: [PATCH] helper da migration --- .gitignore | 1 + app/app.go | 2 ++ helper/da/client/client.go | 2 +- helper/da/go.mod | 2 +- helper/da/main.go | 4 ++-- helper/da/service/handler.go | 14 +++++++------- 6 files changed, 14 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 195c68db..23c5a508 100644 --- a/.gitignore +++ b/.gitignore @@ -42,3 +42,4 @@ build/linux go.work go.work.sum .build/0gchaind +.build/da diff --git a/app/app.go b/app/app.go index 269487e5..d0a532f2 100644 --- a/app/app.go +++ b/app/app.go @@ -627,6 +627,8 @@ func NewApp( validatorvesting.NewAppModule(app.bankKeeper), evmutil.NewAppModule(app.evmutilKeeper, app.bankKeeper, app.accountKeeper), mint.NewAppModule(appCodec, app.mintKeeper, app.accountKeeper, nil, mintSubspace), + council.NewAppModule(app.CouncilKeeper, app.stakingKeeper), + das.NewAppModule(app.DasKeeper), ) // Warning: Some begin blockers must run before others. Ensure the dependencies are understood before modifying this list. diff --git a/helper/da/client/client.go b/helper/da/client/client.go index 533c9e9c..0d760d6b 100644 --- a/helper/da/client/client.go +++ b/helper/da/client/client.go @@ -4,7 +4,7 @@ import ( "context" "time" - "github.com/0glabs/0g-evmos/helper/da/light" + "github.com/0glabs/0g-chain/helper/da/light" "github.com/pkg/errors" ) diff --git a/helper/da/go.mod b/helper/da/go.mod index b0e11e7e..c42d6564 100644 --- a/helper/da/go.mod +++ b/helper/da/go.mod @@ -1,4 +1,4 @@ -module github.com/0glabs/0g-evmos/helper/da +module github.com/0glabs/0g-chain/helper/da go 1.20 diff --git a/helper/da/main.go b/helper/da/main.go index 001737a8..247f4e16 100644 --- a/helper/da/main.go +++ b/helper/da/main.go @@ -11,8 +11,8 @@ import ( "os/signal" "time" - "github.com/0glabs/0g-evmos/helper/da/service" - "github.com/0glabs/0g-evmos/helper/da/types" + "github.com/0glabs/0g-chain/helper/da/service" + "github.com/0glabs/0g-chain/helper/da/types" "github.com/lesismal/nbio/nbhttp" "github.com/lesismal/nbio/nbhttp/websocket" diff --git a/helper/da/service/handler.go b/helper/da/service/handler.go index e7f5d19f..5a379bc8 100644 --- a/helper/da/service/handler.go +++ b/helper/da/service/handler.go @@ -8,9 +8,9 @@ import ( "strconv" "strings" - "github.com/0glabs/0g-evmos/helper/da/client" - "github.com/0glabs/0g-evmos/helper/da/types" - "github.com/0glabs/0g-evmos/helper/da/utils/sizedw8grp" + "github.com/0glabs/0g-chain/helper/da/client" + "github.com/0glabs/0g-chain/helper/da/types" + "github.com/0glabs/0g-chain/helper/da/utils/sizedw8grp" jsoniter "github.com/json-iterator/go" "github.com/lesismal/nbio/nbhttp/websocket" @@ -165,20 +165,20 @@ func runEvmosdCliReportDasResult(ctx context.Context, requestId uint64, result b strconv.FormatUint(requestId, 10), strconv.FormatBool(result), "--from", account.(string), - "--gas-prices", "767812500aevmos", // TODO: use args to set gas prices + "--gas-prices", "7678500neuron", // TODO: use args to set gas prices } homePath := ctx.Value(types.NODE_HOME_PATH) - if homePath != nil { + if len(homePath.(string)) > 0 { args = append(args, "--home", homePath.(string)) } keyring := ctx.Value(types.NODE_CLI_EXEC_KEYRING) - if keyring != nil { + if len(keyring.(string)) > 0 { args = append(args, "--keyring-backend", keyring.(string)) } - cmdStr := relativePath.(string) + "evmosd" + cmdStr := relativePath.(string) + "0gchaind" cmd := exec.Command(cmdStr, append(args, "-y")...) cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr