diff --git a/accounts/abi/reflect.go b/accounts/abi/reflect.go index 38d8028d7f..f6696ea978 100644 --- a/accounts/abi/reflect.go +++ b/accounts/abi/reflect.go @@ -90,7 +90,7 @@ func reflectIntType(unsigned bool, size int) reflect.Type { // mustArrayToByteSlice creates a new byte slice with the exact same size as value // and copies the bytes in value to the new slice. func mustArrayToByteSlice(value reflect.Value) reflect.Value { - slice := reflect.MakeSlice(reflect.TypeFor[[]byte](), value.Len(), value.Len()) + slice := reflect.ValueOf(make([]byte, value.Len())) reflect.Copy(slice, value) return slice }