-
Notifications
You must be signed in to change notification settings - Fork 4
PLT/Protocol 9 update #359
New issue
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
Conversation
Only reference the dependencies in child POMs
There was a problem hiding this 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 |
...com/concordium/sdk/responses/transactionstatus/RejectReasonTokenUpdateTransactionFailed.java
Outdated
Show resolved
Hide resolved
...main/java/com/concordium/sdk/responses/transactionstatus/RejectReasonNotExistentTokenId.java
Outdated
Show resolved
Hide resolved
...dium-sdk/src/main/java/com/concordium/sdk/responses/blockitemsummary/ChainUpdateDetails.java
Show resolved
Hide resolved
concordium-sdk/src/main/java/com/concordium/sdk/responses/blockitemsummary/Summary.java
Show resolved
Hide resolved
concordium-sdk/src/main/java/com/concordium/sdk/serializing/CborMapper.java
Outdated
Show resolved
Hide resolved
concordium-sdk/src/test/java/com/concordium/sdk/tokens/CborMemoTest.java
Show resolved
Hide resolved
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
...dium-sdk/src/main/java/com/concordium/sdk/responses/blockitemsummary/ChainUpdateDetails.java
Outdated
Show resolved
Hide resolved
...dium-sdk/src/main/java/com/concordium/sdk/responses/blockitemsummary/ChainUpdateDetails.java
Outdated
Show resolved
Hide resolved
concordium-sdk/src/main/java/com/concordium/sdk/responses/blockitemsummary/UpdateType.java
Outdated
Show resolved
Hide resolved
concordium-sdk/src/main/java/com/concordium/sdk/transactions/TokenUpdateTransaction.java
Outdated
Show resolved
Hide resolved
concordium-sdk/src/main/java/com/concordium/sdk/transactions/TransactionTypeCost.java
Outdated
Show resolved
Hide resolved
concordium-sdk/src/main/java/com/concordium/sdk/transactions/tokens/TokenOperationAmount.java
Show resolved
Hide resolved
*/ | ||
@Getter | ||
@JsonSerialize(using = TokenOperationAmount.CborSerializer.class) | ||
public class TokenOperationAmount { |
There was a problem hiding this comment.
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.
public class TokenOperationAmount { | |
public class TokenAmount { |
There was a problem hiding this comment.
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.
Co-authored-by: Doris Benda <[email protected]>
Co-authored-by: Doris Benda <[email protected]>
Co-authored-by: Doris Benda <[email protected]>
There was a problem hiding this 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.
ProtocolVersion.V9
corresponding to Protocol version 9tokens
field toAccountInfo
, containing list of related protocol level tokensTokenUpdate
, used to execute protocol level tokens operationsTokenOperation
interface for protocol level tokens operationsTransferTokenOperation
implementing protocol level token transferSendTokenTransfer
inconcordium-sdk-examples
tokenUpdate
result toAccountTransactionDetails
tokenCreationDetails
field toChainUpdateDetails
createPltUpdate
authorization toAuthorizationsV1
RejectReasonTokenUpdateTransactionFailed
andRejectReasonNotExistentTokenId
transaction reject reasonsCborMapper
singleton providing Jackson CBOR object mapperUpdated the version to
11.0.0-plt.2