@@ -106,7 +106,7 @@ func TestWatcherFunction(t *testing.T) {
106
106
numTransactions := 3
107
107
108
108
for i := 0 ; i < numTransactions ; i ++ {
109
- tx := mock .SendTxToL2Client (t , client )
109
+ tx := mock .SendTxToL2Client (t , client , cfg . L2Config . RelayerConfig . PrivateKey )
110
110
// wait for mining
111
111
_ , err = bind .WaitMined (context .Background (), client , tx )
112
112
assert .NoError (t , err )
@@ -134,7 +134,7 @@ func TestWatcherFunction(t *testing.T) {
134
134
previousHeight , err = client .BlockNumber (context .Background ())
135
135
assert .NoError (t , err )
136
136
137
- auth := prepareAuth (t , client )
137
+ auth := prepareAuth (t , client , cfg . L2Config . RelayerConfig . PrivateKey )
138
138
139
139
// deploy mock bridge
140
140
_ , tx , instance , err := mock_bridge .DeployMockBridge (auth , client )
@@ -147,7 +147,7 @@ func TestWatcherFunction(t *testing.T) {
147
147
rc .Start ()
148
148
149
149
// Call mock_bridge instance sendMessage to trigger emit events
150
- addr := common .HexToAddress ("0x4cb1ab63af5d8931ce09673ebd8ae2ce16fd6571 " )
150
+ addr := common .HexToAddress ("0x1c5a77d9fa7ef466951b2f01f724bca3a5820b63 " )
151
151
nonce , err := client .PendingNonceAt (context .Background (), addr )
152
152
assert .NoError (t , err )
153
153
auth .Nonce = big .NewInt (int64 (nonce ))
@@ -161,7 +161,7 @@ func TestWatcherFunction(t *testing.T) {
161
161
}
162
162
163
163
//extra block mined
164
- addr = common .HexToAddress ("0x4cb1ab63af5d8931ce09673ebd8ae2ce16fd6571 " )
164
+ addr = common .HexToAddress ("0x1c5a77d9fa7ef466951b2f01f724bca3a5820b63 " )
165
165
nonce , nounceErr := client .PendingNonceAt (context .Background (), addr )
166
166
assert .NoError (t , nounceErr )
167
167
auth .Nonce = big .NewInt (int64 (nonce ))
@@ -208,7 +208,7 @@ func TestWatcherFunction(t *testing.T) {
208
208
previousHeight , err := client .BlockNumber (context .Background ()) // shallow the global previousHeight
209
209
assert .NoError (t , err )
210
210
211
- auth := prepareAuth (t , client )
211
+ auth := prepareAuth (t , client , cfg . L2Config . RelayerConfig . PrivateKey )
212
212
213
213
_ , trx , instance , err := mock_bridge .DeployMockBridge (auth , client )
214
214
assert .NoError (t , err )
@@ -224,7 +224,7 @@ func TestWatcherFunction(t *testing.T) {
224
224
var tx * types.Transaction
225
225
226
226
for i := 0 ; i < numTransactions ; i ++ {
227
- addr := common .HexToAddress ("0x4cb1ab63af5d8931ce09673ebd8ae2ce16fd6571 " )
227
+ addr := common .HexToAddress ("0x1c5a77d9fa7ef466951b2f01f724bca3a5820b63 " )
228
228
nonce , nounceErr := client .PendingNonceAt (context .Background (), addr )
229
229
assert .NoError (t , nounceErr )
230
230
auth .Nonce = big .NewInt (int64 (nonce ))
@@ -240,7 +240,7 @@ func TestWatcherFunction(t *testing.T) {
240
240
}
241
241
242
242
// extra block mined
243
- addr := common .HexToAddress ("0x4cb1ab63af5d8931ce09673ebd8ae2ce16fd6571 " )
243
+ addr := common .HexToAddress ("0x1c5a77d9fa7ef466951b2f01f724bca3a5820b63 " )
244
244
nonce , nounceErr := client .PendingNonceAt (context .Background (), addr )
245
245
assert .NoError (t , nounceErr )
246
246
auth .Nonce = big .NewInt (int64 (nonce ))
@@ -299,8 +299,8 @@ func prepareRelayerClient(client *ethclient.Client, db database.OrmFactory, cont
299
299
return l2 .NewL2WatcherClient (context .Background (), client , 0 , 1 , map [string ]struct {}{}, contractAddr , messengerABI , db )
300
300
}
301
301
302
- func prepareAuth (t * testing.T , client * ethclient.Client ) * bind.TransactOpts {
303
- privateKey , err := crypto .HexToECDSA ("ad29c7c341a23f04851b6c8602c7c74b98e3fc9488582791bda60e0e261f9cbb" )
302
+ func prepareAuth (t * testing.T , client * ethclient.Client , private string ) * bind.TransactOpts {
303
+ privateKey , err := crypto .HexToECDSA (private )
304
304
assert .NoError (t , err )
305
305
publicKey := privateKey .Public ()
306
306
publicKeyECDSA , ok := publicKey .(* ecdsa.PublicKey )
0 commit comments