tx · HsgGtqA5uyEh4cz9JHAmQ5Ru9JNWjcBQm5wDBfoXgWEe 3MrLvyiZvdkfyRa51SVXBYykMsCe1ASZMVL: -0.01800000 Waves 2024.10.03 12:28 [3310489] smart account 3MrLvyiZvdkfyRa51SVXBYykMsCe1ASZMVL > SELF 0.00000000 Waves
{ "type": 13, "id": "HsgGtqA5uyEh4cz9JHAmQ5Ru9JNWjcBQm5wDBfoXgWEe", "fee": 1800000, "feeAssetId": null, "timestamp": 1727947763098, "version": 2, "chainId": 84, "sender": "3MrLvyiZvdkfyRa51SVXBYykMsCe1ASZMVL", "senderPublicKey": "HaDYDZ6mRDE3nPyxhQvHMhS3eEt5GoKNRsL53fiRybJD", "proofs": [ "qp15e2taMriqnKTitM34jERk5DVJjiZzpgnVatWmJKBcFLbDZnByqVnCkwCjToEYxPHnBHN3irScczo9vPJQ7mB" ], "script": "base64:AAIFAAAAAAAAABcIAhIDCgEIEg4KDAgBAQgIBAQIAQEBCAAAACkBAAAAFHRyeUdldFN0cmluZ0V4dGVybmFsAAAAAgAAAAdhZGRyZXNzAAAAA2tleQQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAdhZGRyZXNzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQIAAAAAAQAAAAx0cnlHZXRTdHJpbmcAAAABAAAAA2tleQkBAAAAFHRyeUdldFN0cmluZ0V4dGVybmFsAAAAAgUAAAAEdGhpcwUAAAADa2V5AQAAAAlnZXRPcmFjbGUAAAAACQEAAAAHQWRkcmVzcwAAAAEJAAJZAAAAAQkBAAAADHRyeUdldFN0cmluZwAAAAECAAAAFHN0YXRpY19vcmFjbGVBZGRyZXNzAQAAABJnZXRDZk1hc3RlckFkZHJlc3MAAAAACQEAAAAHQWRkcmVzcwAAAAEJAAJZAAAAAQkBAAAAFHRyeUdldFN0cmluZ0V4dGVybmFsAAAAAgkBAAAACWdldE9yYWNsZQAAA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AADdHhfCQACWAAAAAEIBQAAAAFpAAAADXRyYW5zYWN0aW9uSWQFAAAACWF1Y3Rpb25JZAUAAAADbmlsCQAAAgAAAAECAAAAJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgMJAAAAAAAAAgUAAAAIZnVuY3Rpb24CAAAADWNhbmNlbEF1Y3Rpb24EAAAACWF1Y3Rpb25JZAUAAAAEc3RyMQQAAAAJYWNjZXB0QmlkCQAD/AAAAAQFAAAAEmF1Y3Rpb25EYXBwQWRkcmVzcwIAAAANY2FuY2VsQXVjdGlvbgkABEwAAAACBQAAAAlhdWN0aW9uSWQFAAAAA25pbAUAAAADbmlsAwkAAAAAAAACBQAAAAlhY2NlcHRCaWQFAAAACWFjY2VwdEJpZAkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQABLAAAAAICAAAAA3R4XwkAAlgAAAABCAUAAAABaQAAAA10cmFuc2FjdGlvbklkBQAAAAlhdWN0aW9uSWQFAAAAA25pbAkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAACAAAAAQIAAAADXzEzAAAAANy7yF8=", "height": 3310489, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: B8xJDXDSyxB3WtZT9Wcz7x2uTTnLLQKx76tLG1egRDMr Next: 8nG6b2XxC5AEACR5UCoFYrqd7pEcFcsoDWNab2KNEry9 Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func tryGetStringExternal (address,key) = match getString(address, key) { | |
5 | 5 | case a: String => | |
6 | 6 | a | |
7 | 7 | case _ => | |
8 | 8 | "" | |
9 | 9 | } | |
10 | 10 | ||
11 | 11 | ||
12 | 12 | func tryGetString (key) = tryGetStringExternal(this, key) | |
13 | 13 | ||
14 | 14 | ||
15 | 15 | func getOracle () = Address(fromBase58String(tryGetString("static_oracleAddress"))) | |
16 | 16 | ||
17 | 17 | ||
18 | 18 | func getCfMasterAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), "static_cfMasterAddress"))) | |
19 | 19 | ||
20 | 20 | ||
21 | 21 | func getBackendPubKey () = fromBase58String(getStringValue(getOracle(), "static_backendPubKey")) | |
22 | 22 | ||
23 | 23 | ||
24 | 24 | func getMaxDiff () = getIntegerValue(getOracle(), "static_maxProxyDiff") | |
25 | 25 | ||
26 | 26 | ||
27 | 27 | func getTurtleIncubatorAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), "static_turtleIncubatorAddress"))) | |
28 | 28 | ||
29 | 29 | ||
30 | 30 | func getTurtleBreederAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), "static_turtleBreederAddress"))) | |
31 | 31 | ||
32 | 32 | ||
33 | 33 | func getItemsAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), "static_itemsAddress"))) | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | let kTotalLiquidity = "total_liquidity" | |
37 | 37 | ||
38 | 38 | let kInitialized = "INITIALIZED" | |
39 | 39 | ||
40 | 40 | let kLiquidityThreshold = "LIQUIDITY_THRESHOLD" | |
41 | 41 | ||
42 | 42 | let kTotalShareTokens = "total_share_tokens" | |
43 | 43 | ||
44 | 44 | let kShareAssetId = "SHARE_ASSET_ID" | |
45 | 45 | ||
46 | 46 | let kIncubatorDapp = "INCUBATOR_DAPP" | |
47 | 47 | ||
48 | 48 | let kBreederDapp = "BREEDER_DAPP" | |
49 | 49 | ||
50 | 50 | let kFarmingDapp = "FARMING_DAPP" | |
51 | 51 | ||
52 | 52 | let kMarketProxyDapp = "MARKETPLACE_PROXY_DAPP" | |
53 | 53 | ||
54 | 54 | let kAuctionDapp = "AUCTION_DAPP" | |
55 | 55 | ||
56 | 56 | let kLocked = "LOCKED" | |
57 | 57 | ||
58 | 58 | let kTotalFarmingReward = "total_farming_reward" | |
59 | 59 | ||
60 | 60 | let kCeoCollectedFee = "ceo_collected_fee" | |
61 | 61 | ||
62 | 62 | let kCeoCollectedFeeOverall = "ceo_fee_overall" | |
63 | 63 | ||
64 | 64 | let kToDistr = "to_distribute" | |
65 | 65 | ||
66 | 66 | func getInt (key) = match getInteger(this, key) { | |
67 | 67 | case b: Int => | |
68 | 68 | b | |
69 | 69 | case _ => | |
70 | 70 | 0 | |
71 | 71 | } | |
72 | 72 | ||
73 | 73 | ||
74 | 74 | func tryGetBooleanExternal (address,key) = match getBoolean(address, key) { | |
75 | 75 | case b: Boolean => | |
76 | 76 | b | |
77 | 77 | case _ => | |
78 | 78 | false | |
79 | 79 | } | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | func getBool (key) = tryGetBooleanExternal(this, key) | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | func getBoolA (a,key) = match getBoolean(a, key) { | |
86 | 86 | case b: Boolean => | |
87 | 87 | b | |
88 | 88 | case _ => | |
89 | 89 | unit | |
90 | 90 | } | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func tryGetIntegerExternal (address,key) = match getInteger(address, key) { | |
94 | 94 | case b: Int => | |
95 | 95 | b | |
96 | 96 | case _ => | |
97 | 97 | 0 | |
98 | 98 | } | |
99 | 99 | ||
100 | 100 | ||
101 | 101 | func getAuctionAddr () = tryGetStringExternal(getCfMasterAddress(), kAuctionDapp) | |
102 | 102 | ||
103 | 103 | ||
104 | 104 | func amountOrClear (amount) = if (contains(amount, "0")) | |
105 | 105 | then "" | |
106 | 106 | else amount | |
107 | 107 | ||
108 | 108 | ||
109 | 109 | func getAssetOrigin (generation) = { | |
110 | 110 | let incubatorAddress = tryGetStringExternal(getCfMasterAddress(), kIncubatorDapp) | |
111 | 111 | let breederAddress = tryGetStringExternal(getCfMasterAddress(), kBreederDapp) | |
112 | 112 | if ((generation == "G")) | |
113 | 113 | then fromBase58String(incubatorAddress) | |
114 | 114 | else fromBase58String(breederAddress) | |
115 | 115 | } | |
116 | 116 | ||
117 | 117 | ||
118 | 118 | func getAssetRarity (geno,generation) = { | |
119 | 119 | let quantity = getIntegerValue(Address(getAssetOrigin(generation)), (("stats_" + geno) + "_quantity")) | |
120 | 120 | let power = pow((10000 / quantity), 4, 5, 1, 2, FLOOR) | |
121 | 121 | if ((power > 0)) | |
122 | 122 | then power | |
123 | 123 | else 2 | |
124 | 124 | } | |
125 | 125 | ||
126 | 126 | ||
127 | 127 | func asString (value) = match value { | |
128 | 128 | case string: String => | |
129 | 129 | string | |
130 | 130 | case _ => | |
131 | 131 | throw("wrong type, expected: String") | |
132 | 132 | } | |
133 | 133 | ||
134 | 134 | ||
135 | 135 | func getAssetFarmingPower (assetId) = { | |
136 | 136 | let breederAddress = fromBase58String(tryGetStringExternal(getCfMasterAddress(), kBreederDapp)) | |
137 | 137 | let incubatorAddress = fromBase58String(tryGetStringExternal(getCfMasterAddress(), kIncubatorDapp)) | |
138 | 138 | if (if ((value(assetInfo(assetId)).issuer == Address(breederAddress))) | |
139 | 139 | then true | |
140 | 140 | else (value(assetInfo(assetId)).issuer == Address(incubatorAddress))) | |
141 | 141 | then { | |
142 | 142 | let assetName = value(assetInfo(assetId)).name | |
143 | 143 | let generation = take(takeRight(assetName, 2), 1) | |
144 | 144 | let farmGen = asString(invoke(Address(breederAddress), "getGenFromName", [assetName], nil)) | |
145 | 145 | if ((farmGen == farmGen)) | |
146 | 146 | then getAssetRarity(farmGen, generation) | |
147 | 147 | else throw("Strict value is not equal to itself.") | |
148 | 148 | } | |
149 | 149 | else throw("MGAFP: _20") | |
150 | 150 | } | |
151 | 151 | ||
152 | 152 | ||
153 | 153 | func getTurtleAssetFarmingPower (assetId) = { | |
154 | 154 | let breederAddress = getTurtleBreederAddress() | |
155 | 155 | let incubatorAddress = getTurtleIncubatorAddress() | |
156 | 156 | if (if ((value(assetInfo(assetId)).issuer == breederAddress)) | |
157 | 157 | then true | |
158 | 158 | else (value(assetInfo(assetId)).issuer == incubatorAddress)) | |
159 | 159 | then true | |
160 | 160 | else throw("MGTFP: _20") | |
161 | 161 | } | |
162 | 162 | ||
163 | 163 | ||
164 | 164 | func getDuckMarketPrice (nftId) = { | |
165 | 165 | let rarity = getAssetFarmingPower(nftId) | |
166 | 166 | let breederAddress = addressFromStringValue(tryGetStringExternal(getCfMasterAddress(), kBreederDapp)) | |
167 | 167 | let sterile = tryGetIntegerExternal(breederAddress, (("asset_" + toBase58String(nftId)) + "_children")) | |
168 | 168 | let canBreedText = if ((sterile > 0)) | |
169 | 169 | then "0" | |
170 | 170 | else "1" | |
171 | 171 | let val = getInteger(getCfMasterAddress(), ((("r-" + toString(rarity)) + "-b-") + canBreedText)) | |
172 | 172 | match val { | |
173 | 173 | case price: Int => | |
174 | 174 | let minPrice = if ((sterile > 0)) | |
175 | 175 | then (200000000 * rarity) | |
176 | 176 | else 18000000000 | |
177 | 177 | if ((minPrice > price)) | |
178 | 178 | then minPrice | |
179 | 179 | else price | |
180 | 180 | case _ => | |
181 | 181 | throw((((("There is no price for such duck: " + "r-") + toString(rarity)) + "-b-") + canBreedText)) | |
182 | 182 | } | |
183 | 183 | } | |
184 | 184 | ||
185 | 185 | ||
186 | 186 | func getDuckIdByAuctionId (auctionId) = { | |
187 | 187 | let marketAddr = getAuctionAddr() | |
188 | 188 | tryGetStringExternal(addressFromStringValue(marketAddr), (("auction_" + auctionId) + "_assetId")) | |
189 | 189 | } | |
190 | 190 | ||
191 | 191 | ||
192 | 192 | func getBidAmount (auctionId,bidId) = { | |
193 | 193 | let marketAddr = getAuctionAddr() | |
194 | 194 | tryGetIntegerExternal(addressFromStringValue(marketAddr), (((("auction_" + auctionId) + "_bid_") + bidId) + "_amount")) | |
195 | 195 | } | |
196 | 196 | ||
197 | 197 | ||
198 | 198 | func checkDataGetPrice (ach,breed,gen,price,rarity,ts,signature,duckId) = if ((price == 0)) | |
199 | 199 | then throw("MCACS: No price calculated, so action not allowed! Please contact admin!") | |
200 | 200 | else { | |
201 | 201 | let isDuck = if ((rarity != "0")) | |
202 | 202 | then (gen != "") | |
203 | 203 | else false | |
204 | 204 | let isTurtle = (rarity != "0") | |
205 | 205 | let text = if (isDuck) | |
206 | 206 | then makeString([rarity, breed, ach, gen, toString(price), toString(ts)], ";") | |
207 | 207 | else if (isTurtle) | |
208 | 208 | then makeString([rarity, breed, toString(price), toString(ts)], ";") | |
209 | 209 | else makeString([gen, toString(price), toString(ts)], ";") | |
210 | 210 | let MSINHOUR = 3600000 | |
211 | 211 | if (!(sigVerify_8Kb(toBytes(text), fromBase58String(signature), getBackendPubKey()))) | |
212 | 212 | then throw(((((("MCACS: Invalid proof from backend key" + toBase58String(getBackendPubKey())) + " ") + text) + " ") + toString(isDuck))) | |
213 | 213 | else { | |
214 | 214 | let currentTs = lastBlock.timestamp | |
215 | 215 | if ((currentTs > (ts + MSINHOUR))) | |
216 | 216 | then throw("MCACS: Outdated signature!") | |
217 | 217 | else if (isDuck) | |
218 | 218 | then { | |
219 | 219 | let duckRarity = getAssetFarmingPower(fromBase58String(duckId)) | |
220 | 220 | let diff = (duckRarity - parseIntValue(split(rarity, ".")[0])) | |
221 | 221 | if (if ((-5 > diff)) | |
222 | 222 | then true | |
223 | 223 | else (diff > 5)) | |
224 | 224 | then throw(((((("MCACS: It seems not the correct price info was passed! " + toString(duckRarity)) + " ") + rarity) + " ") + toString(diff))) | |
225 | 225 | else price | |
226 | 226 | } | |
227 | 227 | else if (isTurtle) | |
228 | 228 | then if ((getTurtleAssetFarmingPower(fromBase58String(duckId)) == true)) | |
229 | 229 | then price | |
230 | 230 | else throw("MCACS: This does not seem a turtle!") | |
231 | 231 | else price | |
232 | 232 | } | |
233 | 233 | } | |
234 | 234 | ||
235 | 235 | ||
236 | 236 | let fixedPriceDiff = 500000000 | |
237 | 237 | ||
238 | 238 | @Callable(i) | |
239 | 239 | func configureOracle (oracle) = if ((i.caller != this)) | |
240 | 240 | then throw("BCO: admin only") | |
241 | 241 | else [StringEntry("static_oracleAddress", oracle)] | |
242 | 242 | ||
243 | 243 | ||
244 | 244 | ||
245 | 245 | @Callable(i) | |
246 | 246 | func callMarketplaceProxy (function,int1,int2,str1,str2,ach,breed,gen,price,rarity,ts,signature) = { | |
247 | 247 | let auctionDappAddress = addressFromStringValue(getAuctionAddr()) | |
248 | 248 | if ((getBoolA(getCfMasterAddress(), ("farm_" + toString(i.caller))) != true)) | |
249 | 249 | then throw("_301=") | |
250 | 250 | else if ((function == "initAuction")) | |
251 | 251 | then { | |
252 | 252 | let asset = value(i.payments[0]) | |
253 | 253 | let checkDataPrice = checkDataGetPrice(toString(ach), toString(breed), gen, price, toString(rarity), ts, signature, toBase58String(value(asset.assetId))) | |
254 | 254 | let calcPrice = if (tryGetBooleanExternal(getItemsAddress(), (("direct_cosmetic_" + gen) + "_sale"))) | |
255 | 255 | then min([tryGetIntegerExternal(getItemsAddress(), ("direct_cosmetic_" + gen)), checkDataPrice]) | |
256 | 256 | else checkDataPrice | |
257 | 257 | let maxPriceDiff = (fraction(calcPrice, getMaxDiff(), 100) + fixedPriceDiff) | |
258 | 258 | let initialPrice = int1 | |
259 | 259 | let buyoutPrice = int2 | |
260 | 260 | if (if (((calcPrice - maxPriceDiff) > initialPrice)) | |
261 | 261 | then true | |
262 | 262 | else (initialPrice > buyoutPrice)) | |
263 | 263 | then throw(((((("Price is too low, avg price: " + toString(calcPrice)) + ", min. price: ") + toString((calcPrice - maxPriceDiff))) + ", your bid: ") + toString(initialPrice))) | |
264 | 264 | else if ((value(asset.amount) != 1)) | |
265 | 265 | then throw("_103") | |
266 | 266 | else { | |
267 | 267 | let initAuction = invoke(auctionDappAddress, "initAuction", [initialPrice, buyoutPrice, str1, str2], [AttachedPayment(value(asset.assetId), 1)]) | |
268 | 268 | if ((initAuction == initAuction)) | |
269 | 269 | then [StringEntry(("tx_" + toBase58String(i.transactionId)), toBase58String(value(asset.assetId)))] | |
270 | 270 | else throw("Strict value is not equal to itself.") | |
271 | 271 | } | |
272 | 272 | } | |
273 | 273 | else if ((function == "placeBid")) | |
274 | 274 | then { | |
275 | 275 | let auctionId = str1 | |
276 | 276 | let duckAssetId = getDuckIdByAuctionId(auctionId) | |
277 | 277 | let bidAmount = value(value(i.payments[0]).amount) | |
278 | 278 | let duckMarketPrice = checkDataGetPrice(toString(ach), toString(breed), gen, price, toString(rarity), ts, signature, duckAssetId) | |
279 | 279 | let maxPriceDiff = fraction(duckMarketPrice, getMaxDiff(), 100) | |
280 | 280 | if ((bidAmount > duckMarketPrice)) | |
281 | 281 | then throw(((((("Price is too high, avg price: " + toString(duckMarketPrice)) + ", max. price: ") + toString(duckMarketPrice)) + ", your bid: ") + toString(bidAmount))) | |
282 | 282 | else if ((size(i.payments) != 1)) | |
283 | 283 | then throw("_103") | |
284 | 284 | else { | |
285 | 285 | let placeBid = invoke(auctionDappAddress, "placeBid", [auctionId], [AttachedPayment(value(i.payments[0]).assetId, bidAmount)]) | |
286 | 286 | if ((placeBid == placeBid)) | |
287 | 287 | then [StringEntry(("tx_" + toBase58String(i.transactionId)), auctionId)] | |
288 | 288 | else throw("Strict value is not equal to itself.") | |
289 | 289 | } | |
290 | 290 | } | |
291 | 291 | else if ((function == "acceptBid")) | |
292 | 292 | then if (true) | |
293 | 293 | then throw("MCACS: Accepting bids is disabled for Collective Farms!") | |
294 | 294 | else { | |
295 | 295 | let auctionId = str1 | |
296 | 296 | let bidId = str2 | |
297 | 297 | let duckAssetId = getDuckIdByAuctionId(auctionId) | |
298 | 298 | let bidAmount = getBidAmount(auctionId, bidId) | |
299 | 299 | let duckMarketPrice = checkDataGetPrice(toString(ach), toString(breed), gen, price, toString(rarity), ts, signature, duckAssetId) | |
300 | 300 | let maxPriceDiff = fraction(duckMarketPrice, getMaxDiff(), 100) | |
301 | 301 | if ((duckMarketPrice > bidAmount)) | |
302 | 302 | then throw(((((("Price is too low, avg price: " + toString(duckMarketPrice)) + ", min. price: ") + toString(duckMarketPrice)) + ", your bid: ") + toString(bidAmount))) | |
303 | 303 | else { | |
304 | 304 | let acceptBid = invoke(auctionDappAddress, "acceptBid", [auctionId, bidId], nil) | |
305 | 305 | if ((acceptBid == acceptBid)) | |
306 | 306 | then [StringEntry(("tx_" + toBase58String(i.transactionId)), auctionId)] | |
307 | 307 | else throw("Strict value is not equal to itself.") | |
308 | 308 | } | |
309 | 309 | } | |
310 | 310 | else if ((function == "instantBuy")) | |
311 | 311 | then { | |
312 | 312 | let auctionId = str1 | |
313 | 313 | let duckAssetId = getDuckIdByAuctionId(auctionId) | |
314 | 314 | let bidAmount = value(value(i.payments[0]).amount) | |
315 | 315 | let duckMarketPrice = checkDataGetPrice(toString(ach), toString(breed), gen, price, toString(rarity), ts, signature, duckAssetId) | |
316 | 316 | let maxPrice = if (tryGetBooleanExternal(getItemsAddress(), (("direct_cosmetic_" + gen) + "_sale"))) | |
317 | 317 | then tryGetIntegerExternal(getItemsAddress(), ("direct_cosmetic_" + gen)) | |
318 | 318 | else ((duckMarketPrice + fraction(duckMarketPrice, 15, 100)) + fixedPriceDiff) | |
319 | 319 | if ((bidAmount > maxPrice)) | |
320 | 320 | then throw(((((("Price is too high, calc price: " + toString(duckMarketPrice)) + ", max. price after item check: ") + toString(maxPrice)) + ", your buy price: ") + toString(bidAmount))) | |
321 | 321 | else if ((size(i.payments) != 1)) | |
322 | 322 | then throw("_103") | |
323 | 323 | else { | |
324 | 324 | let instantBuy = invoke(auctionDappAddress, "instantBuy", [auctionId], [AttachedPayment(value(i.payments[0]).assetId, bidAmount)]) | |
325 | 325 | if ((instantBuy == instantBuy)) | |
326 | 326 | then [StringEntry(("tx_" + toBase58String(i.transactionId)), auctionId)] | |
327 | 327 | else throw("Strict value is not equal to itself.") | |
328 | 328 | } | |
329 | 329 | } | |
330 | 330 | else if ((function == "cancelBid")) | |
331 | 331 | then { | |
332 | 332 | let auctionId = str1 | |
333 | 333 | let bidId = str2 | |
334 | 334 | let acceptBid = invoke(auctionDappAddress, "cancelBid", [auctionId, bidId], nil) | |
335 | 335 | if ((acceptBid == acceptBid)) | |
336 | 336 | then [StringEntry(("tx_" + toBase58String(i.transactionId)), auctionId)] | |
337 | 337 | else throw("Strict value is not equal to itself.") | |
338 | 338 | } | |
339 | 339 | else if ((function == "cancelAuction")) | |
340 | 340 | then { | |
341 | 341 | let auctionId = str1 | |
342 | 342 | let acceptBid = invoke(auctionDappAddress, "cancelAuction", [auctionId], nil) | |
343 | 343 | if ((acceptBid == acceptBid)) | |
344 | 344 | then [StringEntry(("tx_" + toBase58String(i.transactionId)), auctionId)] | |
345 | 345 | else throw("Strict value is not equal to itself.") | |
346 | 346 | } | |
347 | 347 | else throw("_13") | |
348 | 348 | } | |
349 | 349 | ||
350 | 350 |
github/deemru/w8io/026f985 74.68 ms ◑