Settle stub
This commit is contained in:
@@ -17,6 +17,13 @@
|
|||||||
UniValue games_rawtxresult(UniValue &result,std::string rawtx,int32_t broadcastflag);
|
UniValue games_rawtxresult(UniValue &result,std::string rawtx,int32_t broadcastflag);
|
||||||
extern uint8_t ASSETCHAINS_OVERRIDE_PUBKEY33[33];
|
extern uint8_t ASSETCHAINS_OVERRIDE_PUBKEY33[33];
|
||||||
|
|
||||||
|
|
||||||
|
UniValue games_settle(uint64_t txfee,struct CCcontract_info *cp,cJSON *params)
|
||||||
|
{
|
||||||
|
UniValue result;
|
||||||
|
return(result);
|
||||||
|
}
|
||||||
|
|
||||||
UniValue games_bet(uint64_t txfee,struct CCcontract_info *cp,cJSON *params)
|
UniValue games_bet(uint64_t txfee,struct CCcontract_info *cp,cJSON *params)
|
||||||
{
|
{
|
||||||
CMutableTransaction mtx = CreateNewContextualCMutableTransaction(Params().GetConsensus(), komodo_nextheight());
|
CMutableTransaction mtx = CreateNewContextualCMutableTransaction(Params().GetConsensus(), komodo_nextheight());
|
||||||
|
|||||||
@@ -66,7 +66,13 @@ int32_t games_payloadrecv(CPubKey pk,uint32_t timestamp,std::vector<uint8_t> pay
|
|||||||
} else return(-1);
|
} else return(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
UniValue games_oracledata(uint64_t txfee,struct CCcontract_info *cp,cJSON *params)
|
UniValue games_bet(uint64_t txfee,struct CCcontract_info *cp,cJSON *params)
|
||||||
|
{
|
||||||
|
UniValue result;
|
||||||
|
return(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
UniValue games_settle(uint64_t txfee,struct CCcontract_info *cp,cJSON *params)
|
||||||
{
|
{
|
||||||
UniValue result;
|
UniValue result;
|
||||||
return(result);
|
return(result);
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ std::string Games_pname;
|
|||||||
{ (char *)MYCCNAME, (char *)"events", (char *)"eventshex [gametxid [eventid]]", 1, 3, ' ', EVAL_GAMES }, \
|
{ (char *)MYCCNAME, (char *)"events", (char *)"eventshex [gametxid [eventid]]", 1, 3, ' ', EVAL_GAMES }, \
|
||||||
{ (char *)MYCCNAME, (char *)"extract", (char *)"gametxid [pubkey]", 1, 2, ' ', EVAL_GAMES }, \
|
{ (char *)MYCCNAME, (char *)"extract", (char *)"gametxid [pubkey]", 1, 2, ' ', EVAL_GAMES }, \
|
||||||
{ (char *)MYCCNAME, (char *)"bet", (char *)"amount hexstr", 2, 2, ' ', EVAL_GAMES }, \
|
{ (char *)MYCCNAME, (char *)"bet", (char *)"amount hexstr", 2, 2, ' ', EVAL_GAMES }, \
|
||||||
|
{ (char *)MYCCNAME, (char *)"settle", (char *)"height", 1, 1, ' ', EVAL_GAMES }, \
|
||||||
{ (char *)MYCCNAME, (char *)"register", (char *)"gametxid [playertxid]", 1, 2, 'R', EVAL_GAMES },
|
{ (char *)MYCCNAME, (char *)"register", (char *)"gametxid [playertxid]", 1, 2, 'R', EVAL_GAMES },
|
||||||
|
|
||||||
bool games_validate(struct CCcontract_info *cp,int32_t height,Eval *eval,const CTransaction tx);
|
bool games_validate(struct CCcontract_info *cp,int32_t height,Eval *eval,const CTransaction tx);
|
||||||
@@ -67,6 +68,7 @@ UniValue games_events(uint64_t txfee,struct CCcontract_info *cp,cJSON *params);
|
|||||||
UniValue games_extract(uint64_t txfee,struct CCcontract_info *cp,cJSON *params);
|
UniValue games_extract(uint64_t txfee,struct CCcontract_info *cp,cJSON *params);
|
||||||
UniValue games_register(uint64_t txfee,struct CCcontract_info *cp,cJSON *params);
|
UniValue games_register(uint64_t txfee,struct CCcontract_info *cp,cJSON *params);
|
||||||
UniValue games_bet(uint64_t txfee,struct CCcontract_info *cp,cJSON *params);
|
UniValue games_bet(uint64_t txfee,struct CCcontract_info *cp,cJSON *params);
|
||||||
|
UniValue games_settle(uint64_t txfee,struct CCcontract_info *cp,cJSON *params);
|
||||||
|
|
||||||
#define CUSTOM_DISPATCH \
|
#define CUSTOM_DISPATCH \
|
||||||
if ( cp->evalcode == EVAL_GAMES ) \
|
if ( cp->evalcode == EVAL_GAMES ) \
|
||||||
@@ -105,6 +107,8 @@ if ( cp->evalcode == EVAL_GAMES ) \
|
|||||||
return(games_fund(txfee,cp,params)); \
|
return(games_fund(txfee,cp,params)); \
|
||||||
else if ( strcmp(method,"bet") == 0 ) \
|
else if ( strcmp(method,"bet") == 0 ) \
|
||||||
return(games_bet(txfee,cp,params)); \
|
return(games_bet(txfee,cp,params)); \
|
||||||
|
else if ( strcmp(method,"settle") == 0 ) \
|
||||||
|
return(games_settle(txfee,cp,params)); \
|
||||||
else \
|
else \
|
||||||
{ \
|
{ \
|
||||||
result.push_back(Pair("result","error")); \
|
result.push_back(Pair("result","error")); \
|
||||||
|
|||||||
Reference in New Issue
Block a user