Skip to content
Open
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
20 changes: 20 additions & 0 deletions spl-tokens/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
*.DS_Store
.idea
**/*.rs.bk
**/target/*
**/build
**/node_modules
**/test-ledger
**/.anchor
**/.bolt
**/.yarn
**/.next/
**/.env
!/anchor-counter/target/deploy/anchor_counter-keypair.json
!/bolt-counter/target/deploy/counter-keypair.json
!/bolt-counter/target/deploy/increase-keypair.json

# But don't ignore the target/idl/ directory
!**/anchor-minter/target/idl/
!programs/spl-tokens/target/idl/
!**/anchor-minter/target/deploy/
Comment on lines +17 to +20
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

Inconsistent path pattern in un-ignore rule.

Line 19 uses a path pattern without the **/ prefix (programs/spl-tokens/target/idl/), while lines 18 and 20 use **/ prefixes. This inconsistency may cause the un-ignore rule to not work as intended if the directory structure differs from expectations.

🔎 Proposed fix for consistency
 # But don't ignore the target/idl/ directory
 !**/anchor-minter/target/idl/
-!programs/spl-tokens/target/idl/
+!**/programs/spl-tokens/target/idl/
 !**/anchor-minter/target/deploy/
🤖 Prompt for AI Agents
In spl-tokens/.gitignore around lines 17 to 20, the un-ignore rule on line 19
uses an inconsistent path pattern (programs/spl-tokens/target/idl/) compared to
the other lines that use the **/ prefix; update line 19 to use the same glob
prefix (e.g., !**/programs/spl-tokens/target/idl/) so all un-ignore rules are
consistent and will match regardless of nested directory layout.

33 changes: 33 additions & 0 deletions spl-tokens/Anchor.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
[toolchain]
anchor_version = "0.31.1"

[features]
resolution = true
skip-lint = false

[programs.devnet]
spl-tokens = "FgvEeit1djLPPjozq9zW9R8Ahu5JpijcdWQxqL4P887"

[programs.localnet]
spl-tokens= "FgvEeit1djLPPjozq9zW9R8Ahu5JpijcdWQxqL4P887"
Comment on lines +8 to +12
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

Fix formatting inconsistency and verify program ID usage.

Line 12 is missing a space after the = operator, which is inconsistent with line 9. Additionally, both devnet and localnet use the same program ID. While this may be intentional for local development and testing, please verify this is the desired configuration.

🔎 Proposed fix for formatting
-spl-tokens= "FgvEeit1djLPPjozq9zW9R8Ahu5JpijcdWQxqL4P887"
+spl-tokens = "FgvEeit1djLPPjozq9zW9R8Ahu5JpijcdWQxqL4P887"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
[programs.devnet]
spl-tokens = "FgvEeit1djLPPjozq9zW9R8Ahu5JpijcdWQxqL4P887"
[programs.localnet]
spl-tokens= "FgvEeit1djLPPjozq9zW9R8Ahu5JpijcdWQxqL4P887"
[programs.devnet]
spl-tokens = "FgvEeit1djLPPjozq9zW9R8Ahu5JpijcdWQxqL4P887"
[programs.localnet]
spl-tokens = "FgvEeit1djLPPjozq9zW9R8Ahu5JpijcdWQxqL4P887"
🧰 Tools
🪛 Gitleaks (8.30.0)

[high] 9-9: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


[high] 12-12: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

🤖 Prompt for AI Agents
In spl-tokens/Anchor.toml around lines 8 to 12, fix the formatting inconsistency
by adding a space after the `=` on line 12 so it matches line 9 (change
`spl-tokens= "..."` to `spl-tokens = "..."`), and verify whether localnet should
reuse the same program ID as devnet—if localnet needs a different ID replace the
value on line 12 with the correct localnet program ID; otherwise keep the same
value but ensure formatting consistency.



[registry]
url = "https://api.apr.dev"

[provider]
cluster = "localnet"
wallet = "~/.config/solana/id.json"

[[test.genesis]]
address = "SPLxh1LVZzEkX99H6rqYizhytLWPZVV296zyYDPagv2"
program = "tests/fixtures/ephemeral_token_program.so"
upgradeable = false

[[test.genesis]]
address = "DELeGGvXpWV2fqJUhqcF5ZSYMS4JTLjteaAMARRSaeSh"
program = "tests/fixtures/dlp.so"
upgradeable = false

[scripts]
test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"
Loading
Loading