DolphinSwap做市接入
本文档用于介绍Dolphin Swap的合约表结构,方便第三方开发者接入。
最后更新于
本文档用于介绍Dolphin Swap的合约表结构,方便第三方开发者接入。
最后更新于
curl -X POST -d '{"code":"dolphinsswap","scope":"dolphinsswap","table":"pools","json":true,"limit":10}' -H 'Content-Type: application/json' http://eos.greymass.com/v1/chain/get_table_rowssymbol_code id2lpcode(uint64_t id) {
std::string code = "DOP";
std::string s;
while (id > 0) {
uint32_t rem = id % 26;
if (rem == 0) rem = 26;
s += ('A' + rem - 1);
id = (id - rem) / 26;
}
std::reverse(s.begin(), s.end());
code += s;
return symbol_code(code.c_str());
}curl -X POST -d '{"code":"dolphinsswap","scope":"DOPA","table":"lptokens","json":true,"limit":10}' -H 'Content-Type: application/json' http://eos.greymass.com/v1/chain/get_table_rowscurl -X POST -d '{"code":"dolphinsswap","scope":1,"table":"deposits","json":true,"limit":10}' -H 'Content-Type: application/json' http://eos.greymass.com/v1/chain/get_table_rows