Skip to content

Baseline Appchain Template

Introduction

The Tanssi repository includes a bare minimum Substrate template that provides the necessary configuration to support the Tanssi protocol and some essential modules, such as the one that allows handling the Appchain's currency.

This section covers this basic template, what it includes, and some aspects to consider when adding external dependencies.

Baseline Appchain Template

Developing a Substrate-based runtime typically involves two primary steps:

  1. Incorporating pre-existing Substrate built-in modules into the runtime
  2. Creating custom modules tailored to your specific application needs

Since the provided template already includes the essential configurations for seamless integration into the Polkadot ecosystem and compatibility with the Tanssi protocol, teams interested in constructing an innovative Appchain can use this template as a starting point for adding their custom logic.

Here are some of the features that come with this template:

By leveraging these features in the template, you can kickstart your Appchain development and customize it to meet your specific requirements and innovations.

Included Modules

Some of the included modules are necessary for supporting the operation of the Appchain as part of the broader Polkadot ecosystem, some other modules are included to enable the Tanssi protocol and its block production mechanism, and some other modules provide functional behavior that the users can interact with.

These are some of the functional modules exposing a behavior to the users that are included and ready to use:

  • pallet_balances - the Balances pallet provides functions for handling accounts and balances for the Appchain native currency
  • pallet_utility - the Utility pallet provides functions to execute multiple calls in a single dispatch. Besides batching transactions, this module also allows the execution of a call from an alternative signed origin
  • pallet_proxy - the Proxy pallet provides functions to delegate to other accounts (proxies) the permission to dispatch calls from a proxied origin
  • pallet_maintenance_mode - the Maintenance Mode pallet allows the Appchain to be set to a mode where it doesn't execute balance/asset transfers or other transactions, such as XCM calls. This could be useful when upgrading the runtime in an emergency, when executing large storage migrations, or when a security vulnerability is discovered
  • pallet_tx_pause - the Tx Pause pallet allows a valid origin (typically Root) to pause (and unpause) an entire module or a single transaction. A paused transaction (or all the transactions included in a paused pallet) will fail when called until it is unpaused. This module provides a higher degree of granularity compared to maintenance mode, making it particularly useful when a faulty or vulnerable transaction is identified in the runtime

Adding Extra Dependencies

The Substrate Appchain template is meant to be built on top of, as the included modules are just for basic functionality and to ensure it is compatible with Tanssi.

To learn how to add new functionalities to your runtime, check the customize runtime section.

Last update: January 30, 2024
| Created: November 4, 2023