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