tx · 3LqjGX6MqULSyNeuek8CE5ZfV33HgyyskZA8ZZzqL9vg

3N4Kzbxu521DHPxcgrmZ4XUqN2kF6TqLTzs:  -0.01000000 Waves

2023.08.14 14:48 [2710193] smart account 3N4Kzbxu521DHPxcgrmZ4XUqN2kF6TqLTzs > SELF 0.00000000 Waves

{ "type": 13, "id": "3LqjGX6MqULSyNeuek8CE5ZfV33HgyyskZA8ZZzqL9vg", "fee": 1000000, "feeAssetId": null, "timestamp": 1692013740152, "version": 2, "chainId": 84, "sender": "3N4Kzbxu521DHPxcgrmZ4XUqN2kF6TqLTzs", "senderPublicKey": "8yQuxvQ2qLzXJrgbKZHbsfnNNjuU5wfHheyVujdALGsF", "proofs": [ "4WLprBJSGybHE5Log6umXQhtpZc6JdEuJaAG8uGKAn1qHnkXQLQAsQ748b14XPZJR7HVzA1Rg6eSbyp7BDLwfsSZ" ], "script": "base64:BgIMCAISABIECgIIARIAAwECbWsBAXgJALkJAgUBeAIBXwECZ3MBA2tleQkBE3ZhbHVlT3JFcnJvck1lc3NhZ2UCCQCdCAIFBHRoaXMFA2tleQkAuQkCCQDMCAICAScJAMwIAgUDa2V5CQDMCAICDycga2V5IG5vdCBmb3VuZAUDbmlsAgABAmdpAQNrZXkJARN2YWx1ZU9yRXJyb3JNZXNzYWdlAgkAmggCBQR0aGlzBQNrZXkJALkJAgkAzAgCAgEnCQDMCAIFA2tleQkAzAgCAg8nIGtleSBub3QgZm91bmQFA25pbAIAAwFpAQVzdGFrZQADCQECIT0CCQELdmFsdWVPckVsc2UCCQCbCAIFBHRoaXMCEGxvdHRlcnlJc1N0YXJ0ZWQHBgkAAgECG2xvdHRlcnkgaGFzIG5vdCBzdGFydGVkIHlldAQLbG90dGVyeU5hbWUJAQJncwECEmN1cnJlbnRMb3R0ZXJ5TmFtZQQSbG90dGVyeUZpbmFsSGVpZ2h0CQECZ2kBCQECbWsBCQDMCAIFC2xvdHRlcnlOYW1lCQDMCAICEmxvdHRlcnlGaW5hbEhlaW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=", "height": 2710193, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HecthGiU9SLjia3QGp2zrLXCpjsk2pmXxMbesGVoxXNz Next: Boa9G9QRNyvkj2WqMT1sgLHrN1RM4u6WnJYS4Xm576fD Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4+func a (b) = makeString(b, "_")
45
56
6-@Callable(a)
7-func initLottery (b,c) = if ((a.caller != this))
8- then throw("admin only")
9- else [BooleanEntry("lotteryIsStarted", true), StringEntry("currentLotteryName", b), IntegerEntry(makeString([b, "lotteryFinalHeight"], "_"), c)]
7+func c (d) = valueOrErrorMessage(getString(this, d), makeString(["'", d, "' key not found"], ""))
8+
9+
10+func e (d) = valueOrErrorMessage(getInteger(this, d), makeString(["'", d, "' key not found"], ""))
11+
12+
13+@Callable(f)
14+func stake () = if ((valueOrElse(getBoolean(this, "lotteryIsStarted"), false) != true))
15+ then throw("lottery has not started yet")
16+ 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)]
22+ }
1023
1124
1225
13-@Callable(a)
26+@Callable(f)
27+func initLottery (g,h) = if ((f.caller != this))
28+ then throw("admin only")
29+ else [BooleanEntry("lotteryIsStarted", true), StringEntry("currentLotteryName", g), IntegerEntry(makeString([g, "lotteryFinalHeight"], "_"), h)]
30+
31+
32+
33+@Callable(f)
1434 func call () = {
15- let d = Issue("Asset", "", 1, 0, true, unit, 0)
16- let e = calculateAssetId(d)
17-[BinaryEntry("bin", base58''), BooleanEntry("bool", true), IntegerEntry("int", 1), StringEntry("str", ""), DeleteEntry("str"), d, Reissue(e, 1, false), Burn(e, 1), ScriptTransfer(a.caller, 1, e)]
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)]
1838 }
1939
2040
21-@Verifier(f)
22-func g () = sigVerify(f.bodyBytes, f.proofs[0], f.senderPublicKey)
41+@Verifier(k)
42+func l () = sigVerify(k.bodyBytes, k.proofs[0], k.senderPublicKey)
2343

github/deemru/w8io/026f985 
41.35 ms