The implementation of the chain extension for `pallet-assets`

Overview

Pallet assets chain extension

⚠️ Chain extension contains vulnerabilities: Don't use it in the production. Fixing vulnerabilities requires changes on pallet-assets to expose some data about the owner, admin, issuer, etc.

The repository contains full implementation(ink and substrate parts) of the pallet-assets chain extension.

The crate can be imported on the parachain side with substrate and substrate-std features:

...

# Contracts specific packages
pallet-contracts = { git = "https://github.com/paritytech/substrate", package = "pallet-contracts", default-features = false }
pallet-contracts-primitives = { git = "https://github.com/paritytech/substrate", package = "pallet-contracts-primitives", default-features = false }
pallet-contracts-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", package = "pallet-contracts-rpc-runtime-api", default-features = false }

# Chain extension for `pallet-assets`
pallet-assets = { git = "https://github.com/paritytech/substrate", package = "pallet-assets", default-features = false }
pallet-assets-chain-extension = { git = "https://github.com/Supercolony-net/pallet-assets-chain-extension", default-features = false, features = ["substrate"]  }
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^
# Here imported with `substrate` feature

...


std = [
	...
	"pallet-assets/std",
	"pallet-assets-chain-extension/substrate-std", # <---- Here impoted with `substrate-std` feature
]

...

Example of how to enable

The crate can be imported on the smart contract side with ink and ink-std features:

...

# Ink deps
ink_primitives = { version = "~3.3.0", default-features = false }
ink_metadata = { version = "~3.3.0", default-features = false, features = ["derive"], optional = true }
ink_env = { version = "~3.3.0", default-features = false }
ink_storage = { version = "~3.3.0", default-features = false }
ink_lang = { version = "~3.3.0", default-features = false }
ink_prelude = { version = "~3.3.0", default-features = false }
ink_engine = { version = "~3.3.0", default-features = false, optional = true }

pallet-assets-chain-extension = { git = "https://github.com/Supercolony-net/pallet-assets-chain-extension", default-features = false, features = ["ink"]  }
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^
# Here imported with `ink` feature

...

std = [
	...
	"pallet-assets-chain-extension/ink-std", # <---- Here impoted with `ink-std` feature
]

...

Example of how to use

You might also like...
Official implementation of the YeeCo Root Chain (Layer 1)
Official implementation of the YeeCo Root Chain (Layer 1)

yeeroot Official implementation of the YeeCo Root Chain (Layer 1) YeeCo is a permissionless, secure, high performance and scalable public blockchain p

Cross-chain hub for Crypto Asset on Polkadot

ChainX ChainX is a community-driven project built on the next-generation blockchain framework substrate, the largest Layer-2 network of Bitcoin using

EVM compatible chain with NPoS/PoC consensus

Reef Chain Reef chain is written in Rust. A basic familiarity with Rust tooling is required. To learn more about Reef chain, please refer to Documenta

Basilisk node - cross-chain liquidity protocol built on Substrate

Basilisk node Local Development Follow these steps to prepare a local Substrate development environment 🛠️ Simple Setup Install all the required depe

The Solana Program Library (SPL) is a collection of on-chain programs targeting the Sealevel parallel runtime.

Solana Program Library The Solana Program Library (SPL) is a collection of on-chain programs targeting the Sealevel parallel runtime. These programs a

Examples of Solana on-chain programs

spl-examples List of Solana on-chain programs which demonstrate different aspects of Solana architecture. 01__state It's a counter program. Each user

Synchronized shadow state of Solana programs available for off-chain processing.

Solana Shadow The Solana Shadow crate adds shadows to solana on-chain accounts for off-chain processing. This create synchronises all accounts and the

🔗 Tool for rebasing a chain of local git branches.

git-chain Tool for rebasing a chain of local git branches. Motivation Suppose you have branches, each depending on a parent branch (usually called "st

Making composability with the Zeta DEX a breeze, FuZe provides CPI interfaces and sample implementations for on-chain program integration.
Making composability with the Zeta DEX a breeze, FuZe provides CPI interfaces and sample implementations for on-chain program integration.

Zeta FuZe 🧬 Zeta FuZe FuZe is Zeta's cross-program integration ecosystem. This repository contains the Zeta Cross Program Invocation (CPI) interface

Comments
Owner
Supercolony
We create, fund and support Polkadot and cross-chain companies
Supercolony
Minimal Substrate node configured for smart contracts via pallet-contracts.

substrate-contracts-node This repository contains Substrate's node-template configured to include Substrate's pallet-contracts ‒ a smart contract modu

Parity Technologies 73 Dec 30, 2022
InvArch Pallet Library - IP Infrastructure for Substrate

InvArch-Pallet-Library Intro This repository should contains the Pallets used in the InvArch blockchain, and reviews their relationships and functions

InvArch 20 Dec 18, 2022
Substrate Pallet for chaotic experimentations

Chaos Pallet The Chaos module is used to inject chaos into a Substrate Runtime and intentionally break things. Overview The Chaos module provides func

Bernardo A. Rodrigues 2 Apr 7, 2022
Faterium Substrate Node, Runtime, and Pallets. Contains "faterium-polls-pallet" with logic of Faterium Polls.

Faterium Substrate Node Faterium - a place where fates are forged. This is the official implementation of Faterium Crowdfunding Polls in Rust as Subst

Faterium 3 Dec 15, 2022
A specialized blockchain for testing use cases with the FRAME NFTs Pallet.

Substrate NFTs Node The Substrate NFTs node is a specialized blockchain for testing use cases with the FRAME NFTs Pallet. ?? The purpose of this node

Sacha Lansky 4 May 25, 2023
Helpers crate to simplify ink! chain extension development

OpenBrush Chain Extension library The library provides tools and primitives to simplify the development of chain extensions for ink! and for the subst

Supercolony 7 Dec 1, 2022
nAssets are Nova Finance’s framework for building programmable assets.

nAssets are Nova Finance’s framework for building programmable assets. nAssets can be used to tokenize and store collective forms of value while also instructing assets to yield, exchange or rebalance.

Nova Finance 45 Dec 28, 2021
Helper library for interacting with Terra assets (SDK coins and CW20 tokens)

terra-asset Helpers for interacting with Terra assets, including native coins and CW20 tokens Usage This crate contains two struct types: AssetInfo st

larry 9 Jan 3, 2022
Tradechain is an open source blockchain designed for fast trading & interoperability for new, existing assets

Tradechain is an open source blockchain designed for fast trading & interoperability for new, existing assets. Help build the future of trading with other Tradians.

Matt Shaver 5 Jul 5, 2022
An HTTP proxy for assets (mainly images) to route requests through an always-encrypted connection.

camo-rs camo-rs is a frontend-compatible Rust-re-implementation of the now archived NodeJS-based atmos/camo - an HTTP proxy for assets (mainly images)

Dennis Schubert 7 Dec 8, 2022