Skip to content
This repository has been archived by the owner on Jun 9, 2024. It is now read-only.

Commit

Permalink
remove aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
Devon Bear committed Oct 31, 2023
1 parent aa1508e commit 0a92792
Show file tree
Hide file tree
Showing 94 changed files with 208 additions and 445 deletions.
4 changes: 2 additions & 2 deletions cosmos/config/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ import (

servertypes "github.com/cosmos/cosmos-sdk/server/types"

"pkg.berachain.dev/polaris/eth/common"
"pkg.berachain.dev/polaris/eth/common/hexutil"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
)

// baseTen is for the big.Int string conversation.
Expand Down
5 changes: 3 additions & 2 deletions cosmos/config/parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ import (
"testing"
"time"

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

"pkg.berachain.dev/polaris/cosmos/config/mocks"
"pkg.berachain.dev/polaris/eth/common"
"pkg.berachain.dev/polaris/eth/common/hexutil"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
Expand Down
2 changes: 1 addition & 1 deletion cosmos/lib/address.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ package lib
import (
"cosmossdk.io/core/address"

"pkg.berachain.dev/polaris/eth/common"
"github.com/ethereum/go-ethereum/common"
)

/* -------------------------------------------------------------------------- */
Expand Down
3 changes: 2 additions & 1 deletion cosmos/lib/address_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ import (
addresscodec "github.com/cosmos/cosmos-sdk/codec/address"
sdk "github.com/cosmos/cosmos-sdk/types"

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

cosmlib "pkg.berachain.dev/polaris/cosmos/lib"
"pkg.berachain.dev/polaris/eth/common"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
Expand Down
3 changes: 2 additions & 1 deletion cosmos/lib/ante/eject.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/auth/ante"

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

"pkg.berachain.dev/polaris/cosmos/x/evm/types"
"pkg.berachain.dev/polaris/eth/common"
"pkg.berachain.dev/polaris/lib/utils"
)

Expand Down
3 changes: 2 additions & 1 deletion cosmos/lib/conversions.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,12 @@ import (
v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"

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

libgenerated "pkg.berachain.dev/polaris/contracts/bindings/cosmos/lib"
"pkg.berachain.dev/polaris/contracts/bindings/cosmos/precompile/governance"
"pkg.berachain.dev/polaris/contracts/bindings/cosmos/precompile/staking"
"pkg.berachain.dev/polaris/cosmos/precompile"
"pkg.berachain.dev/polaris/eth/common"
"pkg.berachain.dev/polaris/lib/utils"
)

Expand Down
3 changes: 2 additions & 1 deletion cosmos/lib/evm.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ import (

sdk "github.com/cosmos/cosmos-sdk/types"

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

"pkg.berachain.dev/polaris/cosmos/x/evm/plugins/precompile"
"pkg.berachain.dev/polaris/eth/accounts/abi"
"pkg.berachain.dev/polaris/eth/common"
ethprecompile "pkg.berachain.dev/polaris/eth/core/precompile"
"pkg.berachain.dev/polaris/eth/core/vm"
"pkg.berachain.dev/polaris/lib/utils"
Expand Down
3 changes: 2 additions & 1 deletion cosmos/precompile/bank/bank.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ import (
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"

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

"pkg.berachain.dev/polaris/contracts/bindings/cosmos/lib"
bankgenerated "pkg.berachain.dev/polaris/contracts/bindings/cosmos/precompile/bank"
cosmlib "pkg.berachain.dev/polaris/cosmos/lib"
"pkg.berachain.dev/polaris/eth/common"
ethprecompile "pkg.berachain.dev/polaris/eth/core/precompile"
"pkg.berachain.dev/polaris/eth/core/vm"
)
Expand Down
3 changes: 2 additions & 1 deletion cosmos/precompile/bank/bank_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,13 @@ import (
bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"

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

"pkg.berachain.dev/polaris/cosmos/precompile"
"pkg.berachain.dev/polaris/cosmos/precompile/bank"
testutils "pkg.berachain.dev/polaris/cosmos/testutil"
pclog "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/precompile/log"
evmtypes "pkg.berachain.dev/polaris/cosmos/x/evm/types"
"pkg.berachain.dev/polaris/eth/common"
ethprecompile "pkg.berachain.dev/polaris/eth/core/precompile"
"pkg.berachain.dev/polaris/eth/core/vm"
"pkg.berachain.dev/polaris/lib/utils"
Expand Down
3 changes: 2 additions & 1 deletion cosmos/precompile/distribution/distribution.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
distributiontypes "github.com/cosmos/cosmos-sdk/x/distribution/types"

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

"pkg.berachain.dev/polaris/contracts/bindings/cosmos/lib"
generated "pkg.berachain.dev/polaris/contracts/bindings/cosmos/precompile/distribution"
cosmlib "pkg.berachain.dev/polaris/cosmos/lib"
"pkg.berachain.dev/polaris/cosmos/precompile/staking"
"pkg.berachain.dev/polaris/eth/common"
ethprecompile "pkg.berachain.dev/polaris/eth/core/precompile"
"pkg.berachain.dev/polaris/eth/core/vm"
)
Expand Down
3 changes: 2 additions & 1 deletion cosmos/precompile/governance/governance.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,12 @@ import (
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1"

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

cbindings "pkg.berachain.dev/polaris/contracts/bindings/cosmos/lib"
generated "pkg.berachain.dev/polaris/contracts/bindings/cosmos/precompile/governance"
cosmlib "pkg.berachain.dev/polaris/cosmos/lib"
"pkg.berachain.dev/polaris/cosmos/x/evm/plugins/precompile/log"
"pkg.berachain.dev/polaris/eth/common"
ethprecompile "pkg.berachain.dev/polaris/eth/core/precompile"
"pkg.berachain.dev/polaris/eth/core/vm"
)
Expand Down
3 changes: 2 additions & 1 deletion cosmos/precompile/governance/governance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@ import (
governancetypes "github.com/cosmos/cosmos-sdk/x/gov/types"
v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1"

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

cbindings "pkg.berachain.dev/polaris/contracts/bindings/cosmos/lib"
generated "pkg.berachain.dev/polaris/contracts/bindings/cosmos/precompile/governance"
testutils "pkg.berachain.dev/polaris/cosmos/testutil"
"pkg.berachain.dev/polaris/eth/common"
ethprecompile "pkg.berachain.dev/polaris/eth/core/precompile"
"pkg.berachain.dev/polaris/eth/core/vm"
"pkg.berachain.dev/polaris/lib/utils"
Expand Down
3 changes: 2 additions & 1 deletion cosmos/precompile/governance/testutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ import (
v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"

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

testutils "pkg.berachain.dev/polaris/cosmos/testutil"
"pkg.berachain.dev/polaris/eth/common"

//nolint:stylecheck,revive // Ginkgo is the testing framework.
. "github.com/onsi/ginkgo/v2"
Expand Down
3 changes: 2 additions & 1 deletion cosmos/precompile/staking/staking.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@ import (
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"

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

cbindings "pkg.berachain.dev/polaris/contracts/bindings/cosmos/lib"
generated "pkg.berachain.dev/polaris/contracts/bindings/cosmos/precompile/staking"
cosmlib "pkg.berachain.dev/polaris/cosmos/lib"
"pkg.berachain.dev/polaris/eth/common"
ethprecompile "pkg.berachain.dev/polaris/eth/core/precompile"
"pkg.berachain.dev/polaris/eth/core/vm"
)
Expand Down
3 changes: 2 additions & 1 deletion cosmos/precompile/staking/staking_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,13 @@ import (
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"

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

cbindings "pkg.berachain.dev/polaris/contracts/bindings/cosmos/lib"
generated "pkg.berachain.dev/polaris/contracts/bindings/cosmos/precompile/staking"
cosmlib "pkg.berachain.dev/polaris/cosmos/lib"
testutil "pkg.berachain.dev/polaris/cosmos/testutil"
"pkg.berachain.dev/polaris/eth/accounts/abi"
"pkg.berachain.dev/polaris/eth/common"
ethprecompile "pkg.berachain.dev/polaris/eth/core/precompile"
"pkg.berachain.dev/polaris/eth/core/vm"
"pkg.berachain.dev/polaris/eth/core/vm/mock"
Expand Down
2 changes: 1 addition & 1 deletion cosmos/runtime/logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ package runtime
import (
"cosmossdk.io/log"

ethlog "pkg.berachain.dev/polaris/eth/log"
ethlog "github.com/ethereum/go-ethereum/log"
)

// LoggerFuncHandler injects the cosmos-sdk logger into geth.
Expand Down
5 changes: 1 addition & 4 deletions cosmos/testutil/bank.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,13 @@ import (

sdk "github.com/cosmos/cosmos-sdk/types"

"pkg.berachain.dev/polaris/eth/common"
"github.com/ethereum/go-ethereum/common"
)

type BankKeeper interface {
SendCoinsFromModuleToAccount(ctx context.Context, senderModule string,
recipientAddr sdk.AccAddress, amt sdk.Coins) error
SendCoinsFromAccountToModule(ctx context.Context, senderAddr sdk.AccAddress,
recipientModule string, amt sdk.Coins) error
MintCoins(ctx context.Context, moduleName string, amt sdk.Coins) error
BurnCoins(ctx context.Context, moduleName string, amt sdk.Coins) error
}

// MintCoinsToAddress mints coins to a given address.
Expand Down
3 changes: 2 additions & 1 deletion cosmos/testutil/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ import (
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"

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

evmtypes "pkg.berachain.dev/polaris/cosmos/x/evm/types"
"pkg.berachain.dev/polaris/eth/common"
)

var (
Expand Down
6 changes: 3 additions & 3 deletions cosmos/x/evm/genesis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"

"github.com/ethereum/go-ethereum/consensus/beacon"
"github.com/ethereum/go-ethereum/params"

"pkg.berachain.dev/polaris/cosmos/config"
testutil "pkg.berachain.dev/polaris/cosmos/testutil"
Expand All @@ -38,7 +39,6 @@ import (
"pkg.berachain.dev/polaris/cosmos/x/evm/plugins/state"
"pkg.berachain.dev/polaris/eth/core"
ethprecompile "pkg.berachain.dev/polaris/eth/core/precompile"
"pkg.berachain.dev/polaris/eth/params"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
Expand Down Expand Up @@ -66,7 +66,7 @@ var _ = Describe("Genesis", func() {
ctx, ak, _, _ = testutil.SetupMinimalKeepers(log.NewTestLogger(GinkgoT()))
ctx = ctx.WithBlockHeight(0)
cfg := config.DefaultConfig()
ethGen.Config = params.DefaultChainConfig
ethGen.Config = core.DefaultChainConfig
cfg.Node.DataDir = GinkgoT().TempDir()
cfg.Node.KeyStoreDir = GinkgoT().TempDir()
k = keeper.NewKeeper(
Expand All @@ -83,7 +83,7 @@ var _ = Describe("Genesis", func() {
cfg,
)
err = k.Setup(
core.NewChain(k.Host, params.DefaultChainConfig, beacon.NewFaker()),
core.NewChain(k.Host, core.DefaultChainConfig, beacon.NewFaker()),
)
Expect(err).ToNot(HaveOccurred())

Expand Down
3 changes: 2 additions & 1 deletion cosmos/x/evm/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,13 @@ import (

sdk "github.com/cosmos/cosmos-sdk/types"

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

"pkg.berachain.dev/polaris/cosmos/config"
"pkg.berachain.dev/polaris/cosmos/x/evm/plugins/state"
"pkg.berachain.dev/polaris/cosmos/x/evm/types"
"pkg.berachain.dev/polaris/eth/core"
ethprecompile "pkg.berachain.dev/polaris/eth/core/precompile"
"pkg.berachain.dev/polaris/eth/params"
)

type Blockchain interface {
Expand Down
3 changes: 2 additions & 1 deletion cosmos/x/evm/plugins/block/header.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ import (
"fmt"
"math/big"

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

"pkg.berachain.dev/polaris/cosmos/x/evm/types"
"pkg.berachain.dev/polaris/eth/common"
"pkg.berachain.dev/polaris/eth/core"
coretypes "pkg.berachain.dev/polaris/eth/core/types"
errorslib "pkg.berachain.dev/polaris/lib/errors"
Expand Down
3 changes: 2 additions & 1 deletion cosmos/x/evm/plugins/block/header_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ import (

sdk "github.com/cosmos/cosmos-sdk/types"

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

testutil "pkg.berachain.dev/polaris/cosmos/testutil"
evmtypes "pkg.berachain.dev/polaris/cosmos/x/evm/types"
"pkg.berachain.dev/polaris/eth/common"
"pkg.berachain.dev/polaris/eth/core"
"pkg.berachain.dev/polaris/eth/core/types"
"pkg.berachain.dev/polaris/lib/utils"
Expand Down
2 changes: 1 addition & 1 deletion cosmos/x/evm/plugins/historical/historical_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ import (

sdk "github.com/cosmos/cosmos-sdk/types"

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

"pkg.berachain.dev/polaris/cosmos/x/evm/types"
"pkg.berachain.dev/polaris/eth/common"
"pkg.berachain.dev/polaris/eth/core"
coretypes "pkg.berachain.dev/polaris/eth/core/types"
errorslib "pkg.berachain.dev/polaris/lib/errors"
Expand Down
3 changes: 2 additions & 1 deletion cosmos/x/evm/plugins/historical/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ import (

sdk "github.com/cosmos/cosmos-sdk/types"

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

"pkg.berachain.dev/polaris/cosmos/x/evm/plugins"
"pkg.berachain.dev/polaris/eth/core"
"pkg.berachain.dev/polaris/eth/params"
)

// Plugin is the interface that must be implemented by the plugin.
Expand Down
5 changes: 2 additions & 3 deletions cosmos/x/evm/plugins/historical/plugin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,13 @@ import (

sdk "github.com/cosmos/cosmos-sdk/types"

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

testutil "pkg.berachain.dev/polaris/cosmos/testutil"
"pkg.berachain.dev/polaris/eth/common"
"pkg.berachain.dev/polaris/eth/core"
"pkg.berachain.dev/polaris/eth/core/mock"
coretypes "pkg.berachain.dev/polaris/eth/core/types"
"pkg.berachain.dev/polaris/eth/params"
"pkg.berachain.dev/polaris/lib/utils"

. "github.com/onsi/ginkgo/v2"
Expand All @@ -57,7 +56,7 @@ var _ = Describe("Historical Data", func() {
ctx = testutil.NewContext(log.NewTestLogger(GinkgoT())).WithBlockHeight(0)
bp := mock.NewBlockPluginMock()

p = utils.MustGetAs[*plugin](NewPlugin(params.DefaultChainConfig, bp, nil, testutil.EvmKey))
p = utils.MustGetAs[*plugin](NewPlugin(core.DefaultChainConfig, bp, nil, testutil.EvmKey))
Expect(p.InitGenesis(ctx, core.DefaultGenesis)).To(Succeed())
})

Expand Down
3 changes: 2 additions & 1 deletion cosmos/x/evm/plugins/precompile/log/attributes.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ import (
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"

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

cosmlib "pkg.berachain.dev/polaris/cosmos/lib"
"pkg.berachain.dev/polaris/eth/accounts/abi"
"pkg.berachain.dev/polaris/eth/common"
"pkg.berachain.dev/polaris/eth/core/precompile"
)

Expand Down
5 changes: 3 additions & 2 deletions cosmos/x/evm/plugins/precompile/log/factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,14 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"

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

cosmlib "pkg.berachain.dev/polaris/cosmos/lib"
testutil "pkg.berachain.dev/polaris/cosmos/testutil"
"pkg.berachain.dev/polaris/eth/accounts/abi"
"pkg.berachain.dev/polaris/eth/common"
"pkg.berachain.dev/polaris/eth/core/precompile"
"pkg.berachain.dev/polaris/eth/core/precompile/mock"
"pkg.berachain.dev/polaris/eth/crypto"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
Expand Down
3 changes: 2 additions & 1 deletion cosmos/x/evm/plugins/precompile/log/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@
package log

import (
"github.com/ethereum/go-ethereum/common"

"pkg.berachain.dev/polaris/eth/accounts/abi"
"pkg.berachain.dev/polaris/eth/common"
libtypes "pkg.berachain.dev/polaris/lib/types"
)

Expand Down
Loading

0 comments on commit 0a92792

Please sign in to comment.