跨链元空间接口
导入公链资产状态查询在线调用
POST
chain_dexSwap
(导入公链资产状态查询)
参数
Op: Import 导入资产查询,Export 导出资产查询
示例代码
{
"jsonrpc": "3.0",
"method": "chain_dexSwap",
"params": [
"opcode=Assets&subcode=Show&op=Import",
"encryp=none"
],
"id": "aa80aa0c6bb0c7d81ac7e5b3"
}{
"jsonrpc": "3.0",
"id": "7b66498181f29306a67c9c48",
"result": {
"ret": "0",
"err": "",
"content": {
"chain_symbol": "ETH",
//导入eth "coin_symbol": "ETH",
//导入平台币 "coin_name": "ethereum",
"coin_address": "",
//平台币合约地址为空 "amount": 819,
//导入数量 "local_address": "0xcfcb6f2c878e7613a76d304fd2043a5733308387",
//本地eth地址 "robot_address": "0x0037b8c3fb4a51f169790172aeda81073b0d315a",
//voidchain 以太坊机器人账号地址(唯一) "remote_rpc": "https://holesky.gateway.tenderly.co",
//rpc eth "tc_address": "0x60c63b7c85d26538e708ab53c93c2ecbbd8a931e",
//voidchain 用户地址 "tcrobot_address": "0xbbb74f97ebf42e11ec94b62cfa93678b197fb78e",
//voidChain 机器人账号地址(唯一) "txhash_local": "0xf004d67b86307f38fa59f134160fa875859bca657800a03497c415af235b5bfb",
//eth 交易HSAH "txhash_tc": "",
//voidChain 交易HSAH "status": 102,
"status_detail": "2 blocks confirmed",
//eth 交易已有2个确认 "active_time": 0,
"process": false
}
} Status: Import_chain_robot = uint(100) //chain asset to chain robot stage Import_chain_End = uint(106) //cross chain successful Import_MAP_TC = uint(200) // chain robot mapping voidChain stage Import_MAP_GETHASH = uint(201) // voidChain map stage Import_Map_End = uint(203) // map end if fail return to 106 Import_scucessful = uint(999) //successful Import_fail = uint(1000) //fail