@@ -27,10 +27,10 @@ import (
2727 "github.com/ethereum/go-ethereum"
2828 "github.com/ethereum/go-ethereum/accounts/abi"
2929 "github.com/ethereum/go-ethereum/accounts/abi/bind/v2"
30+ "github.com/ethereum/go-ethereum/arbkeccak"
3031 "github.com/ethereum/go-ethereum/common"
3132 "github.com/ethereum/go-ethereum/common/hexutil"
3233 "github.com/ethereum/go-ethereum/core/types"
33- "github.com/ethereum/go-ethereum/crypto"
3434 "github.com/ethereum/go-ethereum/rlp"
3535 "github.com/stretchr/testify/assert"
3636)
@@ -188,9 +188,9 @@ const hexData = "0x000000000000000000000000376c47978271565f56deb45495afa69e59c16
188188
189189func TestUnpackIndexedStringTyLogIntoMap (t * testing.T ) {
190190 t .Parallel ()
191- hash := crypto .Keccak256Hash ([]byte ("testName" ))
191+ hash := arbkeccak .Keccak256Hash ([]byte ("testName" ))
192192 topics := []common.Hash {
193- crypto .Keccak256Hash ([]byte ("received(string,address,uint256,bytes)" )),
193+ arbkeccak .Keccak256Hash ([]byte ("received(string,address,uint256,bytes)" )),
194194 hash ,
195195 }
196196 mockLog := newMockLog (topics , common .HexToHash ("0x0" ))
@@ -232,9 +232,9 @@ func TestUnpackIndexedSliceTyLogIntoMap(t *testing.T) {
232232 if err != nil {
233233 t .Fatal (err )
234234 }
235- hash := crypto .Keccak256Hash (sliceBytes )
235+ hash := arbkeccak .Keccak256Hash (sliceBytes )
236236 topics := []common.Hash {
237- crypto .Keccak256Hash ([]byte ("received(string[],address,uint256,bytes)" )),
237+ arbkeccak .Keccak256Hash ([]byte ("received(string[],address,uint256,bytes)" )),
238238 hash ,
239239 }
240240 mockLog := newMockLog (topics , common .HexToHash ("0x0" ))
@@ -258,9 +258,9 @@ func TestUnpackIndexedArrayTyLogIntoMap(t *testing.T) {
258258 if err != nil {
259259 t .Fatal (err )
260260 }
261- hash := crypto .Keccak256Hash (arrBytes )
261+ hash := arbkeccak .Keccak256Hash (arrBytes )
262262 topics := []common.Hash {
263- crypto .Keccak256Hash ([]byte ("received(address[2],address,uint256,bytes)" )),
263+ arbkeccak .Keccak256Hash ([]byte ("received(address[2],address,uint256,bytes)" )),
264264 hash ,
265265 }
266266 mockLog := newMockLog (topics , common .HexToHash ("0x0" ))
@@ -282,13 +282,13 @@ func TestUnpackIndexedFuncTyLogIntoMap(t *testing.T) {
282282 t .Parallel ()
283283 mockAddress := common .HexToAddress ("0x376c47978271565f56DEB45495afa69E59c16Ab2" )
284284 addrBytes := mockAddress .Bytes ()
285- hash := crypto .Keccak256Hash ([]byte ("mockFunction(address,uint)" ))
285+ hash := arbkeccak .Keccak256Hash ([]byte ("mockFunction(address,uint)" ))
286286 functionSelector := hash [:4 ]
287287 functionTyBytes := append (addrBytes , functionSelector ... )
288288 var functionTy [24 ]byte
289289 copy (functionTy [:], functionTyBytes [0 :24 ])
290290 topics := []common.Hash {
291- crypto .Keccak256Hash ([]byte ("received(function,address,uint256,bytes)" )),
291+ arbkeccak .Keccak256Hash ([]byte ("received(function,address,uint256,bytes)" )),
292292 common .BytesToHash (functionTyBytes ),
293293 }
294294 mockLog := newMockLog (topics , common .HexToHash ("0x5c698f13940a2153440c6d19660878bc90219d9298fdcf37365aa8d88d40fc42" ))
@@ -308,9 +308,9 @@ func TestUnpackIndexedFuncTyLogIntoMap(t *testing.T) {
308308func TestUnpackIndexedBytesTyLogIntoMap (t * testing.T ) {
309309 t .Parallel ()
310310 bytes := []byte {1 , 2 , 3 , 4 , 5 }
311- hash := crypto .Keccak256Hash (bytes )
311+ hash := arbkeccak .Keccak256Hash (bytes )
312312 topics := []common.Hash {
313- crypto .Keccak256Hash ([]byte ("received(bytes,address,uint256,bytes)" )),
313+ arbkeccak .Keccak256Hash ([]byte ("received(bytes,address,uint256,bytes)" )),
314314 hash ,
315315 }
316316 mockLog := newMockLog (topics , common .HexToHash ("0x5c698f13940a2153440c6d19660878bc90219d9298fdcf37365aa8d88d40fc42" ))
0 commit comments