decode method Null safety
- XdrDataInputStream stream
Implementation
static XdrSCContractCodeType decode(XdrDataInputStream stream) {
int value = stream.readInt();
switch (value) {
case 0:
return SCCONTRACT_CODE_WASM_REF;
case 1:
return SCCONTRACT_CODE_TOKEN;
default:
throw Exception("Unknown enum value: $value");
}
}