Browse Source

Merge pull request #257 from jl777/dev

Dev
win-cross
jl777 8 years ago
committed by GitHub
parent
commit
81821b5e4b
  1. 4
      .gitignore
  2. 2
      basilisk/basilisk.c
  3. 2
      crypto777/OS_portable.h
  4. 3
      crypto777/iguana_utils.c
  5. 2
      iguana/dPoW.h
  6. 47
      iguana/dpow/dpow_network.c
  7. 5
      iguana/dpow/dpow_prices.c
  8. 146
      iguana/exchanges/mm.c
  9. 2
      iguana/iguana777.h
  10. 2
      iguana/iguana_notary.c
  11. 6
      iguana/main.c
  12. 64
      iguana/tests/KMD.batch10.txids
  13. 191
      iguana/tests/KMD.batch11
  14. 188
      iguana/tests/KMD.batch11.importaddress
  15. 151
      iguana/tests/KMD.batch11.listunspent
  16. 4
      iguana/tests/REVS.batch10
  17. 15
      iguana/tests/REVS.batch11
  18. 8
      iguana/tests/REVS.batch11.importaddress
  19. 2
      iguana/tests/dexlistunspent

4
.gitignore

@ -137,3 +137,7 @@ iguana/iguana_tx.o-4b5de8fe
iguana/confs/c6faccf6b625bbb826f47b77c3274e985db7b0a47d435f32bea2f7f3724cdd17
iguana/confs/c6faccf6b625bbb826f47b77c3274e985db7b0a47d435f32bea2f7f3724cdd17.old
iguana/marketmaker
iguana/secp256k1.o-501dfbfe

2
basilisk/basilisk.c

@ -919,8 +919,6 @@ void basilisks_loop(void *arg)
endmilli = startmilli + 500;
else endmilli = startmilli + 1000;
}
if ( myinfo->DEXEXPLORER != 0 )
kmd_bitcoinscan();
if ( myinfo->expiration != 0 && (myinfo->dexsock >= 0 || myinfo->IAMLP != 0 || myinfo->DEXactive > time(NULL)) )
{
//fprintf(stderr,"H ");

2
crypto777/OS_portable.h

@ -404,7 +404,7 @@ int32_t revsort32(uint32_t *buf,uint32_t num,int32_t size);
bits256 bits256_sha256(bits256 data);
void bits256_rmd160(uint8_t rmd160[20],bits256 data);
void bits256_rmd160_sha256(uint8_t rmd160[20],bits256 data);
double get_theoretical(double *avebidp,double *aveaskp,double *highbidp,double *lowaskp,double *CMC_averagep,double changes[3],char *name,char *base,char *rel);
double get_theoretical(double *avebidp,double *aveaskp,double *highbidp,double *lowaskp,double *CMC_averagep,double changes[3],char *name,char *base,char *rel,double *USD_averagep);
extern char *Iguana_validcommands[];
extern bits256 GENESIS_PUBKEY,GENESIS_PRIVKEY;

3
crypto777/iguana_utils.c

@ -1259,7 +1259,7 @@ double weighted_orderbook(double *avebidp,double *aveaskp,double *highbidp,doubl
return(weighted);
}
double get_theoretical(double *avebidp,double *aveaskp,double *highbidp,double *lowaskp,double *CMC_averagep,double changes[3],char *name,char *base,char *rel)
double get_theoretical(double *avebidp,double *aveaskp,double *highbidp,double *lowaskp,double *CMC_averagep,double changes[3],char *name,char *base,char *rel,double *USD_averagep)
{
static int32_t counter;
char *cmcstr; cJSON *cmcjson,*item; double weighted,theoretical = 0.;
@ -1272,6 +1272,7 @@ double get_theoretical(double *avebidp,double *aveaskp,double *highbidp,double *
item = cmcjson;
else item = jitem(cmcjson,0);
*CMC_averagep = jdouble(item,"price_btc");
*USD_averagep = jdouble(item,"price_usd");
changes[0] = jdouble(item,"percent_change_1h");
changes[1] = jdouble(item,"percent_change_24h");
changes[2] = jdouble(item,"percent_change_7d");

2
iguana/dPoW.h

@ -22,7 +22,7 @@
#define DPOW_MINSIGS 13
//#define DPOW_M(bp) ((bp)->minsigs) // (((bp)->numnotaries >> 1) + 1)
#define DPOW_MODIND(bp,offset) (((((bp)->height / DPOW_CHECKPOINTFREQ) % (bp)->numnotaries) + (offset)) % (bp)->numnotaries)
#define DPOW_VERSION 0x0782
#define DPOW_VERSION 0x0781
#define DPOW_UTXOSIZE 10000
#define DPOW_MINOUTPUT 6000
#define DPOW_DURATION 600

47
iguana/dpow/dpow_network.c

@ -149,7 +149,7 @@ int32_t signed_nn_recv(void **freeptrp,void *ctx,uint8_t notaries[64][33],int32_
{
//for (i=0; i<recvbytes; i++)
// printf("%02x",((uint8_t *)sigpacket)[i]);
//printf(" <- RECV.%d crc.%08x\n",recvbytes,calc_crc32(0,(void *)sigpacket,recvbytes));
//printf(" <- RECV.%d crc.%08x cmp.%d\n",recvbytes,calc_crc32(0,(void *)sigpacket,recvbytes),sigpacket->packetlen == recvbytes-sizeof(*sigpacket));
}
if ( sigpacket != 0 && recvbytes > sizeof(*sigpacket) && sigpacket->packetlen == recvbytes-sizeof(*sigpacket) )
{
@ -190,7 +190,8 @@ int32_t signed_nn_recv(void **freeptrp,void *ctx,uint8_t notaries[64][33],int32_
//printf(" invalid pubkey33 n.%d\n",n);
} else printf("recoververify error nonce.%u packetlen.%d\n",sigpacket->nonce,sigpacket->packetlen);
} else printf("hash mismatch or bad nonce.%u packetlen.%d\n",sigpacket->nonce,sigpacket->packetlen);
} //else printf("recvbytes.%d mismatched packetlen.%d + %ld\n",recvbytes,sigpacket!=0?sigpacket->packetlen:-1,sizeof(*sigpacket));
} else if ( recvbytes > 0 )
printf("recvbytes.%d mismatched packetlen.%d + %ld\n",recvbytes,sigpacket!=0?sigpacket->packetlen:-1,sizeof(*sigpacket));
//printf("free sigpacket.%p freeptrp.%p packetp.%p\n",sigpacket,*freeptrp,*(void **)packetp);
if ( sigpacket != 0 )
nn_freemsg(sigpacket), sigpacket = 0;
@ -282,6 +283,14 @@ char *_dex_reqsend(struct supernet_info *myinfo,char *handler,uint8_t *key,int32
reqsock = myinfo->reqsock;
if ( reqsock < 0 && (reqsock= nn_socket(AF_SP,NN_REQ)) >= 0 )
{
if ( reqsock >= 0 )
{
timeout = 100;
nn_setsockopt(reqsock,NN_SOL_SOCKET,NN_SNDTIMEO,&timeout,sizeof(timeout));
timeout = 3000;
nn_setsockopt(reqsock,NN_TCP,NN_RECONNECT_IVL,&timeout,sizeof(timeout));
timeout = 3000;
nn_setsockopt(reqsock,NN_SOL_SOCKET,NN_RCVTIMEO,&timeout,sizeof(timeout));
for (i=0; i<sizeof(myinfo->dexseed_ipaddrs)/sizeof(*myinfo->dexseed_ipaddrs); i++)
if ( nn_connect(reqsock,nanomsg_tcpname(0,str,myinfo->dexseed_ipaddrs[i],REP_SOCK)) < 0 )
{
@ -289,13 +298,9 @@ char *_dex_reqsend(struct supernet_info *myinfo,char *handler,uint8_t *key,int32
reqsock = -1;
break;
}
}
if ( reqsock >= 0 )
{
timeout = 100;
nn_setsockopt(reqsock,NN_SOL_SOCKET,NN_SNDTIMEO,&timeout,sizeof(timeout));
timeout = 3000;
nn_setsockopt(reqsock,NN_SOL_SOCKET,NN_RCVTIMEO,&timeout,sizeof(timeout));
//nn_setsockopt(reqsock,NN_TCP,NN_RECONNECT_IVL,&timeout,sizeof(timeout));
if ( myinfo->IAMNOTARY == 0 && subsock < 0 && (subsock= nn_socket(AF_SP,NN_SUB)) >= 0 )
{
for (i=0; i<sizeof(myinfo->dexseed_ipaddrs)/sizeof(*myinfo->dexseed_ipaddrs); i++)
@ -313,6 +318,10 @@ char *_dex_reqsend(struct supernet_info *myinfo,char *handler,uint8_t *key,int32
nn_setsockopt(subsock,NN_SOL_SOCKET,NN_RCVTIMEO,&timeout,sizeof(timeout));
nn_setsockopt(subsock,NN_SUB,NN_SUB_SUBSCRIBE,"",0);
printf("CLIENT sockets req.%d sub.%d\n",reqsock,subsock);
timeout = 3000;
nn_setsockopt(reqsock,NN_TCP,NN_RECONNECT_IVL,&timeout,sizeof(timeout));
timeout = 3000;
nn_setsockopt(reqsock,NN_SOL_SOCKET,NN_RCVTIMEO,&timeout,sizeof(timeout));
}
}
}
@ -399,7 +408,7 @@ char *_dex_reqsend(struct supernet_info *myinfo,char *handler,uint8_t *key,int32
printf("%d: subscribe connect (%s)\n",myinfo->numdexipbits,str);
}
}
if ( (rand() % 100) < 40 )
if ( 0 && (rand() % 100) < 40 )
{
nanomsg_tcpname(0,str,ipaddr,REP_SOCK);
nn_connect(myinfo->reqsock,str);
@ -882,6 +891,16 @@ char *_dex_getnotaries(struct supernet_info *myinfo,char *symbol)
decode_hex(myinfo->notaries[i],33,pubkeystr);
}
}
else
{
extern const char *Notaries_elected[][2];
myinfo->numnotaries = 64;//sizeof(Notaries_elected)/sizeof(*Notaries_elected);
for (i=0; i<myinfo->numnotaries; i++)
{
decode_hex(myinfo->notaries[i],33,(char *)Notaries_elected[i][1]);
}
printf("default to elected.%d\n",myinfo->numnotaries);
}
free_json(retjson);
}
}
@ -1091,7 +1110,7 @@ void dex_updateclient(struct supernet_info *myinfo)
int32_t i;
if ( myinfo->IAMNOTARY == 0 )
{
for (i=0; i<100; i++)
for (i=0; i<1000; i++)
if ( dex_subsock_poll(myinfo) <= 0 )
break;
}
@ -1882,7 +1901,7 @@ int32_t dpow_nanomsg_update(struct supernet_info *myinfo)
break;
usleep(1000);
}*/
while ( (size= signed_nn_recv(&freeptr,myinfo->ctx,myinfo->notaries,myinfo->numnotaries,myinfo->dpowsock,&np)) >= 0 && num < 100 )
while ( (size= signed_nn_recv(&freeptr,myinfo->ctx,myinfo->notaries,myinfo->numnotaries,myinfo->dpowsock,&np)) >= 0 && num < 1000 )
{
num++;
if ( size > 0 )
@ -1936,10 +1955,10 @@ int32_t dpow_nanomsg_update(struct supernet_info *myinfo)
n = 0;
if ( myinfo->dexsock >= 0 ) // from servers
{
if ( (size= signed_nn_recv(&freeptr,myinfo->ctx,myinfo->notaries,myinfo->numnotaries,myinfo->dexsock,&dexp)) > 0 )
while ( (size= signed_nn_recv(&freeptr,myinfo->ctx,myinfo->notaries,myinfo->numnotaries,myinfo->dexsock,&dexp)) > 0 && n < 1000 )
{
//fprintf(stderr,"%d ",size);
num++;
n++;
if ( dex_packetcheck(myinfo,dexp,size) == 0 )
{
//printf("FROM BUS.%08x -> pub\n",dexp->crc32);
@ -1956,11 +1975,11 @@ int32_t dpow_nanomsg_update(struct supernet_info *myinfo)
while ( (size= nn_recv(myinfo->repsock,&dexp,NN_MSG,0)) > 0 )
{
num++;
//printf("REP got %d crc.%08x\n",size,calc_crc32(0,(void *)dexp,size));
printf("REP got %d crc.%08x\n",size,calc_crc32(0,(void *)dexp,size));
if ( (retstr= dex_response(&broadcastflag,myinfo,dexp)) != 0 )
{
signed_nn_send(myinfo,myinfo->ctx,myinfo->persistent_priv,myinfo->repsock,retstr,(int32_t)strlen(retstr)+1);
//printf("send back[%ld]\n",strlen(retstr)+1);
printf("send back[%ld]\n",strlen(retstr)+1);
free(retstr);
if ( broadcastflag != 0 )
{

5
iguana/dpow/dpow_prices.c

@ -1154,6 +1154,7 @@ cJSON *url_json2(char *url)
double PAX_yahoo(char *metal)
{
// http://finance.yahoo.com/webservice/v1/symbols/allcurrencies/quote?format=json
// http://finance.yahoo.com/webservice/v1/symbols/EUR=USD/quote?format=json
// http://finance.yahoo.com/webservice/v1/symbols/XAU=X/quote?format=json
// http://finance.yahoo.com/webservice/v1/symbols/XAG=X/quote?format=json
// http://finance.yahoo.com/webservice/v1/symbols/XPT=X/quote?format=json
@ -1450,7 +1451,7 @@ void PAX_update(struct PAX_data *dp,double *btcusdp,double *kmdbtcp)
}
if ( 1 )
{
double avebid,aveask,bidvol,askvol,highbid,lowask,CMC_average,changes[3]; //struct exchange_quote sortbuf[512]; struct supernet_info *myinfo = SuperNET_MYINFO(0); cJSON *argjson = cJSON_Parse("{}");
double USD_average,avebid,aveask,bidvol,askvol,highbid,lowask,CMC_average,changes[3]; //struct exchange_quote sortbuf[512]; struct supernet_info *myinfo = SuperNET_MYINFO(0); cJSON *argjson = cJSON_Parse("{}");
//aveask = instantdex_aveprice(myinfo,sortbuf,(int32_t)(sizeof(sortbuf)/sizeof(*sortbuf)),&askvol,"KMD","BTC",1,argjson);
//avebid = instantdex_aveprice(myinfo,sortbuf,(int32_t)(sizeof(sortbuf)/sizeof(*sortbuf)),&bidvol,"KMD","BTC",-1,argjson);
if ( 0 && avebid > SMALLVAL && aveask > SMALLVAL )
@ -1460,7 +1461,7 @@ void PAX_update(struct PAX_data *dp,double *btcusdp,double *kmdbtcp)
printf("set KMD price %f\n",price);
dp->KMDBTC = price;
}
else if ( (dp->KMDBTC= get_theoretical(&avebid,&aveask,&highbid,&lowask,&CMC_average,changes,"komodo","KMD","BTC")) > SMALLVAL )
else if ( (dp->KMDBTC= get_theoretical(&avebid,&aveask,&highbid,&lowask,&CMC_average,changes,"komodo","KMD","BTC",&USD_average)) > SMALLVAL )
*kmdbtcp = dp->KMDBTC;
else
{

146
iguana/exchanges/mm.c

@ -35,6 +35,11 @@ int32_t Num_Pending;
#define IGUANA_URL "http://127.0.0.1:7778"
char CURRENCIES[][8] = { "USD", "EUR", "JPY", "GBP", "AUD", "CAD", "CHF", "NZD", // major currencies
"CNY", "RUB", "MXN", "BRL", "INR", "HKD", "TRY", "ZAR", "PLN", "NOK", "SEK", "DKK", "CZK", "HUF", "ILS", "KRW", "MYR", "PHP", "RON", "SGD", "THB", "BGN", "IDR", "HRK", // end of currencies
};
double PAXPRICES[sizeof(CURRENCIES)/sizeof(*CURRENCIES)];
char *DEX_amlp(char *blocktrail)
{
char url[512],postdata[1024];
@ -162,6 +167,78 @@ double dex_balance(char *base,char *coinaddr)
return(balance);
}
int32_t komodo_baseid(char *base)
{
int32_t i;
for (i=0; i<sizeof(CURRENCIES)/sizeof(*CURRENCIES); i++)
if ( strcmp(base,CURRENCIES[i]) == 0 )
return(i);
return(-1);
}
cJSON *yahoo_allcurrencies()
{
char *retstr; cJSON *retjson = 0;
if ( (retstr= issue_curl("http://finance.yahoo.com/webservice/v1/symbols/allcurrencies/quote?format=json")) != 0 )
{
retjson = cJSON_Parse(retstr);
free(retstr);
}
return(retjson);
}
void _marketmaker_fiatupdate(int32_t baseid,double price)
{
PAXPRICES[baseid] = price * PAXPRICES[0];
printf("%.6f %s per USD, %.8f %s per KMD\n",price,CURRENCIES[baseid],PAXPRICES[baseid],CURRENCIES[baseid]);
}
uint32_t marketmaker_fiatupdate(cJSON *fiatjson)
{
int32_t i,n,baseid; cJSON *item,*array; double price; char *name; uint64_t mask = 0;
fiatjson = jobj(fiatjson,"list");
if ( fiatjson != 0 && (array= jarray(&n,fiatjson,"resources")) > 0 )
{
for (i=0; i<n; i++)
{
/*
"resource" : {
"classname" : "Quote",
"fields" : {
"name" : "USD/BRX",
"price" : "3.063200",
"symbol" : "BRX=X",
"ts" : "1487866204",
"type" : "currency",
"utctime" : "2017-02-23T16:10:04+0000",
"volume" : "0"
}
*/
item = jitem(array,i);
if ( (item= jobj(item,"resource")) != 0 )
item = jobj(item,"fields");
if ( item != 0 )
{
price = jdouble(item,"price");
if ( price > SMALLVAL && (name= jstr(item,"name")) != 0 && strncmp(name,"USD/",4) == 0 )
{
if ( (baseid= komodo_baseid(name+4)) >= 0 && baseid < 32 )
{
if ( ((1LL << baseid) & mask) == 0 )
{
_marketmaker_fiatupdate(baseid,price);
mask |= (1LL << baseid);
} else if ( fabs(price*PAXPRICES[0] - PAXPRICES[baseid]) > SMALLVAL )
printf("DUPLICATE PRICE? %s %.8f vs %.8f\n",name+4,price*PAXPRICES[0],PAXPRICES[baseid]);
}
}
}
}
}
printf("pax mask.%x\n",(uint32_t)mask);
return((uint32_t)mask);
}
void marketmaker_cancel(struct mmpending_order *ptr)
{
char *retstr; cJSON *retjson;
@ -384,7 +461,7 @@ void marketmaker_volumeset(double *bidincrp,double *askincrp,double incr,double
int32_t marketmaker_spread(char *exchange,char *base,char *rel,double bid,double bidvol,double ask,double askvol,double separation)
{
int32_t nearflags[2],i,n = 0; struct mmpending_order *ptr; cJSON *retjson,*vals; char *retstr,postdata[1024],url[128];
int32_t nearflags[2],i,n = 0; struct mmpending_order *ptr; cJSON *retjson,*vals; char *retstr,postdata[1024],url[128]; double vol,spread_ratio;
memset(nearflags,0,sizeof(nearflags));
if ( strcmp("DEX",exchange) != 0 )
{
@ -405,7 +482,7 @@ int32_t marketmaker_spread(char *exchange,char *base,char *rel,double bid,double
//printf("spread.%s (%.8f %.6f) (%.8f %.6f)\n",exchange,bid,bidvol,ask,askvol);
if ( bid > SMALLVAL && bidvol > SMALLVAL && nearflags[0] == 0 )
{
if ( strcmp("DEX",exchange) == 0 )
if ( strcmp("DEX",exchange) == 0 && strcmp(base,"KMD") == 0 && strcmp(rel,"BTC") == 0 )
{
if ( ask > SMALLVAL && askvol > SMALLVAL )
{
@ -422,16 +499,36 @@ int32_t marketmaker_spread(char *exchange,char *base,char *rel,double bid,double
jaddstr(vals,"rel","BTC");
jaddnum(vals,"bid",bid);
jaddnum(vals,"ask",ask);
jaddnum(vals,"maxvol",bidvol > askvol ? askvol : bidvol);
jaddnum(vals,"minvol",(bidvol > askvol ? askvol : bidvol) * 0.1);
vol = bidvol > askvol ? askvol : bidvol;
jaddnum(vals,"maxvol",vol);
jaddnum(vals,"minvol",vol * 0.1);
sprintf(url,"%s/?",IGUANA_URL);
sprintf(postdata,"{\"agent\":\"tradebot\",\"method\":\"liquidity\",\"targetcoin\":\"%s\",\"vals\":%s}",base,jprint(vals,1));
printf("call liquidity\n");
if ( (retstr= bitcoind_RPC(0,"tradebot",url,0,"liqudity",postdata)) != 0 )
{
//printf("(%s) -> (%s)\n",postdata,retstr);
free(retstr);
}
spread_ratio = (ask - bid) / (bid + ask);
for (i=0; i<sizeof(CURRENCIES)/sizeof(*CURRENCIES); i++)
{
if ( PAXPRICES[i] > SMALLVAL )
{
vals = cJSON_CreateObject();
jaddstr(vals,"rel",CURRENCIES[i]);
jaddnum(vals,"bid",PAXPRICES[i] * (1. - spread_ratio));
jaddnum(vals,"ask",PAXPRICES[i] * (1. + spread_ratio));
jaddnum(vals,"maxvol",vol * PAXPRICES[i]);
jaddnum(vals,"minvol",vol * 0.1 * PAXPRICES[i]);
sprintf(url,"%s/?",IGUANA_URL);
sprintf(postdata,"{\"agent\":\"tradebot\",\"method\":\"liquidity\",\"targetcoin\":\"%s\",\"vals\":%s}","KMD",jprint(vals,1));
if ( (retstr= bitcoind_RPC(0,"tradebot",url,0,"liqudity",postdata)) != 0 )
{
//printf("(%s) -> (%s)\n",postdata,retstr);
free(retstr);
}
}
}
} else printf("unsupported ask only for DEX %s/%s\n",base,rel);
}
else if ( (retstr= DEX_trade(exchange,base,rel,1,bid,bidvol)) != 0 )
@ -461,18 +558,19 @@ int32_t marketmaker_spread(char *exchange,char *base,char *rel,double bid,double
return(n);
}
void marketmaker(char *baseaddr,char *reladdr,double start_BASE,double start_REL,double profitmargin,double maxexposure,double ratioincr,char *exchange,char *name,char *base,char *rel)
void marketmaker(double minask,double maxbid,char *baseaddr,char *reladdr,double start_BASE,double start_REL,double profitmargin,double maxexposure,double ratioincr,char *exchange,char *name,char *base,char *rel)
{
double start_DEXbase,start_DEXrel,DEX_base = 0.,DEX_rel = 0.,balance_base=0.,balance_rel=0.,mmbid,mmask,CMC_average,aveprice,incr,pendingbids,pendingasks,buyvol,sellvol,bidincr,askincr,filledprice,avebid=0.,aveask=0.,val,changes[3],highbid=0.,lowask=0.,theoretical = 0.; uint32_t lasttime = 0;
static uint32_t counter;
cJSON *fiatjson; double start_DEXbase,start_DEXrel,USD_average=0.,DEX_base = 0.,DEX_rel = 0.,balance_base=0.,balance_rel=0.,mmbid,mmask,usdprice=0.,CMC_average=0.,aveprice,incr,pendingbids,pendingasks,buyvol,sellvol,bidincr,askincr,filledprice,avebid=0.,aveask=0.,val,changes[3],highbid=0.,lowask=0.,theoretical = 0.; uint32_t lasttime = 0;
incr = maxexposure * ratioincr;
buyvol = sellvol = 0.;
start_DEXbase = dex_balance(base,baseaddr);
start_DEXrel = dex_balance(rel,reladdr);
while ( 1 )
{
if ( time(NULL) > lasttime+60 )
if ( time(NULL) > lasttime+300 )
{
if ( (val= get_theoretical(&avebid,&aveask,&highbid,&lowask,&CMC_average,changes,name,base,rel)) != 0. )
if ( (val= get_theoretical(&avebid,&aveask,&highbid,&lowask,&CMC_average,changes,name,base,rel,&USD_average)) != 0. )
{
if ( theoretical == 0. )
{
@ -485,6 +583,20 @@ void marketmaker(char *baseaddr,char *reladdr,double start_BASE,double start_REL
incr += 0.777;
}
} else theoretical = (theoretical + val) * 0.5;
if ( (counter++ % 12) == 0 )
{
if ( USD_average > SMALLVAL && CMC_average > SMALLVAL && theoretical > SMALLVAL )
{
usdprice = USD_average * (theoretical / CMC_average);
printf("USD %.4f <- (%.6f * (%.8f / %.8f))\n",usdprice,USD_average,theoretical,CMC_average);
PAXPRICES[0] = usdprice;
if ( (fiatjson= yahoo_allcurrencies()) != 0 )
{
marketmaker_fiatupdate(fiatjson);
free_json(fiatjson);
}
}
}
}
if ( strcmp(exchange,"bittrex") == 0 )
{
@ -518,9 +630,9 @@ void marketmaker(char *baseaddr,char *reladdr,double start_BASE,double start_REL
printf("(%.8f %.8f) ",mmbid,mmask);
if ( (1) )
{
if ( mmbid >= lowask ) //mmbid < highbid ||
if ( mmbid >= lowask || (maxbid > SMALLVAL && mmbid > maxbid) ) //mmbid < highbid ||
mmbid = 0.;
if ( mmask <= highbid ) // mmask > lowask ||
if ( mmask <= highbid || (minask > SMALLVAL && mmask < minask) ) // mmask > lowask ||
mmask = 0.;
}
marketmaker_volumeset(&bidincr,&askincr,incr,buyvol,pendingbids,sellvol,pendingasks,maxexposure);
@ -529,15 +641,20 @@ void marketmaker(char *baseaddr,char *reladdr,double start_BASE,double start_REL
if ( (pendingbids + buyvol) > (pendingasks + sellvol) )
{
bidincr *= (double)(pendingasks + sellvol) / ((pendingbids + buyvol) + (pendingasks + sellvol));
if ( bidincr < 0.1*incr )
bidincr = 0.1*incr;
if ( bidincr > 1. )
bidincr = (int32_t)bidincr + 0.777;
}
if ( (pendingbids + buyvol) < (pendingasks + sellvol) )
{
askincr *= (double)(pendingbids + buyvol) / ((pendingbids + buyvol) + (pendingasks + sellvol));
if ( askincr < 0.1*incr )
askincr = 0.1*incr;
if ( askincr > 1. )
askincr = (int32_t)askincr + 0.777;
}
//printf("mmbid %.8f %.6f, mmask %.8f %.6f\n",mmbid,bidincr,mmask,askincr);
marketmaker_spread(exchange,base,rel,mmbid,bidincr,mmask,askincr,profitmargin*aveprice*0.5);
sleep(60);
}
@ -547,11 +664,12 @@ void marketmaker(char *baseaddr,char *reladdr,double start_BASE,double start_REL
int main(int argc, const char * argv[])
{
char *base,*rel,*name,*exchange,*apikey,*apisecret,*blocktrail;
double profitmargin,maxexposure,incrratio,start_rel,start_base;
double profitmargin,maxexposure,incrratio,start_rel,start_base,minask,maxbid;
cJSON *retjson,*addrjson; char *retstr,*baseaddr,*reladdr,*passphrase;
if ( argc > 1 && (retjson= cJSON_Parse(argv[1])) != 0 )
{
printf("argc.%d (%s)\n",argc,jprint(retjson,0));
minask = jdouble(retjson,"minask");
maxbid = jdouble(retjson,"maxbid");
profitmargin = jdouble(retjson,"profitmargin");
maxexposure = jdouble(retjson,"maxexposure");
incrratio = jdouble(retjson,"lotratio");
@ -586,7 +704,7 @@ printf("argc.%d (%s)\n",argc,jprint(retjson,0));
printf("%s.%s %s\n",base,baseaddr,DEX_balance("DEX",base,baseaddr));
printf("%s.%s %s\n",rel,reladdr,DEX_balance("DEX",rel,reladdr));
// initialize state using DEX_pendingorders, etc.
marketmaker(baseaddr,reladdr,start_base,start_rel,profitmargin,maxexposure,incrratio,exchange,name,base,rel);
marketmaker(minask,maxbid,baseaddr,reladdr,start_base,start_rel,profitmargin,maxexposure,incrratio,exchange,name,base,rel);
}
free_json(addrjson);
}

2
iguana/iguana777.h

@ -133,7 +133,7 @@ struct supernet_info
struct liquidity_info linfos[512]; cJSON *liquidity_currencies; struct pending_trade *trades; portable_mutex_t pending_mutex;
struct komodo_notaries NOTARY;
char seedipaddr[64]; uint32_t dpowipbits[128]; int32_t numdpowipbits; portable_mutex_t notarymutex,dpowmutex;
char dexseed_ipaddrs[2][64]; uint32_t dexipbits[128]; int32_t numdexipbits; portable_mutex_t dexmutex;
char dexseed_ipaddrs[8][64]; uint32_t dexipbits[128]; int32_t numdexipbits; portable_mutex_t dexmutex;
// compatibility
bits256 pangea_category,instantdex_category;
uint8_t logs[256],exps[510];

2
iguana/iguana_notary.c

@ -147,7 +147,7 @@ void iguana_dPoWupdate(struct supernet_info *myinfo,struct dpow_info *dp)
{
int32_t height,num; uint32_t blocktime; bits256 blockhash; struct iguana_info *src,*dest;
//fprintf(stderr,"dp.%p dPoWupdate (%s -> %s)\n",dp,dp!=0?dp->symbol:"",dp!=0?dp->dest:"");
if ( strcmp(dp->symbol,"KMD") == 0 )
//if ( strcmp(dp->symbol,"KMD") == 0 )
{
num = dpow_nanomsg_update(myinfo);
//fprintf(stderr,"%d ",num);

6
iguana/main.c

@ -484,6 +484,8 @@ void mainloop(struct supernet_info *myinfo)
}
usleep(30000);
}
if ( myinfo->DEXEXPLORER != 0 )
kmd_bitcoinscan();
//pangea_queues(SuperNET_MYINFO(0));
//if ( flag == 0 )
// usleep(100000 + isRT*100000 + (numpeers == 0)*1000000);
@ -1612,7 +1614,7 @@ void komodo_ICO_batch(cJSON *array,int32_t batchid)
printf("# %s KMD %.8f\n",coinaddr,dstr(kmdamount));
if ( (iter & 1) == 0 )
{
if ( (1) )
if ( (0) )
{
printf("curl --url \"http://127.0.0.1:7778\" --data \"{\\\"agent\\\":\\\"dex\\\",\\\"method\\\":\\\"importaddress\\\",\\\"address\\\":\\\"%s\\\",\\\"symbol\\\":\\\"KMD\\\"}\" # %.8f\n",coinaddr,dstr(kmdamount));
printf("sleep 3\n");
@ -1676,7 +1678,7 @@ void iguana_main(void *arg)
else printf("ENDIAN ERROR\n");
mycalloc(0,0,0);
#ifdef __APPLE__
char *batchstr,*batchstr2; cJSON *batchjson; long batchsize; char fname[512],fname2[512]; int32_t batchid = 11;
char *batchstr,*batchstr2; cJSON *batchjson; long batchsize; char fname[512],fname2[512]; int32_t batchid = 12;
sprintf(fname,"REVS.raw"), sprintf(fname2,"REVS.rawtxids");
if ( (0) && (batchstr= OS_filestr(&batchsize,fname)) != 0 && (batchstr2= OS_filestr(&batchsize,fname2)) != 0 )
{

64
iguana/tests/KMD.batch10.txids

@ -0,0 +1,64 @@
8b0336f166b8b6348c7af6b382ba5d5f4aa6e266922b19725e79290ee9839bf2
6266.43352646 <- expected amount RQC6A3SKtLb2zmqDDwFvRH6Zz4mZufmp3d
f88163328ebfd735ffe40077fadb0fb8b79020943a8e5822b47fba735a4a20a2
1203.04246569 <- expected amount R9SpRcd2KRD45B7SqzuUFhNnsnx7YqgkN6
af967b9d98defc983047da835bd783fe66b527292052acf56197456344431826
9683.15249375 <- expected amount RCA8H1npFPW5pnJRzycF8tFEJmn6XZhD4j
fedd862fdf4749676410a4b7babf3139c6cf624fd8f6c9620fd95256a7300600
306877.42641191 <- expected amount RTJXwRhuAH9iyztyuRuGC8G7DamTgSMGvT
97cae9d83eadecc26cacd272880bd5120bb66aa3df3a65f37d53793c9c1d3154
150.23706901 <- expected amount RQantoJxT8szwfAqUM3enLPe85YiQtwndH
d641a19ecb1f4d0e5938a18e794ab3b3931f12669e952b40ccadad71c29b7f09
1985.04626121 <- expected amount RLvvwtBUupmGDy81CJNp6RxKbxxbuu3jRY
f14d32323d2f001a2bf6ca8b88c3a15252a71d80174d6390c61902d06d5f4b84
1664.32251109 <- expected amount RFdRKqe82MmvSxZQjgtLfzdf8mNHztKpPE
fcda442735f5627876d069940adc2448f3ba60024a214f48cbbc88123167961d
5.99800973 <- expected amount RE1NYFqFG2vmhhHVY7QFC7sTp7zBxvSSP3
f13e4009f2c3fa3c4f97a0798f1bf1e3df0a4f8470613a125683bd052b1d94ae
9671.53271075 <- expected amount RNYMy1joru9gFitzokTSi5qFFc5nS4iFxc
edb2103b5a7577241d8d3cc7564426b6230ed9ed6a26b0a43cc8ec09d5a76bf3
40223.19497203 <- expected amount RF4jZsF5BUckQqX5hsS68kjQMYSba8Fypm
8cdc1454b6f872eac3d95c95295816678f1bcb759bc8a7134399951c2b4d0a2f
72698.53877152 <- expected amount RPqAFgwnB1hjae6Ar4Kms973uS93HbDkoB
70ea0803296924e353f9c21a3a24b9167868b84219610f6b0e5544622ade573d
9683.15249375 <- expected amount RVzFdNGRn8Ekr4XaeDSfE9fjqvKdcVicJe
df969fd9a0676e0a51c132432fd67fc1dba5e3fa6049bc1c81a0f3d2d32f1bf6
3532.13792522 <- expected amount RTbTzn7FGJWwrH1E3fMwuZPs3YVH1MvVoB
1b06ade94bbc568b7fd6d9a5eb786aa05df77956c4dc3012fff2225dc3338b3c
309.69366537 <- expected amount RDdUQ5t6SYYGZUdAxBk5i7QdTWvzAshxNZ
6356a4dd940d6e859b58fe866eacd8ff58f2d68ae46eec4376e722a26a7fa542
3873.26099750 <- expected amount RYYgc5UD7X18E6CrDXCs1cts5WDwaWhm1Z
dea38f0d030f416d7030c8531b23fedd559410f82f23d4927e62ec3b987406fe
62053.93460050 <- expected amount RXdBJ5cWDcS38ykuggEQZh3vSztxwmG3ut
f0c32f919b860494e924953cbb8c18b7ebc48579eca47ca1f42212afa8471b89
6506.14889316 <- expected amount REKnBAyZMnhKzRozzcuv6fKRtoBsKTFYjs
ce24b5ff26df4d10e2a34dfaa00949e6eab54c921d5be815c39b0dec50a7aac1
812.78437655 <- expected amount RY422uSvkAoZy81uGot5PmXuMrtChhJ3uL
d301f1d220d66363aa9c8a4ce2ae3ff24b7b554577e862a8f4a0fa3650c87591
1452.47287406 <- expected amount R9o3CQms16CLu63j9WdqsaWB3XsssRXEq8
50b56b7eaa17403473c107706ca4f7d15dc43907e643ff70b9613476e9a88a1a
867.82549038 <- expected amount RWTfFTP7c9WxLhgxd2EXSsKszpDVPXHN8A
48de26c072cc1792774528721c912b9c88245ecad1e8cc8c0e18d9b030dc483e
693.08132289 <- expected amount RHJ55iWUQNbKcSn8shbv1RbGuip3RSRHFv
4faf242258a3b3a78f2e4d4217370c5bc1bd836990e4889f74c040cad2aaabfb
8521.17419450 <- expected amount RCfBinKfJ1wGSxXLPNTmC9bohFRoofUiVm
00f9410471f1953fa2379f9add97d377c0618ed03a489fbff2c2b4d2a41e59c3
5328.53865807 <- expected amount RNEZRHeWE3KgSTUr3qvH7RNvM2JWZZkygM
8cf3efea2f6972a7e04b6d75478e54e6667fe8f88effc8a20b38f9dbbc9b03e7
29049.45748125 <- expected amount RH7tsX9PaKECxSEALpu5EWdmEKikY7R2n1
12f13b23bfbb519a7e2c18c7d4826ab702eee8769f4f27914e9d3b6c13b7c315
4840.60793162 <- expected amount RYHxrTNpqrAHRbULboJVYHWqmnmVhzzrot
62315b5822e8b04541cbb0db97dcd65b93ab3b95c6ef5d6aebf3a8efa4ea55d1
2420.78812342 <- expected amount RLCEGw7zmAhZQYtP23Z2TD45gAT9ZuZKct
3c45078d8bf67b966d4dd73a12a9963ae0638fae5af4f2a49de6f54bf507d9de
137.73071692 <- expected amount RGQmMzmUfa6R5dZvvL5wvy2vxPLEcgkkyC
5e4daa037126cd384ec76452baa4a8388c468fd6e81d1f72b249b8de922fd403
9737.34607711 <- expected amount RRdDD2YoR5cfwktePGGFT5cEyRcWkEjzvM
5ab178d63a2d12f5d8c906e9de598708284d0d9e13da61dd5658dc5f5040755b
1903.31162313 <- expected amount RKbb9NGB3pU2BaByoDwyZDH74E7koR2Lga
8ba4ff8dcfda0490c7927afb042768de0ea8d9f8eea89112430bc8363c736703
99.84182062 <- expected amount RQsSsmpzFagxRaYk6cTMpNHa4eYLihKn8h
7d9c76b94c599a9cb2a0aa5301d722186fc130ac883929ef6952d9cf95e2fbd0
1167.24851677 <- expected amount RKQPNcePppEkV4CMXZrwqEMAvRHbruKVdF
7e291c577c4695ae3a6363ff9091d3e1f2d61d3038e324c0222677ec8cf27aee
15095.38306803 <- expected amount RHKuiEoakr9yeWQT9UZzCrqPgR8MPBaGvD

191
iguana/tests/KMD.batch11

@ -0,0 +1,191 @@
sleep 99999
# RWTfFTP7c9WxLhgxd2EXSsKszpDVPXHN8A KMD 42.40642295
./komodo-cli sendtoaddress RWTfFTP7c9WxLhgxd2EXSsKszpDVPXHN8A 42.40642295
sleep 3
echo "42.40642295 <- expected amount RWTfFTP7c9WxLhgxd2EXSsKszpDVPXHN8A"
# RMnuGgpEzWcxYi861E7BjGMURCFX2Szj2v KMD 1248.93505747
./komodo-cli sendtoaddress RMnuGgpEzWcxYi861E7BjGMURCFX2Szj2v 1248.93505747
sleep 3
echo "1248.93505747 <- expected amount RMnuGgpEzWcxYi861E7BjGMURCFX2Szj2v"
# RC8jWr1QQsRyo1pDkue8AxGs58Wyz4F3wZ KMD 2684.14739323
./komodo-cli sendtoaddress RC8jWr1QQsRyo1pDkue8AxGs58Wyz4F3wZ 2684.14739323
sleep 3
echo "2684.14739323 <- expected amount RC8jWr1QQsRyo1pDkue8AxGs58Wyz4F3wZ"
# RTUWRmRe543k8vrwuRXQ7BkFhkK4i2dq5A KMD 19366.30498750
./komodo-cli sendtoaddress RTUWRmRe543k8vrwuRXQ7BkFhkK4i2dq5A 19366.30498750
sleep 3
echo "19366.30498750 <- expected amount RTUWRmRe543k8vrwuRXQ7BkFhkK4i2dq5A"
# RPqAFgwnB1hjae6Ar4Kms973uS93HbDkoB KMD 209558.53271075
./komodo-cli sendtoaddress RPqAFgwnB1hjae6Ar4Kms973uS93HbDkoB 209558.53271075
sleep 3
echo "209558.53271075 <- expected amount RPqAFgwnB1hjae6Ar4Kms973uS93HbDkoB"
# RNW6Kkcdktbeemd2n8NVPCfgnRirzWoiZY KMD 32675.00548454
./komodo-cli sendtoaddress RNW6Kkcdktbeemd2n8NVPCfgnRirzWoiZY 32675.00548454
sleep 3
echo "32675.00548454 <- expected amount RNW6Kkcdktbeemd2n8NVPCfgnRirzWoiZY"
# RNUw6ePdaQ4mXSo9koqGtMDzEC43gCvDrK KMD 15037.55193116
./komodo-cli sendtoaddress RNUw6ePdaQ4mXSo9koqGtMDzEC43gCvDrK 15037.55193116
sleep 3
echo "15037.55193116 <- expected amount RNUw6ePdaQ4mXSo9koqGtMDzEC43gCvDrK"
# RLu6gRHKwXjvv64QZGiLT7uHEVRrH9mHDn KMD 1022.54090334
./komodo-cli sendtoaddress RLu6gRHKwXjvv64QZGiLT7uHEVRrH9mHDn 1022.54090334
sleep 3
echo "1022.54090334 <- expected amount RLu6gRHKwXjvv64QZGiLT7uHEVRrH9mHDn"
# RTJXwRhuAH9iyztyuRuGC8G7DamTgSMGvT KMD 172688.45447080
./komodo-cli sendtoaddress RTJXwRhuAH9iyztyuRuGC8G7DamTgSMGvT 172688.45447080
sleep 3
echo "172688.45447080 <- expected amount RTJXwRhuAH9iyztyuRuGC8G7DamTgSMGvT"
# RDKb3QykRJNfLKWLcbbv9z7xqbtxwB54GC KMD 35255.61377633
./komodo-cli sendtoaddress RDKb3QykRJNfLKWLcbbv9z7xqbtxwB54GC 35255.61377633
sleep 3
echo "35255.61377633 <- expected amount RDKb3QykRJNfLKWLcbbv9z7xqbtxwB54GC"
# RH7cfyUkBwrLbxfWBggcbV3UgzaAHyy3J8 KMD 4509.36353351
./komodo-cli sendtoaddress RH7cfyUkBwrLbxfWBggcbV3UgzaAHyy3J8 4509.36353351
sleep 3
echo "4509.36353351 <- expected amount RH7cfyUkBwrLbxfWBggcbV3UgzaAHyy3J8"
# RCSH7RtDM51e346niSiUk9HiYDrDiqcyev KMD 8622.26398257
./komodo-cli sendtoaddress RCSH7RtDM51e346niSiUk9HiYDrDiqcyev 8622.26398257
sleep 3
echo "8622.26398257 <- expected amount RCSH7RtDM51e346niSiUk9HiYDrDiqcyev"
# RBYMsuS89HQKxNCZB3xb1UxRyfLMLvrbmc KMD 1904.65394401, REVS 37.80134078
# RBYMsuS89HQKxNCZB3xb1UxRyfLMLvrbmc KMD 1904.65394401
./komodo-cli sendtoaddress RBYMsuS89HQKxNCZB3xb1UxRyfLMLvrbmc 1904.65394401
sleep 3
echo "1904.65394401 <- expected amount RBYMsuS89HQKxNCZB3xb1UxRyfLMLvrbmc"
# RUr4x8gjCU9EmbLWpYBdsJDyt1oye52iog KMD 1894.96063707
./komodo-cli sendtoaddress RUr4x8gjCU9EmbLWpYBdsJDyt1oye52iog 1894.96063707
sleep 3
echo "1894.96063707 <- expected amount RUr4x8gjCU9EmbLWpYBdsJDyt1oye52iog"
# RBW6wjWoEsu22APzSfJemWi96bQZFJvEGZ KMD 55379.83556127
./komodo-cli sendtoaddress RBW6wjWoEsu22APzSfJemWi96bQZFJvEGZ 55379.83556127
sleep 3
echo "55379.83556127 <- expected amount RBW6wjWoEsu22APzSfJemWi96bQZFJvEGZ"
# RAMvDwi58oyArqfGseWZsYbR2BN3L7ghVX KMD 109.47952512
./komodo-cli sendtoaddress RAMvDwi58oyArqfGseWZsYbR2BN3L7ghVX 109.47952512
sleep 3
echo "109.47952512 <- expected amount RAMvDwi58oyArqfGseWZsYbR2BN3L7ghVX"
# RXs11ZkaMLV9ZVAJ93LNjF4TRri2QBHn4J KMD 2903.00911762
./komodo-cli sendtoaddress RXs11ZkaMLV9ZVAJ93LNjF4TRri2QBHn4J 2903.00911762
sleep 3
echo "2903.00911762 <- expected amount RXs11ZkaMLV9ZVAJ93LNjF4TRri2QBHn4J"
# RHy56MTg74v8AY1Eo2RgbohbMbdHjUDN47 KMD 8344.85486318
./komodo-cli sendtoaddress RHy56MTg74v8AY1Eo2RgbohbMbdHjUDN47 8344.85486318
sleep 3
echo "8344.85486318 <- expected amount RHy56MTg74v8AY1Eo2RgbohbMbdHjUDN47"
# RQM36oUWQFipUvhPnyoNr8f8CgmJ6W6HR3 KMD 9295.82639400
./komodo-cli sendtoaddress RQM36oUWQFipUvhPnyoNr8f8CgmJ6W6HR3 9295.82639400
sleep 3
echo "9295.82639400 <- expected amount RQM36oUWQFipUvhPnyoNr8f8CgmJ6W6HR3"
# RLyaf3XgjHruSeJd4oj83E8btck7kYPmVz KMD 5784.90308850
./komodo-cli sendtoaddress RLyaf3XgjHruSeJd4oj83E8btck7kYPmVz 5784.90308850
sleep 3
echo "5784.90308850 <- expected amount RLyaf3XgjHruSeJd4oj83E8btck7kYPmVz"
# RFkDDs1eZCQmAKknvyrP5XbpyeaihFaFL2 KMD 4345.79883919
./komodo-cli sendtoaddress RFkDDs1eZCQmAKknvyrP5XbpyeaihFaFL2 4345.79883919
sleep 3
echo "4345.79883919 <- expected amount RFkDDs1eZCQmAKknvyrP5XbpyeaihFaFL2"
# RQgfzPR4zeCyLWaddHysGEVzoKLZa5E4Ut KMD 5743.12343812
./komodo-cli sendtoaddress RQgfzPR4zeCyLWaddHysGEVzoKLZa5E4Ut 5743.12343812
sleep 3
echo "5743.12343812 <- expected amount RQgfzPR4zeCyLWaddHysGEVzoKLZa5E4Ut"
# RTSn55yrw2xUWM8bxVcG84ga84dofPfsuD KMD 9680.24754799
./komodo-cli sendtoaddress RTSn55yrw2xUWM8bxVcG84ga84dofPfsuD 9680.24754799
sleep 3
echo "9680.24754799 <- expected amount RTSn55yrw2xUWM8bxVcG84ga84dofPfsuD"
# RBboFD6fhYF11C883DxvLx5dDmbbs73XC3 KMD 1819.54181879
./komodo-cli sendtoaddress RBboFD6fhYF11C883DxvLx5dDmbbs73XC3 1819.54181879
sleep 3
echo "1819.54181879 <- expected amount RBboFD6fhYF11C883DxvLx5dDmbbs73XC3"
# RCKVUKnC3pjVkjnDfnBj1Eu68yc8ELdMC5 KMD 863.61179282, REVS 0.91962079
# RCKVUKnC3pjVkjnDfnBj1Eu68yc8ELdMC5 KMD 863.61179282
./komodo-cli sendtoaddress RCKVUKnC3pjVkjnDfnBj1Eu68yc8ELdMC5 863.61179282
sleep 3
echo "863.61179282 <- expected amount RCKVUKnC3pjVkjnDfnBj1Eu68yc8ELdMC5"
# RU3EDov1PTPAY8WhG5eGUANp2rvtki1yc9 KMD 0.00050130
./komodo-cli sendtoaddress RU3EDov1PTPAY8WhG5eGUANp2rvtki1yc9 0.00050130
sleep 3
echo "0.00050130 <- expected amount RU3EDov1PTPAY8WhG5eGUANp2rvtki1yc9"
# RHJ55iWUQNbKcSn8shbv1RbGuip3RSRHFv KMD 693.08132289
./komodo-cli sendtoaddress RHJ55iWUQNbKcSn8shbv1RbGuip3RSRHFv 693.08132289
sleep 3
echo "693.08132289 <- expected amount RHJ55iWUQNbKcSn8shbv1RbGuip3RSRHFv"
# RUrV1qvjBapCDGQnwpdhyneGhX1wiHZwVr KMD 16087.76566759, REVS 319.20361833
# RUrV1qvjBapCDGQnwpdhyneGhX1wiHZwVr KMD 16087.76566759
./komodo-cli sendtoaddress RUrV1qvjBapCDGQnwpdhyneGhX1wiHZwVr 16087.76566759
sleep 3
echo "16087.76566759 <- expected amount RUrV1qvjBapCDGQnwpdhyneGhX1wiHZwVr"
# R9V8qEoa5zjgoJ2kDARXTyhjjvkzcTANC5 KMD 5577.49583640
./komodo-cli sendtoaddress R9V8qEoa5zjgoJ2kDARXTyhjjvkzcTANC5 5577.49583640
sleep 3
echo "5577.49583640 <- expected amount R9V8qEoa5zjgoJ2kDARXTyhjjvkzcTANC5"
# RJJdqon3kYcXtyiTujiHBxAMj9QXrgfUbw KMD 774.65219950
./komodo-cli sendtoaddress RJJdqon3kYcXtyiTujiHBxAMj9QXrgfUbw 774.65219950
sleep 3
echo "774.65219950 <- expected amount RJJdqon3kYcXtyiTujiHBxAMj9QXrgfUbw"
# RNqJvqLSS9zpCJYFv8gDPgeUBx72Hk4as2 KMD 13362.75044137
./komodo-cli sendtoaddress RNqJvqLSS9zpCJYFv8gDPgeUBx72Hk4as2 13362.75044137
sleep 3
echo "13362.75044137 <- expected amount RNqJvqLSS9zpCJYFv8gDPgeUBx72Hk4as2"
# RH8i5cGy1QMK2sTehLEAqjX2Ph8FJ94LWJ KMD 8569.02441659
./komodo-cli sendtoaddress RH8i5cGy1QMK2sTehLEAqjX2Ph8FJ94LWJ 8569.02441659
sleep 3
echo "8569.02441659 <- expected amount RH8i5cGy1QMK2sTehLEAqjX2Ph8FJ94LWJ"
# RCEXKrX2kkQQrFu6arLBLNYYZFtdgHwATt KMD 9683.15249375
./komodo-cli sendtoaddress RCEXKrX2kkQQrFu6arLBLNYYZFtdgHwATt 9683.15249375
sleep 3
echo "9683.15249375 <- expected amount RCEXKrX2kkQQrFu6arLBLNYYZFtdgHwATt"
# RE3f1f5XQsntqQkwpVZwyzr1YbupdPbjiS KMD 7916.77211172
./komodo-cli sendtoaddress RE3f1f5XQsntqQkwpVZwyzr1YbupdPbjiS 7916.77211172
sleep 3
echo "7916.77211172 <- expected amount RE3f1f5XQsntqQkwpVZwyzr1YbupdPbjiS"
# RWoKDt8BzEQc3WtYUpXmCxRwB1Tg3AWcPR KMD 722.28571081
./komodo-cli sendtoaddress RWoKDt8BzEQc3WtYUpXmCxRwB1Tg3AWcPR 722.28571081
sleep 3
echo "722.28571081 <- expected amount RWoKDt8BzEQc3WtYUpXmCxRwB1Tg3AWcPR"
# RNwfApozgMUmKvJCdrJWQZZCw3hEUWaNk1 KMD 709.73247788
./komodo-cli sendtoaddress RNwfApozgMUmKvJCdrJWQZZCw3hEUWaNk1 709.73247788
sleep 3
echo "709.73247788 <- expected amount RNwfApozgMUmKvJCdrJWQZZCw3hEUWaNk1"
# RKQPNcePppEkV4CMXZrwqEMAvRHbruKVdF KMD 419.36278156
./komodo-cli sendtoaddress RKQPNcePppEkV4CMXZrwqEMAvRHbruKVdF 419.36278156
sleep 3
echo "419.36278156 <- expected amount RKQPNcePppEkV4CMXZrwqEMAvRHbruKVdF"
# total KMD 675297.04318319 REVS 0.00000000

188
iguana/tests/KMD.batch11.importaddress

@ -0,0 +1,188 @@
# RWTfFTP7c9WxLhgxd2EXSsKszpDVPXHN8A KMD 42.40642295
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RWTfFTP7c9WxLhgxd2EXSsKszpDVPXHN8A\",\"symbol\":\"KMD\"}" # 42.40642295
sleep 3
echo "42.40642295 <- expected amount RWTfFTP7c9WxLhgxd2EXSsKszpDVPXHN8A"
# RMnuGgpEzWcxYi861E7BjGMURCFX2Szj2v KMD 1248.93505747
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RMnuGgpEzWcxYi861E7BjGMURCFX2Szj2v\",\"symbol\":\"KMD\"}" # 1248.93505747
sleep 3
echo "1248.93505747 <- expected amount RMnuGgpEzWcxYi861E7BjGMURCFX2Szj2v"
# RC8jWr1QQsRyo1pDkue8AxGs58Wyz4F3wZ KMD 2684.14739323
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RC8jWr1QQsRyo1pDkue8AxGs58Wyz4F3wZ\",\"symbol\":\"KMD\"}" # 2684.14739323
sleep 3
echo "2684.14739323 <- expected amount RC8jWr1QQsRyo1pDkue8AxGs58Wyz4F3wZ"
# RTUWRmRe543k8vrwuRXQ7BkFhkK4i2dq5A KMD 19366.30498750
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RTUWRmRe543k8vrwuRXQ7BkFhkK4i2dq5A\",\"symbol\":\"KMD\"}" # 19366.30498750
sleep 3
echo "19366.30498750 <- expected amount RTUWRmRe543k8vrwuRXQ7BkFhkK4i2dq5A"
# RPqAFgwnB1hjae6Ar4Kms973uS93HbDkoB KMD 209558.53271075
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RPqAFgwnB1hjae6Ar4Kms973uS93HbDkoB\",\"symbol\":\"KMD\"}" # 209558.53271075
sleep 3
echo "209558.53271075 <- expected amount RPqAFgwnB1hjae6Ar4Kms973uS93HbDkoB"
# RNW6Kkcdktbeemd2n8NVPCfgnRirzWoiZY KMD 32675.00548454
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RNW6Kkcdktbeemd2n8NVPCfgnRirzWoiZY\",\"symbol\":\"KMD\"}" # 32675.00548454
sleep 3
echo "32675.00548454 <- expected amount RNW6Kkcdktbeemd2n8NVPCfgnRirzWoiZY"
# RNUw6ePdaQ4mXSo9koqGtMDzEC43gCvDrK KMD 15037.55193116
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RNUw6ePdaQ4mXSo9koqGtMDzEC43gCvDrK\",\"symbol\":\"KMD\"}" # 15037.55193116
sleep 3
echo "15037.55193116 <- expected amount RNUw6ePdaQ4mXSo9koqGtMDzEC43gCvDrK"
# RLu6gRHKwXjvv64QZGiLT7uHEVRrH9mHDn KMD 1022.54090334
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RLu6gRHKwXjvv64QZGiLT7uHEVRrH9mHDn\",\"symbol\":\"KMD\"}" # 1022.54090334
sleep 3
echo "1022.54090334 <- expected amount RLu6gRHKwXjvv64QZGiLT7uHEVRrH9mHDn"
# RTJXwRhuAH9iyztyuRuGC8G7DamTgSMGvT KMD 172688.45447080
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RTJXwRhuAH9iyztyuRuGC8G7DamTgSMGvT\",\"symbol\":\"KMD\"}" # 172688.45447080
sleep 3
echo "172688.45447080 <- expected amount RTJXwRhuAH9iyztyuRuGC8G7DamTgSMGvT"
# RDKb3QykRJNfLKWLcbbv9z7xqbtxwB54GC KMD 35255.61377633
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RDKb3QykRJNfLKWLcbbv9z7xqbtxwB54GC\",\"symbol\":\"KMD\"}" # 35255.61377633
sleep 3
echo "35255.61377633 <- expected amount RDKb3QykRJNfLKWLcbbv9z7xqbtxwB54GC"
# RH7cfyUkBwrLbxfWBggcbV3UgzaAHyy3J8 KMD 4509.36353351
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RH7cfyUkBwrLbxfWBggcbV3UgzaAHyy3J8\",\"symbol\":\"KMD\"}" # 4509.36353351
sleep 3
echo "4509.36353351 <- expected amount RH7cfyUkBwrLbxfWBggcbV3UgzaAHyy3J8"
# RCSH7RtDM51e346niSiUk9HiYDrDiqcyev KMD 8622.26398257
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RCSH7RtDM51e346niSiUk9HiYDrDiqcyev\",\"symbol\":\"KMD\"}" # 8622.26398257
sleep 3
echo "8622.26398257 <- expected amount RCSH7RtDM51e346niSiUk9HiYDrDiqcyev"
# RBYMsuS89HQKxNCZB3xb1UxRyfLMLvrbmc KMD 1904.65394401, REVS 37.80134078
# RBYMsuS89HQKxNCZB3xb1UxRyfLMLvrbmc KMD 1904.65394401
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RBYMsuS89HQKxNCZB3xb1UxRyfLMLvrbmc\",\"symbol\":\"KMD\"}" # 1904.65394401
sleep 3
echo "1904.65394401 <- expected amount RBYMsuS89HQKxNCZB3xb1UxRyfLMLvrbmc"
# RUr4x8gjCU9EmbLWpYBdsJDyt1oye52iog KMD 1894.96063707
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RUr4x8gjCU9EmbLWpYBdsJDyt1oye52iog\",\"symbol\":\"KMD\"}" # 1894.96063707
sleep 3
echo "1894.96063707 <- expected amount RUr4x8gjCU9EmbLWpYBdsJDyt1oye52iog"
# RBW6wjWoEsu22APzSfJemWi96bQZFJvEGZ KMD 55379.83556127
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RBW6wjWoEsu22APzSfJemWi96bQZFJvEGZ\",\"symbol\":\"KMD\"}" # 55379.83556127
sleep 3
echo "55379.83556127 <- expected amount RBW6wjWoEsu22APzSfJemWi96bQZFJvEGZ"
# RAMvDwi58oyArqfGseWZsYbR2BN3L7ghVX KMD 109.47952512
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RAMvDwi58oyArqfGseWZsYbR2BN3L7ghVX\",\"symbol\":\"KMD\"}" # 109.47952512
sleep 3
echo "109.47952512 <- expected amount RAMvDwi58oyArqfGseWZsYbR2BN3L7ghVX"
# RXs11ZkaMLV9ZVAJ93LNjF4TRri2QBHn4J KMD 2903.00911762
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RXs11ZkaMLV9ZVAJ93LNjF4TRri2QBHn4J\",\"symbol\":\"KMD\"}" # 2903.00911762
sleep 3
echo "2903.00911762 <- expected amount RXs11ZkaMLV9ZVAJ93LNjF4TRri2QBHn4J"
# RHy56MTg74v8AY1Eo2RgbohbMbdHjUDN47 KMD 8344.85486318
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RHy56MTg74v8AY1Eo2RgbohbMbdHjUDN47\",\"symbol\":\"KMD\"}" # 8344.85486318
sleep 3
echo "8344.85486318 <- expected amount RHy56MTg74v8AY1Eo2RgbohbMbdHjUDN47"
# RQM36oUWQFipUvhPnyoNr8f8CgmJ6W6HR3 KMD 9295.82639400
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RQM36oUWQFipUvhPnyoNr8f8CgmJ6W6HR3\",\"symbol\":\"KMD\"}" # 9295.82639400
sleep 3
echo "9295.82639400 <- expected amount RQM36oUWQFipUvhPnyoNr8f8CgmJ6W6HR3"
# RLyaf3XgjHruSeJd4oj83E8btck7kYPmVz KMD 5784.90308850
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RLyaf3XgjHruSeJd4oj83E8btck7kYPmVz\",\"symbol\":\"KMD\"}" # 5784.90308850
sleep 3
echo "5784.90308850 <- expected amount RLyaf3XgjHruSeJd4oj83E8btck7kYPmVz"
# RFkDDs1eZCQmAKknvyrP5XbpyeaihFaFL2 KMD 4345.79883919
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RFkDDs1eZCQmAKknvyrP5XbpyeaihFaFL2\",\"symbol\":\"KMD\"}" # 4345.79883919
sleep 3
echo "4345.79883919 <- expected amount RFkDDs1eZCQmAKknvyrP5XbpyeaihFaFL2"
# RQgfzPR4zeCyLWaddHysGEVzoKLZa5E4Ut KMD 5743.12343812
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RQgfzPR4zeCyLWaddHysGEVzoKLZa5E4Ut\",\"symbol\":\"KMD\"}" # 5743.12343812
sleep 3
echo "5743.12343812 <- expected amount RQgfzPR4zeCyLWaddHysGEVzoKLZa5E4Ut"
# RTSn55yrw2xUWM8bxVcG84ga84dofPfsuD KMD 9680.24754799
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RTSn55yrw2xUWM8bxVcG84ga84dofPfsuD\",\"symbol\":\"KMD\"}" # 9680.24754799
sleep 3
echo "9680.24754799 <- expected amount RTSn55yrw2xUWM8bxVcG84ga84dofPfsuD"
# RBboFD6fhYF11C883DxvLx5dDmbbs73XC3 KMD 1819.54181879
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RBboFD6fhYF11C883DxvLx5dDmbbs73XC3\",\"symbol\":\"KMD\"}" # 1819.54181879
sleep 3
echo "1819.54181879 <- expected amount RBboFD6fhYF11C883DxvLx5dDmbbs73XC3"
# RCKVUKnC3pjVkjnDfnBj1Eu68yc8ELdMC5 KMD 863.61179282, REVS 0.91962079
# RCKVUKnC3pjVkjnDfnBj1Eu68yc8ELdMC5 KMD 863.61179282
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RCKVUKnC3pjVkjnDfnBj1Eu68yc8ELdMC5\",\"symbol\":\"KMD\"}" # 863.61179282
sleep 3
echo "863.61179282 <- expected amount RCKVUKnC3pjVkjnDfnBj1Eu68yc8ELdMC5"
# RU3EDov1PTPAY8WhG5eGUANp2rvtki1yc9 KMD 0.00050130
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RU3EDov1PTPAY8WhG5eGUANp2rvtki1yc9\",\"symbol\":\"KMD\"}" # 0.00050130
sleep 3
echo "0.00050130 <- expected amount RU3EDov1PTPAY8WhG5eGUANp2rvtki1yc9"
# RHJ55iWUQNbKcSn8shbv1RbGuip3RSRHFv KMD 693.08132289
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RHJ55iWUQNbKcSn8shbv1RbGuip3RSRHFv\",\"symbol\":\"KMD\"}" # 693.08132289
sleep 3
echo "693.08132289 <- expected amount RHJ55iWUQNbKcSn8shbv1RbGuip3RSRHFv"
# RUrV1qvjBapCDGQnwpdhyneGhX1wiHZwVr KMD 16087.76566759, REVS 319.20361833
# RUrV1qvjBapCDGQnwpdhyneGhX1wiHZwVr KMD 16087.76566759
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RUrV1qvjBapCDGQnwpdhyneGhX1wiHZwVr\",\"symbol\":\"KMD\"}" # 16087.76566759
sleep 3
echo "16087.76566759 <- expected amount RUrV1qvjBapCDGQnwpdhyneGhX1wiHZwVr"
# R9V8qEoa5zjgoJ2kDARXTyhjjvkzcTANC5 KMD 5577.49583640
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"R9V8qEoa5zjgoJ2kDARXTyhjjvkzcTANC5\",\"symbol\":\"KMD\"}" # 5577.49583640
sleep 3
echo "5577.49583640 <- expected amount R9V8qEoa5zjgoJ2kDARXTyhjjvkzcTANC5"
# RJJdqon3kYcXtyiTujiHBxAMj9QXrgfUbw KMD 774.65219950
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RJJdqon3kYcXtyiTujiHBxAMj9QXrgfUbw\",\"symbol\":\"KMD\"}" # 774.65219950
sleep 3
echo "774.65219950 <- expected amount RJJdqon3kYcXtyiTujiHBxAMj9QXrgfUbw"
# RNqJvqLSS9zpCJYFv8gDPgeUBx72Hk4as2 KMD 13362.75044137
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RNqJvqLSS9zpCJYFv8gDPgeUBx72Hk4as2\",\"symbol\":\"KMD\"}" # 13362.75044137
sleep 3
echo "13362.75044137 <- expected amount RNqJvqLSS9zpCJYFv8gDPgeUBx72Hk4as2"
# RH8i5cGy1QMK2sTehLEAqjX2Ph8FJ94LWJ KMD 8569.02441659
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RH8i5cGy1QMK2sTehLEAqjX2Ph8FJ94LWJ\",\"symbol\":\"KMD\"}" # 8569.02441659
sleep 3
echo "8569.02441659 <- expected amount RH8i5cGy1QMK2sTehLEAqjX2Ph8FJ94LWJ"
# RCEXKrX2kkQQrFu6arLBLNYYZFtdgHwATt KMD 9683.15249375
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RCEXKrX2kkQQrFu6arLBLNYYZFtdgHwATt\",\"symbol\":\"KMD\"}" # 9683.15249375
sleep 3
echo "9683.15249375 <- expected amount RCEXKrX2kkQQrFu6arLBLNYYZFtdgHwATt"
# RE3f1f5XQsntqQkwpVZwyzr1YbupdPbjiS KMD 7916.77211172
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RE3f1f5XQsntqQkwpVZwyzr1YbupdPbjiS\",\"symbol\":\"KMD\"}" # 7916.77211172
sleep 3
echo "7916.77211172 <- expected amount RE3f1f5XQsntqQkwpVZwyzr1YbupdPbjiS"
# RWoKDt8BzEQc3WtYUpXmCxRwB1Tg3AWcPR KMD 722.28571081
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RWoKDt8BzEQc3WtYUpXmCxRwB1Tg3AWcPR\",\"symbol\":\"KMD\"}" # 722.28571081
sleep 3
echo "722.28571081 <- expected amount RWoKDt8BzEQc3WtYUpXmCxRwB1Tg3AWcPR"
# RNwfApozgMUmKvJCdrJWQZZCw3hEUWaNk1 KMD 709.73247788
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RNwfApozgMUmKvJCdrJWQZZCw3hEUWaNk1\",\"symbol\":\"KMD\"}" # 709.73247788
sleep 3
echo "709.73247788 <- expected amount RNwfApozgMUmKvJCdrJWQZZCw3hEUWaNk1"
# RKQPNcePppEkV4CMXZrwqEMAvRHbruKVdF KMD 419.36278156
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RKQPNcePppEkV4CMXZrwqEMAvRHbruKVdF\",\"symbol\":\"KMD\"}" # 419.36278156
sleep 3
echo "419.36278156 <- expected amount RKQPNcePppEkV4CMXZrwqEMAvRHbruKVdF"

151
iguana/tests/KMD.batch11.listunspent

@ -0,0 +1,151 @@
# RWTfFTP7c9WxLhgxd2EXSsKszpDVPXHN8A KMD 42.40642295
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RWTfFTP7c9WxLhgxd2EXSsKszpDVPXHN8A\",\"symbol\":\"KMD\"}"
echo "42.40642295 <- expected amount RWTfFTP7c9WxLhgxd2EXSsKszpDVPXHN8A"
# RMnuGgpEzWcxYi861E7BjGMURCFX2Szj2v KMD 1248.93505747
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RMnuGgpEzWcxYi861E7BjGMURCFX2Szj2v\",\"symbol\":\"KMD\"}"
echo "1248.93505747 <- expected amount RMnuGgpEzWcxYi861E7BjGMURCFX2Szj2v"
# RC8jWr1QQsRyo1pDkue8AxGs58Wyz4F3wZ KMD 2684.14739323
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RC8jWr1QQsRyo1pDkue8AxGs58Wyz4F3wZ\",\"symbol\":\"KMD\"}"
echo "2684.14739323 <- expected amount RC8jWr1QQsRyo1pDkue8AxGs58Wyz4F3wZ"
# RTUWRmRe543k8vrwuRXQ7BkFhkK4i2dq5A KMD 19366.30498750
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RTUWRmRe543k8vrwuRXQ7BkFhkK4i2dq5A\",\"symbol\":\"KMD\"}"
echo "19366.30498750 <- expected amount RTUWRmRe543k8vrwuRXQ7BkFhkK4i2dq5A"
# RPqAFgwnB1hjae6Ar4Kms973uS93HbDkoB KMD 209558.53271075
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RPqAFgwnB1hjae6Ar4Kms973uS93HbDkoB\",\"symbol\":\"KMD\"}"
echo "209558.53271075 <- expected amount RPqAFgwnB1hjae6Ar4Kms973uS93HbDkoB"
# RNW6Kkcdktbeemd2n8NVPCfgnRirzWoiZY KMD 32675.00548454
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RNW6Kkcdktbeemd2n8NVPCfgnRirzWoiZY\",\"symbol\":\"KMD\"}"
echo "32675.00548454 <- expected amount RNW6Kkcdktbeemd2n8NVPCfgnRirzWoiZY"
# RNUw6ePdaQ4mXSo9koqGtMDzEC43gCvDrK KMD 15037.55193116
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RNUw6ePdaQ4mXSo9koqGtMDzEC43gCvDrK\",\"symbol\":\"KMD\"}"
echo "15037.55193116 <- expected amount RNUw6ePdaQ4mXSo9koqGtMDzEC43gCvDrK"
# RLu6gRHKwXjvv64QZGiLT7uHEVRrH9mHDn KMD 1022.54090334
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RLu6gRHKwXjvv64QZGiLT7uHEVRrH9mHDn\",\"symbol\":\"KMD\"}"
echo "1022.54090334 <- expected amount RLu6gRHKwXjvv64QZGiLT7uHEVRrH9mHDn"
# RTJXwRhuAH9iyztyuRuGC8G7DamTgSMGvT KMD 172688.45447080
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RTJXwRhuAH9iyztyuRuGC8G7DamTgSMGvT\",\"symbol\":\"KMD\"}"
echo "172688.45447080 <- expected amount RTJXwRhuAH9iyztyuRuGC8G7DamTgSMGvT"
# RDKb3QykRJNfLKWLcbbv9z7xqbtxwB54GC KMD 35255.61377633
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RDKb3QykRJNfLKWLcbbv9z7xqbtxwB54GC\",\"symbol\":\"KMD\"}"
echo "35255.61377633 <- expected amount RDKb3QykRJNfLKWLcbbv9z7xqbtxwB54GC"
# RH7cfyUkBwrLbxfWBggcbV3UgzaAHyy3J8 KMD 4509.36353351
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RH7cfyUkBwrLbxfWBggcbV3UgzaAHyy3J8\",\"symbol\":\"KMD\"}"
echo "4509.36353351 <- expected amount RH7cfyUkBwrLbxfWBggcbV3UgzaAHyy3J8"
# RCSH7RtDM51e346niSiUk9HiYDrDiqcyev KMD 8622.26398257
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RCSH7RtDM51e346niSiUk9HiYDrDiqcyev\",\"symbol\":\"KMD\"}"
echo "8622.26398257 <- expected amount RCSH7RtDM51e346niSiUk9HiYDrDiqcyev"
# RBYMsuS89HQKxNCZB3xb1UxRyfLMLvrbmc KMD 1904.65394401, REVS 37.80134078
# RBYMsuS89HQKxNCZB3xb1UxRyfLMLvrbmc KMD 1904.65394401
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RBYMsuS89HQKxNCZB3xb1UxRyfLMLvrbmc\",\"symbol\":\"KMD\"}"
echo "1904.65394401 <- expected amount RBYMsuS89HQKxNCZB3xb1UxRyfLMLvrbmc"
# RUr4x8gjCU9EmbLWpYBdsJDyt1oye52iog KMD 1894.96063707
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RUr4x8gjCU9EmbLWpYBdsJDyt1oye52iog\",\"symbol\":\"KMD\"}"
echo "1894.96063707 <- expected amount RUr4x8gjCU9EmbLWpYBdsJDyt1oye52iog"
# RBW6wjWoEsu22APzSfJemWi96bQZFJvEGZ KMD 55379.83556127
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RBW6wjWoEsu22APzSfJemWi96bQZFJvEGZ\",\"symbol\":\"KMD\"}"
echo "55379.83556127 <- expected amount RBW6wjWoEsu22APzSfJemWi96bQZFJvEGZ"
# RAMvDwi58oyArqfGseWZsYbR2BN3L7ghVX KMD 109.47952512
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RAMvDwi58oyArqfGseWZsYbR2BN3L7ghVX\",\"symbol\":\"KMD\"}"
echo "109.47952512 <- expected amount RAMvDwi58oyArqfGseWZsYbR2BN3L7ghVX"
# RXs11ZkaMLV9ZVAJ93LNjF4TRri2QBHn4J KMD 2903.00911762
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RXs11ZkaMLV9ZVAJ93LNjF4TRri2QBHn4J\",\"symbol\":\"KMD\"}"
echo "2903.00911762 <- expected amount RXs11ZkaMLV9ZVAJ93LNjF4TRri2QBHn4J"
# RHy56MTg74v8AY1Eo2RgbohbMbdHjUDN47 KMD 8344.85486318
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RHy56MTg74v8AY1Eo2RgbohbMbdHjUDN47\",\"symbol\":\"KMD\"}"
echo "8344.85486318 <- expected amount RHy56MTg74v8AY1Eo2RgbohbMbdHjUDN47"
# RQM36oUWQFipUvhPnyoNr8f8CgmJ6W6HR3 KMD 9295.82639400
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RQM36oUWQFipUvhPnyoNr8f8CgmJ6W6HR3\",\"symbol\":\"KMD\"}"
echo "9295.82639400 <- expected amount RQM36oUWQFipUvhPnyoNr8f8CgmJ6W6HR3"
# RLyaf3XgjHruSeJd4oj83E8btck7kYPmVz KMD 5784.90308850
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RLyaf3XgjHruSeJd4oj83E8btck7kYPmVz\",\"symbol\":\"KMD\"}"
echo "5784.90308850 <- expected amount RLyaf3XgjHruSeJd4oj83E8btck7kYPmVz"
# RFkDDs1eZCQmAKknvyrP5XbpyeaihFaFL2 KMD 4345.79883919
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RFkDDs1eZCQmAKknvyrP5XbpyeaihFaFL2\",\"symbol\":\"KMD\"}"
echo "4345.79883919 <- expected amount RFkDDs1eZCQmAKknvyrP5XbpyeaihFaFL2"
# RQgfzPR4zeCyLWaddHysGEVzoKLZa5E4Ut KMD 5743.12343812
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RQgfzPR4zeCyLWaddHysGEVzoKLZa5E4Ut\",\"symbol\":\"KMD\"}"
echo "5743.12343812 <- expected amount RQgfzPR4zeCyLWaddHysGEVzoKLZa5E4Ut"
# RTSn55yrw2xUWM8bxVcG84ga84dofPfsuD KMD 9680.24754799
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RTSn55yrw2xUWM8bxVcG84ga84dofPfsuD\",\"symbol\":\"KMD\"}"
echo "9680.24754799 <- expected amount RTSn55yrw2xUWM8bxVcG84ga84dofPfsuD"
# RBboFD6fhYF11C883DxvLx5dDmbbs73XC3 KMD 1819.54181879
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RBboFD6fhYF11C883DxvLx5dDmbbs73XC3\",\"symbol\":\"KMD\"}"
echo "1819.54181879 <- expected amount RBboFD6fhYF11C883DxvLx5dDmbbs73XC3"
# RCKVUKnC3pjVkjnDfnBj1Eu68yc8ELdMC5 KMD 863.61179282, REVS 0.91962079
# RCKVUKnC3pjVkjnDfnBj1Eu68yc8ELdMC5 KMD 863.61179282
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RCKVUKnC3pjVkjnDfnBj1Eu68yc8ELdMC5\",\"symbol\":\"KMD\"}"
echo "863.61179282 <- expected amount RCKVUKnC3pjVkjnDfnBj1Eu68yc8ELdMC5"
# RU3EDov1PTPAY8WhG5eGUANp2rvtki1yc9 KMD 0.00050130
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RU3EDov1PTPAY8WhG5eGUANp2rvtki1yc9\",\"symbol\":\"KMD\"}"
echo "0.00050130 <- expected amount RU3EDov1PTPAY8WhG5eGUANp2rvtki1yc9"
# RHJ55iWUQNbKcSn8shbv1RbGuip3RSRHFv KMD 693.08132289
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RHJ55iWUQNbKcSn8shbv1RbGuip3RSRHFv\",\"symbol\":\"KMD\"}"
echo "693.08132289 <- expected amount RHJ55iWUQNbKcSn8shbv1RbGuip3RSRHFv"
# RUrV1qvjBapCDGQnwpdhyneGhX1wiHZwVr KMD 16087.76566759, REVS 319.20361833
# RUrV1qvjBapCDGQnwpdhyneGhX1wiHZwVr KMD 16087.76566759
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RUrV1qvjBapCDGQnwpdhyneGhX1wiHZwVr\",\"symbol\":\"KMD\"}"
echo "16087.76566759 <- expected amount RUrV1qvjBapCDGQnwpdhyneGhX1wiHZwVr"
# R9V8qEoa5zjgoJ2kDARXTyhjjvkzcTANC5 KMD 5577.49583640
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"R9V8qEoa5zjgoJ2kDARXTyhjjvkzcTANC5\",\"symbol\":\"KMD\"}"
echo "5577.49583640 <- expected amount R9V8qEoa5zjgoJ2kDARXTyhjjvkzcTANC5"
# RJJdqon3kYcXtyiTujiHBxAMj9QXrgfUbw KMD 774.65219950
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RJJdqon3kYcXtyiTujiHBxAMj9QXrgfUbw\",\"symbol\":\"KMD\"}"
echo "774.65219950 <- expected amount RJJdqon3kYcXtyiTujiHBxAMj9QXrgfUbw"
# RNqJvqLSS9zpCJYFv8gDPgeUBx72Hk4as2 KMD 13362.75044137
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RNqJvqLSS9zpCJYFv8gDPgeUBx72Hk4as2\",\"symbol\":\"KMD\"}"
echo "13362.75044137 <- expected amount RNqJvqLSS9zpCJYFv8gDPgeUBx72Hk4as2"
# RH8i5cGy1QMK2sTehLEAqjX2Ph8FJ94LWJ KMD 8569.02441659
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RH8i5cGy1QMK2sTehLEAqjX2Ph8FJ94LWJ\",\"symbol\":\"KMD\"}"
echo "8569.02441659 <- expected amount RH8i5cGy1QMK2sTehLEAqjX2Ph8FJ94LWJ"
# RCEXKrX2kkQQrFu6arLBLNYYZFtdgHwATt KMD 9683.15249375
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RCEXKrX2kkQQrFu6arLBLNYYZFtdgHwATt\",\"symbol\":\"KMD\"}"
echo "9683.15249375 <- expected amount RCEXKrX2kkQQrFu6arLBLNYYZFtdgHwATt"
# RE3f1f5XQsntqQkwpVZwyzr1YbupdPbjiS KMD 7916.77211172
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RE3f1f5XQsntqQkwpVZwyzr1YbupdPbjiS\",\"symbol\":\"KMD\"}"
echo "7916.77211172 <- expected amount RE3f1f5XQsntqQkwpVZwyzr1YbupdPbjiS"
# RWoKDt8BzEQc3WtYUpXmCxRwB1Tg3AWcPR KMD 722.28571081
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RWoKDt8BzEQc3WtYUpXmCxRwB1Tg3AWcPR\",\"symbol\":\"KMD\"}"
echo "722.28571081 <- expected amount RWoKDt8BzEQc3WtYUpXmCxRwB1Tg3AWcPR"
# RNwfApozgMUmKvJCdrJWQZZCw3hEUWaNk1 KMD 709.73247788
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RNwfApozgMUmKvJCdrJWQZZCw3hEUWaNk1\",\"symbol\":\"KMD\"}"
echo "709.73247788 <- expected amount RNwfApozgMUmKvJCdrJWQZZCw3hEUWaNk1"
# RKQPNcePppEkV4CMXZrwqEMAvRHbruKVdF KMD 419.36278156
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RKQPNcePppEkV4CMXZrwqEMAvRHbruKVdF\",\"symbol\":\"KMD\"}"
echo "419.36278156 <- expected amount RKQPNcePppEkV4CMXZrwqEMAvRHbruKVdF"

4
iguana/tests/REVS.batch10

@ -1,3 +1,4 @@
sleep 999999
# RF4jZsF5BUckQqX5hsS68kjQMYSba8Fypm KMD 40223.19497203, REVS 101.00000000
sleep 1
fiat/revs sendtoaddress RF4jZsF5BUckQqX5hsS68kjQMYSba8Fypm 101.00000000
@ -6,3 +7,6 @@ sleep 1
fiat/revs sendtoaddress RGQmMzmUfa6R5dZvvL5wvy2vxPLEcgkkyC 2.73426759
# total KMD 0.00000000 REVS 103.73426759
64c45de19774850698051651ba5476b0de1f213520366d46459de0eccebdaad7
17a5af91044e1461ca8fca70ddd900ae9e50acd7af59bf5af1a9c4cccb20b552

15
iguana/tests/REVS.batch11

@ -0,0 +1,15 @@
sleep 99999
# RBYMsuS89HQKxNCZB3xb1UxRyfLMLvrbmc KMD 1904.65394401, REVS 37.80134078
sleep 1
fiat/revs sendtoaddress RBYMsuS89HQKxNCZB3xb1UxRyfLMLvrbmc 37.80134078
# RCKVUKnC3pjVkjnDfnBj1Eu68yc8ELdMC5 KMD 863.61179282, REVS 0.91962079
sleep 1
fiat/revs sendtoaddress RCKVUKnC3pjVkjnDfnBj1Eu68yc8ELdMC5 0.91962079
# RUrV1qvjBapCDGQnwpdhyneGhX1wiHZwVr KMD 16087.76566759, REVS 319.20361833
sleep 1
fiat/revs sendtoaddress RUrV1qvjBapCDGQnwpdhyneGhX1wiHZwVr 319.20361833
94940c0e2adc685722b2bf2525515cdab544afc0ad25af1c4cd2cfa5a06a28cd
e17395d17efa9254e06b566a2719c066ddba6c196f34892ec99bd987abc9dc89
3142dd53cc5a76e6f41b43754e9506d02818571e8d5caed6384fad4f760dc49a

8
iguana/tests/REVS.batch11.importaddress

@ -0,0 +1,8 @@
# RBYMsuS89HQKxNCZB3xb1UxRyfLMLvrbmc KMD 1904.65394401, REVS 37.80134078
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RBYMsuS89HQKxNCZB3xb1UxRyfLMLvrbmc\",\"symbol\":\"REVS\"}" # 37.80134078
sleep 3
# RCKVUKnC3pjVkjnDfnBj1Eu68yc8ELdMC5 KMD 863.61179282, REVS 0.91962079
sleep 1
# RUrV1qvjBapCDGQnwpdhyneGhX1wiHZwVr KMD 16087.76566759, REVS 319.20361833
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RUrV1qvjBapCDGQnwpdhyneGhX1wiHZwVr\",\"symbol\":\"REVS\"}" # 319.20361833
sleep 3

2
iguana/tests/dexlistunspent

@ -1,2 +1,2 @@
#!/bin/bash
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"19rjYdJtRN3qoammX3r1gxy9bvh8p8DmRc\",\"symbol\":\"BTC\"}"
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent2\",\"address\":\"RDKb3QykRJNfLKWLcbbv9z7xqbtxwB54GC\",\"symbol\":\"KMD\"}"

Loading…
Cancel
Save