Guidelines
- Introduction
- Installation
- Quick Start
Guides
- Introductions
- Build local test node
- Smart Contract - ABI Files
- Smart Contract——JS Contract
- Deploy Contracts
- Test Contract
- Develop DApp Client
Smart Contracts
- Contract Introduction
- ABI File
- Database
- Account Authority
- Call In-contract
- Notification
System Contracts
- Resources
- Account
- Permission
Token Contracts
- Transfer
- Token
- Token Exchange
- Contract Sub-Wallet
Node Guide
- Node Introduction
- Add to nodes network
- Node Data Persistence
Access Guide
- FO 接入安全指南
Token Exchange
If you are a normal user instead of a developer, you can use the FO Wallet to exchange for FO.Download FO wallet. First select the source smart token that you want to exchange, then enter the exchange amount. After that select the target token and click exchange. Wait for just a moment and the exchange will be successful.
Exchange
The whole exchange process is carried out on the FIBOS main net, so the private key and account information of FIBOS main web is used while executing.
1 | var FIBOS = require('fibos.js'); |
Calling Method:
1 | let ctx = fibos_client.contractSync('eosio.token'); |
Method Statement:
Use exchangeSync()
method to exchange token in FIBOS using Bancor
Parameter Statement:
Parameters | Annotation |
---|---|
owner | Exchanger’s account |
quantity | the amount of token to be exchanged |
tosymbol | target exchanging token type |
memo | exchange memo |
If a user fibostest123
issued a smart token named VAYNE
,and user fibostest321
issued a smart token named HASAKI
. Then how to exchange some HASAKI
if the user fibostest123
wants to use VAYNE
? The answer is to use the exchangeSync
API.
1 | //initialize the FIBOS client |
If you want to exchange to EOS
token in FIBOS
. You only need to change 0.0000 HASAKI@fibostst321
to 0.0000 EOS@eosio
.
EOS token exchange to FO token
Initiate exchanging EOS to FO
1 | let ctx = fibos_client.contractSync('eosio.token'); |
Check the FO token that already been exchanged
1 | var rs = fibos_client.getTableRowsSync(true, 'eosio.token', 'your FIBOS account name', 'accounts'); |
FO token converting to EOS token
initiate FO exchange to EOS
1 | let ctx = fibos_client.contractSync('eosio.token'); |
Check the EOS token that already been converted
1 | var rs = fibos_client.getTableRowsSync(true, 'eosio.token', 'Your FIBOS account name', 'accounts'); |
Wallet One-click exchange
Download fo wallet, select the source smart token you want to exchange, then enter the amount, after that select the target token you want to exchange, click exchange, wait just a moment for the exchange to be successful.