1 /******************************************************************************
2 * Copyright © 2014-2016 The SuperNET Developers. *
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. *
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 *
12 * Removal or modification of this copyright notice is prohibited. *
14 ******************************************************************************/
16 void komodo_gateway_iteration(char *symbol)
18 char *retstr,*coinaddr; int32_t i,num; cJSON *item,*array,*listobj; static uint32_t r,n,counter=0;
21 if ( (counter++ % 10) == (r % 10) )
23 printf("%s calling getinfo %d\n",symbol,n);
24 if ( (retstr= komodo_issuemethod((char *)"getinfo",0,7771)) != 0 )
26 //printf("GETINFO from.%s (%s)\n",ASSETCHAINS_SYMBOL,retstr);
28 if ( (retstr= komodo_issuemethod((char *)"listtransactions",0,7771)) != 0 )
30 //printf("LIST.(%s)\n",retstr);
31 if ( (listobj= cJSON_Parse(retstr)) != 0 )
33 if ( (array= jarray(&num,listobj,(char *)"result")) != 0 )
37 item = jitem(array,i);
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));
47 } else printf("error from %s\n",symbol);
51 void komodo_gateway_issuer() // "assetchain"
56 void komodo_gateway_redeemer() // "KMD"