|
|
@ -110,7 +110,7 @@ const hexData = "0x000000000000000000000000376c47978271565f56deb45495afa69e59c16 |
|
|
|
func TestUnpackIndexedStringTyLogIntoMap(t *testing.T) { |
|
|
|
func TestUnpackIndexedStringTyLogIntoMap(t *testing.T) { |
|
|
|
hash := crypto.Keccak256Hash([]byte("testName")) |
|
|
|
hash := crypto.Keccak256Hash([]byte("testName")) |
|
|
|
topics := []common.Hash{ |
|
|
|
topics := []common.Hash{ |
|
|
|
common.HexToHash("0x0"), |
|
|
|
crypto.Keccak256Hash([]byte("received(string,address,uint256,bytes)")), |
|
|
|
hash, |
|
|
|
hash, |
|
|
|
} |
|
|
|
} |
|
|
|
mockLog := newMockLog(topics, common.HexToHash("0x0")) |
|
|
|
mockLog := newMockLog(topics, common.HexToHash("0x0")) |
|
|
@ -135,7 +135,7 @@ func TestUnpackIndexedSliceTyLogIntoMap(t *testing.T) { |
|
|
|
} |
|
|
|
} |
|
|
|
hash := crypto.Keccak256Hash(sliceBytes) |
|
|
|
hash := crypto.Keccak256Hash(sliceBytes) |
|
|
|
topics := []common.Hash{ |
|
|
|
topics := []common.Hash{ |
|
|
|
common.HexToHash("0x0"), |
|
|
|
crypto.Keccak256Hash([]byte("received(string[],address,uint256,bytes)")), |
|
|
|
hash, |
|
|
|
hash, |
|
|
|
} |
|
|
|
} |
|
|
|
mockLog := newMockLog(topics, common.HexToHash("0x0")) |
|
|
|
mockLog := newMockLog(topics, common.HexToHash("0x0")) |
|
|
@ -160,7 +160,7 @@ func TestUnpackIndexedArrayTyLogIntoMap(t *testing.T) { |
|
|
|
} |
|
|
|
} |
|
|
|
hash := crypto.Keccak256Hash(arrBytes) |
|
|
|
hash := crypto.Keccak256Hash(arrBytes) |
|
|
|
topics := []common.Hash{ |
|
|
|
topics := []common.Hash{ |
|
|
|
common.HexToHash("0x0"), |
|
|
|
crypto.Keccak256Hash([]byte("received(address[2],address,uint256,bytes)")), |
|
|
|
hash, |
|
|
|
hash, |
|
|
|
} |
|
|
|
} |
|
|
|
mockLog := newMockLog(topics, common.HexToHash("0x0")) |
|
|
|
mockLog := newMockLog(topics, common.HexToHash("0x0")) |
|
|
@ -187,7 +187,7 @@ func TestUnpackIndexedFuncTyLogIntoMap(t *testing.T) { |
|
|
|
var functionTy [24]byte |
|
|
|
var functionTy [24]byte |
|
|
|
copy(functionTy[:], functionTyBytes[0:24]) |
|
|
|
copy(functionTy[:], functionTyBytes[0:24]) |
|
|
|
topics := []common.Hash{ |
|
|
|
topics := []common.Hash{ |
|
|
|
common.HexToHash("0x99b5620489b6ef926d4518936cfec15d305452712b88bd59da2d9c10fb0953e8"), |
|
|
|
crypto.Keccak256Hash([]byte("received(function,address,uint256,bytes)")), |
|
|
|
common.BytesToHash(functionTyBytes), |
|
|
|
common.BytesToHash(functionTyBytes), |
|
|
|
} |
|
|
|
} |
|
|
|
mockLog := newMockLog(topics, common.HexToHash("0x5c698f13940a2153440c6d19660878bc90219d9298fdcf37365aa8d88d40fc42")) |
|
|
|
mockLog := newMockLog(topics, common.HexToHash("0x5c698f13940a2153440c6d19660878bc90219d9298fdcf37365aa8d88d40fc42")) |
|
|
@ -208,7 +208,7 @@ func TestUnpackIndexedBytesTyLogIntoMap(t *testing.T) { |
|
|
|
bytes := []byte{1, 2, 3, 4, 5} |
|
|
|
bytes := []byte{1, 2, 3, 4, 5} |
|
|
|
hash := crypto.Keccak256Hash(bytes) |
|
|
|
hash := crypto.Keccak256Hash(bytes) |
|
|
|
topics := []common.Hash{ |
|
|
|
topics := []common.Hash{ |
|
|
|
common.HexToHash("0x99b5620489b6ef926d4518936cfec15d305452712b88bd59da2d9c10fb0953e8"), |
|
|
|
crypto.Keccak256Hash([]byte("received(bytes,address,uint256,bytes)")), |
|
|
|
hash, |
|
|
|
hash, |
|
|
|
} |
|
|
|
} |
|
|
|
mockLog := newMockLog(topics, common.HexToHash("0x5c698f13940a2153440c6d19660878bc90219d9298fdcf37365aa8d88d40fc42")) |
|
|
|
mockLog := newMockLog(topics, common.HexToHash("0x5c698f13940a2153440c6d19660878bc90219d9298fdcf37365aa8d88d40fc42")) |
|
|
|