(builder *neovm.ParamsBuilder, param string)
| 171 | } |
| 172 | |
| 173 | func ParseNativeParamByte(builder *neovm.ParamsBuilder, param string) error { |
| 174 | if param == "" { |
| 175 | return fmt.Errorf("invalid byte") |
| 176 | } |
| 177 | i, err := strconv.ParseInt(param, 10, 32) |
| 178 | if err != nil { |
| 179 | return fmt.Errorf("parse int error:%s", err) |
| 180 | } |
| 181 | if i > math.MaxUint8 || i < 0 { |
| 182 | return fmt.Errorf("invalid byte value") |
| 183 | } |
| 184 | builder.EmitPushInteger(new(big.Int).SetInt64(i)) |
| 185 | return nil |
| 186 | } |
| 187 | |
| 188 | func ParseNativeParamByteArray(builder *neovm.ParamsBuilder, param string) error { |
| 189 | data, err := hex.DecodeString(param) |
no test coverage detected