Skip to content

Commit 8e744a9

Browse files
Darioush JalaliARR4N
andauthored
use libevm: params, core/vm, eth/tracers/* + some of core/types (#1380)
* format: as coreth * use libevm: params, core/vm, eth/tracers/* + some of core/types (#662) Co-authored-by: Arran Schlosberg <[email protected]> * format: as subnet-evm * fix coreth formatting * fix mocks * fix contract deployer allowlist * nits * nits * nit * fix test import loop * fix imports * nits * fix * add TODO --------- Co-authored-by: Arran Schlosberg <[email protected]>
1 parent b5836b0 commit 8e744a9

File tree

339 files changed

+1754
-39818
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

339 files changed

+1754
-39818
lines changed

accounts/abi/bind/auth.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ import (
3333
"io"
3434
"math/big"
3535

36-
"github.com/ava-labs/subnet-evm/accounts"
37-
"github.com/ava-labs/subnet-evm/accounts/external"
38-
"github.com/ava-labs/subnet-evm/accounts/keystore"
3936
"github.com/ava-labs/subnet-evm/core/types"
37+
"github.com/ethereum/go-ethereum/accounts"
38+
"github.com/ethereum/go-ethereum/accounts/external"
39+
"github.com/ethereum/go-ethereum/accounts/keystore"
4040
"github.com/ethereum/go-ethereum/common"
4141
"github.com/ethereum/go-ethereum/crypto"
4242
"github.com/ethereum/go-ethereum/log"

accounts/abi/bind/bind_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2179,6 +2179,11 @@ func golangBindings(t *testing.T, overload bool) {
21792179
if out, err := replacer.CombinedOutput(); err != nil {
21802180
t.Fatalf("failed to replace binding test dependency to current source tree: %v\n%s", err, out)
21812181
}
2182+
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]")
2183+
replacer.Dir = pkg
2184+
if out, err := replacer.CombinedOutput(); err != nil {
2185+
t.Fatalf("failed to replace binding test dependency to current source tree: %v\n%s", err, out)
2186+
}
21822187
tidier := exec.Command(gocmd, "mod", "tidy", "-compat=1.22")
21832188
tidier.Dir = pkg
21842189
if out, err := tidier.CombinedOutput(); err != nil {

accounts/abi/bind/precompilebind/precompile_bind_test.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ var bindTests = []struct {
452452
`"github.com/stretchr/testify/require"
453453
"math/big"
454454
"github.com/ethereum/go-ethereum/common"
455-
"github.com/ava-labs/subnet-evm/core/state"
455+
"github.com/ava-labs/subnet-evm/core/extstate"
456456
"github.com/ava-labs/subnet-evm/precompile/allowlist"
457457
`,
458458
`
@@ -466,7 +466,7 @@ var bindTests = []struct {
466466
require.Equal(t, testGreeting, unpackedGreeting)
467467
468468
// test that the allow list is generated correctly
469-
stateDB := state.NewTestStateDB(t)
469+
stateDB := extstate.NewTestStateDB(t)
470470
address := common.BigToAddress(big.NewInt(1))
471471
SetHelloWorldAllowListStatus(stateDB, address, allowlist.EnabledRole)
472472
role := GetHelloWorldAllowListStatus(stateDB, address)
@@ -695,6 +695,11 @@ func TestPrecompileBind(t *testing.T) {
695695
if out, err := replacer.CombinedOutput(); err != nil {
696696
t.Fatalf("failed to replace binding test dependency to current source tree: %v\n%s", err, out)
697697
}
698+
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]")
699+
replacer.Dir = pkg
700+
if out, err := replacer.CombinedOutput(); err != nil {
701+
t.Fatalf("failed to replace binding test dependency to current source tree: %v\n%s", err, out)
702+
}
698703
tidier := exec.Command(gocmd, "mod", "tidy", "-compat=1.22")
699704
tidier.Dir = pkg
700705
if out, err := tidier.CombinedOutput(); err != nil {

accounts/abi/bind/precompilebind/precompile_contract_test_template.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
"testing"
1515
"math/big"
1616
17-
"github.com/ava-labs/subnet-evm/core/state"
17+
"github.com/ava-labs/subnet-evm/core/extstate"
1818
{{- if .Contract.AllowList}}
1919
"github.com/ava-labs/subnet-evm/precompile/allowlist"
2020
{{- end}}
@@ -187,12 +187,12 @@ func Test{{.Contract.Type}}Run(t *testing.T) {
187187
// and runs them all together.
188188
// Even if you don't add any custom tests, keep this. This will still
189189
// run the default allowlist tests.
190-
allowlist.RunPrecompileWithAllowListTests(t, Module, state.NewTestStateDB, tests)
190+
allowlist.RunPrecompileWithAllowListTests(t, Module, extstate.NewTestStateDB, tests)
191191
{{- else}}
192192
// Run tests.
193193
for name, test := range tests {
194194
t.Run(name, func(t *testing.T) {
195-
test.Run(t, Module, state.NewTestStateDB(t))
195+
test.Run(t, Module, extstate.NewTestStateDB(t))
196196
})
197197
}
198198
{{- end}}
@@ -247,12 +247,12 @@ func Benchmark{{.Contract.Type}}(b *testing.B) {
247247
// and benchmarks them all together.
248248
// Even if you don't add any custom tests, keep this. This will still
249249
// run the default allowlist tests.
250-
allowlist.BenchPrecompileWithAllowList(b, Module, state.NewTestStateDB, tests)
250+
allowlist.BenchPrecompileWithAllowList(b, Module, extstate.NewTestStateDB, tests)
251251
{{- else}}
252252
// Benchmark tests.
253253
for name, test := range tests {
254254
b.Run(name, func(b *testing.B) {
255-
test.Bench(b, Module, state.NewTestStateDB(b))
255+
test.Bench(b, Module, extstate.NewTestStateDB(b))
256256
})
257257
}
258258
{{- end}}

accounts/accounts.go

Lines changed: 0 additions & 236 deletions
This file was deleted.

accounts/accounts_test.go

Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
 (0)