We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi Moralis team,
together with @YosephKS we found a minor mismatch between the Unity SDK and the EVM API code generated for the self-hosted server cloud code.
In NativeApi.cs#L451 and CloudApi/NativeApi.cs#L448 the parameter function_name is in snake case while in the server code runContractFunctionOperation.ts#L42 it's in camel case functionName. This leads to the following error:
function_name
functionName
Error: HTTP/1.1 400 Bad Request {"code":141,"error":"[C0005] Request contains unknown parameter: function_name. This operation supports the following parameters: address, chain, functionName, providerUrl, subdomain, abi, params"}
As a workaround, either the parameter mentioned above can be changed to camel case or the parsing can be patched in the server code with:
formattedParams = {}; function camelToUnderscore(key) { return key.replace( /([A-Z])/g, "_$1" ).toLowerCase(); } for(let key in params) { const camelCaseKeys = key.toLowerCase().replace(/([-_][a-z])/g, group => group .toUpperCase() .replace('_', '') ); const formattedParams[camelCaseKeys] = params[key]; }
function_name findings in this repository that need to be fixed 😉 Please consider if other parameters must also be specified in the camel case!
Best regards
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi Moralis team,
together with @YosephKS we found a minor mismatch between the Unity SDK and the EVM API code generated for the self-hosted server cloud code.
In NativeApi.cs#L451 and CloudApi/NativeApi.cs#L448 the parameter
function_name
is in snake case while in the server code runContractFunctionOperation.ts#L42 it's in camel casefunctionName
. This leads to the following error:As a workaround, either the parameter mentioned above can be changed to camel case or the parsing can be patched in the server code with:
function_name
findings in this repository that need to be fixed 😉 Please consider if other parameters must also be specified in the camel case!Best regards
The text was updated successfully, but these errors were encountered: