algorand-ts-migration

Migrate smart contracts from TEALScript or Algorand TypeScript Beta to Algorand TypeScript 1.0.

Updated Apr 6, 2026
One-click install
npx skills add https://github.com/Rudhrakoushik10/RootNode --skill algorand-ts-migration-rudhrakoushik10
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: algorand-ts-migration
Source: https://github.com/Rudhrakoushik10/RootNode/tree/main/projects/.opencode/skill/algorand-ts-migration
Command: npx skills add https://github.com/Rudhrakoushik10/RootNode --skill algorand-ts-migration-rudhrakoushik10

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Algorand smart contract code written in TEALScript or the Algorand TypeScript Beta uses outdated APIs, types, and syntax that are incompatible with the Algorand TypeScript 1.0 release, requiring systematic manual conversion across many breaking changes. ## Core Features & Use Cases - Source Language Detection: Identifies whether existing code is TEALScript or Algorand TypeScript Beta using import sources, type syntax, and API patterns. - Guided Migration Checklists: Provides step-by-step transformation guides covering 13 breaking changes for Beta code and 13 migration patterns for TEALScript code, each with before/after examples. - Type and API Mapping: Supplies lookup tables for renamed types (e.g., MutableArray to ReferenceArray, BoxRef to Box<bytes>) and functions (e.g., copy() to clone(), sendMethodCall to arc4.abiCall). - Use Case: A developer has a TEALScript contract using EventLogger and sendMethodCall and needs it converted to Algorand TypeScript 1.0 with emit() and arc4.abiCall, including updated imports and explicit type annotations. ## Quick Start Migrate my TEALScript smart contract in the contracts folder to Algorand TypeScript 1.0.

Frequently Asked Questions about algorand-ts-migration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate TEALScript to Algorand TypeScript 1.0?

Follow the TEALScript migration checklist: add explicit imports from @algorandfoundation/algorand-typescript, replace EventLogger with emit(), refactor inner transactions to the itxn namespace, replace sendMethodCall with arc4.abiCall, and add explicit uint64 type annotations to arithmetic operations.

How to upgrade Algorand TypeScript Beta code to version 1.0?

Work through the 13 breaking changes: rename MutableArray to ReferenceArray, replace .copy() with clone(), remove N and NxM suffixes from ARC4 numeric types, update gtxn/itxn imports, replace BoxRef with Box<bytes>, and rename test files to .algo.(spec|test).ts.

What replaced sendMethodCall in Algorand TypeScript 1.0?

sendMethodCall is replaced by arc4.abiCall, which accepts either a method property referencing the contract method or a type argument like typeof HelloStubbed.prototype.greet. The result is accessed via .returnValue instead of directly.

Does Algorand TypeScript 1.0 support mutable arrays and objects?

Yes, native arrays and object literals are mutable by default in 1.0, unlike the Beta where they were immutable. Use readonly modifiers or as const assertions if immutability is required.

Why does my migrated contract fail with BoxRef errors?

BoxRef was removed in 1.0 and replaced with Box<bytes>. Update box creation to Box<bytes>({ key }), assign values via box.value instead of box.put(), and use .length instead of .size on extracted byte slices.