Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewkmin committed Jan 19, 2022
1 parent 400cbfa commit 86d3ac7
Show file tree
Hide file tree
Showing 15 changed files with 25 additions and 22 deletions.
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ require (
golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
golang.org/x/sys v0.0.0-20210915083310-ed5796bab164 // indirect
golang.org/x/tools v0.1.0 // indirect
)

go 1.16
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,7 @@ golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKG
golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.2 h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo=
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
Expand Down Expand Up @@ -708,6 +709,7 @@ golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtn
golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200108203644-89082a384178/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.1.0 h1:po9/4sTYwZU9lPhi1tOrb4hCv3qrhiQ77LZfGa2OjwY=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
Expand Down
8 changes: 4 additions & 4 deletions polygon/currency_fetcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ const (

// mumbai currency
invalidWETHContractAddress = "0x00dD3599Ae4813F3528C0d532851B937Cee1B489"
invalidWETHSymbol = "WETH"
invalidWETHDecimals = 0 // raw payload overflow
invalidWETHSymbol = "WETH"
invalidWETHDecimals = 0 // raw payload overflow

// mainnet currency
invalidXSDOContractAddress = "0x9A28226CF889Af5B7339CD3117978F5216b72d05"
invalidXSDOSymbol = "XSDO"
invalidXSDODecimals = 0 // raw payload returns 18000000000000000000, resulting in overflow
invalidXSDOSymbol = "XSDO"
invalidXSDODecimals = 0 // raw payload returns 18000000000000000000, resulting in overflow

unknownContractAddress = "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
)
Expand Down
2 changes: 1 addition & 1 deletion services/construction/combine.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ import (
"encoding/json"
"errors"

svcErrors "github.com/maticnetwork/polygon-rosetta/services/errors"
"github.com/coinbase/rosetta-sdk-go/types"
"github.com/ethereum/go-ethereum/common"
ethTypes "github.com/ethereum/go-ethereum/core/types"
svcErrors "github.com/maticnetwork/polygon-rosetta/services/errors"
)

// ConstructionCombine implements the /construction/combine
Expand Down
2 changes: 1 addition & 1 deletion services/construction/derive.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import (
"context"
"errors"

svcErrors "github.com/maticnetwork/polygon-rosetta/services/errors"
"github.com/coinbase/rosetta-sdk-go/types"
"github.com/ethereum/go-ethereum/crypto"
svcErrors "github.com/maticnetwork/polygon-rosetta/services/errors"
)

// ConstructionDerive implements the /construction/derive endpoint.
Expand Down
2 changes: 1 addition & 1 deletion services/construction/derive_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import (
"encoding/hex"
"testing"

svcErrors "github.com/maticnetwork/polygon-rosetta/services/errors"
"github.com/coinbase/rosetta-sdk-go/types"
svcErrors "github.com/maticnetwork/polygon-rosetta/services/errors"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion services/construction/hash.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import (
"context"
"errors"

svcErrors "github.com/maticnetwork/polygon-rosetta/services/errors"
"github.com/coinbase/rosetta-sdk-go/types"
ethTypes "github.com/ethereum/go-ethereum/core/types"
svcErrors "github.com/maticnetwork/polygon-rosetta/services/errors"
)

// ConstructionHash implements the /construction/hash endpoint.
Expand Down
4 changes: 2 additions & 2 deletions services/construction/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ import (

"github.com/ethereum/go-ethereum"

"github.com/coinbase/rosetta-sdk-go/types"
"github.com/ethereum/go-ethereum/common"
"github.com/maticnetwork/polygon-rosetta/configuration"
"github.com/maticnetwork/polygon-rosetta/polygon"
svcErrors "github.com/maticnetwork/polygon-rosetta/services/errors"
"github.com/coinbase/rosetta-sdk-go/types"
"github.com/ethereum/go-ethereum/common"
)

// ConstructionMetadata implements the /construction/metadata endpoint.
Expand Down
4 changes: 2 additions & 2 deletions services/construction/metadata_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ import (
"github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/common/hexutil"

"github.com/coinbase/rosetta-sdk-go/types"
"github.com/ethereum/go-ethereum/common"
"github.com/maticnetwork/polygon-rosetta/configuration"
mocks "github.com/maticnetwork/polygon-rosetta/mocks/services"
"github.com/maticnetwork/polygon-rosetta/polygon"
"github.com/maticnetwork/polygon-rosetta/services/errors"
"github.com/coinbase/rosetta-sdk-go/types"
"github.com/ethereum/go-ethereum/common"
"github.com/stretchr/testify/assert"
)

Expand Down
4 changes: 2 additions & 2 deletions services/construction/payloads.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ import (
"errors"
"fmt"

"github.com/maticnetwork/polygon-rosetta/polygon"
svcErrors "github.com/maticnetwork/polygon-rosetta/services/errors"
"github.com/coinbase/rosetta-sdk-go/types"
"github.com/ethereum/go-ethereum/common"
ethTypes "github.com/ethereum/go-ethereum/core/types"
"github.com/maticnetwork/polygon-rosetta/polygon"
svcErrors "github.com/maticnetwork/polygon-rosetta/services/errors"
)

// ConstructionPayloads implements the /construction/payloads endpoint.
Expand Down
4 changes: 2 additions & 2 deletions services/construction/payloads_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ import (

svcErrors "github.com/maticnetwork/polygon-rosetta/services/errors"

"github.com/maticnetwork/polygon-rosetta/configuration"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/params"
"github.com/maticnetwork/polygon-rosetta/configuration"
"github.com/stretchr/testify/assert"

"github.com/maticnetwork/polygon-rosetta/polygon"
"github.com/coinbase/rosetta-sdk-go/types"
"github.com/maticnetwork/polygon-rosetta/polygon"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions services/construction/preprocess.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ import (
"math/big"
"reflect"

"github.com/maticnetwork/polygon-rosetta/polygon"
svcErrors "github.com/maticnetwork/polygon-rosetta/services/errors"
"github.com/coinbase/rosetta-sdk-go/parser"
"github.com/coinbase/rosetta-sdk-go/types"
"github.com/ethereum/go-ethereum/common"
"github.com/maticnetwork/polygon-rosetta/polygon"
svcErrors "github.com/maticnetwork/polygon-rosetta/services/errors"
)

// ConstructionPreprocess implements the /construction/preprocess
Expand Down
2 changes: 1 addition & 1 deletion services/construction/preprocess_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import (

"github.com/ethereum/go-ethereum/common/hexutil"

"github.com/coinbase/rosetta-sdk-go/types"
"github.com/maticnetwork/polygon-rosetta/polygon"
svcErrors "github.com/maticnetwork/polygon-rosetta/services/errors"
"github.com/coinbase/rosetta-sdk-go/types"
"github.com/stretchr/testify/assert"
)

Expand Down
4 changes: 2 additions & 2 deletions services/construction/submit.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ import (
"context"
"errors"

"github.com/maticnetwork/polygon-rosetta/configuration"
svcErrors "github.com/maticnetwork/polygon-rosetta/services/errors"
"github.com/coinbase/rosetta-sdk-go/types"
ethTypes "github.com/ethereum/go-ethereum/core/types"
"github.com/maticnetwork/polygon-rosetta/configuration"
svcErrors "github.com/maticnetwork/polygon-rosetta/services/errors"
)

// ConstructionSubmit implements the /construction/submit endpoint.
Expand Down
2 changes: 1 addition & 1 deletion services/construction/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import (
"errors"
"math/big"

"github.com/maticnetwork/polygon-rosetta/polygon"
"github.com/coinbase/rosetta-sdk-go/types"
"github.com/ethereum/go-ethereum/common"
"github.com/maticnetwork/polygon-rosetta/polygon"

"golang.org/x/crypto/sha3"
)
Expand Down

0 comments on commit 86d3ac7

Please sign in to comment.