This project provides a hands-on introduction to Substrate's FRAME development patterns by implementing a simplified version of common blockchain pallets.
TLDR: If you are not familiar with Git & Github, follow these steps below to fork and setup your own repository.
- Step 1: Install Git & Github Desktop (optional) on your local device
- Step 2: Fork this repository by click the
Fork buttonon Github
- Step 3:
Clonethe forked repository to your local device using the below command
git clone https://github.com/<your_github_username>/frame-challenges.gitReplace the [name-of-your-account] with your Github username. For example, if my username is chungquantin, I would do the below command to clone the repository to my local device.
git clone https://github.com/openguild-labs/frame-challenges.git- Step 4: Edit the
README.mdfile to register for official participation
Go to Participant Registration section and register to be the workshop participants. Add the below to the list, replace any placeholder with your personal information.
| 🦄 | Name | Github username | Your current occupation |
- Step 5:
Commityour code and push to the forked Github repository
git add .
git commit -m "Register for OpenGuild FRAME Challenges"
- Step 6: Create a
Pull Requestto merge your changes to this repository and name your PR asYour name | Register for OpenGuild FRAME Challenges
After learning about Substrate, FRAME, Runtime, and Pallets in Polkadot SDK, this coding challenge helps you understand how these components work together by implementing a simplified version of the actual architecture.
- FRAME Pallets: Libraries for building Substrate runtime, including core frame components and functional pallets
- Runtime: A collection of FRAME pallets that define blockchain logic
This challenge simulates three core components:
system.rs: Foundation module similar toframe_systemstaking.rs: Token staking module similar topallet_stakinggovernance.rs: On-chain proposal system similar topallet_collectiveorpallet_democracy
The project defines a simplified runtime that configures concrete types for the generic pallets:
pub struct Runtime;
impl SystemConfig for Runtime {
type AccountId = u64;
}
impl StakingConfig for Runtime {
type Balance = u64;
}
impl GovernanceConfig for Runtime {
// No additional types needed
}OpenGuild is a builder-driven community centered around Polkadot. OpenGuild is built by Web3 builders for Web3 builders. Our primary aim is to cater to developers seeking a comprehensive understanding of the Polkadot blockchain, providing curated, in-depth materials with a low-level approach.
- About us: Learn more about us
- Website: OpenGuild Website
- Github: OpenGuild Labs
- Discord: Openguild Discord Channel
