From 2c039c6212430806cb51449815e1c6a1ca796b31 Mon Sep 17 00:00:00 2001 From: luohewuyang Date: Sun, 21 Dec 2025 16:26:26 +0800 Subject: [PATCH] chore: execute goimports to format the code Signed-off-by: luohewuyang --- shared/utils/stader/merkle-proof-download.go | 3 ++- shared/utils/stdr/validator-state.go | 5 +++-- stader-cli/node/download-sp-merkle-proofs.go | 1 + stader-cli/node/update-operator-name.go | 1 + stader-cli/validator/exit-validator.go | 1 + stader-cli/validator/export.go | 3 ++- stader-lib/penalty-tracker/penalty-tracker.go | 3 ++- stader-lib/pool-utils/pool-utils.go | 3 ++- stader-lib/stake-pool-manager/stake-pool-manager.go | 3 ++- stader-lib/tokens/native.go | 3 ++- stader-lib/types/validator.go | 3 ++- stader/api/node/register.go | 1 + stader/api/node/send-el-rewards.go | 3 ++- stader/api/node/update-socialize-el.go | 1 + stader/node/merkle-proofs-download.go | 3 ++- 15 files changed, 26 insertions(+), 11 deletions(-) diff --git a/shared/utils/stader/merkle-proof-download.go b/shared/utils/stader/merkle-proof-download.go index 04080d0f0..755fb3902 100644 --- a/shared/utils/stader/merkle-proof-download.go +++ b/shared/utils/stader/merkle-proof-download.go @@ -3,12 +3,13 @@ package stader import ( "encoding/json" "fmt" + "net/http" + "github.com/ethereum/go-ethereum/common" "github.com/stader-labs/stader-node/shared/services" stader_backend "github.com/stader-labs/stader-node/shared/types/stader-backend" "github.com/stader-labs/stader-node/shared/utils/net" "github.com/urfave/cli" - "net/http" ) func GetAllMerkleProofsForOperator(c *cli.Context, operator common.Address) ([]*stader_backend.CycleMerkleProofs, error) { diff --git a/shared/utils/stdr/validator-state.go b/shared/utils/stdr/validator-state.go index 0a845beaa..3f397592f 100644 --- a/shared/utils/stdr/validator-state.go +++ b/shared/utils/stdr/validator-state.go @@ -1,6 +1,9 @@ package stdr import ( + "math/big" + "time" + "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/stader-labs/stader-node/shared/services/beacon" @@ -8,8 +11,6 @@ import ( "github.com/stader-labs/stader-node/stader-lib/node" "github.com/stader-labs/stader-node/stader-lib/stader" "github.com/stader-labs/stader-node/stader-lib/types" - "math/big" - "time" ) var ValidatorState = map[uint8]string{ diff --git a/stader-cli/node/download-sp-merkle-proofs.go b/stader-cli/node/download-sp-merkle-proofs.go index 887f01e29..cee65e4fb 100644 --- a/stader-cli/node/download-sp-merkle-proofs.go +++ b/stader-cli/node/download-sp-merkle-proofs.go @@ -2,6 +2,7 @@ package node import ( "fmt" + "github.com/stader-labs/stader-node/shared/services/stader" cliutils "github.com/stader-labs/stader-node/shared/utils/cli" "github.com/urfave/cli" diff --git a/stader-cli/node/update-operator-name.go b/stader-cli/node/update-operator-name.go index f067bb963..e50cd01ea 100644 --- a/stader-cli/node/update-operator-name.go +++ b/stader-cli/node/update-operator-name.go @@ -2,6 +2,7 @@ package node import ( "fmt" + "github.com/stader-labs/stader-node/shared/services/gas" "github.com/stader-labs/stader-node/shared/services/stader" cliutils "github.com/stader-labs/stader-node/shared/utils/cli" diff --git a/stader-cli/validator/exit-validator.go b/stader-cli/validator/exit-validator.go index 5eb0fc56d..932d14960 100644 --- a/stader-cli/validator/exit-validator.go +++ b/stader-cli/validator/exit-validator.go @@ -2,6 +2,7 @@ package validator import ( "fmt" + "github.com/stader-labs/stader-node/shared/services/stader" cliutils "github.com/stader-labs/stader-node/shared/utils/cli" "github.com/stader-labs/stader-node/stader-lib/types" diff --git a/stader-cli/validator/export.go b/stader-cli/validator/export.go index 893189abf..06a09828f 100644 --- a/stader-cli/validator/export.go +++ b/stader-cli/validator/export.go @@ -3,6 +3,8 @@ package validator import ( "encoding/csv" "fmt" + "os" + "github.com/stader-labs/stader-node/shared/services/stader" cliutils "github.com/stader-labs/stader-node/shared/utils/cli" "github.com/stader-labs/stader-node/shared/utils/log" @@ -10,7 +12,6 @@ import ( "github.com/stader-labs/stader-node/stader-lib/types" "github.com/stader-labs/stader-node/stader-lib/utils/eth" "github.com/urfave/cli" - "os" ) func exportValidatorStatus(c *cli.Context) error { diff --git a/stader-lib/penalty-tracker/penalty-tracker.go b/stader-lib/penalty-tracker/penalty-tracker.go index eddd7a0ba..8c4230e9a 100644 --- a/stader-lib/penalty-tracker/penalty-tracker.go +++ b/stader-lib/penalty-tracker/penalty-tracker.go @@ -1,10 +1,11 @@ package penalty_tracker import ( + "math/big" + "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/stader-labs/stader-node/stader-lib/stader" "github.com/stader-labs/stader-node/stader-lib/types" - "math/big" ) func GetCumulativeValidatorPenalty(pt *stader.PenaltyTrackerContractManager, validatorPubKey types.ValidatorPubkey, opts *bind.CallOpts) (*big.Int, error) { diff --git a/stader-lib/pool-utils/pool-utils.go b/stader-lib/pool-utils/pool-utils.go index 7f92786aa..821e94aa0 100644 --- a/stader-lib/pool-utils/pool-utils.go +++ b/stader-lib/pool-utils/pool-utils.go @@ -1,11 +1,12 @@ package pool_utils import ( + "math/big" + "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/stader-labs/stader-node/stader-lib/stader" "github.com/stader-labs/stader-node/stader-lib/types" - "math/big" ) func CalculateRewardShare(pool_utils *stader.PoolUtilsContractManager, poolId uint8, totalRewards *big.Int, opts *bind.CallOpts) (types.RewardShare, error) { diff --git a/stader-lib/stake-pool-manager/stake-pool-manager.go b/stader-lib/stake-pool-manager/stake-pool-manager.go index 4c5e1a4e4..f4d33ac09 100644 --- a/stader-lib/stake-pool-manager/stake-pool-manager.go +++ b/stader-lib/stake-pool-manager/stake-pool-manager.go @@ -1,9 +1,10 @@ package stake_pool_manager import ( + "math/big" + "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/stader-labs/stader-node/stader-lib/stader" - "math/big" ) func GetTotalAssets(spm *stader.StakePoolManagerContractManager, opts *bind.CallOpts) (*big.Int, error) { diff --git a/stader-lib/tokens/native.go b/stader-lib/tokens/native.go index 2d059c57d..dfb380b47 100644 --- a/stader-lib/tokens/native.go +++ b/stader-lib/tokens/native.go @@ -2,10 +2,11 @@ package tokens import ( "context" + "math/big" + "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/stader-labs/stader-node/stader-lib/stader" - "math/big" ) func GetEthBalance(client stader.ExecutionClient, address common.Address, opts *bind.CallOpts) (*big.Int, error) { diff --git a/stader-lib/types/validator.go b/stader-lib/types/validator.go index 9a8cc26b1..ed56efa86 100644 --- a/stader-lib/types/validator.go +++ b/stader-lib/types/validator.go @@ -1,8 +1,9 @@ package types import ( - "github.com/ethereum/go-ethereum/common" "math/big" + + "github.com/ethereum/go-ethereum/common" ) type ValidatorContractInfo struct { diff --git a/stader/api/node/register.go b/stader/api/node/register.go index 0d26a00ac..e047dafae 100644 --- a/stader/api/node/register.go +++ b/stader/api/node/register.go @@ -2,6 +2,7 @@ package node import ( "fmt" + "github.com/ethereum/go-ethereum/common" pool_utils "github.com/stader-labs/stader-node/stader-lib/pool-utils" stader_config "github.com/stader-labs/stader-node/stader-lib/stader-config" diff --git a/stader/api/node/send-el-rewards.go b/stader/api/node/send-el-rewards.go index 32335b005..d0dc0a235 100644 --- a/stader/api/node/send-el-rewards.go +++ b/stader/api/node/send-el-rewards.go @@ -1,13 +1,14 @@ package node import ( + "math/big" + "github.com/stader-labs/stader-node/shared/services" "github.com/stader-labs/stader-node/shared/types/api" "github.com/stader-labs/stader-node/stader-lib/node" pool_utils "github.com/stader-labs/stader-node/stader-lib/pool-utils" "github.com/stader-labs/stader-node/stader-lib/tokens" "github.com/urfave/cli" - "math/big" ) func CanSendElRewards(c *cli.Context) (*api.CanSendElRewardsResponse, error) { diff --git a/stader/api/node/update-socialize-el.go b/stader/api/node/update-socialize-el.go index 9ecba5601..9469c0d11 100644 --- a/stader/api/node/update-socialize-el.go +++ b/stader/api/node/update-socialize-el.go @@ -2,6 +2,7 @@ package node import ( "fmt" + "github.com/stader-labs/stader-node/shared/services" "github.com/stader-labs/stader-node/shared/types/api" "github.com/stader-labs/stader-node/shared/utils/eth1" diff --git a/stader/node/merkle-proofs-download.go b/stader/node/merkle-proofs-download.go index a27737c7c..c4742a8e1 100644 --- a/stader/node/merkle-proofs-download.go +++ b/stader/node/merkle-proofs-download.go @@ -3,6 +3,8 @@ package node import ( "encoding/json" "fmt" + "os" + "github.com/mitchellh/go-homedir" "github.com/stader-labs/stader-node/shared/services" "github.com/stader-labs/stader-node/shared/services/config" @@ -10,7 +12,6 @@ import ( "github.com/stader-labs/stader-node/shared/utils/log" "github.com/stader-labs/stader-node/shared/utils/stader" "github.com/urfave/cli" - "os" ) type MerkleProofsDownloader struct {