Getting Started
The page describes the steps for protocols to integrate with Ferum.
This page hasn't been updated yet and might be out of date.
Ferum is currently deployed on testnet to 0x09c94d95f00a30b11aa18052c0276ff890d6ae754d5214cc85c714fa5b7c4133
High-Level Steps
First, you need to get the latest Ferum module address from the Ferum Contract. This will be used to call entry functions and reference all test coins.
Create an account, fund it with Aptos coins through the faucet, and mint some test USDF coins for testing purposes — see Creating Your First Order to get started.
Decide if you want to integrate with Ferum through a Smart Contract (i.e. Move Module) or through the Aptos SDK (i.e. TypeScript).
Public Functions are useful if integrating through Move Modules
Public Entry Functions are useful if utilizing Aptos SDK or CLIs.
Optionally, to create a new market, talk to the Ferum team. They will need to manually call
init_market_entry
to allow trading brand-new coin pairs. Ferum will allow permissionless market creation soon.Call add_order_entry to place your orders.
In case you want to add additional, custom metadata to your order, pass in clientOrderID.
To get the status of a particular order or market state, use the Ferum Indexer.
Trading fees will follow the schedule outlined in Fees.
Integrating Through Smart Contract
To integrate Ferum into your Aptos contract, you will need to include Ferum as a move dependency to your Move.toml
file like below:
Move caches modules so you might run into errors if the upstream module is updated but the cache version is stale. To fix this run aptos move clean
.
Integrating Through Aptos SDK
Ferum will release an SDK in many popular languages as a part of Milestone Beta. In the meantime, the Ferum contract can be called through Aptos SDKs. An example Ferum contract call using the TypeScript SDK is shown below (sdk version = 1.3.13
):
Last updated