tx · 3LUkqxbUPkVWnSZ4Cg6vZcZYNnV4PZQMWt6G4bJG7Vfv 3Mwvh1BuhG98BDy2ce4psM5FGmsMJ3mQ6eS: -0.01400000 Waves 2019.10.04 12:56 [704823] smart account 3Mwvh1BuhG98BDy2ce4psM5FGmsMJ3mQ6eS > SELF 0.00000000 Waves
{ "type": 13, "id": "3LUkqxbUPkVWnSZ4Cg6vZcZYNnV4PZQMWt6G4bJG7Vfv", "fee": 1400000, "feeAssetId": null, "timestamp": 1570183014617, "version": 1, "sender": "3Mwvh1BuhG98BDy2ce4psM5FGmsMJ3mQ6eS", "senderPublicKey": "7uFaW53FrwLDoCAkGsKkshhvuicD9QrVcuTDgYkMp93a", "proofs": [ "5pCfzHFpfkV4NJbkzTxiaFwAhkDDdLN14mZvMbmipWnsCdgrpTbVNp1QN2k3pL3UJARNchmB8QfuWb5x42rEC8tM" ], "script": "base64:AAIDAAAAAAAAAAAAAAAjAQAAAA5nZXROdW1iZXJCeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAAAQAAAA5nZXRTdHJpbmdCeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAgAAAAABAAAADGdldEJvb2xCeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEGwAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAHQm9vbGVhbgQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQcBAAAAGGdldE51bWJlckJ5QWRkcmVzc0FuZEtleQAAAAIAAAAHYWRkcmVzcwAA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E2tp Next: 9e6y7EU6GqvJvV4Z68gAataQY5KyTxBhtmcgsJEU1TDZ Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func getNumberByKey (key) = match getInteger(this, key) { | |
5 | 5 | case a: Int => | |
6 | 6 | a | |
7 | 7 | case _ => | |
8 | 8 | 0 | |
9 | 9 | } | |
10 | 10 | ||
11 | 11 | ||
12 | 12 | func getStringByKey (key) = match getString(this, key) { | |
13 | 13 | case a: String => | |
14 | 14 | a | |
15 | 15 | case _ => | |
16 | 16 | "" | |
17 | 17 | } | |
18 | 18 | ||
19 | 19 | ||
20 | 20 | func getBoolByKey (key) = match getBoolean(this, key) { | |
21 | 21 | case a: Boolean => | |
22 | 22 | a | |
23 | 23 | case _ => | |
24 | 24 | false | |
25 | 25 | } | |
26 | 26 | ||
27 | 27 | ||
28 | 28 | func getNumberByAddressAndKey (address,key) = match getInteger(addressFromStringValue(address), key) { | |
29 | 29 | case a: Int => | |
30 | 30 | a | |
31 | 31 | case _ => | |
32 | 32 | 0 | |
33 | 33 | } | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | func getStringByAddressAndKey (address,key) = match getString(addressFromStringValue(address), key) { | |
37 | 37 | case a: String => | |
38 | 38 | a | |
39 | 39 | case _ => | |
40 | 40 | "" | |
41 | 41 | } | |
42 | 42 | ||
43 | 43 | ||
44 | 44 | let LISTSPLITSYMBOL = "_" | |
45 | 45 | ||
46 | 46 | let PERCENTACCURACY = 10000 | |
47 | 47 | ||
48 | 48 | let NeutrinoAssetIdKey = "neutrino_asset_id" | |
49 | 49 | ||
50 | 50 | let BondAssetIdKey = "bond_asset_id" | |
51 | 51 | ||
52 | 52 | let NeutrinoContractKey = "neutrino_contract" | |
53 | 53 | ||
54 | 54 | let BalanceKey = "rpd_balance" | |
55 | 55 | ||
56 | 56 | let SyncIndexKey = "rpd_sync_index" | |
57 | 57 | ||
58 | 58 | let ProfitKey = "rpd_profit" | |
59 | 59 | ||
60 | 60 | let BalanceHistoryKey = "balance_history" | |
61 | 61 | ||
62 | 62 | let IsClaimedKey = "is_claimed" | |
63 | 63 | ||
64 | 64 | func getUserBalanceHistoryKey (owner) = ((BalanceHistoryKey + "_") + owner) | |
65 | 65 | ||
66 | 66 | ||
67 | 67 | func getUserBalanceKey (owner,assetId) = ((((BalanceKey + "_") + assetId) + "_") + owner) | |
68 | 68 | ||
69 | 69 | ||
70 | 70 | func getUserBalanceKeyByCount (owner,count,assetId) = ((getUserBalanceKey(owner, assetId) + "_") + toString(count)) | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | func getIsClaimedKey (owner,count) = ((((IsClaimedKey + "_") + owner) + "_") + toString(count)) | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | func getContractBalanceKey (assetId) = ((BalanceKey + "_") + assetId) | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func getSnapshotContractBalanceKey (count,assetId) = ((((BalanceKey + "_") + assetId) + "_") + toString(count)) | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | func getProfitKey (count) = ((ProfitKey + "_") + toString(count)) | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | let neutrinoContract = getStringByKey(NeutrinoContractKey) | |
86 | 86 | ||
87 | 87 | let neutrinoAssetId = fromBase58String(getStringByAddressAndKey(neutrinoContract, NeutrinoAssetIdKey)) | |
88 | 88 | ||
89 | 89 | let bondAssetId = fromBase58String(getStringByAddressAndKey(neutrinoContract, BondAssetIdKey)) | |
90 | 90 | ||
91 | 91 | let syncIndex = getNumberByAddressAndKey(neutrinoContract, SyncIndexKey) | |
92 | 92 | ||
93 | 93 | func getContractBalance (assetId) = getNumberByKey(getContractBalanceKey(assetId)) | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | func getSnapshotContractBalance (count,assetId) = getNumberByAddressAndKey(neutrinoContract, getSnapshotContractBalanceKey(count, assetId)) | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | func getProfit (count) = getNumberByAddressAndKey(neutrinoContract, getProfitKey(count)) | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func getUserBalance (owner,assetId) = getNumberByKey(getUserBalanceKey(owner, assetId)) | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func getUserBalanceByCount (owner,count,assetId) = getNumberByKey(getUserBalanceKeyByCount(owner, count, assetId)) | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | func getUserBalanceHistory (owner) = getStringByKey(getUserBalanceHistoryKey(owner)) | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | func isClaimed (owner,count) = getBoolByKey(getIsClaimedKey(owner, count)) | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | func getHistoryElement (count) = (toString(count) + LISTSPLITSYMBOL) | |
115 | 115 | ||
116 | 116 | ||
117 | 117 | func addBalanceHistory (history,element) = (history + element) | |
118 | 118 | ||
119 | 119 | ||
120 | 120 | @Callable(i) | |
121 | 121 | func lockNeutrino () = { | |
122 | 122 | let pmt = extract(i.payment) | |
123 | 123 | if (if ((pmt.assetId != neutrinoAssetId)) | |
124 | 124 | then (pmt.assetId != bondAssetId) | |
125 | 125 | else false) | |
126 | 126 | then throw("can use neutrino or bond only") | |
127 | 127 | else { | |
128 | 128 | let account = toString(i.caller) | |
129 | 129 | let assetIdString = toBase58String(value(pmt.assetId)) | |
130 | 130 | let balance = (getUserBalance(account, assetIdString) + pmt.amount) | |
131 | 131 | let historyString = getUserBalanceHistory(account) | |
132 | 132 | let history = split(historyString, LISTSPLITSYMBOL) | |
133 | 133 | let index = (size(history) - 2) | |
134 | 134 | let newHistory = if (if ((historyString != "")) | |
135 | 135 | then (parseIntValue(history[index]) == syncIndex) | |
136 | 136 | else false) | |
137 | 137 | then historyString | |
138 | 138 | else addBalanceHistory(historyString, getHistoryElement(syncIndex)) | |
139 | 139 | WriteSet([DataEntry(getContractBalanceKey(assetIdString), (getContractBalance(assetIdString) + pmt.amount)), DataEntry(getUserBalanceKey(account, assetIdString), balance), DataEntry(getUserBalanceKeyByCount(account, syncIndex, assetIdString), balance), DataEntry(getUserBalanceHistoryKey(account), newHistory)]) | |
140 | 140 | } | |
141 | 141 | } | |
142 | 142 | ||
143 | 143 | ||
144 | 144 | ||
145 | 145 | @Callable(i) | |
146 | 146 | func unlockNeutrino (unlockAmount,assetIdString) = { | |
147 | 147 | let account = toString(i.caller) | |
148 | 148 | let assetId = fromBase58String(assetIdString) | |
149 | 149 | let balance = (getUserBalance(account, assetIdString) - unlockAmount) | |
150 | 150 | if ((0 > balance)) | |
151 | 151 | then throw("invalid amount") | |
152 | 152 | else if (if ((assetId != neutrinoAssetId)) | |
153 | 153 | then (assetId != bondAssetId) | |
154 | 154 | else false) | |
155 | 155 | then throw("can use neutrino or bond only") | |
156 | 156 | else { | |
157 | 157 | let historyString = getUserBalanceHistory(account) | |
158 | 158 | let history = split(historyString, LISTSPLITSYMBOL) | |
159 | 159 | let index = (size(history) - 2) | |
160 | 160 | let newHistory = if (if ((historyString != "")) | |
161 | 161 | then (parseIntValue(history[index]) == syncIndex) | |
162 | 162 | else false) | |
163 | 163 | then historyString | |
164 | 164 | else addBalanceHistory(historyString, getHistoryElement(syncIndex)) | |
165 | 165 | ScriptResult(WriteSet([DataEntry(BalanceKey, (getContractBalance(assetIdString) - unlockAmount)), DataEntry(getUserBalanceKey(account, assetIdString), balance), DataEntry(getUserBalanceKeyByCount(account, syncIndex, assetIdString), balance), DataEntry(getUserBalanceHistoryKey(account), newHistory)]), TransferSet([ScriptTransfer(addressFromStringValue(account), unlockAmount, neutrinoAssetId)])) | |
166 | 166 | } | |
167 | 167 | } | |
168 | 168 | ||
169 | 169 | ||
170 | 170 | ||
171 | 171 | @Callable(i) | |
172 | 172 | func withdraw (profitSyncIndex,historyIndex) = { | |
173 | 173 | let account = toString(i.caller) | |
174 | 174 | let historyString = getUserBalanceHistory(account) | |
175 | 175 | let history = split(historyString, LISTSPLITSYMBOL) | |
176 | 176 | let lockActual = parseIntValue(history[historyIndex]) | |
177 | 177 | if (isClaimed(account, profitSyncIndex)) | |
178 | 178 | then throw(("account is claimed rpd_count:" + toString(profitSyncIndex))) | |
179 | 179 | else if (if ((profitSyncIndex > lockActual)) | |
180 | 180 | then true | |
181 | 181 | else if ((size(history) > (historyIndex + 2))) | |
182 | 182 | then (parseIntValue(history[(historyIndex + 1)]) > profitSyncIndex) | |
183 | 183 | else false) | |
184 | 184 | then throw("invalid history index") | |
185 | 185 | else { | |
186 | 186 | let neutrinoAssetIdString = toBase58String(neutrinoAssetId) | |
187 | 187 | let bondAssetIdString = toBase58String(bondAssetId) | |
188 | 188 | let balance = (getUserBalanceByCount(account, lockActual, neutrinoAssetIdString) + getUserBalanceByCount(account, lockActual, bondAssetIdString)) | |
189 | 189 | let sharePercent = (((balance * PERCENTACCURACY) * 100) / (getSnapshotContractBalance(profitSyncIndex, neutrinoAssetIdString) + getSnapshotContractBalance(profitSyncIndex, bondAssetIdString))) | |
190 | 190 | let profit = (((sharePercent * getProfit(profitSyncIndex)) / 100) / PERCENTACCURACY) | |
191 | 191 | ScriptResult(WriteSet([DataEntry(getIsClaimedKey(account, profitSyncIndex), true)]), TransferSet([ScriptTransfer(addressFromStringValue(account), profit, neutrinoAssetId)])) | |
192 | 192 | } | |
193 | 193 | } | |
194 | 194 | ||
195 | 195 |
github/deemru/w8io/169f3d6 55.66 ms ◑