From fce0d3e846b543daa4ebfb767650c02610a40828 Mon Sep 17 00:00:00 2001 From: Jared Wasinger Date: Fri, 9 May 2025 14:51:33 +0800 Subject: [PATCH] add func docs --- accounts/abi/pack.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/accounts/abi/pack.go b/accounts/abi/pack.go index 01761c37c4..35590df1dd 100644 --- a/accounts/abi/pack.go +++ b/accounts/abi/pack.go @@ -33,6 +33,8 @@ func packBytesSlice(bytes []byte, l int) []byte { return append(len, common.RightPadBytes(bytes, (l+31)/32*32)...) } +// validateNum returns an error if the underlying type of t is uint and the +// value of reflectValue is a negative big.Int func validateNum(t Type, reflectValue reflect.Value) error { if t.T == UintTy && reflectValue.Kind() == reflect.Ptr { val := new(big.Int).Set(reflectValue.Interface().(*big.Int))