From 76adc0cf8a6a37a3d9b92ccd7251148cb15f1e21 Mon Sep 17 00:00:00 2001 From: Mateusz Morusiewicz <11313015+Ruteri@users.noreply.github.com> Date: Tue, 7 Nov 2023 16:16:05 +0100 Subject: [PATCH] Lints --- suave/cmd/suavecli/buildGoerliBlocks.go | 14 +++++++------- suave/cmd/suavecli/sendBuildShareBlock.go | 18 +++++++++--------- suave/cmd/suavecli/sendBundle.go | 10 +++++----- suave/cmd/suavecli/sendBundleToBuilder.go | 14 +++++++------- suave/cmd/suavecli/sendMevShareBundle.go | 14 +++++++------- suave/cmd/suavecli/sendMevShareMatch.go | 18 +++++++++--------- suave/cmd/suavecli/testDeployAndShare.go | 14 +++++++------- suave/sdk/sdk.go | 8 ++++---- 8 files changed, 55 insertions(+), 55 deletions(-) diff --git a/suave/cmd/suavecli/buildGoerliBlocks.go b/suave/cmd/suavecli/buildGoerliBlocks.go index 7c993c637..8aa35ccb2 100644 --- a/suave/cmd/suavecli/buildGoerliBlocks.go +++ b/suave/cmd/suavecli/buildGoerliBlocks.go @@ -18,14 +18,14 @@ func cmdBuildGoerliBlocks() { flagset := flag.NewFlagSet("deployBlockSenderContract", flag.ExitOnError) var ( - suaveRpc = flagset.String("suave_rpc", "http://127.0.0.1:8545", "address of suave rpc") - goerliRpc = flagset.String("goerli_rpc", "http://127.0.0.1:8545", "address of goerli rpc") - goerliBeaconRpc = flagset.String("goerli_beacon_rpc", "http://127.0.0.1:5052", "address of goerli beacon rpc") + suaveRpc = flagset.String("suave_rpc", "http://127.0.0.1:8545", "address of suave rpc") + goerliRpc = flagset.String("goerli_rpc", "http://127.0.0.1:8545", "address of goerli rpc") + goerliBeaconRpc = flagset.String("goerli_beacon_rpc", "http://127.0.0.1:5052", "address of goerli beacon rpc") kettleAddressHex = flagset.String("kettleAddress", "0x4E2B0c0e428AE1CDE26d5BcF17Ba83f447068E5B", "wallet address of execution node") - privKeyHex = flagset.String("privkey", "", "private key as hex (for testing)") - boostRelayUrl = flagset.String("relay_url", "http://127.0.0.1:8091", "address of boost relay that the contract will send blocks to") - verbosity = flagset.Int("verbosity", int(log.LvlInfo), "log verbosity (0-5)") - privKey *ecdsa.PrivateKey + privKeyHex = flagset.String("privkey", "", "private key as hex (for testing)") + boostRelayUrl = flagset.String("relay_url", "http://127.0.0.1:8091", "address of boost relay that the contract will send blocks to") + verbosity = flagset.Int("verbosity", int(log.LvlInfo), "log verbosity (0-5)") + privKey *ecdsa.PrivateKey ) flagset.Parse(os.Args[2:]) diff --git a/suave/cmd/suavecli/sendBuildShareBlock.go b/suave/cmd/suavecli/sendBuildShareBlock.go index 347c703c8..b494c8cbb 100644 --- a/suave/cmd/suavecli/sendBuildShareBlock.go +++ b/suave/cmd/suavecli/sendBuildShareBlock.go @@ -40,15 +40,15 @@ func cmdSendBuildShareBlock() { flagset := flag.NewFlagSet("sendBuildShareBlock", flag.ExitOnError) var ( - suaveRpc = flagset.String("suave_rpc", "http://127.0.0.1:8545", "address of suave rpc") - goerliRpc = flagset.String("goerli_rpc", "http://127.0.0.1:8545", "address of goerli rpc") - goerliBeaconRpc = flagset.String("goerli_beacon_rpc", "http://127.0.0.1:5052", "address of goerli beacon rpc") - boostRelayUrl = flagset.String("relay_url", "http://127.0.0.1:8091", "address of boost relay that the contract will send blocks to") - blockSenderAddressHex = flagset.String("block_sender_addr", "0x42042042028AE1CDE26d5BcF17Ba83f447068E5B", "address of block sender contract") - kettleAddressHex = flagset.String("kettleAddress", "0x4E2B0c0e428AE1CDE26d5BcF17Ba83f447068E5B", "wallet address of execution node") - privKeyHex = flagset.String("privkey", "", "private key as hex (for testing)") - verbosity = flagset.Int("verbosity", int(log.LvlInfo), "log verbosity (0-5)") - privKey *ecdsa.PrivateKey + suaveRpc = flagset.String("suave_rpc", "http://127.0.0.1:8545", "address of suave rpc") + goerliRpc = flagset.String("goerli_rpc", "http://127.0.0.1:8545", "address of goerli rpc") + goerliBeaconRpc = flagset.String("goerli_beacon_rpc", "http://127.0.0.1:5052", "address of goerli beacon rpc") + boostRelayUrl = flagset.String("relay_url", "http://127.0.0.1:8091", "address of boost relay that the contract will send blocks to") + blockSenderAddressHex = flagset.String("block_sender_addr", "0x42042042028AE1CDE26d5BcF17Ba83f447068E5B", "address of block sender contract") + kettleAddressHex = flagset.String("kettleAddress", "0x4E2B0c0e428AE1CDE26d5BcF17Ba83f447068E5B", "wallet address of execution node") + privKeyHex = flagset.String("privkey", "", "private key as hex (for testing)") + verbosity = flagset.Int("verbosity", int(log.LvlInfo), "log verbosity (0-5)") + privKey *ecdsa.PrivateKey ) flagset.Parse(os.Args[2:]) diff --git a/suave/cmd/suavecli/sendBundle.go b/suave/cmd/suavecli/sendBundle.go index 1ebd708a8..2763f99f1 100644 --- a/suave/cmd/suavecli/sendBundle.go +++ b/suave/cmd/suavecli/sendBundle.go @@ -23,12 +23,12 @@ func cmdSendBundle() { flagset := flag.NewFlagSet("sendBundle", flag.ExitOnError) var ( - suaveRpc = flagset.String("suave_rpc", "http://127.0.0.1:8545", "address of suave rpc") + suaveRpc = flagset.String("suave_rpc", "http://127.0.0.1:8545", "address of suave rpc") kettleAddressHex = flagset.String("kettleAddress", "0x4E2B0c0e428AE1CDE26d5BcF17Ba83f447068E5B", "wallet address of execution node") - goerliRpc = flagset.String("goerli_rpc", "http://127.0.0.1:8545", "address of goerli rpc") - privKeyHex = flagset.String("privkey", "", "private key as hex (for testing)") - verbosity = flagset.Int("verbosity", int(log.LvlInfo), "log verbosity (0-5)") - privKey *ecdsa.PrivateKey + goerliRpc = flagset.String("goerli_rpc", "http://127.0.0.1:8545", "address of goerli rpc") + privKeyHex = flagset.String("privkey", "", "private key as hex (for testing)") + verbosity = flagset.Int("verbosity", int(log.LvlInfo), "log verbosity (0-5)") + privKey *ecdsa.PrivateKey ) flagset.Parse(os.Args[2:]) diff --git a/suave/cmd/suavecli/sendBundleToBuilder.go b/suave/cmd/suavecli/sendBundleToBuilder.go index 70b5a00e1..2ba02ecea 100644 --- a/suave/cmd/suavecli/sendBundleToBuilder.go +++ b/suave/cmd/suavecli/sendBundleToBuilder.go @@ -28,13 +28,13 @@ func cmdSendBundleToBuilder() { goerliBuilderUrl := "https://relay-goerli.flashbots.net/" var ( - suaveRpc = flagset.String("suave_rpc", "http://127.0.0.1:8545", "address of suave rpc") - kettleAddressHex = flagset.String("kettleAddress", "0x4E2B0c0e428AE1CDE26d5BcF17Ba83f447068E5B", "wallet address of execution node") - goerliRpc = flagset.String("goerli_rpc", "http://127.0.0.1:8555", "address of goerli rpc") - privKeyHex = flagset.String("privkey", "", "private key as hex (for testing)") - contractAddressFlag = flagset.String("contract", "", "contract address to use (default: deploy new one)") - verbosity = flagset.Int("verbosity", int(log.LvlInfo), "log verbosity (0-5)") - privKey *ecdsa.PrivateKey + suaveRpc = flagset.String("suave_rpc", "http://127.0.0.1:8545", "address of suave rpc") + kettleAddressHex = flagset.String("kettleAddress", "0x4E2B0c0e428AE1CDE26d5BcF17Ba83f447068E5B", "wallet address of execution node") + goerliRpc = flagset.String("goerli_rpc", "http://127.0.0.1:8555", "address of goerli rpc") + privKeyHex = flagset.String("privkey", "", "private key as hex (for testing)") + contractAddressFlag = flagset.String("contract", "", "contract address to use (default: deploy new one)") + verbosity = flagset.Int("verbosity", int(log.LvlInfo), "log verbosity (0-5)") + privKey *ecdsa.PrivateKey ) flagset.Parse(os.Args[2:]) diff --git a/suave/cmd/suavecli/sendMevShareBundle.go b/suave/cmd/suavecli/sendMevShareBundle.go index 7f8b9bf5c..46b504e45 100644 --- a/suave/cmd/suavecli/sendMevShareBundle.go +++ b/suave/cmd/suavecli/sendMevShareBundle.go @@ -22,13 +22,13 @@ func cmdSendMevShareBundle() { flagset := flag.NewFlagSet("sendBundle", flag.ExitOnError) var ( - suaveRpc = flagset.String("suave_rpc", "http://127.0.0.1:8545", "address of suave rpc") - kettleAddressHex = flagset.String("kettleAddress", "0x4E2B0c0e428AE1CDE26d5BcF17Ba83f447068E5B", "wallet address of execution node") - mevshareAddressHex = flagset.String("mev_share_addr", "0x42042042028AE1CDE26d5BcF17Ba83f447068E5B", "address of mev share contract") - goerliRpc = flagset.String("goerli_rpc", "http://127.0.0.1:8545", "address of goerli rpc") - privKeyHex = flagset.String("privkey", "", "private key as hex (for testing)") - verbosity = flagset.Int("verbosity", int(log.LvlInfo), "log verbosity (0-5)") - privKey *ecdsa.PrivateKey + suaveRpc = flagset.String("suave_rpc", "http://127.0.0.1:8545", "address of suave rpc") + kettleAddressHex = flagset.String("kettleAddress", "0x4E2B0c0e428AE1CDE26d5BcF17Ba83f447068E5B", "wallet address of execution node") + mevshareAddressHex = flagset.String("mev_share_addr", "0x42042042028AE1CDE26d5BcF17Ba83f447068E5B", "address of mev share contract") + goerliRpc = flagset.String("goerli_rpc", "http://127.0.0.1:8545", "address of goerli rpc") + privKeyHex = flagset.String("privkey", "", "private key as hex (for testing)") + verbosity = flagset.Int("verbosity", int(log.LvlInfo), "log verbosity (0-5)") + privKey *ecdsa.PrivateKey ) flagset.Parse(os.Args[2:]) diff --git a/suave/cmd/suavecli/sendMevShareMatch.go b/suave/cmd/suavecli/sendMevShareMatch.go index 52eb6367f..1c9a59c14 100644 --- a/suave/cmd/suavecli/sendMevShareMatch.go +++ b/suave/cmd/suavecli/sendMevShareMatch.go @@ -23,15 +23,15 @@ func cmdSendMevShareMatch() { flagset := flag.NewFlagSet("sendBundle", flag.ExitOnError) var ( - suaveRpc = flagset.String("suave_rpc", "http://127.0.0.1:8545", "address of suave rpc") - kettleAddressHex = flagset.String("kettleAddress", "0x4E2B0c0e428AE1CDE26d5BcF17Ba83f447068E5B", "wallet address of execution node") - mevshareAddressHex = flagset.String("mev_share_addr", "0x42042042028AE1CDE26d5BcF17Ba83f447068E5B", "address of mev share contract") - blockSenderHex = flagset.String("block_sender_addr", "0x42042042028AE1CDE26d5BcF17Ba83f447068E5B", "address of mev share contract") - matchBidId = flagset.String("match_bid_id", "123-123-123", "ID of mev share bundle bid to back run") - goerliRpc = flagset.String("goerli_rpc", "http://127.0.0.1:8545", "address of goerli rpc") - privKeyHex = flagset.String("privkey", "", "private key as hex (for testing)") - verbosity = flagset.Int("verbosity", int(log.LvlInfo), "log verbosity (0-5)") - privKey *ecdsa.PrivateKey + suaveRpc = flagset.String("suave_rpc", "http://127.0.0.1:8545", "address of suave rpc") + kettleAddressHex = flagset.String("kettleAddress", "0x4E2B0c0e428AE1CDE26d5BcF17Ba83f447068E5B", "wallet address of execution node") + mevshareAddressHex = flagset.String("mev_share_addr", "0x42042042028AE1CDE26d5BcF17Ba83f447068E5B", "address of mev share contract") + blockSenderHex = flagset.String("block_sender_addr", "0x42042042028AE1CDE26d5BcF17Ba83f447068E5B", "address of mev share contract") + matchBidId = flagset.String("match_bid_id", "123-123-123", "ID of mev share bundle bid to back run") + goerliRpc = flagset.String("goerli_rpc", "http://127.0.0.1:8545", "address of goerli rpc") + privKeyHex = flagset.String("privkey", "", "private key as hex (for testing)") + verbosity = flagset.Int("verbosity", int(log.LvlInfo), "log verbosity (0-5)") + privKey *ecdsa.PrivateKey ) flagset.Parse(os.Args[2:]) diff --git a/suave/cmd/suavecli/testDeployAndShare.go b/suave/cmd/suavecli/testDeployAndShare.go index 325f8ad38..ecca077b6 100644 --- a/suave/cmd/suavecli/testDeployAndShare.go +++ b/suave/cmd/suavecli/testDeployAndShare.go @@ -18,14 +18,14 @@ func cmdTestDeployAndShare() { flagset := flag.NewFlagSet("deployBlockSenderContract", flag.ExitOnError) var ( - suaveRpc = flagset.String("suave_rpc", "http://127.0.0.1:8545", "address of suave rpc") - goerliRpc = flagset.String("goerli_rpc", "http://127.0.0.1:8545", "address of goerli rpc") - goerliBeaconRpc = flagset.String("goerli_beacon_rpc", "http://127.0.0.1:5052", "address of goerli beacon rpc") + suaveRpc = flagset.String("suave_rpc", "http://127.0.0.1:8545", "address of suave rpc") + goerliRpc = flagset.String("goerli_rpc", "http://127.0.0.1:8545", "address of goerli rpc") + goerliBeaconRpc = flagset.String("goerli_beacon_rpc", "http://127.0.0.1:5052", "address of goerli beacon rpc") kettleAddressHex = flagset.String("kettleAddress", "0x4E2B0c0e428AE1CDE26d5BcF17Ba83f447068E5B", "wallet address of execution node") - privKeyHex = flagset.String("privkey", "", "private key as hex (for testing)") - boostRelayUrl = flagset.String("relay_url", "http://127.0.0.1:8091", "address of boost relay that the contract will send blocks to") - verbosity = flagset.Int("verbosity", int(log.LvlInfo), "log verbosity (0-5)") - privKey *ecdsa.PrivateKey + privKeyHex = flagset.String("privkey", "", "private key as hex (for testing)") + boostRelayUrl = flagset.String("relay_url", "http://127.0.0.1:8091", "address of boost relay that the contract will send blocks to") + verbosity = flagset.Int("verbosity", int(log.LvlInfo), "log verbosity (0-5)") + privKey *ecdsa.PrivateKey ) flagset.Parse(os.Args[2:]) diff --git a/suave/sdk/sdk.go b/suave/sdk/sdk.go index a85e59f89..c04b69ca0 100644 --- a/suave/sdk/sdk.go +++ b/suave/sdk/sdk.go @@ -135,15 +135,15 @@ func (t *TransactionResult) Hash() common.Hash { } type Client struct { - rpc *ethclient.Client - key *ecdsa.PrivateKey + rpc *ethclient.Client + key *ecdsa.PrivateKey kettleAddress common.Address } func NewClient(rpc *rpc.Client, key *ecdsa.PrivateKey, kettleAddress common.Address) *Client { c := &Client{ - rpc: ethclient.NewClient(rpc), - key: key, + rpc: ethclient.NewClient(rpc), + key: key, kettleAddress: kettleAddress, } return c