# WakeUp Labs - Update Thread: AssemblyScript Integration for the Arbitrum Stylus SDK 

**URL:** <https://forum.arbitrum.foundation/t/wakeup-labs-update-thread-assemblyscript-integration-for-the-arbitrum-stylus-sdk/29038>\
**Category:** DAO Programs & Initiatives\
**Created:** [April 16, 2025, 9:57am UTC](https://forum.arbitrum.foundation/t/wakeup-labs-update-thread-assemblyscript-integration-for-the-arbitrum-stylus-sdk/29038 "2025-04-16T09:57:08Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![WakeUpLabs](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.arbitrum.foundation/wakeuplabs/32/12949_2.png) [@WakeUpLabs](https://forum.arbitrum.foundation/u/WakeUpLabs)\
**Post date:** [April 16, 2025, 9:57am UTC](https://forum.arbitrum.foundation/t/wakeup-labs-update-thread-assemblyscript-integration-for-the-arbitrum-stylus-sdk/29038/1 "2025-04-16T09:57:08Z")

</div>

## TL;DR

This thread will keep you updated on our work integrating AssemblyScript (a TypeScript-like language) into the Arbitrum Stylus SDK.

Why does it matter? Because it lets developers write fast, efficient smart contracts using a language they already know.

 ![Wakeup Logo Imagen (2)](https://canada1.discourse-cdn.com/flex029/uploads/arbitrum1/original/2X/6/63a614e9591df1bb116cd1690fbaa166f6f7a6d1.png)

## Why AssemblyScript and the Stylus SDK?

The Stylus SDK already lets you build super fast smart contracts using Rust. But not every developer knows Rust. That’s where AssemblyScript comes in—it’s based on TypeScript, which many developers are already familiar with.

By adding AssemblyScript to the mix, we’re making it much easier for JavaScript and TypeScript developers to jump into blockchain development—without losing the speed and power Stylus is known for.

## How This Helps the Arbitrum Ecosystem

This upgrade opens the door for thousands of TypeScript and script-based developers to build on Arbitrum. It brings more flexibility and lowers the learning curve for Web3 devs.

We’re aiming to support 90%+ of what the current Stylus SDK can do—so developers still get all the performance benefits, but with a more familiar language.

In short: more devs, building better apps, faster.

## What’s Next

We’re kicking things off with technical research and SDK design. After that, we’ll move into development, sharing everything with the community along the way in the Arbitrum DAO forum.

We’ll also track important stuff like how fast the SDK is, how many people use it, and how secure it is—so the whole project stays aligned with the Arbitrum community’s goals.

---

<div class="post-metadata">

**Author:** ![KlausBrave](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.arbitrum.foundation/klausbrave/32/5226_2.png) [@KlausBrave](https://forum.arbitrum.foundation/u/KlausBrave)\
**Post date:** [April 16, 2025, 11:49am UTC](https://forum.arbitrum.foundation/t/wakeup-labs-update-thread-assemblyscript-integration-for-the-arbitrum-stylus-sdk/29038/2 "2025-04-16T11:49:16Z")

</div>

As a person who uses TypeScript a lot, I appreciate this.

---

<div class="post-metadata">

**Author:** ![WakeUpLabs](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.arbitrum.foundation/wakeuplabs/32/12949_2.png) [@WakeUpLabs](https://forum.arbitrum.foundation/u/WakeUpLabs)\
**Post date:** [April 16, 2025, 4:17pm UTC](https://forum.arbitrum.foundation/t/wakeup-labs-update-thread-assemblyscript-integration-for-the-arbitrum-stylus-sdk/29038/3 "2025-04-16T16:17:25Z")

</div>

# Project Kickoff: Bringing AssemblyScript to Stylus

Over the next few months, the WakeUp Labs team is focused on bringing high-performance smart contracts to developers who already know a Script-based language. This means you won’t need to learn a whole new language from scratch to start building on Arbitrum.

We’re starting with deep research and SDK architecture planning, followed by hands-on development. Everything will be open and documented so the community can follow along.

We’re excited to help more developers join the Web3 movement by making powerful tools easier to use.

Stay tuned for progress updates and key milestones!

---

<div class="post-metadata">

**Author:** ![WakeUpLabs](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.arbitrum.foundation/wakeuplabs/32/12949_2.png) [@WakeUpLabs](https://forum.arbitrum.foundation/u/WakeUpLabs)\
**Post date:** [May 8, 2025, 8:41pm UTC](https://forum.arbitrum.foundation/t/wakeup-labs-update-thread-assemblyscript-integration-for-the-arbitrum-stylus-sdk/29038/4 "2025-05-08T20:41:19Z")

</div>

# WakeUp Labs Completes Key Milestone with Arbitrum: Making Smart Contracts More Accessible with AssemblyScript

## TL;DR:

We have successfully completed Milestone #2 in our collaboration with Arbitrum. This milestone focused on feasibility: could AssemblyScript really work within the Stylus framework? Our team dove deep into the Stylus SDK, WebAssembly behavior, and developer tooling. The outcome: a working proof-of-concept, a detailed technical architecture, and a clear path forward.

 ![Wakeup Logo Imagen (2)](https://canada1.discourse-cdn.com/flex029/uploads/arbitrum1/original/2X/6/63a614e9591df1bb116cd1690fbaa166f6f7a6d1.png)

## Why This Matters

Our mission in Milestone #2 was to rigorously analyze whether AssemblyScript — a TypeScript-to-WebAssembly compiler — could be integrated with the Arbitrum Stylus SDK. The goal: enable developers to write Stylus-compatible smart contracts using a familiar, script-like syntax. With so many developers already proficient in JavaScript and TypeScript, AssemblyScript has the potential to broaden participation in smart contract development.

But first, we had to answer a critical question:  
**Can AssemblyScript work smoothly with Stylus?**

To achieve this, we began by researching how AssemblyScript interacts with WebAssembly, focusing on its unique patterns and constraints. We then performed an in-depth analysis of the Stylus SDK to pinpoint the most viable integration points. Based on these insights, we defined the technical requirements needed to create robust AssemblyScript bindings. With those foundations in place, we designed a high-level architecture for the toolchain that outlines how the components would work together. Finally, we built an initial proof of concept to validate the core integration and demonstrate its potential.

## What We Deliver

This phase was all about exploring that integration. Here’s what we delivered:

- [Feasibility Report.](https://github.com/wakeuplabs-io/assembly-script-stylus/blob/main/packages/docs/feasibility-report.md) A detailed study of AssemblyScript ↔ WebAssembly interaction challenges and Stylus SDK architecture.
- [High-Level Architecture.](https://github.com/wakeuplabs-io/assembly-script-stylus/blob/main/packages/docs/feasibility-report.md#architecture-and-technologies) We mapped out how AssemblyScript bindings would bridge into Stylus, including a modular view of necessary components.
- [Roadmap.](https://drive.google.com/file/d/1PvmeYDmTKfHiYab9UgxzrW_wXSTRCJ8z/view?usp=sharing) A technical trajectory covering how we’ll move from research to production-grade tools, with priorities for binding design and dev tooling.
- [Initial Proof of Concept.](https://github.com/wakeuplabs-io/assembly-script-stylus/tree/main/packages/poc) A minimal implementation showing key components of AssemblyScript interacting with Stylus VM — early, but effective.
- A demo — as an example of a successful implementation integrated with Stylus VM.

[![](https://canada1.discourse-cdn.com/flex029/uploads/arbitrum1/original/2X/1/18fbecda41254468655419a6b47be3c72ad1ebaa.jpeg "AssemblyScript Support for the Arbitrum Stylus SDK: Milestone 2 Demo") ](https://www.youtube.com/watch?v=iWbuPdr9dlI)

## What’s Next?

With Milestone #2 complete, we’re moving into Milestone #3: Core Development – Setting the Foundation, where we’ll:

- Build the actual AssemblyScript bindings and SDK-compatible APIs.

- Set up a dedicated WebAssembly compilation pipeline tailored for AssemblyScript.

- Begin developing developer-facing utilities for contract compilation and testing.

AssemblyScript offers a TypeScript-like syntax that lowers the learning curve for Web2 developers entering Web3. By bringing this to Stylus, we’re expanding the smart contract developer base — without compromising on performance or safety. It’s a step toward greater inclusivity and innovation in the Arbitrum ecosystem.

Thanks for following along! Don’t forget to connect with us on[X (Twitter)](https://twitter.com/wakeuplabs) and [LinkedIn](https://linkedin.com/company/wakeuplabs) for the latest updates.

---

<div class="post-metadata">

**Author:** ![WakeUpLabs](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.arbitrum.foundation/wakeuplabs/32/12949_2.png) [@WakeUpLabs](https://forum.arbitrum.foundation/u/WakeUpLabs)\
**Post date:** [July 1, 2025, 4:15pm UTC](https://forum.arbitrum.foundation/t/wakeup-labs-update-thread-assemblyscript-integration-for-the-arbitrum-stylus-sdk/29038/5 "2025-07-01T16:15:53Z")

</div>

# Demo Now Live: AssemblyScript + Stylus

We’ve just released a demo showcasing our AssemblyScript integration with the Stylus SDK, part of our ongoing collaboration with Arbitrum. The demo features an ERC-20 smart contract written in AssemblyScript, demonstrating how TypeScript developers can now get closer to onchain deployment using familiar syntax.

[![](https://canada1.discourse-cdn.com/flex029/uploads/arbitrum1/original/2X/1/18fbecda41254468655419a6b47be3c72ad1ebaa.jpeg "AssemblyScript Integration for the Arbitrum Stylus SDK: DEMO") ](https://www.youtube.com/watch?v=yKmTTFE6gxc)

Let’s build Arbitrum together! 🙌

---

<div class="post-metadata">

**Author:** ![WakeUpLabs](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.arbitrum.foundation/wakeuplabs/32/12949_2.png) [@WakeUpLabs](https://forum.arbitrum.foundation/u/WakeUpLabs)\
**Post date:** [August 22, 2025, 8:28pm UTC](https://forum.arbitrum.foundation/t/wakeup-labs-update-thread-assemblyscript-integration-for-the-arbitrum-stylus-sdk/29038/6 "2025-08-22T20:28:57Z")

</div>

## Milestone #3 & #4 Completed: Core Development and Feature Implementation

### TL;DR:

We’ve completed our third and fourth milestones, pushing AssemblyScript support for Stylus into real development workflows. From APIs and compilation to ERC standards and CLI tooling developers can now start experimenting with AssemblyScript smart contracts on Arbitrum.

 ![fQKQuJypZNeCxBMQ5C9HCgNJo](https://canada1.discourse-cdn.com/flex029/uploads/arbitrum1/original/2X/8/84b1bb494891b315dcc0e64c40d3ce516e0ff218.jpeg)

## What We Achieved

### Milestone #3 – Core Development

This phase was focused on laying the technical foundation for AssemblyScript on Stylus:

- ✅ Built a WebAssembly compilation workflow tailored for AssemblyScript and compatible with Stylus constraints.
- ✅ Defined early-stage AssemblyScript APIs to expose essential types and contract patterns.
- ✅ Delivered a minimal example contract in AssemblyScript to illustrate the development flow.
- ✅ Introduced an initial ABI generation process to support tooling compatibility.

#### Deliverables

As part of this milestone, we focused both on proving the technical workflow and on making the developer experience more tangible. Here’s what we shipped:

[Demo](https://www.loom.com/share/306fa472cfdb483e82657605a1bb5179?sid=718824c3-311c-4ba1-a4af-f7c49754abdd)

- Example Contract: a minimal smart contract written in AssemblyScript, showing the basic development flow on Stylus.
- ABI Output Tooling: a prototype tool that automatically generates ABI specs from AssemblyScript source.
- Developer Experience: early insights into how the SDK feels to use, including workflow steps and usability notes.

[Report](https://github.com/wakeuplabs-io/assembly-script-stylus-sdk/blob/main/packages/docs/milestone-3-report.md)

- Compilation Workflow: a detailed overview of the AssemblyScript → WebAssembly → Stylus compilation pipeline.
- Interfaces Definition: documentation of the key design decisions around which types are supported by the AssemblyScript SDK.

### Milestone #4 – Feature Implementation

With the core in place, we extended the SDK to cover more advanced use cases and developer experience:

- Added support for essential Stylus SDK features enabling low-level system interactions.
- Expanded the toolchain for WebAssembly-specific requirements.
- ERC-20 compatibility: full implementation for token contracts.
- ERC-721 compatibility: progress toward NFT development workflows.
- Released our first CLI (available on npm) to create, compile, and deploy AssemblyScript contracts.

#### Deliverables:

- [CLI Demo](https://www.youtube.com/watch?v=nQ_fKTcejwI): How to create, compile, and deploy AssemblyScript contracts using the CLI.
- [Playground Demo](https://www.youtube.com/watch?v=IMZES0rnhIw): Interactive environment to experiment with deployed AssemblyScript contracts.
- [Developer Documentation](https://as-stylus.wakeuplabs.io/): Usage guides, API references, and workflow instructions.
- [Developer Playground](https://as-stylus-playground.wakeuplabs.link/): A web-based playground where developers can experiment with and interact directly with their AssemblyScript smart contracts.

### Useful Links

- [GitHub Repository](https://github.com/wakeuplabs-io/assembly-script-stylus-sdk)
- [NPM package](https://www.npmjs.com/package/@wakeuplabs/as-stylus)

### Why This Matters

AssemblyScript and TypeScript share a familiar syntax, lowering the barrier for thousands of developers to build on Stylus. Bringing this to Stylus makes Arbitrum more accessible while preserving the performance and safety of WebAssembly.

We’ll continue sharing progress as we move into the next milestones. Stay up to date by following us on[X (Twitter)](https://twitter.com/wakeuplabs) and[LinkedIn](https://www.linkedin.com/company/wakeuplabs), where we post regular updates, demos, and opportunities to get involved.

---

<div class="post-metadata">

**Author:** ![WakeUpLabs](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.arbitrum.foundation/wakeuplabs/32/12949_2.png) [@WakeUpLabs](https://forum.arbitrum.foundation/u/WakeUpLabs)\
**Post date:** [October 24, 2025, 8:26pm UTC](https://forum.arbitrum.foundation/t/wakeup-labs-update-thread-assemblyscript-integration-for-the-arbitrum-stylus-sdk/29038/7 "2025-10-24T20:26:32Z")

</div>

# Milestones #5 & #6 Completed: Testing, Optimization, and Real Use Cases for AssemblyScript on Stylus

## TL;DR:

We’ve completed Milestones #5 and #6 for the AssemblyScript SDK on Arbitrum Stylus, advancing from performance optimization and testing to functional validation with real use cases. Developers can now test, deploy, and interact with AssemblyScript contracts through an optimized SDK, CLI, and Playground.

### Milestone #5: Testing & Developer Experience

This phase focused on improving performance, maintainability, and developer experience.  
We prepared testing environments, refined syntax and type definitions, and updated the developer playground and documentation for a pre-production release.

- Refactored and optimized the codebase for performance and maintainability.
- Prepared testing environments for advanced use cases and edge cases.
- Updated syntax, type definitions, and developer tooling.
- Released updated documentation and playground reflecting the new syntax.

Deliverables

- [Demo](https://www.youtube.com/watch?v=_kUili8h994): New syntax and testing flow in action.
- Documentation & Playground: Updated resources now available for developers.
- [Integration Tests](https://github.com/wakeuplabs-io/assembly-script-stylus-sdk/tree/main/packages/as-stylus/ __tests__ ): Full video demo showing contracts running end-to-end.

Useful links:

- [GitHub Repository](https://github.com/wakeuplabs-io/assembly-script-stylus-sdk)
- [NPM package](https://www.npmjs.com/package/@wakeuplabs/as-stylus)
- [Developer Documentation](https://as-stylus.wakeuplabs.io/)
- [Developer Playground](https://as-stylus-playground.wakeuplabs.link/)

### Milestone #6: Functional Testing & Real Use Cases

We then moved into functional testing and validation across modules, introducing a fully integrated example app.

- Expanded end-to-end test coverage.
- Executed functional tests for both SDK and CLI.
- Benchmarked performance (AssemblyScript vs Solidity ERC-20).
- Added a real-world Raffle Application demonstrating complete front-end integration.
- Delivered detailed QA and performance reports.

Raffle Application  
A real example demonstrating how developers can deploy and automate AssemblyScript contracts using the SDK and CLI, working as an escrow that sends ETH to the winner.  
👉 [View Contract on Arbitrum Mainnet](https://arbiscan.io/address/0x2f45fa8910b070f94e5b11335aec49d7e945b258)

Deliverables

- [QA & Performance Reports](https://github.com/wakeuplabs-io/assembly-script-stylus-sdk/blob/main/packages/docs/milestone-6/qa.md).
- [Real Examples](https://github.com/wakeuplabs-io/as-stylus-raffle) and full integration demos.
- [Enhanced documentation for developers](https://github.com/wakeuplabs-io/assembly-script-stylus-sdk/blob/main/packages/docs/milestone-6/benchmark.md).

🔗 Useful links:

- [GitHub Repository](https://github.com/wakeuplabs-io/assembly-script-stylus-sdk)
- [NPM package](https://www.npmjs.com/package/@wakeuplabs/as-stylus)
- [Developer Documentation](https://as-stylus.wakeuplabs.io/)
- [Developer Playground](https://as-stylus-playground.wakeuplabs.link/)
- [Raffle Application Repository](https://github.com/wakeuplabs-io/as-stylus-raffle)
- [Performance Benchmark Report](https://github.com/wakeuplabs-io/assembly-script-stylus-sdk/blob/main/packages/docs/milestone-6/benchmark.md)
- [CLI and SDK QA report](https://github.com/wakeuplabs-io/assembly-script-stylus-sdk/blob/main/packages/docs/milestone-6/qa.md)

## What’s next

These milestones mark a crucial step toward a stable beta version of the SDK and CLI, laying the groundwork for developers to build and test smart contracts on Stylus using AssemblyScript.  
Next, we’ll continue refining the toolchain, addressing edge cases, and strengthening robustness for a seamless developer experience.

---

<div class="post-metadata">

**Author:** ![WakeUpLabs](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.arbitrum.foundation/wakeuplabs/32/12949_2.png) [@WakeUpLabs](https://forum.arbitrum.foundation/u/WakeUpLabs)\
**Post date:** [December 5, 2025, 7:26pm UTC](https://forum.arbitrum.foundation/t/wakeup-labs-update-thread-assemblyscript-integration-for-the-arbitrum-stylus-sdk/29038/8 "2025-12-05T19:26:22Z")

</div>

# Milestone #7 Completed: NPM Deployment, Extended Features & Community Engagement

## TL;DR

We’ve successfully completed Milestone #7 for the AssemblyScript SDK on Arbitrum Stylus, deploying our tooling to production (NPM), updating all documentation, and extending functionality based on developer feedback. Developers can now install the SDK and CLI directly from NPM, explore the new documentation, and start building richer ccontracts in the language they already know.

## Overview

This milestone focused on bringing our AssemblyScript SDK and CLI to production readiness and making them widely accessible through NPM and developer documentation.  
We also deepened our engagement with the community through talks and events to promote adoption across the Arbitrum ecosystem.

## Key Achievements

NPM Deployment: All tooling components deployed and validated in live environments.  
Documentation Update: Fully synchronized developer documentation, guides, and API references.  
Community Engagement: Product showcased at Devconnect Buenos Aires (Stylus Awakening and Arbiverse panels), along with outreach to the Spanish-speaking developer community.  
Enhancements Beyond Scope: Integrated developer feedback into multiple improvements that strengthen performance and usability.

## New Features and Improvements

As part of this milestone, we introduced several upgrades that go beyond the original scope:

Integrated Testing Configuration: Added directly to the generate command, enabling full project bootstrapping for faster onboarding.  
Expanded VM Affordances: Exposed msg, block, and contract objects for richer and more ergonomic smart-contract development.  
Numeric Constants Support: Allowing values defined outside the contract, providing a flexible alternative to enums.  
Extended Test Suite: Added well-known patterns like AccessControl, Pausable, and Ownable to strengthen real-world applicability.

These features were driven by developer feedback and internal testing, aligning the SDK and CLI with real development workflows and practical expectations.

## Deliverables

- Production Deployment: SDK, CLI, and related packages published and verified.
- Documentation Update: Updated references, guides, and API documentation.
- NPM Release: Stable versions available for the community.
- Extended Test Suite: Additional patterns included.
- Demo Video: Showcasing the new features and testing flow.
- Community Engagement: Talks and presentations at Devconnect and with Spanish-speaking developers.

## Useful Links

- [GitHub Repository](https://github.com/wakeuplabs-io/assembly-script-stylus-sdk)
- [NPM package](https://www.npmjs.com/package/@wakeuplabs/as-stylus)
- [Developer Documentation](https://as-stylus.wakeuplabs.io/)
- [Developer Playground](https://as-stylus-playground.wakeuplabs.link/)
- [Stylus Builders Panel at Arbiverse](https://x.com/wakeuplabs/status/1991280933329133724?s=20)

**Demo:**

[![](https://canada1.discourse-cdn.com/flex029/uploads/arbitrum1/original/2X/f/ffe31a81413613f52acc6fe82db99b91fac53e76.jpeg "AssemblyScript on Arbitrum Stylus") ](https://www.youtube.com/watch?v=CAWUiFQnthI)

**Developer Community Talk:**

[![](https://canada1.discourse-cdn.com/flex029/uploads/arbitrum1/original/2X/0/03b6f6e5211b3cf0f0839fb8bf4773cb3fc32748.jpeg "Assembly Script on Arbitrum Stylus by WakeUp Labs") ](https://www.youtube.com/watch?v=vFgpafZJrQg)

**Arbitrum Stylus Event (Devconnect week):**

[![](https://canada1.discourse-cdn.com/flex029/uploads/arbitrum1/original/3X/9/4/9424a7f0d094a1a2cd871f5a36a49c3ffc36c9d9.jpeg "Assembly Script on Arbitrum Stylus: Milton Berman") ](https://www.youtube.com/watch?v=Ozo--Kd18GM)

## Next

While this milestone establishes a solid foundation for building smart contracts in AssemblyScript on Stylus, we’re already planning the next phase. Our upcoming work will focus on introducing advanced data structures, improving workflow automation, and enabling richer communication patterns between contracts, continuing to make Stylus development faster, safer, and more accessible for the TypeScript community.

---

<div class="post-metadata">

**Author:** ![WakeUpLabs](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.arbitrum.foundation/wakeuplabs/32/12949_2.png) [@WakeUpLabs](https://forum.arbitrum.foundation/u/WakeUpLabs)\
**Post date:** [February 20, 2026, 9:18pm UTC](https://forum.arbitrum.foundation/t/wakeup-labs-update-thread-assemblyscript-integration-for-the-arbitrum-stylus-sdk/29038/9 "2026-02-20T21:18:46Z")

</div>

# Milestones 8 & 9 Completed: Advanced Data Structures, Production-Grade Testing & Developer Experience Upgrades for AssemblyScript on Stylus

## TL;DR

We’ve successfully completed Milestones #8 and #9 of the AssemblyScript SDK for Arbitrum Stylus.

These milestones significantly expand the SDK’s data modeling capabilities through advanced mapping support, introduce stronger guarantees via comprehensive automated testing, improve documentation clarity, and enhance the Developer Playground.

Together, they move the SDK from feature expansion to production maturity, enabling developers to build more expressive, reliable, and scalable smart contracts in AssemblyScript on Stylus.

## Overview

With Milestone #7, we brought the SDK to production via NPM and expanded real-world usability.

Milestones #8 and #9 focused on deepening the core technical capabilities while reinforcing reliability and developer experience.

This phase had two strategic goals:

1. Increase expressive power, enabling developers to model complex onchain state patterns.
2. Increase robustness and clarity, ensuring those features are well-tested, documented, and easy to adopt.

The result is a more mature SDK aligned with real-world development needs across governance systems, registries, permission frameworks, and DAO-style architectures.

* * *

## Milestone #8: Advanced Mapping Support & Stability Improvements

Mappings are foundational to smart contract architecture. Expanding their flexibility unlocks more sophisticated contract logic.

During Milestone #8, we significantly enhanced the SDK’s mapping system to support broader type combinations, dynamic data handling, and richer state modeling.

#### Extended Mapping Capabilities

We expanded support for mappings to handle multiple combinations of supported basic types as both keys and values. This allows developers to implement more expressive structures such as: registries, voting, DAO-like patterns.

#### Dynamic Type Handling

Supporting dynamic types (such as String) inside mappings required careful implementation, including: Runtime allocation, hashing, Comparison, and Storage layout.

This ensures predictable behavior across memory and storage contexts, which is critical for production-grade contracts.

#### Beta Struct Support in Mappings

We introduced beta support for structs as mapping values (excluding string fields), enabling richer state representations while maintaining layout predictability.

#### Stability Improvements & QA

Alongside feature expansion, we implemented continuous bug fixes and stability improvements across the SDK and CLI based on:

- Internal regression testing
- Alpha user experimentation
- Early community feedback

The result is a more stable and deterministic development environment.

### Community Contribution Integration

A key milestone during this phase was merging our first external community contribution.

We reviewed and integrated a PR by @Alstomaldev, introducing automated local testing infrastructure:

- Spins up a Nitro dev node via Docker
- Runs the complete test suite
- Tears it down automatically

This dramatically improves local reproducibility and lowers friction for developers.

PR:

> <https://github.com/wakeuplabs-io/assembly-script-stylus-sdk/pull/120>
>
> \# Add Local Testing Infrastructure with Nitro Dev Node
> 
> \## Problem Statement
> …
> Previously, testing contracts required deploying to a testnet, which introduced several challenges:
> \- \*\*Slow feedback loops\*\*: Each test run required waiting for testnet transactions to confirm
> \- \*\*Network dependency\*\*: Testing was impossible without internet connection or when testnet was down
> \- \*\*Limited test ETH\*\*: Required faucet access and managing testnet funds
> \- \*\*No isolation\*\*: Tests could interfere with each other on shared testnet infrastructure
> \- \*\*CI/CD complexity\*\*: Running tests in CI required testnet credentials and reliable network access
> 
> \## Solution Overview
> 
> This PR introduces a local testing infrastructure using Arbitrum Nitro node in development mode. Tests now run against a local Nitro node that automatically starts, executes tests, and stops - all in Docker.
> 
> \## Key Features
> 
> \### 1. \*\*Automated Local Node Management\*\*
> \- \`LocalNodeManager\` class handles Docker-based Nitro node lifecycle
> \- Automatic container startup with health checks and timeout handling
> \- Smart cleanup: stops containers in normal mode, keeps them running in watch mode
> \- Configurable ports, chain IDs, and Docker images
> \- Comprehensive error messages with debugging hints
> 
> \### 2. \*\*One-Command Test Setup: \`setupLocal()\`\*\*
> Complete test environment setup in a single function call:
> \`\`\`typescript
> const { contract, walletClient, testWallets, cleanup } = await setupLocal({
> contractPath: "./contracts/counter.ts",
> abiPath: "./artifacts/abi/counter-abi.json",
> constructorName: "constructor",
> root: \_\_dirname,
> testAccounts: \[TESTS\_ACCOUNTS\_NAME.Alice, TESTS\_ACCOUNTS\_NAME.Bob\],
> });
> \`\`\`
> 
> \*\*What it does automatically:\*\*
> \- Starts local Nitro node (or reuses existing in watch mode)
> \- Compiles the contract
> \- Deploys to local node
> \- Executes constructor
> \- Funds additional test accounts
> \- Returns ready-to-use contract instance and wallet clients
> \- Provides cleanup function to stop the node
> 
> \### 3. \*\*Multi-Account Testing Support\*\*
> Pre-funded test accounts for comprehensive testing scenarios:
> \- \`TESTS\_ACCOUNTS\_NAME\` enum with type-safe account references
> \- \`Deployer\`: Primary account with highest ETH balance
> \- \`Alice\`, \`Bob\`, \`Charlie\`: Additional test accounts for multi-user scenarios
> \- Automatic funding of test accounts from deployer
> \- Full TypeScript type safety with autocomplete support
> 
> \*\*Example:\*\*
> \`\`\`typescript
> testEnv = await setupLocal({
> // ... other options
> testAccounts: \[TESTS\_ACCOUNTS\_NAME.Alice, TESTS\_ACCOUNTS\_NAME.Bob\],
> });
> 
> const \[aliceWallet, bobWallet\] = testEnv.testWallets;
> await contract.write(aliceWallet, "transfer", \[recipient, amount\]);
> await contract.write(bobWallet, "approve", \[spender, amount\]);
> \`\`\`
> 
> \### 4. \*\*Enhanced Developer Experience\*\*
> 
> \*\*Watch Mode Support:\*\*
> \- Detects Jest watch mode automatically
> \- Keeps container running between test runs
> \- Restarts container instead of stop/start for faster iterations
> 
> \*\*Verbose Logging:\*\*
> \- Two-level verbosity: SDK logs (\`verbose\`) and Docker/Nitro logs (\`dockerVerbose\`)
> \- Progress indicators during long operations (Docker image pull, node startup)
> \- Clear error messages with troubleshooting commands
> 
> \*\*Smart Timeout Handling:\*\*
> \- 3-minute timeout for node startup (handles first-time Docker image download)
> \- Active container health monitoring every 10 seconds
> \- Early failure detection with specific error messages
> 
> \## Technical Implementation
> 
> \### Files Added
> \- \`local-node-manager.ts\`: Docker container lifecycle management
> \- \`setup-local.ts\`: High-level test setup orchestration
> \- \`test-accounts.ts\`: Pre-funded test account definitions with enum
> \- E2E tests for local node management and setup
> 
> \### Files Modified
> \- \`index.ts\`: Exported new testing utilities
> 
> \### Architecture Decisions
> 
> \*\*Why Nitro Node in Dev Mode:\*\*
> \- Full Stylus VM support (required for Stylus contracts)
> \- Real Arbitrum runtime behavior
> \- No mock limitations - tests against actual node implementation
> 
> \*\*Why Docker:\*\*
> \- Consistent environment across development and CI
> \- Easy cleanup and isolation
> \- No manual node installation required
> \- Works on all platforms (macOS, Linux, Windows)
> 
> \### Account Impersonation Note
> Unlike Hardhat's \`hardhat\_impersonateAccount\` or Foundry's \`vm.prank()\`, true account impersonation is not available on Nitro. Instead, we provide:
> \- Multiple pre-funded test accounts with known private keys
> \- Type-safe enum for account management
> \- Automatic funding of test accounts
> 
> \## Usage Examples
> 
> \### Basic Test
> \`\`\`typescript
> import { setupLocal, SetupLocalResult } from "@wakeuplabs/as-stylus";
> 
> describe("Counter Tests", () =\> {
> let testEnv: SetupLocalResult;
> 
> beforeAll(async () =\> {
> testEnv = await setupLocal({
> contractPath: "./contracts/counter.ts",
> abiPath: "./artifacts/abi/counter-abi.json",
> constructorName: "counter\_constructor",
> root: \_\_dirname,
> });
> }, 240000);
> 
> afterAll(async () =\> {
> await testEnv.cleanup();
> });
> 
> it("should increment counter", async () =\> {
> await testEnv.contract.write(testEnv.walletClient, "increment", \[\]);
> const count = await testEnv.contract.read("get", \[\]);
> expect(count).toBe(1n);
> });
> });
> \`\`\`
> 
> \### Multi-Account Test
> \`\`\`typescript
> import { setupLocal, TESTS\_ACCOUNTS\_NAME, NITRO\_TEST\_ACCOUNTS } from "@wakeuplabs/as-stylus";
> 
> beforeAll(async () =\> {
> testEnv = await setupLocal({
> // ... config
> testAccounts: \[TESTS\_ACCOUNTS\_NAME.Alice, TESTS\_ACCOUNTS\_NAME.Bob\],
> });
> });
> 
> it("should allow multiple accounts to interact", async () =\> {
> const \[aliceWallet, bobWallet\] = testEnv.testWallets;
> 
> // Transfer ownership to Alice
> await testEnv.contract.write(
> testEnv.walletClient,
> "transferOwnership",
> \[NITRO\_TEST\_ACCOUNTS.alice.address\]
> );
> 
> // Alice can now call owner-only functions
> await testEnv.contract.write(aliceWallet, "restrictedFunction", \[\]);
> 
> // Bob cannot
> await expect(
> testEnv.contract.write(bobWallet, "restrictedFunction", \[\])
> ).rejects.toThrow();
> });
> \`\`\`
> 
> \## Breaking Changes
> 
> None. This is purely additive functionality. Existing testnet-based workflows continue to work unchanged.

### Demonstration: Voting App

To validate the expanded mapping system, we implemented a full Voting App demonstrating:

- Advanced mapping combinations
- Struct-based state modeling
- Governance-style logic patterns
- Realistic DAO-like contract flows

This demo confirms that the SDK now supports more complex and production-aligned use cases beyond simple ERC-style contracts.

[![](https://canada1.discourse-cdn.com/flex029/uploads/arbitrum1/original/3X/e/9/e925ddba07cd8b81ca69f7a74d05408410f5593d.jpeg "DEMO: Voting App on Arbitrum Stylus by WakeUp Labs") ](https://www.youtube.com/watch?v=SlOCrn88Dg0)

* * *

## Milestone #9: Comprehensive Testing & Documentation Enhancement

Following feature expansion, Milestone #9 focused on quality assurance and developer experience, ensuring the SDK’s advanced features are reliable, understandable, and easy to adopt.

### Full Automated Test Coverage

We implemented a comprehensive end-to-end test suite covering all mapping type combinations, edge cases, struct-based mapping values, memory vs storage behavior, and runtime consistency checks.

### Documentation Expansion & Clarity

We expanded the documentation to reduce ambiguity and improve onboarding.

Enhancements include detailed explanations of mapping behavior, storage layout guarantees, type compatibility matrix, practical usage examples, and structured walkthroughs for advanced patterns,

We reorganized documentation sections to improve discoverability and added example-driven explanations to reduce the learning curve for new developers.

### Developer Playground Upgrade

We also expanded the Developer Playground to execute any smart contract via its ABI, improve interactive experimentation, and reduce friction for prototyping.

This allows developers to test advanced contracts directly from the browser, without full local setup, accelerating iteration cycles.

### Ecosystem Impact

These milestones represent a transition from feature development to ecosystem maturity.

With advanced data modeling, robust testing infrastructure, improved documentation, and better tooling, the AssemblyScript SDK for Stylus is now more expressive, more stable, more production-ready and more accessible to the TypeScript community.

By reducing friction and increasing reliability, we are lowering the barrier for TypeScript developers to build high-performance smart contracts on Arbitrum Stylus.

This continues our commitment to expanding Stylus adoption across broader developer audiences.

* * *

#### Useful Links

[GitHub Repository](https://github.com/wakeuplabs-io/assembly-script-stylus-sdk)  
[NPM package](https://www.npmjs.com/package/@wakeuplabs/as-stylus)  
[Developer Documentation](https://as-stylus.wakeuplabs.io/)  
[Developer Playground](https://as-stylus-playground.wakeuplabs.link/)  
[Demo video playground](https://www.loom.com/share/6a2dc3eab2434ad684bd7643296b9b3f)  
[Demo video contract](https://www.loom.com/share/d7912ba230e9428896030ccb6d607b98)  
[Demo video app](https://www.loom.com/share/dba39c65d1b94eab8c4061564f3dfd4a)  
[Demo github](https://github.com/wakeuplabs-io/as-stylus-demo-voting)  
[Developer Community Talk](https://www.youtube.com/watch?v=vFgpafZJrQg)

Devconnect presentations:  
[Stylus Awakening event](https://x.com/wakeuplabs/status/1991616597308399950?s=20)  
[Stylus Builders Panel at Arbiverse](https://x.com/wakeuplabs/status/1991280933329133724?s=20)
