Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: rename Go module as github.com/ava-labs/libevm #60

Merged
merged 3 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 5 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,18 @@ on:

jobs:
go_test_short:
env:
FLAKY_REGEX: 'ava-labs/libevm/(eth|eth/tracers/js|eth/tracers/logger|accounts/abi/bind|accounts/keystore|eth/downloader|miner|ethclient|ethclient/gethclient|eth/catalyst)$'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.21.4
- name: Run tests
- name: Run flaky tests sequentially
run: | # Upstream flakes are race conditions exacerbated by concurrent tests
FLAKY_REGEX='go-ethereum/(eth|eth/tracers/js|eth/tracers/logger|accounts/abi/bind|accounts/keystore|eth/downloader|miner|ethclient|ethclient/gethclient|eth/catalyst)$';
go list ./... | grep -P "${FLAKY_REGEX}" | xargs -n 1 go test -short;
- name: Run non-flaky tests concurrently
run: |
go test -short $(go list ./... | grep -Pv "${FLAKY_REGEX}");
11 changes: 7 additions & 4 deletions .github/workflows/libevm-delta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:

jobs:
diffs:
env:
# Last commit on `renamed-go-module` branch to be merged into `main`
LIBEVM_BASE: a7f08d0e757d5a69d3e269c69dcea7e45bab97e3
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -21,19 +24,19 @@ jobs:
git config color.diff.old "#DC3220";
git config color.diff.new "#005AB5";

- name: git diff libevm-base
- name: git diff {LIBEVM_BASE}
run: |
git diff --diff-filter=a --word-diff --unified=0 --color=always \
libevm-base \
"${LIBEVM_BASE}" \
':(exclude).golangci.yml' \
':(exclude).github/**' \
':(exclude)README.md';

- name: git diff libevm-base..main
- name: git diff {LIBEVM_BASE}..main
run: |
git checkout main --;
git diff --diff-filter=a --word-diff --unified=0 --color=always \
libevm-base \
"${LIBEVM_BASE}" \
':(exclude).golangci.yml' \
':(exclude).github/**' \
':(exclude)README.md';
4 changes: 3 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,14 @@ linters-settings:
gomodguard:
blocked:
modules:
- github.com/ethereum/go-ethereum:
- github.com/ava-labs/avalanchego:
- github.com/ava-labs/coreth:
- github.com/ava-labs/subnet-evm:
revive:
rules:
- name: unused-parameter
# Method parameters may be equired by interfaces and forcing them to be
# Method parameters may be required by interfaces and forcing them to be
# named _ is of questionable benefit.
disabled: true

Expand All @@ -84,6 +85,7 @@ issues:
- gci
- gofmt
- goheader
- goimports
- gosec
- gosimple
- govet
Expand Down
4 changes: 2 additions & 2 deletions accounts/abi/abi.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
"io"
"math/big"

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ava-labs/libevm/common"
"github.com/ava-labs/libevm/crypto"
)

// The ABI holds information about a contract's context and available
Expand Down
6 changes: 3 additions & 3 deletions accounts/abi/abi_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ import (
"strings"
"testing"

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/math"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ava-labs/libevm/common"
"github.com/ava-labs/libevm/common/math"
"github.com/ava-labs/libevm/crypto"
)

const jsondata = `
Expand Down
14 changes: 7 additions & 7 deletions accounts/abi/bind/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ import (
"io"
"math/big"

"github.com/ethereum/go-ethereum/accounts"
"github.com/ethereum/go-ethereum/accounts/external"
"github.com/ethereum/go-ethereum/accounts/keystore"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/log"
"github.com/ava-labs/libevm/accounts"
"github.com/ava-labs/libevm/accounts/external"
"github.com/ava-labs/libevm/accounts/keystore"
"github.com/ava-labs/libevm/common"
"github.com/ava-labs/libevm/core/types"
"github.com/ava-labs/libevm/crypto"
"github.com/ava-labs/libevm/log"
)

// ErrNoChainID is returned whenever the user failed to specify a chain id.
Expand Down
6 changes: 3 additions & 3 deletions accounts/abi/bind/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ import (
"errors"
"math/big"

"github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ava-labs/libevm"
"github.com/ava-labs/libevm/common"
"github.com/ava-labs/libevm/core/types"
)

var (
Expand Down
6 changes: 3 additions & 3 deletions accounts/abi/bind/backends/simulated.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ package backends
import (
"context"

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/ethclient/simulated"
"github.com/ava-labs/libevm/common"
"github.com/ava-labs/libevm/core/types"
"github.com/ava-labs/libevm/ethclient/simulated"
)

// SimulatedBackend is a simulated blockchain.
Expand Down
12 changes: 6 additions & 6 deletions accounts/abi/bind/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ import (
"strings"
"sync"

"github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/accounts/abi"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/event"
"github.com/ava-labs/libevm"
"github.com/ava-labs/libevm/accounts/abi"
"github.com/ava-labs/libevm/common"
"github.com/ava-labs/libevm/core/types"
"github.com/ava-labs/libevm/crypto"
"github.com/ava-labs/libevm/event"
)

const basefeeWiggleMultiplier = 2
Expand Down
16 changes: 8 additions & 8 deletions accounts/abi/bind/base_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ import (
"strings"
"testing"

"github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/accounts/abi"
"github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/rlp"
"github.com/ava-labs/libevm"
"github.com/ava-labs/libevm/accounts/abi"
"github.com/ava-labs/libevm/accounts/abi/bind"
"github.com/ava-labs/libevm/common"
"github.com/ava-labs/libevm/common/hexutil"
"github.com/ava-labs/libevm/core/types"
"github.com/ava-labs/libevm/crypto"
"github.com/ava-labs/libevm/rlp"
"github.com/stretchr/testify/assert"
)

Expand Down
4 changes: 2 additions & 2 deletions accounts/abi/bind/bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ import (
"text/template"
"unicode"

"github.com/ethereum/go-ethereum/accounts/abi"
"github.com/ethereum/go-ethereum/log"
"github.com/ava-labs/libevm/accounts/abi"
"github.com/ava-labs/libevm/log"
)

// Lang is a target programming language selector to generate bindings for.
Expand Down
236 changes: 118 additions & 118 deletions accounts/abi/bind/bind_test.go

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions accounts/abi/bind/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package bind

import "github.com/ethereum/go-ethereum/accounts/abi"
import "github.com/ava-labs/libevm/accounts/abi"

// tmplData is the data structure required to fill the binding template.
type tmplData struct {
Expand Down Expand Up @@ -91,12 +91,12 @@ import (
"strings"
"errors"
ethereum "github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/accounts/abi"
"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/event"
ethereum "github.com/ava-labs/libevm"
"github.com/ava-labs/libevm/accounts/abi"
"github.com/ava-labs/libevm/accounts/abi/bind"
"github.com/ava-labs/libevm/common"
"github.com/ava-labs/libevm/core/types"
"github.com/ava-labs/libevm/event"
)
// Reference imports to suppress errors if they are not otherwise used.
Expand Down
8 changes: 4 additions & 4 deletions accounts/abi/bind/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ import (
"errors"
"time"

"github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/log"
"github.com/ava-labs/libevm"
"github.com/ava-labs/libevm/common"
"github.com/ava-labs/libevm/core/types"
"github.com/ava-labs/libevm/log"
)

// WaitMined waits for tx to be mined on the blockchain.
Expand Down
12 changes: 6 additions & 6 deletions accounts/abi/bind/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ import (
"testing"
"time"

"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/simulated"
"github.com/ethereum/go-ethereum/params"
"github.com/ava-labs/libevm/accounts/abi/bind"
"github.com/ava-labs/libevm/common"
"github.com/ava-labs/libevm/core/types"
"github.com/ava-labs/libevm/crypto"
"github.com/ava-labs/libevm/ethclient/simulated"
"github.com/ava-labs/libevm/params"
)

var testKey, _ = crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291")
Expand Down
4 changes: 2 additions & 2 deletions accounts/abi/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"fmt"
"strings"

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ava-labs/libevm/common"
"github.com/ava-labs/libevm/crypto"
)

type Error struct {
Expand Down
4 changes: 2 additions & 2 deletions accounts/abi/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"fmt"
"strings"

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ava-labs/libevm/common"
"github.com/ava-labs/libevm/crypto"
)

// Event is an event potentially triggered by the EVM's LOG mechanism. The Event
Expand Down
4 changes: 2 additions & 2 deletions accounts/abi/event_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (
"strings"
"testing"

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ava-labs/libevm/common"
"github.com/ava-labs/libevm/crypto"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion accounts/abi/method.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"fmt"
"strings"

"github.com/ethereum/go-ethereum/crypto"
"github.com/ava-labs/libevm/crypto"
)

// FunctionType represents different types of functions a contract might have.
Expand Down
4 changes: 2 additions & 2 deletions accounts/abi/pack.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (
"math/big"
"reflect"

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/math"
"github.com/ava-labs/libevm/common"
"github.com/ava-labs/libevm/common/math"
)

// packBytesSlice packs the given bytes as [L, V] as the canonical representation
Expand Down
2 changes: 1 addition & 1 deletion accounts/abi/pack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"strings"
"testing"

"github.com/ethereum/go-ethereum/common"
"github.com/ava-labs/libevm/common"
)

// TestPack tests the general pack/unpack tests in packing_test.go
Expand Down
2 changes: 1 addition & 1 deletion accounts/abi/packing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package abi
import (
"math/big"

"github.com/ethereum/go-ethereum/common"
"github.com/ava-labs/libevm/common"
)

type packUnpackTest struct {
Expand Down
6 changes: 3 additions & 3 deletions accounts/abi/topics.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import (
"math/big"
"reflect"

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/math"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ava-labs/libevm/common"
"github.com/ava-labs/libevm/common/math"
"github.com/ava-labs/libevm/crypto"
)

// MakeTopics converts a filter query argument list into a filter topic set.
Expand Down
4 changes: 2 additions & 2 deletions accounts/abi/topics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (
"reflect"
"testing"

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ava-labs/libevm/common"
"github.com/ava-labs/libevm/crypto"
)

func TestMakeTopics(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion accounts/abi/type.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"unicode"
"unicode/utf8"

"github.com/ethereum/go-ethereum/common"
"github.com/ava-labs/libevm/common"
)

// Type enumerator
Expand Down
2 changes: 1 addition & 1 deletion accounts/abi/type_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"testing"

"github.com/davecgh/go-spew/spew"
"github.com/ethereum/go-ethereum/common"
"github.com/ava-labs/libevm/common"
)

// typeWithoutStringer is a alias for the Type type which simply doesn't implement
Expand Down
2 changes: 1 addition & 1 deletion accounts/abi/unpack.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"math/big"
"reflect"

"github.com/ethereum/go-ethereum/common"
"github.com/ava-labs/libevm/common"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion accounts/abi/unpack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"strings"
"testing"

"github.com/ethereum/go-ethereum/common"
"github.com/ava-labs/libevm/common"
"github.com/stretchr/testify/require"
)

Expand Down
Loading