2021 Sub0 online: Wasm Smart Contract with Patract Labs

Introduction

Introduce Metis

Demo

npx redspot-new erc20

remember to change the dependencies in cargo.toml to pull from crate.io, otherwise it will have compatible issues with polkadot.js. ink! is updating very fast and if we pull directly from ink! git, it will have compatible issues. We are seeing problems with Polkadot/app as well. But usually, it get fixed pretty quick.

ink_primitives = { version = "3.0.0-rc5", default-features = false }ink_metadata = { version = "3.0.0-rc5", default-features = false, features = ["derive"], optional = true }ink_env = { version = "3.0.0-rc5", default-features = false }ink_storage = { version = "3.0.0-rc5", default-features = false }ink_lang = { version = "3.0.0-rc5", default-features = false }

For ubuntu, remember to give it permission chmod +x europa-ui-v0.3.32-x86_64-linux.AppImage

px redspot run scripts/deploy.ts
cd contractscargo +nightly contract build --keep-debug-symbols --optimization-passes=0

this will build the contract in debug mode and keeps all debug symbols.

mkdir ../artifactscp ./target/ink/erc20_pausable.contract ../artifacts/cp ./target/ink/metadata.json ../artifacts/erc20_pausable.json

About Patract Labs

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store