Hi,
I’m trying to perform a mint operation for the ETH_TEST5 ERC20 token using the Fireblocks Java SDK (version 10.1.0). To do this, I first need to retrieve the token contract address from the Fireblocks API:
Endpoint:
GET https://sandbox-api.fireblocks.io/v/tokenization/tokens/29e93a40-7971-4c16-99b7-83e6df097af3
Sample response:
{
"id": "29e93a40-7971-4c16-99b7-83e6df097af3",
"displayName": "Unit Test Token 30/05/2025 15:47",
"status": "COMPLETED",
"type": "FUNGIBLE_TOKEN",
"refId": "UTT_TEST_B75VRLGX_49CE",
"tokenMetadata": {
"assetId": "UTT_TEST_B75VRLGX_49CE",
"name": "Unit Test Token 30_05_2025 15_47",
"symbol": "UTT_TEST",
"testnet": true,
"networkProtocol": "ETH",
"contractAddress": "0x987355F9439F2DfB883bbC99Aa098AD93975a3c8",
"blockchain": "ETH_TEST5",
"decimals": 18,
"type": "ERC20",
"totalSupply": "0",
"vaultAccountId": "1"
}
}
When I call the SDK method:
TokenLinkDto data = fireblocks.tokenization().getLinkedToken(idToken).join().getData();
I get the following error:
java.util.concurrent.CompletionException: com.fireblocks.sdk.ApiException: com.fasterxml.jackson.databind.JsonMappingException: Unexpected IOException (of type java.io.IOException): Failed deserialization for TokenLinkDtoTokenMetadata: 3 classes match result, expected 1
After checking the code, I found that the deserializer (TokenLinkDtoTokenMetadataDeserializer
) tries to match the tokenMetadata
JSON to one of three classes (AssetMetadataDto
, CollectionMetadataDto
, ContractMetadataDto
). In this case, the JSON matches all three, so the deserializer fails with “3 classes match result, expected 1”.
Has anyone faced this issue? Is there a recommended workaround or patch for the SDK? Should I update the library, or is there a way to customize the deserialization logic to handle this ambiguity?
Thanks in advance for any suggestions!