Skip to content

Commit

Permalink
Use Ethernal-Tech ethgo dependency (#298)
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan-Ethernal authored Jun 28, 2024
1 parent 5a13f76 commit 3ac3c9d
Show file tree
Hide file tree
Showing 88 changed files with 214 additions and 192 deletions.
2 changes: 1 addition & 1 deletion chain/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"math/big"
"os"

"github.com/Ethernal-Tech/ethgo"
"github.com/hashicorp/go-multierror"
"github.com/umbracle/ethgo"

"github.com/0xPolygon/polygon-edge/helper/common"
"github.com/0xPolygon/polygon-edge/helper/hex"
Expand Down
2 changes: 1 addition & 1 deletion command/bridge/common/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"strings"
"time"

"github.com/Ethernal-Tech/ethgo"
"github.com/spf13/cobra"
"github.com/umbracle/ethgo"

cmdHelper "github.com/0xPolygon/polygon-edge/command/helper"
"github.com/0xPolygon/polygon-edge/consensus/polybft/contractsapi"
Expand Down
2 changes: 1 addition & 1 deletion command/bridge/deploy/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"sync"

"github.com/0xPolygon/polygon-edge/jsonrpc"
"github.com/Ethernal-Tech/ethgo"
"github.com/spf13/cobra"
"github.com/umbracle/ethgo"
"golang.org/x/sync/errgroup"

"github.com/0xPolygon/polygon-edge/chain"
Expand Down
4 changes: 2 additions & 2 deletions command/bridge/deploy/deploy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"testing"

"github.com/0xPolygon/polygon-edge/jsonrpc"
"github.com/Ethernal-Tech/ethgo"
"github.com/Ethernal-Tech/ethgo/testutil"
"github.com/stretchr/testify/require"
"github.com/umbracle/ethgo"
"github.com/umbracle/ethgo/testutil"

"github.com/0xPolygon/polygon-edge/command"
"github.com/0xPolygon/polygon-edge/command/bridge/helper"
Expand Down
2 changes: 1 addition & 1 deletion command/bridge/deploy/result.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/0xPolygon/polygon-edge/command/helper"
"github.com/0xPolygon/polygon-edge/types"
"github.com/umbracle/ethgo"
"github.com/Ethernal-Tech/ethgo"
)

type deployContractResult struct {
Expand Down
2 changes: 1 addition & 1 deletion command/bridge/deposit/erc20/deposit_erc20.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"math/big"

"github.com/Ethernal-Tech/ethgo"
"github.com/spf13/cobra"
"github.com/umbracle/ethgo"
"golang.org/x/sync/errgroup"

"github.com/0xPolygon/polygon-edge/command"
Expand Down
2 changes: 1 addition & 1 deletion command/bridge/finalize/finalize.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import (
"github.com/0xPolygon/polygon-edge/helper/hex"
"github.com/0xPolygon/polygon-edge/txrelayer"
"github.com/0xPolygon/polygon-edge/types"
"github.com/Ethernal-Tech/ethgo"
"github.com/spf13/cobra"
"github.com/umbracle/ethgo"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion command/bridge/fund/fund.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package fund
import (
"fmt"

"github.com/Ethernal-Tech/ethgo"
"github.com/spf13/cobra"
"github.com/umbracle/ethgo"
"golang.org/x/sync/errgroup"

"github.com/0xPolygon/polygon-edge/command"
Expand Down
2 changes: 1 addition & 1 deletion command/bridge/helper/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"fmt"
"math/big"

"github.com/Ethernal-Tech/ethgo"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/client"
"github.com/umbracle/ethgo"

polybftsecrets "github.com/0xPolygon/polygon-edge/command/secrets/init"
"github.com/0xPolygon/polygon-edge/consensus/polybft"
Expand Down
2 changes: 1 addition & 1 deletion command/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package command
import (
"fmt"

"github.com/umbracle/ethgo"
"github.com/Ethernal-Tech/ethgo"

"github.com/0xPolygon/polygon-edge/chain"
"github.com/0xPolygon/polygon-edge/server"
Expand Down
2 changes: 1 addition & 1 deletion command/genesis/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"testing"

"github.com/Ethernal-Tech/ethgo"
"github.com/stretchr/testify/require"
"github.com/umbracle/ethgo"

"github.com/0xPolygon/polygon-edge/command"
"github.com/0xPolygon/polygon-edge/command/helper"
Expand Down
2 changes: 1 addition & 1 deletion command/regenesis/get_root.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package regenesis
import (
"fmt"

"github.com/Ethernal-Tech/ethgo"
"github.com/spf13/cobra"
"github.com/umbracle/ethgo"

"github.com/0xPolygon/polygon-edge/command"
"github.com/0xPolygon/polygon-edge/jsonrpc"
Expand Down
2 changes: 1 addition & 1 deletion command/validator/registration/register_validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
"github.com/0xPolygon/polygon-edge/contracts"
"github.com/0xPolygon/polygon-edge/txrelayer"
"github.com/0xPolygon/polygon-edge/types"
"github.com/Ethernal-Tech/ethgo"
"github.com/spf13/cobra"
"github.com/umbracle/ethgo"
)

var params registerParams
Expand Down
2 changes: 1 addition & 1 deletion consensus/polybft/block_builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import (
"github.com/0xPolygon/polygon-edge/state"
itrie "github.com/0xPolygon/polygon-edge/state/immutable-trie"
"github.com/0xPolygon/polygon-edge/types"
"github.com/Ethernal-Tech/ethgo"
"github.com/hashicorp/go-hclog"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/umbracle/ethgo"
)

func TestBlockBuilder_BuildBlockTxOneFailedTxAndOneTakesTooMuchGas(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions consensus/polybft/blockchain_wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"github.com/0xPolygon/polygon-edge/contracts"
"github.com/0xPolygon/polygon-edge/state"
"github.com/0xPolygon/polygon-edge/types"
"github.com/umbracle/ethgo"
"github.com/umbracle/ethgo/contract"
"github.com/Ethernal-Tech/ethgo"
"github.com/Ethernal-Tech/ethgo/contract"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion consensus/polybft/bridge_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"github.com/0xPolygon/polygon-edge/types"
"github.com/Ethernal-Tech/blockchain-event-tracker/store"
"github.com/Ethernal-Tech/blockchain-event-tracker/tracker"
"github.com/Ethernal-Tech/ethgo"
"github.com/hashicorp/go-hclog"
"github.com/umbracle/ethgo"
bolt "go.etcd.io/bbolt"
)

Expand Down
2 changes: 1 addition & 1 deletion consensus/polybft/checkpoint_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import (
"github.com/0xPolygon/polygon-edge/helper/hex"
"github.com/0xPolygon/polygon-edge/txrelayer"
"github.com/0xPolygon/polygon-edge/types"
"github.com/Ethernal-Tech/ethgo"
merkle "github.com/Ethernal-Tech/merkle-tree"
hclog "github.com/hashicorp/go-hclog"
"github.com/umbracle/ethgo"
bolt "go.etcd.io/bbolt"
)

Expand Down
2 changes: 1 addition & 1 deletion consensus/polybft/checkpoint_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ import (
"github.com/0xPolygon/polygon-edge/consensus/polybft/contractsapi"
"github.com/0xPolygon/polygon-edge/consensus/polybft/signer"
"github.com/0xPolygon/polygon-edge/crypto"
"github.com/Ethernal-Tech/ethgo"
merkle "github.com/Ethernal-Tech/merkle-tree"
hclog "github.com/hashicorp/go-hclog"
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"
"github.com/umbracle/ethgo"

"github.com/0xPolygon/polygon-edge/bls"
"github.com/0xPolygon/polygon-edge/consensus/polybft/bitmap"
Expand Down
2 changes: 1 addition & 1 deletion consensus/polybft/contracts_initializer.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/0xPolygon/polygon-edge/helper/hex"
"github.com/0xPolygon/polygon-edge/state"
"github.com/0xPolygon/polygon-edge/types"
"github.com/umbracle/ethgo/abi"
"github.com/Ethernal-Tech/ethgo/abi"
)

const (
Expand Down
6 changes: 3 additions & 3 deletions consensus/polybft/contractsapi/bindings-gen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"strings"
"text/template"

"github.com/umbracle/ethgo/abi"
"github.com/Ethernal-Tech/ethgo/abi"

gensc "github.com/0xPolygon/polygon-edge/consensus/polybft/contractsapi"
"github.com/0xPolygon/polygon-edge/contracts"
Expand Down Expand Up @@ -531,8 +531,8 @@ import (
"math/big"
"github.com/0xPolygon/polygon-edge/types"
"github.com/umbracle/ethgo/abi"
"github.com/umbracle/ethgo"
"github.com/Ethernal-Tech/ethgo/abi"
"github.com/Ethernal-Tech/ethgo"
)
`
Expand Down
4 changes: 2 additions & 2 deletions consensus/polybft/contractsapi/contractsapi.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions consensus/polybft/contractsapi/contractsapi_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"github.com/0xPolygon/polygon-edge/contracts"
"github.com/0xPolygon/polygon-edge/helper/common"
"github.com/0xPolygon/polygon-edge/types"
"github.com/Ethernal-Tech/ethgo"
"github.com/Ethernal-Tech/ethgo/abi"
"github.com/stretchr/testify/require"
"github.com/umbracle/ethgo"
"github.com/umbracle/ethgo/abi"
)

type method interface {
Expand Down
4 changes: 2 additions & 2 deletions consensus/polybft/contractsapi/decoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"math/big"
"reflect"

"github.com/Ethernal-Tech/ethgo"
"github.com/Ethernal-Tech/ethgo/abi"
"github.com/mitchellh/mapstructure"
"github.com/umbracle/ethgo"
"github.com/umbracle/ethgo/abi"
)

const abiMethodIDLength = 4
Expand Down
4 changes: 2 additions & 2 deletions consensus/polybft/contractsapi/helper.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package contractsapi

import (
"github.com/umbracle/ethgo"
"github.com/umbracle/ethgo/abi"
"github.com/Ethernal-Tech/ethgo"
"github.com/Ethernal-Tech/ethgo/abi"
)

// StateTransactionInput is an abstraction for different state transaction inputs
Expand Down
2 changes: 1 addition & 1 deletion consensus/polybft/exit_relayer.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"github.com/0xPolygon/polygon-edge/crypto"
"github.com/0xPolygon/polygon-edge/txrelayer"
"github.com/0xPolygon/polygon-edge/types"
"github.com/Ethernal-Tech/ethgo"
"github.com/hashicorp/go-hclog"
"github.com/umbracle/ethgo"
)

var errUnknownExitEvent = errors.New("unknown event from exit helper or checkpoint manager")
Expand Down
4 changes: 2 additions & 2 deletions consensus/polybft/exit_relayer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import (
"github.com/0xPolygon/polygon-edge/consensus/polybft/contractsapi"
"github.com/0xPolygon/polygon-edge/helper/common"
"github.com/0xPolygon/polygon-edge/types"
"github.com/Ethernal-Tech/ethgo"
"github.com/Ethernal-Tech/ethgo/abi"
"github.com/hashicorp/go-hclog"
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"
"github.com/umbracle/ethgo"
"github.com/umbracle/ethgo/abi"
)

func TestExitRelayer_FullWorkflow(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion consensus/polybft/extra.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"github.com/0xPolygon/polygon-edge/consensus/polybft/validator"
"github.com/0xPolygon/polygon-edge/crypto"
"github.com/0xPolygon/polygon-edge/types"
"github.com/Ethernal-Tech/ethgo/abi"
"github.com/hashicorp/go-hclog"
"github.com/umbracle/ethgo/abi"
"github.com/umbracle/fastrlp"
)

Expand Down
4 changes: 2 additions & 2 deletions consensus/polybft/governance_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"math/big"
"time"

"github.com/Ethernal-Tech/ethgo"
"github.com/Ethernal-Tech/ethgo/abi"
"github.com/hashicorp/go-hclog"
"github.com/umbracle/ethgo"
"github.com/umbracle/ethgo/abi"
bolt "go.etcd.io/bbolt"

"github.com/0xPolygon/polygon-edge/chain"
Expand Down
4 changes: 2 additions & 2 deletions consensus/polybft/mocks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import (
"github.com/0xPolygon/polygon-edge/state"
"github.com/0xPolygon/polygon-edge/syncer"
"github.com/0xPolygon/polygon-edge/types"
"github.com/Ethernal-Tech/ethgo"
"github.com/Ethernal-Tech/ethgo/contract"
"github.com/hashicorp/go-hclog"
"github.com/stretchr/testify/mock"
"github.com/umbracle/ethgo"
"github.com/umbracle/ethgo/contract"
bolt "go.etcd.io/bbolt"
)

Expand Down
2 changes: 1 addition & 1 deletion consensus/polybft/polybft_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ import (
"github.com/0xPolygon/polygon-edge/helper/progress"
"github.com/0xPolygon/polygon-edge/txpool"
"github.com/0xPolygon/polygon-edge/types"
"github.com/Ethernal-Tech/ethgo"
"github.com/hashicorp/go-hclog"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"
"github.com/umbracle/ethgo"
)

// the test initializes polybft and chain mock (map of headers) after which a new header is verified
Expand Down
4 changes: 2 additions & 2 deletions consensus/polybft/sc_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"testing"
"time"

"github.com/Ethernal-Tech/ethgo"
"github.com/Ethernal-Tech/ethgo/abi"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/umbracle/ethgo"
"github.com/umbracle/ethgo/abi"

"github.com/0xPolygon/polygon-edge/bls"
"github.com/0xPolygon/polygon-edge/chain"
Expand Down
2 changes: 1 addition & 1 deletion consensus/polybft/signer/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"bytes"
"math/big"

"github.com/umbracle/ethgo/abi"
"github.com/Ethernal-Tech/ethgo/abi"

"github.com/0xPolygon/polygon-edge/bls"
"github.com/0xPolygon/polygon-edge/crypto"
Expand Down
6 changes: 3 additions & 3 deletions consensus/polybft/stake_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ import (
"github.com/0xPolygon/polygon-edge/consensus/polybft/validator"
"github.com/0xPolygon/polygon-edge/helper/hex"
"github.com/0xPolygon/polygon-edge/types"
"github.com/Ethernal-Tech/ethgo"
"github.com/Ethernal-Tech/ethgo/abi"
"github.com/Ethernal-Tech/ethgo/contract"
"github.com/hashicorp/go-hclog"
"github.com/umbracle/ethgo"
"github.com/umbracle/ethgo/abi"
"github.com/umbracle/ethgo/contract"
bolt "go.etcd.io/bbolt"
)

Expand Down
4 changes: 2 additions & 2 deletions consensus/polybft/stake_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import (
"github.com/0xPolygon/polygon-edge/jsonrpc"
"github.com/0xPolygon/polygon-edge/txrelayer"
"github.com/0xPolygon/polygon-edge/types"
"github.com/Ethernal-Tech/ethgo"
"github.com/Ethernal-Tech/ethgo/abi"
"github.com/hashicorp/go-hclog"
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"
"github.com/umbracle/ethgo"
"github.com/umbracle/ethgo/abi"
)

func TestStakeManager_PostBlock(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion consensus/polybft/state_event_getter.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package polybft
import (
"github.com/0xPolygon/polygon-edge/blockchain"
"github.com/0xPolygon/polygon-edge/types"
"github.com/umbracle/ethgo"
"github.com/Ethernal-Tech/ethgo"
bolt "go.etcd.io/bbolt"
)

Expand Down
Loading

0 comments on commit 3ac3c9d

Please sign in to comment.