[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-openzeppelin-setup-stellar-contracts":3,"mdc-gpyz8o-key":33,"related-repo-openzeppelin-setup-stellar-contracts":868,"related-org-openzeppelin-setup-stellar-contracts":957},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":22,"repoUrl":23,"updatedAt":24,"license":25,"forks":26,"topics":27,"repo":28,"sourceUrl":31,"mdContent":32},"setup-stellar-contracts","set up Stellar Soroban smart contract projects","Set up a Stellar\u002FSoroban smart contract project with OpenZeppelin Contracts for Stellar. Use when users need to: (1) install Stellar CLI and Rust toolchain for Soroban, (2) create a new Soroban project, (3) add OpenZeppelin Stellar dependencies to Cargo.toml, or (4) understand Soroban import conventions and contract patterns for OpenZeppelin.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},"openzeppelin","OpenZeppelin","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fopenzeppelin.png",[12,16,19],{"name":13,"slug":14,"type":15},"Web3","web3","tag",{"name":17,"slug":18,"type":15},"Rust","rust",{"name":20,"slug":21,"type":15},"Smart Contracts","smart-contracts",193,"https:\u002F\u002Fgithub.com\u002FOpenZeppelin\u002Fopenzeppelin-skills","2026-07-13T06:04:23.807685","AGPL-3.0-only",25,[],{"repoUrl":23,"stars":22,"forks":26,"topics":29,"description":30},[],"Agent skills for secure smart contract development with OpenZeppelin Contracts libraries","https:\u002F\u002Fgithub.com\u002FOpenZeppelin\u002Fopenzeppelin-skills\u002Ftree\u002FHEAD\u002Fskills\u002Fsetup-stellar-contracts","---\nname: setup-stellar-contracts\ndescription: \"Set up a Stellar\u002FSoroban smart contract project with OpenZeppelin Contracts for Stellar. Use when users need to: (1) install Stellar CLI and Rust toolchain for Soroban, (2) create a new Soroban project, (3) add OpenZeppelin Stellar dependencies to Cargo.toml, or (4) understand Soroban import conventions and contract patterns for OpenZeppelin.\"\nlicense: AGPL-3.0-only\nmetadata:\n  author: OpenZeppelin\n---\n\n# Stellar Setup\n\n## Soroban\u002FStellar Development Setup\n\nInstall the Rust toolchain (v1.84.0+) and the Soroban WASM target:\n\n```bash\ncurl --proto '=https' --tlsv1.2 -sSf https:\u002F\u002Fsh.rustup.rs | sh\nrustup target add wasm32v1-none\n```\n\nInstall the Stellar CLI:\n\n```bash\ncurl -fsSL https:\u002F\u002Fgithub.com\u002Fstellar\u002Fstellar-cli\u002Fraw\u002Fmain\u002Finstall.sh | sh\n```\n\nCreate a new Soroban project:\n\n```bash\nstellar contract init my_project\n```\n\nThis creates a Cargo workspace with contracts in `contracts\u002F*\u002F`.\n\n## OpenZeppelin Dependencies\n\nLook up the current version from the [stellar-contracts repo](https:\u002F\u002Fgithub.com\u002FOpenZeppelin\u002Fstellar-contracts) before adding. Pin exact versions with `=` as the library is under active development.\n\nAdd OpenZeppelin crates to the **root** `Cargo.toml` under `[workspace.dependencies]`:\n\n```toml\n[workspace.dependencies]\nstellar-tokens = \"=\u003CVERSION>\"\nstellar-access = \"=\u003CVERSION>\"\nstellar-contract-utils = \"=\u003CVERSION>\"\nstellar-macros = \"=\u003CVERSION>\"\n```\n\nThen reference them in the **per-contract** `contracts\u002F*\u002FCargo.toml`:\n\n```toml\n[dependencies]\nsoroban-sdk = { workspace = true }\nstellar-tokens = { workspace = true }\nstellar-access = { workspace = true }\nstellar-contract-utils = { workspace = true }\nstellar-macros = { workspace = true }\n```\n\nAvailable crates: `stellar-access`, `stellar-accounts`, `stellar-contract-utils`, `stellar-fee-abstraction`, `stellar-governance`, `stellar-macros`, `stellar-tokens`.\n\n> Only add the crates the contract actually uses. `stellar-macros` provides proc-macro attributes (for example, `#[when_not_paused]`, `#[only_owner]`, `#[derive(Upgradeable)]`) and is needed in most contracts.\n\n## Code Patterns\n\nImports use underscores as the crate root (Rust convention):\n\n```rust\nuse stellar_tokens::fungible::{Base, FungibleToken};\nuse stellar_tokens::fungible::burnable::FungibleBurnable;\nuse stellar_access::ownable::Ownable;\nuse stellar_contract_utils::pausable::Pausable;\nuse stellar_macros::when_not_paused;\n```\n\nContracts use `#[contract]` on the struct and `#[contractimpl]` on the impl block (from `soroban_sdk`):\n\n```rust\nuse soroban_sdk::{contract, contractimpl, Env};\n\n#[contract]\npub struct MyToken;\n\n#[contractimpl]\nimpl MyToken {\n    \u002F\u002F Implement trait methods here\n}\n```\n\nTrait implementations are separate `impl` blocks per trait (e.g., `FungibleToken`, `Pausable`). Guard macros like `#[when_not_paused]` and `#[only_owner]` decorate individual functions.\n\n## Platform Notes\n\n- **Read operations are free in Stellar.** Optimize for minimizing writes; reads and computation are cheap. Prefer clean, readable code over micro-optimizations.\n- **Instance storage TTL extension is the developer's responsibility.** The OpenZeppelin library handles TTL extension for other storage entries, but contracts must extend their own `instance` storage entries to prevent expiration.\n\n## Build & Test\n\nBuild the contract to WASM:\n\n```bash\nstellar contract build\n```\n\nThis is a shortcut for `cargo build --target wasm32v1-none --release`. Output appears in `target\u002Fwasm32v1-none\u002Frelease\u002F`.\n\nRun tests:\n\n```bash\ncargo test\n```\n\n> `soroban-sdk` testutils are automatically enabled for in-crate unit tests.\n",{"data":34,"body":36},{"name":4,"description":6,"license":25,"metadata":35},{"author":9},{"type":37,"children":38},"root",[39,48,55,61,156,161,193,198,228,241,247,271,299,351,369,425,480,518,524,529,577,606,688,730,736,769,775,780,803,823,828,848,862],{"type":40,"tag":41,"props":42,"children":44},"element","h1",{"id":43},"stellar-setup",[45],{"type":46,"value":47},"text","Stellar Setup",{"type":40,"tag":49,"props":50,"children":52},"h2",{"id":51},"sorobanstellar-development-setup",[53],{"type":46,"value":54},"Soroban\u002FStellar Development Setup",{"type":40,"tag":56,"props":57,"children":58},"p",{},[59],{"type":46,"value":60},"Install the Rust toolchain (v1.84.0+) and the Soroban WASM target:",{"type":40,"tag":62,"props":63,"children":68},"pre",{"className":64,"code":65,"language":66,"meta":67,"style":67},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","curl --proto '=https' --tlsv1.2 -sSf https:\u002F\u002Fsh.rustup.rs | sh\nrustup target add wasm32v1-none\n","bash","",[69],{"type":40,"tag":70,"props":71,"children":72},"code",{"__ignoreMap":67},[73,132],{"type":40,"tag":74,"props":75,"children":78},"span",{"class":76,"line":77},"line",1,[79,85,91,97,102,107,112,117,122,127],{"type":40,"tag":74,"props":80,"children":82},{"style":81},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[83],{"type":46,"value":84},"curl",{"type":40,"tag":74,"props":86,"children":88},{"style":87},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[89],{"type":46,"value":90}," --proto",{"type":40,"tag":74,"props":92,"children":94},{"style":93},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[95],{"type":46,"value":96}," '",{"type":40,"tag":74,"props":98,"children":99},{"style":87},[100],{"type":46,"value":101},"=https",{"type":40,"tag":74,"props":103,"children":104},{"style":93},[105],{"type":46,"value":106},"'",{"type":40,"tag":74,"props":108,"children":109},{"style":87},[110],{"type":46,"value":111}," --tlsv1.2",{"type":40,"tag":74,"props":113,"children":114},{"style":87},[115],{"type":46,"value":116}," -sSf",{"type":40,"tag":74,"props":118,"children":119},{"style":87},[120],{"type":46,"value":121}," https:\u002F\u002Fsh.rustup.rs",{"type":40,"tag":74,"props":123,"children":124},{"style":93},[125],{"type":46,"value":126}," |",{"type":40,"tag":74,"props":128,"children":129},{"style":81},[130],{"type":46,"value":131}," sh\n",{"type":40,"tag":74,"props":133,"children":135},{"class":76,"line":134},2,[136,141,146,151],{"type":40,"tag":74,"props":137,"children":138},{"style":81},[139],{"type":46,"value":140},"rustup",{"type":40,"tag":74,"props":142,"children":143},{"style":87},[144],{"type":46,"value":145}," target",{"type":40,"tag":74,"props":147,"children":148},{"style":87},[149],{"type":46,"value":150}," add",{"type":40,"tag":74,"props":152,"children":153},{"style":87},[154],{"type":46,"value":155}," wasm32v1-none\n",{"type":40,"tag":56,"props":157,"children":158},{},[159],{"type":46,"value":160},"Install the Stellar CLI:",{"type":40,"tag":62,"props":162,"children":164},{"className":64,"code":163,"language":66,"meta":67,"style":67},"curl -fsSL https:\u002F\u002Fgithub.com\u002Fstellar\u002Fstellar-cli\u002Fraw\u002Fmain\u002Finstall.sh | sh\n",[165],{"type":40,"tag":70,"props":166,"children":167},{"__ignoreMap":67},[168],{"type":40,"tag":74,"props":169,"children":170},{"class":76,"line":77},[171,175,180,185,189],{"type":40,"tag":74,"props":172,"children":173},{"style":81},[174],{"type":46,"value":84},{"type":40,"tag":74,"props":176,"children":177},{"style":87},[178],{"type":46,"value":179}," -fsSL",{"type":40,"tag":74,"props":181,"children":182},{"style":87},[183],{"type":46,"value":184}," https:\u002F\u002Fgithub.com\u002Fstellar\u002Fstellar-cli\u002Fraw\u002Fmain\u002Finstall.sh",{"type":40,"tag":74,"props":186,"children":187},{"style":93},[188],{"type":46,"value":126},{"type":40,"tag":74,"props":190,"children":191},{"style":81},[192],{"type":46,"value":131},{"type":40,"tag":56,"props":194,"children":195},{},[196],{"type":46,"value":197},"Create a new Soroban project:",{"type":40,"tag":62,"props":199,"children":201},{"className":64,"code":200,"language":66,"meta":67,"style":67},"stellar contract init my_project\n",[202],{"type":40,"tag":70,"props":203,"children":204},{"__ignoreMap":67},[205],{"type":40,"tag":74,"props":206,"children":207},{"class":76,"line":77},[208,213,218,223],{"type":40,"tag":74,"props":209,"children":210},{"style":81},[211],{"type":46,"value":212},"stellar",{"type":40,"tag":74,"props":214,"children":215},{"style":87},[216],{"type":46,"value":217}," contract",{"type":40,"tag":74,"props":219,"children":220},{"style":87},[221],{"type":46,"value":222}," init",{"type":40,"tag":74,"props":224,"children":225},{"style":87},[226],{"type":46,"value":227}," my_project\n",{"type":40,"tag":56,"props":229,"children":230},{},[231,233,239],{"type":46,"value":232},"This creates a Cargo workspace with contracts in ",{"type":40,"tag":70,"props":234,"children":236},{"className":235},[],[237],{"type":46,"value":238},"contracts\u002F*\u002F",{"type":46,"value":240},".",{"type":40,"tag":49,"props":242,"children":244},{"id":243},"openzeppelin-dependencies",[245],{"type":46,"value":246},"OpenZeppelin Dependencies",{"type":40,"tag":56,"props":248,"children":249},{},[250,252,261,263,269],{"type":46,"value":251},"Look up the current version from the ",{"type":40,"tag":253,"props":254,"children":258},"a",{"href":255,"rel":256},"https:\u002F\u002Fgithub.com\u002FOpenZeppelin\u002Fstellar-contracts",[257],"nofollow",[259],{"type":46,"value":260},"stellar-contracts repo",{"type":46,"value":262}," before adding. Pin exact versions with ",{"type":40,"tag":70,"props":264,"children":266},{"className":265},[],[267],{"type":46,"value":268},"=",{"type":46,"value":270}," as the library is under active development.",{"type":40,"tag":56,"props":272,"children":273},{},[274,276,281,283,289,291,297],{"type":46,"value":275},"Add OpenZeppelin crates to the ",{"type":40,"tag":277,"props":278,"children":279},"strong",{},[280],{"type":46,"value":37},{"type":46,"value":282}," ",{"type":40,"tag":70,"props":284,"children":286},{"className":285},[],[287],{"type":46,"value":288},"Cargo.toml",{"type":46,"value":290}," under ",{"type":40,"tag":70,"props":292,"children":294},{"className":293},[],[295],{"type":46,"value":296},"[workspace.dependencies]",{"type":46,"value":298},":",{"type":40,"tag":62,"props":300,"children":304},{"className":301,"code":302,"language":303,"meta":67,"style":67},"language-toml shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","[workspace.dependencies]\nstellar-tokens = \"=\u003CVERSION>\"\nstellar-access = \"=\u003CVERSION>\"\nstellar-contract-utils = \"=\u003CVERSION>\"\nstellar-macros = \"=\u003CVERSION>\"\n","toml",[305],{"type":40,"tag":70,"props":306,"children":307},{"__ignoreMap":67},[308,316,324,333,342],{"type":40,"tag":74,"props":309,"children":310},{"class":76,"line":77},[311],{"type":40,"tag":74,"props":312,"children":313},{},[314],{"type":46,"value":315},"[workspace.dependencies]\n",{"type":40,"tag":74,"props":317,"children":318},{"class":76,"line":134},[319],{"type":40,"tag":74,"props":320,"children":321},{},[322],{"type":46,"value":323},"stellar-tokens = \"=\u003CVERSION>\"\n",{"type":40,"tag":74,"props":325,"children":327},{"class":76,"line":326},3,[328],{"type":40,"tag":74,"props":329,"children":330},{},[331],{"type":46,"value":332},"stellar-access = \"=\u003CVERSION>\"\n",{"type":40,"tag":74,"props":334,"children":336},{"class":76,"line":335},4,[337],{"type":40,"tag":74,"props":338,"children":339},{},[340],{"type":46,"value":341},"stellar-contract-utils = \"=\u003CVERSION>\"\n",{"type":40,"tag":74,"props":343,"children":345},{"class":76,"line":344},5,[346],{"type":40,"tag":74,"props":347,"children":348},{},[349],{"type":46,"value":350},"stellar-macros = \"=\u003CVERSION>\"\n",{"type":40,"tag":56,"props":352,"children":353},{},[354,356,361,362,368],{"type":46,"value":355},"Then reference them in the ",{"type":40,"tag":277,"props":357,"children":358},{},[359],{"type":46,"value":360},"per-contract",{"type":46,"value":282},{"type":40,"tag":70,"props":363,"children":365},{"className":364},[],[366],{"type":46,"value":367},"contracts\u002F*\u002FCargo.toml",{"type":46,"value":298},{"type":40,"tag":62,"props":370,"children":372},{"className":301,"code":371,"language":303,"meta":67,"style":67},"[dependencies]\nsoroban-sdk = { workspace = true }\nstellar-tokens = { workspace = true }\nstellar-access = { workspace = true }\nstellar-contract-utils = { workspace = true }\nstellar-macros = { workspace = true }\n",[373],{"type":40,"tag":70,"props":374,"children":375},{"__ignoreMap":67},[376,384,392,400,408,416],{"type":40,"tag":74,"props":377,"children":378},{"class":76,"line":77},[379],{"type":40,"tag":74,"props":380,"children":381},{},[382],{"type":46,"value":383},"[dependencies]\n",{"type":40,"tag":74,"props":385,"children":386},{"class":76,"line":134},[387],{"type":40,"tag":74,"props":388,"children":389},{},[390],{"type":46,"value":391},"soroban-sdk = { workspace = true }\n",{"type":40,"tag":74,"props":393,"children":394},{"class":76,"line":326},[395],{"type":40,"tag":74,"props":396,"children":397},{},[398],{"type":46,"value":399},"stellar-tokens = { workspace = true }\n",{"type":40,"tag":74,"props":401,"children":402},{"class":76,"line":335},[403],{"type":40,"tag":74,"props":404,"children":405},{},[406],{"type":46,"value":407},"stellar-access = { workspace = true }\n",{"type":40,"tag":74,"props":409,"children":410},{"class":76,"line":344},[411],{"type":40,"tag":74,"props":412,"children":413},{},[414],{"type":46,"value":415},"stellar-contract-utils = { workspace = true }\n",{"type":40,"tag":74,"props":417,"children":419},{"class":76,"line":418},6,[420],{"type":40,"tag":74,"props":421,"children":422},{},[423],{"type":46,"value":424},"stellar-macros = { workspace = true }\n",{"type":40,"tag":56,"props":426,"children":427},{},[428,430,436,438,444,445,451,452,458,459,465,466,472,473,479],{"type":46,"value":429},"Available crates: ",{"type":40,"tag":70,"props":431,"children":433},{"className":432},[],[434],{"type":46,"value":435},"stellar-access",{"type":46,"value":437},", ",{"type":40,"tag":70,"props":439,"children":441},{"className":440},[],[442],{"type":46,"value":443},"stellar-accounts",{"type":46,"value":437},{"type":40,"tag":70,"props":446,"children":448},{"className":447},[],[449],{"type":46,"value":450},"stellar-contract-utils",{"type":46,"value":437},{"type":40,"tag":70,"props":453,"children":455},{"className":454},[],[456],{"type":46,"value":457},"stellar-fee-abstraction",{"type":46,"value":437},{"type":40,"tag":70,"props":460,"children":462},{"className":461},[],[463],{"type":46,"value":464},"stellar-governance",{"type":46,"value":437},{"type":40,"tag":70,"props":467,"children":469},{"className":468},[],[470],{"type":46,"value":471},"stellar-macros",{"type":46,"value":437},{"type":40,"tag":70,"props":474,"children":476},{"className":475},[],[477],{"type":46,"value":478},"stellar-tokens",{"type":46,"value":240},{"type":40,"tag":481,"props":482,"children":483},"blockquote",{},[484],{"type":40,"tag":56,"props":485,"children":486},{},[487,489,494,496,502,503,509,510,516],{"type":46,"value":488},"Only add the crates the contract actually uses. ",{"type":40,"tag":70,"props":490,"children":492},{"className":491},[],[493],{"type":46,"value":471},{"type":46,"value":495}," provides proc-macro attributes (for example, ",{"type":40,"tag":70,"props":497,"children":499},{"className":498},[],[500],{"type":46,"value":501},"#[when_not_paused]",{"type":46,"value":437},{"type":40,"tag":70,"props":504,"children":506},{"className":505},[],[507],{"type":46,"value":508},"#[only_owner]",{"type":46,"value":437},{"type":40,"tag":70,"props":511,"children":513},{"className":512},[],[514],{"type":46,"value":515},"#[derive(Upgradeable)]",{"type":46,"value":517},") and is needed in most contracts.",{"type":40,"tag":49,"props":519,"children":521},{"id":520},"code-patterns",[522],{"type":46,"value":523},"Code Patterns",{"type":40,"tag":56,"props":525,"children":526},{},[527],{"type":46,"value":528},"Imports use underscores as the crate root (Rust convention):",{"type":40,"tag":62,"props":530,"children":533},{"className":531,"code":532,"language":18,"meta":67,"style":67},"language-rust shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","use stellar_tokens::fungible::{Base, FungibleToken};\nuse stellar_tokens::fungible::burnable::FungibleBurnable;\nuse stellar_access::ownable::Ownable;\nuse stellar_contract_utils::pausable::Pausable;\nuse stellar_macros::when_not_paused;\n",[534],{"type":40,"tag":70,"props":535,"children":536},{"__ignoreMap":67},[537,545,553,561,569],{"type":40,"tag":74,"props":538,"children":539},{"class":76,"line":77},[540],{"type":40,"tag":74,"props":541,"children":542},{},[543],{"type":46,"value":544},"use stellar_tokens::fungible::{Base, FungibleToken};\n",{"type":40,"tag":74,"props":546,"children":547},{"class":76,"line":134},[548],{"type":40,"tag":74,"props":549,"children":550},{},[551],{"type":46,"value":552},"use stellar_tokens::fungible::burnable::FungibleBurnable;\n",{"type":40,"tag":74,"props":554,"children":555},{"class":76,"line":326},[556],{"type":40,"tag":74,"props":557,"children":558},{},[559],{"type":46,"value":560},"use stellar_access::ownable::Ownable;\n",{"type":40,"tag":74,"props":562,"children":563},{"class":76,"line":335},[564],{"type":40,"tag":74,"props":565,"children":566},{},[567],{"type":46,"value":568},"use stellar_contract_utils::pausable::Pausable;\n",{"type":40,"tag":74,"props":570,"children":571},{"class":76,"line":344},[572],{"type":40,"tag":74,"props":573,"children":574},{},[575],{"type":46,"value":576},"use stellar_macros::when_not_paused;\n",{"type":40,"tag":56,"props":578,"children":579},{},[580,582,588,590,596,598,604],{"type":46,"value":581},"Contracts use ",{"type":40,"tag":70,"props":583,"children":585},{"className":584},[],[586],{"type":46,"value":587},"#[contract]",{"type":46,"value":589}," on the struct and ",{"type":40,"tag":70,"props":591,"children":593},{"className":592},[],[594],{"type":46,"value":595},"#[contractimpl]",{"type":46,"value":597}," on the impl block (from ",{"type":40,"tag":70,"props":599,"children":601},{"className":600},[],[602],{"type":46,"value":603},"soroban_sdk",{"type":46,"value":605},"):",{"type":40,"tag":62,"props":607,"children":609},{"className":531,"code":608,"language":18,"meta":67,"style":67},"use soroban_sdk::{contract, contractimpl, Env};\n\n#[contract]\npub struct MyToken;\n\n#[contractimpl]\nimpl MyToken {\n    \u002F\u002F Implement trait methods here\n}\n",[610],{"type":40,"tag":70,"props":611,"children":612},{"__ignoreMap":67},[613,621,630,638,646,653,661,670,679],{"type":40,"tag":74,"props":614,"children":615},{"class":76,"line":77},[616],{"type":40,"tag":74,"props":617,"children":618},{},[619],{"type":46,"value":620},"use soroban_sdk::{contract, contractimpl, Env};\n",{"type":40,"tag":74,"props":622,"children":623},{"class":76,"line":134},[624],{"type":40,"tag":74,"props":625,"children":627},{"emptyLinePlaceholder":626},true,[628],{"type":46,"value":629},"\n",{"type":40,"tag":74,"props":631,"children":632},{"class":76,"line":326},[633],{"type":40,"tag":74,"props":634,"children":635},{},[636],{"type":46,"value":637},"#[contract]\n",{"type":40,"tag":74,"props":639,"children":640},{"class":76,"line":335},[641],{"type":40,"tag":74,"props":642,"children":643},{},[644],{"type":46,"value":645},"pub struct MyToken;\n",{"type":40,"tag":74,"props":647,"children":648},{"class":76,"line":344},[649],{"type":40,"tag":74,"props":650,"children":651},{"emptyLinePlaceholder":626},[652],{"type":46,"value":629},{"type":40,"tag":74,"props":654,"children":655},{"class":76,"line":418},[656],{"type":40,"tag":74,"props":657,"children":658},{},[659],{"type":46,"value":660},"#[contractimpl]\n",{"type":40,"tag":74,"props":662,"children":664},{"class":76,"line":663},7,[665],{"type":40,"tag":74,"props":666,"children":667},{},[668],{"type":46,"value":669},"impl MyToken {\n",{"type":40,"tag":74,"props":671,"children":673},{"class":76,"line":672},8,[674],{"type":40,"tag":74,"props":675,"children":676},{},[677],{"type":46,"value":678},"    \u002F\u002F Implement trait methods here\n",{"type":40,"tag":74,"props":680,"children":682},{"class":76,"line":681},9,[683],{"type":40,"tag":74,"props":684,"children":685},{},[686],{"type":46,"value":687},"}\n",{"type":40,"tag":56,"props":689,"children":690},{},[691,693,699,701,707,708,714,716,721,723,728],{"type":46,"value":692},"Trait implementations are separate ",{"type":40,"tag":70,"props":694,"children":696},{"className":695},[],[697],{"type":46,"value":698},"impl",{"type":46,"value":700}," blocks per trait (e.g., ",{"type":40,"tag":70,"props":702,"children":704},{"className":703},[],[705],{"type":46,"value":706},"FungibleToken",{"type":46,"value":437},{"type":40,"tag":70,"props":709,"children":711},{"className":710},[],[712],{"type":46,"value":713},"Pausable",{"type":46,"value":715},"). Guard macros like ",{"type":40,"tag":70,"props":717,"children":719},{"className":718},[],[720],{"type":46,"value":501},{"type":46,"value":722}," and ",{"type":40,"tag":70,"props":724,"children":726},{"className":725},[],[727],{"type":46,"value":508},{"type":46,"value":729}," decorate individual functions.",{"type":40,"tag":49,"props":731,"children":733},{"id":732},"platform-notes",[734],{"type":46,"value":735},"Platform Notes",{"type":40,"tag":737,"props":738,"children":739},"ul",{},[740,751],{"type":40,"tag":741,"props":742,"children":743},"li",{},[744,749],{"type":40,"tag":277,"props":745,"children":746},{},[747],{"type":46,"value":748},"Read operations are free in Stellar.",{"type":46,"value":750}," Optimize for minimizing writes; reads and computation are cheap. Prefer clean, readable code over micro-optimizations.",{"type":40,"tag":741,"props":752,"children":753},{},[754,759,761,767],{"type":40,"tag":277,"props":755,"children":756},{},[757],{"type":46,"value":758},"Instance storage TTL extension is the developer's responsibility.",{"type":46,"value":760}," The OpenZeppelin library handles TTL extension for other storage entries, but contracts must extend their own ",{"type":40,"tag":70,"props":762,"children":764},{"className":763},[],[765],{"type":46,"value":766},"instance",{"type":46,"value":768}," storage entries to prevent expiration.",{"type":40,"tag":49,"props":770,"children":772},{"id":771},"build-test",[773],{"type":46,"value":774},"Build & Test",{"type":40,"tag":56,"props":776,"children":777},{},[778],{"type":46,"value":779},"Build the contract to WASM:",{"type":40,"tag":62,"props":781,"children":783},{"className":64,"code":782,"language":66,"meta":67,"style":67},"stellar contract build\n",[784],{"type":40,"tag":70,"props":785,"children":786},{"__ignoreMap":67},[787],{"type":40,"tag":74,"props":788,"children":789},{"class":76,"line":77},[790,794,798],{"type":40,"tag":74,"props":791,"children":792},{"style":81},[793],{"type":46,"value":212},{"type":40,"tag":74,"props":795,"children":796},{"style":87},[797],{"type":46,"value":217},{"type":40,"tag":74,"props":799,"children":800},{"style":87},[801],{"type":46,"value":802}," build\n",{"type":40,"tag":56,"props":804,"children":805},{},[806,808,814,816,822],{"type":46,"value":807},"This is a shortcut for ",{"type":40,"tag":70,"props":809,"children":811},{"className":810},[],[812],{"type":46,"value":813},"cargo build --target wasm32v1-none --release",{"type":46,"value":815},". Output appears in ",{"type":40,"tag":70,"props":817,"children":819},{"className":818},[],[820],{"type":46,"value":821},"target\u002Fwasm32v1-none\u002Frelease\u002F",{"type":46,"value":240},{"type":40,"tag":56,"props":824,"children":825},{},[826],{"type":46,"value":827},"Run tests:",{"type":40,"tag":62,"props":829,"children":831},{"className":64,"code":830,"language":66,"meta":67,"style":67},"cargo test\n",[832],{"type":40,"tag":70,"props":833,"children":834},{"__ignoreMap":67},[835],{"type":40,"tag":74,"props":836,"children":837},{"class":76,"line":77},[838,843],{"type":40,"tag":74,"props":839,"children":840},{"style":81},[841],{"type":46,"value":842},"cargo",{"type":40,"tag":74,"props":844,"children":845},{"style":87},[846],{"type":46,"value":847}," test\n",{"type":40,"tag":481,"props":849,"children":850},{},[851],{"type":40,"tag":56,"props":852,"children":853},{},[854,860],{"type":40,"tag":70,"props":855,"children":857},{"className":856},[],[858],{"type":46,"value":859},"soroban-sdk",{"type":46,"value":861}," testutils are automatically enabled for in-crate unit tests.",{"type":40,"tag":863,"props":864,"children":865},"style",{},[866],{"type":46,"value":867},"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":869,"total":956},[870,887,902,914,927,933,943],{"slug":871,"name":871,"fn":872,"description":873,"org":874,"tags":875,"stars":22,"repoUrl":23,"updatedAt":886},"develop-secure-contracts","develop secure smart contracts with OpenZeppelin","Develop secure smart contracts using OpenZeppelin Contracts libraries. Use when users need to integrate OpenZeppelin library components — including token standards (ERC20, ERC721, ERC1155), access control (Ownable, AccessControl, AccessManager), security primitives (Pausable, ReentrancyGuard), governance (Governor, timelocks), or accounts (multisig, account abstraction) — into existing or new contracts. Covers pattern discovery from library source, CLI contract generators, and library-first integration. Supports Solidity, Cairo, Stylus, Stellar, and Sui Move.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[876,879,882,883],{"name":877,"slug":878,"type":15},"Access Control","access-control",{"name":880,"slug":881,"type":15},"Security","security",{"name":20,"slug":21,"type":15},{"name":884,"slug":885,"type":15},"Solidity","solidity","2026-07-13T06:04:32.666273",{"slug":888,"name":888,"fn":889,"description":890,"org":891,"tags":892,"stars":22,"repoUrl":23,"updatedAt":901},"review-sui-contracts","review Sui Move smart contracts","Review Sui Move code that integrates OpenZeppelin Contracts for Sui against the library's own patterns and conventions. Use this when a developer wants their integration checked before shipping. Triggers: \"review my Sui Move code\", \"am I using OpenZeppelin correctly\", \"check this integration\", \"is this idiomatic\", \"review before audit\". Checks correct use of OZ primitives, deviations from examples\u002Fdoc-comments, upheld invariants, test coverage, and code-quality\u002Fstyle. This is an AI code review, not a formal security audit.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[893,896,899,900],{"name":894,"slug":895,"type":15},"Blockchain","blockchain",{"name":897,"slug":898,"type":15},"Code Review","code-review",{"name":17,"slug":18,"type":15},{"name":20,"slug":21,"type":15},"2026-07-16T06:00:49.17387",{"slug":903,"name":903,"fn":904,"description":905,"org":906,"tags":907,"stars":22,"repoUrl":23,"updatedAt":913},"setup-cairo-contracts","set up Cairo smart contract projects","Set up a Cairo smart contract project with OpenZeppelin Contracts for Cairo on Starknet. Use when users need to: (1) create a new Scarb\u002FStarknet project, (2) add OpenZeppelin Contracts for Cairo dependencies to Scarb.toml, (3) configure individual or umbrella OpenZeppelin packages, or (4) understand Cairo import conventions and component patterns for OpenZeppelin.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[908,911,912],{"name":909,"slug":910,"type":15},"Engineering","engineering",{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},"2026-07-13T06:04:17.186825",{"slug":915,"name":915,"fn":916,"description":917,"org":918,"tags":919,"stars":22,"repoUrl":23,"updatedAt":926},"setup-solidity-contracts","set up Solidity smart contract projects","Set up a Solidity smart contract project with OpenZeppelin Contracts. Use when users need to: (1) create a new Hardhat or Foundry project, (2) install OpenZeppelin Contracts dependencies for Solidity, (3) configure remappings for Foundry, or (4) understand Solidity import conventions for OpenZeppelin.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[920,921,924,925],{"name":909,"slug":910,"type":15},{"name":922,"slug":923,"type":15},"Foundry","foundry",{"name":20,"slug":21,"type":15},{"name":884,"slug":885,"type":15},"2026-07-13T06:04:29.360325",{"slug":4,"name":4,"fn":5,"description":6,"org":928,"tags":929,"stars":22,"repoUrl":23,"updatedAt":24},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[930,931,932],{"name":17,"slug":18,"type":15},{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},{"slug":934,"name":934,"fn":935,"description":936,"org":937,"tags":938,"stars":22,"repoUrl":23,"updatedAt":942},"setup-stylus-contracts","set up Stylus smart contract projects","Set up a Stylus smart contract project with OpenZeppelin Contracts for Stylus on Arbitrum. Use when users need to: (1) install Rust toolchain and WASM target for Stylus, (2) create a new Cargo Stylus project, (3) add OpenZeppelin Stylus dependencies to Cargo.toml, or (4) understand Stylus import conventions and storage patterns for OpenZeppelin.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[939,940,941],{"name":17,"slug":18,"type":15},{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},"2026-07-13T06:04:18.638516",{"slug":944,"name":944,"fn":945,"description":946,"org":947,"tags":948,"stars":22,"repoUrl":23,"updatedAt":955},"setup-sui-contracts","set up Sui Move smart contracts","Set up a Sui Move smart contract project with OpenZeppelin Contracts for Sui. Use when users need to: (1) install the Sui CLI and Move toolchain, (2) create a new Sui Move package, (3) discover and add OpenZeppelin Sui dependencies to Move.toml via the Move Registry (MVR), (4) learn the integration pattern from the library's examples and API docs before implementing, or (5) understand Sui Move import conventions and build\u002Ftest commands for OpenZeppelin.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[949,950,953,954],{"name":894,"slug":895,"type":15},{"name":951,"slug":952,"type":15},"CLI","cli",{"name":17,"slug":18,"type":15},{"name":20,"slug":21,"type":15},"2026-07-16T05:59:21.671811",11,{"items":958,"total":956},[959,966,973,979,986,992,998,1005,1017,1028,1039],{"slug":871,"name":871,"fn":872,"description":873,"org":960,"tags":961,"stars":22,"repoUrl":23,"updatedAt":886},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[962,963,964,965],{"name":877,"slug":878,"type":15},{"name":880,"slug":881,"type":15},{"name":20,"slug":21,"type":15},{"name":884,"slug":885,"type":15},{"slug":888,"name":888,"fn":889,"description":890,"org":967,"tags":968,"stars":22,"repoUrl":23,"updatedAt":901},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[969,970,971,972],{"name":894,"slug":895,"type":15},{"name":897,"slug":898,"type":15},{"name":17,"slug":18,"type":15},{"name":20,"slug":21,"type":15},{"slug":903,"name":903,"fn":904,"description":905,"org":974,"tags":975,"stars":22,"repoUrl":23,"updatedAt":913},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[976,977,978],{"name":909,"slug":910,"type":15},{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},{"slug":915,"name":915,"fn":916,"description":917,"org":980,"tags":981,"stars":22,"repoUrl":23,"updatedAt":926},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[982,983,984,985],{"name":909,"slug":910,"type":15},{"name":922,"slug":923,"type":15},{"name":20,"slug":21,"type":15},{"name":884,"slug":885,"type":15},{"slug":4,"name":4,"fn":5,"description":6,"org":987,"tags":988,"stars":22,"repoUrl":23,"updatedAt":24},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[989,990,991],{"name":17,"slug":18,"type":15},{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},{"slug":934,"name":934,"fn":935,"description":936,"org":993,"tags":994,"stars":22,"repoUrl":23,"updatedAt":942},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[995,996,997],{"name":17,"slug":18,"type":15},{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},{"slug":944,"name":944,"fn":945,"description":946,"org":999,"tags":1000,"stars":22,"repoUrl":23,"updatedAt":955},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1001,1002,1003,1004],{"name":894,"slug":895,"type":15},{"name":951,"slug":952,"type":15},{"name":17,"slug":18,"type":15},{"name":20,"slug":21,"type":15},{"slug":1006,"name":1006,"fn":1007,"description":1008,"org":1009,"tags":1010,"stars":22,"repoUrl":23,"updatedAt":1016},"upgrade-cairo-contracts","upgrade Cairo smart contracts on Starknet","Upgrade Cairo smart contracts using OpenZeppelin's UpgradeableComponent on Starknet. Use when users need to: (1) make Cairo contracts upgradeable via replace_class_syscall, (2) integrate the OpenZeppelin UpgradeableComponent, (3) understand Starknet's class-based upgrade model vs EVM proxy patterns, (4) ensure storage compatibility across upgrades, (5) guard upgrade functions with access control, or (6) test upgrade paths for Cairo contracts.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1011,1014,1015],{"name":1012,"slug":1013,"type":15},"Migration","migration",{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},"2026-07-13T06:04:25.126377",{"slug":1018,"name":1018,"fn":1019,"description":1020,"org":1021,"tags":1022,"stars":22,"repoUrl":23,"updatedAt":1027},"upgrade-solidity-contracts","upgrade Solidity smart contracts with proxies","Upgrade Solidity smart contracts using OpenZeppelin proxy patterns. Use when users need to: (1) make contracts upgradeable with UUPS, Transparent, or Beacon proxies, (2) write initializers instead of constructors, (3) use the Hardhat or Foundry upgrades plugins, (4) understand storage layout rules and ERC-7201 namespaced storage, (5) validate upgrade safety, (6) manage proxy deployments and upgrades, or (7) understand upgrade restrictions between OpenZeppelin Contracts major versions.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1023,1024,1025,1026],{"name":1012,"slug":1013,"type":15},{"name":880,"slug":881,"type":15},{"name":20,"slug":21,"type":15},{"name":884,"slug":885,"type":15},"2026-07-13T06:04:20.958319",{"slug":1029,"name":1029,"fn":1030,"description":1031,"org":1032,"tags":1033,"stars":22,"repoUrl":23,"updatedAt":1038},"upgrade-stellar-contracts","upgrade Stellar Soroban smart contracts","Upgrade Stellar\u002FSoroban smart contracts using OpenZeppelin's upgradeable module. Use when users need to: (1) make Soroban contracts upgradeable via native WASM replacement, (2) use Upgradeable or UpgradeableMigratable derive macros, (3) implement atomic upgrade-and-migrate patterns with an Upgrader contract, (4) ensure storage key compatibility across upgrades, or (5) test upgrade paths for Soroban contracts.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1034,1035,1036,1037],{"name":894,"slug":895,"type":15},{"name":1012,"slug":1013,"type":15},{"name":880,"slug":881,"type":15},{"name":20,"slug":21,"type":15},"2026-07-13T06:04:31.398663",{"slug":1040,"name":1040,"fn":1041,"description":1042,"org":1043,"tags":1044,"stars":22,"repoUrl":23,"updatedAt":1049},"upgrade-stylus-contracts","upgrade Stylus smart contracts","Upgrade Stylus smart contracts using OpenZeppelin proxy patterns on Arbitrum. Use when users need to: (1) make Stylus Rust contracts upgradeable with UUPS or Beacon proxies, (2) understand Stylus-specific proxy mechanics (logic_flag, WASM reactivation), (3) integrate UUPSUpgradeable with access control, (4) ensure storage compatibility across upgrades, or (5) test upgrade paths for Stylus contracts.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1045,1046,1047,1048],{"name":1012,"slug":1013,"type":15},{"name":17,"slug":18,"type":15},{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},"2026-07-13T06:04:28.005287"]