ask! Development

⚠️ Production Warning ask! eDSL currently has several limitations and issues being actively addressed. It is not recommended for production environments. Consider using ink! for production contracts.

View known issuesarrow-up-right

Introduction

ask! is a framework that enables AssemblyScript developers to write Wasm smart contracts for pallet-contracts. With TypeScript-like syntax, it makes smart contract development accessible to JavaScript/TypeScript developers.

💡 Project Status ask! is a Polkadot treasury funded project currently under active development.

Prerequisites

  • Basic understanding of TypeScript/JavaScript

  • Familiarity with package managers (yarn/npm)

Environment Setup

1. Install Yarn

npm install --global yarn

2. Clone Template Repository

git clone https://github.com/ask-lang/ask-template.git
cd ask-template

Project Structure

Contract Development

Basic Contract Structure

Key Components

1. Storage

2. Contract Methods

3. Events

Building Your Contract

This generates:

  • flipper.optimized.wasm: Compiled WebAssembly code

  • metadata.json: Contract metadata

  • flipper.wat: WebAssembly text format (human-readable)

Deployment Process

  1. Select your target network

  2. Upload contract files:

    • metadata.json for ABI

    • flipper.optimized.wasm for contract code

  3. Follow the deployment wizard

  4. Confirm deployment success

Additional Resources

Documentation

Support

Need help? Join our Discord Communityarrow-up-right

Development Tips

  • Use TypeScript-aware IDEs for better development experience

  • Keep track of event IDs to avoid conflicts

  • Test thoroughly before deployment

  • Monitor gas usage and optimization

Last updated