tx · ArBv3zKZwLuBjDMLYeYYZ8owDWhuAu7Wk19Ca4DdsZkL 3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9: -0.01400000 Waves 2021.08.17 16:42 [1662408] smart account 3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9 > SELF 0.00000000 Waves
{ "type": 13, "id": "ArBv3zKZwLuBjDMLYeYYZ8owDWhuAu7Wk19Ca4DdsZkL", "fee": 1400000, "feeAssetId": null, "timestamp": 1629207746838, "version": 2, "chainId": 84, "sender": "3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9", "senderPublicKey": "D1X9WatF6ARMCmm3jC4Ex5Wd5VQ3LY8i1xbHNqeHqeAa", "proofs": [ "5JdiPDbrpHe2GxHTg8N6fKvETF2MS2RUAvFDRdU8TCnYFiTm4yNbEPuq417Jw7Edyo2fJkTrtgcdyqCcpBSfxKsJ", "4DJydT8BZxGcmVbQAzHmxXDeE21sqvaib62fevC2r6xDqxoJ1DPRa9mvR7nzx3y1btiwkTicKzMnFZ1w94oG3PYb" ], "script": "base64:AAIFAAAAAAAAABgIAhIECgIIARIAEgQKAggIEgQKAggIEgAAAAAaAAAAABBrZXlQb29sc0xpc3ROYW1lAgAAAAVwb29scwAAAAARa2V5UHJlZml4UG9vbE5hbWUCAAAABXBvb2xfAAAAABJrZXlQcmVmaXhQb29sSW5kZXgCAAAABmluZGV4XwAAAAASa2V5Q29uZmlybWVkQXNzZXRzAgAAABBjb25maXJtZWRfYXNzZXRzAAAAABBrZXlBc3NldFByaW9yaXR5AgAAAA9hc3NldF9wcmlvcml0eV8AAAAAB2tleVBhaXICAAAABXBhaXJfAAAAAAtrZXlBc3NldElkQQIAAAAKQV9hc3NldF9pZAAAAAALa2V5QXNzZXRJZEICAAAACkJfYXNzZXRfaWQAAAAAF2tleU9yYWNsZVNjcmlwdEhhc2hDUE1NAgAAABBzY3JpcHRfaGFzaF9jcG1tAAAAABdrZXlPcmFjbGVTY3JpcHRIYXNoRmxhdA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GlvbgYDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAE1RyYW5zZmVyVHJhbnNhY3Rpb24GAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABNFeGNoYW5nZVRyYW5zYWN0aW9uBgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAXTWFzc1RyYW5zZmVyVHJhbnNhY3Rpb24GAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAA9CdXJuVHJhbnNhY3Rpb24GCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAElJlaXNzdWVUcmFuc2FjdGlvbgUAAAANc2lnbmVkQnlBZG1pbgkAAAIAAAABAgAAAAtNYXRjaCBlcnJvcpM62gc=", "height": 1662408, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HjYbtMSTYen45uSSTbY9S8zJJiVdpRkMmQvrWbPLnU2e Next: GUDFXTGLm7HD2R8caLa6SbGzVxYJhATfwZD6NDzP4DC5 Diff:
Old | New | Differences | |
---|---|---|---|
104 | 104 | then true | |
105 | 105 | else false | |
106 | 106 | let isNotEmptyData = if ((!(check) == true)) | |
107 | + | then true | |
108 | + | else false | |
109 | + | let isEmptyData = if ((!(check) == true)) | |
107 | 110 | then false | |
108 | 111 | else true | |
109 | 112 | let isNotPoolContract = if (if (isNotCpmm) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let keyPoolsListName = "pools" | |
5 | 5 | ||
6 | 6 | let keyPrefixPoolName = "pool_" | |
7 | 7 | ||
8 | 8 | let keyPrefixPoolIndex = "index_" | |
9 | 9 | ||
10 | 10 | let keyConfirmedAssets = "confirmed_assets" | |
11 | 11 | ||
12 | 12 | let keyAssetPriority = "asset_priority_" | |
13 | 13 | ||
14 | 14 | let keyPair = "pair_" | |
15 | 15 | ||
16 | 16 | let keyAssetIdA = "A_asset_id" | |
17 | 17 | ||
18 | 18 | let keyAssetIdB = "B_asset_id" | |
19 | 19 | ||
20 | 20 | let keyOracleScriptHashCPMM = "script_hash_cpmm" | |
21 | 21 | ||
22 | 22 | let keyOracleScriptHashFlat = "script_hash_flat" | |
23 | 23 | ||
24 | 24 | let cpmmScriptReferenesAddress = base58'3N77kfPbQyjXWpDALX3xjKw3iEGMWEctV37' | |
25 | 25 | ||
26 | 26 | let flatScriptReferenesAddress = base58'3N5Xd7QVQZWntaJwha9Kg42is626GUPjtUW' | |
27 | 27 | ||
28 | 28 | let keyAdminPubKey1 = "admin_pub_1" | |
29 | 29 | ||
30 | 30 | let keyAdminPubKey2 = "admin_pub_2" | |
31 | 31 | ||
32 | 32 | let keyAdminPubKey3 = "admin_pub_3" | |
33 | 33 | ||
34 | 34 | let adminPubKey1 = base58'GFmKZ2naZFRoCvNbwKAQVGmLb1uBeWGDgFabdGBuZiuy' | |
35 | 35 | ||
36 | 36 | let adminPubKey2 = base58'GmJXRyhRA79g8yUGgKBAVdnFfQFDMjQG98b1MmLDh5kk' | |
37 | 37 | ||
38 | 38 | let adminPubKey3 = base58'CFhbV6h41hVjbGHudGtS3fYUv7QAKRxFQzKNtx4B5PqP' | |
39 | 39 | ||
40 | 40 | let adminStartStop = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
41 | 41 | ||
42 | 42 | let adminStaking = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
43 | 43 | ||
44 | 44 | let keyAdminStartStop = "admin_start_stop" | |
45 | 45 | ||
46 | 46 | let keyAdminStaking = "admin_staking" | |
47 | 47 | ||
48 | 48 | let pools = match getString(this, keyPoolsListName) { | |
49 | 49 | case string: String => | |
50 | 50 | split(string, ",") | |
51 | 51 | case nothing => | |
52 | 52 | nil | |
53 | 53 | } | |
54 | 54 | ||
55 | 55 | func isSelfCall (i) = if ((i.caller == this)) | |
56 | 56 | then unit | |
57 | 57 | else unit | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | func getPoolNameIfValid (poolName) = { | |
61 | 61 | let underscoreIndex = valueOrElse(indexOf(poolName, "_"), -1) | |
62 | 62 | let underscoreLastIndex = valueOrElse(lastIndexOf(poolName, "_"), -1) | |
63 | 63 | let hasSingleUnderscore = if (if ((underscoreIndex == underscoreLastIndex)) | |
64 | 64 | then (underscoreIndex > 0) | |
65 | 65 | else false) | |
66 | 66 | then (underscoreIndex != (size(poolName) - 1)) | |
67 | 67 | else false | |
68 | 68 | if (hasSingleUnderscore) | |
69 | 69 | then poolName | |
70 | 70 | else throw("Pool name must consist of two asset names separated by an underscore character") | |
71 | 71 | } | |
72 | 72 | ||
73 | 73 | ||
74 | 74 | func getAddressIfValid (address) = toString(valueOrErrorMessage(addressFromString(address), (("Can't parse \"" + address) + "\" as address"))) | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | @Callable(i) | |
78 | 78 | func setPriority (assetId,priority) = valueOrElse(isSelfCall(i), if ((0 > priority)) | |
79 | 79 | then throw("Priority must be positive") | |
80 | 80 | else [IntegerEntry((keyAssetPriority + assetId), priority)]) | |
81 | 81 | ||
82 | 82 | ||
83 | 83 | ||
84 | 84 | @Callable(i) | |
85 | 85 | func setAdmin () = valueOrElse(isSelfCall(i), [StringEntry(keyAdminPubKey1, toBase58String(adminPubKey1)), StringEntry(keyAdminPubKey2, toBase58String(adminPubKey2)), StringEntry(keyAdminPubKey3, toBase58String(adminPubKey3))]) | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | ||
89 | 89 | @Callable(i) | |
90 | 90 | func addPool (poolAddress,poolName) = valueOrElse(isSelfCall(i), { | |
91 | 91 | let validatedAddress = getAddressIfValid(poolAddress) | |
92 | 92 | let keyName = (keyPrefixPoolName + validatedAddress) | |
93 | 93 | let keyIndex = (keyPrefixPoolIndex + validatedAddress) | |
94 | 94 | let assetIdA = valueOrErrorMessage(getString(value(addressFromString(poolAddress)), keyAssetIdA), "Asset id A is incorrect") | |
95 | 95 | let assetIdB = valueOrErrorMessage(getString(value(addressFromString(poolAddress)), keyAssetIdB), "Asset id B is incorrect") | |
96 | 96 | let check = isDataStorageUntouched(this) | |
97 | 97 | let userScriptHash = value(scriptHash(i.caller)) | |
98 | 98 | let cpmmHash = getBinaryValue(keyOracleScriptHashCPMM) | |
99 | 99 | let flatHash = getBinaryValue(keyOracleScriptHashFlat) | |
100 | 100 | let isNotCpmm = if ((userScriptHash != cpmmHash)) | |
101 | 101 | then true | |
102 | 102 | else false | |
103 | 103 | let isNotFlat = if ((userScriptHash != flatHash)) | |
104 | 104 | then true | |
105 | 105 | else false | |
106 | 106 | let isNotEmptyData = if ((!(check) == true)) | |
107 | + | then true | |
108 | + | else false | |
109 | + | let isEmptyData = if ((!(check) == true)) | |
107 | 110 | then false | |
108 | 111 | else true | |
109 | 112 | let isNotPoolContract = if (if (isNotCpmm) | |
110 | 113 | then isNotFlat | |
111 | 114 | else false) | |
112 | 115 | then true | |
113 | 116 | else false | |
114 | 117 | if (if (isNotPoolContract) | |
115 | 118 | then true | |
116 | 119 | else isNotEmptyData) | |
117 | 120 | then throw("Unexpected script was found.") | |
118 | 121 | else { | |
119 | 122 | let possiblyAlreadyAddedPool = getString(this, keyName) | |
120 | 123 | let possibleDuplicateA = getString(this, (((keyPair + assetIdA) + "_") + assetIdB)) | |
121 | 124 | let possibleDuplicateB = getString(this, (((keyPair + assetIdB) + "_") + assetIdA)) | |
122 | 125 | if (isDefined(possiblyAlreadyAddedPool)) | |
123 | 126 | then throw((((("Pool with address \"" + validatedAddress) + "\" is already defined with name \"") + value(possiblyAlreadyAddedPool)) + "\"")) | |
124 | 127 | else if (if (isDefined(possibleDuplicateA)) | |
125 | 128 | then true | |
126 | 129 | else isDefined(possibleDuplicateB)) | |
127 | 130 | then throw((((("Pool with assets \"" + assetIdA) + "\" and \"") + assetIdB) + "\" is already exists")) | |
128 | 131 | else [IntegerEntry(keyIndex, size(pools)), StringEntry(keyName, getPoolNameIfValid(poolName)), StringEntry((((keyPair + assetIdA) + "_") + assetIdB), poolAddress), StringEntry(keyPoolsListName, makeString((pools :+ validatedAddress), ","))] | |
129 | 132 | } | |
130 | 133 | }) | |
131 | 134 | ||
132 | 135 | ||
133 | 136 | ||
134 | 137 | @Callable(i) | |
135 | 138 | func renamePool (poolAddress,newPoolName) = valueOrElse(isSelfCall(i), { | |
136 | 139 | let validatedAddress = getAddressIfValid(poolAddress) | |
137 | 140 | let keyName = (keyPrefixPoolName + validatedAddress) | |
138 | 141 | let possiblyAlreadyAddedPool = getString(this, keyName) | |
139 | 142 | if (isDefined(possiblyAlreadyAddedPool)) | |
140 | 143 | then [StringEntry(keyName, getPoolNameIfValid(newPoolName))] | |
141 | 144 | else throw((("Pool with address \"" + validatedAddress) + "\" has not yet been added")) | |
142 | 145 | }) | |
143 | 146 | ||
144 | 147 | ||
145 | 148 | ||
146 | 149 | @Callable(i) | |
147 | 150 | func updateHashes () = valueOrElse(isSelfCall(i), [BinaryEntry(keyOracleScriptHashCPMM, value(scriptHash(Address(cpmmScriptReferenesAddress)))), BinaryEntry(keyOracleScriptHashFlat, value(scriptHash(Address(flatScriptReferenesAddress))))]) | |
148 | 151 | ||
149 | 152 | ||
150 | 153 | @Verifier(tx) | |
151 | 154 | func verify () = { | |
152 | 155 | let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
153 | 156 | then 1 | |
154 | 157 | else 0 | |
155 | 158 | let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2)) | |
156 | 159 | then 1 | |
157 | 160 | else 0 | |
158 | 161 | let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3)) | |
159 | 162 | then 1 | |
160 | 163 | else 0 | |
161 | 164 | let signedByAdmin = (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2) | |
162 | 165 | let signedByAdminToCallAddPool = (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 1) | |
163 | 166 | match tx { | |
164 | 167 | case inv: InvokeScriptTransaction => | |
165 | 168 | let isSelfInvokeRenamePool = if ((inv.dApp == this)) | |
166 | 169 | then containsElement(["renamePool"], inv.function) | |
167 | 170 | else false | |
168 | 171 | let isSelfInvokeSetAdmin = if ((inv.dApp == this)) | |
169 | 172 | then containsElement(["setAdmin"], inv.function) | |
170 | 173 | else false | |
171 | 174 | let isInvokeAddPool = containsElement(["addPool"], inv.function) | |
172 | 175 | let isSelfInvokeUpdateHashes = if ((inv.dApp == this)) | |
173 | 176 | then containsElement(["updateHashes"], inv.function) | |
174 | 177 | else false | |
175 | 178 | if (if (if (if (if (signedByAdmin) | |
176 | 179 | then (size(inv.payments) == 0) | |
177 | 180 | else false) | |
178 | 181 | then isSelfInvokeRenamePool | |
179 | 182 | else false) | |
180 | 183 | then true | |
181 | 184 | else if ((size(inv.payments) == 0)) | |
182 | 185 | then isInvokeAddPool | |
183 | 186 | else false) | |
184 | 187 | then true | |
185 | 188 | else if (if (signedByAdmin) | |
186 | 189 | then (size(inv.payments) == 0) | |
187 | 190 | else false) | |
188 | 191 | then isSelfInvokeSetAdmin | |
189 | 192 | else false) | |
190 | 193 | then true | |
191 | 194 | else if (if (signedByAdmin) | |
192 | 195 | then (size(inv.payments) == 0) | |
193 | 196 | else false) | |
194 | 197 | then isSelfInvokeUpdateHashes | |
195 | 198 | else false | |
196 | 199 | case _: Order|DataTransaction|SponsorFeeTransaction|SetScriptTransaction|CreateAliasTransaction|LeaseCancelTransaction|LeaseTransaction|IssueTransaction|UpdateAssetInfoTransaction|InvokeScriptTransaction|SetAssetScriptTransaction|TransferTransaction|ExchangeTransaction|MassTransferTransaction|BurnTransaction|ReissueTransaction => | |
197 | 200 | signedByAdmin | |
198 | 201 | case _ => | |
199 | 202 | throw("Match error") | |
200 | 203 | } | |
201 | 204 | } | |
202 | 205 |
github/deemru/w8io/169f3d6 35.74 ms ◑