-
Notifications
You must be signed in to change notification settings - Fork 94
/
ethereum.json
239 lines (239 loc) · 7.09 KB
/
ethereum.json
1
2
3
4
5
6
7
8
9
10
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
{
"network": {
"blockchain": "Ethereum",
"network": "Ropsten"
},
"online_url": "",
"data_directory": "ethereum-data",
"http_timeout": 300,
"max_retries": 5,
"retry_elapsed_time": 0,
"max_online_connections": 0,
"max_sync_concurrency": 0,
"tip_delay": 60,
"log_configuration": false,
"construction": {
"offline_url": "",
"max_offline_connections": 0,
"stale_depth": 0,
"broadcast_limit": 0,
"ignore_broadcast_failures": false,
"clear_broadcasts": false,
"broadcast_behind_tip": false,
"block_broadcast_limit": 0,
"rebroadcast_all": false,
"workflows": [
{
"name": "request_funds",
"concurrency": 1,
"scenarios": [
{
"name": "find_account",
"actions": [
{
"input": "{\"symbol\":\"ETH\", \"decimals\":18}",
"type": "set_variable",
"output_path": "currency"
},
{
"input": "{\"minimum_balance\":{\"value\": \"0\", \"currency\": {{currency}}}, \"create_limit\":1}",
"type": "find_balance",
"output_path": "random_account"
}
]
},
{
"name": "request",
"actions": [
{
"input": "{\"account_identifier\": {{random_account.account_identifier}}, \"minimum_balance\":{\"value\": \"10000000000000000\", \"currency\": {{currency}}}}",
"type": "find_balance",
"output_path": "loaded_account"
}
]
}
]
},
{
"name": "create_account",
"concurrency": 1,
"scenarios": [
{
"name": "create_account",
"actions": [
{
"input": "{\"network\":\"Ropsten\", \"blockchain\":\"Ethereum\"}",
"type": "set_variable",
"output_path": "network"
},
{
"input": "{\"curve_type\": \"secp256k1\"}",
"type": "generate_key",
"output_path": "key"
},
{
"input": "{\"network_identifier\": {{network}}, \"public_key\": {{key.public_key}}}",
"type": "derive",
"output_path": "account"
},
{
"input": "{\"account_identifier\": {{account.account_identifier}}, \"keypair\": {{key}}}",
"type": "save_account"
}
]
}
]
},
{
"name": "transfer",
"concurrency": 10,
"scenarios": [
{
"name": "transfer",
"actions": [
{
"input": "{\"network\":\"Ropsten\", \"blockchain\":\"Ethereum\"}",
"type": "set_variable",
"output_path": "transfer.network"
},
{
"input": "{\"symbol\":\"ETH\", \"decimals\":18}",
"type": "set_variable",
"output_path": "currency"
},
{
"input": "{\"minimum_balance\":{\"value\": \"10000000000000000\", \"currency\": {{currency}}}}",
"type": "find_balance",
"output_path": "sender"
},
{
"input": "\"42000000000000\"",
"type": "set_variable",
"output_path": "max_fee"
},
{
"input": "{\"operation\":\"subtraction\", \"left_value\": {{sender.balance.value}}, \"right_value\": {{max_fee}}}",
"type": "math",
"output_path": "available_amount"
},
{
"input": "{\"minimum\": \"1\", \"maximum\": {{available_amount}}}",
"type": "random_number",
"output_path": "recipient_amount"
},
{
"input": "{\"recipient_amount\":{{recipient_amount}}}",
"type": "print_message"
},
{
"input": "{\"operation\":\"subtraction\", \"left_value\": \"0\", \"right_value\":{{recipient_amount}}}",
"type": "math",
"output_path": "sender_amount"
},
{
"input": "{\"not_account_identifier\":[{{sender.account_identifier}}], \"minimum_balance\":{\"value\": \"0\", \"currency\": {{currency}}}, \"create_limit\": 100, \"create_probability\": 50}",
"type": "find_balance",
"output_path": "recipient"
},
{
"input": "\"1\"",
"type": "set_variable",
"output_path": "transfer.confirmation_depth"
},
{
"input": "[{\"operation_identifier\":{\"index\":0},\"type\":\"transfer\",\"account\":{{sender.account_identifier}},\"amount\":{\"value\":{{sender_amount}},\"currency\":{{currency}}}},{\"operation_identifier\":{\"index\":1},\"type\":\"transfer\",\"account\":{{recipient.account_identifier}},\"amount\":{\"value\":{{recipient_amount}},\"currency\":{{currency}}}}]",
"type": "set_variable",
"output_path": "transfer.operations"
}
]
}
]
},
{
"name": "return_funds",
"concurrency": 10,
"scenarios": [
{
"name": "transfer",
"actions": [
{
"input": "{\"network\":\"Ropsten\", \"blockchain\":\"Ethereum\"}",
"type": "set_variable",
"output_path": "transfer.network"
},
{
"input": "{\"symbol\":\"ETH\", \"decimals\":18}",
"type": "set_variable",
"output_path": "currency"
},
{
"input": "\"42000000000000\"",
"type": "set_variable",
"output_path": "max_fee"
},
{
"input": "{\"minimum_balance\":{\"value\": {{max_fee}}, \"currency\": {{currency}}}}",
"type": "find_balance",
"output_path": "sender"
},
{
"input": "{\"operation\":\"subtraction\", \"left_value\": {{sender.balance.value}}, \"right_value\": {{max_fee}}}",
"type": "math",
"output_path": "available_amount"
},
{
"input": "{\"return_amount\":{{available_amount}}}",
"type": "print_message"
},
{
"input": "{\"operation\":\"subtraction\", \"left_value\": \"0\", \"right_value\":{{available_amount}}}",
"type": "math",
"output_path": "sender_amount"
},
{
"input": "{\"address\":\"0xb41B39479a525AB69e38c701A713D98E3074252c\"}",
"type": "set_variable",
"output_path": "faucet"
},
{
"input": "\"1\"",
"type": "set_variable",
"output_path": "transfer.confirmation_depth"
},
{
"input": "[{\"operation_identifier\":{\"index\":0},\"type\":\"transfer\",\"account\":{{sender.account_identifier}},\"amount\":{\"value\":{{sender_amount}},\"currency\":{{currency}}}},{\"operation_identifier\":{\"index\":1},\"type\":\"transfer\",\"account\":{{faucet}},\"amount\":{\"value\":{{available_amount}},\"currency\":{{currency}}}}]",
"type": "set_variable",
"output_path": "transfer.operations"
}
]
}
]
}
],
"end_conditions": {
"create_account": 10,
"transfer": 10
}
},
"data": {
"active_reconciliation_concurrency": 0,
"inactive_reconciliation_concurrency": 0,
"inactive_reconciliation_frequency": 0,
"log_blocks": false,
"log_transactions": false,
"log_balance_changes": false,
"log_reconciliations": false,
"ignore_reconciliation_error": false,
"exempt_accounts": "",
"bootstrap_balances": "",
"interesting_accounts": "",
"reconciliation_disabled": false,
"inactive_discrepency_search_disabled": false,
"balance_tracking_disabled": false,
"coin_tracking_disabled": false,
"end_conditions": {
"reconciliation_coverage": 0.95
},
"results_output_file": ""
}
}