tx · GgiHgwuxdoxEhF7GmCP8D2kCXQPJAUDk891spAYwcnjn 3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9: -0.01400000 Waves 2021.11.19 12:31 [1797743] smart account 3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9 > SELF 0.00000000 Waves
{ "type": 13, "id": "GgiHgwuxdoxEhF7GmCP8D2kCXQPJAUDk891spAYwcnjn", "fee": 1400000, "feeAssetId": null, "timestamp": 1637314294263, "version": 2, "chainId": 84, "sender": "3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9", "senderPublicKey": "D1X9WatF6ARMCmm3jC4Ex5Wd5VQ3LY8i1xbHNqeHqeAa", "proofs": [ "4NEjLLKWhqn5JfbUHkoEzxKqvBfFRhBMRVES1VS7jKd7WiX9z6M7YhMsG6M7WsEn1Gn1BvxqUQqGTriVrsam1dh5", "3Ud8Db4hJVQW2hmcRHTemWB2R9Lb8BzNgh4puNJomgfQoLT9FVuBftZvfkJmmPjEyXmtY4e4VLCh5U6hLBYmNkxU" ], "script": "base64:AAIFAAAAAAAAAB8IAhIAEgQKAggIEgQKAggIEgMKAQQSAwoBCBIDCgEIAAAAEgAAAAAQa2V5UG9vbHNMaXN0TmFtZQIAAAAFcG9vbHMAAAAAEWtleVByZWZpeFBvb2xOYW1lAgAAAAVwb29sXwAAAAASa2V5UHJlZml4UG9vbEluZGV4AgAAAAZpbmRleF8AAAAAB2tleVBhaXICAAAABXBhaXJfAAAAAAtrZXlBc3NldElkQQIAAAAKQV9hc3NldF9pZAAAAAALa2V5QXNzZXRJZEICAAAACkJfYXNzZXRfaWQAAAAAIWtleUxhdW5jaHBhZERhdGFUcmFuc2FjdGlvblN0YXR1cwIAAAAhbGF1bmNocGFkX2RhdGFfdHJhbnNhY3Rpb25fc3RhdHVzAAAAAA9rZXlBZG1pblB1YktleTECAAAAC2FkbWluX3B1Yl8xAAAAAA9rZXlBZG1pblB1YktleTICAAAAC2FkbWluX3B1Yl8yAAAAAA9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ity": 0 } View: original | compacted Prev: GiBKoK8NbkzVV9KaEuMEKH1SF8KCjU3Wi5Pe3m3Kqg9v Next: d4TfDvx31GC6F42TEiRMTdAfJXAuevKCjyp9t3khJvG Full:
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 keyPair = "pair_" | |
11 | 11 | ||
12 | 12 | let keyAssetIdA = "A_asset_id" | |
13 | 13 | ||
14 | 14 | let keyAssetIdB = "B_asset_id" | |
15 | 15 | ||
16 | 16 | let keyLaunchpadDataTransactionStatus = "launchpad_data_transaction_status" | |
17 | 17 | ||
18 | 18 | let keyAdminPubKey1 = "admin_pub_1" | |
19 | 19 | ||
20 | 20 | let keyAdminPubKey2 = "admin_pub_2" | |
21 | 21 | ||
22 | 22 | let keyAdminPubKey3 = "admin_pub_3" | |
23 | 23 | ||
24 | 24 | let keyAchievementsWriters = "achievements_writers" | |
25 | 25 | ||
26 | 26 | let adminPubKey1 = base58'GFmKZ2naZFRoCvNbwKAQVGmLb1uBeWGDgFabdGBuZiuy' | |
27 | 27 | ||
28 | 28 | let adminPubKey2 = base58'GmJXRyhRA79g8yUGgKBAVdnFfQFDMjQG98b1MmLDh5kk' | |
29 | 29 | ||
30 | 30 | let adminPubKey3 = base58'CFhbV6h41hVjbGHudGtS3fYUv7QAKRxFQzKNtx4B5PqP' | |
31 | 31 | ||
32 | 32 | let pools = match getString(this, keyPoolsListName) { | |
33 | 33 | case string: String => | |
34 | 34 | split(string, ",") | |
35 | 35 | case nothing => | |
36 | 36 | nil | |
37 | 37 | } | |
38 | 38 | ||
39 | 39 | func isSelfCall (i) = if ((i.caller == this)) | |
40 | 40 | then unit | |
41 | 41 | else throw("Only the Oracle itself can invoke this function") | |
42 | 42 | ||
43 | 43 | ||
44 | 44 | func getPoolNameIfValid (poolName) = { | |
45 | 45 | let underscoreIndex = valueOrElse(indexOf(poolName, "_"), -1) | |
46 | 46 | let underscoreLastIndex = valueOrElse(lastIndexOf(poolName, "_"), -1) | |
47 | 47 | let hasSingleUnderscore = if (if ((underscoreIndex == underscoreLastIndex)) | |
48 | 48 | then (underscoreIndex > 0) | |
49 | 49 | else false) | |
50 | 50 | then (underscoreIndex != (size(poolName) - 1)) | |
51 | 51 | else false | |
52 | 52 | if (hasSingleUnderscore) | |
53 | 53 | then poolName | |
54 | 54 | else throw("Pool name must consist of two asset names separated by an underscore character") | |
55 | 55 | } | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | func getAddressIfValid (address) = toString(valueOrErrorMessage(addressFromString(address), (("Can't parse \"" + address) + "\" as address"))) | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | @Callable(i) | |
62 | 62 | func setAdmin () = valueOrElse(isSelfCall(i), [StringEntry(keyAdminPubKey1, toBase58String(adminPubKey1)), StringEntry(keyAdminPubKey2, toBase58String(adminPubKey2)), StringEntry(keyAdminPubKey3, toBase58String(adminPubKey3))]) | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | ||
66 | 66 | @Callable(i) | |
67 | 67 | func addPool (poolAddress,poolName) = valueOrElse(isSelfCall(i), { | |
68 | 68 | let validatedAddress = getAddressIfValid(poolAddress) | |
69 | 69 | let keyName = (keyPrefixPoolName + validatedAddress) | |
70 | 70 | let keyIndex = (keyPrefixPoolIndex + validatedAddress) | |
71 | 71 | let assetIdA = valueOrErrorMessage(getString(value(addressFromString(poolAddress)), keyAssetIdA), "Asset id A is incorrect") | |
72 | 72 | let assetIdB = valueOrErrorMessage(getString(value(addressFromString(poolAddress)), keyAssetIdB), "Asset id B is incorrect") | |
73 | 73 | let possiblyAlreadyAddedPool = getString(this, keyName) | |
74 | 74 | if (isDefined(possiblyAlreadyAddedPool)) | |
75 | 75 | then throw((((("Pool with address \"" + validatedAddress) + "\" is already defined with name \"") + value(possiblyAlreadyAddedPool)) + "\"")) | |
76 | 76 | else [IntegerEntry(keyIndex, size(pools)), StringEntry(keyName, getPoolNameIfValid(poolName)), StringEntry((((keyPair + assetIdA) + "_") + assetIdB), poolAddress), StringEntry(keyPoolsListName, makeString((pools :+ validatedAddress), ","))] | |
77 | 77 | }) | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | ||
81 | 81 | @Callable(i) | |
82 | 82 | func renamePool (poolAddress,newPoolName) = valueOrElse(isSelfCall(i), { | |
83 | 83 | let validatedAddress = getAddressIfValid(poolAddress) | |
84 | 84 | let keyName = (keyPrefixPoolName + validatedAddress) | |
85 | 85 | let possiblyAlreadyAddedPool = getString(this, keyName) | |
86 | 86 | if (isDefined(possiblyAlreadyAddedPool)) | |
87 | 87 | then [StringEntry(keyName, getPoolNameIfValid(newPoolName))] | |
88 | 88 | else throw((("Pool with address \"" + validatedAddress) + "\" has not yet been added")) | |
89 | 89 | }) | |
90 | 90 | ||
91 | 91 | ||
92 | 92 | ||
93 | 93 | @Callable(i) | |
94 | 94 | func launchpadDataTransactionStatus (status) = valueOrElse(isSelfCall(i), [BooleanEntry(keyLaunchpadDataTransactionStatus, status)]) | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | ||
98 | 98 | @Callable(i) | |
99 | 99 | func addAchievementsWriter (address) = valueOrElse(isSelfCall(i), { | |
100 | 100 | let writers = valueOrElse(getString(this, keyAchievementsWriters), "") | |
101 | 101 | let data = if ((writers == "")) | |
102 | 102 | then nil | |
103 | 103 | else split(writers, ",") | |
104 | 104 | [StringEntry(keyAchievementsWriters, makeString((data :+ address), ","))] | |
105 | 105 | }) | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | ||
109 | 109 | @Callable(i) | |
110 | 110 | func removeAchievementsWriter (address) = valueOrElse(isSelfCall(i), { | |
111 | 111 | let writers = split(valueOrElse(getString(this, keyAchievementsWriters), ""), ",") | |
112 | 112 | let index = valueOrErrorMessage(indexOf(writers, address), "Can't find address in the list") | |
113 | 113 | [StringEntry(keyAchievementsWriters, makeString(removeByIndex(writers, index), ","))] | |
114 | 114 | }) | |
115 | 115 | ||
116 | 116 | ||
117 | 117 | @Verifier(tx) | |
118 | 118 | func verify () = { | |
119 | 119 | let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
120 | 120 | then 1 | |
121 | 121 | else 0 | |
122 | 122 | let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2)) | |
123 | 123 | then 1 | |
124 | 124 | else 0 | |
125 | 125 | let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3)) | |
126 | 126 | then 1 | |
127 | 127 | else 0 | |
128 | 128 | let signedByAdmin = (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2) | |
129 | 129 | let signedByAdminToCallAddPool = (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 1) | |
130 | 130 | match tx { | |
131 | 131 | case inv: InvokeScriptTransaction => | |
132 | 132 | let isSelfInvokeRenamePool = if ((inv.dApp == this)) | |
133 | 133 | then containsElement(["renamePool"], inv.function) | |
134 | 134 | else false | |
135 | 135 | let isSelfInvokeSetAdmin = if ((inv.dApp == this)) | |
136 | 136 | then containsElement(["setAdmin"], inv.function) | |
137 | 137 | else false | |
138 | 138 | let isSelfInvokeAddPool = if ((inv.dApp == this)) | |
139 | 139 | then containsElement(["addPool"], inv.function) | |
140 | 140 | else false | |
141 | 141 | let isSelfInvokeLaunchpadDataTxStatus = if ((inv.dApp == this)) | |
142 | 142 | then containsElement(["launchpadDataTransactionStatus"], inv.function) | |
143 | 143 | else false | |
144 | 144 | let isSelfInvokeAddAchievementsWriter = if ((inv.dApp == this)) | |
145 | 145 | then containsElement(["addAchievementsWriter"], inv.function) | |
146 | 146 | else false | |
147 | 147 | let isSelfInvokeRemoveAchievementsWriter = if ((inv.dApp == this)) | |
148 | 148 | then containsElement(["removeAchievementsWriter"], inv.function) | |
149 | 149 | else false | |
150 | 150 | if (if (if (if (if (if (if (signedByAdmin) | |
151 | 151 | then (size(inv.payments) == 0) | |
152 | 152 | else false) | |
153 | 153 | then isSelfInvokeRenamePool | |
154 | 154 | else false) | |
155 | 155 | then true | |
156 | 156 | else if (if (signedByAdminToCallAddPool) | |
157 | 157 | then (size(inv.payments) == 0) | |
158 | 158 | else false) | |
159 | 159 | then isSelfInvokeAddPool | |
160 | 160 | else false) | |
161 | 161 | then true | |
162 | 162 | else if (if (signedByAdmin) | |
163 | 163 | then (size(inv.payments) == 0) | |
164 | 164 | else false) | |
165 | 165 | then isSelfInvokeSetAdmin | |
166 | 166 | else false) | |
167 | 167 | then true | |
168 | 168 | else if (if (signedByAdmin) | |
169 | 169 | then (size(inv.payments) == 0) | |
170 | 170 | else false) | |
171 | 171 | then isSelfInvokeLaunchpadDataTxStatus | |
172 | 172 | else false) | |
173 | 173 | then true | |
174 | 174 | else if (if (signedByAdmin) | |
175 | 175 | then (size(inv.payments) == 0) | |
176 | 176 | else false) | |
177 | 177 | then isSelfInvokeAddAchievementsWriter | |
178 | 178 | else false) | |
179 | 179 | then true | |
180 | 180 | else if (if (signedByAdmin) | |
181 | 181 | then (size(inv.payments) == 0) | |
182 | 182 | else false) | |
183 | 183 | then isSelfInvokeRemoveAchievementsWriter | |
184 | 184 | else false | |
185 | 185 | case _: Order|DataTransaction|SponsorFeeTransaction|SetScriptTransaction|CreateAliasTransaction|LeaseCancelTransaction|LeaseTransaction|IssueTransaction|UpdateAssetInfoTransaction|InvokeScriptTransaction|SetAssetScriptTransaction|TransferTransaction|ExchangeTransaction|MassTransferTransaction|BurnTransaction|ReissueTransaction => | |
186 | 186 | signedByAdmin | |
187 | 187 | case _ => | |
188 | 188 | throw("Match error") | |
189 | 189 | } | |
190 | 190 | } | |
191 | 191 |
github/deemru/w8io/026f985 30.15 ms ◑