decode static method
Implementation
static XdrContractCostType decode(XdrDataInputStream stream) {
int value = stream.readInt();
switch (value) {
case 0:
return WasmInsnExec;
case 1:
return MemAlloc;
case 2:
return MemCpy;
case 3:
return MemCmp;
case 4:
return DispatchHostFunction;
case 5:
return VisitObject;
case 6:
return ValSer;
case 7:
return ValDeser;
case 8:
return ComputeSha256Hash;
case 9:
return ComputeEd25519PubKey;
case 10:
return VerifyEd25519Sig;
case 11:
return VmInstantiation;
case 12:
return VmCachedInstantiation;
case 13:
return InvokeVmFunction;
case 14:
return ComputeKeccak256Hash;
case 15:
return ComputeEcdsaSecp256k1Sig;
case 16:
return ComputeEcdsaSecp256k1Key;
case 17:
return Int256AddSub;
case 18:
return Int256Mul;
case 19:
return Int256Div;
case 20:
return Int256Pow;
case 21:
return Int256Shift;
case 22:
return ChaCha20DrawBytes;
default:
throw Exception("Unknown enum value: $value");
}
}