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
DeclareTx
: Declare a wallet in the chain.AccountMigrateTx
: Migrate a wallet from one address to another.DelegateTx
: Delegate certain rights from one account to another.
Asset
CreateAssetTx
: Create a new asset.UpdateAssetTx
: Update and existing asset.ConsumeAssetTx
: Consume an asset.CreateAssetFactoryTx
: Create a factory that could generate the similar assets, like a vending machine.AcquireAssetTx
: Pay to an asset factory to get the 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: