-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathrosetta-diem.json
111 lines (109 loc) · 3.58 KB
/
rosetta-diem.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
{
"network": {
"blockchain": "diem",
"network": "testnet"
},
"online_url": "http://localhost:3030",
"data_directory": "diem-data",
"max_online_connections": 128,
"max_sync_concurrency": 64,
"construction": {
"offline_url": "http://localhost:3030",
"prefunded_accounts": [
{
"account_identifier": {
"address": "4f006529b9d1f8534fee494e5b455b7b"
},
"privkey": "4bfd65769a4fe70f1e830f56f5fee395565bee5613e2b97dfc1ac43683b05cb0",
"curve_type": "edwards25519",
"currency": {
"symbol": "XUS",
"decimals": 6
}
},
{
"account_identifier": {
"address": "437286cc8a7d8ee355cbfca51cf8dbe2"
},
"privkey": "6cc6f8b273d9b14740a599ca313da1823bdb764b56c9025d5fef424bfd6fe742",
"curve_type": "edwards25519",
"currency": {
"symbol": "XUS",
"decimals": 6
}
}
],
"workflows": [
{
"name": "create_account",
"concurrency": 1,
"scenarios": [
]
},
{
"name": "request_funds",
"concurrency": 1,
"scenarios": [
]
},
{
"name": "transfer",
"concurrency": 2,
"scenarios": [
{
"name": "transfer",
"actions": [
{
"type": "set_variable",
"input": "{\"symbol\": \"XUS\", \"decimals\": 6}",
"output_path": "currency"
},
{
"type": "find_balance",
"input": "{\"minimum_balance\":{\"value\":\"20000000\",\"currency\":{{currency}}}, \"create_limit\":0}",
"output_path": "sender"
},
{
"input": "{\"minimum\": \"1\", \"maximum\": \"20000000\"}",
"type": "random_number",
"output_path": "recipient_amount"
},
{
"type": "print_message",
"input": "{\"recipient_amount\": {{recipient_amount}}}"
},
{
"type": "math",
"input": "{\"operation\": \"subtraction\", \"left_value\": \"0\", \"right_value\": {{recipient_amount}}}",
"output_path": "sender_amount"
},
{
"type": "find_balance",
"input": "{\"not_account_identifier\": [{{sender.account_identifier}}], \"minimum_balance\": {\"value\": \"0\", \"currency\": {{currency}}}, \"create_limit\": 0}",
"output_path": "recipient"
},
{
"type": "set_variable",
"input": "{\"network\": \"testnet\", \"blockchain\": \"diem\"}",
"output_path": "transfer.network"
},
{
"type": "set_variable",
"input": "\"1\"",
"output_path": "transfer.confirmation_depth"
},
{
"type": "set_variable",
"input": "[{\"operation_identifier\": {\"index\": 0}, \"type\": \"sentpayment\", \"account\": {{sender.account_identifier}}, \"amount\": {\"value\": {{sender_amount}}, \"currency\": {{currency}}}}, {\"operation_identifier\": {\"index\": 1}, \"type\": \"receivedpayment\", \"account\": {{recipient.account_identifier}}, \"amount\": {\"value\": {{recipient_amount}}, \"currency\": {{currency}}}}]",
"output_path": "transfer.operations"
}
]
}
]
}
],
"end_conditions": {
"transfer": 10
}
}
}