Overview

In Forge, all activities happen in the form of a Transaction. For example, if Alice wants to transfer money to Bob, Alice creates and signs a TransferTx which specifies Bob's account address, and the amount of money Alice wants to send.

Account

Asset

Trade

  • TransferTx: Send tokens or/and assets from one account to the other.
  • ExchangeTx: Exchange tokens/assets with other's tokens/assets.

Atomic Swap

Atomic swap is a way to trade across different chains. it consists of multiple transactions:

  • SetUpSwapTx: Creates a swap state that temporarily hold the assets and token to swap.
  • RetrieveSwapTx: Retrieves the token and assets for the receiver of the swap.
  • RevokeSwapTx: Revokes the swap for the sender of the swap.

More Details about the workflow of atomic-swap can be found here, about how to do atomic-swap in your code or application:

More Advanced Topics

How to write a smart contract?