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.
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
2. Clone Template Repository
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 codemetadata.json
: Contract metadataflipper.wat
: WebAssembly text format (human-readable)
Deployment Process
Access polkadot.js
Select your target network
Upload contract files:
metadata.json
for ABIflipper.optimized.wasm
for contract code
Follow the deployment wizard
Confirm deployment success
Additional Resources
Documentation
Support
Need help? Join our Discord Community
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