Smart Contract Test Plan
 Share
The version of the browser you are using is no longer supported. Please upgrade to a supported browser.Dismiss

 
£
%
123
 
 
 
 
 
 
 
 
 
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABAC
1
2
Faucet Contract
3
Available RPC calls
What does this Call do?Example Test CommandExample Expected OutputWhat to CheckComments
Testing Result
4
faucetaddress [pubkey]Will display central faucet address and your faucet contract address for your pubkey.
pubkey starts with 02 or 03.
./komodo-cli -ac_name=YOURAC faucetaddress 03fe754763c176e1339a3f62ee6b9484720e17ee4646b65a119e9f6370c7004abc{
"result": "success",
"FaucetCCaddress": "R9zHrofhRbub7ER77B7NrVch3A63R39GuC",
"Faucetmarker": "RKQV4oYs4rvxAWx1J43VnT73rSTVtUeckk",
"CCaddress": "RSxACZQhskPjQyxp7TUPG1oP1wm4agFycJ",
"myCCaddress": "RSxACZQhskPjQyxp7TUPG1oP1wm4agFycJ",
"myaddress": "RANyPgfZZLhSjQB9jrzztSw66zMMYDZuxQ"
}
Working/Passed
5
6
faucetfund amountWill send funds to the central faucet address from your wallet. The command will output rawtransaction hex which need to be broadcasted using ./komodo-cli -ac_name=YOURAC sendrawtransaction <HEX>. This will generate and display txid../komodo-cli -ac_name=YOURAC faucetfund 100
(this will generate raw TX hex, you need to broadcast it using the next command)

./komodo-cli -ac_name=YOURAC sendrawtransaction <HEX>
(wait for the tx to confirm)
After the tx is confirmed, and rawmempool cleared (./komodo-cli -ac_name=YOURAC getrawmempool), check if the amount has been deducted from your total balance. Use "./komodo-cli -ac_name=YOURAC getbalance" before and after the faucetfund call to verify this.Working/Passed
7
8
faucetgetThis will fetch faucet funds to your wallet. Faucet amounting 0.1 is available for any brand new address that doesn't have any tx history.
You need to (re)start the daemon with different pubkey and imprort the privkey (make sure your address has 0 tx of any kind) and use faucetget.
./komodo-cli -ac_name=YOURAC faucetget
(this will generate raw TX hex, you need to broadcast it using the next command)

./komodo-cli -ac_name=YOURAC sendrawtransaction <HEX>
(wait for the tx to confirm)
After the tx is confirmed, and rawmempool cleared (./komodo-cli -ac_name=YOURAC getrawmempool), check if the amount has been added to your total balance. Use "./komodo-cli -ac_name=YOURAC getbalance" before and after the faucetget call to verify this.faucetget is now working. sendrawtransaction returns error
error code: -25
error message:

That error -25 is just a result of someone else doing it before you at that block height.
If any automated script is running to fetch faucet fund continuously, one has be very lucky to get their free faucet fund.
Requires
Attention
9
10
faucetinfoThis call will show you the faucet info. e.g. name and balance./komodo-cli -ac_name=YOURAC faucetinfoIf the call is returning info like below
{
result: "success",
name: "Faucet",
funding: "100493.94930000"
}
Working/Passed
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
Loading...