From 11cd7a379913d137ef558622a44e7e014e6cd952 Mon Sep 17 00:00:00 2001 From: chray-zhang Date: Wed, 13 Nov 2024 23:07:07 -0500 Subject: [PATCH] lint changes --- integration-tests/common/test_common.go | 14 +++++++------- integration-tests/smoke/ocr2_test.go | 2 +- integration-tests/testconfig/testconfig.go | 18 +++++++++--------- ops/gauntlet/gauntlet_plus_plus_starknet.go | 9 ++++----- 4 files changed, 21 insertions(+), 22 deletions(-) diff --git a/integration-tests/common/test_common.go b/integration-tests/common/test_common.go index e73a7df0c..2bcc9b191 100644 --- a/integration-tests/common/test_common.go +++ b/integration-tests/common/test_common.go @@ -56,13 +56,13 @@ type AccountDetails struct { // Clients to access internal methods type Clients struct { - StarknetClient *starknet.Client - DevnetClient *starknetdevnet.DevNet - KillgraveClient *test_env_ctf.Killgrave - OCR2Client *ocr2.Client - ChainlinkClient *ChainlinkClient - GauntletClient *gauntlet.StarknetGauntlet - DockerEnv *StarknetClusterTestEnv + StarknetClient *starknet.Client + DevnetClient *starknetdevnet.DevNet + KillgraveClient *test_env_ctf.Killgrave + OCR2Client *ocr2.Client + ChainlinkClient *ChainlinkClient + GauntletClient *gauntlet.StarknetGauntlet + DockerEnv *StarknetClusterTestEnv GauntletPPClient *gauntlet.StarknetGauntletPlusPlus } diff --git a/integration-tests/smoke/ocr2_test.go b/integration-tests/smoke/ocr2_test.go index 292d7e358..7177ca448 100644 --- a/integration-tests/smoke/ocr2_test.go +++ b/integration-tests/smoke/ocr2_test.go @@ -75,7 +75,7 @@ func TestOCRBasic(t *testing.T) { state.DeployCluster() // Setting up G++ Client rpcUrl := state.Common.RPCDetails.RPCL2External - gppPort := "http://localhost:"+ *state.TestConfig.TestConfig.Common.GauntletPlusPlusPort + gppPort := "http://localhost:" + *state.TestConfig.TestConfig.Common.GauntletPlusPlusPort state.Clients.GauntletPPClient, err = gauntlet.NewStarknetGauntletPlusPlus(gppPort, rpcUrl, state.Account.Account, state.Account.PrivateKey) require.NoError(t, err, "Setting up gauntlet ++ should not fail") diff --git a/integration-tests/testconfig/testconfig.go b/integration-tests/testconfig/testconfig.go index 6a0566d10..270608527 100644 --- a/integration-tests/testconfig/testconfig.go +++ b/integration-tests/testconfig/testconfig.go @@ -183,16 +183,16 @@ type Common struct { InsideK8s *bool `toml:"inside_k8"` User *string `toml:"user"` // if rpc requires api key to be passed as an HTTP header - L2RPCApiKey *string `toml:"l2_rpc_url_api_key"` - L2RPCUrl *string `toml:"l2_rpc_url"` - PrivateKey *string `toml:"private_key"` - Account *string `toml:"account"` - Stateful *bool `toml:"stateful_db"` - InternalDockerRepo *string `toml:"internal_docker_repo"` - DevnetImage *string `toml:"devnet_image"` + L2RPCApiKey *string `toml:"l2_rpc_url_api_key"` + L2RPCUrl *string `toml:"l2_rpc_url"` + PrivateKey *string `toml:"private_key"` + Account *string `toml:"account"` + Stateful *bool `toml:"stateful_db"` + InternalDockerRepo *string `toml:"internal_docker_repo"` + DevnetImage *string `toml:"devnet_image"` GauntletPlusPlusImage *string `toml:"gauntlet_plus_plus_image"` - PostgresVersion *string `toml:"postgres_version"` - GauntletPlusPlusPort *string `toml:"gauntlet_plus_plus_port"` + PostgresVersion *string `toml:"postgres_version"` + GauntletPlusPlusPort *string `toml:"gauntlet_plus_plus_port"` } func (c *Common) Validate() error { diff --git a/ops/gauntlet/gauntlet_plus_plus_starknet.go b/ops/gauntlet/gauntlet_plus_plus_starknet.go index 7311e160d..f567e0c41 100644 --- a/ops/gauntlet/gauntlet_plus_plus_starknet.go +++ b/ops/gauntlet/gauntlet_plus_plus_starknet.go @@ -218,8 +218,7 @@ func (sgpp *StarknetGauntletPlusPlus) DeployOCR2ControllerContract(minSubmission if err != nil { return "", err } - - + constructorCalldata := map[string]interface{}{ "owner": address, "link": linkTokenAddress, @@ -256,7 +255,7 @@ func (sgpp *StarknetGauntletPlusPlus) DeployOCR2ControllerProxyContract(address if err != nil { return "", err } - + constructorCalldata := map[string]interface{}{ "owner": address, "address": controllerContractAddress, @@ -391,7 +390,7 @@ func (sgpp *StarknetGauntletPlusPlus) SetOCRBilling(observationPaymentGjuels int return sgpp.executeReturnsReport(&request) } -func (sgpp *StarknetGauntletPlusPlus) DeclareOzAccount() (error) { +func (sgpp *StarknetGauntletPlusPlus) DeclareOzAccount() error { inputMap := make(map[string]interface{}) request := Request{ Command: "starknet/chain/open-zeppelin:declare", @@ -408,7 +407,7 @@ func (sgpp *StarknetGauntletPlusPlus) DeployOzAccount(publicKey string) (string, } constructorCalldata := map[string]interface{}{ - "publicKey": publicKey, + "publicKey": publicKey, } inputMap := map[string]interface{}{ "constructorCalldata": &constructorCalldata,