Dice list and dice info

This commit is contained in:
jl777
2018-07-29 05:31:42 -11:00
parent 6a046438dd
commit c857567a62
5 changed files with 34 additions and 8 deletions

View File

@@ -5054,6 +5054,27 @@ UniValue rewardsunlock(const UniValue& params, bool fHelp)
return(result);
}
UniValue rewardslist(const UniValue& params, bool fHelp)
{
uint256 tokenid;
if ( fHelp || params.size() > 0 )
throw runtime_error("rewardslist\n");
if ( ensure_CCrequirements() < 0 )
throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n");
return(RewardsList());
}
UniValue rewardsinfo(const UniValue& params, bool fHelp)
{
uint256 fundingtxid;
if ( fHelp || params.size() != 1 )
throw runtime_error("rewardsinfo fundingtxid\n");
if ( ensure_CCrequirements() < 0 )
throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n");
fundingtxid = Parseuint256((char *)params[0].get_str().c_str());
return(RewardsInfo(fundingtxid));
}
UniValue faucetfund(const UniValue& params, bool fHelp)
{
UniValue result(UniValue::VOBJ); uint64_t funds; std::string hex;
@@ -5148,25 +5169,25 @@ UniValue dicebet(const UniValue& params, bool fHelp)
return(result);
}
UniValue rewardslist(const UniValue& params, bool fHelp)
UniValue dicelist(const UniValue& params, bool fHelp)
{
uint256 tokenid;
if ( fHelp || params.size() > 0 )
throw runtime_error("rewardslist\n");
throw runtime_error("dicelist\n");
if ( ensure_CCrequirements() < 0 )
throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n");
return(RewardsList());
return(DiceList());
}
UniValue rewardsinfo(const UniValue& params, bool fHelp)
UniValue diceinfo(const UniValue& params, bool fHelp)
{
uint256 fundingtxid;
if ( fHelp || params.size() != 1 )
throw runtime_error("rewardsinfo fundingtxid\n");
throw runtime_error("diceinfo fundingtxid\n");
if ( ensure_CCrequirements() < 0 )
throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n");
fundingtxid = Parseuint256((char *)params[0].get_str().c_str());
return(RewardsInfo(fundingtxid));
return(DiceInfo(fundingtxid));
}
UniValue tokenlist(const UniValue& params, bool fHelp)