Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion tokens/token-2022/transfer-fee/pinocchio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"@solana-program/token-2022": "^0.12.0",
"@solana/kit": "^7.0.0",
"@solana/sysvars": "^6.10.0",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Commit signature is missing

Commit fc36eed0976c4e1d3b8c4809c34a393980b83692 has no cryptographic signature, so this pull request does not satisfy the repository requirement that every commit be signed and verified. Re-sign the commit before merging.

Context Used: Request changes if the commits are not signed (ver... (source)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is a false positive — the commit is signed and GitHub reports it verified. gh api repos/solana-foundation/program-examples/pulls/681/commits returns verification.verified = true, reason = valid for fc36eed0, signed with my registered ED25519 SSH key (SHA256:UVyyOf24fM8y73sfUoms0okbKMJobxlKQjwweQs4BhU); the commit shows a Verified badge in the PR. No re-sign needed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You're right, I apologize for the false positive. GitHub confirms fc36eed carries a valid ED25519 SSH signature (verification.verified = true, reason = valid), and the Verified badge on the commit reflects that. My original comment was incorrect — no action needed.

"borsh": "^2.0.0",
"litesvm": "^1.3.0"
},
"devDependencies": {
Expand Down
8 changes: 0 additions & 8 deletions tokens/token-2022/transfer-fee/pinocchio/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 5 additions & 7 deletions tokens/token-2022/transfer-fee/pinocchio/tests/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import {
appendTransactionMessageInstruction,
createTransactionMessage,
generateKeyPairSigner,
getStructEncoder,
getU8Encoder,
lamports,
pipe,
setTransactionMessageFeePayerSigner,
Expand All @@ -14,15 +16,11 @@ import {
import { SYSVAR_RENT_ADDRESS } from '@solana/sysvars';
import { SYSTEM_PROGRAM_ADDRESS } from '@solana-program/system';
import { getMintDecoder, TOKEN_2022_PROGRAM_ADDRESS } from '@solana-program/token-2022';
import * as borsh from 'borsh';
import { assert } from 'chai';
import { FailedTransactionMetadata, LiteSVM } from 'litesvm';

// Borsh schema for the instruction data, matching the program's
// `CreateTokenArgs` (and the native example's wire format).
const CreateTokenArgsSchema: borsh.Schema = {
struct: { token_decimals: 'u8' },
};
// Instruction data layout, matching the program's `CreateTokenArgs`.
const createTokenArgsEncoder = getStructEncoder([['tokenDecimals', getU8Encoder()]]);

// Token-2022 lays a mint with one extension out as:
// base account length (165) + account-type byte (1) + TLV entry (112) = 278
Expand Down Expand Up @@ -54,7 +52,7 @@ describe('Token-2022 Transfer Fee (Pinocchio)', () => {

const mint = await generateKeyPairSigner();

const data = borsh.serialize(CreateTokenArgsSchema, { token_decimals: decimals });
const data = createTokenArgsEncoder.encode({ tokenDecimals: decimals });

const ix = {
programAddress: programId,
Expand Down
Loading