{"id":31923349,"url":"https://github.com/fuellabs/sway-by-example","last_synced_at":"2025-10-13T23:49:45.088Z","repository":{"id":187984075,"uuid":"569548859","full_name":"FuelLabs/sway-by-example","owner":"FuelLabs","description":"Examples of Sway programs","archived":false,"fork":false,"pushed_at":"2024-10-04T03:03:39.000Z","size":2590,"stargazers_count":11,"open_issues_count":15,"forks_count":8,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-05-21T18:34:21.683Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"sway-by-example.vercel.app","language":"Solidity","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/FuelLabs.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":"2022-11-23T04:28:17.000Z","updated_at":"2025-02-20T02:15:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"451509c2-9a03-4f13-be15-04c37b02275f","html_url":"https://github.com/FuelLabs/sway-by-example","commit_stats":null,"previous_names":["fuellabs/sway-by-example"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/FuelLabs/sway-by-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FuelLabs%2Fsway-by-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FuelLabs%2Fsway-by-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FuelLabs%2Fsway-by-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FuelLabs%2Fsway-by-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FuelLabs","download_url":"https://codeload.github.com/FuelLabs/sway-by-example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FuelLabs%2Fsway-by-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279017229,"owners_count":26086016,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-10-13T23:49:43.716Z","updated_at":"2025-10-13T23:49:45.082Z","avatar_url":"https://github.com/FuelLabs.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sway-by-example.github.io\n\n[Sway By Example](https://www.swaybyexample.com/)\n\n### License\n\n[MIT License](LICENSE)\n\n### Development\n\n```shell\nnpm i\nnpm start\n```\n\n### Production\n\n```shell\nnpm run build\n# Preview produciton\nnpm run preview\n# Deploy\nnpm run deploy\n```\n\n### Memo\n\nTODO: code split / dynamic imports\n\n```shell\n## Deploy ##\n# copy files from contracts\nnpx ts-node scripts/copy.ts\n# md to react\nnpx ts-node --project ./scripts/tsconfig.json scripts/md-to-react.ts src/pages/array\n\n# md to react all pages\nfind src/pages -type d -not -path \"*/__snapshots__\" -exec npx ts-node --project ./scripts/tsconfig.json scripts/md-to-react.ts {} \\;\n\n# build routes\nnpx ts-node --project ./scripts/tsconfig.json scripts/build-routes.ts\n\n# build search index\nnpx ts-node --project ./scripts/tsconfig.json scripts/build-search-index.ts\n\n## Compile Solidity ##\nsolc-select install 0.59.0\nsolc-select use 0.59.0\n\n# compile single file\nsolc src/pages/hello-world/HelloWorld.sol\n\n# find and compile sol\nfind src/pages/hacks -name \"*.sol\" solc {} \\;\nfind src/pages -type f -name \"*.sol\" -exec sh -c 'solc \"$0\"' {} \\;\n\n## Mics ##\n# rename files\nfind . -type f -name \"index.test.js\" -exec sh -c 'mv \"$0\" \"${0%.test.js}.test.tsx\"' {} \\;\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuellabs%2Fsway-by-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffuellabs%2Fsway-by-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuellabs%2Fsway-by-example/lists"}