An interactive blockchain development challenge for students
Start Challenge ยท View Demo ยท Report Bug ยท Request Feature
๐ Learn Blockchain Basics [50 points]
๐ง Setup Development Environment [50 points]
๐ Deploy First Smart Contract [100 points]
๐ Create Your First SBT [100 points]
๐ Execute Basic Queries [100 points]
๐ Implement Advanced Contract Functions [100 points]
๐จ Build Basic Frontend [100 points]
๐ Integrate Contract with Frontend [100 points]
๐ฎ Create Interactive UI [100 points]
๐ Implement Analytics Dashboard [100 points]
๐ Deploy Full Production DApp [100 points]
Welcome to the Certify DApp Challenge! This hands-on tutorial will guide you through building a complete blockchain-based certification system. By the end, you'll have created a fully functional DApp that issues and manages Soulbound Tokens (SBTs) on the Kalp blockchain.
graph LR
A[Smart Contract] --> B[SBT Token]
B --> C[Frontend]
C --> D[User Interface]
D --> E[Certification System]
- ๐ท Master Soulbound Token implementation
- ๐ท Develop production-grade smart contracts
- ๐ท Build modern web frontends with Next.js
- ๐ท Integrate blockchain with web applications
- ๐ท Deploy full-stack DApps
| Tool | Version | Download |
|---|---|---|
| Go | >=1.19, <1.20 | Download |
| Node.js | >=14.x | Download |
| npm | >=6.x | Included with Node.js |
| Postman | Latest | Download |
| Kalp Studio Account | - | Sign Up |
-
Clone Repository
git clone https://github.com/thekalpstudio/Certify.git cd certify -
Setup Smart Contract
cd sbtkalp go mod tidy -
Configure Frontend
cd ../certification npm install cp .env.example .env.local
- Understand Soulbound Token (SBT) implementation
- Master Kalp SDK functionalities
- Learn blockchain state management
- Implement secure smart contract patterns
- Install Go (>=1.19, <1.20)
- Set up GOPATH and workspace
- Basic understanding of blockchain concepts
- Familiarity with Go programming
-
Create project directory:
mkdir sbtkalp cd sbtkalp -
Initialize Go module:
go mod init sbtkalp
-
Install Kalp SDK:
go get -u github.com/p2eengineering/kalp-sdk-public/kalp
-
Initialize vendor directory:
go mod vendor
// SBT Metadata structure
type NFTMetadata struct {
Description string `json:"description"`
Name string `json:"name,omitempty"`
Organization string `json:"organization,omitempty"`
DateOfIssue string `json:"dateOfIssue,omitempty"`
}
// Main SBT structure
type SoulboundToken struct {
Owner string `json:"owner"`
TokenID string `json:"tokenID"`
Metadata string `json:"metadata"`
}
// Smart Contract structure
type SmartContract struct {
kalpsdk.Contract
}// State prefixes for organization
const sbtPrefix = "soulboundToken"
const ownerMappingPrefix = "sbtOwnerMapping"
// Composite key creation example
compositeKey, err := sdk.CreateCompositeKey(sbtPrefix, []string{owner, tokenID})Challenge Task: Implement the initialization function with the following requirements:
- Check if contract is already initialized
- Store metadata in JSON format
- Set contract state
- Handle errors appropriately
Challenge Task: Implement token minting with these features:
- Generate unique TokenID using UUID
- Validate owner status
- Store token data
- Create composite keys
Challenge Task: Implement query functionality that:
- Retrieves token details
- Validates existence
- Returns formatted data
func (s *SmartContract) Initialize(sdk kalpsdk.TransactionContextInterface, description string) error {
// Your initialization code here
// Hint: Use the provided metadata structure
}Tasks:
- Check contract status
- Create metadata
- Store initialization flag
- Handle errors
func (s *SmartContract) MintSBT(sdk kalpsdk.TransactionContextInterface, address string) error {
// Your minting code here
// Hint: Use UUID for token generation
}Tasks:
- Generate token ID
- Validate address
- Create token record
- Update state
Implement these query functions:
- Basic Token Query
func (s *SmartContract) QuerySBT(sdk kalpsdk.TransactionContextInterface, owner string, tokenID string) (*SoulboundToken, error)- Owner-Based Query
func (s *SmartContract) GetTokenMetadata(sdk kalpsdk.TransactionContextInterface, owner string) (*SoulboundToken, error)- Token Listing
func (s *SmartContract) GetAllTokenIDs(sdk kalpsdk.TransactionContextInterface) ([]string, error)- Transfer Prevention System
func (s *SmartContract) TransferSBT(sdk kalpsdk.TransactionContextInterface, from string, to string, tokenID string) error {
// Implement transfer prevention
// Hint: This should always return an error
}- Composite Key Management
// Example composite key creation
mappingKey, err := sdk.CreateCompositeKey(ownerMappingPrefix, []string{address})-
Code Organization
- Clean file structure
- Consistent naming
- Clear documentation
-
Error Handling
- Descriptive messages
- Proper propagation
- Recovery handling
-
Documentation
- Function comments
- Usage examples
- State management explanation
To complete Module 1:
- โ Implement all core functions
- โ Pass provided test cases
- โ Follow code guidelines
- โ Document your code
- โ Handle errors properly
-
Development Tools:
-
Documentation:
After completion:
- Review your implementation
- Document your learnings
- Prepare for Module 2
- Share your achievements
Good luck with the challenge! ๐
// Example: Mint New Token [100 points]
const mintSBT = async (recipientAddress: string) => {
try {
await fetch('https://gateway-api.kalp.studio/v1/contract/kalp/invoke/[CONTRACT_ID]/MintSBT', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': process.env.NEXT_PUBLIC_API_KEY!,
},
body: JSON.stringify({
network: "TESTNET",
blockchain: "KALP",
walletAddress: "[YOUR_WALLET]",
args: {
address: recipientAddress
}
})
});
} catch (error) {
console.error('Error minting SBT:', error);
}
};-
Smart Contract Deployment [150 points]
- Follow Deployment Guide
- Configure Kalp Wallet
-
Frontend Deployment [150 points]
npm run build npm run dev
-
Integration Testing [100 points]
- Complete API Testing Guide
- Implement comprehensive test suite
Example:๐ Interact with Smart Contract Using Postman
Prerequisites:
After executing the above setup:
After deploying the smart contract in Kalp Studio, an API endpoint will be generated. This API endpoint can be used to interact with the deployed smart contract.
Click on Check Params, and the routing details and parameters should look like this:
An API key is required for authorization in API POST requests.
It looks like this in Kalp Studio:
Setting Headers in Postman:
- Set the required headers for authentication:
-
Key: x-api
-
Value: Paste the auth key you obtained after API key generation in Kalp Studio.
- Contract ID:
vHYQcRijQGB3UpVhqc3UeBM2D3ztjPuS1732534432325 - Default Wallet:
ded665bca7d412891f44a571d908b66184b0ee10 - API Documentation
- ๐ฏ Environment Wizard
- ๐ฏ Contract Master
- ๐ฏ Token Creator
- ๐ฏ Frontend Pioneer
- ๐ฏ Integration Specialist
- ๐ฏ Testing Guru
- ๐ฏ DApp Architect
- ๐ฏ Production Master
- ๐ฏ Full Stack Developer
- Complete all challenge modules
- Submit your project for review
- Pass the technical assessment
- Receive your SBT certification
- Join the Kalp Developer Community
- โ Follow Go programming conventions
- โ Write comprehensive tests
- โ Document your code
- โ Use proper error handling
- โ Implement security best practices
After completing this challenge:
- Explore advanced Kalp features
- Contribute to open source projects
- Join the developer community
- Build your own DApps
Happy Coding! ๐
This project is licensed under the MIT License - see the LICENSE file for details.

