Skip to content

Commit

Permalink
go format imports
Browse files Browse the repository at this point in the history
  • Loading branch information
guoshijiang committed Jul 12, 2023
1 parent 5b02064 commit c7568f5
Show file tree
Hide file tree
Showing 12 changed files with 53 additions and 28 deletions.
7 changes: 5 additions & 2 deletions mt-batcher/cmd/mt-batcher/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@ package main

import (
"fmt"
"os"

"github.com/urfave/cli"

"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/params"

mt_batcher "github.com/mantlenetworkio/mantle/mt-batcher"
"github.com/mantlenetworkio/mantle/mt-batcher/flags"
"github.com/urfave/cli"
"os"
)

var (
Expand Down
3 changes: 2 additions & 1 deletion mt-batcher/common/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ package common

import (
"fmt"
"github.com/Layr-Labs/datalayr/common/header"
"math/big"
"os"

"github.com/Layr-Labs/datalayr/common/header"
)

func CreateUploadHeader(params StoreParams) ([]byte, error) {
Expand Down
3 changes: 2 additions & 1 deletion mt-batcher/metrics/metrics_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ package metrics

import (
"fmt"
"github.com/prometheus/client_golang/prometheus/promhttp"
"net/http"
"strconv"

"github.com/prometheus/client_golang/prometheus/promhttp"
)

func StartServer(hostname string, port uint64) {
Expand Down
3 changes: 2 additions & 1 deletion mt-batcher/services/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ package client
import (
"errors"
"fmt"
"strconv"

"github.com/go-resty/resty/v2"
"github.com/mantlenetworkio/mantle/l2geth/rollup"
"strconv"
)

var errDtlHTTPError = errors.New("dtl http error")
Expand Down
19 changes: 12 additions & 7 deletions mt-batcher/services/restorer/handle.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,27 @@ import (
"bytes"
"context"
"encoding/json"

"math/big"
"net/http"
"strings"

gecho "github.com/labstack/echo/v4"
"github.com/pkg/errors"
"github.com/shurcooL/graphql"
"google.golang.org/grpc"

"github.com/Layr-Labs/datalayr/common/graphView"
pb "github.com/Layr-Labs/datalayr/common/interfaces/interfaceRetrieverServer"

"github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/rlp"
gecho "github.com/labstack/echo/v4"

common2 "github.com/mantlenetworkio/mantle/l2geth/common"
"github.com/mantlenetworkio/mantle/l2geth/core/types"
l2rlp "github.com/mantlenetworkio/mantle/l2geth/rlp"
"github.com/mantlenetworkio/mantle/l2geth/rollup/eigenda"
"github.com/pkg/errors"
"github.com/shurcooL/graphql"
"google.golang.org/grpc"
"math/big"
"net/http"
"strings"
)

const (
Expand Down
1 change: 1 addition & 0 deletions mt-batcher/services/sequencer/db/level.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package db

import (
"encoding/binary"

"github.com/syndtr/goleveldb/leveldb"
)

Expand Down
10 changes: 6 additions & 4 deletions mt-batcher/services/sequencer/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,25 @@ import (
"sync"
"time"

"github.com/pkg/errors"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"

"github.com/Layr-Labs/datalayr/common/graphView"
pb "github.com/Layr-Labs/datalayr/common/interfaces/interfaceDL"
"github.com/Layr-Labs/datalayr/common/logging"

"github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/ethclient"
"github.com/ethereum/go-ethereum/log"

l2gethcommon "github.com/mantlenetworkio/mantle/l2geth/common"
l2ethclient "github.com/mantlenetworkio/mantle/l2geth/ethclient"
l2rlp "github.com/mantlenetworkio/mantle/l2geth/rlp"
common3 "github.com/mantlenetworkio/mantle/l2geth/rollup/eigenda"
"github.com/pkg/errors"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"

"github.com/mantlenetworkio/mantle/mt-batcher/bindings"
rc "github.com/mantlenetworkio/mantle/mt-batcher/bindings"
common2 "github.com/mantlenetworkio/mantle/mt-batcher/common"
Expand Down
20 changes: 12 additions & 8 deletions mt-challenger/challenger/challenger.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,23 @@ import (
"crypto/ecdsa"
"encoding/hex"
"fmt"
"math/big"
"strconv"
"strings"
"sync"
"time"

"github.com/pkg/errors"
"github.com/shurcooL/graphql"
"google.golang.org/grpc"

datalayr "github.com/Layr-Labs/datalayr/common/contracts"
gkzg "github.com/Layr-Labs/datalayr/common/crypto/go-kzg-bn254"
"github.com/Layr-Labs/datalayr/common/graphView"
"github.com/Layr-Labs/datalayr/common/header"
pb "github.com/Layr-Labs/datalayr/common/interfaces/interfaceRetrieverServer"
"github.com/Layr-Labs/datalayr/common/logging"

"github.com/ethereum/go-ethereum/accounts/abi"
"github.com/ethereum/go-ethereum/accounts/abi/bind"
ethc "github.com/ethereum/go-ethereum/common"
Expand All @@ -20,6 +31,7 @@ import (
"github.com/ethereum/go-ethereum/ethclient"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/rlp"

"github.com/mantlenetworkio/mantle/l2geth/common"
l2types "github.com/mantlenetworkio/mantle/l2geth/core/types"
l2ethclient "github.com/mantlenetworkio/mantle/l2geth/ethclient"
Expand All @@ -32,14 +44,6 @@ import (
"github.com/mantlenetworkio/mantle/mt-challenger/challenger/client"
"github.com/mantlenetworkio/mantle/mt-challenger/challenger/db"
"github.com/mantlenetworkio/mantle/mt-challenger/metrics"
"github.com/pkg/errors"
"github.com/shurcooL/graphql"
"google.golang.org/grpc"
"math/big"
"strconv"
"strings"
"sync"
"time"
)

const fraudString = "2d5f2860204f2060295f2d202d5f2860206f2060295f2d202d5f286020512060295f2d2042495444414f204a5553542052454b5420594f55207c5f2860204f2060295f7c202d207c5f2860206f2060295f7c202d207c5f286020512060295f7c"
Expand Down
1 change: 1 addition & 0 deletions mt-challenger/challenger/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package client
import (
"errors"
"fmt"

"github.com/go-resty/resty/v2"
)

Expand Down
7 changes: 5 additions & 2 deletions mt-challenger/cmd/mt-challenger/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@ package main

import (
"fmt"
"os"

"github.com/urfave/cli"

"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/params"

"github.com/mantlenetworkio/mantle/mt-challenger"
"github.com/mantlenetworkio/mantle/mt-challenger/flags"
"github.com/urfave/cli"
"os"
)

var (
Expand Down
3 changes: 2 additions & 1 deletion mt-challenger/metrics/metrics_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ package metrics

import (
"fmt"
"github.com/prometheus/client_golang/prometheus/promhttp"
"net/http"
"strconv"

"github.com/prometheus/client_golang/prometheus/promhttp"
)

func StartServer(hostname string, port uint64) {
Expand Down
4 changes: 3 additions & 1 deletion mt-challenger/mt_challenger.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@ import (
"context"
"time"

"github.com/urfave/cli"

"github.com/Layr-Labs/datalayr/common/logging"
ethc "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/log"

"github.com/mantlenetworkio/mantle/l2geth/common"
"github.com/mantlenetworkio/mantle/mt-batcher/l1l2client"
common2 "github.com/mantlenetworkio/mantle/mt-batcher/services/common"
"github.com/mantlenetworkio/mantle/mt-challenger/challenger"
"github.com/mantlenetworkio/mantle/mt-challenger/metrics"
"github.com/urfave/cli"
)

func Main(gitVersion string) func(ctx *cli.Context) error {
Expand Down

0 comments on commit c7568f5

Please sign in to comment.