Skip to content

Build the Future of Web3 on Aptos

Everything you need to build the best-in-class Web3 developer experience.

Craft safe and high-performance smart contracts with Move

Get started with these Move examples

example.move
module 0xCAFE::BasicCoin {
  // Only included in compilation for testing. Similar to #[cfg(testing)]
  // in Rust. Imports the `Signer` module from the MoveStdlib package.
  #[test_only]
  use std::signer;

  struct Coin has key {
      value: u64,
  }

  public fun mint(account: signer, value: u64) {
      move_to(&account, Coin { value })
  }

  // Declare a unit test. It takes a signer called `account` with an
  // address value of `0xC0FFEE`.
  #[test(account = @0xC0FFEE)]
  fun test_mint_10(account: signer) acquires Coin {
      let addr = signer::address_of(&account);
      mint(account, 10);
      // Make sure there is a `Coin` resource under `addr` with a value of `10`.
      // We can access this resource and its value since we are in the
      // same module that defined the `Coin` resource.
      assert!(borrow_global<Coin>(addr).value == 10, 0);
  }
}

Coins

Simple, type-safe, and fungible assets

Objects

Composable containers for resources

Fungible Assets

Highly expressive, fungible, digital assets

Aptos tooling makes web3 development easier than ever

At Aptos, developers come first

Developer Discussions

Receive timely responses to your burning questions, from any timezone.

Join

Office Hours

Enjoy dedicated live support from Aptos engineers.

Sign Up

Grants

Apply for grants from the Aptos Foundation to get your project moving.

Apply

Discover blockchain features on Aptos