Skip to content

Commit 7ce7c39

Browse files
MariusVanDerWijdengballet
authored andcommitted
accounts/abi/bind: fix destructive packing of *big.Int (#20412)
1 parent fc7e0fe commit 7ce7c39

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

accounts/abi/pack.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func packNum(value reflect.Value) []byte {
7373
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
7474
return U256(big.NewInt(value.Int()))
7575
case reflect.Ptr:
76-
return U256(value.Interface().(*big.Int))
76+
return U256(new(big.Int).Set(value.Interface().(*big.Int)))
7777
default:
7878
panic("abi: fatal error")
7979
}

0 commit comments

Comments
 (0)