{"id":13544018,"url":"https://github.com/LimeChain/stylus-toolkit","last_synced_at":"2025-04-02T13:31:29.527Z","repository":{"id":208424292,"uuid":"721216692","full_name":"LimeChain/stylus-toolkit","owner":"LimeChain","description":"Building blocks for Arbitrum Stylus smart contract development","archived":false,"fork":false,"pushed_at":"2024-07-08T14:13:26.000Z","size":31,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-16T21:48:40.840Z","etag":null,"topics":["arbitrum","stylus","toolkit","web3"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LimeChain.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-20T15:40:54.000Z","updated_at":"2025-02-16T05:17:47.000Z","dependencies_parsed_at":"2024-01-16T17:02:35.773Z","dependency_job_id":"6ff88258-5c33-4e14-ab66-42e8b0f92878","html_url":"https://github.com/LimeChain/stylus-toolkit","commit_stats":null,"previous_names":["limechain/stylus-toolkit"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LimeChain%2Fstylus-toolkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LimeChain%2Fstylus-toolkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LimeChain%2Fstylus-toolkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LimeChain%2Fstylus-toolkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LimeChain","download_url":"https://codeload.github.com/LimeChain/stylus-toolkit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246823753,"owners_count":20839774,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arbitrum","stylus","toolkit","web3"],"created_at":"2024-08-01T11:00:40.733Z","updated_at":"2025-04-02T13:31:24.516Z","avatar_url":"https://github.com/LimeChain.png","language":"Rust","funding_links":[],"categories":["Tools"],"sub_categories":["Talks \u0026 Presentations"],"readme":"# stylus-toolkit\nBuilding blocks for Stylus smart contract development\n\n## How to use\n\n1. Create new project\n```shell\ncargo stylus new my-cool-project --minimal\n```\n\n2. Import `stylus-toolkit` as dependency in the `Cargo.toml`\n```toml\nstylus-toolkit = { git = \"https://github.com/LimeChain/stylus-toolkit.git\", branch = \"main\" }\n```\n\n3. Import the desired contracts into your source files\n\nERC20 Example\n\n```rust\nuse stylus_toolkit::tokens::erc20::{Erc20, Erc20Params};\n\nstruct MyParams;\nimpl Erc20Params for MyParams {\n    const NAME: \u0026'static str = \"Dummy ERC20 token\";\n    const SYMBOL: \u0026'static str = \"DERC20\";\n    const DECIMALS: u8 = 18;\n}\n\nsol_storage! {\n    #[entrypoint]\n    struct DummyErc20 {\n        #[borrow] // Allows erc20 to access Dummy Erc20's storage and make calls\n        Erc20\u003cMyParams\u003e erc20;\n    }\n}\n#[external]\n#[inherit(Erc20\u003cMyParams\u003e)]\nimpl DummyrErc20 {}\n```\n\nED25519 Signature Verification\n\n```rust\nuse stylus_toolkit::crypto::ed25519::ed25519_verify;\n\nsol_storage! {\n    #[entrypoint]\n    struct Ed25519Verify { }\n}\n\n#[external]\nimpl Ed25519Verify {\n    pub fn verify(\n        \u0026mut self,\n        msg: Bytes,\n        signature: Bytes,\n        public_key: FixedBytes\u003c32\u003e,\n    ) -\u003e Result\u003c(bool), Vec\u003cu8\u003e\u003e {\n        Ok(ed25519_verify(public_key, signature, msg))\n    }\n}\n```\n\n4. Build the project\n\n```shell\ncargo build --package my-cool-project --release\n```\n\n5. Sanity check the source code for activation prior to deployment\n\n```shell\ncargo stylus check\n```\n\n6. Deploy contracts\n```shell\ncargo stylus deploy -e $RPC --private-key $PK\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLimeChain%2Fstylus-toolkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FLimeChain%2Fstylus-toolkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLimeChain%2Fstylus-toolkit/lists"}