]> Git Repo - VerusCoin.git/blame - src/komodo_gateway.h
test
[VerusCoin.git] / src / komodo_gateway.h
CommitLineData
9b0e1808 1/******************************************************************************
2 * Copyright © 2014-2016 The SuperNET Developers. *
3 * *
4 * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at *
5 * the top-level directory of this distribution for the individual copyright *
6 * holder information and the developer policies on copyright and licensing. *
7 * *
8 * Unless otherwise agreed in a custom licensing agreement, no part of the *
9 * SuperNET software, including this file may be copied, modified, propagated *
10 * or distributed except according to the terms contained in the LICENSE file *
11 * *
12 * Removal or modification of this copyright notice is prohibited. *
13 * *
14 ******************************************************************************/
15
30f61477 16void komodo_gateway_iteration(char *symbol)
c42b46db 17{
7eeb76e9 18 char *retstr,*coinaddr; int32_t i,num; cJSON *item,*array,*listobj; static uint32_t r,n,counter=0;
c42b46db 19 if ( r == 0 )
20 r = rand();
21 if ( (counter++ % 10) == (r % 10) )
22 {
30f61477 23 printf("%s calling getinfo %d\n",symbol,n);
c42b46db 24 if ( (retstr= komodo_issuemethod((char *)"getinfo",0,7771)) != 0 )
25 {
26 //printf("GETINFO from.%s (%s)\n",ASSETCHAINS_SYMBOL,retstr);
27 free(retstr);
2c6bdd83 28 if ( (retstr= komodo_issuemethod((char *)"listtransactions",0,7771)) != 0 )
29 {
4f3b8743 30 //printf("LIST.(%s)\n",retstr);
2c6bdd83 31 if ( (listobj= cJSON_Parse(retstr)) != 0 )
32 {
d72008b8 33 if ( (array= jarray(&num,listobj,(char *)"result")) != 0 )
2c6bdd83 34 {
35 for (i=0; i<num; i++)
36 {
4f3b8743 37 item = jitem(array,i);
ae656a83 38 if ( (coinaddr= jstr(item,(char *)"address")) != 0 && strcmp(coinaddr,(char *)CRYPTO777_KMDADDR) == 0 )
39 printf("%s %d of %d.(%s)\n",symbol,i,num,jprint(item,0));
2c6bdd83 40 }
41 }
42 free_json(listobj);
43 }
44 free(retstr);
45 }
c42b46db 46 n++;
30f61477 47 } else printf("error from %s\n",symbol);
c42b46db 48 }
49}
50
9b0e1808 51void komodo_gateway_issuer() // "assetchain"
52{
53
54}
55
56void komodo_gateway_redeemer() // "KMD"
57{
58
59}
This page took 0.028805 seconds and 4 git commands to generate.