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 接入安全指南
Transfer
In-chain Transfer
the transfer target account must exists in FIBOS. Also the maximum amount to transfer should not be larger than your balance, the precision should equal to the token precision.
extransfer
method and parameters:
parameter | note |
---|---|
from | token transferor |
to | token recipient |
quantity | token amount |
meno | memo |
1 | //Initialize fibos client |
Cross-chain Transfer
Important note:In order to prevent cross-chain transfer failure:
- Please do not transfer directly through exchange accounts (it is recommended to use EOS wallet to transfer). When transferring through exchange accounts, if the memo is wrongly filled in and the transfer is made, the asset will be lost and cannot be recovered!
- Please confirm again and again whether the memo is filled in correctly (please fill in the memo with “your successfully registered account name on the main net of FIBOS”). If the memo is filled in incorrectly, the asset may be lost:
- If the memo account you filled in does not exist and the asset is lost, the system will check it and transfer the asset back to your payment account.
- If the memo you filled in is wrong, but it happens to be someone else’s FIBOS account, the assets cannot be transferred back to your account.
Cross-chain transfer from EOS to FIBOS
Use the account of the EOS main net to initiate transfer to the EOS account (fiboscouncil), and fill in the name of the registered account of the FIBOS main network in the memo to complete a cross-chain transfer.
Initiate transfer on EOS main web
EOS main web RPC address(recommended):http://api-mainnet.starteos.io
1 | var FIBOS = require('fibos.js'); |
Example:
A real operation example, after EOS MainNet, EOS RPC Address, EOS private key are configured, an EOS client is initiated, by calling transferSync
method pass with 4 parameters:
parameter | note |
---|---|
eosaccount | transferor |
fiboscouncil | transferee |
value | Amount: 1.0000 EOS |
memo | memo |
Check transfer information on EOS main web
After initializing a cross-chain transfer on FIBOS main web. You need to wait for 300 or so safe block time, about 2 min, the transfer information can then be checked on EOS main net
Check via FIBOS client,using the FIBOS main net chainID and RPC interface address.
1 | var FIBOS = require('fibos.js'); |
Example:
Configuration of main FIBOS chainId Http service address, then a FIBOS client is initialized, call getTableRowsSync
method to query asset information of account.
Cross-chain transfer from FIBOS to EOS
Use the account of the main net of FIBOS to initiate transfer to the EOS account (fiboscouncil), and fill in the name of the registered account of the main network of EOS in the memo to complete a cross-chain transfer.
Initiate transfer operation on FIBOS main web
Calling method:
1 | let ctx = client.contractSync('eosio.token'); |
method description:
Eosio.token contract is invoked using the fibos.js client to initiate a transfer operation
Parameters
parameters | Note |
---|---|
eosaccount | transferor |
fiboscouncil | transferee |
value | amount:1.0000 EOS |
memo | Note:EOS account you have registered |
1 | var FIBOS = require('fibos.js'); |
Check transfer info on EOS main web
After initializing a cross-chain transfer on FIBOS main web, You need to wait for 300 or so safe block time, about 2 min, then the transfer information can be checked on EOS main net.
Check via EOS client,EOS main web chainID and RPC interface address is used.
1 | var FIBOS = require('fibos.js'); |
Example:
After configuring EOS main web chainId and RPC server address,then an EOS client is initialized. Call getTableRowsSync
method to check the assets information of the account.