Skip to content

Fix 4 verified skill content bugs#2

Merged
JoshDFN merged 1 commit intomainfrom
fix/skill-content-bugs
Feb 26, 2026
Merged

Fix 4 verified skill content bugs#2
JoshDFN merged 1 commit intomainfrom
fix/skill-content-bugs

Conversation

@JoshDFN
Copy link
Copy Markdown
Collaborator

@JoshDFN JoshDFN commented Feb 26, 2026

Summary

Fixes 4 confirmed issues from #1 (5 others were verified as false positives).

Verified and fixed:

  • Issue 1: Added [package] + [lib] crate-type=["cdylib"] to 6 Rust Cargo.toml examples (https-outcalls, icrc-ledger, vetkd, stable-memory, wallet, internet-identity). Without this, cargo build produces an rlib, not a deployable .wasm.
  • Issue 3: Replaced thread_local! heap storage with StableCell for OWNER in the Internet Identity Rust backend. Previous code lost ownership on canister upgrade, allowing anyone to reclaim via init_owner().
  • Issue 4: Fixed SNS token distribution math — governance was 5,200,000 tokens but total declared 10,000,000. Reduced governance to 5,000,000 so allocations sum correctly.
  • Issue 9: Standardized ic-stable-structures to 0.7 across multi-canister and stable-memory skills (was 0.6 in multi-canister, 0.7 in stable-memory).

Verified as false positives (no fix needed):

  • Issue 2: Nat64 is a built-in Motoko primitive — no import needed for type annotations
  • Issue 5: @dfinity/* deprecation claim unverified
  • Issue 6: Skills consistently use icp.json
  • Issue 7: GitHub URLs already fixed (repo is public)
  • Issue 8: vetKD skill already warns about ic-vetkeys availability

Closes #1

Test plan

  • Build passes (npm run build)
  • Verify Cargo.toml examples in all 8 Rust skills have [lib] crate-type = ["cdylib"]
  • Verify II Rust backend uses StableCell
  • Verify SNS allocations sum to declared total
  • Verify ic-stable-structures version consistent across skills

- Add [package] + [lib] crate-type=["cdylib"] to 6 Rust Cargo.toml examples
- Fix II Rust backend: StableCell for OWNER instead of thread_local! heap
- Fix SNS token math: governance 5.2M → 5M to match 10M total
- Standardize ic-stable-structures to 0.7 across all skills
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.

Bug Report: 9 verified issues across IC Skills (build-breaking, security, broken URLs) - From Claude

1 participant