Title: `writeCallFunction` fails with array parameters due to `value` field typed as String · Issue #117 · fireblocks/java-sdk · GitHub
Open Graph Title: `writeCallFunction` fails with array parameters due to `value` field typed as String · Issue #117 · fireblocks/java-sdk
X Title: `writeCallFunction` fails with array parameters due to `value` field typed as String · Issue #117 · fireblocks/java-sdk
Description: The ParameterWithValue.value field is typed as String, offering no obvious way to pass an array. If the array is serialized as JSON string it is serialized again, causing it to be double escaped. This causes 500 errors when calling contr...
Open Graph Description: The ParameterWithValue.value field is typed as String, offering no obvious way to pass an array. If the array is serialized as JSON string it is serialized again, causing it to be double escaped. T...
X Description: The ParameterWithValue.value field is typed as String, offering no obvious way to pass an array. If the array is serialized as JSON string it is serialized again, causing it to be double escaped. T...
Opengraph URL: https://github.com/fireblocks/java-sdk/issues/117
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`writeCallFunction` fails with array parameters due to `value` field typed as String","articleBody":"The `ParameterWithValue.value` field is typed as `String`, offering no obvious way to pass an array. \n\nIf the array is serialized as JSON string it is serialized again, causing it to be double escaped. This causes 500 errors when calling contract functions with array parameters.\n\n## Environment\n- Fireblocks Java SDK version: 13.0.0.\n- Java: 21\n\n## Reproduction\n```kotlin\n// Kotlin\nval addresses = listOf(\"0x2838a9dcc507c5ea4f07ca68a15ec53d1e5911a0\", \"0x07c5fb2c857fca6b53856c6e30556a865858d167\")\nval dto = WriteCallFunctionDto(\n vaultAccountId,\n WriteCallFunctionDtoAbiFunction(\n WriteAbiFunction(\n WriteAbiFunction.StateMutabilityEnum.NONPAYABLE,\n WriteAbiFunction.TypeEnum.FUNCTION,\n listOf(\n ParameterWithValue(\"accounts\", \"address[]\").apply {\n value = objectMapper.writeValueAsString(addresses)\n },\n ),\n ).apply {\n name = \"batchAddBlacklist\"\n outputs = listOf()\n },\n ),\n)\nclient.contractInteractions().writeCallFunction(dto, contractAddress, assetId, idempotencyKey)\n```\n\n## Actual Behavior\nThe `value` field is serialized as an escaped JSON string:\n```json\n{\n \"inputs\": [{\n \"name\": \"accounts\",\n \"type\": \"address[]\",\n \"value\": \"[\\\"0xabc...\\\",\\\"0xdef...\\\"]\"\n }]\n}\n```\n\n## Expected Behavior\nThe `value` field should be a native JSON array:\n```json\n{\n \"inputs\": [{\n \"name\": \"accounts\",\n \"type\": \"address[]\",\n \"value\": [\"0xabc...\", \"0xdef...\"]\n }]\n}\n```\n\n## Root Cause\n`ParameterWithValue.value` is typed as `String`, forcing array values to be double-serialized.\n\n## Solution\nChange `ParameterWithValue.value` from `String` to `Object` to support both primitive values and complex types (arrays, objects).\n\n## Workaround\nRaw HTTP requests with manually constructed JSON work correctly, but that is sidestepping the whole SDK.","author":{"url":"https://github.com/febeling","@type":"Person","name":"febeling"},"datePublished":"2025-12-01T14:03:26.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/117/java-sdk/issues/117"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:464c49d6-0b8b-e1b9-6a5e-e702e9d5904d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C264:3D4482:6E99DD8:96746A7:698D1C71 |
| html-safe-nonce | a735e3510cf26810f37d8231d28724ef4571db8700ad8020d27d2c933b0610c8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMjY0OjNENDQ4Mjo2RTk5REQ4Ojk2NzQ2QTc6Njk4RDFDNzEiLCJ2aXNpdG9yX2lkIjoiMzExNTAxNTI0NDY4Nzk0MDcyMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | ca8dccd330e7e04b4eb2e8b6f41b32300fb462fc5c0273f55af9c3059c833eb6 |
| hovercard-subject-tag | issue:3681165507 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/fireblocks/java-sdk/117/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2021e06c5c800020a47000e9569f692845a49e9c89375d5b4d1ba01412f39551/fireblocks/java-sdk/issues/117 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2021e06c5c800020a47000e9569f692845a49e9c89375d5b4d1ba01412f39551/fireblocks/java-sdk/issues/117 |
| og:image:alt | The ParameterWithValue.value field is typed as String, offering no obvious way to pass an array. If the array is serialized as JSON string it is serialized again, causing it to be double escaped. T... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | febeling |
| hostname | github.com |
| expected-hostname | github.com |
| None | c25395580e1e3bf82d705e0982a1b24255366088720fef945f1493d5e3e67954 |
| turbo-cache-control | no-preview |
| go-import | github.com/fireblocks/java-sdk git https://github.com/fireblocks/java-sdk.git |
| octolytics-dimension-user_id | 40918269 |
| octolytics-dimension-user_login | fireblocks |
| octolytics-dimension-repository_id | 653280893 |
| octolytics-dimension-repository_nwo | fireblocks/java-sdk |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 653280893 |
| octolytics-dimension-repository_network_root_nwo | fireblocks/java-sdk |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 94219dcb9c044792ec271fd5b23c73419858bef7 |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width