Skip to content

Commit e48f1ad

Browse files
committed
refactor: replace golang.org/x/exp with stdlib
Signed-off-by: TechVest <[email protected]>
1 parent 8f2d718 commit e48f1ad

16 files changed

+19
-20
lines changed

chain/test_chain.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package chain
33
import (
44
"errors"
55
"fmt"
6+
"maps"
67
"math/big"
78

89
"github.com/crytic/medusa/chain/state"
@@ -14,7 +15,6 @@ import (
1415
"github.com/ethereum/go-ethereum/triedb"
1516
"github.com/ethereum/go-ethereum/triedb/hashdb"
1617
"github.com/holiman/uint256"
17-
"golang.org/x/exp/maps"
1818

1919
"github.com/crytic/medusa/chain/types"
2020
"github.com/crytic/medusa/chain/vendored"

chain/test_chain_tracer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ package chain
22

33
import (
44
"math/big"
5+
"slices"
56

67
"github.com/crytic/medusa/chain/types"
78
"github.com/ethereum/go-ethereum/common"
89
"github.com/ethereum/go-ethereum/core/tracing"
910
coretypes "github.com/ethereum/go-ethereum/core/types"
1011
"github.com/ethereum/go-ethereum/core/vm"
1112
"github.com/ethereum/go-ethereum/eth/tracers"
12-
"golang.org/x/exp/slices"
1313
)
1414

1515
// TestChainTracer is an extended tracers.Tracer which can be used with a TestChain to store any captured

cmd/completion.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ package cmd
22

33
import (
44
"fmt"
5-
"golang.org/x/exp/slices"
65
"os"
6+
"strslicesings"
77
"strings"
88

99
"github.com/spf13/cobra"

compilation/types/compiled_contract.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import (
44
"bytes"
55
"encoding/json"
66
"fmt"
7+
"slices"
78
"strings"
89

910
"github.com/ethereum/go-ethereum/accounts/abi"
10-
"golang.org/x/exp/slices"
1111
)
1212

1313
// CompiledContract represents a single contract unit from a smart contract compilation.

fuzzing/calls/call_message.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ package calls
22

33
import (
44
"math/big"
5+
"slices"
56

67
"github.com/crytic/medusa/chain"
78
"github.com/crytic/medusa/logging"
89
"github.com/ethereum/go-ethereum/common"
910
"github.com/ethereum/go-ethereum/common/hexutil"
1011
"github.com/ethereum/go-ethereum/core"
1112
coreTypes "github.com/ethereum/go-ethereum/core/types"
12-
"golang.org/x/exp/slices"
1313
)
1414

1515
// The following directives will be picked up by the `go generate` command to generate JSON marshaling code from

fuzzing/contracts/contract.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package contracts
22

33
import (
4-
"golang.org/x/exp/slices"
4+
"slices"
55
"strings"
66

77
"github.com/crytic/medusa/compilation/types"

fuzzing/coverage/coverage_maps.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
package coverage
22

33
import (
4-
"golang.org/x/exp/slices"
5-
4+
"syslicesnc"
65
"sync"
76

87
compilationTypes "github.com/crytic/medusa/compilation/types"

fuzzing/coverage/source_analysis.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import (
44
"bytes"
55
"encoding/json"
66
"fmt"
7+
"maps"
78
"sort"
89

910
"github.com/crytic/medusa/compilation/types"
10-
"golang.org/x/exp/maps"
1111
)
1212

1313
// SourceAnalysis describes source code coverage across a list of compilations, after analyzing associated CoverageMaps.

fuzzing/executiontracer/execution_tracer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package executiontracer
22

33
import (
44
"math/big"
5+
"slices"
56

67
"github.com/crytic/medusa/chain"
78
"github.com/crytic/medusa/chain/types"
@@ -14,7 +15,6 @@ import (
1415

1516
"github.com/ethereum/go-ethereum/core/vm"
1617
"github.com/ethereum/go-ethereum/eth/tracers"
17-
"golang.org/x/exp/slices"
1818
)
1919

2020
// CallWithExecutionTrace obtains an execution trace for a given call, on the provided chain, using the state

fuzzing/fuzzer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
"os"
1010
"path/filepath"
1111
"runtime"
12+
"slices"
1213
"sort"
1314
"strconv"
1415
"strings"
@@ -38,7 +39,6 @@ import (
3839
"github.com/crytic/medusa/utils"
3940
"github.com/ethereum/go-ethereum/accounts/abi"
4041
"github.com/ethereum/go-ethereum/common"
41-
"golang.org/x/exp/slices"
4242
)
4343

4444
// Fuzzer represents an Ethereum smart contract fuzzing provider.

0 commit comments

Comments
 (0)