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