decode static method

StorageSize? decode(
  1. Unpacker u
)

Implementation

static StorageSize? decode(Unpacker u) {
  switch (u.unpackListLength()) {
    case 0: return null;
    case 1: break;
    default: throw DecodeError();
  }
  return StorageSize(
    bytes: (u.unpackInt())!,
  );
}