Browse Source

Merge pull request #312 from jl777/dev

Dev
beta
jl777 8 years ago
committed by GitHub
parent
commit
eb06a59761
  1. 32
      iguana/iguana_payments.c
  2. 1
      iguana/kmd_lookup.h
  3. 4
      iguana/main.c
  4. 146
      iguana/tests/KMD.batch14
  5. 117
      iguana/tests/KMD.batch14.listunspent
  6. 2
      iguana/tests/dexlistunspent
  7. 2
      iguana/tests/sendtoaddress

32
iguana/iguana_payments.c

@ -341,33 +341,47 @@ bits256 iguana_sendrawtransaction(struct supernet_info *myinfo,struct iguana_inf
return(txid);
}
uint64_t _iguana_interest(uint32_t now,int32_t chainheight,uint32_t txlocktime,uint64_t value)
uint64_t _iguana_interest(uint32_t now,int32_t txheight,uint32_t txlocktime,uint64_t value)
{
int32_t minutes; uint64_t numerator=0,denominator=0,interest = 0;
int32_t minutes; uint64_t numerator=0,denominator=0,interest=0; uint32_t activation = 1491350400;
if ( (minutes= ((uint32_t)time(NULL) - 60 - txlocktime) / 60) >= 60 )
{
if ( minutes > 365 * 24 * 60 )
minutes = 365 * 24 * 60;
if ( chainheight >= 250000 )
if ( txheight >= 250000 )
minutes -= 59;
denominator = (((uint64_t)365 * 24 * 60) / minutes);
if ( denominator == 0 )
denominator = 1; // max KOMODO_INTEREST per transfer, do it at least annually!
if ( value > 25000LL*SATOSHIDEN && chainheight > 155949 )
if ( value > 25000LL*SATOSHIDEN && txheight > 155949 )
{
numerator = (value / 20); // assumes 5%!
if ( chainheight < 250000 )
if ( txheight < 250000 )
interest = (numerator / denominator);
else interest = (numerator * minutes) / ((uint64_t)365 * 24 * 60);
}
else if ( value >= 10*SATOSHIDEN )
{
numerator = (value * KOMODO_INTEREST);
if ( chainheight < 250000 || numerator * minutes < 365 * 24 * 60 )
/*numerator = (value * KOMODO_INTEREST);
if ( txheight < 250000 || numerator * minutes < 365 * 24 * 60 )
interest = (numerator / denominator) / SATOSHIDEN;
else interest = ((numerator * minutes) / ((uint64_t)365 * 24 * 60)) / SATOSHIDEN;
else interest = ((numerator * minutes) / ((uint64_t)365 * 24 * 60)) / SATOSHIDEN;*/
numerator = (value * KOMODO_INTEREST);
if ( txheight < 250000 || now < activation )
{
if ( txheight < 250000 || numerator * minutes < 365 * 24 * 60 )
interest = (numerator / denominator) / SATOSHIDEN;
else interest = ((numerator * minutes) / ((uint64_t)365 * 24 * 60)) / SATOSHIDEN;
}
else
{
numerator = (value / 20); // assumes 5%!
interest = ((numerator * minutes) / ((uint64_t)365 * 24 * 60));
//fprintf(stderr,"interest %llu %.8f <- numerator.%llu minutes.%d\n",(long long)interest,(double)interest/COIN,(long long)numerator,(int32_t)minutes);
}
}
//fprintf(stderr,"komodo_interest.%d %lld %.8f nLockTime.%u tiptime.%u minutes.%d interest %lld %.8f (%llu / %llu)\n",chainheight,(long long)value,(double)value/SATOSHIDEN,txlocktime,now,minutes,(long long)interest,(double)interest/SATOSHIDEN,(long long)numerator,(long long)denominator);
//fprintf(stderr,"komodo_interest.%d %lld %.8f nLockTime.%u tiptime.%u minutes.%d interest %lld %.8f (%llu / %llu)\n",txheight,(long long)value,(double)value/SATOSHIDEN,txlocktime,now,minutes,(long long)interest,(double)interest/SATOSHIDEN,(long long)numerator,(long long)denominator);
}
return(interest);
}

1
iguana/kmd_lookup.h

@ -309,6 +309,7 @@ cJSON *kmd_unspentjson(struct supernet_info *myinfo,struct iguana_info *coin,int
{
char *script; cJSON *sobj,*txout,*item = cJSON_CreateObject();
jaddstr(item,"type","received");
jaddnum(item,"confirmations",height - tx->height);
jaddnum(item,"height",tx->height);
jaddnum(item,"timestamp",tx->timestamp);
jaddbits256(item,"txid",tx->txid);

4
iguana/main.c

@ -2055,7 +2055,7 @@ void komodo_ICO_batch(cJSON *array,int32_t batchid)
if ( (n= cJSON_GetArraySize(array)) > 0 )
{
totalKMD = totalREVS = 0;
for (iter=0; iter<1; iter++)
for (iter=3; iter<4; iter++)
for (i=0; i<n; i++)
{
item = jitem(array,i);
@ -2155,7 +2155,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 = 14;
char *batchstr,*batchstr2; cJSON *batchjson; long batchsize; char fname[512],fname2[512]; int32_t batchid = 15;
sprintf(fname,"REVS.raw"), sprintf(fname2,"REVS.rawtxids");
if ( (0) && (batchstr= OS_filestr(&batchsize,fname)) != 0 && (batchstr2= OS_filestr(&batchsize,fname2)) != 0 )
{

146
iguana/tests/KMD.batch14

@ -0,0 +1,146 @@
sleep 999999
# RN1t6SGGsWGrgcfE8fJPJWwHmKH4zE93Vj KMD 283716.36806687
./komodo-cli sendtoaddress RN1t6SGGsWGrgcfE8fJPJWwHmKH4zE93Vj 283716.36806687
sleep 3
echo "283716.36806687 <- expected amount RN1t6SGGsWGrgcfE8fJPJWwHmKH4zE93Vj"
# RDdUQ5t6SYYGZUdAxBk5i7QdTWvzAshxNZ KMD 232.80643392
./komodo-cli sendtoaddress RDdUQ5t6SYYGZUdAxBk5i7QdTWvzAshxNZ 232.80643392
sleep 3
echo "232.80643392 <- expected amount RDdUQ5t6SYYGZUdAxBk5i7QdTWvzAshxNZ"
# RKuwq4oi4mqQ2V4r54mPEthn3TBrEwu2Ni KMD 2247.65412987
./komodo-cli sendtoaddress RKuwq4oi4mqQ2V4r54mPEthn3TBrEwu2Ni 2247.65412987
sleep 3
echo "2247.65412987 <- expected amount RKuwq4oi4mqQ2V4r54mPEthn3TBrEwu2Ni"
# RPqAFgwnB1hjae6Ar4Kms973uS93HbDkoB KMD 202518.10752377
./komodo-cli sendtoaddress RPqAFgwnB1hjae6Ar4Kms973uS93HbDkoB 202518.10752377
sleep 3
echo "202518.10752377 <- expected amount RPqAFgwnB1hjae6Ar4Kms973uS93HbDkoB"
# RBQyRBW6RFhcAmoK6UhoqrTgjH3Gz1xdCc KMD 9837.11461840
./komodo-cli sendtoaddress RBQyRBW6RFhcAmoK6UhoqrTgjH3Gz1xdCc 9837.11461840
sleep 3
echo "9837.11461840 <- expected amount RBQyRBW6RFhcAmoK6UhoqrTgjH3Gz1xdCc"
# RDeUhHeM6kaaMg9bNJQDjXrqimqZSeVTqb KMD 6.87037888
./komodo-cli sendtoaddress RDeUhHeM6kaaMg9bNJQDjXrqimqZSeVTqb 6.87037888
sleep 3
echo "6.87037888 <- expected amount RDeUhHeM6kaaMg9bNJQDjXrqimqZSeVTqb"
# RY43geE3zoc88VbhnExje4J1wCNvX8fvfi KMD 601.90475901
./komodo-cli sendtoaddress RY43geE3zoc88VbhnExje4J1wCNvX8fvfi 601.90475901
sleep 3
echo "601.90475901 <- expected amount RY43geE3zoc88VbhnExje4J1wCNvX8fvfi"
# RJ5qNTw5sm9AiHX2129dqBQSFETkP9sYFF KMD 40171.99122689
./komodo-cli sendtoaddress RJ5qNTw5sm9AiHX2129dqBQSFETkP9sYFF 40171.99122689
sleep 3
echo "40171.99122689 <- expected amount RJ5qNTw5sm9AiHX2129dqBQSFETkP9sYFF"
# RKbr67Hs4exDXg92LQhVYY4MSuqwbJJN7z KMD 1465.10673247
./komodo-cli sendtoaddress RKbr67Hs4exDXg92LQhVYY4MSuqwbJJN7z 1465.10673247
sleep 3
echo "1465.10673247 <- expected amount RKbr67Hs4exDXg92LQhVYY4MSuqwbJJN7z"
# RBjZCbMHCtsqpcQfaQquiNi4s8GTr6uLRZ KMD 20449.88848416
./komodo-cli sendtoaddress RBjZCbMHCtsqpcQfaQquiNi4s8GTr6uLRZ 20449.88848416
sleep 3
echo "20449.88848416 <- expected amount RBjZCbMHCtsqpcQfaQquiNi4s8GTr6uLRZ"
# RJRJ2xejRZuiMPQnafPEUU2VUfTfchpHZH KMD 497.55272329
./komodo-cli sendtoaddress RJRJ2xejRZuiMPQnafPEUU2VUfTfchpHZH 497.55272329
sleep 3
echo "497.55272329 <- expected amount RJRJ2xejRZuiMPQnafPEUU2VUfTfchpHZH"
# RE1NYFqFG2vmhhHVY7QFC7sTp7zBxvSSP3 KMD 26.76069242
./komodo-cli sendtoaddress RE1NYFqFG2vmhhHVY7QFC7sTp7zBxvSSP3 26.76069242
sleep 3
echo "26.76069242 <- expected amount RE1NYFqFG2vmhhHVY7QFC7sTp7zBxvSSP3"
# RKoxsZuFuAHFYCRxpScXjBoTNa2zBALASc KMD 2105.68422851, REVS 41.78542648
# RKoxsZuFuAHFYCRxpScXjBoTNa2zBALASc KMD 2105.68422851
./komodo-cli sendtoaddress RKoxsZuFuAHFYCRxpScXjBoTNa2zBALASc 2105.68422851
sleep 3
echo "2105.68422851 <- expected amount RKoxsZuFuAHFYCRxpScXjBoTNa2zBALASc"
# RC3h8Y3o5Ak7gdiCJ9GPY7EkB3DKd5hqtG KMD 37.03715216
./komodo-cli sendtoaddress RC3h8Y3o5Ak7gdiCJ9GPY7EkB3DKd5hqtG 37.03715216
sleep 3
echo "37.03715216 <- expected amount RC3h8Y3o5Ak7gdiCJ9GPY7EkB3DKd5hqtG"
# RPpsBduDnnpgEZnEYKRKv5j1Ubx32c37jW KMD 9295.82639400
./komodo-cli sendtoaddress RPpsBduDnnpgEZnEYKRKv5j1Ubx32c37jW 9295.82639400
sleep 3
echo "9295.82639400 <- expected amount RPpsBduDnnpgEZnEYKRKv5j1Ubx32c37jW"
# RKWNm893ZmBoTDHZ287LhHfigdMbg1i5pe KMD 56299.80756714
./komodo-cli sendtoaddress RKWNm893ZmBoTDHZ287LhHfigdMbg1i5pe 56299.80756714
sleep 3
echo "56299.80756714 <- expected amount RKWNm893ZmBoTDHZ287LhHfigdMbg1i5pe"
# RVCsfNnKexhZfyWzYnVnyYqQ181xNaK83r KMD 46479.13197000
./komodo-cli sendtoaddress RVCsfNnKexhZfyWzYnVnyYqQ181xNaK83r 46479.13197000
sleep 3
echo "46479.13197000 <- expected amount RVCsfNnKexhZfyWzYnVnyYqQ181xNaK83r"
# RGry1cqvb2DpJ8KVJ8UUx2fe3TxLmmPohY KMD 21522.57690952
./komodo-cli sendtoaddress RGry1cqvb2DpJ8KVJ8UUx2fe3TxLmmPohY 21522.57690952
sleep 3
echo "21522.57690952 <- expected amount RGry1cqvb2DpJ8KVJ8UUx2fe3TxLmmPohY"
# RJaBNff51EwkwTq6BpmLikW3Wx3XFJ4CZR KMD 5510.79545709
./komodo-cli sendtoaddress RJaBNff51EwkwTq6BpmLikW3Wx3XFJ4CZR 5510.79545709
sleep 3
echo "5510.79545709 <- expected amount RJaBNff51EwkwTq6BpmLikW3Wx3XFJ4CZR"
# RSGZVs6APV5K96tEtuRoMwtc3P7h1SfzQY KMD 38732.60997500
./komodo-cli sendtoaddress RSGZVs6APV5K96tEtuRoMwtc3P7h1SfzQY 38732.60997500
sleep 3
echo "38732.60997500 <- expected amount RSGZVs6APV5K96tEtuRoMwtc3P7h1SfzQY"
# RGQm8kgDPFCnhB6y6smATMBG8Bq7NPkeKk KMD 1524.15725197
./komodo-cli sendtoaddress RGQm8kgDPFCnhB6y6smATMBG8Bq7NPkeKk 1524.15725197
sleep 3
echo "1524.15725197 <- expected amount RGQm8kgDPFCnhB6y6smATMBG8Bq7NPkeKk"
# RH6ZPNWW8XS9cm5xsEyngQuARXNtUzGFKw KMD 21460.18988274
./komodo-cli sendtoaddress RH6ZPNWW8XS9cm5xsEyngQuARXNtUzGFKw 21460.18988274
sleep 3
echo "21460.18988274 <- expected amount RH6ZPNWW8XS9cm5xsEyngQuARXNtUzGFKw"
# RAGGPNoZgxAj6ABBTwehQfVYEa1PEN4qZW KMD 4938.88955074
./komodo-cli sendtoaddress RAGGPNoZgxAj6ABBTwehQfVYEa1PEN4qZW 4938.88955074
sleep 3
echo "4938.88955074 <- expected amount RAGGPNoZgxAj6ABBTwehQfVYEa1PEN4qZW"
# RXoWchjAaJatpRYGoD7A2tEuYN1jhdrRv3 KMD 37183.30557600
./komodo-cli sendtoaddress RXoWchjAaJatpRYGoD7A2tEuYN1jhdrRv3 37183.30557600
sleep 3
echo "37183.30557600 <- expected amount RXoWchjAaJatpRYGoD7A2tEuYN1jhdrRv3"
# RHJ55iWUQNbKcSn8shbv1RbGuip3RSRHFv KMD 693.08132289
./komodo-cli sendtoaddress RHJ55iWUQNbKcSn8shbv1RbGuip3RSRHFv 693.08132289
sleep 3
echo "693.08132289 <- expected amount RHJ55iWUQNbKcSn8shbv1RbGuip3RSRHFv"
# R9Kpd7dQ5udE7bUBWvQ5sEiTL3hSr5R2Ck KMD 29783.79369585
./komodo-cli sendtoaddress R9Kpd7dQ5udE7bUBWvQ5sEiTL3hSr5R2Ck 29783.79369585
sleep 3
echo "29783.79369585 <- expected amount R9Kpd7dQ5udE7bUBWvQ5sEiTL3hSr5R2Ck"
# RHh3vqCrFmZsLUKPxnx4yCcAqZ8RSZ2NW3 KMD 9683.15249375
./komodo-cli sendtoaddress RHh3vqCrFmZsLUKPxnx4yCcAqZ8RSZ2NW3 9683.15249375
sleep 3
echo "9683.15249375 <- expected amount RHh3vqCrFmZsLUKPxnx4yCcAqZ8RSZ2NW3"
# RM3onNDjZbjypoN8wqo7Rzz3QEv6EiCfwK KMD 4040.77614254
./komodo-cli sendtoaddress RM3onNDjZbjypoN8wqo7Rzz3QEv6EiCfwK 4040.77614254
sleep 3
echo "4040.77614254 <- expected amount RM3onNDjZbjypoN8wqo7Rzz3QEv6EiCfwK"
# RU3EDov1PTPAY8WhG5eGUANp2rvtki1yc9 KMD 47536.89479581
./komodo-cli sendtoaddress RU3EDov1PTPAY8WhG5eGUANp2rvtki1yc9 47536.89479581
sleep 3
echo "47536.89479581 <- expected amount RU3EDov1PTPAY8WhG5eGUANp2rvtki1yc9"

117
iguana/tests/KMD.batch14.listunspent

@ -0,0 +1,117 @@
# RN1t6SGGsWGrgcfE8fJPJWwHmKH4zE93Vj KMD 283716.36806687
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RN1t6SGGsWGrgcfE8fJPJWwHmKH4zE93Vj\",\"symbol\":\"KMD\"}"
echo "283716.36806687 <- expected amount RN1t6SGGsWGrgcfE8fJPJWwHmKH4zE93Vj"
# RDdUQ5t6SYYGZUdAxBk5i7QdTWvzAshxNZ KMD 232.80643392
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RDdUQ5t6SYYGZUdAxBk5i7QdTWvzAshxNZ\",\"symbol\":\"KMD\"}"
echo "232.80643392 <- expected amount RDdUQ5t6SYYGZUdAxBk5i7QdTWvzAshxNZ"
# RKuwq4oi4mqQ2V4r54mPEthn3TBrEwu2Ni KMD 2247.65412987
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RKuwq4oi4mqQ2V4r54mPEthn3TBrEwu2Ni\",\"symbol\":\"KMD\"}"
echo "2247.65412987 <- expected amount RKuwq4oi4mqQ2V4r54mPEthn3TBrEwu2Ni"
# RPqAFgwnB1hjae6Ar4Kms973uS93HbDkoB KMD 202518.10752377
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RPqAFgwnB1hjae6Ar4Kms973uS93HbDkoB\",\"symbol\":\"KMD\"}"
echo "202518.10752377 <- expected amount RPqAFgwnB1hjae6Ar4Kms973uS93HbDkoB"
# RBQyRBW6RFhcAmoK6UhoqrTgjH3Gz1xdCc KMD 9837.11461840
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RBQyRBW6RFhcAmoK6UhoqrTgjH3Gz1xdCc\",\"symbol\":\"KMD\"}"
echo "9837.11461840 <- expected amount RBQyRBW6RFhcAmoK6UhoqrTgjH3Gz1xdCc"
# RDeUhHeM6kaaMg9bNJQDjXrqimqZSeVTqb KMD 6.87037888
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RDeUhHeM6kaaMg9bNJQDjXrqimqZSeVTqb\",\"symbol\":\"KMD\"}"
echo "6.87037888 <- expected amount RDeUhHeM6kaaMg9bNJQDjXrqimqZSeVTqb"
# RY43geE3zoc88VbhnExje4J1wCNvX8fvfi KMD 601.90475901
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RY43geE3zoc88VbhnExje4J1wCNvX8fvfi\",\"symbol\":\"KMD\"}"
echo "601.90475901 <- expected amount RY43geE3zoc88VbhnExje4J1wCNvX8fvfi"
# RJ5qNTw5sm9AiHX2129dqBQSFETkP9sYFF KMD 40171.99122689
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RJ5qNTw5sm9AiHX2129dqBQSFETkP9sYFF\",\"symbol\":\"KMD\"}"
echo "40171.99122689 <- expected amount RJ5qNTw5sm9AiHX2129dqBQSFETkP9sYFF"
# RKbr67Hs4exDXg92LQhVYY4MSuqwbJJN7z KMD 1465.10673247
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RKbr67Hs4exDXg92LQhVYY4MSuqwbJJN7z\",\"symbol\":\"KMD\"}"
echo "1465.10673247 <- expected amount RKbr67Hs4exDXg92LQhVYY4MSuqwbJJN7z"
# RBjZCbMHCtsqpcQfaQquiNi4s8GTr6uLRZ KMD 20449.88848416
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RBjZCbMHCtsqpcQfaQquiNi4s8GTr6uLRZ\",\"symbol\":\"KMD\"}"
echo "20449.88848416 <- expected amount RBjZCbMHCtsqpcQfaQquiNi4s8GTr6uLRZ"
# RJRJ2xejRZuiMPQnafPEUU2VUfTfchpHZH KMD 497.55272329
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RJRJ2xejRZuiMPQnafPEUU2VUfTfchpHZH\",\"symbol\":\"KMD\"}"
echo "497.55272329 <- expected amount RJRJ2xejRZuiMPQnafPEUU2VUfTfchpHZH"
# RE1NYFqFG2vmhhHVY7QFC7sTp7zBxvSSP3 KMD 26.76069242
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RE1NYFqFG2vmhhHVY7QFC7sTp7zBxvSSP3\",\"symbol\":\"KMD\"}"
echo "26.76069242 <- expected amount RE1NYFqFG2vmhhHVY7QFC7sTp7zBxvSSP3"
# RKoxsZuFuAHFYCRxpScXjBoTNa2zBALASc KMD 2105.68422851, REVS 41.78542648
# RKoxsZuFuAHFYCRxpScXjBoTNa2zBALASc KMD 2105.68422851
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RKoxsZuFuAHFYCRxpScXjBoTNa2zBALASc\",\"symbol\":\"KMD\"}"
echo "2105.68422851 <- expected amount RKoxsZuFuAHFYCRxpScXjBoTNa2zBALASc"
# RC3h8Y3o5Ak7gdiCJ9GPY7EkB3DKd5hqtG KMD 37.03715216
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RC3h8Y3o5Ak7gdiCJ9GPY7EkB3DKd5hqtG\",\"symbol\":\"KMD\"}"
echo "37.03715216 <- expected amount RC3h8Y3o5Ak7gdiCJ9GPY7EkB3DKd5hqtG"
# RPpsBduDnnpgEZnEYKRKv5j1Ubx32c37jW KMD 9295.82639400
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RPpsBduDnnpgEZnEYKRKv5j1Ubx32c37jW\",\"symbol\":\"KMD\"}"
echo "9295.82639400 <- expected amount RPpsBduDnnpgEZnEYKRKv5j1Ubx32c37jW"
# RKWNm893ZmBoTDHZ287LhHfigdMbg1i5pe KMD 56299.80756714
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RKWNm893ZmBoTDHZ287LhHfigdMbg1i5pe\",\"symbol\":\"KMD\"}"
echo "56299.80756714 <- expected amount RKWNm893ZmBoTDHZ287LhHfigdMbg1i5pe"
# RVCsfNnKexhZfyWzYnVnyYqQ181xNaK83r KMD 46479.13197000
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RVCsfNnKexhZfyWzYnVnyYqQ181xNaK83r\",\"symbol\":\"KMD\"}"
echo "46479.13197000 <- expected amount RVCsfNnKexhZfyWzYnVnyYqQ181xNaK83r"
# RGry1cqvb2DpJ8KVJ8UUx2fe3TxLmmPohY KMD 21522.57690952
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RGry1cqvb2DpJ8KVJ8UUx2fe3TxLmmPohY\",\"symbol\":\"KMD\"}"
echo "21522.57690952 <- expected amount RGry1cqvb2DpJ8KVJ8UUx2fe3TxLmmPohY"
# RJaBNff51EwkwTq6BpmLikW3Wx3XFJ4CZR KMD 5510.79545709
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RJaBNff51EwkwTq6BpmLikW3Wx3XFJ4CZR\",\"symbol\":\"KMD\"}"
echo "5510.79545709 <- expected amount RJaBNff51EwkwTq6BpmLikW3Wx3XFJ4CZR"
# RSGZVs6APV5K96tEtuRoMwtc3P7h1SfzQY KMD 38732.60997500
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RSGZVs6APV5K96tEtuRoMwtc3P7h1SfzQY\",\"symbol\":\"KMD\"}"
echo "38732.60997500 <- expected amount RSGZVs6APV5K96tEtuRoMwtc3P7h1SfzQY"
# RGQm8kgDPFCnhB6y6smATMBG8Bq7NPkeKk KMD 1524.15725197
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RGQm8kgDPFCnhB6y6smATMBG8Bq7NPkeKk\",\"symbol\":\"KMD\"}"
echo "1524.15725197 <- expected amount RGQm8kgDPFCnhB6y6smATMBG8Bq7NPkeKk"
# RH6ZPNWW8XS9cm5xsEyngQuARXNtUzGFKw KMD 21460.18988274
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RH6ZPNWW8XS9cm5xsEyngQuARXNtUzGFKw\",\"symbol\":\"KMD\"}"
echo "21460.18988274 <- expected amount RH6ZPNWW8XS9cm5xsEyngQuARXNtUzGFKw"
# RAGGPNoZgxAj6ABBTwehQfVYEa1PEN4qZW KMD 4938.88955074
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RAGGPNoZgxAj6ABBTwehQfVYEa1PEN4qZW\",\"symbol\":\"KMD\"}"
echo "4938.88955074 <- expected amount RAGGPNoZgxAj6ABBTwehQfVYEa1PEN4qZW"
# RXoWchjAaJatpRYGoD7A2tEuYN1jhdrRv3 KMD 37183.30557600
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RXoWchjAaJatpRYGoD7A2tEuYN1jhdrRv3\",\"symbol\":\"KMD\"}"
echo "37183.30557600 <- expected amount RXoWchjAaJatpRYGoD7A2tEuYN1jhdrRv3"
# 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"
# R9Kpd7dQ5udE7bUBWvQ5sEiTL3hSr5R2Ck KMD 29783.79369585
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"R9Kpd7dQ5udE7bUBWvQ5sEiTL3hSr5R2Ck\",\"symbol\":\"KMD\"}"
echo "29783.79369585 <- expected amount R9Kpd7dQ5udE7bUBWvQ5sEiTL3hSr5R2Ck"
# RHh3vqCrFmZsLUKPxnx4yCcAqZ8RSZ2NW3 KMD 9683.15249375
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RHh3vqCrFmZsLUKPxnx4yCcAqZ8RSZ2NW3\",\"symbol\":\"KMD\"}"
echo "9683.15249375 <- expected amount RHh3vqCrFmZsLUKPxnx4yCcAqZ8RSZ2NW3"
# RM3onNDjZbjypoN8wqo7Rzz3QEv6EiCfwK KMD 4040.77614254
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RM3onNDjZbjypoN8wqo7Rzz3QEv6EiCfwK\",\"symbol\":\"KMD\"}"
echo "4040.77614254 <- expected amount RM3onNDjZbjypoN8wqo7Rzz3QEv6EiCfwK"
# RU3EDov1PTPAY8WhG5eGUANp2rvtki1yc9 KMD 47536.89479581
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RU3EDov1PTPAY8WhG5eGUANp2rvtki1yc9\",\"symbol\":\"KMD\"}"
echo "47536.89479581 <- expected amount RU3EDov1PTPAY8WhG5eGUANp2rvtki1yc9"

2
iguana/tests/dexlistunspent

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

2
iguana/tests/sendtoaddress

@ -1,3 +1,3 @@
#!/bin/bash
curl --url "http://127.0.0.1:7778" --data "{\"coin\":\"KMD\",\"method\":\"sendtoaddress\",\"params\":[\"RVQV5spiARDTqfwBCxstWnMbrT6Q8mhRYz\", 0.15, \"testcomment\", \"sendcomment\"]}"
curl --url "http://127.0.0.1:7778" --data "{\"coin\":\"BTC\",\"method\":\"sendtoaddress\",\"params\":[\"1HEQifAU8mcMsTtM4ougjfZemVYfdT1TcJ\", 0.005]}"

Loading…
Cancel
Save