#blockchain #smart-contracts #chain-extension

no-std pallet-assets-chain-extension

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

1 unstable release

0.1.1 Sep 15, 2023

#651 in #smart-contracts

Download history 5/week @ 2025-08-16 40/week @ 2025-08-23 141/week @ 2025-08-30 49/week @ 2025-09-06 17/week @ 2025-09-13 39/week @ 2025-09-20 29/week @ 2025-09-27 14/week @ 2025-10-04 19/week @ 2025-10-11 27/week @ 2025-10-18 10/week @ 2025-10-25

63 downloads per month
Used in 2 crates (via openbrush_contracts)

MIT license

25KB
333 lines

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/727-Ventures/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 = { version = "4.0.0", default-features = false }

pallet-assets-chain-extension = { git = "https://github.com/727-Ventures/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

Dependencies

~5–28MB
~411K SLoC