Created
August 30, 2018 01:57
-
-
Save xiaojay/7de985bd5725c404cce2dd839afb54c8 to your computer and use it in GitHub Desktop.
从fibos转eos到eos主网代码
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
兄弟,报错了
•100% ➜ fibos foToEos.js
undefined
{"code":500,"message":"Internal Service Error","error":{"code":3050003,"name":"eosio_assert_message_exception","what":"eosio_assert_message assertion failure","details":[]}}