Skip to content

Conversation

Radiokot
Copy link
Member

@Radiokot Radiokot commented Aug 1, 2025

  • Support for Protocol 9
  • Added ProtocolVersion.V9 corresponding to Protocol version 9
  • Added tokens field to AccountInfo, containing list of related protocol level tokens
  • Added new account transaction, TokenUpdate, used to execute protocol level tokens operations
  • Added TokenOperation interface for protocol level tokens operations
  • Added TransferTokenOperation implementing protocol level token transfer
  • Added protocol level token transfer example, see SendTokenTransfer in concordium-sdk-examples
  • Added tokenUpdate result to AccountTransactionDetails
  • Added tokenCreationDetails field to ChainUpdateDetails
  • Added createPltUpdate authorization to AuthorizationsV1
  • Added RejectReasonTokenUpdateTransactionFailed and RejectReasonNotExistentTokenId transaction reject reasons
  • Added CborMapper singleton providing Jackson CBOR object mapper

Updated the version to 11.0.0-plt.2

@Radiokot Radiokot changed the title PLT update PLT/Protocol 9 update Aug 1, 2025
@Radiokot Radiokot requested review from DOBEN, Copilot and td202 August 1, 2025 09:53
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements support for Protocol 9 and protocol-level tokens (PLT), adding comprehensive token transaction functionality to the Concordium Java SDK.

  • Support for Protocol version 9 with new ProtocolVersion.V9
  • New TokenUpdate transaction type for protocol-level token operations
  • Token transfer operations with CBOR memo support and TaggedTokenHolderAccount recipients

Reviewed Changes

Copilot reviewed 42 out of 43 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
pom.xml Version update to 11.0.0-plt.2 and centralized dependency management
concordium-sdk/src/main/java/com/concordium/sdk/transactions/TokenUpdate*.java Core token transaction classes and factory methods
concordium-sdk/src/main/java/com/concordium/sdk/transactions/tokens/*.java Token operation implementations including transfers, amounts, and CBOR memo
concordium-sdk/src/main/java/com/concordium/sdk/serializing/CborMapper.java CBOR serialization utility singleton
concordium-sdk/src/main/java/com/concordium/sdk/types/UInt*.java Enhanced unsigned integer types with CBOR serialization and addition operations
concordium-sdk/src/main/java/com/concordium/sdk/responses/*.java Protocol 9 support, new transaction result events, and reject reasons
concordium-sdk-examples/src/main/java/com/concordium/sdk/examples/SendTokenTransfer.java Example implementation demonstrating token transfer usage

*/
@Getter
@JsonSerialize(using = TokenOperationAmount.CborSerializer.class)
public class TokenOperationAmount {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the other SDKs we call this TokenAmount as the type also appears in e.g. events/returnValues.

Suggested change
public class TokenOperationAmount {
public class TokenAmount {

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here it is intentionally different – the GRPC model has no unsigned number wrapping, and it is not CBOR-serializable.

Copy link

@td202 td202 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Just a couple of issues where preferred serialization should be used for integers.

@Radiokot Radiokot merged commit 5e09b62 into main Aug 21, 2025
2 checks passed
@Radiokot Radiokot deleted the plt branch August 21, 2025 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants