tx · DsVbqHSzZ16UQc7GrgTf9mDZRFC9azW7LG9YsMQUBKMo 3Mt71RiSbWYENDmeyndvwjoJZwUsXfUkR6b: -0.01400000 Waves 2021.02.04 16:31 [1383500] smart account 3Mt71RiSbWYENDmeyndvwjoJZwUsXfUkR6b > SELF 0.00000000 Waves
{ "type": 13, "id": "DsVbqHSzZ16UQc7GrgTf9mDZRFC9azW7LG9YsMQUBKMo", "fee": 1400000, "feeAssetId": null, "timestamp": 1612445485333, "version": 2, "chainId": 84, "sender": "3Mt71RiSbWYENDmeyndvwjoJZwUsXfUkR6b", "senderPublicKey": "3BKFQLeo5ExZ5Y1pt9Ftzsno7aRwzD96zoYVHP3tcLgV", "proofs": [ "udmY5UGP49wzJHZrxL1Y9bG1zEKL5JW719Y4NBB7fuJHBtRULENPV6j2PHWFj91Wp2qzTPWhmMtEbEJfhjzseSC" ], "script": "base64:AAIDAAAAAAAAABAIARIGCgQBAQEIEgQKAggIAAAABgAAAAAPbG90dGVyeXBvb2xuYW1lAgAAABVfbG90dGVyeV9hbW91bnRfcG9vbF8AAAAAFmxvdHRlcnlwb29scHJvYmFiaWxpdHkCAAAADl9sb3R0ZXJ5X3Byb2JfAAAAABBsb3R0ZXJ5cG9vbHByaWNlAgAAAA9fbG90dGVyeV9wcmljZV8AAAAADWxvdHRlcnlwcmljZXMCAAAAEF9sb3R0ZXJ5X3ByaWNlc18BAAAACnJhbmRvbWl6ZXIAAAABAAAAA2ludgQAAAAEcmFuZAkAAMsAAAACCQAAywAAAAIJAADLAAAAAgkAAMsAAAACCAUAAAADaW52AAAADXRyYW5zYWN0aW9uSWQIBQAAAANpbnYAAAAPY2FsbGVyUHVibGljS2V5CAUAAAAJbGFzdEJsb2NrAAAAE2dlbmVyYXRpb25TaWduYXR1cmUJAAGaAAAAAQgFAAAACWxhc3RCbG9jawAAAAl0aW1lc3RhbXAJAAGaAAAAAQgFAAAACWxhc3RCbG9jawAAAAZoZWlnaHQJAAH3AAAAAQUAAAAEcmFuZ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ZXRBZGRyZXNzBQAAAANuaWwJAQAAAAxTY3JpcHRSZXN1bHQAAAACBQAAAAl3cml0ZVNldHMFAAAAC3dpblRyYW5zZmVyBAAAAAl3cml0ZVNldHMJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgUAAAANY2FsbGVyQWRkcmVzcwIAAAANX3dpbl9hc3NldElkXwIAAAAACQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIFAAAADWNhbGxlckFkZHJlc3MCAAAADF93aW5fdGlja2V0XwgFAAAAB3BheW1lbnQAAAAGYW1vdW50CQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIFAAAADWNhbGxlckFkZHJlc3MCAAAABV93aW5fBQAAAA13YWxsZXRBZGRyZXNzBQAAAANuaWwJAQAAAAxTY3JpcHRSZXN1bHQAAAACBQAAAAl3cml0ZVNldHMJAQAAAAtUcmFuc2ZlclNldAAAAAEFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAByRtYXRjaDAFAAAAAnR4AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAA9EYXRhVHJhbnNhY3Rpb24GAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABRTZXRTY3JpcHRUcmFuc2FjdGlvbgYJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5FFX/Vg==", "height": 1383500, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 24qgmXr8uiLgizqLEoeJLdkneYjHqiVravwqWGKn9h7r Next: 87vn4sPVrta2YQ1aYE1ZmrkctNNT8h9N167pp3urLNAF Diff:
Old | New | Differences | |
---|---|---|---|
28 | 28 | ||
29 | 29 | @Callable(l) | |
30 | 30 | func updateprobability (m,n,o,p) = { | |
31 | - | let q = WriteSet([DataEntry((a + p), n), DataEntry((b + p), m)]) | |
32 | - | ScriptResult(q, TransferSet(nil)) | |
31 | + | let q = "fsdfsadfsdf" | |
32 | + | let r = WriteSet([DataEntry((a + p), n), DataEntry((b + p), m), DataEntry((c + p), o), DataEntry(d, q)]) | |
33 | + | ScriptResult(r, TransferSet(nil)) | |
33 | 34 | } | |
34 | 35 | ||
35 | 36 | ||
36 | 37 | ||
37 | 38 | @Callable(l) | |
38 | - | func startlotto (p, | |
39 | - | let | |
40 | - | let | |
41 | - | let | |
42 | - | let | |
43 | - | let | |
44 | - | let | |
45 | - | let | |
46 | - | let | |
47 | - | let | |
48 | - | let | |
49 | - | if ((500 > (toInt( | |
39 | + | func startlotto (p,s) = { | |
40 | + | let t = toBase58String(l.caller.bytes) | |
41 | + | let u = addressFromStringValue(s) | |
42 | + | let v = getInteger(this, (a + p)) | |
43 | + | let w = getInteger(this, (b + p)) | |
44 | + | let x = getInteger(this, (c + p)) | |
45 | + | let y = extract(l.payment) | |
46 | + | let z = e(l) | |
47 | + | let A = ((y.amount * 190) / 100) | |
48 | + | let B = false | |
49 | + | let C = TransferSet([ScriptTransfer(u, A, unit)]) | |
50 | + | if ((500 > (toInt(z) % 1000))) | |
50 | 51 | then { | |
51 | - | let | |
52 | - | ScriptResult( | |
52 | + | let D = WriteSet([DataEntry((t + "_win_ticket_"), y.amount), DataEntry((t + "_win_"), s)]) | |
53 | + | ScriptResult(D, C) | |
53 | 54 | } | |
54 | 55 | else { | |
55 | - | let | |
56 | - | ScriptResult( | |
56 | + | let D = WriteSet([DataEntry((t + "_win_assetId_"), ""), DataEntry((t + "_win_ticket_"), y.amount), DataEntry((t + "_win_"), s)]) | |
57 | + | ScriptResult(D, TransferSet(nil)) | |
57 | 58 | } | |
58 | 59 | } | |
59 | 60 | ||
60 | 61 | ||
61 | - | @Verifier( | |
62 | - | func | |
63 | - | let j = | |
62 | + | @Verifier(E) | |
63 | + | func F () = { | |
64 | + | let j = E | |
64 | 65 | if ($isInstanceOf(j, "DataTransaction")) | |
65 | 66 | then true | |
66 | 67 | else if ($isInstanceOf(j, "SetScriptTransaction")) | |
67 | 68 | then true | |
68 | - | else sigVerify( | |
69 | + | else sigVerify(E.bodyBytes, E.proofs[0], E.senderPublicKey) | |
69 | 70 | } | |
70 | 71 |
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 | - | let q = WriteSet([DataEntry((a + p), n), DataEntry((b + p), m)]) | |
32 | - | ScriptResult(q, TransferSet(nil)) | |
31 | + | let q = "fsdfsadfsdf" | |
32 | + | let r = WriteSet([DataEntry((a + p), n), DataEntry((b + p), m), DataEntry((c + p), o), DataEntry(d, q)]) | |
33 | + | ScriptResult(r, TransferSet(nil)) | |
33 | 34 | } | |
34 | 35 | ||
35 | 36 | ||
36 | 37 | ||
37 | 38 | @Callable(l) | |
38 | - | func startlotto (p, | |
39 | - | let | |
40 | - | let | |
41 | - | let | |
42 | - | let | |
43 | - | let | |
44 | - | let | |
45 | - | let | |
46 | - | let | |
47 | - | let | |
48 | - | let | |
49 | - | if ((500 > (toInt( | |
39 | + | func startlotto (p,s) = { | |
40 | + | let t = toBase58String(l.caller.bytes) | |
41 | + | let u = addressFromStringValue(s) | |
42 | + | let v = getInteger(this, (a + p)) | |
43 | + | let w = getInteger(this, (b + p)) | |
44 | + | let x = getInteger(this, (c + p)) | |
45 | + | let y = extract(l.payment) | |
46 | + | let z = e(l) | |
47 | + | let A = ((y.amount * 190) / 100) | |
48 | + | let B = false | |
49 | + | let C = TransferSet([ScriptTransfer(u, A, unit)]) | |
50 | + | if ((500 > (toInt(z) % 1000))) | |
50 | 51 | then { | |
51 | - | let | |
52 | - | ScriptResult( | |
52 | + | let D = WriteSet([DataEntry((t + "_win_ticket_"), y.amount), DataEntry((t + "_win_"), s)]) | |
53 | + | ScriptResult(D, C) | |
53 | 54 | } | |
54 | 55 | else { | |
55 | - | let | |
56 | - | ScriptResult( | |
56 | + | let D = WriteSet([DataEntry((t + "_win_assetId_"), ""), DataEntry((t + "_win_ticket_"), y.amount), DataEntry((t + "_win_"), s)]) | |
57 | + | ScriptResult(D, TransferSet(nil)) | |
57 | 58 | } | |
58 | 59 | } | |
59 | 60 | ||
60 | 61 | ||
61 | - | @Verifier( | |
62 | - | func | |
63 | - | let j = | |
62 | + | @Verifier(E) | |
63 | + | func F () = { | |
64 | + | let j = E | |
64 | 65 | if ($isInstanceOf(j, "DataTransaction")) | |
65 | 66 | then true | |
66 | 67 | else if ($isInstanceOf(j, "SetScriptTransaction")) | |
67 | 68 | then true | |
68 | - | else sigVerify( | |
69 | + | else sigVerify(E.bodyBytes, E.proofs[0], E.senderPublicKey) | |
69 | 70 | } | |
70 | 71 |
github/deemru/w8io/169f3d6 60.06 ms ◑