Jump to content
FIBOS社区
hahah123

如何将侧链的eos再转回主链eos?

Recommended Posts

用户自行进行EOS的跨链转账至FIBOS,然后在FIBOS上可以将EOS兑换成为FO

汇率是基于Bancor的

通过合约执行 fo和eos之间兑换都是无阻碍的

Share this post


Link to post
Share on other sites
51 分钟前 , 大于 说:

用户自行进行EOS的跨链转账至FIBOS,然后在FIBOS上可以将EOS兑换成为FO

汇率是基于Bancor的

通过合约执行 fo和eos之间兑换都是无阻碍的

这个我明白,疑问的点是侧链的eos和主链的eos,如何从侧链转回主链。还是说是可以直接从fo转换到主链的eos?

Share this post


Link to post
Share on other sites
50 分钟前 , 我叫李操 说:

EOS与FIBOS两条链的互转 eos没有手续费,亲测:classic_cool::classic_cool::classic_cool::classic_cool::classic_cool:

现在没搞懂的是怎么从fibos转eos

Share this post


Link to post
Share on other sites
刚才 , eebluesky 说:

把transfer的参数互换下就可以吧,没有测试过。

之前接收帐号 fiboscouncil 改到前面吗, 不行的。这里并没有这个帐号的私钥,感觉应该是要走合约类似退款交易,但怎么就没有一个技术人员来解答一下。

Share this post


Link to post
Share on other sites

EOS 和 FIBOS 跨链转账逻辑:

1. 从 EOS 账号跨链转账到FIBOS账号,在 EOS 上转账给  fiboscouncil , memo填写 FIBOS 账号。

      EOS 账号  ----->  EOS(fiboscouncil)           ------       FIBOS(fiboscouncil)     -----> FIBOS 账号

 

2. 从 FIBOS 账号跨链转账到 EOS账号,在 FIBOS 上转账给 fiboscouncil, memo填写 EOS 账号。

      FIBOS 账号  ----->  FIBOS(fiboscouncil)     ------     EOS(fiboscouncil)          -----> EOS 账号

 

Tips:

1. 建议大家在初次操作时使用小额 EOS, 以确认 memo 填写的账号正确。

2. EOS、FIBOS上的 fiboscouncil 账号如果发现 memo 账号错误,会把 EOS 退回到 from 账号。

3. 不建议从交易所直接转账到 FIBOS 账号,如果memo账号错误,退回的 from 地址可能是交易所。

Share this post


Link to post
Share on other sites

顺手写了个提取eos到主网的脚本 (gist 地址 https://gist.github.com/xiaojay/7de985bd5725c404cce2dd839afb54c8 ),分享下 :)

保存下面代码到withdraw.js; 然后运行 fibos withdraw.js

 

var FIBOS = require("fibos.js");

var config = {

chainId: "6aa7bd33b6b45192465afa3553dedb531acaaff8928cf64b70bd4c5e49b7ec6a",

priKey: "你的fibos账号私钥",

httpEndpoint: "http://sl-rpc.fibos.io:8870",

verbose: false,

}

var fibos_client = FIBOS({

chainId: config.chainId,

keyProvider: config.priKey,

httpEndpoint: config.httpEndpoint,

verbose: false,

logger: {

log: null,

error: null

}

})

let eosaccount = "" // 你的 EOS 账户名

let fibosaccount = "" // 你的 fibos 账户名

let memo = eosaccount;

let value = "0.2000" + " EOS"; //兑换 EOS 数量

let ctx = fibos_client.contractSync("eosio.token");

let result = ctx.transferSync(fibosaccount, "fiboscouncil", value, memo);

console.log(result);

Share this post


Link to post
Share on other sites
4 小时前 , fibosironman 说:

顺手写了个提取eos到主网的脚本 (gist 地址 https://gist.github.com/xiaojay/7de985bd5725c404cce2dd839afb54c8 ),分享下 :)

保存下面代码到withdraw.js; 然后运行 fibos withdraw.js

 

var FIBOS = require("fibos.js");

var config = {

chainId: "6aa7bd33b6b45192465afa3553dedb531acaaff8928cf64b70bd4c5e49b7ec6a",

priKey: "你的fibos账号私钥",

httpEndpoint: "http://sl-rpc.fibos.io:8870",

verbose: false,

}

var fibos_client = FIBOS({

chainId: config.chainId,

keyProvider: config.priKey,

httpEndpoint: config.httpEndpoint,

verbose: false,

logger: {

log: null,

error: null

}

})

let eosaccount = "" // 你的 EOS 账户名

let fibosaccount = "" // 你的 fibos 账户名

let memo = eosaccount;

let value = "0.2000" + " EOS"; //兑换 EOS 数量

let ctx = fibos_client.contractSync("eosio.token");

let result = ctx.transferSync(fibosaccount, "fiboscouncil", value, memo);

console.log(result);

 

报错

undefined


{"code":500,"message":"Internal Service Error","error":{"code":3050003,"name":"eosio_assert_message_exception","what":"eosio_assert_message assertion failure","details":[]}}

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×