{"id":18674123,"url":"https://github.com/nervosnetwork/godwoken-examples","last_synced_at":"2025-04-12T01:55:23.911Z","repository":{"id":45324700,"uuid":"324079736","full_name":"nervosnetwork/godwoken-examples","owner":"nervosnetwork","description":null,"archived":false,"fork":false,"pushed_at":"2021-12-21T08:41:32.000Z","size":3798,"stargazers_count":5,"open_issues_count":2,"forks_count":18,"subscribers_count":9,"default_branch":"develop","last_synced_at":"2025-04-12T01:55:18.945Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/nervosnetwork.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}},"created_at":"2020-12-24T06:04:28.000Z","updated_at":"2023-10-11T14:19:13.000Z","dependencies_parsed_at":"2022-07-19T03:17:14.895Z","dependency_job_id":null,"html_url":"https://github.com/nervosnetwork/godwoken-examples","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nervosnetwork%2Fgodwoken-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nervosnetwork%2Fgodwoken-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nervosnetwork%2Fgodwoken-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nervosnetwork%2Fgodwoken-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nervosnetwork","download_url":"https://codeload.github.com/nervosnetwork/godwoken-examples/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248505867,"owners_count":21115354,"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":[],"created_at":"2024-11-07T09:17:35.779Z","updated_at":"2025-04-12T01:55:23.892Z","avatar_url":"https://github.com/nervosnetwork.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Godwoken Examples\n\n## Install dependencies \u0026 Build\n\n```bash\nyarn \u0026\u0026 yarn run build-all\n```\n\n## Update Tools Configs\n\nFirstly copy config files.\n\n```bash\nexport SCRIPT_DEPLOY_RESULT_PATH=\u003cyour godwoken `scripts-deploy-result.json`\u003e\nexport GODWOKEN_CONFIG_PATH=\u003cyour godwoken `config.toml`\u003e\nyarn run copy-configs\n```\n\nOr copy by yourself.\n\n```bash\ncp \u003cyour godwoken `scripts-deploy-result.json`\u003e packages/tools/configs/scripts-deploy-result.json\ncp \u003cyour godwoken `config.toml`\u003e packages/tools/configs/godwoken-config.toml\nyarn run convert-config-format # convert `godwoken-config.toml` to `godwoken-config.json`\n```\n\nFor testnet\n\n```bash\nyarn run generate-testnet-configs\n```\n\n## Generate your lumos config\n\nIf run dev chain, lumos config should generated by yourself, and [this tool](https://github.com/classicalliu/lumos-config-generator) may help you.\n\nFor example, in linux system\n```bash\nwget https://github.com/classicalliu/lumos-config-generator/releases/download/v0.1.1/lumos-config-generator-linux-amd64 -O lumos-config-generator\nchmod +x ./lumos-config-generator\n./lumos-config-generator\n# `config.json` is the generated lumos config file.\n```\n\n## Account operations\n\nRun `node ./packages/tools/lib/account-cli.js --help` to see how to `deposit`, `deposit-sudt`, `transfer`, `withdraw` and `get-balance`.\n\n```bash\nLUMOS_CONFIG_FILE=\u003cyour lumos config file path\u003e node ./packages/tools/lib/account-cli.js --help # for devnet\nnode ./packages/tools/lib/account-cli.js --help # for testnet\n```\n\n### Notes\n\nIf you switched to a new CKB chain, you should switch to a new indexer path `--indexer-path \u003cyour new path\u003e` or just delete `indexer-data` dir.\n\n## Polyjuice CLI\n\nRun `node ./packages/tools/lib/polyjuice-cli.js --help` to see how to `creator creator account`, `deploy contract`, `call contract`.\n\n```bash\nnode ./packages/tools/lib/polyjuice-cli.js --help # for devnet\nENABLE_TESTNET_MODE=true node ./packages/tools/lib/polyjuice-cli.js --help # for testnet\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnervosnetwork%2Fgodwoken-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnervosnetwork%2Fgodwoken-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnervosnetwork%2Fgodwoken-examples/lists"}