{"id":19358602,"url":"https://github.com/paritytech/substrate-up","last_synced_at":"2025-10-24T03:22:30.135Z","repository":{"id":34145657,"uuid":"154814526","full_name":"paritytech/substrate-up","owner":"paritytech","description":"Scripts for working with new Substrate projects","archived":false,"fork":false,"pushed_at":"2022-06-13T20:51:56.000Z","size":44,"stargazers_count":67,"open_issues_count":12,"forks_count":21,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-10-19T21:43:53.768Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/paritytech.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":"2018-10-26T10:00:19.000Z","updated_at":"2024-09-03T21:46:33.000Z","dependencies_parsed_at":"2022-09-16T10:41:57.276Z","dependency_job_id":null,"html_url":"https://github.com/paritytech/substrate-up","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/paritytech/substrate-up","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paritytech%2Fsubstrate-up","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paritytech%2Fsubstrate-up/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paritytech%2Fsubstrate-up/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paritytech%2Fsubstrate-up/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paritytech","download_url":"https://codeload.github.com/paritytech/substrate-up/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paritytech%2Fsubstrate-up/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280729844,"owners_count":26381091,"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-24T02:00:06.418Z","response_time":73,"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":"2024-11-10T07:12:26.224Z","updated_at":"2025-10-24T03:22:30.096Z","avatar_url":"https://github.com/paritytech.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"# substrate-up\n\nScripts for working with new Substrate projects. Based on the v1.0 branch of Substrate.\n\nYou can update the scripts installed on your machine with:\n\n```\nf=`mktemp -d`\ngit clone https://github.com/paritytech/substrate-up $f\ncp -a $f/substrate-* ~/.cargo/bin\ncp -a $f/polkadot-* ~/.cargo/bin\n```\n\n## substrate-node-new\n\nThe `substrate-node-new` script downloads a compressed copy of the [Substrate node template codebase](https://github.com/paritytech/substrate/tree/v1.0/node-template) and compiles it. This gives you a ready-to-hack Substrate node with a template runtime module.\n\nTo use the `substrate-node-new` script, \n\n1. First install Substrate using `curl https://getsubstrate.io -sSf | bash`. This installation also adds the Substrate scripts to the system path so that you can call them from anywhere.\n1. Run `substrate-node-new` command with the following parameters,\n\n```\nsubstrate-node-new \u003cnode-name\u003e \u003cauthor\u003e\n```\n\nwhere,\n\n`\u003cnode-name\u003e` is the name for your substrate runtime. This is a _required_ parameter.\n\n`\u003cauthor\u003e` is the name of the author of this node runtime. This is _optional_.\n\nOnce you run the `substrate-node-new` command, it will take a few minutes (depending on your hardware) to finish compilation.\n\n## substrate-module-new\n\nOnce you have your local node up and running using the `substrate-node-new` script, you can add more modules to your runtime using the `substrate-module-new` script.\n\nThe `substrate-module-new` script creates a new runtime module based on a [template](https://github.com/paritytech/substrate/blob/v1.0/node-template/runtime/src/template.rs). This gives you a ready-to-hack runtime module with all necessary imports, entry-points and sample tests. We recommend using this script to create new modules, specially for users who are just getting started with Substrate, as it also gives you good information on how a typical Substrate runtime module is structured.\n\nTo use the `substrate-module-new` script,\n\n1. Make sure you have Substrate installed, have a local runtime created using `substrate-node-new`.\n1. `cd` into the node runtime directory\n1. Run `substrate-module-new` command with the following parameters,\n\n```\nsubstrate-module-new \u003cmodule-name\u003e \u003cauthor\u003e\n```\n\nwhere,\n\n`\u003cmodule-name\u003e` is the name for your new module. This is a _required_ parameter.\n\n`\u003cauthor\u003e` is the name of the author of this module. This is _optional_.\n\nThis will create a new file named `\u003cmodule-name\u003e.rs` inside `runtime/src` sub-directory in your node runtime directory. Make sure you add references to this module in the `lib.rs` file of your node runtime.\n\nFor example, if you create a module as,\n\n```\nsubstrate-module-new mymodule myname\n```\n\nThen add the following line in the `lib.rs` to have this module initialized in your runtime,\n\n```\nmod mymodule;\n```\n\nFurther, implement the module trait for your module in the `lib.rs`\n\n```\nimpl mymodule::Trait for Runtime { \n    // add required types here\n    type Event = Event;\n}\n```\n\nFinally, add this module to the `construct_runtime` macro in `lib.rs`,\n\n```\nconstruct_runtime!(\n\tpub enum Runtime with Log(InternalLog: DigestItem\u003cHash, Ed25519AuthorityId\u003e) where\n\t\tBlock = Block,\n\t\tNodeBlock = opaque::Block,\n\t\tUncheckedExtrinsic = UncheckedExtrinsic\n\t{\n\t\tSystem: system::{default, Log(ChangesTrieRoot)},\n\t\tTimestamp: timestamp::{Module, Call, Storage, Config\u003cT\u003e, Inherent},\n\t\tConsensus: consensus::{Module, Call, Storage, Config\u003cT\u003e, Log(AuthoritiesChange), Inherent},\n\t\tAura: aura::{Module},\n\t\tIndices: indices,\n\t\tBalances: balances,\n\t\tSudo: sudo,\n\t\tMyModule: mymodule::{Module, Call, Storage, Event\u003cT\u003e},\n\t}\n);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparitytech%2Fsubstrate-up","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparitytech%2Fsubstrate-up","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparitytech%2Fsubstrate-up/lists"}