{"id":26206937,"url":"https://github.com/chrisco512/wax","last_synced_at":"2025-10-08T16:54:32.458Z","repository":{"id":278226521,"uuid":"932521556","full_name":"chrisco512/wax","owner":"chrisco512","description":"A simple, zero-dependency smart contract framework for Arbitrum Stylus, written in Zig","archived":false,"fork":false,"pushed_at":"2025-02-28T19:14:19.000Z","size":289,"stargazers_count":5,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-06T13:40:29.706Z","etag":null,"topics":["arbitrum","ethereum","wasm","zig"],"latest_commit_sha":null,"homepage":"https://docs.arbitrum.io","language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chrisco512.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2025-02-14T03:35:13.000Z","updated_at":"2025-03-14T14:48:23.000Z","dependencies_parsed_at":"2025-03-05T13:01:23.435Z","dependency_job_id":null,"html_url":"https://github.com/chrisco512/wax","commit_stats":null,"previous_names":["chrisco512/zigitrum","chrisco512/wax"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisco512%2Fwax","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisco512%2Fwax/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisco512%2Fwax/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisco512%2Fwax/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chrisco512","download_url":"https://codeload.github.com/chrisco512/wax/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249042287,"owners_count":21203256,"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","ethereum","wasm","zig"],"created_at":"2025-03-12T05:18:47.837Z","updated_at":"2025-10-08T16:54:27.404Z","avatar_url":"https://github.com/chrisco512.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"Douris_Man_with_wax_tablet.jpg\" height=\"250\" alt=\"Wax tablet\"\u003e\n\n# Wax\nA simple, zero-dependency smart contract framework for Arbitrum Stylus, written in Zig\n\n## Philosophy\n\n- Simple router-based app framework\n- Supports middleware\n- Tiny binaries\n- Maximum performance\n- Learn it in an afternoon (even with zero Zig experience)\n- Avoid esoteric language features wherever possible\n- Stick with basic building blocks as much as possible: functions, structs, arrays, enums\n- Easily testable\n\n## Dependencies\n\nThis code is running on a pre-release of Zig 0.14 (which is due in next couple of weeks). Install Zig from master, see: https://ziglang.org/download/. \n\nYou'll also need Arbitrum Nitro dev node to test, which depends on Docker. See: https://docs.arbitrum.io/run-arbitrum-node/run-nitro-dev-node\n\nIn addition, you'll need cargo stylus to deploy: https://github.com/OffchainLabs/cargo-stylus\n\n## Running Examples\n\nAfter all dependencies are installed. Make sure you have Arbitrum Nitro Dev node running locally by following instructions from link above.\n\nNavigate to examples/counter and run `zig build`. It will produce a `main.wasm` file in `examples/counter/zig-out/bin`. Navigate to that directory and then run:\n\n```bash\n\u003e RPC=http://localhost:8547\n\u003e PRIVATE_KEY=0xb6b15c8cb491557369f3c7d2c287b053eb229daa9c22138887752191c9520659\n\u003e cargo stylus deploy --no-verify --endpoint $RPC --private-key $PRIVATE_KEY --wasm-file=main.wasm\n```\n\nIt will produce output similar to:\n\n```bash\nstripped custom section from user wasm to remove any sensitive data\ncontract size: 1.4 KB\n  deployed code at address: 0x1bac7c33af7313d0ac112a3c7bbc3314fc181ef7                                                                     deployment tx hash: 0x9ec6bb6672fe3c6141390b77688290f4202c73a5e2c88fc2acd0f6efc429db64                                                   wasm already activated!\n```\n\nAlthough your contract address and tx hash will be different. Set the contract address to a local variable:\n\n```bash\n\u003e CONTRACT=0x1bac7c33af7313d0ac112a3c7bbc3314fc181ef7\n```\n\nThen, using Foundry's `cast` (https://getfoundry.sh/), invoke the smart contract's `count` and `increment` methods:\n\n```bash\n❯ cast call --rpc-url $RPC --private-key $PRIVATE_KEY $CONTRACT \"count()(uint256)\"\n0\n❯ cast send --rpc-url $RPC --private-key $PRIVATE_KEY $CONTRACT \"increment()()\"\n❯ cast call --rpc-url $RPC --private-key $PRIVATE_KEY $CONTRACT \"count()(uint256)\"\n1\n```\n\n## Notice\n\nThis code is still in early-stage development and should not be used in production.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrisco512%2Fwax","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchrisco512%2Fwax","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrisco512%2Fwax/lists"}