From 88b9f2e859108d64bf51704b5a83696c1af11d54 Mon Sep 17 00:00:00 2001 From: Marius van der Wijden Date: Fri, 29 Nov 2019 19:25:08 +0100 Subject: [PATCH] accounts/abi/bind: fix destructive packing of *big.Int --- accounts/abi/pack.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accounts/abi/pack.go b/accounts/abi/pack.go index 36c58265bd4b..dd1c9a5df84f 100644 --- a/accounts/abi/pack.go +++ b/accounts/abi/pack.go @@ -73,7 +73,7 @@ func packNum(value reflect.Value) []byte { case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: return U256(big.NewInt(value.Int())) case reflect.Ptr: - return U256(value.Interface().(*big.Int)) + return U256(new(big.Int).Set(value.Interface().(*big.Int))) default: panic("abi: fatal error") }