Fix problem, not allowing *big.Int and *common.HexInt for return value
Previous CheckMethod API doesn't allow returning *big.Int or
*common.HexInt. It should be allowed.
@@ -155,7 +155,8 @@ func CheckMethod(obj SystemScore) error {
t := m.Type.Out(j)
switch methodInfo.Outputs[j] {
case scoreapi.Integer:
- if reflect.TypeOf(int(0)) != t && reflect.TypeOf(int64(0)) != t {
+ if reflect.TypeOf(int(0)) != t && reflect.TypeOf(int64(0)) != t &&
+ ptrOfHexIntType.AssignableTo(t) && ptrOfBigIntType.AssignableTo(t) {
invalid = true
}
case scoreapi.String:
