tx · Boa9G9QRNyvkj2WqMT1sgLHrN1RM4u6WnJYS4Xm576fD

3N4Kzbxu521DHPxcgrmZ4XUqN2kF6TqLTzs:  -0.01000000 Waves

2023.08.14 15:35 [2710239] smart account 3N4Kzbxu521DHPxcgrmZ4XUqN2kF6TqLTzs > SELF 0.00000000 Waves

{ "type": 13, "id": "Boa9G9QRNyvkj2WqMT1sgLHrN1RM4u6WnJYS4Xm576fD", "fee": 1000000, "feeAssetId": null, "timestamp": 1692016566628, "version": 2, "chainId": 84, "sender": "3N4Kzbxu521DHPxcgrmZ4XUqN2kF6TqLTzs", "senderPublicKey": "8yQuxvQ2qLzXJrgbKZHbsfnNNjuU5wfHheyVujdALGsF", "proofs": [ "3KDtvpJeqsGqfmC2krRftyBd7VaegVriq8WwR6Vm6WnLBJG3kB8FLHZWLfHjikQ4eVTkF2jNR24FHuXLGYn2NEoN" ], "script": "base64:BgIMCAISABIECgIIARIABQAObG90dGVyeUFzc2V0SUQJANkEAQIsM0x6MjNtU1V2VDFFc3djQm4yc1VSWUpHMmF0OHJHNWFGdVVyVEF3YVBNNlEACnRpY2tldFNpemUAgMLXLwECbWsBAXgJALkJAgUBeAIBXwECZ3MBA2tleQkBE3ZhbHVlT3JFcnJvck1lc3NhZ2UCCQCdCAIFBHRoaXMFA2tleQkAuQkCCQDMCAICAScJAMwIAgUDa2V5CQDMCAICDycga2V5IG5vdCBmb3VuZAUDbmlsAgABAmdpAQNrZXkJARN2YWx1ZU9yRXJyb3JNZXNzYWdlAgkAmggCBQR0aGlzBQNrZXkJALkJAgkAzAgCAgEnCQDMCAIFA2tleQkAzAgCAg8nIGtleSBub3QgZm91bmQFA25pbAIAAwFpAQVzdGFrZQADCQECIT0CCQELdmFsdWVPckVsc2UCCQCbCAIFBHRoaXMCEGxvdHRlcnlJc1N0YXJ0ZWQHBgkAAgECG0xvdHRlcnkgaGFzIG5vdCBzdGFydGVkIHlldAQLbG90dGVyeU5hbWUJAQJncwECEmN1cnJlbnRMb3R0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EEY2FsbAAEBWFzc2V0CQDDCAcCBUFzc2V0AgAAAQAABgUEdW5pdAAABAdhc3NldElkCQC4CAEFBWFzc2V0CQDMCAIJAQtCaW5hcnlFbnRyeQICA2JpbgEACQDMCAIJAQxCb29sZWFuRW50cnkCAgRib29sBgkAzAgCCQEMSW50ZWdlckVudHJ5AgIDaW50AAEJAMwIAgkBC1N0cmluZ0VudHJ5AgIDc3RyAgAJAMwIAgkBC0RlbGV0ZUVudHJ5AQIDc3RyCQDMCAIFBWFzc2V0CQDMCAIJAQdSZWlzc3VlAwUHYXNzZXRJZAABBwkAzAgCCQEEQnVybgIFB2Fzc2V0SWQAAQkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCAUBaQZjYWxsZXIAAQUHYXNzZXRJZAUDbmlsAQJ0eAEGdmVyaWZ5AAkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tlecCYRFI=", "height": 2710239, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3LqjGX6MqULSyNeuek8CE5ZfV33HgyyskZA8ZZzqL9vg Next: G148PL3j2GbrSs6go1b4RZfbopEtcDCx9D7KoBVppm65 Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-func a (b) = makeString(b, "_")
4+let a = fromBase58String("3Lz23mSUvT1EswcBn2sURYJG2at8rG5aFuUrTAwaPM6Q")
5+
6+let b = 100000000
7+
8+func c (d) = makeString(d, "_")
59
610
7-func c (d) = valueOrErrorMessage(getString(this, d), makeString(["'", d, "' key not found"], ""))
11+func e (f) = valueOrErrorMessage(getString(this, f), makeString(["'", f, "' key not found"], ""))
812
913
10-func e (d) = valueOrErrorMessage(getInteger(this, d), makeString(["'", d, "' key not found"], ""))
14+func g (f) = valueOrErrorMessage(getInteger(this, f), makeString(["'", f, "' key not found"], ""))
1115
1216
13-@Callable(f)
17+@Callable(h)
1418 func stake () = if ((valueOrElse(getBoolean(this, "lotteryIsStarted"), false) != true))
15- then throw("lottery has not started yet")
19+ then throw("Lottery has not started yet")
1620 else {
17- let g = c("currentLotteryName")
18- let h = e(a([g, "lotteryFinalHeight"]))
19- if (((height - 1) >= h))
20- then throw("lottery has not started yet")
21- else [BooleanEntry("tmp", true)]
21+ let i = e("currentLotteryName")
22+ let j = g(c([i, "lotteryFinalHeight"]))
23+ if (((height - 1) >= j))
24+ then throw("Lottery has not started yet")
25+ else if ((size(h.payments) == 0))
26+ then throw("No payment added")
27+ else if ((size(h.payments) != 1))
28+ then throw("Too many payments added")
29+ else if ((h.payments[0].assetId != a))
30+ then throw("Wrong payment assetId")
31+ else {
32+ let k = h.payments[0].amount
33+ let l = (k / b)
34+[ScriptTransfer(h.caller, (k - (l * b)), a)]
35+ }
2236 }
2337
2438
2539
26-@Callable(f)
27-func initLottery (g,h) = if ((f.caller != this))
40+@Callable(h)
41+func initLottery (i,j) = if ((h.caller != this))
2842 then throw("admin only")
29- else [BooleanEntry("lotteryIsStarted", true), StringEntry("currentLotteryName", g), IntegerEntry(makeString([g, "lotteryFinalHeight"], "_"), h)]
43+ else [BooleanEntry("lotteryIsStarted", true), StringEntry("currentLotteryName", i), IntegerEntry(makeString([i, "lotteryFinalHeight"], "_"), j)]
3044
3145
3246
33-@Callable(f)
47+@Callable(h)
3448 func call () = {
35- let i = Issue("Asset", "", 1, 0, true, unit, 0)
36- let j = calculateAssetId(i)
37-[BinaryEntry("bin", base58''), BooleanEntry("bool", true), IntegerEntry("int", 1), StringEntry("str", ""), DeleteEntry("str"), i, Reissue(j, 1, false), Burn(j, 1), ScriptTransfer(f.caller, 1, j)]
49+ let m = Issue("Asset", "", 1, 0, true, unit, 0)
50+ let n = calculateAssetId(m)
51+[BinaryEntry("bin", base58''), BooleanEntry("bool", true), IntegerEntry("int", 1), StringEntry("str", ""), DeleteEntry("str"), m, Reissue(n, 1, false), Burn(n, 1), ScriptTransfer(h.caller, 1, n)]
3852 }
3953
4054
41-@Verifier(k)
42-func l () = sigVerify(k.bodyBytes, k.proofs[0], k.senderPublicKey)
55+@Verifier(o)
56+func p () = sigVerify(o.bodyBytes, o.proofs[0], o.senderPublicKey)
4357

github/deemru/w8io/169f3d6 
28.82 ms