tx · DGn5BtdPMuxHhrXBcKtQQ8BVQUDBabbhwB6oJnbuioQJ

3NBiXxLpuHVS2dGSaLvyPfCQYMPRKCtGCVg:  -0.01400000 Waves

2019.07.09 22:46 [578542] smart account 3NBiXxLpuHVS2dGSaLvyPfCQYMPRKCtGCVg > SELF 0.00000000 Waves

{ "type": 13, "id": "DGn5BtdPMuxHhrXBcKtQQ8BVQUDBabbhwB6oJnbuioQJ", "fee": 1400000, "feeAssetId": null, "timestamp": 1562701649586, "version": 1, "sender": "3NBiXxLpuHVS2dGSaLvyPfCQYMPRKCtGCVg", "senderPublicKey": "H2yzJU1BtKf9NAhJSK6nCVgmFdaRaFBs5y3zgajHTLGs", "proofs": [ "3j5CWs4Nmdy2x2mGqHSavSZ2h8wznHGCLYdUiDAAudVEv8wZRfZzpxXbjQwDpv9GP85JrdnCd4i61ncvQAZBRxhV" ], "script": "base64:AAIDAAAAAAAAAAAAAAAKAAAAAA5hZG1pblB1YmxpY0tleQEAAAAgoPq5TrIPqNMyX9LJ5ea1kHoixxLdZLkjdZ9lUlSz41QAAAAABXdjdElkAQAAACBAkwcahwxqDOVmEdNdlcYsRPoEBwsu3SMjVjLFv3jP4gAAAAAId3ZzUHJpY2UAAAAAAAX14QAAAAAACHdjdFByaWNlAAAAAAAAAABkAAAAAAhsYXN0Q2VsbAAAAAAAAAAAYwAAAAAIcm91bmRLZXkCAAAABXJvdW5kAAAAAAhjZWxsc0tleQIAAAAFY2VsbHMAAAAACmxhc3RXaW5LZXkCAAAAB2xhc3RXaW4AAAAADWxhc3RXaW5XY3RLZXkCAAAAC2xhc3RXaW5fd2N0AAAAAA1sYXN0V2luV3ZzS2V5AgAAAAtsYXN0V2luX3d2cwAAAAEAAAABaQEAAAADYnV5AAAAAQAAAARjZWxsBAAAAAVyb3VuZAkBAAAAB2V4dHJhY3QAAAABCQAEGgAAAAIFAAAABHRoaXMFAAAACHJvdW5kS2V5BAAAAAVjZWxscwkBAAAAB2V4dHJhY3QAAAABCQAEG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5BZGRyZXNzBQAAAA13Y3RBZG1pblNoYXJlBQAAAAV3Y3RJZAUAAAADbmlsCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABpAAAAAEFAAAABGNlbGwJAAEsAAAAAgkAASwAAAACCQAEJQAAAAEIBQAAAAFpAAAABmNhbGxlcgIAAAABXwkAAaQAAAABBQAAAAVyb3VuZAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAAIY2VsbHNLZXkJAABkAAAAAgUAAAAFY2VsbHMAAAAAAAAAAAEFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAByRtYXRjaDAFAAAAAnR4CQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleTFEEw0=", "chainId": 84, "height": 578542, "spentComplexity": 0 } View: original | compacted Prev: 67ujRgftPDhNHFEp1W6b7v4gzCp3AwTZDe46zEHAGyt2 Next: 2wEC6v8EayocEeQyKWa4LKHVHjxfdvv7zquh7BSR1cwi Diff:
OldNewDifferences
1111
1212 let e = 99
1313
14-let f = 35
14+let f = "round"
1515
16-let g = "round"
16+let g = "cells"
1717
18-let h = "cells"
18+let h = "lastWin"
1919
20-let i = "lastWin"
20+let i = "lastWin_wct"
2121
22-@Callable(j)
23-func test () = {
24- let k = (toInt(lastBlock.generationSignature) % 10)
25- throw(((((toBase58String(lastBlock.generationSignature) + ", ") + toBase64String(lastBlock.generationSignature)) + ", ") + toString(k)))
26- }
22+let j = "lastWin_wvs"
2723
28-
29-
30-@Callable(j)
24+@Callable(k)
3125 func buy (l) = {
32- let m = extract(getInteger(this, g))
33- let n = extract(getInteger(this, h))
26+ let m = extract(getInteger(this, f))
27+ let n = extract(getInteger(this, g))
3428 if (if ((0 > l))
3529 then true
3630 else (l > e))
37- then throw("invalid cell number")
31+ then throw("Invalid number")
3832 else {
39- let o = valueOrErrorMessage(j.payment, "Where is payment?")
33+ let o = valueOrErrorMessage(k.payment, "Where is payment?")
4034 let p = !(isDefined(o.assetId))
4135 let q = (o.assetId == b)
4236 if (if (if (if (!(q))
5044 else if (p)
5145 then (o.amount != c)
5246 else false)
53- then throw("ticket price is 1 WCT or 1 WAVES")
47+ then throw("Price is 1 WCT or 1 WAVES")
5448 else {
5549 let r = getString(this, toString(l))
5650 let s = if (isDefined(r))
6256 }
6357 else false
6458 if (s)
65- then throw("already bought")
59+ then throw("Already bought")
6660 else {
6761 let u = (n == e)
6862 if (u)
8074 let B = (x / 10)
8175 let C = (x - B)
8276 let D = addressFromPublicKey(a)
83- let k = (toInt(lastBlock.generationSignature) % (e + 1))
84- let E = extract(getString(this, toString(k)))
85- let F = if ((k == l))
86- then j.caller
87- else extract(addressFromString(split(E, "_")[0]))
88- ScriptResult(WriteSet([DataEntry(toString(l), ((toString(j.caller) + "_") + toString(m))), DataEntry(h, 0), DataEntry(g, (m + 1)), DataEntry(i, ((toString(k) + "_") + toString(F)))]), TransferSet([ScriptTransfer(F, A, unit), ScriptTransfer(D, z, unit), ScriptTransfer(F, C, b), ScriptTransfer(D, B, b)]))
77+ let E = (toInt(lastBlock.generationSignature) % (e + 1))
78+ let F = extract(getString(this, toString(E)))
79+ let G = if ((E == l))
80+ then k.caller
81+ else extract(addressFromString(split(F, "_")[0]))
82+ ScriptResult(WriteSet([DataEntry(toString(l), ((toString(k.caller) + "_") + toString(m))), DataEntry(g, 0), DataEntry(f, (m + 1)), DataEntry(h, ((toString(E) + "_") + toString(G))), DataEntry(j, y), DataEntry(i, x)]), TransferSet([ScriptTransfer(G, A, unit), ScriptTransfer(D, z, unit), ScriptTransfer(G, C, b), ScriptTransfer(D, B, b)]))
8983 }
90- else WriteSet([DataEntry(toString(l), ((toString(j.caller) + "_") + toString(m))), DataEntry(h, (n + 1))])
84+ else WriteSet([DataEntry(toString(l), ((toString(k.caller) + "_") + toString(m))), DataEntry(g, (n + 1))])
9185 }
9286 }
9387 }
9488 }
9589
9690
97-@Verifier(G)
98-func H () = {
99- let I = G
100- sigVerify(G.bodyBytes, G.proofs[0], G.senderPublicKey)
91+@Verifier(H)
92+func I () = {
93+ let J = H
94+ sigVerify(H.bodyBytes, H.proofs[0], H.senderPublicKey)
10195 }
10296
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = base58'BqPySUvbKdRTRZ33nGTtrQRdus5qwhnQkqZ7G9iNcDto'
55
66 let b = base58'5M58Edq3qciFLWMFS9kLLKfFQoENxokdi2hdE3ju4hrq'
77
88 let c = 100000000
99
1010 let d = 100
1111
1212 let e = 99
1313
14-let f = 35
14+let f = "round"
1515
16-let g = "round"
16+let g = "cells"
1717
18-let h = "cells"
18+let h = "lastWin"
1919
20-let i = "lastWin"
20+let i = "lastWin_wct"
2121
22-@Callable(j)
23-func test () = {
24- let k = (toInt(lastBlock.generationSignature) % 10)
25- throw(((((toBase58String(lastBlock.generationSignature) + ", ") + toBase64String(lastBlock.generationSignature)) + ", ") + toString(k)))
26- }
22+let j = "lastWin_wvs"
2723
28-
29-
30-@Callable(j)
24+@Callable(k)
3125 func buy (l) = {
32- let m = extract(getInteger(this, g))
33- let n = extract(getInteger(this, h))
26+ let m = extract(getInteger(this, f))
27+ let n = extract(getInteger(this, g))
3428 if (if ((0 > l))
3529 then true
3630 else (l > e))
37- then throw("invalid cell number")
31+ then throw("Invalid number")
3832 else {
39- let o = valueOrErrorMessage(j.payment, "Where is payment?")
33+ let o = valueOrErrorMessage(k.payment, "Where is payment?")
4034 let p = !(isDefined(o.assetId))
4135 let q = (o.assetId == b)
4236 if (if (if (if (!(q))
4337 then !(p)
4438 else false)
4539 then true
4640 else if (q)
4741 then (o.amount != d)
4842 else false)
4943 then true
5044 else if (p)
5145 then (o.amount != c)
5246 else false)
53- then throw("ticket price is 1 WCT or 1 WAVES")
47+ then throw("Price is 1 WCT or 1 WAVES")
5448 else {
5549 let r = getString(this, toString(l))
5650 let s = if (isDefined(r))
5751 then {
5852 let t = split(extract(r), "_")[1]
5953 if ((t == toString(m)))
6054 then true
6155 else false
6256 }
6357 else false
6458 if (s)
65- then throw("already bought")
59+ then throw("Already bought")
6660 else {
6761 let u = (n == e)
6862 if (u)
6963 then {
7064 let v = if (q)
7165 then 1
7266 else 0
7367 let w = if (p)
7468 then 1
7569 else 0
7670 let x = (assetBalance(this, b) + (o.amount * v))
7771 let y = (wavesBalance(this) + (o.amount * w))
7872 let z = (y / 10)
7973 let A = (y - z)
8074 let B = (x / 10)
8175 let C = (x - B)
8276 let D = addressFromPublicKey(a)
83- let k = (toInt(lastBlock.generationSignature) % (e + 1))
84- let E = extract(getString(this, toString(k)))
85- let F = if ((k == l))
86- then j.caller
87- else extract(addressFromString(split(E, "_")[0]))
88- ScriptResult(WriteSet([DataEntry(toString(l), ((toString(j.caller) + "_") + toString(m))), DataEntry(h, 0), DataEntry(g, (m + 1)), DataEntry(i, ((toString(k) + "_") + toString(F)))]), TransferSet([ScriptTransfer(F, A, unit), ScriptTransfer(D, z, unit), ScriptTransfer(F, C, b), ScriptTransfer(D, B, b)]))
77+ let E = (toInt(lastBlock.generationSignature) % (e + 1))
78+ let F = extract(getString(this, toString(E)))
79+ let G = if ((E == l))
80+ then k.caller
81+ else extract(addressFromString(split(F, "_")[0]))
82+ ScriptResult(WriteSet([DataEntry(toString(l), ((toString(k.caller) + "_") + toString(m))), DataEntry(g, 0), DataEntry(f, (m + 1)), DataEntry(h, ((toString(E) + "_") + toString(G))), DataEntry(j, y), DataEntry(i, x)]), TransferSet([ScriptTransfer(G, A, unit), ScriptTransfer(D, z, unit), ScriptTransfer(G, C, b), ScriptTransfer(D, B, b)]))
8983 }
90- else WriteSet([DataEntry(toString(l), ((toString(j.caller) + "_") + toString(m))), DataEntry(h, (n + 1))])
84+ else WriteSet([DataEntry(toString(l), ((toString(k.caller) + "_") + toString(m))), DataEntry(g, (n + 1))])
9185 }
9286 }
9387 }
9488 }
9589
9690
97-@Verifier(G)
98-func H () = {
99- let I = G
100- sigVerify(G.bodyBytes, G.proofs[0], G.senderPublicKey)
91+@Verifier(H)
92+func I () = {
93+ let J = H
94+ sigVerify(H.bodyBytes, H.proofs[0], H.senderPublicKey)
10195 }
10296

github/deemru/w8io/169f3d6 
58.14 ms