trufflesuite/truffle

View on GitHub
packages/codec-components/src/utils/type-guards/value-and-result/bytes-static.ts

Summary

Maintainability
A
2 hrs
Test Coverage
import type { Format } from "@truffle/codec";
import { valueAndResultTypeGuardHelper } from "./helper";

export const [
  isBytesStaticValue,
  isBytesStaticErrorResult,
  isBytesStaticResult,
  bytesStaticGuards
] = valueAndResultTypeGuardHelper<
  Format.Values.BytesStaticValue,
  Format.Errors.BytesStaticErrorResult,
  Format.Values.BytesStaticResult
>(data => data.type.typeClass === "bytes" && data.type.kind === "static");