Skip to content
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

chore: compressed-token token extension compat #1008

Merged

Conversation

ananas-block
Copy link
Contributor

@ananas-block ananas-block commented Jul 21, 2024

Changes:

  • add tlv: Option<Vec<u8>> to:
    • TokenData
    • PackedTokenTransferOutputData
    • InputTokenDataWithContext
  • tlv is forced to be None if set instructions panic with unimplemented

Note:

  • changes in TokenData are breaking changes for photon
  • interop tests in compressed-token.js are disabled
  • cli tests are disabled because these use photon

@ananas-block ananas-block force-pushed the jorrit/chore-compressed-token-token-extension-compat branch from e947968 to 1045485 Compare July 21, 2024 20:17
Comment on lines 9 to 10
'can have one token pool. When a token is compressed the compressed',
'tokens are transferrred to the token pool.',
Copy link
Contributor

Choose a reason for hiding this comment

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

imo it's easier to understand if we say something like this:

Suggested change
'can have one token pool. When a token is compressed the compressed',
'tokens are transferrred to the token pool.',
'can have one token pool. When a token is compressed the SPL',
'tokens are transferrred to the token pool, and their compressed equivalent is minted into a Merkle tree.',

@@ -51,7 +50,11 @@ export type LightCompressedToken = {
'Mints tokens from an spl token mint to a list of compressed accounts.',
'Minted tokens are transferred to a pool account owned by the compressed',
'token program. The instruction creates one compressed output account for',
'every amount and pubkey input pair one output compressed account.',
'every amount and pubkey input pair one output compressed account. A',
Copy link
Contributor

@SwenSchaeferjohann SwenSchaeferjohann Jul 21, 2024

Choose a reason for hiding this comment

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

duplicate 'one output compressed account'

Comment on lines 168 to 169
'decompressed. In one transaction only compression or decompression is',
'possible. Lamports can be transferred along side tokens. If output token',
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
'decompressed. In one transaction only compression or decompression is',
'possible. Lamports can be transferred along side tokens. If output token',
'decompressed. In one transaction only compression or decompression is',
'possible. Lamports can be transferred alongside tokens. If output token',

'decompressed. In one transaction only compression or decompression is',
'possible. Lamports can be transferred along side tokens. If output token',
'accounts specify less lamports than inputs the remaining lamports are',
'transferred to an output compressed account. Signer must owner or',
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
'transferred to an output compressed account. Signer must owner or',
'transferred to an output compressed account. Signer must be owner or',

Copy link
Contributor

@SwenSchaeferjohann SwenSchaeferjohann left a comment

Choose a reason for hiding this comment

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

typos in doc comments otherwise lgtm

@@ -317,6 +338,10 @@ export type LightCompressedToken = {
},
{
name: 'revoke';
docs: [
'Revokes a delegation. The instruction merges all inptus into one output',
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
'Revokes a delegation. The instruction merges all inptus into one output',
'Revokes a delegation. The instruction merges all inputs into one output',

Comment on lines +1915 to +1916
'are included in the token data hash, which is a public input to the',
'validity proof.',
Copy link
Contributor

Choose a reason for hiding this comment

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

broken

Comment on lines +1842 to +1843
'are included in the token data hash, which is a public input to the',
'validity proof.',
Copy link
Contributor

Choose a reason for hiding this comment

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

broken

@ananas-block ananas-block merged commit 1c2ed8f into main Jul 21, 2024
13 checks passed
@ananas-block ananas-block deleted the jorrit/chore-compressed-token-token-extension-compat branch July 21, 2024 22:44
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.

2 participants