@@ -7,10 +7,10 @@ import (
7
7
"github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/polygondatacommittee"
8
8
"github.com/0xPolygonHermez/zkevm-node/log"
9
9
"github.com/ethereum/go-ethereum/accounts/abi/bind"
10
- "github.com/ethereum/go-ethereum/accounts/abi/bind/backends"
11
10
"github.com/ethereum/go-ethereum/common"
12
11
"github.com/ethereum/go-ethereum/core"
13
12
"github.com/ethereum/go-ethereum/crypto"
13
+ "github.com/ethereum/go-ethereum/ethclient/simulated"
14
14
"github.com/stretchr/testify/assert"
15
15
"github.com/stretchr/testify/require"
16
16
)
@@ -63,7 +63,7 @@ func init() {
63
63
// This function prepare the blockchain, the wallet with funds and deploy the smc
64
64
func newTestingEnv (t * testing.T ) (
65
65
dac * DataCommitteeBackend ,
66
- ethBackend * backends. SimulatedBackend ,
66
+ ethBackend * simulated. Backend ,
67
67
auth * bind.TransactOpts ,
68
68
da * polygondatacommittee.Polygondatacommittee ,
69
69
) {
@@ -87,7 +87,7 @@ func newTestingEnv(t *testing.T) (
87
87
// must be 1337. The address that holds the auth will have an initial balance of 10 ETH
88
88
func newSimulatedDacman (t * testing.T , auth * bind.TransactOpts ) (
89
89
dacman * DataCommitteeBackend ,
90
- ethBackend * backends. SimulatedBackend ,
90
+ ethBackend * simulated. Backend ,
91
91
da * polygondatacommittee.Polygondatacommittee ,
92
92
err error ,
93
93
) {
@@ -105,10 +105,10 @@ func newSimulatedDacman(t *testing.T, auth *bind.TransactOpts) (
105
105
},
106
106
}
107
107
blockGasLimit := uint64 (999999999999999999 ) //nolint:gomnd
108
- client := backends . NewSimulatedBackend (genesisAlloc , blockGasLimit )
108
+ client := simulated . NewBackend (genesisAlloc , simulated . WithBlockGasLimit ( blockGasLimit ) )
109
109
110
110
// DAC Setup
111
- _ , _ , da , err = polygondatacommittee .DeployPolygondatacommittee (auth , client )
111
+ _ , _ , da , err = polygondatacommittee .DeployPolygondatacommittee (auth , client . Client () )
112
112
if err != nil {
113
113
return & DataCommitteeBackend {}, nil , nil , err
114
114
}
0 commit comments