encode method Null safety

void encode(
  1. XdrDataOutputStream stream,
  2. XdrContractEventBodyV0 encoded
)

Implementation

static void encode(
    XdrDataOutputStream stream, XdrContractEventBodyV0 encoded) {
  int topicsSize = encoded.topics.length;
  stream.writeInt(topicsSize);
  for (int i = 0; i < topicsSize; i++) {
    XdrSCVal.encode(stream, encoded.topics[i]);
  }
  XdrSCVal.encode(stream, encoded.data);
}