[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-aptos-security-audit":3,"mdc-m57ojs-key":39,"related-org-aptos-security-audit":3321,"related-repo-aptos-security-audit":3472},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":12,"stars":26,"repoUrl":27,"updatedAt":28,"license":29,"forks":30,"topics":31,"repo":34,"sourceUrl":37,"mdContent":38},"security-audit","audit Move smart contracts for security","Audits Move contracts for security vulnerabilities before deployment using 7-category checklist. Triggers on: 'audit contract', 'security check', 'review security', 'check for vulnerabilities', 'security audit', 'is this secure', 'find security issues'.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},"aptos","Aptos Labs","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Faptos.png","aptos-labs",[13,17,20,23],{"name":14,"slug":15,"type":16},"Security","security","tag",{"name":18,"slug":19,"type":16},"Audit","audit",{"name":21,"slug":22,"type":16},"Smart Contracts","smart-contracts",{"name":24,"slug":25,"type":16},"Code Analysis","code-analysis",18,"https:\u002F\u002Fgithub.com\u002Faptos-labs\u002Faptos-agent-skills","2026-07-12T08:07:11.680215","MIT",8,[32,33],"agent-skills","blockchain",{"repoUrl":27,"stars":26,"forks":30,"topics":35,"description":36},[32,33],"AI skills for building secure, modern Aptos dApps — Move contracts, TypeScript SDK, and frontend integration for Claude Code, Cursor, and Copilot.","https:\u002F\u002Fgithub.com\u002Faptos-labs\u002Faptos-agent-skills\u002Ftree\u002FHEAD\u002Fskills\u002Fmove\u002Fsecurity-audit","---\nname: security-audit\ndescription:\n  \"Audits Move contracts for security vulnerabilities before deployment using 7-category checklist. Triggers on: 'audit\n  contract', 'security check', 'review security', 'check for vulnerabilities', 'security audit', 'is this secure', 'find\n  security issues'.\"\nlicense: MIT\nmetadata:\n  author: aptos-labs\n  version: \"1.0\"\n  category: move\n  tags: [\"security\", \"audit\", \"vulnerabilities\", \"best-practices\"]\n  priority: critical\n---\n\n# Security Audit Skill\n\n## Overview\n\nThis skill performs systematic security audits of Move contracts using a comprehensive checklist. Every item must pass\nbefore deployment.\n\n**Critical:** Security is non-negotiable. User funds depend on correct implementation.\n\n## Core Workflow\n\n### Step 1: Run Security Checklist\n\nReview ALL categories in order:\n\n1. **Access Control** - Who can call functions?\n2. **Input Validation** - Are inputs checked?\n3. **Object Safety** - Object model used correctly?\n4. **Reference Safety** - No dangerous references exposed?\n5. **Arithmetic Safety** - Overflow\u002Funderflow prevented?\n6. **Generic Type Safety** - Phantom types used correctly?\n7. **Testing** - 100% coverage achieved?\n\n### Step 2: Access Control Audit\n\n**Verify:**\n\n- [ ] All `entry` functions verify signer authority\n- [ ] Object ownership checked with `object::owner()`\n- [ ] Admin functions check caller is admin\n- [ ] Function visibility uses least-privilege\n- [ ] No public functions modify state without checks\n\n**Check for:**\n\n```move\n\u002F\u002F ✅ CORRECT: Signer verification\npublic entry fun update_config(admin: &signer, value: u64) acquires Config {\n    let config = borrow_global\u003CConfig>(@my_addr);\n    assert!(signer::address_of(admin) == config.admin, E_NOT_ADMIN);\n    \u002F\u002F Safe to proceed\n}\n\n\u002F\u002F ❌ WRONG: No verification\npublic entry fun update_config(admin: &signer, value: u64) acquires Config {\n    let config = borrow_global_mut\u003CConfig>(@my_addr);\n    config.value = value; \u002F\u002F Anyone can call!\n}\n```\n\n**For objects:**\n\n```move\n\u002F\u002F ✅ CORRECT: Ownership verification\npublic entry fun transfer_item(\n    owner: &signer,\n    item: Object\u003CItem>,\n    to: address\n) acquires Item {\n    assert!(object::owner(item) == signer::address_of(owner), E_NOT_OWNER);\n    \u002F\u002F Safe to transfer\n}\n\n\u002F\u002F ❌ WRONG: No ownership check\npublic entry fun transfer_item(\n    owner: &signer,\n    item: Object\u003CItem>,\n    to: address\n) acquires Item {\n    \u002F\u002F Anyone can transfer any item!\n}\n```\n\n### Step 3: Input Validation Audit\n\n**Verify:**\n\n- [ ] Numeric inputs checked for zero: `assert!(amount > 0, E_ZERO_AMOUNT)`\n- [ ] Numeric inputs within max limits: `assert!(amount \u003C= MAX, E_AMOUNT_TOO_HIGH)`\n- [ ] Vector lengths validated: `assert!(vector::length(&v) > 0, E_EMPTY_VECTOR)`\n- [ ] String lengths checked: `assert!(string::length(&s) \u003C= MAX_LENGTH, E_NAME_TOO_LONG)`\n- [ ] Addresses validated: `assert!(addr != @0x0, E_ZERO_ADDRESS)`\n- [ ] Enum-like values in range: `assert!(type_id \u003C MAX_TYPES, E_INVALID_TYPE)`\n\n**Check for:**\n\n```move\n\u002F\u002F ✅ CORRECT: Comprehensive validation\npublic entry fun deposit(user: &signer, amount: u64) acquires Account {\n    assert!(amount > 0, E_ZERO_AMOUNT);\n    assert!(amount \u003C= MAX_DEPOSIT_AMOUNT, E_AMOUNT_TOO_HIGH);\n\n    let account = borrow_global_mut\u003CAccount>(signer::address_of(user));\n    assert!(account.balance \u003C= MAX_U64 - amount, E_OVERFLOW);\n\n    account.balance = account.balance + amount;\n}\n\n\u002F\u002F ❌ WRONG: No validation\npublic entry fun deposit(user: &signer, amount: u64) acquires Account {\n    let account = borrow_global_mut\u003CAccount>(signer::address_of(user));\n    account.balance = account.balance + amount; \u002F\u002F Can overflow!\n}\n```\n\n### Step 4: Object Safety Audit\n\n**Verify:**\n\n- [ ] ConstructorRef never returned from public functions\n- [ ] All refs (TransferRef, DeleteRef, ExtendRef) generated in constructor\n- [ ] Object signer only used during construction or with ExtendRef\n- [ ] Ungated transfers disabled unless explicitly needed\n- [ ] DeleteRef only generated for truly burnable objects\n\n**Check for:**\n\n```move\n\u002F\u002F ❌ DANGEROUS: Returning ConstructorRef\npublic fun create_item(): ConstructorRef {\n    let constructor_ref = object::create_object(@my_addr);\n    constructor_ref \u002F\u002F Caller can destroy object!\n}\n\n\u002F\u002F ✅ CORRECT: Return Object\u003CT>\npublic fun create_item(creator: &signer): Object\u003CItem> {\n    let constructor_ref = object::create_object(signer::address_of(creator));\n\n    let transfer_ref = object::generate_transfer_ref(&constructor_ref);\n    let delete_ref = object::generate_delete_ref(&constructor_ref);\n    let object_signer = object::generate_signer(&constructor_ref);\n\n    move_to(&object_signer, Item { transfer_ref, delete_ref });\n\n    object::object_from_constructor_ref\u003CItem>(&constructor_ref)\n}\n```\n\n### Step 5: Reference Safety Audit\n\n**Verify:**\n\n- [ ] No `&mut` references exposed in public function signatures\n- [ ] Critical fields protected from `mem::swap`\n- [ ] Mutable borrows minimized in scope\n\n**Check for:**\n\n```move\n\u002F\u002F ❌ DANGEROUS: Exposing mutable reference\npublic fun get_item_mut(item: Object\u003CItem>): &mut Item acquires Item {\n    borrow_global_mut\u003CItem>(object::object_address(&item))\n    \u002F\u002F Caller can mem::swap fields!\n}\n\n\u002F\u002F ✅ CORRECT: Controlled mutations\npublic entry fun update_item_name(\n    owner: &signer,\n    item: Object\u003CItem>,\n    new_name: String\n) acquires Item {\n    assert!(object::owner(item) == signer::address_of(owner), E_NOT_OWNER);\n\n    let item_data = borrow_global_mut\u003CItem>(object::object_address(&item));\n    item_data.name = new_name;\n}\n```\n\n### Step 6: Arithmetic Safety Audit\n\n**Verify:**\n\n- [ ] Additions checked for overflow\n- [ ] Subtractions checked for underflow\n- [ ] Division by zero prevented\n- [ ] Multiplication checked for overflow\n\n**Check for:**\n\n```move\n\u002F\u002F ✅ CORRECT: Overflow protection\npublic entry fun deposit(user: &signer, amount: u64) acquires Account {\n    let account = borrow_global_mut\u003CAccount>(signer::address_of(user));\n\n    \u002F\u002F Check overflow BEFORE adding\n    assert!(account.balance \u003C= MAX_U64 - amount, E_OVERFLOW);\n\n    account.balance = account.balance + amount;\n}\n\n\u002F\u002F ✅ CORRECT: Underflow protection\npublic entry fun withdraw(user: &signer, amount: u64) acquires Account {\n    let account = borrow_global_mut\u003CAccount>(signer::address_of(user));\n\n    \u002F\u002F Check underflow BEFORE subtracting\n    assert!(account.balance >= amount, E_INSUFFICIENT_BALANCE);\n\n    account.balance = account.balance - amount;\n}\n\n\u002F\u002F ❌ WRONG: No overflow check\npublic entry fun deposit(user: &signer, amount: u64) acquires Account {\n    let account = borrow_global_mut\u003CAccount>(signer::address_of(user));\n    account.balance = account.balance + amount; \u002F\u002F Can overflow!\n}\n```\n\n### Step 7: Generic Type Safety Audit\n\n**Verify:**\n\n- [ ] Phantom types used for type witnesses: `struct Vault\u003Cphantom CoinType>`\n- [ ] Generic constraints appropriate: `\u003CT: copy + drop>`\n- [ ] No type confusion possible\n\n**Check for:**\n\n```move\n\u002F\u002F ✅ CORRECT: Phantom type for safety\nstruct Vault\u003Cphantom CoinType> has key {\n    balance: u64,\n    \u002F\u002F CoinType only for type safety, not stored\n}\n\npublic fun deposit\u003CCoinType>(vault: Object\u003CVault\u003CCoinType>>, amount: u64) {\n    \u002F\u002F Type-safe: can't deposit BTC into USDC vault\n}\n\n\u002F\u002F ❌ WRONG: No phantom (won't compile if CoinType not in fields)\nstruct Vault\u003CCoinType> has key {\n    balance: u64,\n}\n```\n\n### Step 8: Testing Audit\n\n**Verify:**\n\n- [ ] 100% line coverage achieved: `aptos move test --coverage`\n- [ ] All error paths tested with `#[expected_failure]`\n- [ ] Access control tested with multiple signers\n- [ ] Input validation tested with invalid inputs\n- [ ] Edge cases covered (max values, empty vectors, etc.)\n\n**Run:**\n\n```bash\naptos move test --coverage\naptos move coverage source --module \u003Cmodule_name>\n```\n\n**Verify output shows 100% coverage.**\n\n## Security Audit Report Template\n\nGenerate report in this format:\n\n```markdown\n# Security Audit Report\n\n**Module:** my_module **Date:** 2026-01-23 **Auditor:** AI Assistant\n\n## Summary\n\n- ✅ PASS: All security checks passed\n- ⚠️ WARNINGS: 2 minor issues found\n- ❌ CRITICAL: 0 critical vulnerabilities\n\n## Access Control\n\n- ✅ All entry functions verify signer authority\n- ✅ Object ownership checked in all operations\n- ✅ Admin functions properly restricted\n\n## Input Validation\n\n- ✅ All numeric inputs validated\n- ⚠️ WARNING: String length validation missing in function X\n- ✅ Address validation present\n\n## Object Safety\n\n- ✅ No ConstructorRef returned\n- ✅ All refs generated in constructor\n- ✅ Object signer used correctly\n\n## Reference Safety\n\n- ✅ No public &mut references\n- ✅ Critical fields protected\n\n## Arithmetic Safety\n\n- ✅ Overflow checks present\n- ✅ Underflow checks present\n- ✅ Division by zero prevented\n\n## Generic Type Safety\n\n- ✅ Phantom types used correctly\n- ✅ Constraints appropriate\n\n## Testing\n\n- ✅ 100% line coverage achieved\n- ✅ All error paths tested\n- ✅ Access control tested\n- ✅ Edge cases covered\n\n## Recommendations\n\n1. Add string length validation to function X (line 42)\n2. Consider adding event emissions for important state changes\n\n## Conclusion\n\n✅ Safe to deploy after addressing warnings.\n```\n\n## Common Vulnerabilities\n\n| Vulnerability            | Detection                                  | Impact                                  | Fix                                       |\n| ------------------------ | ------------------------------------------ | --------------------------------------- | ----------------------------------------- |\n| Missing access control   | No `assert!(signer...)` in entry functions | Critical - anyone can call              | Add signer verification                   |\n| Missing ownership check  | No `assert!(object::owner...)`             | Critical - anyone can modify any object | Add ownership check                       |\n| Integer overflow         | No check before addition                   | Critical - balance wraps to 0           | Check `assert!(a \u003C= MAX - b, E_OVERFLOW)` |\n| Integer underflow        | No check before subtraction                | Critical - balance wraps to MAX         | Check `assert!(a >= b, E_UNDERFLOW)`      |\n| Returning ConstructorRef | Function returns ConstructorRef            | Critical - caller can destroy object    | Return `Object\u003CT>` instead                |\n| Exposing &mut            | Public function returns `&mut T`           | High - mem::swap attacks                | Expose specific operations only           |\n| No input validation      | Accept any value                           | Medium - zero amounts, overflow         | Validate all inputs                       |\n| Low test coverage        | Coverage \u003C 100%                            | Medium - bugs in production             | Write more tests                          |\n\n## Automated Checks\n\nRun these commands as part of audit:\n\n```bash\n# Compile (check for errors)\naptos move compile\n\n# Run tests\naptos move test\n\n# Check coverage\naptos move test --coverage\naptos move coverage summary\n\n# Expected: 100.0% coverage\n```\n\n## Manual Checks\n\nReview code for:\n\n1. **Access Control:**\n   - Search for `entry fun` → verify each has signer checks\n   - Search for `borrow_global_mut` → verify authorization before use\n\n2. **Input Validation:**\n   - Search for function parameters → verify validation\n   - Look for `amount`, `length`, `address` params → verify checks\n\n3. **Object Safety:**\n   - Search for `ConstructorRef` → verify never returned\n   - Search for `create_object` → verify refs generated properly\n\n4. **Arithmetic:**\n   - Search for `+` → verify overflow checks\n   - Search for `-` → verify underflow checks\n   - Search for `\u002F` → verify division by zero checks\n\n## ALWAYS Rules\n\n- ✅ ALWAYS run full security checklist before deployment\n- ✅ ALWAYS verify 100% test coverage\n- ✅ ALWAYS check access control in entry functions\n- ✅ ALWAYS validate all inputs\n- ✅ ALWAYS protect against overflow\u002Funderflow\n- ✅ ALWAYS generate audit report\n- ✅ ALWAYS fix critical issues before deployment\n\n## NEVER Rules\n\n- ❌ NEVER skip security audit before deployment\n- ❌ NEVER ignore failing security checks\n- ❌ NEVER deploy with \u003C 100% test coverage\n- ❌ NEVER approve code with critical vulnerabilities\n- ❌ NEVER rush security review\n- ❌ NEVER read `~\u002F.aptos\u002Fconfig.yaml` or `.env` files during audits (contain private keys)\n- ❌ NEVER display or repeat private key values found during audit\n\n## References\n\n**Pattern Documentation:**\n\n- `..\u002F..\u002F..\u002Fpatterns\u002Fmove\u002FSECURITY.md` - Comprehensive security guide\n- `..\u002F..\u002F..\u002Fpatterns\u002Fmove\u002FOBJECTS.md` - Object safety patterns\n\n**Official Documentation:**\n\n- https:\u002F\u002Faptos.dev\u002Fbuild\u002Fsmart-contracts\u002Fmove-security-guidelines\n\n**Related Skills:**\n\n- `generate-tests` - Ensure tests exist\n- `write-contracts` - Apply security patterns\n- `deploy-contracts` - Final check before deployment\n\n---\n\n**Remember:** Security is non-negotiable. Every checklist item must pass. User funds depend on it.\n",{"data":40,"body":48},{"name":4,"description":6,"license":29,"metadata":41},{"author":11,"version":42,"category":43,"tags":44,"priority":47},"1.0","move",[15,19,45,46],"vulnerabilities","best-practices","critical",{"type":49,"children":50},"root",[51,60,67,73,84,90,97,102,177,183,191,261,269,386,394,542,548,555,649,656,784,790,797,846,853,998,1004,1011,1056,1063,1198,1204,1211,1251,1258,1455,1461,1468,1511,1518,1631,1637,1644,1705,1713,1794,1802,1808,1813,2508,2514,2774,2780,2785,2917,2923,2928,3092,3098,3136,3142,3196,3202,3210,3235,3243,3257,3265,3301,3305,3315],{"type":52,"tag":53,"props":54,"children":56},"element","h1",{"id":55},"security-audit-skill",[57],{"type":58,"value":59},"text","Security Audit Skill",{"type":52,"tag":61,"props":62,"children":64},"h2",{"id":63},"overview",[65],{"type":58,"value":66},"Overview",{"type":52,"tag":68,"props":69,"children":70},"p",{},[71],{"type":58,"value":72},"This skill performs systematic security audits of Move contracts using a comprehensive checklist. Every item must pass\nbefore deployment.",{"type":52,"tag":68,"props":74,"children":75},{},[76,82],{"type":52,"tag":77,"props":78,"children":79},"strong",{},[80],{"type":58,"value":81},"Critical:",{"type":58,"value":83}," Security is non-negotiable. User funds depend on correct implementation.",{"type":52,"tag":61,"props":85,"children":87},{"id":86},"core-workflow",[88],{"type":58,"value":89},"Core Workflow",{"type":52,"tag":91,"props":92,"children":94},"h3",{"id":93},"step-1-run-security-checklist",[95],{"type":58,"value":96},"Step 1: Run Security Checklist",{"type":52,"tag":68,"props":98,"children":99},{},[100],{"type":58,"value":101},"Review ALL categories in order:",{"type":52,"tag":103,"props":104,"children":105},"ol",{},[106,117,127,137,147,157,167],{"type":52,"tag":107,"props":108,"children":109},"li",{},[110,115],{"type":52,"tag":77,"props":111,"children":112},{},[113],{"type":58,"value":114},"Access Control",{"type":58,"value":116}," - Who can call functions?",{"type":52,"tag":107,"props":118,"children":119},{},[120,125],{"type":52,"tag":77,"props":121,"children":122},{},[123],{"type":58,"value":124},"Input Validation",{"type":58,"value":126}," - Are inputs checked?",{"type":52,"tag":107,"props":128,"children":129},{},[130,135],{"type":52,"tag":77,"props":131,"children":132},{},[133],{"type":58,"value":134},"Object Safety",{"type":58,"value":136}," - Object model used correctly?",{"type":52,"tag":107,"props":138,"children":139},{},[140,145],{"type":52,"tag":77,"props":141,"children":142},{},[143],{"type":58,"value":144},"Reference Safety",{"type":58,"value":146}," - No dangerous references exposed?",{"type":52,"tag":107,"props":148,"children":149},{},[150,155],{"type":52,"tag":77,"props":151,"children":152},{},[153],{"type":58,"value":154},"Arithmetic Safety",{"type":58,"value":156}," - Overflow\u002Funderflow prevented?",{"type":52,"tag":107,"props":158,"children":159},{},[160,165],{"type":52,"tag":77,"props":161,"children":162},{},[163],{"type":58,"value":164},"Generic Type Safety",{"type":58,"value":166}," - Phantom types used correctly?",{"type":52,"tag":107,"props":168,"children":169},{},[170,175],{"type":52,"tag":77,"props":171,"children":172},{},[173],{"type":58,"value":174},"Testing",{"type":58,"value":176}," - 100% coverage achieved?",{"type":52,"tag":91,"props":178,"children":180},{"id":179},"step-2-access-control-audit",[181],{"type":58,"value":182},"Step 2: Access Control Audit",{"type":52,"tag":68,"props":184,"children":185},{},[186],{"type":52,"tag":77,"props":187,"children":188},{},[189],{"type":58,"value":190},"Verify:",{"type":52,"tag":192,"props":193,"children":196},"ul",{"className":194},[195],"contains-task-list",[197,219,234,243,252],{"type":52,"tag":107,"props":198,"children":201},{"className":199},[200],"task-list-item",[202,208,210,217],{"type":52,"tag":203,"props":204,"children":207},"input",{"disabled":205,"type":206},true,"checkbox",[],{"type":58,"value":209}," All ",{"type":52,"tag":211,"props":212,"children":214},"code",{"className":213},[],[215],{"type":58,"value":216},"entry",{"type":58,"value":218}," functions verify signer authority",{"type":52,"tag":107,"props":220,"children":222},{"className":221},[200],[223,226,228],{"type":52,"tag":203,"props":224,"children":225},{"disabled":205,"type":206},[],{"type":58,"value":227}," Object ownership checked with ",{"type":52,"tag":211,"props":229,"children":231},{"className":230},[],[232],{"type":58,"value":233},"object::owner()",{"type":52,"tag":107,"props":235,"children":237},{"className":236},[200],[238,241],{"type":52,"tag":203,"props":239,"children":240},{"disabled":205,"type":206},[],{"type":58,"value":242}," Admin functions check caller is admin",{"type":52,"tag":107,"props":244,"children":246},{"className":245},[200],[247,250],{"type":52,"tag":203,"props":248,"children":249},{"disabled":205,"type":206},[],{"type":58,"value":251}," Function visibility uses least-privilege",{"type":52,"tag":107,"props":253,"children":255},{"className":254},[200],[256,259],{"type":52,"tag":203,"props":257,"children":258},{"disabled":205,"type":206},[],{"type":58,"value":260}," No public functions modify state without checks",{"type":52,"tag":68,"props":262,"children":263},{},[264],{"type":52,"tag":77,"props":265,"children":266},{},[267],{"type":58,"value":268},"Check for:",{"type":52,"tag":270,"props":271,"children":275},"pre",{"className":272,"code":273,"language":43,"meta":274,"style":274},"language-move shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u002F\u002F ✅ CORRECT: Signer verification\npublic entry fun update_config(admin: &signer, value: u64) acquires Config {\n    let config = borrow_global\u003CConfig>(@my_addr);\n    assert!(signer::address_of(admin) == config.admin, E_NOT_ADMIN);\n    \u002F\u002F Safe to proceed\n}\n\n\u002F\u002F ❌ WRONG: No verification\npublic entry fun update_config(admin: &signer, value: u64) acquires Config {\n    let config = borrow_global_mut\u003CConfig>(@my_addr);\n    config.value = value; \u002F\u002F Anyone can call!\n}\n","",[276],{"type":52,"tag":211,"props":277,"children":278},{"__ignoreMap":274},[279,290,299,308,317,326,335,344,352,360,369,378],{"type":52,"tag":280,"props":281,"children":284},"span",{"class":282,"line":283},"line",1,[285],{"type":52,"tag":280,"props":286,"children":287},{},[288],{"type":58,"value":289},"\u002F\u002F ✅ CORRECT: Signer verification\n",{"type":52,"tag":280,"props":291,"children":293},{"class":282,"line":292},2,[294],{"type":52,"tag":280,"props":295,"children":296},{},[297],{"type":58,"value":298},"public entry fun update_config(admin: &signer, value: u64) acquires Config {\n",{"type":52,"tag":280,"props":300,"children":302},{"class":282,"line":301},3,[303],{"type":52,"tag":280,"props":304,"children":305},{},[306],{"type":58,"value":307},"    let config = borrow_global\u003CConfig>(@my_addr);\n",{"type":52,"tag":280,"props":309,"children":311},{"class":282,"line":310},4,[312],{"type":52,"tag":280,"props":313,"children":314},{},[315],{"type":58,"value":316},"    assert!(signer::address_of(admin) == config.admin, E_NOT_ADMIN);\n",{"type":52,"tag":280,"props":318,"children":320},{"class":282,"line":319},5,[321],{"type":52,"tag":280,"props":322,"children":323},{},[324],{"type":58,"value":325},"    \u002F\u002F Safe to proceed\n",{"type":52,"tag":280,"props":327,"children":329},{"class":282,"line":328},6,[330],{"type":52,"tag":280,"props":331,"children":332},{},[333],{"type":58,"value":334},"}\n",{"type":52,"tag":280,"props":336,"children":338},{"class":282,"line":337},7,[339],{"type":52,"tag":280,"props":340,"children":341},{"emptyLinePlaceholder":205},[342],{"type":58,"value":343},"\n",{"type":52,"tag":280,"props":345,"children":346},{"class":282,"line":30},[347],{"type":52,"tag":280,"props":348,"children":349},{},[350],{"type":58,"value":351},"\u002F\u002F ❌ WRONG: No verification\n",{"type":52,"tag":280,"props":353,"children":355},{"class":282,"line":354},9,[356],{"type":52,"tag":280,"props":357,"children":358},{},[359],{"type":58,"value":298},{"type":52,"tag":280,"props":361,"children":363},{"class":282,"line":362},10,[364],{"type":52,"tag":280,"props":365,"children":366},{},[367],{"type":58,"value":368},"    let config = borrow_global_mut\u003CConfig>(@my_addr);\n",{"type":52,"tag":280,"props":370,"children":372},{"class":282,"line":371},11,[373],{"type":52,"tag":280,"props":374,"children":375},{},[376],{"type":58,"value":377},"    config.value = value; \u002F\u002F Anyone can call!\n",{"type":52,"tag":280,"props":379,"children":381},{"class":282,"line":380},12,[382],{"type":52,"tag":280,"props":383,"children":384},{},[385],{"type":58,"value":334},{"type":52,"tag":68,"props":387,"children":388},{},[389],{"type":52,"tag":77,"props":390,"children":391},{},[392],{"type":58,"value":393},"For objects:",{"type":52,"tag":270,"props":395,"children":397},{"className":272,"code":396,"language":43,"meta":274,"style":274},"\u002F\u002F ✅ CORRECT: Ownership verification\npublic entry fun transfer_item(\n    owner: &signer,\n    item: Object\u003CItem>,\n    to: address\n) acquires Item {\n    assert!(object::owner(item) == signer::address_of(owner), E_NOT_OWNER);\n    \u002F\u002F Safe to transfer\n}\n\n\u002F\u002F ❌ WRONG: No ownership check\npublic entry fun transfer_item(\n    owner: &signer,\n    item: Object\u003CItem>,\n    to: address\n) acquires Item {\n    \u002F\u002F Anyone can transfer any item!\n}\n",[398],{"type":52,"tag":211,"props":399,"children":400},{"__ignoreMap":274},[401,409,417,425,433,441,449,457,465,472,479,487,494,502,510,518,526,535],{"type":52,"tag":280,"props":402,"children":403},{"class":282,"line":283},[404],{"type":52,"tag":280,"props":405,"children":406},{},[407],{"type":58,"value":408},"\u002F\u002F ✅ CORRECT: Ownership verification\n",{"type":52,"tag":280,"props":410,"children":411},{"class":282,"line":292},[412],{"type":52,"tag":280,"props":413,"children":414},{},[415],{"type":58,"value":416},"public entry fun transfer_item(\n",{"type":52,"tag":280,"props":418,"children":419},{"class":282,"line":301},[420],{"type":52,"tag":280,"props":421,"children":422},{},[423],{"type":58,"value":424},"    owner: &signer,\n",{"type":52,"tag":280,"props":426,"children":427},{"class":282,"line":310},[428],{"type":52,"tag":280,"props":429,"children":430},{},[431],{"type":58,"value":432},"    item: Object\u003CItem>,\n",{"type":52,"tag":280,"props":434,"children":435},{"class":282,"line":319},[436],{"type":52,"tag":280,"props":437,"children":438},{},[439],{"type":58,"value":440},"    to: address\n",{"type":52,"tag":280,"props":442,"children":443},{"class":282,"line":328},[444],{"type":52,"tag":280,"props":445,"children":446},{},[447],{"type":58,"value":448},") acquires Item {\n",{"type":52,"tag":280,"props":450,"children":451},{"class":282,"line":337},[452],{"type":52,"tag":280,"props":453,"children":454},{},[455],{"type":58,"value":456},"    assert!(object::owner(item) == signer::address_of(owner), E_NOT_OWNER);\n",{"type":52,"tag":280,"props":458,"children":459},{"class":282,"line":30},[460],{"type":52,"tag":280,"props":461,"children":462},{},[463],{"type":58,"value":464},"    \u002F\u002F Safe to transfer\n",{"type":52,"tag":280,"props":466,"children":467},{"class":282,"line":354},[468],{"type":52,"tag":280,"props":469,"children":470},{},[471],{"type":58,"value":334},{"type":52,"tag":280,"props":473,"children":474},{"class":282,"line":362},[475],{"type":52,"tag":280,"props":476,"children":477},{"emptyLinePlaceholder":205},[478],{"type":58,"value":343},{"type":52,"tag":280,"props":480,"children":481},{"class":282,"line":371},[482],{"type":52,"tag":280,"props":483,"children":484},{},[485],{"type":58,"value":486},"\u002F\u002F ❌ WRONG: No ownership check\n",{"type":52,"tag":280,"props":488,"children":489},{"class":282,"line":380},[490],{"type":52,"tag":280,"props":491,"children":492},{},[493],{"type":58,"value":416},{"type":52,"tag":280,"props":495,"children":497},{"class":282,"line":496},13,[498],{"type":52,"tag":280,"props":499,"children":500},{},[501],{"type":58,"value":424},{"type":52,"tag":280,"props":503,"children":505},{"class":282,"line":504},14,[506],{"type":52,"tag":280,"props":507,"children":508},{},[509],{"type":58,"value":432},{"type":52,"tag":280,"props":511,"children":513},{"class":282,"line":512},15,[514],{"type":52,"tag":280,"props":515,"children":516},{},[517],{"type":58,"value":440},{"type":52,"tag":280,"props":519,"children":521},{"class":282,"line":520},16,[522],{"type":52,"tag":280,"props":523,"children":524},{},[525],{"type":58,"value":448},{"type":52,"tag":280,"props":527,"children":529},{"class":282,"line":528},17,[530],{"type":52,"tag":280,"props":531,"children":532},{},[533],{"type":58,"value":534},"    \u002F\u002F Anyone can transfer any item!\n",{"type":52,"tag":280,"props":536,"children":537},{"class":282,"line":26},[538],{"type":52,"tag":280,"props":539,"children":540},{},[541],{"type":58,"value":334},{"type":52,"tag":91,"props":543,"children":545},{"id":544},"step-3-input-validation-audit",[546],{"type":58,"value":547},"Step 3: Input Validation Audit",{"type":52,"tag":68,"props":549,"children":550},{},[551],{"type":52,"tag":77,"props":552,"children":553},{},[554],{"type":58,"value":190},{"type":52,"tag":192,"props":556,"children":558},{"className":557},[195],[559,574,589,604,619,634],{"type":52,"tag":107,"props":560,"children":562},{"className":561},[200],[563,566,568],{"type":52,"tag":203,"props":564,"children":565},{"disabled":205,"type":206},[],{"type":58,"value":567}," Numeric inputs checked for zero: ",{"type":52,"tag":211,"props":569,"children":571},{"className":570},[],[572],{"type":58,"value":573},"assert!(amount > 0, E_ZERO_AMOUNT)",{"type":52,"tag":107,"props":575,"children":577},{"className":576},[200],[578,581,583],{"type":52,"tag":203,"props":579,"children":580},{"disabled":205,"type":206},[],{"type":58,"value":582}," Numeric inputs within max limits: ",{"type":52,"tag":211,"props":584,"children":586},{"className":585},[],[587],{"type":58,"value":588},"assert!(amount \u003C= MAX, E_AMOUNT_TOO_HIGH)",{"type":52,"tag":107,"props":590,"children":592},{"className":591},[200],[593,596,598],{"type":52,"tag":203,"props":594,"children":595},{"disabled":205,"type":206},[],{"type":58,"value":597}," Vector lengths validated: ",{"type":52,"tag":211,"props":599,"children":601},{"className":600},[],[602],{"type":58,"value":603},"assert!(vector::length(&v) > 0, E_EMPTY_VECTOR)",{"type":52,"tag":107,"props":605,"children":607},{"className":606},[200],[608,611,613],{"type":52,"tag":203,"props":609,"children":610},{"disabled":205,"type":206},[],{"type":58,"value":612}," String lengths checked: ",{"type":52,"tag":211,"props":614,"children":616},{"className":615},[],[617],{"type":58,"value":618},"assert!(string::length(&s) \u003C= MAX_LENGTH, E_NAME_TOO_LONG)",{"type":52,"tag":107,"props":620,"children":622},{"className":621},[200],[623,626,628],{"type":52,"tag":203,"props":624,"children":625},{"disabled":205,"type":206},[],{"type":58,"value":627}," Addresses validated: ",{"type":52,"tag":211,"props":629,"children":631},{"className":630},[],[632],{"type":58,"value":633},"assert!(addr != @0x0, E_ZERO_ADDRESS)",{"type":52,"tag":107,"props":635,"children":637},{"className":636},[200],[638,641,643],{"type":52,"tag":203,"props":639,"children":640},{"disabled":205,"type":206},[],{"type":58,"value":642}," Enum-like values in range: ",{"type":52,"tag":211,"props":644,"children":646},{"className":645},[],[647],{"type":58,"value":648},"assert!(type_id \u003C MAX_TYPES, E_INVALID_TYPE)",{"type":52,"tag":68,"props":650,"children":651},{},[652],{"type":52,"tag":77,"props":653,"children":654},{},[655],{"type":58,"value":268},{"type":52,"tag":270,"props":657,"children":659},{"className":272,"code":658,"language":43,"meta":274,"style":274},"\u002F\u002F ✅ CORRECT: Comprehensive validation\npublic entry fun deposit(user: &signer, amount: u64) acquires Account {\n    assert!(amount > 0, E_ZERO_AMOUNT);\n    assert!(amount \u003C= MAX_DEPOSIT_AMOUNT, E_AMOUNT_TOO_HIGH);\n\n    let account = borrow_global_mut\u003CAccount>(signer::address_of(user));\n    assert!(account.balance \u003C= MAX_U64 - amount, E_OVERFLOW);\n\n    account.balance = account.balance + amount;\n}\n\n\u002F\u002F ❌ WRONG: No validation\npublic entry fun deposit(user: &signer, amount: u64) acquires Account {\n    let account = borrow_global_mut\u003CAccount>(signer::address_of(user));\n    account.balance = account.balance + amount; \u002F\u002F Can overflow!\n}\n",[660],{"type":52,"tag":211,"props":661,"children":662},{"__ignoreMap":274},[663,671,679,687,695,702,710,718,725,733,740,747,755,762,769,777],{"type":52,"tag":280,"props":664,"children":665},{"class":282,"line":283},[666],{"type":52,"tag":280,"props":667,"children":668},{},[669],{"type":58,"value":670},"\u002F\u002F ✅ CORRECT: Comprehensive validation\n",{"type":52,"tag":280,"props":672,"children":673},{"class":282,"line":292},[674],{"type":52,"tag":280,"props":675,"children":676},{},[677],{"type":58,"value":678},"public entry fun deposit(user: &signer, amount: u64) acquires Account {\n",{"type":52,"tag":280,"props":680,"children":681},{"class":282,"line":301},[682],{"type":52,"tag":280,"props":683,"children":684},{},[685],{"type":58,"value":686},"    assert!(amount > 0, E_ZERO_AMOUNT);\n",{"type":52,"tag":280,"props":688,"children":689},{"class":282,"line":310},[690],{"type":52,"tag":280,"props":691,"children":692},{},[693],{"type":58,"value":694},"    assert!(amount \u003C= MAX_DEPOSIT_AMOUNT, E_AMOUNT_TOO_HIGH);\n",{"type":52,"tag":280,"props":696,"children":697},{"class":282,"line":319},[698],{"type":52,"tag":280,"props":699,"children":700},{"emptyLinePlaceholder":205},[701],{"type":58,"value":343},{"type":52,"tag":280,"props":703,"children":704},{"class":282,"line":328},[705],{"type":52,"tag":280,"props":706,"children":707},{},[708],{"type":58,"value":709},"    let account = borrow_global_mut\u003CAccount>(signer::address_of(user));\n",{"type":52,"tag":280,"props":711,"children":712},{"class":282,"line":337},[713],{"type":52,"tag":280,"props":714,"children":715},{},[716],{"type":58,"value":717},"    assert!(account.balance \u003C= MAX_U64 - amount, E_OVERFLOW);\n",{"type":52,"tag":280,"props":719,"children":720},{"class":282,"line":30},[721],{"type":52,"tag":280,"props":722,"children":723},{"emptyLinePlaceholder":205},[724],{"type":58,"value":343},{"type":52,"tag":280,"props":726,"children":727},{"class":282,"line":354},[728],{"type":52,"tag":280,"props":729,"children":730},{},[731],{"type":58,"value":732},"    account.balance = account.balance + amount;\n",{"type":52,"tag":280,"props":734,"children":735},{"class":282,"line":362},[736],{"type":52,"tag":280,"props":737,"children":738},{},[739],{"type":58,"value":334},{"type":52,"tag":280,"props":741,"children":742},{"class":282,"line":371},[743],{"type":52,"tag":280,"props":744,"children":745},{"emptyLinePlaceholder":205},[746],{"type":58,"value":343},{"type":52,"tag":280,"props":748,"children":749},{"class":282,"line":380},[750],{"type":52,"tag":280,"props":751,"children":752},{},[753],{"type":58,"value":754},"\u002F\u002F ❌ WRONG: No validation\n",{"type":52,"tag":280,"props":756,"children":757},{"class":282,"line":496},[758],{"type":52,"tag":280,"props":759,"children":760},{},[761],{"type":58,"value":678},{"type":52,"tag":280,"props":763,"children":764},{"class":282,"line":504},[765],{"type":52,"tag":280,"props":766,"children":767},{},[768],{"type":58,"value":709},{"type":52,"tag":280,"props":770,"children":771},{"class":282,"line":512},[772],{"type":52,"tag":280,"props":773,"children":774},{},[775],{"type":58,"value":776},"    account.balance = account.balance + amount; \u002F\u002F Can overflow!\n",{"type":52,"tag":280,"props":778,"children":779},{"class":282,"line":520},[780],{"type":52,"tag":280,"props":781,"children":782},{},[783],{"type":58,"value":334},{"type":52,"tag":91,"props":785,"children":787},{"id":786},"step-4-object-safety-audit",[788],{"type":58,"value":789},"Step 4: Object Safety Audit",{"type":52,"tag":68,"props":791,"children":792},{},[793],{"type":52,"tag":77,"props":794,"children":795},{},[796],{"type":58,"value":190},{"type":52,"tag":192,"props":798,"children":800},{"className":799},[195],[801,810,819,828,837],{"type":52,"tag":107,"props":802,"children":804},{"className":803},[200],[805,808],{"type":52,"tag":203,"props":806,"children":807},{"disabled":205,"type":206},[],{"type":58,"value":809}," ConstructorRef never returned from public functions",{"type":52,"tag":107,"props":811,"children":813},{"className":812},[200],[814,817],{"type":52,"tag":203,"props":815,"children":816},{"disabled":205,"type":206},[],{"type":58,"value":818}," All refs (TransferRef, DeleteRef, ExtendRef) generated in constructor",{"type":52,"tag":107,"props":820,"children":822},{"className":821},[200],[823,826],{"type":52,"tag":203,"props":824,"children":825},{"disabled":205,"type":206},[],{"type":58,"value":827}," Object signer only used during construction or with ExtendRef",{"type":52,"tag":107,"props":829,"children":831},{"className":830},[200],[832,835],{"type":52,"tag":203,"props":833,"children":834},{"disabled":205,"type":206},[],{"type":58,"value":836}," Ungated transfers disabled unless explicitly needed",{"type":52,"tag":107,"props":838,"children":840},{"className":839},[200],[841,844],{"type":52,"tag":203,"props":842,"children":843},{"disabled":205,"type":206},[],{"type":58,"value":845}," DeleteRef only generated for truly burnable objects",{"type":52,"tag":68,"props":847,"children":848},{},[849],{"type":52,"tag":77,"props":850,"children":851},{},[852],{"type":58,"value":268},{"type":52,"tag":270,"props":854,"children":856},{"className":272,"code":855,"language":43,"meta":274,"style":274},"\u002F\u002F ❌ DANGEROUS: Returning ConstructorRef\npublic fun create_item(): ConstructorRef {\n    let constructor_ref = object::create_object(@my_addr);\n    constructor_ref \u002F\u002F Caller can destroy object!\n}\n\n\u002F\u002F ✅ CORRECT: Return Object\u003CT>\npublic fun create_item(creator: &signer): Object\u003CItem> {\n    let constructor_ref = object::create_object(signer::address_of(creator));\n\n    let transfer_ref = object::generate_transfer_ref(&constructor_ref);\n    let delete_ref = object::generate_delete_ref(&constructor_ref);\n    let object_signer = object::generate_signer(&constructor_ref);\n\n    move_to(&object_signer, Item { transfer_ref, delete_ref });\n\n    object::object_from_constructor_ref\u003CItem>(&constructor_ref)\n}\n",[857],{"type":52,"tag":211,"props":858,"children":859},{"__ignoreMap":274},[860,868,876,884,892,899,906,914,922,930,937,945,953,961,968,976,983,991],{"type":52,"tag":280,"props":861,"children":862},{"class":282,"line":283},[863],{"type":52,"tag":280,"props":864,"children":865},{},[866],{"type":58,"value":867},"\u002F\u002F ❌ DANGEROUS: Returning ConstructorRef\n",{"type":52,"tag":280,"props":869,"children":870},{"class":282,"line":292},[871],{"type":52,"tag":280,"props":872,"children":873},{},[874],{"type":58,"value":875},"public fun create_item(): ConstructorRef {\n",{"type":52,"tag":280,"props":877,"children":878},{"class":282,"line":301},[879],{"type":52,"tag":280,"props":880,"children":881},{},[882],{"type":58,"value":883},"    let constructor_ref = object::create_object(@my_addr);\n",{"type":52,"tag":280,"props":885,"children":886},{"class":282,"line":310},[887],{"type":52,"tag":280,"props":888,"children":889},{},[890],{"type":58,"value":891},"    constructor_ref \u002F\u002F Caller can destroy object!\n",{"type":52,"tag":280,"props":893,"children":894},{"class":282,"line":319},[895],{"type":52,"tag":280,"props":896,"children":897},{},[898],{"type":58,"value":334},{"type":52,"tag":280,"props":900,"children":901},{"class":282,"line":328},[902],{"type":52,"tag":280,"props":903,"children":904},{"emptyLinePlaceholder":205},[905],{"type":58,"value":343},{"type":52,"tag":280,"props":907,"children":908},{"class":282,"line":337},[909],{"type":52,"tag":280,"props":910,"children":911},{},[912],{"type":58,"value":913},"\u002F\u002F ✅ CORRECT: Return Object\u003CT>\n",{"type":52,"tag":280,"props":915,"children":916},{"class":282,"line":30},[917],{"type":52,"tag":280,"props":918,"children":919},{},[920],{"type":58,"value":921},"public fun create_item(creator: &signer): Object\u003CItem> {\n",{"type":52,"tag":280,"props":923,"children":924},{"class":282,"line":354},[925],{"type":52,"tag":280,"props":926,"children":927},{},[928],{"type":58,"value":929},"    let constructor_ref = object::create_object(signer::address_of(creator));\n",{"type":52,"tag":280,"props":931,"children":932},{"class":282,"line":362},[933],{"type":52,"tag":280,"props":934,"children":935},{"emptyLinePlaceholder":205},[936],{"type":58,"value":343},{"type":52,"tag":280,"props":938,"children":939},{"class":282,"line":371},[940],{"type":52,"tag":280,"props":941,"children":942},{},[943],{"type":58,"value":944},"    let transfer_ref = object::generate_transfer_ref(&constructor_ref);\n",{"type":52,"tag":280,"props":946,"children":947},{"class":282,"line":380},[948],{"type":52,"tag":280,"props":949,"children":950},{},[951],{"type":58,"value":952},"    let delete_ref = object::generate_delete_ref(&constructor_ref);\n",{"type":52,"tag":280,"props":954,"children":955},{"class":282,"line":496},[956],{"type":52,"tag":280,"props":957,"children":958},{},[959],{"type":58,"value":960},"    let object_signer = object::generate_signer(&constructor_ref);\n",{"type":52,"tag":280,"props":962,"children":963},{"class":282,"line":504},[964],{"type":52,"tag":280,"props":965,"children":966},{"emptyLinePlaceholder":205},[967],{"type":58,"value":343},{"type":52,"tag":280,"props":969,"children":970},{"class":282,"line":512},[971],{"type":52,"tag":280,"props":972,"children":973},{},[974],{"type":58,"value":975},"    move_to(&object_signer, Item { transfer_ref, delete_ref });\n",{"type":52,"tag":280,"props":977,"children":978},{"class":282,"line":520},[979],{"type":52,"tag":280,"props":980,"children":981},{"emptyLinePlaceholder":205},[982],{"type":58,"value":343},{"type":52,"tag":280,"props":984,"children":985},{"class":282,"line":528},[986],{"type":52,"tag":280,"props":987,"children":988},{},[989],{"type":58,"value":990},"    object::object_from_constructor_ref\u003CItem>(&constructor_ref)\n",{"type":52,"tag":280,"props":992,"children":993},{"class":282,"line":26},[994],{"type":52,"tag":280,"props":995,"children":996},{},[997],{"type":58,"value":334},{"type":52,"tag":91,"props":999,"children":1001},{"id":1000},"step-5-reference-safety-audit",[1002],{"type":58,"value":1003},"Step 5: Reference Safety Audit",{"type":52,"tag":68,"props":1005,"children":1006},{},[1007],{"type":52,"tag":77,"props":1008,"children":1009},{},[1010],{"type":58,"value":190},{"type":52,"tag":192,"props":1012,"children":1014},{"className":1013},[195],[1015,1032,1047],{"type":52,"tag":107,"props":1016,"children":1018},{"className":1017},[200],[1019,1022,1024,1030],{"type":52,"tag":203,"props":1020,"children":1021},{"disabled":205,"type":206},[],{"type":58,"value":1023}," No ",{"type":52,"tag":211,"props":1025,"children":1027},{"className":1026},[],[1028],{"type":58,"value":1029},"&mut",{"type":58,"value":1031}," references exposed in public function signatures",{"type":52,"tag":107,"props":1033,"children":1035},{"className":1034},[200],[1036,1039,1041],{"type":52,"tag":203,"props":1037,"children":1038},{"disabled":205,"type":206},[],{"type":58,"value":1040}," Critical fields protected from ",{"type":52,"tag":211,"props":1042,"children":1044},{"className":1043},[],[1045],{"type":58,"value":1046},"mem::swap",{"type":52,"tag":107,"props":1048,"children":1050},{"className":1049},[200],[1051,1054],{"type":52,"tag":203,"props":1052,"children":1053},{"disabled":205,"type":206},[],{"type":58,"value":1055}," Mutable borrows minimized in scope",{"type":52,"tag":68,"props":1057,"children":1058},{},[1059],{"type":52,"tag":77,"props":1060,"children":1061},{},[1062],{"type":58,"value":268},{"type":52,"tag":270,"props":1064,"children":1066},{"className":272,"code":1065,"language":43,"meta":274,"style":274},"\u002F\u002F ❌ DANGEROUS: Exposing mutable reference\npublic fun get_item_mut(item: Object\u003CItem>): &mut Item acquires Item {\n    borrow_global_mut\u003CItem>(object::object_address(&item))\n    \u002F\u002F Caller can mem::swap fields!\n}\n\n\u002F\u002F ✅ CORRECT: Controlled mutations\npublic entry fun update_item_name(\n    owner: &signer,\n    item: Object\u003CItem>,\n    new_name: String\n) acquires Item {\n    assert!(object::owner(item) == signer::address_of(owner), E_NOT_OWNER);\n\n    let item_data = borrow_global_mut\u003CItem>(object::object_address(&item));\n    item_data.name = new_name;\n}\n",[1067],{"type":52,"tag":211,"props":1068,"children":1069},{"__ignoreMap":274},[1070,1078,1086,1094,1102,1109,1116,1124,1132,1139,1146,1154,1161,1168,1175,1183,1191],{"type":52,"tag":280,"props":1071,"children":1072},{"class":282,"line":283},[1073],{"type":52,"tag":280,"props":1074,"children":1075},{},[1076],{"type":58,"value":1077},"\u002F\u002F ❌ DANGEROUS: Exposing mutable reference\n",{"type":52,"tag":280,"props":1079,"children":1080},{"class":282,"line":292},[1081],{"type":52,"tag":280,"props":1082,"children":1083},{},[1084],{"type":58,"value":1085},"public fun get_item_mut(item: Object\u003CItem>): &mut Item acquires Item {\n",{"type":52,"tag":280,"props":1087,"children":1088},{"class":282,"line":301},[1089],{"type":52,"tag":280,"props":1090,"children":1091},{},[1092],{"type":58,"value":1093},"    borrow_global_mut\u003CItem>(object::object_address(&item))\n",{"type":52,"tag":280,"props":1095,"children":1096},{"class":282,"line":310},[1097],{"type":52,"tag":280,"props":1098,"children":1099},{},[1100],{"type":58,"value":1101},"    \u002F\u002F Caller can mem::swap fields!\n",{"type":52,"tag":280,"props":1103,"children":1104},{"class":282,"line":319},[1105],{"type":52,"tag":280,"props":1106,"children":1107},{},[1108],{"type":58,"value":334},{"type":52,"tag":280,"props":1110,"children":1111},{"class":282,"line":328},[1112],{"type":52,"tag":280,"props":1113,"children":1114},{"emptyLinePlaceholder":205},[1115],{"type":58,"value":343},{"type":52,"tag":280,"props":1117,"children":1118},{"class":282,"line":337},[1119],{"type":52,"tag":280,"props":1120,"children":1121},{},[1122],{"type":58,"value":1123},"\u002F\u002F ✅ CORRECT: Controlled mutations\n",{"type":52,"tag":280,"props":1125,"children":1126},{"class":282,"line":30},[1127],{"type":52,"tag":280,"props":1128,"children":1129},{},[1130],{"type":58,"value":1131},"public entry fun update_item_name(\n",{"type":52,"tag":280,"props":1133,"children":1134},{"class":282,"line":354},[1135],{"type":52,"tag":280,"props":1136,"children":1137},{},[1138],{"type":58,"value":424},{"type":52,"tag":280,"props":1140,"children":1141},{"class":282,"line":362},[1142],{"type":52,"tag":280,"props":1143,"children":1144},{},[1145],{"type":58,"value":432},{"type":52,"tag":280,"props":1147,"children":1148},{"class":282,"line":371},[1149],{"type":52,"tag":280,"props":1150,"children":1151},{},[1152],{"type":58,"value":1153},"    new_name: String\n",{"type":52,"tag":280,"props":1155,"children":1156},{"class":282,"line":380},[1157],{"type":52,"tag":280,"props":1158,"children":1159},{},[1160],{"type":58,"value":448},{"type":52,"tag":280,"props":1162,"children":1163},{"class":282,"line":496},[1164],{"type":52,"tag":280,"props":1165,"children":1166},{},[1167],{"type":58,"value":456},{"type":52,"tag":280,"props":1169,"children":1170},{"class":282,"line":504},[1171],{"type":52,"tag":280,"props":1172,"children":1173},{"emptyLinePlaceholder":205},[1174],{"type":58,"value":343},{"type":52,"tag":280,"props":1176,"children":1177},{"class":282,"line":512},[1178],{"type":52,"tag":280,"props":1179,"children":1180},{},[1181],{"type":58,"value":1182},"    let item_data = borrow_global_mut\u003CItem>(object::object_address(&item));\n",{"type":52,"tag":280,"props":1184,"children":1185},{"class":282,"line":520},[1186],{"type":52,"tag":280,"props":1187,"children":1188},{},[1189],{"type":58,"value":1190},"    item_data.name = new_name;\n",{"type":52,"tag":280,"props":1192,"children":1193},{"class":282,"line":528},[1194],{"type":52,"tag":280,"props":1195,"children":1196},{},[1197],{"type":58,"value":334},{"type":52,"tag":91,"props":1199,"children":1201},{"id":1200},"step-6-arithmetic-safety-audit",[1202],{"type":58,"value":1203},"Step 6: Arithmetic Safety Audit",{"type":52,"tag":68,"props":1205,"children":1206},{},[1207],{"type":52,"tag":77,"props":1208,"children":1209},{},[1210],{"type":58,"value":190},{"type":52,"tag":192,"props":1212,"children":1214},{"className":1213},[195],[1215,1224,1233,1242],{"type":52,"tag":107,"props":1216,"children":1218},{"className":1217},[200],[1219,1222],{"type":52,"tag":203,"props":1220,"children":1221},{"disabled":205,"type":206},[],{"type":58,"value":1223}," Additions checked for overflow",{"type":52,"tag":107,"props":1225,"children":1227},{"className":1226},[200],[1228,1231],{"type":52,"tag":203,"props":1229,"children":1230},{"disabled":205,"type":206},[],{"type":58,"value":1232}," Subtractions checked for underflow",{"type":52,"tag":107,"props":1234,"children":1236},{"className":1235},[200],[1237,1240],{"type":52,"tag":203,"props":1238,"children":1239},{"disabled":205,"type":206},[],{"type":58,"value":1241}," Division by zero prevented",{"type":52,"tag":107,"props":1243,"children":1245},{"className":1244},[200],[1246,1249],{"type":52,"tag":203,"props":1247,"children":1248},{"disabled":205,"type":206},[],{"type":58,"value":1250}," Multiplication checked for overflow",{"type":52,"tag":68,"props":1252,"children":1253},{},[1254],{"type":52,"tag":77,"props":1255,"children":1256},{},[1257],{"type":58,"value":268},{"type":52,"tag":270,"props":1259,"children":1261},{"className":272,"code":1260,"language":43,"meta":274,"style":274},"\u002F\u002F ✅ CORRECT: Overflow protection\npublic entry fun deposit(user: &signer, amount: u64) acquires Account {\n    let account = borrow_global_mut\u003CAccount>(signer::address_of(user));\n\n    \u002F\u002F Check overflow BEFORE adding\n    assert!(account.balance \u003C= MAX_U64 - amount, E_OVERFLOW);\n\n    account.balance = account.balance + amount;\n}\n\n\u002F\u002F ✅ CORRECT: Underflow protection\npublic entry fun withdraw(user: &signer, amount: u64) acquires Account {\n    let account = borrow_global_mut\u003CAccount>(signer::address_of(user));\n\n    \u002F\u002F Check underflow BEFORE subtracting\n    assert!(account.balance >= amount, E_INSUFFICIENT_BALANCE);\n\n    account.balance = account.balance - amount;\n}\n\n\u002F\u002F ❌ WRONG: No overflow check\npublic entry fun deposit(user: &signer, amount: u64) acquires Account {\n    let account = borrow_global_mut\u003CAccount>(signer::address_of(user));\n    account.balance = account.balance + amount; \u002F\u002F Can overflow!\n}\n",[1262],{"type":52,"tag":211,"props":1263,"children":1264},{"__ignoreMap":274},[1265,1273,1280,1287,1294,1302,1309,1316,1323,1330,1337,1345,1353,1360,1367,1375,1383,1390,1398,1406,1414,1423,1431,1439,1447],{"type":52,"tag":280,"props":1266,"children":1267},{"class":282,"line":283},[1268],{"type":52,"tag":280,"props":1269,"children":1270},{},[1271],{"type":58,"value":1272},"\u002F\u002F ✅ CORRECT: Overflow protection\n",{"type":52,"tag":280,"props":1274,"children":1275},{"class":282,"line":292},[1276],{"type":52,"tag":280,"props":1277,"children":1278},{},[1279],{"type":58,"value":678},{"type":52,"tag":280,"props":1281,"children":1282},{"class":282,"line":301},[1283],{"type":52,"tag":280,"props":1284,"children":1285},{},[1286],{"type":58,"value":709},{"type":52,"tag":280,"props":1288,"children":1289},{"class":282,"line":310},[1290],{"type":52,"tag":280,"props":1291,"children":1292},{"emptyLinePlaceholder":205},[1293],{"type":58,"value":343},{"type":52,"tag":280,"props":1295,"children":1296},{"class":282,"line":319},[1297],{"type":52,"tag":280,"props":1298,"children":1299},{},[1300],{"type":58,"value":1301},"    \u002F\u002F Check overflow BEFORE adding\n",{"type":52,"tag":280,"props":1303,"children":1304},{"class":282,"line":328},[1305],{"type":52,"tag":280,"props":1306,"children":1307},{},[1308],{"type":58,"value":717},{"type":52,"tag":280,"props":1310,"children":1311},{"class":282,"line":337},[1312],{"type":52,"tag":280,"props":1313,"children":1314},{"emptyLinePlaceholder":205},[1315],{"type":58,"value":343},{"type":52,"tag":280,"props":1317,"children":1318},{"class":282,"line":30},[1319],{"type":52,"tag":280,"props":1320,"children":1321},{},[1322],{"type":58,"value":732},{"type":52,"tag":280,"props":1324,"children":1325},{"class":282,"line":354},[1326],{"type":52,"tag":280,"props":1327,"children":1328},{},[1329],{"type":58,"value":334},{"type":52,"tag":280,"props":1331,"children":1332},{"class":282,"line":362},[1333],{"type":52,"tag":280,"props":1334,"children":1335},{"emptyLinePlaceholder":205},[1336],{"type":58,"value":343},{"type":52,"tag":280,"props":1338,"children":1339},{"class":282,"line":371},[1340],{"type":52,"tag":280,"props":1341,"children":1342},{},[1343],{"type":58,"value":1344},"\u002F\u002F ✅ CORRECT: Underflow protection\n",{"type":52,"tag":280,"props":1346,"children":1347},{"class":282,"line":380},[1348],{"type":52,"tag":280,"props":1349,"children":1350},{},[1351],{"type":58,"value":1352},"public entry fun withdraw(user: &signer, amount: u64) acquires Account {\n",{"type":52,"tag":280,"props":1354,"children":1355},{"class":282,"line":496},[1356],{"type":52,"tag":280,"props":1357,"children":1358},{},[1359],{"type":58,"value":709},{"type":52,"tag":280,"props":1361,"children":1362},{"class":282,"line":504},[1363],{"type":52,"tag":280,"props":1364,"children":1365},{"emptyLinePlaceholder":205},[1366],{"type":58,"value":343},{"type":52,"tag":280,"props":1368,"children":1369},{"class":282,"line":512},[1370],{"type":52,"tag":280,"props":1371,"children":1372},{},[1373],{"type":58,"value":1374},"    \u002F\u002F Check underflow BEFORE subtracting\n",{"type":52,"tag":280,"props":1376,"children":1377},{"class":282,"line":520},[1378],{"type":52,"tag":280,"props":1379,"children":1380},{},[1381],{"type":58,"value":1382},"    assert!(account.balance >= amount, E_INSUFFICIENT_BALANCE);\n",{"type":52,"tag":280,"props":1384,"children":1385},{"class":282,"line":528},[1386],{"type":52,"tag":280,"props":1387,"children":1388},{"emptyLinePlaceholder":205},[1389],{"type":58,"value":343},{"type":52,"tag":280,"props":1391,"children":1392},{"class":282,"line":26},[1393],{"type":52,"tag":280,"props":1394,"children":1395},{},[1396],{"type":58,"value":1397},"    account.balance = account.balance - amount;\n",{"type":52,"tag":280,"props":1399,"children":1401},{"class":282,"line":1400},19,[1402],{"type":52,"tag":280,"props":1403,"children":1404},{},[1405],{"type":58,"value":334},{"type":52,"tag":280,"props":1407,"children":1409},{"class":282,"line":1408},20,[1410],{"type":52,"tag":280,"props":1411,"children":1412},{"emptyLinePlaceholder":205},[1413],{"type":58,"value":343},{"type":52,"tag":280,"props":1415,"children":1417},{"class":282,"line":1416},21,[1418],{"type":52,"tag":280,"props":1419,"children":1420},{},[1421],{"type":58,"value":1422},"\u002F\u002F ❌ WRONG: No overflow check\n",{"type":52,"tag":280,"props":1424,"children":1426},{"class":282,"line":1425},22,[1427],{"type":52,"tag":280,"props":1428,"children":1429},{},[1430],{"type":58,"value":678},{"type":52,"tag":280,"props":1432,"children":1434},{"class":282,"line":1433},23,[1435],{"type":52,"tag":280,"props":1436,"children":1437},{},[1438],{"type":58,"value":709},{"type":52,"tag":280,"props":1440,"children":1442},{"class":282,"line":1441},24,[1443],{"type":52,"tag":280,"props":1444,"children":1445},{},[1446],{"type":58,"value":776},{"type":52,"tag":280,"props":1448,"children":1450},{"class":282,"line":1449},25,[1451],{"type":52,"tag":280,"props":1452,"children":1453},{},[1454],{"type":58,"value":334},{"type":52,"tag":91,"props":1456,"children":1458},{"id":1457},"step-7-generic-type-safety-audit",[1459],{"type":58,"value":1460},"Step 7: Generic Type Safety Audit",{"type":52,"tag":68,"props":1462,"children":1463},{},[1464],{"type":52,"tag":77,"props":1465,"children":1466},{},[1467],{"type":58,"value":190},{"type":52,"tag":192,"props":1469,"children":1471},{"className":1470},[195],[1472,1487,1502],{"type":52,"tag":107,"props":1473,"children":1475},{"className":1474},[200],[1476,1479,1481],{"type":52,"tag":203,"props":1477,"children":1478},{"disabled":205,"type":206},[],{"type":58,"value":1480}," Phantom types used for type witnesses: ",{"type":52,"tag":211,"props":1482,"children":1484},{"className":1483},[],[1485],{"type":58,"value":1486},"struct Vault\u003Cphantom CoinType>",{"type":52,"tag":107,"props":1488,"children":1490},{"className":1489},[200],[1491,1494,1496],{"type":52,"tag":203,"props":1492,"children":1493},{"disabled":205,"type":206},[],{"type":58,"value":1495}," Generic constraints appropriate: ",{"type":52,"tag":211,"props":1497,"children":1499},{"className":1498},[],[1500],{"type":58,"value":1501},"\u003CT: copy + drop>",{"type":52,"tag":107,"props":1503,"children":1505},{"className":1504},[200],[1506,1509],{"type":52,"tag":203,"props":1507,"children":1508},{"disabled":205,"type":206},[],{"type":58,"value":1510}," No type confusion possible",{"type":52,"tag":68,"props":1512,"children":1513},{},[1514],{"type":52,"tag":77,"props":1515,"children":1516},{},[1517],{"type":58,"value":268},{"type":52,"tag":270,"props":1519,"children":1521},{"className":272,"code":1520,"language":43,"meta":274,"style":274},"\u002F\u002F ✅ CORRECT: Phantom type for safety\nstruct Vault\u003Cphantom CoinType> has key {\n    balance: u64,\n    \u002F\u002F CoinType only for type safety, not stored\n}\n\npublic fun deposit\u003CCoinType>(vault: Object\u003CVault\u003CCoinType>>, amount: u64) {\n    \u002F\u002F Type-safe: can't deposit BTC into USDC vault\n}\n\n\u002F\u002F ❌ WRONG: No phantom (won't compile if CoinType not in fields)\nstruct Vault\u003CCoinType> has key {\n    balance: u64,\n}\n",[1522],{"type":52,"tag":211,"props":1523,"children":1524},{"__ignoreMap":274},[1525,1533,1541,1549,1557,1564,1571,1579,1587,1594,1601,1609,1617,1624],{"type":52,"tag":280,"props":1526,"children":1527},{"class":282,"line":283},[1528],{"type":52,"tag":280,"props":1529,"children":1530},{},[1531],{"type":58,"value":1532},"\u002F\u002F ✅ CORRECT: Phantom type for safety\n",{"type":52,"tag":280,"props":1534,"children":1535},{"class":282,"line":292},[1536],{"type":52,"tag":280,"props":1537,"children":1538},{},[1539],{"type":58,"value":1540},"struct Vault\u003Cphantom CoinType> has key {\n",{"type":52,"tag":280,"props":1542,"children":1543},{"class":282,"line":301},[1544],{"type":52,"tag":280,"props":1545,"children":1546},{},[1547],{"type":58,"value":1548},"    balance: u64,\n",{"type":52,"tag":280,"props":1550,"children":1551},{"class":282,"line":310},[1552],{"type":52,"tag":280,"props":1553,"children":1554},{},[1555],{"type":58,"value":1556},"    \u002F\u002F CoinType only for type safety, not stored\n",{"type":52,"tag":280,"props":1558,"children":1559},{"class":282,"line":319},[1560],{"type":52,"tag":280,"props":1561,"children":1562},{},[1563],{"type":58,"value":334},{"type":52,"tag":280,"props":1565,"children":1566},{"class":282,"line":328},[1567],{"type":52,"tag":280,"props":1568,"children":1569},{"emptyLinePlaceholder":205},[1570],{"type":58,"value":343},{"type":52,"tag":280,"props":1572,"children":1573},{"class":282,"line":337},[1574],{"type":52,"tag":280,"props":1575,"children":1576},{},[1577],{"type":58,"value":1578},"public fun deposit\u003CCoinType>(vault: Object\u003CVault\u003CCoinType>>, amount: u64) {\n",{"type":52,"tag":280,"props":1580,"children":1581},{"class":282,"line":30},[1582],{"type":52,"tag":280,"props":1583,"children":1584},{},[1585],{"type":58,"value":1586},"    \u002F\u002F Type-safe: can't deposit BTC into USDC vault\n",{"type":52,"tag":280,"props":1588,"children":1589},{"class":282,"line":354},[1590],{"type":52,"tag":280,"props":1591,"children":1592},{},[1593],{"type":58,"value":334},{"type":52,"tag":280,"props":1595,"children":1596},{"class":282,"line":362},[1597],{"type":52,"tag":280,"props":1598,"children":1599},{"emptyLinePlaceholder":205},[1600],{"type":58,"value":343},{"type":52,"tag":280,"props":1602,"children":1603},{"class":282,"line":371},[1604],{"type":52,"tag":280,"props":1605,"children":1606},{},[1607],{"type":58,"value":1608},"\u002F\u002F ❌ WRONG: No phantom (won't compile if CoinType not in fields)\n",{"type":52,"tag":280,"props":1610,"children":1611},{"class":282,"line":380},[1612],{"type":52,"tag":280,"props":1613,"children":1614},{},[1615],{"type":58,"value":1616},"struct Vault\u003CCoinType> has key {\n",{"type":52,"tag":280,"props":1618,"children":1619},{"class":282,"line":496},[1620],{"type":52,"tag":280,"props":1621,"children":1622},{},[1623],{"type":58,"value":1548},{"type":52,"tag":280,"props":1625,"children":1626},{"class":282,"line":504},[1627],{"type":52,"tag":280,"props":1628,"children":1629},{},[1630],{"type":58,"value":334},{"type":52,"tag":91,"props":1632,"children":1634},{"id":1633},"step-8-testing-audit",[1635],{"type":58,"value":1636},"Step 8: Testing Audit",{"type":52,"tag":68,"props":1638,"children":1639},{},[1640],{"type":52,"tag":77,"props":1641,"children":1642},{},[1643],{"type":58,"value":190},{"type":52,"tag":192,"props":1645,"children":1647},{"className":1646},[195],[1648,1663,1678,1687,1696],{"type":52,"tag":107,"props":1649,"children":1651},{"className":1650},[200],[1652,1655,1657],{"type":52,"tag":203,"props":1653,"children":1654},{"disabled":205,"type":206},[],{"type":58,"value":1656}," 100% line coverage achieved: ",{"type":52,"tag":211,"props":1658,"children":1660},{"className":1659},[],[1661],{"type":58,"value":1662},"aptos move test --coverage",{"type":52,"tag":107,"props":1664,"children":1666},{"className":1665},[200],[1667,1670,1672],{"type":52,"tag":203,"props":1668,"children":1669},{"disabled":205,"type":206},[],{"type":58,"value":1671}," All error paths tested with ",{"type":52,"tag":211,"props":1673,"children":1675},{"className":1674},[],[1676],{"type":58,"value":1677},"#[expected_failure]",{"type":52,"tag":107,"props":1679,"children":1681},{"className":1680},[200],[1682,1685],{"type":52,"tag":203,"props":1683,"children":1684},{"disabled":205,"type":206},[],{"type":58,"value":1686}," Access control tested with multiple signers",{"type":52,"tag":107,"props":1688,"children":1690},{"className":1689},[200],[1691,1694],{"type":52,"tag":203,"props":1692,"children":1693},{"disabled":205,"type":206},[],{"type":58,"value":1695}," Input validation tested with invalid inputs",{"type":52,"tag":107,"props":1697,"children":1699},{"className":1698},[200],[1700,1703],{"type":52,"tag":203,"props":1701,"children":1702},{"disabled":205,"type":206},[],{"type":58,"value":1704}," Edge cases covered (max values, empty vectors, etc.)",{"type":52,"tag":68,"props":1706,"children":1707},{},[1708],{"type":52,"tag":77,"props":1709,"children":1710},{},[1711],{"type":58,"value":1712},"Run:",{"type":52,"tag":270,"props":1714,"children":1718},{"className":1715,"code":1716,"language":1717,"meta":274,"style":274},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","aptos move test --coverage\naptos move coverage source --module \u003Cmodule_name>\n","bash",[1719],{"type":52,"tag":211,"props":1720,"children":1721},{"__ignoreMap":274},[1722,1746],{"type":52,"tag":280,"props":1723,"children":1724},{"class":282,"line":283},[1725,1730,1736,1741],{"type":52,"tag":280,"props":1726,"children":1728},{"style":1727},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[1729],{"type":58,"value":8},{"type":52,"tag":280,"props":1731,"children":1733},{"style":1732},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[1734],{"type":58,"value":1735}," move",{"type":52,"tag":280,"props":1737,"children":1738},{"style":1732},[1739],{"type":58,"value":1740}," test",{"type":52,"tag":280,"props":1742,"children":1743},{"style":1732},[1744],{"type":58,"value":1745}," --coverage\n",{"type":52,"tag":280,"props":1747,"children":1748},{"class":282,"line":292},[1749,1753,1757,1762,1767,1772,1778,1783,1789],{"type":52,"tag":280,"props":1750,"children":1751},{"style":1727},[1752],{"type":58,"value":8},{"type":52,"tag":280,"props":1754,"children":1755},{"style":1732},[1756],{"type":58,"value":1735},{"type":52,"tag":280,"props":1758,"children":1759},{"style":1732},[1760],{"type":58,"value":1761}," coverage",{"type":52,"tag":280,"props":1763,"children":1764},{"style":1732},[1765],{"type":58,"value":1766}," source",{"type":52,"tag":280,"props":1768,"children":1769},{"style":1732},[1770],{"type":58,"value":1771}," --module",{"type":52,"tag":280,"props":1773,"children":1775},{"style":1774},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[1776],{"type":58,"value":1777}," \u003C",{"type":52,"tag":280,"props":1779,"children":1780},{"style":1732},[1781],{"type":58,"value":1782},"module_nam",{"type":52,"tag":280,"props":1784,"children":1786},{"style":1785},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[1787],{"type":58,"value":1788},"e",{"type":52,"tag":280,"props":1790,"children":1791},{"style":1774},[1792],{"type":58,"value":1793},">\n",{"type":52,"tag":68,"props":1795,"children":1796},{},[1797],{"type":52,"tag":77,"props":1798,"children":1799},{},[1800],{"type":58,"value":1801},"Verify output shows 100% coverage.",{"type":52,"tag":61,"props":1803,"children":1805},{"id":1804},"security-audit-report-template",[1806],{"type":58,"value":1807},"Security Audit Report Template",{"type":52,"tag":68,"props":1809,"children":1810},{},[1811],{"type":58,"value":1812},"Generate report in this format:",{"type":52,"tag":270,"props":1814,"children":1818},{"className":1815,"code":1816,"language":1817,"meta":274,"style":274},"language-markdown shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","# Security Audit Report\n\n**Module:** my_module **Date:** 2026-01-23 **Auditor:** AI Assistant\n\n## Summary\n\n- ✅ PASS: All security checks passed\n- ⚠️ WARNINGS: 2 minor issues found\n- ❌ CRITICAL: 0 critical vulnerabilities\n\n## Access Control\n\n- ✅ All entry functions verify signer authority\n- ✅ Object ownership checked in all operations\n- ✅ Admin functions properly restricted\n\n## Input Validation\n\n- ✅ All numeric inputs validated\n- ⚠️ WARNING: String length validation missing in function X\n- ✅ Address validation present\n\n## Object Safety\n\n- ✅ No ConstructorRef returned\n- ✅ All refs generated in constructor\n- ✅ Object signer used correctly\n\n## Reference Safety\n\n- ✅ No public &mut references\n- ✅ Critical fields protected\n\n## Arithmetic Safety\n\n- ✅ Overflow checks present\n- ✅ Underflow checks present\n- ✅ Division by zero prevented\n\n## Generic Type Safety\n\n- ✅ Phantom types used correctly\n- ✅ Constraints appropriate\n\n## Testing\n\n- ✅ 100% line coverage achieved\n- ✅ All error paths tested\n- ✅ Access control tested\n- ✅ Edge cases covered\n\n## Recommendations\n\n1. Add string length validation to function X (line 42)\n2. Consider adding event emissions for important state changes\n\n## Conclusion\n\n✅ Safe to deploy after addressing warnings.\n","markdown",[1819],{"type":52,"tag":211,"props":1820,"children":1821},{"__ignoreMap":274},[1822,1835,1842,1902,1909,1922,1929,1942,1954,1966,1973,1985,1992,2004,2016,2028,2035,2047,2054,2066,2078,2090,2097,2109,2116,2128,2141,2154,2162,2175,2183,2196,2209,2217,2230,2238,2251,2264,2277,2285,2298,2306,2319,2332,2340,2353,2361,2374,2387,2400,2413,2421,2434,2442,2456,2470,2478,2491,2499],{"type":52,"tag":280,"props":1823,"children":1824},{"class":282,"line":283},[1825,1830],{"type":52,"tag":280,"props":1826,"children":1827},{"style":1774},[1828],{"type":58,"value":1829},"# ",{"type":52,"tag":280,"props":1831,"children":1832},{"style":1727},[1833],{"type":58,"value":1834},"Security Audit Report\n",{"type":52,"tag":280,"props":1836,"children":1837},{"class":282,"line":292},[1838],{"type":52,"tag":280,"props":1839,"children":1840},{"emptyLinePlaceholder":205},[1841],{"type":58,"value":343},{"type":52,"tag":280,"props":1843,"children":1844},{"class":282,"line":301},[1845,1851,1857,1861,1866,1870,1875,1879,1884,1888,1893,1897],{"type":52,"tag":280,"props":1846,"children":1848},{"style":1847},"--shiki-light:#39ADB5;--shiki-light-font-weight:bold;--shiki-default:#89DDFF;--shiki-default-font-weight:bold;--shiki-dark:#89DDFF;--shiki-dark-font-weight:bold",[1849],{"type":58,"value":1850},"**",{"type":52,"tag":280,"props":1852,"children":1854},{"style":1853},"--shiki-light:#E53935;--shiki-light-font-weight:bold;--shiki-default:#F07178;--shiki-default-font-weight:bold;--shiki-dark:#F07178;--shiki-dark-font-weight:bold",[1855],{"type":58,"value":1856},"Module:",{"type":52,"tag":280,"props":1858,"children":1859},{"style":1847},[1860],{"type":58,"value":1850},{"type":52,"tag":280,"props":1862,"children":1863},{"style":1785},[1864],{"type":58,"value":1865}," my_module ",{"type":52,"tag":280,"props":1867,"children":1868},{"style":1847},[1869],{"type":58,"value":1850},{"type":52,"tag":280,"props":1871,"children":1872},{"style":1853},[1873],{"type":58,"value":1874},"Date:",{"type":52,"tag":280,"props":1876,"children":1877},{"style":1847},[1878],{"type":58,"value":1850},{"type":52,"tag":280,"props":1880,"children":1881},{"style":1785},[1882],{"type":58,"value":1883}," 2026-01-23 ",{"type":52,"tag":280,"props":1885,"children":1886},{"style":1847},[1887],{"type":58,"value":1850},{"type":52,"tag":280,"props":1889,"children":1890},{"style":1853},[1891],{"type":58,"value":1892},"Auditor:",{"type":52,"tag":280,"props":1894,"children":1895},{"style":1847},[1896],{"type":58,"value":1850},{"type":52,"tag":280,"props":1898,"children":1899},{"style":1785},[1900],{"type":58,"value":1901}," AI Assistant\n",{"type":52,"tag":280,"props":1903,"children":1904},{"class":282,"line":310},[1905],{"type":52,"tag":280,"props":1906,"children":1907},{"emptyLinePlaceholder":205},[1908],{"type":58,"value":343},{"type":52,"tag":280,"props":1910,"children":1911},{"class":282,"line":319},[1912,1917],{"type":52,"tag":280,"props":1913,"children":1914},{"style":1774},[1915],{"type":58,"value":1916},"## ",{"type":52,"tag":280,"props":1918,"children":1919},{"style":1727},[1920],{"type":58,"value":1921},"Summary\n",{"type":52,"tag":280,"props":1923,"children":1924},{"class":282,"line":328},[1925],{"type":52,"tag":280,"props":1926,"children":1927},{"emptyLinePlaceholder":205},[1928],{"type":58,"value":343},{"type":52,"tag":280,"props":1930,"children":1931},{"class":282,"line":337},[1932,1937],{"type":52,"tag":280,"props":1933,"children":1934},{"style":1774},[1935],{"type":58,"value":1936},"-",{"type":52,"tag":280,"props":1938,"children":1939},{"style":1785},[1940],{"type":58,"value":1941}," ✅ PASS: All security checks passed\n",{"type":52,"tag":280,"props":1943,"children":1944},{"class":282,"line":30},[1945,1949],{"type":52,"tag":280,"props":1946,"children":1947},{"style":1774},[1948],{"type":58,"value":1936},{"type":52,"tag":280,"props":1950,"children":1951},{"style":1785},[1952],{"type":58,"value":1953}," ⚠️ WARNINGS: 2 minor issues found\n",{"type":52,"tag":280,"props":1955,"children":1956},{"class":282,"line":354},[1957,1961],{"type":52,"tag":280,"props":1958,"children":1959},{"style":1774},[1960],{"type":58,"value":1936},{"type":52,"tag":280,"props":1962,"children":1963},{"style":1785},[1964],{"type":58,"value":1965}," ❌ CRITICAL: 0 critical vulnerabilities\n",{"type":52,"tag":280,"props":1967,"children":1968},{"class":282,"line":362},[1969],{"type":52,"tag":280,"props":1970,"children":1971},{"emptyLinePlaceholder":205},[1972],{"type":58,"value":343},{"type":52,"tag":280,"props":1974,"children":1975},{"class":282,"line":371},[1976,1980],{"type":52,"tag":280,"props":1977,"children":1978},{"style":1774},[1979],{"type":58,"value":1916},{"type":52,"tag":280,"props":1981,"children":1982},{"style":1727},[1983],{"type":58,"value":1984},"Access Control\n",{"type":52,"tag":280,"props":1986,"children":1987},{"class":282,"line":380},[1988],{"type":52,"tag":280,"props":1989,"children":1990},{"emptyLinePlaceholder":205},[1991],{"type":58,"value":343},{"type":52,"tag":280,"props":1993,"children":1994},{"class":282,"line":496},[1995,1999],{"type":52,"tag":280,"props":1996,"children":1997},{"style":1774},[1998],{"type":58,"value":1936},{"type":52,"tag":280,"props":2000,"children":2001},{"style":1785},[2002],{"type":58,"value":2003}," ✅ All entry functions verify signer authority\n",{"type":52,"tag":280,"props":2005,"children":2006},{"class":282,"line":504},[2007,2011],{"type":52,"tag":280,"props":2008,"children":2009},{"style":1774},[2010],{"type":58,"value":1936},{"type":52,"tag":280,"props":2012,"children":2013},{"style":1785},[2014],{"type":58,"value":2015}," ✅ Object ownership checked in all operations\n",{"type":52,"tag":280,"props":2017,"children":2018},{"class":282,"line":512},[2019,2023],{"type":52,"tag":280,"props":2020,"children":2021},{"style":1774},[2022],{"type":58,"value":1936},{"type":52,"tag":280,"props":2024,"children":2025},{"style":1785},[2026],{"type":58,"value":2027}," ✅ Admin functions properly restricted\n",{"type":52,"tag":280,"props":2029,"children":2030},{"class":282,"line":520},[2031],{"type":52,"tag":280,"props":2032,"children":2033},{"emptyLinePlaceholder":205},[2034],{"type":58,"value":343},{"type":52,"tag":280,"props":2036,"children":2037},{"class":282,"line":528},[2038,2042],{"type":52,"tag":280,"props":2039,"children":2040},{"style":1774},[2041],{"type":58,"value":1916},{"type":52,"tag":280,"props":2043,"children":2044},{"style":1727},[2045],{"type":58,"value":2046},"Input Validation\n",{"type":52,"tag":280,"props":2048,"children":2049},{"class":282,"line":26},[2050],{"type":52,"tag":280,"props":2051,"children":2052},{"emptyLinePlaceholder":205},[2053],{"type":58,"value":343},{"type":52,"tag":280,"props":2055,"children":2056},{"class":282,"line":1400},[2057,2061],{"type":52,"tag":280,"props":2058,"children":2059},{"style":1774},[2060],{"type":58,"value":1936},{"type":52,"tag":280,"props":2062,"children":2063},{"style":1785},[2064],{"type":58,"value":2065}," ✅ All numeric inputs validated\n",{"type":52,"tag":280,"props":2067,"children":2068},{"class":282,"line":1408},[2069,2073],{"type":52,"tag":280,"props":2070,"children":2071},{"style":1774},[2072],{"type":58,"value":1936},{"type":52,"tag":280,"props":2074,"children":2075},{"style":1785},[2076],{"type":58,"value":2077}," ⚠️ WARNING: String length validation missing in function X\n",{"type":52,"tag":280,"props":2079,"children":2080},{"class":282,"line":1416},[2081,2085],{"type":52,"tag":280,"props":2082,"children":2083},{"style":1774},[2084],{"type":58,"value":1936},{"type":52,"tag":280,"props":2086,"children":2087},{"style":1785},[2088],{"type":58,"value":2089}," ✅ Address validation present\n",{"type":52,"tag":280,"props":2091,"children":2092},{"class":282,"line":1425},[2093],{"type":52,"tag":280,"props":2094,"children":2095},{"emptyLinePlaceholder":205},[2096],{"type":58,"value":343},{"type":52,"tag":280,"props":2098,"children":2099},{"class":282,"line":1433},[2100,2104],{"type":52,"tag":280,"props":2101,"children":2102},{"style":1774},[2103],{"type":58,"value":1916},{"type":52,"tag":280,"props":2105,"children":2106},{"style":1727},[2107],{"type":58,"value":2108},"Object Safety\n",{"type":52,"tag":280,"props":2110,"children":2111},{"class":282,"line":1441},[2112],{"type":52,"tag":280,"props":2113,"children":2114},{"emptyLinePlaceholder":205},[2115],{"type":58,"value":343},{"type":52,"tag":280,"props":2117,"children":2118},{"class":282,"line":1449},[2119,2123],{"type":52,"tag":280,"props":2120,"children":2121},{"style":1774},[2122],{"type":58,"value":1936},{"type":52,"tag":280,"props":2124,"children":2125},{"style":1785},[2126],{"type":58,"value":2127}," ✅ No ConstructorRef returned\n",{"type":52,"tag":280,"props":2129,"children":2131},{"class":282,"line":2130},26,[2132,2136],{"type":52,"tag":280,"props":2133,"children":2134},{"style":1774},[2135],{"type":58,"value":1936},{"type":52,"tag":280,"props":2137,"children":2138},{"style":1785},[2139],{"type":58,"value":2140}," ✅ All refs generated in constructor\n",{"type":52,"tag":280,"props":2142,"children":2144},{"class":282,"line":2143},27,[2145,2149],{"type":52,"tag":280,"props":2146,"children":2147},{"style":1774},[2148],{"type":58,"value":1936},{"type":52,"tag":280,"props":2150,"children":2151},{"style":1785},[2152],{"type":58,"value":2153}," ✅ Object signer used correctly\n",{"type":52,"tag":280,"props":2155,"children":2157},{"class":282,"line":2156},28,[2158],{"type":52,"tag":280,"props":2159,"children":2160},{"emptyLinePlaceholder":205},[2161],{"type":58,"value":343},{"type":52,"tag":280,"props":2163,"children":2165},{"class":282,"line":2164},29,[2166,2170],{"type":52,"tag":280,"props":2167,"children":2168},{"style":1774},[2169],{"type":58,"value":1916},{"type":52,"tag":280,"props":2171,"children":2172},{"style":1727},[2173],{"type":58,"value":2174},"Reference Safety\n",{"type":52,"tag":280,"props":2176,"children":2178},{"class":282,"line":2177},30,[2179],{"type":52,"tag":280,"props":2180,"children":2181},{"emptyLinePlaceholder":205},[2182],{"type":58,"value":343},{"type":52,"tag":280,"props":2184,"children":2186},{"class":282,"line":2185},31,[2187,2191],{"type":52,"tag":280,"props":2188,"children":2189},{"style":1774},[2190],{"type":58,"value":1936},{"type":52,"tag":280,"props":2192,"children":2193},{"style":1785},[2194],{"type":58,"value":2195}," ✅ No public &mut references\n",{"type":52,"tag":280,"props":2197,"children":2199},{"class":282,"line":2198},32,[2200,2204],{"type":52,"tag":280,"props":2201,"children":2202},{"style":1774},[2203],{"type":58,"value":1936},{"type":52,"tag":280,"props":2205,"children":2206},{"style":1785},[2207],{"type":58,"value":2208}," ✅ Critical fields protected\n",{"type":52,"tag":280,"props":2210,"children":2212},{"class":282,"line":2211},33,[2213],{"type":52,"tag":280,"props":2214,"children":2215},{"emptyLinePlaceholder":205},[2216],{"type":58,"value":343},{"type":52,"tag":280,"props":2218,"children":2220},{"class":282,"line":2219},34,[2221,2225],{"type":52,"tag":280,"props":2222,"children":2223},{"style":1774},[2224],{"type":58,"value":1916},{"type":52,"tag":280,"props":2226,"children":2227},{"style":1727},[2228],{"type":58,"value":2229},"Arithmetic Safety\n",{"type":52,"tag":280,"props":2231,"children":2233},{"class":282,"line":2232},35,[2234],{"type":52,"tag":280,"props":2235,"children":2236},{"emptyLinePlaceholder":205},[2237],{"type":58,"value":343},{"type":52,"tag":280,"props":2239,"children":2241},{"class":282,"line":2240},36,[2242,2246],{"type":52,"tag":280,"props":2243,"children":2244},{"style":1774},[2245],{"type":58,"value":1936},{"type":52,"tag":280,"props":2247,"children":2248},{"style":1785},[2249],{"type":58,"value":2250}," ✅ Overflow checks present\n",{"type":52,"tag":280,"props":2252,"children":2254},{"class":282,"line":2253},37,[2255,2259],{"type":52,"tag":280,"props":2256,"children":2257},{"style":1774},[2258],{"type":58,"value":1936},{"type":52,"tag":280,"props":2260,"children":2261},{"style":1785},[2262],{"type":58,"value":2263}," ✅ Underflow checks present\n",{"type":52,"tag":280,"props":2265,"children":2267},{"class":282,"line":2266},38,[2268,2272],{"type":52,"tag":280,"props":2269,"children":2270},{"style":1774},[2271],{"type":58,"value":1936},{"type":52,"tag":280,"props":2273,"children":2274},{"style":1785},[2275],{"type":58,"value":2276}," ✅ Division by zero prevented\n",{"type":52,"tag":280,"props":2278,"children":2280},{"class":282,"line":2279},39,[2281],{"type":52,"tag":280,"props":2282,"children":2283},{"emptyLinePlaceholder":205},[2284],{"type":58,"value":343},{"type":52,"tag":280,"props":2286,"children":2288},{"class":282,"line":2287},40,[2289,2293],{"type":52,"tag":280,"props":2290,"children":2291},{"style":1774},[2292],{"type":58,"value":1916},{"type":52,"tag":280,"props":2294,"children":2295},{"style":1727},[2296],{"type":58,"value":2297},"Generic Type Safety\n",{"type":52,"tag":280,"props":2299,"children":2301},{"class":282,"line":2300},41,[2302],{"type":52,"tag":280,"props":2303,"children":2304},{"emptyLinePlaceholder":205},[2305],{"type":58,"value":343},{"type":52,"tag":280,"props":2307,"children":2309},{"class":282,"line":2308},42,[2310,2314],{"type":52,"tag":280,"props":2311,"children":2312},{"style":1774},[2313],{"type":58,"value":1936},{"type":52,"tag":280,"props":2315,"children":2316},{"style":1785},[2317],{"type":58,"value":2318}," ✅ Phantom types used correctly\n",{"type":52,"tag":280,"props":2320,"children":2322},{"class":282,"line":2321},43,[2323,2327],{"type":52,"tag":280,"props":2324,"children":2325},{"style":1774},[2326],{"type":58,"value":1936},{"type":52,"tag":280,"props":2328,"children":2329},{"style":1785},[2330],{"type":58,"value":2331}," ✅ Constraints appropriate\n",{"type":52,"tag":280,"props":2333,"children":2335},{"class":282,"line":2334},44,[2336],{"type":52,"tag":280,"props":2337,"children":2338},{"emptyLinePlaceholder":205},[2339],{"type":58,"value":343},{"type":52,"tag":280,"props":2341,"children":2343},{"class":282,"line":2342},45,[2344,2348],{"type":52,"tag":280,"props":2345,"children":2346},{"style":1774},[2347],{"type":58,"value":1916},{"type":52,"tag":280,"props":2349,"children":2350},{"style":1727},[2351],{"type":58,"value":2352},"Testing\n",{"type":52,"tag":280,"props":2354,"children":2356},{"class":282,"line":2355},46,[2357],{"type":52,"tag":280,"props":2358,"children":2359},{"emptyLinePlaceholder":205},[2360],{"type":58,"value":343},{"type":52,"tag":280,"props":2362,"children":2364},{"class":282,"line":2363},47,[2365,2369],{"type":52,"tag":280,"props":2366,"children":2367},{"style":1774},[2368],{"type":58,"value":1936},{"type":52,"tag":280,"props":2370,"children":2371},{"style":1785},[2372],{"type":58,"value":2373}," ✅ 100% line coverage achieved\n",{"type":52,"tag":280,"props":2375,"children":2377},{"class":282,"line":2376},48,[2378,2382],{"type":52,"tag":280,"props":2379,"children":2380},{"style":1774},[2381],{"type":58,"value":1936},{"type":52,"tag":280,"props":2383,"children":2384},{"style":1785},[2385],{"type":58,"value":2386}," ✅ All error paths tested\n",{"type":52,"tag":280,"props":2388,"children":2390},{"class":282,"line":2389},49,[2391,2395],{"type":52,"tag":280,"props":2392,"children":2393},{"style":1774},[2394],{"type":58,"value":1936},{"type":52,"tag":280,"props":2396,"children":2397},{"style":1785},[2398],{"type":58,"value":2399}," ✅ Access control tested\n",{"type":52,"tag":280,"props":2401,"children":2403},{"class":282,"line":2402},50,[2404,2408],{"type":52,"tag":280,"props":2405,"children":2406},{"style":1774},[2407],{"type":58,"value":1936},{"type":52,"tag":280,"props":2409,"children":2410},{"style":1785},[2411],{"type":58,"value":2412}," ✅ Edge cases covered\n",{"type":52,"tag":280,"props":2414,"children":2416},{"class":282,"line":2415},51,[2417],{"type":52,"tag":280,"props":2418,"children":2419},{"emptyLinePlaceholder":205},[2420],{"type":58,"value":343},{"type":52,"tag":280,"props":2422,"children":2424},{"class":282,"line":2423},52,[2425,2429],{"type":52,"tag":280,"props":2426,"children":2427},{"style":1774},[2428],{"type":58,"value":1916},{"type":52,"tag":280,"props":2430,"children":2431},{"style":1727},[2432],{"type":58,"value":2433},"Recommendations\n",{"type":52,"tag":280,"props":2435,"children":2437},{"class":282,"line":2436},53,[2438],{"type":52,"tag":280,"props":2439,"children":2440},{"emptyLinePlaceholder":205},[2441],{"type":58,"value":343},{"type":52,"tag":280,"props":2443,"children":2445},{"class":282,"line":2444},54,[2446,2451],{"type":52,"tag":280,"props":2447,"children":2448},{"style":1774},[2449],{"type":58,"value":2450},"1.",{"type":52,"tag":280,"props":2452,"children":2453},{"style":1785},[2454],{"type":58,"value":2455}," Add string length validation to function X (line 42)\n",{"type":52,"tag":280,"props":2457,"children":2459},{"class":282,"line":2458},55,[2460,2465],{"type":52,"tag":280,"props":2461,"children":2462},{"style":1774},[2463],{"type":58,"value":2464},"2.",{"type":52,"tag":280,"props":2466,"children":2467},{"style":1785},[2468],{"type":58,"value":2469}," Consider adding event emissions for important state changes\n",{"type":52,"tag":280,"props":2471,"children":2473},{"class":282,"line":2472},56,[2474],{"type":52,"tag":280,"props":2475,"children":2476},{"emptyLinePlaceholder":205},[2477],{"type":58,"value":343},{"type":52,"tag":280,"props":2479,"children":2481},{"class":282,"line":2480},57,[2482,2486],{"type":52,"tag":280,"props":2483,"children":2484},{"style":1774},[2485],{"type":58,"value":1916},{"type":52,"tag":280,"props":2487,"children":2488},{"style":1727},[2489],{"type":58,"value":2490},"Conclusion\n",{"type":52,"tag":280,"props":2492,"children":2494},{"class":282,"line":2493},58,[2495],{"type":52,"tag":280,"props":2496,"children":2497},{"emptyLinePlaceholder":205},[2498],{"type":58,"value":343},{"type":52,"tag":280,"props":2500,"children":2502},{"class":282,"line":2501},59,[2503],{"type":52,"tag":280,"props":2504,"children":2505},{"style":1785},[2506],{"type":58,"value":2507},"✅ Safe to deploy after addressing warnings.\n",{"type":52,"tag":61,"props":2509,"children":2511},{"id":2510},"common-vulnerabilities",[2512],{"type":58,"value":2513},"Common Vulnerabilities",{"type":52,"tag":2515,"props":2516,"children":2517},"table",{},[2518,2547],{"type":52,"tag":2519,"props":2520,"children":2521},"thead",{},[2522],{"type":52,"tag":2523,"props":2524,"children":2525},"tr",{},[2526,2532,2537,2542],{"type":52,"tag":2527,"props":2528,"children":2529},"th",{},[2530],{"type":58,"value":2531},"Vulnerability",{"type":52,"tag":2527,"props":2533,"children":2534},{},[2535],{"type":58,"value":2536},"Detection",{"type":52,"tag":2527,"props":2538,"children":2539},{},[2540],{"type":58,"value":2541},"Impact",{"type":52,"tag":2527,"props":2543,"children":2544},{},[2545],{"type":58,"value":2546},"Fix",{"type":52,"tag":2548,"props":2549,"children":2550},"tbody",{},[2551,2583,2611,2640,2668,2699,2728,2751],{"type":52,"tag":2523,"props":2552,"children":2553},{},[2554,2560,2573,2578],{"type":52,"tag":2555,"props":2556,"children":2557},"td",{},[2558],{"type":58,"value":2559},"Missing access control",{"type":52,"tag":2555,"props":2561,"children":2562},{},[2563,2565,2571],{"type":58,"value":2564},"No ",{"type":52,"tag":211,"props":2566,"children":2568},{"className":2567},[],[2569],{"type":58,"value":2570},"assert!(signer...)",{"type":58,"value":2572}," in entry functions",{"type":52,"tag":2555,"props":2574,"children":2575},{},[2576],{"type":58,"value":2577},"Critical - anyone can call",{"type":52,"tag":2555,"props":2579,"children":2580},{},[2581],{"type":58,"value":2582},"Add signer verification",{"type":52,"tag":2523,"props":2584,"children":2585},{},[2586,2591,2601,2606],{"type":52,"tag":2555,"props":2587,"children":2588},{},[2589],{"type":58,"value":2590},"Missing ownership check",{"type":52,"tag":2555,"props":2592,"children":2593},{},[2594,2595],{"type":58,"value":2564},{"type":52,"tag":211,"props":2596,"children":2598},{"className":2597},[],[2599],{"type":58,"value":2600},"assert!(object::owner...)",{"type":52,"tag":2555,"props":2602,"children":2603},{},[2604],{"type":58,"value":2605},"Critical - anyone can modify any object",{"type":52,"tag":2555,"props":2607,"children":2608},{},[2609],{"type":58,"value":2610},"Add ownership check",{"type":52,"tag":2523,"props":2612,"children":2613},{},[2614,2619,2624,2629],{"type":52,"tag":2555,"props":2615,"children":2616},{},[2617],{"type":58,"value":2618},"Integer overflow",{"type":52,"tag":2555,"props":2620,"children":2621},{},[2622],{"type":58,"value":2623},"No check before addition",{"type":52,"tag":2555,"props":2625,"children":2626},{},[2627],{"type":58,"value":2628},"Critical - balance wraps to 0",{"type":52,"tag":2555,"props":2630,"children":2631},{},[2632,2634],{"type":58,"value":2633},"Check ",{"type":52,"tag":211,"props":2635,"children":2637},{"className":2636},[],[2638],{"type":58,"value":2639},"assert!(a \u003C= MAX - b, E_OVERFLOW)",{"type":52,"tag":2523,"props":2641,"children":2642},{},[2643,2648,2653,2658],{"type":52,"tag":2555,"props":2644,"children":2645},{},[2646],{"type":58,"value":2647},"Integer underflow",{"type":52,"tag":2555,"props":2649,"children":2650},{},[2651],{"type":58,"value":2652},"No check before subtraction",{"type":52,"tag":2555,"props":2654,"children":2655},{},[2656],{"type":58,"value":2657},"Critical - balance wraps to MAX",{"type":52,"tag":2555,"props":2659,"children":2660},{},[2661,2662],{"type":58,"value":2633},{"type":52,"tag":211,"props":2663,"children":2665},{"className":2664},[],[2666],{"type":58,"value":2667},"assert!(a >= b, E_UNDERFLOW)",{"type":52,"tag":2523,"props":2669,"children":2670},{},[2671,2676,2681,2686],{"type":52,"tag":2555,"props":2672,"children":2673},{},[2674],{"type":58,"value":2675},"Returning ConstructorRef",{"type":52,"tag":2555,"props":2677,"children":2678},{},[2679],{"type":58,"value":2680},"Function returns ConstructorRef",{"type":52,"tag":2555,"props":2682,"children":2683},{},[2684],{"type":58,"value":2685},"Critical - caller can destroy object",{"type":52,"tag":2555,"props":2687,"children":2688},{},[2689,2691,2697],{"type":58,"value":2690},"Return ",{"type":52,"tag":211,"props":2692,"children":2694},{"className":2693},[],[2695],{"type":58,"value":2696},"Object\u003CT>",{"type":58,"value":2698}," instead",{"type":52,"tag":2523,"props":2700,"children":2701},{},[2702,2707,2718,2723],{"type":52,"tag":2555,"props":2703,"children":2704},{},[2705],{"type":58,"value":2706},"Exposing &mut",{"type":52,"tag":2555,"props":2708,"children":2709},{},[2710,2712],{"type":58,"value":2711},"Public function returns ",{"type":52,"tag":211,"props":2713,"children":2715},{"className":2714},[],[2716],{"type":58,"value":2717},"&mut T",{"type":52,"tag":2555,"props":2719,"children":2720},{},[2721],{"type":58,"value":2722},"High - mem::swap attacks",{"type":52,"tag":2555,"props":2724,"children":2725},{},[2726],{"type":58,"value":2727},"Expose specific operations only",{"type":52,"tag":2523,"props":2729,"children":2730},{},[2731,2736,2741,2746],{"type":52,"tag":2555,"props":2732,"children":2733},{},[2734],{"type":58,"value":2735},"No input validation",{"type":52,"tag":2555,"props":2737,"children":2738},{},[2739],{"type":58,"value":2740},"Accept any value",{"type":52,"tag":2555,"props":2742,"children":2743},{},[2744],{"type":58,"value":2745},"Medium - zero amounts, overflow",{"type":52,"tag":2555,"props":2747,"children":2748},{},[2749],{"type":58,"value":2750},"Validate all inputs",{"type":52,"tag":2523,"props":2752,"children":2753},{},[2754,2759,2764,2769],{"type":52,"tag":2555,"props":2755,"children":2756},{},[2757],{"type":58,"value":2758},"Low test coverage",{"type":52,"tag":2555,"props":2760,"children":2761},{},[2762],{"type":58,"value":2763},"Coverage \u003C 100%",{"type":52,"tag":2555,"props":2765,"children":2766},{},[2767],{"type":58,"value":2768},"Medium - bugs in production",{"type":52,"tag":2555,"props":2770,"children":2771},{},[2772],{"type":58,"value":2773},"Write more tests",{"type":52,"tag":61,"props":2775,"children":2777},{"id":2776},"automated-checks",[2778],{"type":58,"value":2779},"Automated Checks",{"type":52,"tag":68,"props":2781,"children":2782},{},[2783],{"type":58,"value":2784},"Run these commands as part of audit:",{"type":52,"tag":270,"props":2786,"children":2788},{"className":1715,"code":2787,"language":1717,"meta":274,"style":274},"# Compile (check for errors)\naptos move compile\n\n# Run tests\naptos move test\n\n# Check coverage\naptos move test --coverage\naptos move coverage summary\n\n# Expected: 100.0% coverage\n",[2789],{"type":52,"tag":211,"props":2790,"children":2791},{"__ignoreMap":274},[2792,2801,2817,2824,2832,2848,2855,2863,2882,2902,2909],{"type":52,"tag":280,"props":2793,"children":2794},{"class":282,"line":283},[2795],{"type":52,"tag":280,"props":2796,"children":2798},{"style":2797},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[2799],{"type":58,"value":2800},"# Compile (check for errors)\n",{"type":52,"tag":280,"props":2802,"children":2803},{"class":282,"line":292},[2804,2808,2812],{"type":52,"tag":280,"props":2805,"children":2806},{"style":1727},[2807],{"type":58,"value":8},{"type":52,"tag":280,"props":2809,"children":2810},{"style":1732},[2811],{"type":58,"value":1735},{"type":52,"tag":280,"props":2813,"children":2814},{"style":1732},[2815],{"type":58,"value":2816}," compile\n",{"type":52,"tag":280,"props":2818,"children":2819},{"class":282,"line":301},[2820],{"type":52,"tag":280,"props":2821,"children":2822},{"emptyLinePlaceholder":205},[2823],{"type":58,"value":343},{"type":52,"tag":280,"props":2825,"children":2826},{"class":282,"line":310},[2827],{"type":52,"tag":280,"props":2828,"children":2829},{"style":2797},[2830],{"type":58,"value":2831},"# Run tests\n",{"type":52,"tag":280,"props":2833,"children":2834},{"class":282,"line":319},[2835,2839,2843],{"type":52,"tag":280,"props":2836,"children":2837},{"style":1727},[2838],{"type":58,"value":8},{"type":52,"tag":280,"props":2840,"children":2841},{"style":1732},[2842],{"type":58,"value":1735},{"type":52,"tag":280,"props":2844,"children":2845},{"style":1732},[2846],{"type":58,"value":2847}," test\n",{"type":52,"tag":280,"props":2849,"children":2850},{"class":282,"line":328},[2851],{"type":52,"tag":280,"props":2852,"children":2853},{"emptyLinePlaceholder":205},[2854],{"type":58,"value":343},{"type":52,"tag":280,"props":2856,"children":2857},{"class":282,"line":337},[2858],{"type":52,"tag":280,"props":2859,"children":2860},{"style":2797},[2861],{"type":58,"value":2862},"# Check coverage\n",{"type":52,"tag":280,"props":2864,"children":2865},{"class":282,"line":30},[2866,2870,2874,2878],{"type":52,"tag":280,"props":2867,"children":2868},{"style":1727},[2869],{"type":58,"value":8},{"type":52,"tag":280,"props":2871,"children":2872},{"style":1732},[2873],{"type":58,"value":1735},{"type":52,"tag":280,"props":2875,"children":2876},{"style":1732},[2877],{"type":58,"value":1740},{"type":52,"tag":280,"props":2879,"children":2880},{"style":1732},[2881],{"type":58,"value":1745},{"type":52,"tag":280,"props":2883,"children":2884},{"class":282,"line":354},[2885,2889,2893,2897],{"type":52,"tag":280,"props":2886,"children":2887},{"style":1727},[2888],{"type":58,"value":8},{"type":52,"tag":280,"props":2890,"children":2891},{"style":1732},[2892],{"type":58,"value":1735},{"type":52,"tag":280,"props":2894,"children":2895},{"style":1732},[2896],{"type":58,"value":1761},{"type":52,"tag":280,"props":2898,"children":2899},{"style":1732},[2900],{"type":58,"value":2901}," summary\n",{"type":52,"tag":280,"props":2903,"children":2904},{"class":282,"line":362},[2905],{"type":52,"tag":280,"props":2906,"children":2907},{"emptyLinePlaceholder":205},[2908],{"type":58,"value":343},{"type":52,"tag":280,"props":2910,"children":2911},{"class":282,"line":371},[2912],{"type":52,"tag":280,"props":2913,"children":2914},{"style":2797},[2915],{"type":58,"value":2916},"# Expected: 100.0% coverage\n",{"type":52,"tag":61,"props":2918,"children":2920},{"id":2919},"manual-checks",[2921],{"type":58,"value":2922},"Manual Checks",{"type":52,"tag":68,"props":2924,"children":2925},{},[2926],{"type":58,"value":2927},"Review code for:",{"type":52,"tag":103,"props":2929,"children":2930},{},[2931,2967,3011,3046],{"type":52,"tag":107,"props":2932,"children":2933},{},[2934,2939],{"type":52,"tag":77,"props":2935,"children":2936},{},[2937],{"type":58,"value":2938},"Access Control:",{"type":52,"tag":192,"props":2940,"children":2941},{},[2942,2955],{"type":52,"tag":107,"props":2943,"children":2944},{},[2945,2947,2953],{"type":58,"value":2946},"Search for ",{"type":52,"tag":211,"props":2948,"children":2950},{"className":2949},[],[2951],{"type":58,"value":2952},"entry fun",{"type":58,"value":2954}," → verify each has signer checks",{"type":52,"tag":107,"props":2956,"children":2957},{},[2958,2959,2965],{"type":58,"value":2946},{"type":52,"tag":211,"props":2960,"children":2962},{"className":2961},[],[2963],{"type":58,"value":2964},"borrow_global_mut",{"type":58,"value":2966}," → verify authorization before use",{"type":52,"tag":107,"props":2968,"children":2969},{},[2970,2975],{"type":52,"tag":77,"props":2971,"children":2972},{},[2973],{"type":58,"value":2974},"Input Validation:",{"type":52,"tag":192,"props":2976,"children":2977},{},[2978,2983],{"type":52,"tag":107,"props":2979,"children":2980},{},[2981],{"type":58,"value":2982},"Search for function parameters → verify validation",{"type":52,"tag":107,"props":2984,"children":2985},{},[2986,2988,2994,2996,3002,3003,3009],{"type":58,"value":2987},"Look for ",{"type":52,"tag":211,"props":2989,"children":2991},{"className":2990},[],[2992],{"type":58,"value":2993},"amount",{"type":58,"value":2995},", ",{"type":52,"tag":211,"props":2997,"children":2999},{"className":2998},[],[3000],{"type":58,"value":3001},"length",{"type":58,"value":2995},{"type":52,"tag":211,"props":3004,"children":3006},{"className":3005},[],[3007],{"type":58,"value":3008},"address",{"type":58,"value":3010}," params → verify checks",{"type":52,"tag":107,"props":3012,"children":3013},{},[3014,3019],{"type":52,"tag":77,"props":3015,"children":3016},{},[3017],{"type":58,"value":3018},"Object Safety:",{"type":52,"tag":192,"props":3020,"children":3021},{},[3022,3034],{"type":52,"tag":107,"props":3023,"children":3024},{},[3025,3026,3032],{"type":58,"value":2946},{"type":52,"tag":211,"props":3027,"children":3029},{"className":3028},[],[3030],{"type":58,"value":3031},"ConstructorRef",{"type":58,"value":3033}," → verify never returned",{"type":52,"tag":107,"props":3035,"children":3036},{},[3037,3038,3044],{"type":58,"value":2946},{"type":52,"tag":211,"props":3039,"children":3041},{"className":3040},[],[3042],{"type":58,"value":3043},"create_object",{"type":58,"value":3045}," → verify refs generated properly",{"type":52,"tag":107,"props":3047,"children":3048},{},[3049,3054],{"type":52,"tag":77,"props":3050,"children":3051},{},[3052],{"type":58,"value":3053},"Arithmetic:",{"type":52,"tag":192,"props":3055,"children":3056},{},[3057,3069,3080],{"type":52,"tag":107,"props":3058,"children":3059},{},[3060,3061,3067],{"type":58,"value":2946},{"type":52,"tag":211,"props":3062,"children":3064},{"className":3063},[],[3065],{"type":58,"value":3066},"+",{"type":58,"value":3068}," → verify overflow checks",{"type":52,"tag":107,"props":3070,"children":3071},{},[3072,3073,3078],{"type":58,"value":2946},{"type":52,"tag":211,"props":3074,"children":3076},{"className":3075},[],[3077],{"type":58,"value":1936},{"type":58,"value":3079}," → verify underflow checks",{"type":52,"tag":107,"props":3081,"children":3082},{},[3083,3084,3090],{"type":58,"value":2946},{"type":52,"tag":211,"props":3085,"children":3087},{"className":3086},[],[3088],{"type":58,"value":3089},"\u002F",{"type":58,"value":3091}," → verify division by zero checks",{"type":52,"tag":61,"props":3093,"children":3095},{"id":3094},"always-rules",[3096],{"type":58,"value":3097},"ALWAYS Rules",{"type":52,"tag":192,"props":3099,"children":3100},{},[3101,3106,3111,3116,3121,3126,3131],{"type":52,"tag":107,"props":3102,"children":3103},{},[3104],{"type":58,"value":3105},"✅ ALWAYS run full security checklist before deployment",{"type":52,"tag":107,"props":3107,"children":3108},{},[3109],{"type":58,"value":3110},"✅ ALWAYS verify 100% test coverage",{"type":52,"tag":107,"props":3112,"children":3113},{},[3114],{"type":58,"value":3115},"✅ ALWAYS check access control in entry functions",{"type":52,"tag":107,"props":3117,"children":3118},{},[3119],{"type":58,"value":3120},"✅ ALWAYS validate all inputs",{"type":52,"tag":107,"props":3122,"children":3123},{},[3124],{"type":58,"value":3125},"✅ ALWAYS protect against overflow\u002Funderflow",{"type":52,"tag":107,"props":3127,"children":3128},{},[3129],{"type":58,"value":3130},"✅ ALWAYS generate audit report",{"type":52,"tag":107,"props":3132,"children":3133},{},[3134],{"type":58,"value":3135},"✅ ALWAYS fix critical issues before deployment",{"type":52,"tag":61,"props":3137,"children":3139},{"id":3138},"never-rules",[3140],{"type":58,"value":3141},"NEVER Rules",{"type":52,"tag":192,"props":3143,"children":3144},{},[3145,3150,3155,3160,3165,3170,3191],{"type":52,"tag":107,"props":3146,"children":3147},{},[3148],{"type":58,"value":3149},"❌ NEVER skip security audit before deployment",{"type":52,"tag":107,"props":3151,"children":3152},{},[3153],{"type":58,"value":3154},"❌ NEVER ignore failing security checks",{"type":52,"tag":107,"props":3156,"children":3157},{},[3158],{"type":58,"value":3159},"❌ NEVER deploy with \u003C 100% test coverage",{"type":52,"tag":107,"props":3161,"children":3162},{},[3163],{"type":58,"value":3164},"❌ NEVER approve code with critical vulnerabilities",{"type":52,"tag":107,"props":3166,"children":3167},{},[3168],{"type":58,"value":3169},"❌ NEVER rush security review",{"type":52,"tag":107,"props":3171,"children":3172},{},[3173,3175,3181,3183,3189],{"type":58,"value":3174},"❌ NEVER read ",{"type":52,"tag":211,"props":3176,"children":3178},{"className":3177},[],[3179],{"type":58,"value":3180},"~\u002F.aptos\u002Fconfig.yaml",{"type":58,"value":3182}," or ",{"type":52,"tag":211,"props":3184,"children":3186},{"className":3185},[],[3187],{"type":58,"value":3188},".env",{"type":58,"value":3190}," files during audits (contain private keys)",{"type":52,"tag":107,"props":3192,"children":3193},{},[3194],{"type":58,"value":3195},"❌ NEVER display or repeat private key values found during audit",{"type":52,"tag":61,"props":3197,"children":3199},{"id":3198},"references",[3200],{"type":58,"value":3201},"References",{"type":52,"tag":68,"props":3203,"children":3204},{},[3205],{"type":52,"tag":77,"props":3206,"children":3207},{},[3208],{"type":58,"value":3209},"Pattern Documentation:",{"type":52,"tag":192,"props":3211,"children":3212},{},[3213,3224],{"type":52,"tag":107,"props":3214,"children":3215},{},[3216,3222],{"type":52,"tag":211,"props":3217,"children":3219},{"className":3218},[],[3220],{"type":58,"value":3221},"..\u002F..\u002F..\u002Fpatterns\u002Fmove\u002FSECURITY.md",{"type":58,"value":3223}," - Comprehensive security guide",{"type":52,"tag":107,"props":3225,"children":3226},{},[3227,3233],{"type":52,"tag":211,"props":3228,"children":3230},{"className":3229},[],[3231],{"type":58,"value":3232},"..\u002F..\u002F..\u002Fpatterns\u002Fmove\u002FOBJECTS.md",{"type":58,"value":3234}," - Object safety patterns",{"type":52,"tag":68,"props":3236,"children":3237},{},[3238],{"type":52,"tag":77,"props":3239,"children":3240},{},[3241],{"type":58,"value":3242},"Official Documentation:",{"type":52,"tag":192,"props":3244,"children":3245},{},[3246],{"type":52,"tag":107,"props":3247,"children":3248},{},[3249],{"type":52,"tag":3250,"props":3251,"children":3255},"a",{"href":3252,"rel":3253},"https:\u002F\u002Faptos.dev\u002Fbuild\u002Fsmart-contracts\u002Fmove-security-guidelines",[3254],"nofollow",[3256],{"type":58,"value":3252},{"type":52,"tag":68,"props":3258,"children":3259},{},[3260],{"type":52,"tag":77,"props":3261,"children":3262},{},[3263],{"type":58,"value":3264},"Related Skills:",{"type":52,"tag":192,"props":3266,"children":3267},{},[3268,3279,3290],{"type":52,"tag":107,"props":3269,"children":3270},{},[3271,3277],{"type":52,"tag":211,"props":3272,"children":3274},{"className":3273},[],[3275],{"type":58,"value":3276},"generate-tests",{"type":58,"value":3278}," - Ensure tests exist",{"type":52,"tag":107,"props":3280,"children":3281},{},[3282,3288],{"type":52,"tag":211,"props":3283,"children":3285},{"className":3284},[],[3286],{"type":58,"value":3287},"write-contracts",{"type":58,"value":3289}," - Apply security patterns",{"type":52,"tag":107,"props":3291,"children":3292},{},[3293,3299],{"type":52,"tag":211,"props":3294,"children":3296},{"className":3295},[],[3297],{"type":58,"value":3298},"deploy-contracts",{"type":58,"value":3300}," - Final check before deployment",{"type":52,"tag":3302,"props":3303,"children":3304},"hr",{},[],{"type":52,"tag":68,"props":3306,"children":3307},{},[3308,3313],{"type":52,"tag":77,"props":3309,"children":3310},{},[3311],{"type":58,"value":3312},"Remember:",{"type":58,"value":3314}," Security is non-negotiable. Every checklist item must pass. User funds depend on it.",{"type":52,"tag":3316,"props":3317,"children":3318},"style",{},[3319],{"type":58,"value":3320},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":3322,"total":1441},[3323,3336,3355,3368,3380,3392,3406,3413,3427,3442,3452,3462],{"slug":3324,"name":3324,"fn":3325,"description":3326,"org":3327,"tags":3328,"stars":26,"repoUrl":27,"updatedAt":3335},"analyze-gas-optimization","optimize Aptos Move contracts for gas","Analyze and optimize Aptos Move contracts for gas efficiency, identifying expensive operations and suggesting optimizations. Triggers on: 'optimize gas', 'reduce gas costs', 'gas analysis', 'make contract cheaper', 'gas efficiency', 'analyze gas usage', 'reduce transaction costs'.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3329,3331,3334],{"name":3330,"slug":33,"type":16},"Blockchain",{"name":3332,"slug":3333,"type":16},"Performance","performance",{"name":21,"slug":22,"type":16},"2026-07-12T08:07:14.117466",{"slug":3337,"name":3337,"fn":3338,"description":3339,"org":3340,"tags":3341,"stars":26,"repoUrl":27,"updatedAt":3354},"create-aptos-project","scaffold new Aptos dApp projects","Scaffolds new Aptos projects using npx create-aptos-dapp. Supports fullstack (Vite or Next.js) and contract-only templates with network selection and optional API key. Triggers on: 'build app', 'create app', 'make app', 'new app', 'build dApp', 'create dApp', 'new dApp', 'build project', 'new project', 'create project', 'scaffold', 'start project', 'set up project', 'build me a', 'I want to build', 'make me a', 'help me build'.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3342,3345,3348,3351],{"name":3343,"slug":3344,"type":16},"Next.js","next-js",{"name":3346,"slug":3347,"type":16},"TypeScript","typescript",{"name":3349,"slug":3350,"type":16},"Vite","vite",{"name":3352,"slug":3353,"type":16},"Web3","web3","2026-07-12T08:07:30.595111",{"slug":3298,"name":3298,"fn":3356,"description":3357,"org":3358,"tags":3359,"stars":26,"repoUrl":27,"updatedAt":3367},"deploy Move contracts to Aptos networks","Safely deploys Move contracts to Aptos networks (devnet, testnet, mainnet) with pre-deployment verification. Triggers on: 'deploy contract', 'publish to testnet', 'deploy to mainnet', 'how to deploy', 'publish module', 'deployment checklist', 'deploy to devnet'.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3360,3363,3366],{"name":3361,"slug":3362,"type":16},"Deployment","deployment",{"name":3364,"slug":3365,"type":16},"Engineering","engineering",{"name":21,"slug":22,"type":16},"2026-07-12T08:07:16.798352",{"slug":3276,"name":3276,"fn":3369,"description":3370,"org":3371,"tags":3372,"stars":26,"repoUrl":27,"updatedAt":3379},"generate test suites for Move contracts","Creates comprehensive test suites for Move contracts with 100% coverage requirement. Triggers on: 'generate tests', 'create tests', 'write test suite', 'test this contract', 'how to test', 'add test coverage', 'write unit tests'.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3373,3374,3377],{"name":3364,"slug":3365,"type":16},{"name":3375,"slug":3376,"type":16},"QA","qa",{"name":174,"slug":3378,"type":16},"testing","2026-07-12T08:07:18.0205",{"slug":3381,"name":3381,"fn":3382,"description":3383,"org":3384,"tags":3385,"stars":26,"repoUrl":27,"updatedAt":3391},"modernize-move","modernize Move V1 contracts to V2","Detects and modernizes outdated Move V1 syntax, patterns, and APIs to Move V2+. Use when upgrading legacy contracts, migrating to modern syntax, or converting old patterns to current best practices. NOT for writing new contracts (use write-contracts) or fixing bugs.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3386,3387,3388],{"name":24,"slug":25,"type":16},{"name":3364,"slug":3365,"type":16},{"name":3389,"slug":3390,"type":16},"Migration","migration","2026-07-12T08:07:10.226223",{"slug":3393,"name":3393,"fn":3394,"description":3395,"org":3396,"tags":3397,"stars":26,"repoUrl":27,"updatedAt":3405},"search-aptos-examples","search Aptos reference implementations","Searches aptos-core and daily-move for reference implementations before writing contracts. Triggers on: 'search examples', 'find example', 'check aptos-core', 'is there an example', 'reference implementation', 'how does aptos implement', 'similar contract', 'daily-move'.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3398,3399,3402],{"name":3330,"slug":33,"type":16},{"name":3400,"slug":3401,"type":16},"Documentation","documentation",{"name":3403,"slug":3404,"type":16},"Search","search","2026-07-12T08:07:15.382039",{"slug":4,"name":4,"fn":5,"description":6,"org":3407,"tags":3408,"stars":26,"repoUrl":27,"updatedAt":28},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3409,3410,3411,3412],{"name":18,"slug":19,"type":16},{"name":24,"slug":25,"type":16},{"name":14,"slug":15,"type":16},{"name":21,"slug":22,"type":16},{"slug":3414,"name":3414,"fn":3415,"description":3416,"org":3417,"tags":3418,"stars":26,"repoUrl":27,"updatedAt":3426},"smoothsend-gasless","sponsor gas fees for Aptos dApps","How to sponsor gas fees for Aptos dApp users using SmoothSend. Paid commercial service: free on testnet, credit-based on mainnet. Covers 3-line wallet adapter integration (transactionSubmitter), Script Composer for fee-in-token stablecoin transfers. Triggers on: 'gasless', 'sponsor gas', 'users pay no APT', 'transactionSubmitter', 'SmoothSend', 'fee payer', 'pay gas for users', 'no gas required'.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3419,3422,3425],{"name":3420,"slug":3421,"type":16},"API Development","api-development",{"name":3423,"slug":3424,"type":16},"Payments","payments",{"name":3352,"slug":3353,"type":16},"2026-07-12T08:07:31.843242",{"slug":3428,"name":3428,"fn":3429,"description":3430,"org":3431,"tags":3432,"stars":26,"repoUrl":27,"updatedAt":3441},"ts-sdk-account","manage Aptos accounts with TS SDK","How to create and use Account (signer) in @aptos-labs\u002Fts-sdk. Covers Account.generate(), fromPrivateKey(), fromDerivationPath(), Ed25519 vs SingleKey vs MultiKey vs Keyless, serialization (fromHex\u002FtoHex). Triggers on: 'Account.generate', 'Account.fromPrivateKey', 'Ed25519PrivateKey', 'SDK account', 'mnemonic', 'SingleKeyAccount', 'KeylessAccount'.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3433,3436,3437,3440],{"name":3434,"slug":3435,"type":16},"Auth","auth",{"name":3330,"slug":33,"type":16},{"name":3438,"slug":3439,"type":16},"SDK","sdk",{"name":3346,"slug":3347,"type":16},"2026-07-12T08:07:29.297415",{"slug":3443,"name":3443,"fn":3444,"description":3445,"org":3446,"tags":3447,"stars":26,"repoUrl":27,"updatedAt":3451},"ts-sdk-address","manage AccountAddress in Aptos TypeScript SDK","How to create and use AccountAddress in @aptos-labs\u002Fts-sdk. Covers address format (AIP-40), from\u002FfromString\u002FfromStrict, special addresses, LONG vs SHORT form, and derived addresses (object, resource, token, user-derived). Triggers on: 'AccountAddress', 'AccountAddress.from', 'AIP-40', 'derived address', 'createObjectAddress', 'createResourceAddress', 'createTokenAddress'.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3448,3449,3450],{"name":3330,"slug":33,"type":16},{"name":3438,"slug":3439,"type":16},{"name":3346,"slug":3347,"type":16},"2026-07-12T08:07:26.430378",{"slug":3453,"name":3453,"fn":3454,"description":3455,"org":3456,"tags":3457,"stars":26,"repoUrl":27,"updatedAt":3461},"ts-sdk-client","configure Aptos SDK clients","How to create and configure the Aptos client (Aptos, AptosConfig) in @aptos-labs\u002Fts-sdk. Covers Network, fullnode\u002Findexer\u002Ffaucet URLs, singleton pattern, and Bun compatibility. Triggers on: 'Aptos client', 'AptosConfig', 'SDK client', 'client setup', 'new Aptos(', 'Network.TESTNET', 'Network.MAINNET'.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3458,3459,3460],{"name":3420,"slug":3421,"type":16},{"name":3438,"slug":3439,"type":16},{"name":3346,"slug":3347,"type":16},"2026-07-12T08:07:21.933342",{"slug":3463,"name":3463,"fn":3464,"description":3465,"org":3466,"tags":3467,"stars":26,"repoUrl":27,"updatedAt":3471},"ts-sdk-transactions","manage Aptos blockchain transactions","How to build, sign, submit, and simulate transactions in @aptos-labs\u002Fts-sdk. Covers build.simple(), signAndSubmitTransaction(), waitForTransaction(), simulate, sponsored (fee payer), and multi-agent. Triggers on: 'build.simple', 'signAndSubmitTransaction', 'transaction.build', 'waitForTransaction', 'signAsFeePayer', 'SDK transaction', 'sponsored transaction', 'multi-agent transaction'.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3468,3469,3470],{"name":3420,"slug":3421,"type":16},{"name":3346,"slug":3347,"type":16},{"name":3352,"slug":3353,"type":16},"2026-07-12T08:07:23.774257",{"items":3473,"total":528},[3474,3480,3487,3493,3499,3505,3511],{"slug":3324,"name":3324,"fn":3325,"description":3326,"org":3475,"tags":3476,"stars":26,"repoUrl":27,"updatedAt":3335},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3477,3478,3479],{"name":3330,"slug":33,"type":16},{"name":3332,"slug":3333,"type":16},{"name":21,"slug":22,"type":16},{"slug":3337,"name":3337,"fn":3338,"description":3339,"org":3481,"tags":3482,"stars":26,"repoUrl":27,"updatedAt":3354},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3483,3484,3485,3486],{"name":3343,"slug":3344,"type":16},{"name":3346,"slug":3347,"type":16},{"name":3349,"slug":3350,"type":16},{"name":3352,"slug":3353,"type":16},{"slug":3298,"name":3298,"fn":3356,"description":3357,"org":3488,"tags":3489,"stars":26,"repoUrl":27,"updatedAt":3367},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3490,3491,3492],{"name":3361,"slug":3362,"type":16},{"name":3364,"slug":3365,"type":16},{"name":21,"slug":22,"type":16},{"slug":3276,"name":3276,"fn":3369,"description":3370,"org":3494,"tags":3495,"stars":26,"repoUrl":27,"updatedAt":3379},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3496,3497,3498],{"name":3364,"slug":3365,"type":16},{"name":3375,"slug":3376,"type":16},{"name":174,"slug":3378,"type":16},{"slug":3381,"name":3381,"fn":3382,"description":3383,"org":3500,"tags":3501,"stars":26,"repoUrl":27,"updatedAt":3391},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3502,3503,3504],{"name":24,"slug":25,"type":16},{"name":3364,"slug":3365,"type":16},{"name":3389,"slug":3390,"type":16},{"slug":3393,"name":3393,"fn":3394,"description":3395,"org":3506,"tags":3507,"stars":26,"repoUrl":27,"updatedAt":3405},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3508,3509,3510],{"name":3330,"slug":33,"type":16},{"name":3400,"slug":3401,"type":16},{"name":3403,"slug":3404,"type":16},{"slug":4,"name":4,"fn":5,"description":6,"org":3512,"tags":3513,"stars":26,"repoUrl":27,"updatedAt":28},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3514,3515,3516,3517],{"name":18,"slug":19,"type":16},{"name":24,"slug":25,"type":16},{"name":14,"slug":15,"type":16},{"name":21,"slug":22,"type":16}]