[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-openzeppelin-setup-stylus-contracts":3,"mdc--34r4wt-key":33,"related-repo-openzeppelin-setup-stylus-contracts":802,"related-org-openzeppelin-setup-stylus-contracts":891},{"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-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},"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:18.638516","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-stylus-contracts","---\nname: setup-stylus-contracts\ndescription: \"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.\"\nlicense: AGPL-3.0-only\nmetadata:\n  author: OpenZeppelin\n---\n\n# Stylus Setup\n\n## Rust & Cargo Stylus Setup\n\nInstall the Rust toolchain and WASM target:\n\n```bash\ncurl --proto '=https' --tlsv1.2 -sSf https:\u002F\u002Fsh.rustup.rs | sh\nrustup target add wasm32-unknown-unknown\n```\n\nInstall the Cargo Stylus CLI:\n\n```bash\ncargo install --force cargo-stylus\n```\n\nCreate a new Stylus project:\n\n```bash\ncargo stylus new my_project\n```\n\n> A Rust nightly toolchain is required. The project should include a `rust-toolchain.toml` specifying the nightly channel, `rust-src` component, and `wasm32-unknown-unknown` target. Check the [rust-contracts-stylus repo](https:\u002F\u002Fgithub.com\u002FOpenZeppelin\u002Frust-contracts-stylus) for the current recommended nightly date.\n\n## Adding OpenZeppelin Dependencies\n\nLook up the current version from [crates.io\u002Fcrates\u002Fopenzeppelin-stylus](https:\u002F\u002Fcrates.io\u002Fcrates\u002Fopenzeppelin-stylus) before adding. Add to `Cargo.toml`:\n\n```toml\n[dependencies]\nopenzeppelin-stylus = \"=\u003CVERSION>\"\n```\n\nEnable the `export-abi` feature flag for ABI generation:\n\n```toml\n[features]\nexport-abi = [\"openzeppelin-stylus\u002Fexport-abi\"]\n```\n\nThe crate must be compiled as both a library and a cdylib:\n\n```toml\n[lib]\ncrate-type = [\"lib\", \"cdylib\"]\n```\n\n## Import Conventions\n\nImports use `openzeppelin_stylus` (underscores) as the crate root:\n\n```rust\nuse openzeppelin_stylus::token::erc20::{Erc20, IErc20};\nuse openzeppelin_stylus::access::ownable::{Ownable, IOwnable};\nuse openzeppelin_stylus::utils::pausable::{Pausable, IPausable};\nuse openzeppelin_stylus::utils::introspection::erc165::IErc165;\n```\n\nContracts use `#[storage]` and `#[entrypoint]` on the main struct, embedding OpenZeppelin components as fields:\n\n```rust\n#[entrypoint]\n#[storage]\nstruct MyToken {\n    erc20: Erc20,\n    ownable: Ownable,\n}\n```\n\nPublic methods are exposed with `#[public]` and `#[implements(...)]`. The canonical pattern uses an empty impl block for dispatch registration, plus separate trait impl blocks:\n\n```rust\n#[public]\n#[implements(IErc20\u003CError = erc20::Error>, IOwnable\u003CError = ownable::Error>)]\nimpl MyToken {}\n\n#[public]\nimpl IErc20 for MyToken {\n    type Error = erc20::Error;\n    \u002F\u002F delegate to self.erc20 ...\n}\n```\n\nTop-level modules: `access`, `finance`, `proxy`, `token`, `utils`.\n\n## Build & Deploy Basics\n\nValidate the contract compiles to valid Stylus WASM:\n\n```bash\ncargo stylus check\n```\n\nExport the Solidity ABI:\n\n```bash\ncargo stylus export-abi\n```\n\nDeploy to an Arbitrum Stylus endpoint:\n\n```bash\ncargo stylus deploy --endpoint=\"\u003CRPC_URL>\" --private-key-path=\"\u003CKEY_FILE>\"\n```\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,191,196,225,269,275,297,322,335,358,363,386,392,405,447,468,525,545,626,668,674,679,702,707,730,735,796],{"type":40,"tag":41,"props":42,"children":44},"element","h1",{"id":43},"stylus-setup",[45],{"type":46,"value":47},"text","Stylus Setup",{"type":40,"tag":49,"props":50,"children":52},"h2",{"id":51},"rust-cargo-stylus-setup",[53],{"type":46,"value":54},"Rust & Cargo Stylus Setup",{"type":40,"tag":56,"props":57,"children":58},"p",{},[59],{"type":46,"value":60},"Install the Rust toolchain and 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 wasm32-unknown-unknown\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}," wasm32-unknown-unknown\n",{"type":40,"tag":56,"props":157,"children":158},{},[159],{"type":46,"value":160},"Install the Cargo Stylus CLI:",{"type":40,"tag":62,"props":162,"children":164},{"className":64,"code":163,"language":66,"meta":67,"style":67},"cargo install --force cargo-stylus\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,176,181,186],{"type":40,"tag":74,"props":172,"children":173},{"style":81},[174],{"type":46,"value":175},"cargo",{"type":40,"tag":74,"props":177,"children":178},{"style":87},[179],{"type":46,"value":180}," install",{"type":40,"tag":74,"props":182,"children":183},{"style":87},[184],{"type":46,"value":185}," --force",{"type":40,"tag":74,"props":187,"children":188},{"style":87},[189],{"type":46,"value":190}," cargo-stylus\n",{"type":40,"tag":56,"props":192,"children":193},{},[194],{"type":46,"value":195},"Create a new Stylus project:",{"type":40,"tag":62,"props":197,"children":199},{"className":64,"code":198,"language":66,"meta":67,"style":67},"cargo stylus new my_project\n",[200],{"type":40,"tag":70,"props":201,"children":202},{"__ignoreMap":67},[203],{"type":40,"tag":74,"props":204,"children":205},{"class":76,"line":77},[206,210,215,220],{"type":40,"tag":74,"props":207,"children":208},{"style":81},[209],{"type":46,"value":175},{"type":40,"tag":74,"props":211,"children":212},{"style":87},[213],{"type":46,"value":214}," stylus",{"type":40,"tag":74,"props":216,"children":217},{"style":87},[218],{"type":46,"value":219}," new",{"type":40,"tag":74,"props":221,"children":222},{"style":87},[223],{"type":46,"value":224}," my_project\n",{"type":40,"tag":226,"props":227,"children":228},"blockquote",{},[229],{"type":40,"tag":56,"props":230,"children":231},{},[232,234,240,242,248,250,256,258,267],{"type":46,"value":233},"A Rust nightly toolchain is required. The project should include a ",{"type":40,"tag":70,"props":235,"children":237},{"className":236},[],[238],{"type":46,"value":239},"rust-toolchain.toml",{"type":46,"value":241}," specifying the nightly channel, ",{"type":40,"tag":70,"props":243,"children":245},{"className":244},[],[246],{"type":46,"value":247},"rust-src",{"type":46,"value":249}," component, and ",{"type":40,"tag":70,"props":251,"children":253},{"className":252},[],[254],{"type":46,"value":255},"wasm32-unknown-unknown",{"type":46,"value":257}," target. Check the ",{"type":40,"tag":259,"props":260,"children":264},"a",{"href":261,"rel":262},"https:\u002F\u002Fgithub.com\u002FOpenZeppelin\u002Frust-contracts-stylus",[263],"nofollow",[265],{"type":46,"value":266},"rust-contracts-stylus repo",{"type":46,"value":268}," for the current recommended nightly date.",{"type":40,"tag":49,"props":270,"children":272},{"id":271},"adding-openzeppelin-dependencies",[273],{"type":46,"value":274},"Adding OpenZeppelin Dependencies",{"type":40,"tag":56,"props":276,"children":277},{},[278,280,287,289,295],{"type":46,"value":279},"Look up the current version from ",{"type":40,"tag":259,"props":281,"children":284},{"href":282,"rel":283},"https:\u002F\u002Fcrates.io\u002Fcrates\u002Fopenzeppelin-stylus",[263],[285],{"type":46,"value":286},"crates.io\u002Fcrates\u002Fopenzeppelin-stylus",{"type":46,"value":288}," before adding. Add to ",{"type":40,"tag":70,"props":290,"children":292},{"className":291},[],[293],{"type":46,"value":294},"Cargo.toml",{"type":46,"value":296},":",{"type":40,"tag":62,"props":298,"children":302},{"className":299,"code":300,"language":301,"meta":67,"style":67},"language-toml shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","[dependencies]\nopenzeppelin-stylus = \"=\u003CVERSION>\"\n","toml",[303],{"type":40,"tag":70,"props":304,"children":305},{"__ignoreMap":67},[306,314],{"type":40,"tag":74,"props":307,"children":308},{"class":76,"line":77},[309],{"type":40,"tag":74,"props":310,"children":311},{},[312],{"type":46,"value":313},"[dependencies]\n",{"type":40,"tag":74,"props":315,"children":316},{"class":76,"line":134},[317],{"type":40,"tag":74,"props":318,"children":319},{},[320],{"type":46,"value":321},"openzeppelin-stylus = \"=\u003CVERSION>\"\n",{"type":40,"tag":56,"props":323,"children":324},{},[325,327,333],{"type":46,"value":326},"Enable the ",{"type":40,"tag":70,"props":328,"children":330},{"className":329},[],[331],{"type":46,"value":332},"export-abi",{"type":46,"value":334}," feature flag for ABI generation:",{"type":40,"tag":62,"props":336,"children":338},{"className":299,"code":337,"language":301,"meta":67,"style":67},"[features]\nexport-abi = [\"openzeppelin-stylus\u002Fexport-abi\"]\n",[339],{"type":40,"tag":70,"props":340,"children":341},{"__ignoreMap":67},[342,350],{"type":40,"tag":74,"props":343,"children":344},{"class":76,"line":77},[345],{"type":40,"tag":74,"props":346,"children":347},{},[348],{"type":46,"value":349},"[features]\n",{"type":40,"tag":74,"props":351,"children":352},{"class":76,"line":134},[353],{"type":40,"tag":74,"props":354,"children":355},{},[356],{"type":46,"value":357},"export-abi = [\"openzeppelin-stylus\u002Fexport-abi\"]\n",{"type":40,"tag":56,"props":359,"children":360},{},[361],{"type":46,"value":362},"The crate must be compiled as both a library and a cdylib:",{"type":40,"tag":62,"props":364,"children":366},{"className":299,"code":365,"language":301,"meta":67,"style":67},"[lib]\ncrate-type = [\"lib\", \"cdylib\"]\n",[367],{"type":40,"tag":70,"props":368,"children":369},{"__ignoreMap":67},[370,378],{"type":40,"tag":74,"props":371,"children":372},{"class":76,"line":77},[373],{"type":40,"tag":74,"props":374,"children":375},{},[376],{"type":46,"value":377},"[lib]\n",{"type":40,"tag":74,"props":379,"children":380},{"class":76,"line":134},[381],{"type":40,"tag":74,"props":382,"children":383},{},[384],{"type":46,"value":385},"crate-type = [\"lib\", \"cdylib\"]\n",{"type":40,"tag":49,"props":387,"children":389},{"id":388},"import-conventions",[390],{"type":46,"value":391},"Import Conventions",{"type":40,"tag":56,"props":393,"children":394},{},[395,397,403],{"type":46,"value":396},"Imports use ",{"type":40,"tag":70,"props":398,"children":400},{"className":399},[],[401],{"type":46,"value":402},"openzeppelin_stylus",{"type":46,"value":404}," (underscores) as the crate root:",{"type":40,"tag":62,"props":406,"children":409},{"className":407,"code":408,"language":18,"meta":67,"style":67},"language-rust shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","use openzeppelin_stylus::token::erc20::{Erc20, IErc20};\nuse openzeppelin_stylus::access::ownable::{Ownable, IOwnable};\nuse openzeppelin_stylus::utils::pausable::{Pausable, IPausable};\nuse openzeppelin_stylus::utils::introspection::erc165::IErc165;\n",[410],{"type":40,"tag":70,"props":411,"children":412},{"__ignoreMap":67},[413,421,429,438],{"type":40,"tag":74,"props":414,"children":415},{"class":76,"line":77},[416],{"type":40,"tag":74,"props":417,"children":418},{},[419],{"type":46,"value":420},"use openzeppelin_stylus::token::erc20::{Erc20, IErc20};\n",{"type":40,"tag":74,"props":422,"children":423},{"class":76,"line":134},[424],{"type":40,"tag":74,"props":425,"children":426},{},[427],{"type":46,"value":428},"use openzeppelin_stylus::access::ownable::{Ownable, IOwnable};\n",{"type":40,"tag":74,"props":430,"children":432},{"class":76,"line":431},3,[433],{"type":40,"tag":74,"props":434,"children":435},{},[436],{"type":46,"value":437},"use openzeppelin_stylus::utils::pausable::{Pausable, IPausable};\n",{"type":40,"tag":74,"props":439,"children":441},{"class":76,"line":440},4,[442],{"type":40,"tag":74,"props":443,"children":444},{},[445],{"type":46,"value":446},"use openzeppelin_stylus::utils::introspection::erc165::IErc165;\n",{"type":40,"tag":56,"props":448,"children":449},{},[450,452,458,460,466],{"type":46,"value":451},"Contracts use ",{"type":40,"tag":70,"props":453,"children":455},{"className":454},[],[456],{"type":46,"value":457},"#[storage]",{"type":46,"value":459}," and ",{"type":40,"tag":70,"props":461,"children":463},{"className":462},[],[464],{"type":46,"value":465},"#[entrypoint]",{"type":46,"value":467}," on the main struct, embedding OpenZeppelin components as fields:",{"type":40,"tag":62,"props":469,"children":471},{"className":407,"code":470,"language":18,"meta":67,"style":67},"#[entrypoint]\n#[storage]\nstruct MyToken {\n    erc20: Erc20,\n    ownable: Ownable,\n}\n",[472],{"type":40,"tag":70,"props":473,"children":474},{"__ignoreMap":67},[475,483,491,499,507,516],{"type":40,"tag":74,"props":476,"children":477},{"class":76,"line":77},[478],{"type":40,"tag":74,"props":479,"children":480},{},[481],{"type":46,"value":482},"#[entrypoint]\n",{"type":40,"tag":74,"props":484,"children":485},{"class":76,"line":134},[486],{"type":40,"tag":74,"props":487,"children":488},{},[489],{"type":46,"value":490},"#[storage]\n",{"type":40,"tag":74,"props":492,"children":493},{"class":76,"line":431},[494],{"type":40,"tag":74,"props":495,"children":496},{},[497],{"type":46,"value":498},"struct MyToken {\n",{"type":40,"tag":74,"props":500,"children":501},{"class":76,"line":440},[502],{"type":40,"tag":74,"props":503,"children":504},{},[505],{"type":46,"value":506},"    erc20: Erc20,\n",{"type":40,"tag":74,"props":508,"children":510},{"class":76,"line":509},5,[511],{"type":40,"tag":74,"props":512,"children":513},{},[514],{"type":46,"value":515},"    ownable: Ownable,\n",{"type":40,"tag":74,"props":517,"children":519},{"class":76,"line":518},6,[520],{"type":40,"tag":74,"props":521,"children":522},{},[523],{"type":46,"value":524},"}\n",{"type":40,"tag":56,"props":526,"children":527},{},[528,530,536,537,543],{"type":46,"value":529},"Public methods are exposed with ",{"type":40,"tag":70,"props":531,"children":533},{"className":532},[],[534],{"type":46,"value":535},"#[public]",{"type":46,"value":459},{"type":40,"tag":70,"props":538,"children":540},{"className":539},[],[541],{"type":46,"value":542},"#[implements(...)]",{"type":46,"value":544},". The canonical pattern uses an empty impl block for dispatch registration, plus separate trait impl blocks:",{"type":40,"tag":62,"props":546,"children":548},{"className":407,"code":547,"language":18,"meta":67,"style":67},"#[public]\n#[implements(IErc20\u003CError = erc20::Error>, IOwnable\u003CError = ownable::Error>)]\nimpl MyToken {}\n\n#[public]\nimpl IErc20 for MyToken {\n    type Error = erc20::Error;\n    \u002F\u002F delegate to self.erc20 ...\n}\n",[549],{"type":40,"tag":70,"props":550,"children":551},{"__ignoreMap":67},[552,560,568,576,585,592,600,609,618],{"type":40,"tag":74,"props":553,"children":554},{"class":76,"line":77},[555],{"type":40,"tag":74,"props":556,"children":557},{},[558],{"type":46,"value":559},"#[public]\n",{"type":40,"tag":74,"props":561,"children":562},{"class":76,"line":134},[563],{"type":40,"tag":74,"props":564,"children":565},{},[566],{"type":46,"value":567},"#[implements(IErc20\u003CError = erc20::Error>, IOwnable\u003CError = ownable::Error>)]\n",{"type":40,"tag":74,"props":569,"children":570},{"class":76,"line":431},[571],{"type":40,"tag":74,"props":572,"children":573},{},[574],{"type":46,"value":575},"impl MyToken {}\n",{"type":40,"tag":74,"props":577,"children":578},{"class":76,"line":440},[579],{"type":40,"tag":74,"props":580,"children":582},{"emptyLinePlaceholder":581},true,[583],{"type":46,"value":584},"\n",{"type":40,"tag":74,"props":586,"children":587},{"class":76,"line":509},[588],{"type":40,"tag":74,"props":589,"children":590},{},[591],{"type":46,"value":559},{"type":40,"tag":74,"props":593,"children":594},{"class":76,"line":518},[595],{"type":40,"tag":74,"props":596,"children":597},{},[598],{"type":46,"value":599},"impl IErc20 for MyToken {\n",{"type":40,"tag":74,"props":601,"children":603},{"class":76,"line":602},7,[604],{"type":40,"tag":74,"props":605,"children":606},{},[607],{"type":46,"value":608},"    type Error = erc20::Error;\n",{"type":40,"tag":74,"props":610,"children":612},{"class":76,"line":611},8,[613],{"type":40,"tag":74,"props":614,"children":615},{},[616],{"type":46,"value":617},"    \u002F\u002F delegate to self.erc20 ...\n",{"type":40,"tag":74,"props":619,"children":621},{"class":76,"line":620},9,[622],{"type":40,"tag":74,"props":623,"children":624},{},[625],{"type":46,"value":524},{"type":40,"tag":56,"props":627,"children":628},{},[629,631,637,639,645,646,652,653,659,660,666],{"type":46,"value":630},"Top-level modules: ",{"type":40,"tag":70,"props":632,"children":634},{"className":633},[],[635],{"type":46,"value":636},"access",{"type":46,"value":638},", ",{"type":40,"tag":70,"props":640,"children":642},{"className":641},[],[643],{"type":46,"value":644},"finance",{"type":46,"value":638},{"type":40,"tag":70,"props":647,"children":649},{"className":648},[],[650],{"type":46,"value":651},"proxy",{"type":46,"value":638},{"type":40,"tag":70,"props":654,"children":656},{"className":655},[],[657],{"type":46,"value":658},"token",{"type":46,"value":638},{"type":40,"tag":70,"props":661,"children":663},{"className":662},[],[664],{"type":46,"value":665},"utils",{"type":46,"value":667},".",{"type":40,"tag":49,"props":669,"children":671},{"id":670},"build-deploy-basics",[672],{"type":46,"value":673},"Build & Deploy Basics",{"type":40,"tag":56,"props":675,"children":676},{},[677],{"type":46,"value":678},"Validate the contract compiles to valid Stylus WASM:",{"type":40,"tag":62,"props":680,"children":682},{"className":64,"code":681,"language":66,"meta":67,"style":67},"cargo stylus check\n",[683],{"type":40,"tag":70,"props":684,"children":685},{"__ignoreMap":67},[686],{"type":40,"tag":74,"props":687,"children":688},{"class":76,"line":77},[689,693,697],{"type":40,"tag":74,"props":690,"children":691},{"style":81},[692],{"type":46,"value":175},{"type":40,"tag":74,"props":694,"children":695},{"style":87},[696],{"type":46,"value":214},{"type":40,"tag":74,"props":698,"children":699},{"style":87},[700],{"type":46,"value":701}," check\n",{"type":40,"tag":56,"props":703,"children":704},{},[705],{"type":46,"value":706},"Export the Solidity ABI:",{"type":40,"tag":62,"props":708,"children":710},{"className":64,"code":709,"language":66,"meta":67,"style":67},"cargo stylus export-abi\n",[711],{"type":40,"tag":70,"props":712,"children":713},{"__ignoreMap":67},[714],{"type":40,"tag":74,"props":715,"children":716},{"class":76,"line":77},[717,721,725],{"type":40,"tag":74,"props":718,"children":719},{"style":81},[720],{"type":46,"value":175},{"type":40,"tag":74,"props":722,"children":723},{"style":87},[724],{"type":46,"value":214},{"type":40,"tag":74,"props":726,"children":727},{"style":87},[728],{"type":46,"value":729}," export-abi\n",{"type":40,"tag":56,"props":731,"children":732},{},[733],{"type":46,"value":734},"Deploy to an Arbitrum Stylus endpoint:",{"type":40,"tag":62,"props":736,"children":738},{"className":64,"code":737,"language":66,"meta":67,"style":67},"cargo stylus deploy --endpoint=\"\u003CRPC_URL>\" --private-key-path=\"\u003CKEY_FILE>\"\n",[739],{"type":40,"tag":70,"props":740,"children":741},{"__ignoreMap":67},[742],{"type":40,"tag":74,"props":743,"children":744},{"class":76,"line":77},[745,749,753,758,763,768,773,777,782,786,791],{"type":40,"tag":74,"props":746,"children":747},{"style":81},[748],{"type":46,"value":175},{"type":40,"tag":74,"props":750,"children":751},{"style":87},[752],{"type":46,"value":214},{"type":40,"tag":74,"props":754,"children":755},{"style":87},[756],{"type":46,"value":757}," deploy",{"type":40,"tag":74,"props":759,"children":760},{"style":87},[761],{"type":46,"value":762}," --endpoint=",{"type":40,"tag":74,"props":764,"children":765},{"style":93},[766],{"type":46,"value":767},"\"",{"type":40,"tag":74,"props":769,"children":770},{"style":87},[771],{"type":46,"value":772},"\u003CRPC_URL>",{"type":40,"tag":74,"props":774,"children":775},{"style":93},[776],{"type":46,"value":767},{"type":40,"tag":74,"props":778,"children":779},{"style":87},[780],{"type":46,"value":781}," --private-key-path=",{"type":40,"tag":74,"props":783,"children":784},{"style":93},[785],{"type":46,"value":767},{"type":40,"tag":74,"props":787,"children":788},{"style":87},[789],{"type":46,"value":790},"\u003CKEY_FILE>",{"type":40,"tag":74,"props":792,"children":793},{"style":93},[794],{"type":46,"value":795},"\"\n",{"type":40,"tag":797,"props":798,"children":799},"style",{},[800],{"type":46,"value":801},"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":803,"total":890},[804,821,836,848,861,871,877],{"slug":805,"name":805,"fn":806,"description":807,"org":808,"tags":809,"stars":22,"repoUrl":23,"updatedAt":820},"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},[810,813,816,817],{"name":811,"slug":812,"type":15},"Access Control","access-control",{"name":814,"slug":815,"type":15},"Security","security",{"name":20,"slug":21,"type":15},{"name":818,"slug":819,"type":15},"Solidity","solidity","2026-07-13T06:04:32.666273",{"slug":822,"name":822,"fn":823,"description":824,"org":825,"tags":826,"stars":22,"repoUrl":23,"updatedAt":835},"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},[827,830,833,834],{"name":828,"slug":829,"type":15},"Blockchain","blockchain",{"name":831,"slug":832,"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":837,"name":837,"fn":838,"description":839,"org":840,"tags":841,"stars":22,"repoUrl":23,"updatedAt":847},"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},[842,845,846],{"name":843,"slug":844,"type":15},"Engineering","engineering",{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},"2026-07-13T06:04:17.186825",{"slug":849,"name":849,"fn":850,"description":851,"org":852,"tags":853,"stars":22,"repoUrl":23,"updatedAt":860},"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},[854,855,858,859],{"name":843,"slug":844,"type":15},{"name":856,"slug":857,"type":15},"Foundry","foundry",{"name":20,"slug":21,"type":15},{"name":818,"slug":819,"type":15},"2026-07-13T06:04:29.360325",{"slug":862,"name":862,"fn":863,"description":864,"org":865,"tags":866,"stars":22,"repoUrl":23,"updatedAt":870},"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},[867,868,869],{"name":17,"slug":18,"type":15},{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},"2026-07-13T06:04:23.807685",{"slug":4,"name":4,"fn":5,"description":6,"org":872,"tags":873,"stars":22,"repoUrl":23,"updatedAt":24},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[874,875,876],{"name":17,"slug":18,"type":15},{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},{"slug":878,"name":878,"fn":879,"description":880,"org":881,"tags":882,"stars":22,"repoUrl":23,"updatedAt":889},"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},[883,884,887,888],{"name":828,"slug":829,"type":15},{"name":885,"slug":886,"type":15},"CLI","cli",{"name":17,"slug":18,"type":15},{"name":20,"slug":21,"type":15},"2026-07-16T05:59:21.671811",11,{"items":892,"total":890},[893,900,907,913,920,926,932,939,951,962,973],{"slug":805,"name":805,"fn":806,"description":807,"org":894,"tags":895,"stars":22,"repoUrl":23,"updatedAt":820},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[896,897,898,899],{"name":811,"slug":812,"type":15},{"name":814,"slug":815,"type":15},{"name":20,"slug":21,"type":15},{"name":818,"slug":819,"type":15},{"slug":822,"name":822,"fn":823,"description":824,"org":901,"tags":902,"stars":22,"repoUrl":23,"updatedAt":835},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[903,904,905,906],{"name":828,"slug":829,"type":15},{"name":831,"slug":832,"type":15},{"name":17,"slug":18,"type":15},{"name":20,"slug":21,"type":15},{"slug":837,"name":837,"fn":838,"description":839,"org":908,"tags":909,"stars":22,"repoUrl":23,"updatedAt":847},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[910,911,912],{"name":843,"slug":844,"type":15},{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},{"slug":849,"name":849,"fn":850,"description":851,"org":914,"tags":915,"stars":22,"repoUrl":23,"updatedAt":860},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[916,917,918,919],{"name":843,"slug":844,"type":15},{"name":856,"slug":857,"type":15},{"name":20,"slug":21,"type":15},{"name":818,"slug":819,"type":15},{"slug":862,"name":862,"fn":863,"description":864,"org":921,"tags":922,"stars":22,"repoUrl":23,"updatedAt":870},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[923,924,925],{"name":17,"slug":18,"type":15},{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},{"slug":4,"name":4,"fn":5,"description":6,"org":927,"tags":928,"stars":22,"repoUrl":23,"updatedAt":24},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[929,930,931],{"name":17,"slug":18,"type":15},{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},{"slug":878,"name":878,"fn":879,"description":880,"org":933,"tags":934,"stars":22,"repoUrl":23,"updatedAt":889},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[935,936,937,938],{"name":828,"slug":829,"type":15},{"name":885,"slug":886,"type":15},{"name":17,"slug":18,"type":15},{"name":20,"slug":21,"type":15},{"slug":940,"name":940,"fn":941,"description":942,"org":943,"tags":944,"stars":22,"repoUrl":23,"updatedAt":950},"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},[945,948,949],{"name":946,"slug":947,"type":15},"Migration","migration",{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},"2026-07-13T06:04:25.126377",{"slug":952,"name":952,"fn":953,"description":954,"org":955,"tags":956,"stars":22,"repoUrl":23,"updatedAt":961},"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},[957,958,959,960],{"name":946,"slug":947,"type":15},{"name":814,"slug":815,"type":15},{"name":20,"slug":21,"type":15},{"name":818,"slug":819,"type":15},"2026-07-13T06:04:20.958319",{"slug":963,"name":963,"fn":964,"description":965,"org":966,"tags":967,"stars":22,"repoUrl":23,"updatedAt":972},"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},[968,969,970,971],{"name":828,"slug":829,"type":15},{"name":946,"slug":947,"type":15},{"name":814,"slug":815,"type":15},{"name":20,"slug":21,"type":15},"2026-07-13T06:04:31.398663",{"slug":974,"name":974,"fn":975,"description":976,"org":977,"tags":978,"stars":22,"repoUrl":23,"updatedAt":983},"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},[979,980,981,982],{"name":946,"slug":947,"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"]