Giter Site home page Giter Site logo

agryaznov / pallet-assets-chain-extension Goto Github PK

View Code? Open in Web Editor NEW

This project forked from supercolony-net/pallet-assets-chain-extension

0.0 0.0 0.0 17 KB

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

License: MIT License

Rust 100.00%

pallet-assets-chain-extension's Introduction

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

pallet-assets-chain-extension's People

Contributors

xgreenx avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.