Aptos Intros: An intro to building in Move/Aptos

Posted on Mar 18, 2022Read on Mirror.xyz

Why Aptos? Resources, that's why.

When a startup just a few months old raises a $200m round from the likes of a16z, Tiger, Multicoin, et al - that’s something worth paying attention to. Launching a brand new L1 in the middle of the L1/L2 battle for crypto dominance is a risky bet to say the least. Of course, Aptos’ technology isn’t brand new, but is launching Facebook’s abandoned project much better than a completely de novo blockchain? I jumped into the Aptos dev community with a healthy dose of skepticism and my (too often surfacing) “you kids get off my lawn!” attitude.

I want to be careful not to chase shiny things, but I was quickly won over by the Aptos concept of Resources. A “resource” can be anything you want it to be. A resource can be created, owned and transferred to a different owner. No other chain comes close to the composability and extensibility this capability provides (to be clear - this will not a be a “beat up other L1/L2” kind of blog). A resource can be created just by implementing a struct (in Move - the Rust-ish language of Aptos):

struct ConcertTicket has key {
		artist: ASCII::String,
		date_timestamp: u64,
		seat: ASCII:String,
		arrived: bool,
	}

It’s a simple as that. The data structure itself is likely over-simplified for this example, but you now have a “concert ticket” resource you can buy/sell/transfer/etc - all governed by the Move module the resource was created in. Honestly, it just does not get any easier. If you have built web3 applications elsewhere - you will quickly realize the incredible boost to development speed this approach enables.

Next up, a quick tutorial on creating a resource and utilizing an escrow mechanism to facilitate a sale.