From 49d91dda9229f39b7572d9e4a26da1a4795a33e1 Mon Sep 17 00:00:00 2001 From: Young Yang Liauw <7528420+sausagee@users.noreply.github.com> Date: Tue, 5 Nov 2024 16:21:08 -0800 Subject: [PATCH] Add VM error code Add VM error code `FAILED_TO_DESERIALIZE_ARGUMENT` --- apps/nextra/pages/en/build/smart-contracts/error-codes.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/nextra/pages/en/build/smart-contracts/error-codes.mdx b/apps/nextra/pages/en/build/smart-contracts/error-codes.mdx index f91c00d67..2c9a1d25d 100644 --- a/apps/nextra/pages/en/build/smart-contracts/error-codes.mdx +++ b/apps/nextra/pages/en/build/smart-contracts/error-codes.mdx @@ -107,6 +107,7 @@ sequence number and try again. | RESOURCE_ALREADY_EXISTS | We tried to create a resource under an account where that resource already exists. | Check the contract and possibly change it to handle resources that already exist | | UNKNOWN_STATUS | A reserved status to represent an unknown vm status. This is std::u64::MAX, but we can't pattern match on that, so put the hardcoded value in. | N/A | | LINKER_ERROR | This may be due to the function has not been published on chain or by trying to call an invalid function as the result of either an incorrect account address, module name, or function name. This might not happen locally if the sources are available locally but have yet to be published on-chain. | There are many reasons, but you should check your account addresses, module names, and function names to determine that they're correct and published | +| FAILED_TO_DESERIALIZE_ARGUMENT | This error in deserializing argument is triggered by one of the following validation checks. 1) It exceeds the limit on the number of nested or unpacked structs (including in a vector). The maximum overall args equals to depth * number of args. The max depth is currently 10. 2) The nested struct exceeds the aforementioned max depth. 3) The serialized arguments to constructor contained extra data. 4) It was derializing utf8 but struct_constructors are disabled. 5) The string argument is too long. 6) BCS deserialization fails for utf8. | N/A | ## Move Standard Library (stdlib)