decode static method
- XdrDataInputStream stream
Implementation
static XdrHostFunctionType decode(XdrDataInputStream stream) {
int value = stream.readInt();
switch (value) {
case 0:
return HOST_FUNCTION_TYPE_INVOKE_CONTRACT;
case 1:
return HOST_FUNCTION_TYPE_CREATE_CONTRACT;
case 2:
return HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM;
default:
throw Exception("Unknown enum value: $value");
}
}