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 Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4+func mk (x) = makeString(x, "_")
5+
6+
7+func gs (key) = valueOrErrorMessage(getString(this, key), makeString(["'", key, "' key not found"], ""))
8+
9+
10+func gi (key) = valueOrErrorMessage(getInteger(this, key), makeString(["'", key, "' key not found"], ""))
11+
12+
13+@Callable(i)
14+func stake () = if ((valueOrElse(getBoolean(this, "lotteryIsStarted"), false) != true))
15+ then throw("lottery has not started yet")
16+ else {
17+ let lotteryName = gs("currentLotteryName")
18+ let lotteryFinalHeight = gi(mk([lotteryName, "lotteryFinalHeight"]))
19+ if (((height - 1) >= lotteryFinalHeight))
20+ then throw("lottery has not started yet")
21+ else [BooleanEntry("tmp", true)]
22+ }
23+
424
525
626 @Callable(i)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4+func mk (x) = makeString(x, "_")
5+
6+
7+func gs (key) = valueOrErrorMessage(getString(this, key), makeString(["'", key, "' key not found"], ""))
8+
9+
10+func gi (key) = valueOrErrorMessage(getInteger(this, key), makeString(["'", key, "' key not found"], ""))
11+
12+
13+@Callable(i)
14+func stake () = if ((valueOrElse(getBoolean(this, "lotteryIsStarted"), false) != true))
15+ then throw("lottery has not started yet")
16+ else {
17+ let lotteryName = gs("currentLotteryName")
18+ let lotteryFinalHeight = gi(mk([lotteryName, "lotteryFinalHeight"]))
19+ if (((height - 1) >= lotteryFinalHeight))
20+ then throw("lottery has not started yet")
21+ else [BooleanEntry("tmp", true)]
22+ }
23+
424
525
626 @Callable(i)
727 func initLottery (lotteryName,lotteryFinalHeight) = if ((i.caller != this))
828 then throw("admin only")
929 else [BooleanEntry("lotteryIsStarted", true), StringEntry("currentLotteryName", lotteryName), IntegerEntry(makeString([lotteryName, "lotteryFinalHeight"], "_"), lotteryFinalHeight)]
1030
1131
1232
1333 @Callable(i)
1434 func call () = {
1535 let asset = Issue("Asset", "", 1, 0, true, unit, 0)
1636 let assetId = calculateAssetId(asset)
1737 [BinaryEntry("bin", base58''), BooleanEntry("bool", true), IntegerEntry("int", 1), StringEntry("str", ""), DeleteEntry("str"), asset, Reissue(assetId, 1, false), Burn(assetId, 1), ScriptTransfer(i.caller, 1, assetId)]
1838 }
1939
2040
2141 @Verifier(tx)
2242 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
2343

github/deemru/w8io/169f3d6 
22.49 ms