aptos
Aptos Move L1 Development
Aptos is a Layer 1 blockchain built on Move, the language originally developed for Meta's Diem project. It achieves high throughput via Block-STM, a parallel execution engine that processes transactions optimistically and re-executes on conflicts. Smart contracts are called modules, and data is stored as resources at account addresses in a global storage model.
What You Probably Got Wrong
AI agents trained on Sui Move or Solidity make critical errors when generating Aptos Move code. Fix these first.
-
Aptos Move uses global storage, NOT Sui's object model — Resources are stored at addresses using
move_to,move_from,borrow_global, andborrow_global_mut. There is noobject::ObjectIDorsui::object::UID. When you want to store data, youmove_to<T>(signer, resource)to place it at the signer's address. To read it, youborrow_global<T>(address). -
Resource accounts are NOT regular accounts — A resource account is a special account with no private key, controlled by its creating module. You create one with
account::create_resource_account(origin, seed). The module publishes to the resource account's address. This is how protocols deploy immutable, admin-less contracts. -
Token V1 is deprecated — use Token V2 (Digital Assets) — The
aptos_tokenmodule (V1) is legacy. Useaptos_token_objects(V2), which uses the Move Object model. V2 tokens are stored as objects at their own addresses, not in a creator's TokenStore. Collections and tokens are first-class objects. -
@aptos-labs/ts-sdkreplaces the oldaptospackage — The npm packageaptosis deprecated. Use@aptos-labs/ts-sdk. The entry point isnew Aptos(new AptosConfig({ network: Network.MAINNET })). Do not import fromaptos. -
Coin standard is NOT ERC-20 — Aptos uses
aptos_framework::coinwith generics. A coin type isCoin<CoinType>whereCoinTypeis a phantom type parameter defined by the deploying module. There is no approval/allowance pattern — coins are moved directly. -
signeris notmsg.sender— In Aptos Move, thesigneris passed as a function parameter. A function must explicitly accept&signerto access the caller's address and perform operations on their account. Usesigner::address_of(account)to get the address.