tx · 6Q7zeQDrYX6FjUVu4EHKWpGps1y3UMVeNp14ZtSmv33R 3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9: -0.01400000 Waves 2021.09.22 16:14 [1714309] smart account 3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9 > SELF 0.00000000 Waves
{ "type": 13, "id": "6Q7zeQDrYX6FjUVu4EHKWpGps1y3UMVeNp14ZtSmv33R", "fee": 1400000, "feeAssetId": null, "timestamp": 1632316502092, "version": 2, "chainId": 84, "sender": "3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9", "senderPublicKey": "D1X9WatF6ARMCmm3jC4Ex5Wd5VQ3LY8i1xbHNqeHqeAa", "proofs": [ "5qeBJKvTum16eyA76P19Q1AB99GgZRoydWN65sQgQRJFLU6CJ9rNxYv8N8DZFymLJnRzhG7dvXPpzBemEJS1jwTR", "uBB6j7oevhDuhsVi3XAQJerUNpYQ9WarxdNcuzEXZHdmXSu2RQmC4x2wyNMGHGv1uMKN4BnuWjQxCGkVeuXHh6b" ], "script": "base64:AAIFAAAAAAAAABoIAhIECgIIARIAEgYKBAgICAgSBAoCCAgSAAAAABYAAAAAEGtleVBvb2xzTGlzdE5hbWUCAAAABXBvb2xzAAAAABFrZXlQcmVmaXhQb29sTmFtZQIAAAAFcG9vbF8AAAAAEmtleVByZWZpeFBvb2xJbmRleAIAAAAGaW5kZXhfAAAAABJrZXlDb25maXJtZWRBc3NldHMCAAAAEGNvbmZpcm1lZF9hc3NldHMAAAAAEGtleUFzc2V0UHJpb3JpdHkCAAAAD2Fzc2V0X3ByaW9yaXR5XwAAAAAHa2V5UGFpcgIAAAAFcGFpcl8AAAAAC2tleUFzc2V0SWRBAgAAAApBX2Fzc2V0X2lkAAAAAAtrZXlBc3NldElkQgIAAAAKQl9hc3NldF9pZAAAAAAXa2V5T3JhY2xlU2NyaXB0SGFzaENQTU0CAAAAEHNjcmlwdF9oYXNoX2NwbW0AAAAAF2tleU9yYWNsZVNjcmlwd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hpJaCDJRDzca3NJZ8463uKbXx4NQrZ Diff:
Old | New | Differences | |
---|---|---|---|
140 | 140 | let signedByAdminToCallAddPool = (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 1) | |
141 | 141 | match tx { | |
142 | 142 | case inv: InvokeScriptTransaction => | |
143 | + | let isSelfSetPriority = if ((inv.dApp == this)) | |
144 | + | then containsElement(["setPriority"], inv.function) | |
145 | + | else false | |
143 | 146 | let isSelfInvokeRenamePool = if ((inv.dApp == this)) | |
144 | 147 | then containsElement(["renamePool"], inv.function) | |
145 | 148 | else false | |
150 | 153 | let isSelfInvokeUpdateHashes = if ((inv.dApp == this)) | |
151 | 154 | then containsElement(["updateHashes"], inv.function) | |
152 | 155 | else false | |
153 | - | if (if (if (if (if (signedByAdmin) | |
156 | + | if (if (if (if (if (if (signedByAdmin) | |
154 | 157 | then (size(inv.payments) == 0) | |
155 | 158 | else false) | |
156 | 159 | then isSelfInvokeRenamePool | |
158 | 161 | then true | |
159 | 162 | else if ((size(inv.payments) == 0)) | |
160 | 163 | then isInvokeAddPool | |
164 | + | else false) | |
165 | + | then true | |
166 | + | else if (if (signedByAdmin) | |
167 | + | then (size(inv.payments) == 0) | |
168 | + | else false) | |
169 | + | then isSelfSetPriority | |
161 | 170 | else false) | |
162 | 171 | then true | |
163 | 172 | else if (if (signedByAdmin) |
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 pools = match getString(this, keyPoolsListName) { | |
41 | 41 | case string: String => | |
42 | 42 | split(string, ",") | |
43 | 43 | case nothing => | |
44 | 44 | nil | |
45 | 45 | } | |
46 | 46 | ||
47 | 47 | func isSelfCall (i) = if ((i.caller == this)) | |
48 | 48 | then unit | |
49 | 49 | else throw("Only the Oracle itself can invoke this function") | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func getPoolNameIfValid (poolName) = { | |
53 | 53 | let underscoreIndex = valueOrElse(indexOf(poolName, "_"), -1) | |
54 | 54 | let underscoreLastIndex = valueOrElse(lastIndexOf(poolName, "_"), -1) | |
55 | 55 | let hasSingleUnderscore = if (if ((underscoreIndex == underscoreLastIndex)) | |
56 | 56 | then (underscoreIndex > 0) | |
57 | 57 | else false) | |
58 | 58 | then (underscoreIndex != (size(poolName) - 1)) | |
59 | 59 | else false | |
60 | 60 | if (hasSingleUnderscore) | |
61 | 61 | then poolName | |
62 | 62 | else throw("Pool name must consist of two asset names separated by an underscore character") | |
63 | 63 | } | |
64 | 64 | ||
65 | 65 | ||
66 | 66 | func getAddressIfValid (address) = toString(valueOrErrorMessage(addressFromString(address), (("Can't parse \"" + address) + "\" as address"))) | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | @Callable(i) | |
70 | 70 | func setPriority (assetId,priority) = valueOrElse(isSelfCall(i), if ((0 > priority)) | |
71 | 71 | then throw("Priority must be positive") | |
72 | 72 | else [IntegerEntry((keyAssetPriority + assetId), priority)]) | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | ||
76 | 76 | @Callable(i) | |
77 | 77 | func setAdmin () = valueOrElse(isSelfCall(i), [StringEntry(keyAdminPubKey1, toBase58String(adminPubKey1)), StringEntry(keyAdminPubKey2, toBase58String(adminPubKey2)), StringEntry(keyAdminPubKey3, toBase58String(adminPubKey3))]) | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | ||
81 | 81 | @Callable(i) | |
82 | 82 | func addPool (poolAddress,poolName,assetIdA,assetIdB) = { | |
83 | 83 | let validatedAddress = getAddressIfValid(poolAddress) | |
84 | 84 | let keyName = (keyPrefixPoolName + validatedAddress) | |
85 | 85 | let keyIndex = (keyPrefixPoolIndex + validatedAddress) | |
86 | 86 | let check = isDataStorageUntouched(i.caller) | |
87 | 87 | let userScriptHash = value(scriptHash(i.caller)) | |
88 | 88 | let cpmmHash = getBinaryValue(keyOracleScriptHashCPMM) | |
89 | 89 | let flatHash = getBinaryValue(keyOracleScriptHashFlat) | |
90 | 90 | if (if (if ((userScriptHash != cpmmHash)) | |
91 | 91 | then (userScriptHash != flatHash) | |
92 | 92 | else false) | |
93 | 93 | then true | |
94 | 94 | else !(check)) | |
95 | 95 | then throw("Unexpected script was found.") | |
96 | 96 | else { | |
97 | 97 | let possiblyAlreadyAddedPool = getString(this, keyName) | |
98 | 98 | let possibleDuplicateA = getString(this, (((keyPair + assetIdA) + "_") + assetIdB)) | |
99 | 99 | let possibleDuplicateB = getString(this, (((keyPair + assetIdB) + "_") + assetIdA)) | |
100 | 100 | if (isDefined(possiblyAlreadyAddedPool)) | |
101 | 101 | then throw((((("Pool with address \"" + validatedAddress) + "\" is already defined with name \"") + value(possiblyAlreadyAddedPool)) + "\"")) | |
102 | 102 | else if (if (isDefined(possibleDuplicateA)) | |
103 | 103 | then true | |
104 | 104 | else isDefined(possibleDuplicateB)) | |
105 | 105 | then throw((((("Pool with assets \"" + assetIdA) + "\" and \"") + assetIdB) + "\" is already exists")) | |
106 | 106 | else [IntegerEntry(keyIndex, size(pools)), StringEntry(keyName, getPoolNameIfValid(poolName)), StringEntry((((keyPair + assetIdA) + "_") + assetIdB), poolAddress), StringEntry(keyPoolsListName, makeString((pools :+ validatedAddress), ","))] | |
107 | 107 | } | |
108 | 108 | } | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | ||
112 | 112 | @Callable(i) | |
113 | 113 | func renamePool (poolAddress,newPoolName) = valueOrElse(isSelfCall(i), { | |
114 | 114 | let validatedAddress = getAddressIfValid(poolAddress) | |
115 | 115 | let keyName = (keyPrefixPoolName + validatedAddress) | |
116 | 116 | let possiblyAlreadyAddedPool = getString(this, keyName) | |
117 | 117 | if (isDefined(possiblyAlreadyAddedPool)) | |
118 | 118 | then [StringEntry(keyName, getPoolNameIfValid(newPoolName))] | |
119 | 119 | else throw((("Pool with address \"" + validatedAddress) + "\" has not yet been added")) | |
120 | 120 | }) | |
121 | 121 | ||
122 | 122 | ||
123 | 123 | ||
124 | 124 | @Callable(i) | |
125 | 125 | func updateHashes () = valueOrElse(isSelfCall(i), [BinaryEntry(keyOracleScriptHashCPMM, value(scriptHash(Address(cpmmScriptReferenesAddress)))), BinaryEntry(keyOracleScriptHashFlat, value(scriptHash(Address(flatScriptReferenesAddress))))]) | |
126 | 126 | ||
127 | 127 | ||
128 | 128 | @Verifier(tx) | |
129 | 129 | func verify () = { | |
130 | 130 | let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
131 | 131 | then 1 | |
132 | 132 | else 0 | |
133 | 133 | let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2)) | |
134 | 134 | then 1 | |
135 | 135 | else 0 | |
136 | 136 | let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3)) | |
137 | 137 | then 1 | |
138 | 138 | else 0 | |
139 | 139 | let signedByAdmin = (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2) | |
140 | 140 | let signedByAdminToCallAddPool = (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 1) | |
141 | 141 | match tx { | |
142 | 142 | case inv: InvokeScriptTransaction => | |
143 | + | let isSelfSetPriority = if ((inv.dApp == this)) | |
144 | + | then containsElement(["setPriority"], inv.function) | |
145 | + | else false | |
143 | 146 | let isSelfInvokeRenamePool = if ((inv.dApp == this)) | |
144 | 147 | then containsElement(["renamePool"], inv.function) | |
145 | 148 | else false | |
146 | 149 | let isSelfInvokeSetAdmin = if ((inv.dApp == this)) | |
147 | 150 | then containsElement(["setAdmin"], inv.function) | |
148 | 151 | else false | |
149 | 152 | let isInvokeAddPool = containsElement(["addPool"], inv.function) | |
150 | 153 | let isSelfInvokeUpdateHashes = if ((inv.dApp == this)) | |
151 | 154 | then containsElement(["updateHashes"], inv.function) | |
152 | 155 | else false | |
153 | - | if (if (if (if (if (signedByAdmin) | |
156 | + | if (if (if (if (if (if (signedByAdmin) | |
154 | 157 | then (size(inv.payments) == 0) | |
155 | 158 | else false) | |
156 | 159 | then isSelfInvokeRenamePool | |
157 | 160 | else false) | |
158 | 161 | then true | |
159 | 162 | else if ((size(inv.payments) == 0)) | |
160 | 163 | then isInvokeAddPool | |
164 | + | else false) | |
165 | + | then true | |
166 | + | else if (if (signedByAdmin) | |
167 | + | then (size(inv.payments) == 0) | |
168 | + | else false) | |
169 | + | then isSelfSetPriority | |
161 | 170 | else false) | |
162 | 171 | then true | |
163 | 172 | else if (if (signedByAdmin) | |
164 | 173 | then (size(inv.payments) == 0) | |
165 | 174 | else false) | |
166 | 175 | then isSelfInvokeSetAdmin | |
167 | 176 | else false) | |
168 | 177 | then true | |
169 | 178 | else if (if (signedByAdmin) | |
170 | 179 | then (size(inv.payments) == 0) | |
171 | 180 | else false) | |
172 | 181 | then isSelfInvokeUpdateHashes | |
173 | 182 | else false | |
174 | 183 | case _: Order|DataTransaction|SponsorFeeTransaction|SetScriptTransaction|CreateAliasTransaction|LeaseCancelTransaction|LeaseTransaction|IssueTransaction|UpdateAssetInfoTransaction|InvokeScriptTransaction|SetAssetScriptTransaction|TransferTransaction|ExchangeTransaction|MassTransferTransaction|BurnTransaction|ReissueTransaction => | |
175 | 184 | signedByAdmin | |
176 | 185 | case _ => | |
177 | 186 | throw("Match error") | |
178 | 187 | } | |
179 | 188 | } | |
180 | 189 |
github/deemru/w8io/169f3d6 46.88 ms ◑