Browse Source

added pricesbet rpc

z_createrawtransaction
dimxy 5 years ago
parent
commit
f0eeb7efe1
  1. 1
      src/rpc/server.cpp
  2. 1
      src/rpc/server.h
  3. 18
      src/wallet/rpcwallet.cpp

1
src/rpc/server.cpp

@ -464,6 +464,7 @@ static const CRPCCommand vRPCCommands[] =
{ "prices", "pricesaddress", &pricesaddress, true },
{ "prices", "priceslist", &priceslist, true },
{ "prices", "pricesinfo", &pricesinfo, true },
{ "prices", "pricesbet", &pricesbet, true },
// Pegs
{ "pegs", "pegsaddress", &pegsaddress, true },

1
src/rpc/server.h

@ -497,6 +497,7 @@ extern UniValue paxdeposit(const UniValue& params, bool fHelp);
extern UniValue paxwithdraw(const UniValue& params, bool fHelp);
extern UniValue prices(const UniValue& params, bool fHelp);
extern UniValue pricesbet(const UniValue& params, bool fHelp);
// test rpc:
extern UniValue test_ac(const UniValue& params, bool fHelp);

18
src/wallet/rpcwallet.cpp

@ -5848,26 +5848,8 @@ UniValue assetsaddress(const UniValue& params, bool fHelp)
return(CCaddress(cp, (char *)"Assets", pubkey));
}
void f(UniValue *p1, UniValue *p2) {
if (p1)
p1->push_back(make_pair("x", "y"));
// or...
if (p2)
(*p2).push_back(make_pair("a", "b"));
}
UniValue tokenaddress(const UniValue& params, bool fHelp)
{
UniValue v1(UniValue::VOBJ), v2(UniValue::VOBJ);
f(&v1, &v2);
std::cerr << v1.getValues()[0].get_str() << std::endl;
std::cerr << v2.getValues()[0].get_str() << std::endl;
struct CCcontract_info *cp,C; std::vector<unsigned char> pubkey;
cp = CCinit(&C,EVAL_TOKENS);
if ( fHelp || params.size() > 1 )

Loading…
Cancel
Save