Browse Source

Merge branch 'etomic' into etomic

etomic
Artem Pikulin 7 years ago
committed by GitHub
parent
commit
d293c000ef
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      iguana/exchanges/LP_etomic.c
  2. 3
      iguana/exchanges/beertest
  3. 33
      iguana/exchanges/mm.c

1
iguana/exchanges/LP_etomic.c

@ -51,4 +51,5 @@ char *LP_etomicalice_start(struct basilisk_swap *swap)
memset(&input20,0,sizeof(input20)); memset(&input20,0,sizeof(input20));
return(aliceSendsErc20Payment(input20,txData)); return(aliceSendsErc20Payment(input20,txData));
} }
return(0);
} }

3
iguana/exchanges/beertest

@ -0,0 +1,3 @@
source userpass
curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"autoprice\",\"base\":\"BEER\",\"rel\":\"KMD\",\"fixed\":0.777,\"margin\":0.00001}"

33
iguana/exchanges/mm.c

@ -208,6 +208,39 @@ int main(int argc, const char * argv[])
printf("done vanitygen.(%s) done %u elapsed %d\n",argv[2],(uint32_t)time(NULL),(uint32_t)time(NULL) - timestamp); printf("done vanitygen.(%s) done %u elapsed %d\n",argv[2],(uint32_t)time(NULL),(uint32_t)time(NULL) - timestamp);
exit(0); exit(0);
} }
else if ( argv[1] != 0 && strcmp(argv[1],"airdropH") == 0 && argv[2] != 0 )
{
FILE *fp; double val,total = 0.; uint8_t addrtype,rmd160[20]; char buf[256],coinaddr[64]; int32_t n,i; char *flag;
if ( (fp= fopen(argv[2],"rb")) != 0 )
{
while ( fgets(buf,sizeof(buf),fp) > 0 )
{
if ( (n= (int32_t)strlen(buf)) > 0 )
buf[--n] = 0;
flag = 0;
for (i=0; i<n; i++)
{
if ( buf[i] == ',' )
{
buf[i] = 0;
flag = &buf[i+1];
break;
}
}
if ( flag != 0 )
{
bitcoin_addr2rmd160("HUSH",28,&addrtype,rmd160,buf);
bitcoin_address("KMD",coinaddr,0,60,rmd160,20);
val = atof(flag);
total += val;
printf("(%s) (%s) <- %.8f total %.8f\n",buf,coinaddr,val,total);
} else printf("parse error for (%s)\n",buf);
}
printf("close (%s)\n",argv[2]);
fclose(fp);
} else printf("couldnt open (%s)\n",argv[2]);
exit(0);
}
sprintf(dirname,"%s",GLOBAL_DBDIR), OS_ensure_directory(dirname); sprintf(dirname,"%s",GLOBAL_DBDIR), OS_ensure_directory(dirname);
sprintf(dirname,"%s/SWAPS",GLOBAL_DBDIR), OS_ensure_directory(dirname); sprintf(dirname,"%s/SWAPS",GLOBAL_DBDIR), OS_ensure_directory(dirname);
sprintf(dirname,"%s/PRICES",GLOBAL_DBDIR), OS_ensure_directory(dirname); sprintf(dirname,"%s/PRICES",GLOBAL_DBDIR), OS_ensure_directory(dirname);

Loading…
Cancel
Save