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:BgIMCAISABIECgIIARIAAwECbWsBAXgJALkJAgUBeAIBXwECZ3MBA2tleQkBE3ZhbHVlT3JFcnJvck1lc3NhZ2UCCQCdCAIFBHRoaXMFA2tleQkAuQkCCQDMCAICAScJAMwIAgUDa2V5CQDMCAICDycga2V5IG5vdCBmb3VuZAUDbmlsAgABAmdpAQNrZXkJARN2YWx1ZU9yRXJyb3JNZXNzYWdlAgkAmggCBQR0aGlzBQNrZXkJALkJAgkAzAgCAgEnCQDMCAIFA2tleQkAzAgCAg8nIGtleSBub3QgZm91bmQFA25pbAIAAwFpAQVzdGFrZQADCQECIT0CCQELdmFsdWVPckVsc2UCCQCbCAIFBHRoaXMCEGxvdHRlcnlJc1N0YXJ0ZWQHBgkAAgECG2xvdHRlcnkgaGFzIG5vdCBzdGFydGVkIHlldAQLbG90dGVyeU5hbWUJAQJncwECEmN1cnJlbnRMb3R0ZXJ5TmFtZQQSbG90dGVyeUZpbmFsSGVpZ2h0CQECZ2kBCQECbWsBCQDMCAIFC2xvdHRlcnlOYW1lCQDMCAICEmxvdHRlcnlGaW5hbEhlaWd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", "height": 2710193, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HecthGiU9SLjia3QGp2zrLXCpjsk2pmXxMbesGVoxXNz Next: Boa9G9QRNyvkj2WqMT1sgLHrN1RM4u6WnJYS4Xm576fD Diff:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# 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 | + | ||
4 | 24 | ||
5 | 25 | ||
6 | 26 | @Callable(i) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# 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 | + | ||
4 | 24 | ||
5 | 25 | ||
6 | 26 | @Callable(i) | |
7 | 27 | func initLottery (lotteryName,lotteryFinalHeight) = if ((i.caller != this)) | |
8 | 28 | then throw("admin only") | |
9 | 29 | else [BooleanEntry("lotteryIsStarted", true), StringEntry("currentLotteryName", lotteryName), IntegerEntry(makeString([lotteryName, "lotteryFinalHeight"], "_"), lotteryFinalHeight)] | |
10 | 30 | ||
11 | 31 | ||
12 | 32 | ||
13 | 33 | @Callable(i) | |
14 | 34 | func call () = { | |
15 | 35 | let asset = Issue("Asset", "", 1, 0, true, unit, 0) | |
16 | 36 | let assetId = calculateAssetId(asset) | |
17 | 37 | [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)] | |
18 | 38 | } | |
19 | 39 | ||
20 | 40 | ||
21 | 41 | @Verifier(tx) | |
22 | 42 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
23 | 43 |
github/deemru/w8io/169f3d6 41.24 ms ◑