Swanky: The All-in-One WASM Tool

Jerad | Astar
Astar Network
Published in
4 min readJul 20, 2022

Developers need tools that help write, compile, deploy, and test smart contracts. Currently, the Astar allows developers to use traditional EVM tooling, such as: Hardhat or Truffle. The cypherpunk community created a large library of tutorials, documentation, and templates that are available to Solidity developers. It’s easy to understand why devs choose to build EVM–there is a lack of tools and documentation to build on other virtual machines, including WebAssembly (WASM) smart contracts. This is why Astar is building a new developer tool called Swanky Suite.

Why WebAssembly?

Why are we going through the trouble of building WASM smart contracts and developing new tools? Because blockchain networks are now facing limitations. Though Ethereum brought us the revolution of Web3 with the introduction of smart contracts, it cannot build the innovative future of blockchain alone. Instead, WASM smart contracts are a new playground for developers to explore and create new interoperable dApps. WASM has the following benefits:

  • Build high performance browser based apps, even light clients based on Substrate
  • Use eDSLs, such as ink! or Ask!
  • Designed to be close to machine code, while being platform agnostic
  • Compatible with new ecosystems built on Substrate

How Swanky helps Developers?

Today, the benefits of WASM are overshadowed by a number of barriers, namely: infrastructure, marketing, income for developers, and available tools and documentation. There are many projects creating solutions to these four issues–Parity brought contract-pallets to substrate and Supercolony is building a library of applications and pushing market adoption. We are focused on building the infrastructure for WASM contracts on Astar Network by providing basic income to devs (dApp staking) and building a modern Command-Line (CLI) tool, called Swanky.

Swanky Suite is the all-in-one tool for WASM smart contract developers within the Polkadot and Kusama ecosystem. It bridges the various tools in the WASM ecosystem into a single interface to make building the next generation of smart contracts easy for developers.

It is a tool for developers to:

  • Quickstart a local contract development node with instant finality (Swanky Node)
  • Scaffolding a new project with various templates for both smart contracts and front-end dApps (ie. “Truffle”for ink!)
  • Compiling projects with various languages (like ink!, Ask-Lite, …)
  • Running unit tests with the Swanky Node and any other node supporting pallet-contracts
  • Setting up RPC tests and integration tests via npm for interacting with smart contracts on the client-side
  • Deploying smart contracts to networks within the Dotsama ecosystem that support pallet-contracts

Architecture of Swanky Suite

Swanky Suite has two parts: Swanky CLI and Swanky Node.

Swanky CLI

Swanky CLI is a tool to not only write and compile smart contracts, but also run critical unit testing and handle account management. By using Swanky developers will have access to a growing number of project templates–that include the smart contract and front-end dApp code. Instead of writing entirely new smart contracts from scratch, devs can quickly jump into building and deploying their project. This saves valuable time and money, allowing teams to focus on the other challenges of building a successful Web3 application.

Swanky Node

Swanky Node is streamlined for local development–a simple Substrate-based blockchain that enables pallet-contracts. Yet, the Swanky Node is very flexible, and can be configured to run in different states (persistent or non-persistent), access pallets of substrate-based dApp development, and other features. Most importantly, it is forward thinking by being extensible and customizable. Developers working in different parachains will be able to load their node with preconfigured pallets and chain extensions. Builders from all networks can work in their ecosystem. Swanky is built for Dotsama and beyond.

Here is a high-level view of Swanky CLI and Swanky Node (“Local Developer Node”):

Though Swanky Suite will initially be limited to ink! and run on only a local node, in the near future it will integrate any language that is able to compile to WASM smart contract binary and support any local or remote node. Swanky Suite is the go-to tool for Polkadot and Kusama to make development easy, from scaffolding new projects to deployment of dApps on mainnet.

Moreover, our plan is to continuously develop Swanky and promote it to Web3 developers at events such as hackathons, workshops, and conferences. Creating, maintaining, and promoting Swanky Suite will grow the WASM smart contract developer community and Polkadot ecosystem.

About Astar Network

Astar Network — the Innovation Hub on Polkadot. Astar Network supports the building of dApps with EVM and WASM smart contracts and offers developers true interoperability, with cross-consensus messaging (XCM). We are made by developers and for developers. Astar’s unique Build2Earn model empowers developers to get paid through a dApp staking mechanism for the code they write and dApps they build.

Astar’s vibrant ecosystem has become Polkadot’s leading Parachain globally, supported by all major exchanges and tier 1 VCs. Astar offers the flexibility of all Ethereum and WASM toolings for developers to start building their dApps. To accelerate growth on Polkadot and Kusama Networks, Astar Space Labs offers an Incubation Hub for top TVL dApps.

Website | Twitter | Discord | Telegram | GitHub

--

--

Jerad | Astar
Astar Network

Contributing to the Startale projects, including Soneium and Astar Network. Official Astar Website: astar.network