tx · 24qgmXr8uiLgizqLEoeJLdkneYjHqiVravwqWGKn9h7r 3Mt71RiSbWYENDmeyndvwjoJZwUsXfUkR6b: -0.01400000 Waves 2021.02.04 16:28 [1383497] smart account 3Mt71RiSbWYENDmeyndvwjoJZwUsXfUkR6b > SELF 0.00000000 Waves
{ "type": 13, "id": "24qgmXr8uiLgizqLEoeJLdkneYjHqiVravwqWGKn9h7r", "fee": 1400000, "feeAssetId": null, "timestamp": 1612445346832, "version": 2, "chainId": 84, "sender": "3Mt71RiSbWYENDmeyndvwjoJZwUsXfUkR6b", "senderPublicKey": "3BKFQLeo5ExZ5Y1pt9Ftzsno7aRwzD96zoYVHP3tcLgV", "proofs": [ "AZy4qDA3WY9Hp5u13Ngd3UnhXGDN7R1nEGRHwjncmmz3QMkHULHhEykkFzFqZ5a9uXAmaG2zQimvc418a1qC1A4" ], "script": "base64:AAIDAAAAAAAAABAIARIGCgQBAQEIEgQKAggIAAAABgAAAAAPbG90dGVyeXBvb2xuYW1lAgAAABVfbG90dGVyeV9hbW91bnRfcG9vbF8AAAAAFmxvdHRlcnlwb29scHJvYmFiaWxpdHkCAAAADl9sb3R0ZXJ5X3Byb2JfAAAAABBsb3R0ZXJ5cG9vbHByaWNlAgAAAA9fbG90dGVyeV9wcmljZV8AAAAADWxvdHRlcnlwcmljZXMCAAAAEF9sb3R0ZXJ5X3ByaWNlc18BAAAACnJhbmRvbWl6ZXIAAAABAAAAA2ludgQAAAAEcmFuZAkAAMsAAAACCQAAywAAAAIJAADLAAAAAgkAAMsAAAACCAUAAAADaW52AAAADXRyYW5zYWN0aW9uSWQIBQAAAANpbnYAAAAPY2FsbGVyUHVibGljS2V5CAUAAAAJbGFzdEJsb2NrAAAAE2dlbmVyYXRpb25TaWduYXR1cmUJAAGaAAAAAQgFAAAACWxhc3RCbG9jawAAAAl0aW1lc3RhbXAJAAGaAAAAAQgFAAAACWxhc3RCbG9jawAAAAZoZWlnaHQJAAH3AAAAAQUAAAAEcmFuZAEAAAA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AAAAJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgUAAAANY2FsbGVyQWRkcmVzcwIAAAAMX3dpbl90aWNrZXRfCAUAAAAHcGF5bWVudAAAAAZhbW91bnQJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgUAAAANY2FsbGVyQWRkcmVzcwIAAAAFX3dpbl8FAAAADXdhbGxldEFkZHJlc3MFAAAAA25pbAkBAAAADFNjcmlwdFJlc3VsdAAAAAIFAAAACXdyaXRlU2V0cwkBAAAAC1RyYW5zZmVyU2V0AAAAAQUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAD0RhdGFUcmFuc2FjdGlvbgYDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAFFNldFNjcmlwdFRyYW5zYWN0aW9uBgkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXljt3M2", "height": 1383497, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6ruNEjF1qjMHDTBuGbdbkyQmWnuiBvF9BqVfMCoUyR7c Next: DsVbqHSzZ16UQc7GrgTf9mDZRFC9azW7LG9YsMQUBKMo Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "_lottery_amount_pool_" | |
5 | 5 | ||
6 | 6 | let b = "_lottery_prob_" | |
7 | 7 | ||
8 | 8 | let c = "_lottery_price_" | |
9 | 9 | ||
10 | 10 | let d = "_lottery_prices_" | |
11 | 11 | ||
12 | 12 | func e (f) = { | |
13 | 13 | let g = ((((f.transactionId + f.callerPublicKey) + lastBlock.generationSignature) + toBytes(lastBlock.timestamp)) + toBytes(lastBlock.height)) | |
14 | 14 | sha256(g) | |
15 | 15 | } | |
16 | 16 | ||
17 | 17 | ||
18 | 18 | func h (i) = { | |
19 | 19 | let j = getString(this, d) | |
20 | 20 | if ($isInstanceOf(j, "String")) | |
21 | 21 | then { | |
22 | 22 | let k = j | |
23 | 23 | k | |
24 | 24 | } | |
25 | 25 | else i | |
26 | 26 | } | |
27 | 27 | ||
28 | 28 | ||
29 | 29 | @Callable(l) | |
30 | 30 | func updateprobability (m,n,o,p) = { | |
31 | 31 | let q = WriteSet([DataEntry((a + p), n), DataEntry((b + p), m)]) | |
32 | 32 | ScriptResult(q, TransferSet(nil)) | |
33 | 33 | } | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | ||
37 | 37 | @Callable(l) | |
38 | 38 | func startlotto (p,r) = { | |
39 | 39 | let s = toBase58String(l.caller.bytes) | |
40 | 40 | let t = addressFromStringValue(r) | |
41 | 41 | let u = getInteger(this, (a + p)) | |
42 | 42 | let v = getInteger(this, (b + p)) | |
43 | 43 | let w = getInteger(this, (c + p)) | |
44 | 44 | let x = extract(l.payment) | |
45 | 45 | let y = e(l) | |
46 | 46 | let z = ((x.amount * 190) / 100) | |
47 | 47 | let A = false | |
48 | 48 | let B = TransferSet([ScriptTransfer(t, z, unit)]) | |
49 | 49 | if ((500 > (toInt(y) % 1000))) | |
50 | 50 | then { | |
51 | 51 | let C = WriteSet([DataEntry((s + "_win_ticket_"), x.amount), DataEntry((s + "_win_"), r)]) | |
52 | 52 | ScriptResult(C, B) | |
53 | 53 | } | |
54 | 54 | else { | |
55 | 55 | let C = WriteSet([DataEntry((s + "_win_assetId_"), ""), DataEntry((s + "_win_ticket_"), x.amount), DataEntry((s + "_win_"), r)]) | |
56 | 56 | ScriptResult(C, TransferSet(nil)) | |
57 | 57 | } | |
58 | 58 | } | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | @Verifier(D) | |
62 | 62 | func E () = { | |
63 | 63 | let j = D | |
64 | 64 | if ($isInstanceOf(j, "DataTransaction")) | |
65 | 65 | then true | |
66 | 66 | else if ($isInstanceOf(j, "SetScriptTransaction")) | |
67 | 67 | then true | |
68 | 68 | else sigVerify(D.bodyBytes, D.proofs[0], D.senderPublicKey) | |
69 | 69 | } | |
70 | 70 |
github/deemru/w8io/169f3d6 38.02 ms ◑