-
Notifications
You must be signed in to change notification settings - Fork 12
/
localnet_rosetta_test_s1.json
319 lines (319 loc) · 12.7 KB
/
localnet_rosetta_test_s1.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
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
{
"network": {
"blockchain": "Harmony",
"network": "Testnet",
"sub_network_identifier": {
"network": "shard 1",
"metadata": {
"is_beacon": false
}
}
},
"online_url": "http://localhost:9796",
"http_timeout": 300,
"max_retries": 0,
"retry_elapsed_time": 5,
"max_online_connections": 0,
"max_sync_concurrency": 0,
"tip_delay": 360,
"log_configuration": false,
"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_discrepancy_search_disabled": false,
"balance_tracking_disabled": false,
"coin_tracking_disabled": false,
"end_conditions": {
"duration": 20,
"reconciliation_coverage": {
"coverage": 0.95,
"from_tip": true
}
},
"results_output_file": ""
},
"construction": {
"offline_url": "http://localhost:9796",
"max_offline_connections": 1,
"stale_depth": 0,
"broadcast_limit": 0,
"ignore_broadcast_failures": false,
"clear_broadcasts": false,
"broadcast_behind_tip": false,
"block_broadcast_limit": 0,
"rebroadcast_all": false,
"prefunded_accounts": [
{
"privkey": "1f84c95ac16e6a50f08d44c7bde7aff8742212fda6e4321fde48bf83bef266dc",
"account_identifier": {
"address": "one155jp2y76nazx8uw5sa94fr0m4s5aj8e5xm6fu3",
"metadata": {
"hex_address": "0xA5241513DA9F4463F1d4874b548dFBAC29D91f34"
}
},
"curve_type": "secp256k1",
"currency": {
"symbol": "ONE",
"decimals": 18
}
}
],
"workflows": [
{
"name": "request_funds",
"concurrency": 1,
"scenarios": [
{
"name": "find_account",
"actions": [
{
"input": "{\"symbol\":\"ONE\", \"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\":\"Testnet\", \"blockchain\":\"Harmony\", \"sub_network_identifier\":{\"network\":\"shard 1\", \"metadata\":{\"is_beacon\": false}}}",
"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": 1,
"scenarios": [
{
"name": "transfer",
"actions": [
{
"input": "{\"network\":\"Testnet\", \"blockchain\":\"Harmony\", \"sub_network_identifier\":{\"network\":\"shard 1\", \"metadata\":{\"is_beacon\": false}}}",
"type": "set_variable",
"output_path": "transfer.network"
},
{
"input": "{\"symbol\":\"ONE\", \"decimals\":18}",
"type": "set_variable",
"output_path": "currency"
},
{
"input": "{\"minimum_balance\":{\"value\": \"10000000000000000\", \"currency\": {{currency}}}}",
"type": "find_balance",
"output_path": "sender"
},
{
"input": "\"53000000000000\"",
"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": "{\"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\":\"NativeTransfer\",\"account\":{{sender.account_identifier}},\"amount\":{\"value\":{{sender_amount}},\"currency\":{{currency}}}},{\"operation_identifier\":{\"index\":1},\"related_operations\":[{\"index\":0}],\"type\":\"NativeTransfer\",\"account\":{{recipient.account_identifier}},\"amount\":{\"value\":{{recipient_amount}},\"currency\":{{currency}}}}]",
"type": "set_variable",
"output_path": "transfer.operations"
}
]
}
]
},
{
"name": "cross_shard_transfer",
"concurrency": 10,
"scenarios": [
{
"name": "transfer",
"actions": [
{
"input": "{\"network\":\"Testnet\", \"blockchain\":\"Harmony\", \"sub_network_identifier\":{\"network\":\"shard 1\", \"metadata\":{\"is_beacon\": false}}}",
"type": "set_variable",
"output_path": "transfer.network"
},
{
"input": "{\"symbol\":\"ONE\", \"decimals\":18}",
"type": "set_variable",
"output_path": "currency"
},
{
"input": "{\"minimum_balance\":{\"value\": \"10000000000000000\", \"currency\": {{currency}}}}",
"type": "find_balance",
"output_path": "sender"
},
{
"input": "\"53000000000000\"",
"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": "{\"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\":\"NativeCrossShardTransfer\",\"account\":{{sender.account_identifier}},\"amount\":{\"value\":{{sender_amount}},\"currency\":{{currency}}}, \"metadata\":{\"from\":{{sender.account_identifier}}, \"to\": {{recipient.account_identifier}}}}]",
"type": "set_variable",
"output_path": "transfer.operations"
},
{
"input": "{\"to_shard\":0, \"from_shard\":1}",
"type": "set_variable",
"output_path": "transfer.preprocess_metadata"
}
]
}
]
},
{
"name": "contract_creation",
"concurrency": 10,
"scenarios": [
{
"name": "transfer",
"actions": [
{
"input": "{\"network\":\"Testnet\", \"blockchain\":\"Harmony\", \"sub_network_identifier\":{\"network\":\"shard 1\", \"metadata\":{\"is_beacon\": false}}}",
"type": "set_variable",
"output_path": "transfer.network"
},
{
"input": "{\"symbol\":\"ONE\", \"decimals\":18}",
"type": "set_variable",
"output_path": "currency"
},
{
"input": "{\"minimum_balance\":{\"value\": \"10000000000000000\", \"currency\": {{currency}}}}",
"type": "find_balance",
"output_path": "sender"
},
{
"input": "\"530000000000000000\"",
"type": "set_variable",
"output_path": "max_fee"
},
{
"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\":\"ContractCreation\",\"account\":{{sender.account_identifier}},\"amount\":{\"value\":\"0\",\"currency\":{{currency}}}}]",
"type": "set_variable",
"output_path": "transfer.operations"
},
{
"input": "{\"data\": \"0x608060405234801561001057600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061019c806100606000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063445df0ac146100465780638da5cb5b14610064578063fdacd576146100ae575b600080fd5b61004e6100dc565b6040518082815260200191505060405180910390f35b61006c6100e2565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6100da600480360360208110156100c457600080fd5b8101908080359060200190929190505050610107565b005b60015481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561016457806001819055505b5056fea265627a7a723158209b80813a158b44af65aee232b44c0ac06472c48f4abbe298852a39f0ff34a9f264736f6c63430005100032\"}",
"type": "set_variable",
"output_path": "transfer.preprocess_metadata"
}
]
}
]
}
],
"end_conditions": {
"create_account": 1,
"transfer": 1,
"cross_shard_transfer": 1,
"contract_creation": 1
}
}
}