Skip to content

meanking/astar-staking

Repository files navigation

dApps-Staking Chain Extension Workshop

This repository contains two ink! example contract that was shown on the Workshop of Polkadot North America Hackathon

Example 1: Use custom environment & ink! macros

Folder: dapps-staking-chain-extension-contract
This example shows how to use dApp-Staking chain-extension by defining the function inside a custom environment and using #[ink::chain_extension] macro It relies on ink! chain-extension documentation & ink! chain-extension contract example

Example 2: Use chain-extension builder

Folders: dapps-staking-crate & staking-contract
This examples use the chain-extension builder directly in order to avoid using custom environment.
It shows how chain-extension will be implemented in Astar.
It was inspired by the OpenBrush implementation of Pallet-Asset chain-extension [link refers to a PR so it migth change]

Deploy the contracts

In order to deploy the contract locally you should use swanky-node that integrate the chain-extensions of these exemple contracts

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages