accounts/abi: fix MakeTopics big.Int mutation

This commit is contained in:
Jordan Krage 2024-11-21 14:41:31 -06:00
parent 08a83f18bd
commit 0a8e4835db
No known key found for this signature in database
GPG Key ID: FE7D884E2656D771
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ func MakeTopics(query ...[]interface{}) ([][]common.Hash, error) {
case common.Address: case common.Address:
copy(topic[common.HashLength-common.AddressLength:], rule[:]) copy(topic[common.HashLength-common.AddressLength:], rule[:])
case *big.Int: case *big.Int:
copy(topic[:], math.U256Bytes(rule)) copy(topic[:], math.U256Bytes(new(big.Int).Set(rule)))
case bool: case bool:
if rule { if rule {
topic[common.HashLength-1] = 1 topic[common.HashLength-1] = 1