{"id":13651204,"url":"https://github.com/rmrk-team/rmrk-substrate","last_synced_at":"2026-01-25T15:14:23.960Z","repository":{"id":37086663,"uuid":"435683716","full_name":"rmrk-team/rmrk-substrate","owner":"rmrk-team","description":"[WIP] RMRK Substrate pallets","archived":false,"fork":false,"pushed_at":"2023-10-06T12:11:08.000Z","size":2700,"stargazers_count":73,"open_issues_count":20,"forks_count":38,"subscribers_count":8,"default_branch":"main","last_synced_at":"2024-01-25T03:03:39.420Z","etag":null,"topics":["blockchain","polkadot","rust","substrate"],"latest_commit_sha":null,"homepage":"https://rmrk.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rmrk-team.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}},"created_at":"2021-12-06T23:46:52.000Z","updated_at":"2024-04-14T23:53:53.749Z","dependencies_parsed_at":"2024-04-14T23:51:51.251Z","dependency_job_id":"da75df95-0e53-4b3d-84d8-7040af0ac5d5","html_url":"https://github.com/rmrk-team/rmrk-substrate","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmrk-team%2Frmrk-substrate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmrk-team%2Frmrk-substrate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmrk-team%2Frmrk-substrate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmrk-team%2Frmrk-substrate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rmrk-team","download_url":"https://codeload.github.com/rmrk-team/rmrk-substrate/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250333864,"owners_count":21413471,"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":["blockchain","polkadot","rust","substrate"],"created_at":"2024-08-02T02:00:46.457Z","updated_at":"2026-01-25T15:14:23.931Z","avatar_url":"https://github.com/rmrk-team.png","language":"TypeScript","funding_links":[],"categories":["FRAME Pallets"],"sub_categories":[],"readme":"# RMRK Substrate\n\n[![No Maintenance Intended](http://unmaintained.tech/badge.svg)](http://unmaintained.tech/)\n\n\u003e **Warning**: No stability and security guarantees. Not production ready.\n\nAdditional documentation [https://rmrk-team.github.io/rmrk-substrate](https://rmrk-team.github.io/rmrk-substrate)\n\n### Rust Setup\n\nFirst, complete the [basic Rust setup instructions](./rust-setup.md).\n\n### Run\n\nUse Rust's native `cargo` command to build and launch the template node:\n\n```sh\ncargo run --release -- --dev --tmp\n```\n\n### Build\n\nThe `cargo run` command will perform an initial build. Use the following command to build the node\nwithout launching it:\n\n```sh\ncargo build --release\n```\n\n### RPC\n\nThe RMRK RPC description can be found in [RPC docs](https://rmrk-team.github.io/rmrk-substrate/#/rpc)\n\nThe RPC is declared in the `rmrk-rpc` crate.\n\nThe Runtime implements the RPC API in the `runtime/src/lib.rs` inside the `impl_runtime_apis` macro.\nThe node exposes the RPC interface described in the `rpc.md`. The RPC interface implementation passes each RPC call to the RMRK runtime API. The RPC interface declaration and implementation can be found in the file `node/src/rpc.rs`.\n\n### Integration Tests\n\nThe Integration Tests are located in the `tests/src` directory. They use the RPC interface to fetch data from the node.\n\n- All transactions used in the tests are located in `tests/src/util/tx.ts`.\n- All \"fetch\" functions like `getNft` are located in `tests/src/util/fetch.ts`. Here you can see an example of the RPC interface usage.\n- All \"helper\" functions are located in `tests/src/util/helpers.ts`.\n- Type augmentation located in `tests/src/interfaces`, **autogenerated**, a lot of lines of code :)\n\n##### How to start the tests\n\n```console\n# (In the rmrk-substrate directory)\n\n# Run the node\ncargo run --release -- --dev --tmp\n\n# (In another terminal)\n# Start the tests\ncd tests \u0026\u0026 yarn test\n```\n\nInstead of running all the tests at once, you can run a separate test if you like.\nFor instance, you can type `yarn testSendNft` to run the `tests/src/sendNft.test.ts` test.\n\nAll the tests have the following name pattern: `\u003ctest-name\u003e.test.ts`. To run a separate test you can type the following: `yarn test\u003ctest-name\u003e`\n\n### Embedded Docs\n\nOnce the project has been built, the following command can be used to explore all parameters and\nsubcommands:\n\n```sh\n./target/release/rmrk-substrate -h\n```\n\n## Run\n\nThe provided `cargo run` command will launch a temporary node and its state will be discarded after\nyou terminate the process. After the project has been built, there are other ways to launch the\nnode.\n\n### Single-Node Development Chain\n\nThis command will start the single-node development chain with persistent state:\n\n```bash\n./target/release/rmrk-substrate --dev\n```\n\nPurge the development chain's state:\n\n```bash\n./target/release/rmrk-substrate purge-chain --dev\n```\n\nStart the development chain with detailed logging:\n\n```bash\nRUST_BACKTRACE=1 ./target/release/rmrk-substrate -ldebug --dev\n```\n\n### Connect with Polkadot-JS Apps Front-end\n\nOnce the node template is running locally, you can connect it with **Polkadot-JS Apps** front-end\nto interact with your chain. [Click\nhere](https://polkadot.js.org/apps/#/explorer?rpc=ws://localhost:9944) connecting the Apps to your\nlocal node template.\n\n### Node\n\nA blockchain node is an application that allows users to participate in a blockchain network.\nSubstrate-based blockchain nodes expose a number of capabilities:\n\n- Networking: Substrate nodes use the [`libp2p`](https://libp2p.io/) networking stack to allow the\n  nodes in the network to communicate with one another.\n- Consensus: Blockchains must have a way to come to\n  [consensus](https://docs.substrate.io/v3/advanced/consensus) on the state of the\n  network. Substrate makes it possible to supply custom consensus engines and also ships with\n  several consensus mechanisms that have been built on top of\n  [Web3 Foundation research](https://research.web3.foundation/en/latest/polkadot/NPoS/index.html).\n- RPC Server: A remote procedure call (RPC) server is used to interact with Substrate nodes.\n\nThere are several files in the `node` directory - take special note of the following:\n\n- [`chain_spec.rs`](./node/src/chain_spec.rs): A\n  [chain specification](https://docs.substrate.io/v3/runtime/chain-specs) is a\n  source code file that defines a Substrate chain's initial (genesis) state. Chain specifications\n  are useful for development and testing, and critical when architecting the launch of a\n  production chain. Take note of the `development_config` and `testnet_genesis` functions, which\n  are used to define the genesis state for the local development chain configuration. These\n  functions identify some\n  [well-known accounts](https://docs.substrate.io/v3/tools/subkey#well-known-keys)\n  and use them to configure the blockchain's initial state.\n- [`service.rs`](./node/src/service.rs): This file defines the node implementation. Take note of\n  the libraries that this file imports and the names of the functions it invokes. In particular,\n  there are references to consensus-related topics, such as the\n  [longest chain rule](https://docs.substrate.io/v3/advanced/consensus#longest-chain-rule),\n  the [Aura](https://docs.substrate.io/v3/advanced/consensus#aura) block authoring\n  mechanism and the\n  [GRANDPA](https://docs.substrate.io/v3/advanced/consensus#grandpa) finality\n  gadget.\n\nAfter the node has been [built](#build), refer to the embedded documentation to learn more about the\ncapabilities and configuration parameters that it exposes:\n\n```shell\n./target/release/rmrk-substrate --help\n```\n\n### Runtime\n\nIn Substrate, the terms\n\"[runtime](https://docs.substrate.io/v3/getting-started/glossary#runtime)\" and\n\"[state transition function](https://docs.substrate.io/v3/getting-started/glossary#state-transition-function-stf)\"\nare analogous - they refer to the core logic of the blockchain that is responsible for validating\nblocks and executing the state changes they define. The Substrate project in this repository uses\nthe [FRAME](https://docs.substrate.io/v3/runtime/frame) framework to construct a\nblockchain runtime. FRAME allows runtime developers to declare domain-specific logic in modules\ncalled \"pallets\". At the heart of FRAME is a helpful\n[macro language](https://docs.substrate.io/v3/runtime/macros) that makes it easy to\ncreate pallets and flexibly compose them to create blockchains that can address\n[a variety of needs](https://www.substrate.io/substrate-users/).\n\nReview the [FRAME runtime implementation](./runtime/src/lib.rs) included in this template and note\nthe following:\n\n- This file configures several pallets to include in the runtime. Each pallet configuration is\n  defined by a code block that begins with `impl $PALLET_NAME::Config for Runtime`.\n- The pallets are composed into a single runtime by way of the\n  [`construct_runtime!`](https://crates.parity.io/frame_support/macro.construct_runtime.html)\n  macro, which is part of the core\n  [FRAME Support](https://docs.substrate.io/v3/runtime/frame#support-crate)\n  library.\n\n### Pallets\n\nThe runtime in this project is constructed using many FRAME pallets that ship with the\n[core Substrate repository](https://github.com/paritytech/substrate/tree/master/frame) and a\ntemplate pallet that is [defined in the `pallets`](./pallets/template/src/lib.rs) directory.\n\nA FRAME pallet is compromised of a number of blockchain primitives:\n\n- Storage: FRAME defines a rich set of powerful\n  [storage abstractions](https://docs.substrate.io/v3/runtime/storage) that makes\n  it easy to use Substrate's efficient key-value database to manage the evolving state of a\n  blockchain.\n- Dispatchables: FRAME pallets define special types of functions that can be invoked (dispatched)\n  from outside of the runtime in order to update its state.\n- Events: Substrate uses [events and errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n  to notify users of important changes in the runtime.\n- Errors: When a dispatchable fails, it returns an error.\n- Config: The `Config` configuration interface is used to define the types and parameters upon\n  which a FRAME pallet depends.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frmrk-team%2Frmrk-substrate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frmrk-team%2Frmrk-substrate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frmrk-team%2Frmrk-substrate/lists"}