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

use libevm: params, core/vm, eth/tracers/* + some of core/types #1380

Open
wants to merge 13 commits into
base: libevm
Choose a base branch
from
Open
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
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions accounts/abi/bind/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ import (
"io"
"math/big"

"github.com/ava-labs/subnet-evm/accounts"
"github.com/ava-labs/subnet-evm/accounts/external"
"github.com/ava-labs/subnet-evm/accounts/keystore"
"github.com/ava-labs/subnet-evm/core/types"
"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/crypto"
"github.com/ethereum/go-ethereum/log"
Expand Down
5 changes: 5 additions & 0 deletions accounts/abi/bind/bind_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2179,6 +2179,11 @@ func golangBindings(t *testing.T, overload bool) {
if out, err := replacer.CombinedOutput(); err != nil {
t.Fatalf("failed to replace binding test dependency to current source tree: %v\n%s", err, out)
}
replacer = exec.Command(gocmd, "mod", "edit", "-x", "-require", "github.com/ethereum/[email protected]", "-replace", "github.com/ethereum/go-ethereum=github.com/ava-labs/[email protected]")
replacer.Dir = pkg
if out, err := replacer.CombinedOutput(); err != nil {
t.Fatalf("failed to replace binding test dependency to current source tree: %v\n%s", err, out)
}
tidier := exec.Command(gocmd, "mod", "tidy", "-compat=1.22")
tidier.Dir = pkg
if out, err := tidier.CombinedOutput(); err != nil {
Expand Down
9 changes: 7 additions & 2 deletions accounts/abi/bind/precompilebind/precompile_bind_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ var bindTests = []struct {
`"github.com/stretchr/testify/require"
"math/big"
"github.com/ethereum/go-ethereum/common"
"github.com/ava-labs/subnet-evm/core/state"
"github.com/ava-labs/subnet-evm/core/extstate"
"github.com/ava-labs/subnet-evm/precompile/allowlist"
`,
`
Expand All @@ -466,7 +466,7 @@ var bindTests = []struct {
require.Equal(t, testGreeting, unpackedGreeting)

// test that the allow list is generated correctly
stateDB := state.NewTestStateDB(t)
stateDB := extstate.NewTestStateDB(t)
address := common.BigToAddress(big.NewInt(1))
SetHelloWorldAllowListStatus(stateDB, address, allowlist.EnabledRole)
role := GetHelloWorldAllowListStatus(stateDB, address)
Expand Down Expand Up @@ -695,6 +695,11 @@ func TestPrecompileBind(t *testing.T) {
if out, err := replacer.CombinedOutput(); err != nil {
t.Fatalf("failed to replace binding test dependency to current source tree: %v\n%s", err, out)
}
replacer = exec.Command(gocmd, "mod", "edit", "-x", "-require", "github.com/ethereum/[email protected]", "-replace", "github.com/ethereum/go-ethereum=github.com/ava-labs/[email protected]")
replacer.Dir = pkg
if out, err := replacer.CombinedOutput(); err != nil {
t.Fatalf("failed to replace binding test dependency to current source tree: %v\n%s", err, out)
}
tidier := exec.Command(gocmd, "mod", "tidy", "-compat=1.22")
tidier.Dir = pkg
if out, err := tidier.CombinedOutput(); err != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"testing"
"math/big"

"github.com/ava-labs/subnet-evm/core/state"
"github.com/ava-labs/subnet-evm/core/extstate"
{{- if .Contract.AllowList}}
"github.com/ava-labs/subnet-evm/precompile/allowlist"
{{- end}}
Expand Down Expand Up @@ -187,12 +187,12 @@ func Test{{.Contract.Type}}Run(t *testing.T) {
// and runs them all together.
// Even if you don't add any custom tests, keep this. This will still
// run the default allowlist tests.
allowlist.RunPrecompileWithAllowListTests(t, Module, state.NewTestStateDB, tests)
allowlist.RunPrecompileWithAllowListTests(t, Module, extstate.NewTestStateDB, tests)
{{- else}}
// Run tests.
for name, test := range tests {
t.Run(name, func(t *testing.T) {
test.Run(t, Module, state.NewTestStateDB(t))
test.Run(t, Module, extstate.NewTestStateDB(t))
})
}
{{- end}}
Expand Down Expand Up @@ -247,12 +247,12 @@ func Benchmark{{.Contract.Type}}(b *testing.B) {
// and benchmarks them all together.
// Even if you don't add any custom tests, keep this. This will still
// run the default allowlist tests.
allowlist.BenchPrecompileWithAllowList(b, Module, state.NewTestStateDB, tests)
allowlist.BenchPrecompileWithAllowList(b, Module, extstate.NewTestStateDB, tests)
{{- else}}
// Benchmark tests.
for name, test := range tests {
b.Run(name, func(b *testing.B) {
test.Bench(b, Module, state.NewTestStateDB(b))
test.Bench(b, Module, extstate.NewTestStateDB(b))
})
}
{{- end}}
Expand Down
236 changes: 0 additions & 236 deletions accounts/accounts.go

This file was deleted.

43 changes: 0 additions & 43 deletions accounts/accounts_test.go

This file was deleted.

Loading
Loading