tx · 93kVRN4X4adLVYAvAZwaYCAuyzTBFn9kDzKNVJzsuH6M 3N8GJgmMBsrwhn6uQstYAmqZBLuupZEGXr9: -0.01400000 Waves 2019.07.27 16:07 [604511] smart account 3N8GJgmMBsrwhn6uQstYAmqZBLuupZEGXr9 > SELF 0.00000000 Waves
{ "type": 13, "id": "93kVRN4X4adLVYAvAZwaYCAuyzTBFn9kDzKNVJzsuH6M", "fee": 1400000, "feeAssetId": null, "timestamp": 1564232864861, "version": 1, "sender": "3N8GJgmMBsrwhn6uQstYAmqZBLuupZEGXr9", "senderPublicKey": "BUuYfkh9hHixwVUQvqzkLkLbWrQYnWpJ8FXVjZUPxBcm", "proofs": [ "5tUZD6sZZ2jBKKuUiYuiUqd8pxzxgt5Y6jJWN8ZrVENhjPKWPZFHvLkaNLWUajnjgPeDFwSNcAEUTGmV8SbC5n9Q" ], "script": "base64:AAIDAAAAAAAAAAAAAAAFAAAAAAlzbG90Q291bnQAAAAAAAAAAGQAAAAABXNsb3RzCQAETAAAAAICAAAAATEJAARMAAAAAgIAAAABMQkABEwAAAACAgAAAAExCQAETAAAAAICAAAAATEJAARMAAAAAgIAAAABMQkABEwAAAACAgAAAAExCQAETAAAAAICAAAAATEJAARMAAAAAgIAAAABMQkABEwAAAACAgAAAAExCQAETAAAAAICAAAAATEJAARMAAAAAgIAAAABMQkABEwAAAACAgAAAAExCQAETAAAAAICAAAAATEJAARMAAAAAgIAAAABMQkABEwAAAACAgAAAAExCQAETAAAAAICAAAAATEJAARMAAAAAgIAAAABMQkABEwAAAACAgAAAAExCQAETAAAAAICAAAAATEJAARMAAAAAgIAAAABMQkABEwAAAACAgAAAAExCQAETAAAAAICAAAAATEJAARMAAAAAgIAAAABMQkABEwAAAACAgAAAAExCQAETAAAAAICAAAAATEJAARMAAAAAgIAAAABMQkABEwAAAACAgAAAAExCQAETAAAAAICAAAAATEJAARMAAAAAgIAAAABMQkABEwAAAACAgAAAAExCQAETAAAAAICAAAAATEJAARMAAAAAgIAAAABMQkABEwAAAACAgAAAAExCQAETAAAAAICAAAAATEJAARMAAAAAgIAAAABMQkABEwAAAACAgAAAAExCQAETAAAAAICAAAAATEJAARMAAAAAgIAAAABMQkABEwAAAACAgAAAAExCQAETAAAAAICAAAAATEJAARMAAAAAgIAAAABMQkABEwAAAACAgAAAAExCQAETAAAAAICAAAAATEJAARMAAAAAgIAAAABMQkABEwAAAACAgAAAAExCQAETAAAAAICAAAAATEJAARMAAAAAgIAAAABMQkABEwAAAACAgAAAAExCQAETAAAAAICAAAAATEJAARMAAAAAgIAAAABMQkABEwAAAACAgAAAAEyCQAETAAAAAICAAAAATIJAARMAAAAAgIAAAABMgkABEwAAAACAgAAAAEyCQAETAAAAAICAAAAATIJAARMAAAAAgIAAAABMgkABEwAAAACAgAAAAEyCQAETAAAAAICAAAAATIJAARMAAAAAgIAAAABMgkABEwAAAACAgAAAAEyCQAETAAAAAICAAAAATIJAARMAAAAAgIAAAABMgkABEwAAAACAgAAAAEyCQAETAAAAAICAAAAATIJAARMAAAAAgIAAAABMgkABEwAAAACAgAAAAEyCQAETAAAAAICAAAAATIJAARMAAAAAgIAAAABMgkABEwAAAACAgAAAAEyCQAETAAAAAICAAAAATIJAARMAAAAAgIAAAABMgkABEwAAAACAgAAAAEyCQAETAAAAAICAAAAATIJAARMAAAAAgIAAAABMgkABEwAAAACAgAAAAEyCQAETAAAAAICAAAAATIJAARMAAAAAgIAAAABMgkABEwAAAACAgAAAAEyCQAETAAAAAICAAAAATIJAARMAAAAAgIAAAABMwkABEwAAAACAgAAAAEzCQAETAAAAAICAAAAATMJAARMAAAAAgIAAAABMwkABEwAAAACAgAAAAEzCQAETAAAAAICAAAAATMJAARMAAAAAgIAAAABMwkABEwAAAACAgAAAAEzCQAETAAAAAICAAAAATMJAARMAAAAAgIAAAABMwkABEwAAAACAgAAAAEzCQAETAAAAAICAAAAATMJAARMAAAAAgIAAAABNAkABEwAAAACAgAAAAE0CQAETAAAAAICAAAAATQJAARMAAAAAgIAA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W1lbnQAAAAGYW1vdW50AAAAAAAAAAC+AAAAAAAAAABkBQAAAAR1bml0BQAAAANuaWwJAQAAAAxTY3JpcHRSZXN1bHQAAAACCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACAgAAAARMb29zBQAAAAZwbGF5ZXIFAAAAA25pbAkBAAAAC1RyYW5zZmVyU2V0AAAAAQUAAAADbmlsAAAAAQAAAANpbnYBAAAABWxvdHRvAAAAAAkBAAAACnN0YXJ0TG90dG8AAAABBQAAAANpbnYAAAAAp//rKQ==", "chainId": 84, "height": 604511, "spentComplexity": 0 } View: original | compacted Prev: HofZrQDH7ewiwsZGWm7LJzdCLUEL7G5LBKtNUAUMYqNn Next: GVbVvg9H1zsJ7PMJM6cAt249eATSgf8MyhcFc8R1CK42 Diff:
Old | New | Differences | |
---|---|---|---|
31 | 31 | let l = toBase58String(d.caller.bytes) | |
32 | 32 | let m = c(d) | |
33 | 33 | let n = f(d) | |
34 | - | let o = toString(lastBlock.timestamp) | |
34 | + | let o = f(d) | |
35 | + | let p = f(d) | |
36 | + | let q = toString(lastBlock.timestamp) | |
35 | 37 | if ((500 > (toInt(m) % 1000))) | |
36 | - | then ScriptResult(WriteSet([DataEntry(("Win_111_" + o), n)]), TransferSet([ScriptTransfer(d.caller, ((k.amount * 190) / 100), unit)])) | |
38 | + | then ScriptResult(WriteSet([DataEntry(((((("Win_111_" + q) + "_") + n) + o) + p), n)]), TransferSet([ScriptTransfer(d.caller, ((k.amount * 190) / 100), unit)])) | |
37 | 39 | else ScriptResult(WriteSet([DataEntry("Loos", l)]), TransferSet(nil)) | |
38 | 40 | } | |
39 | 41 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = 100 | |
5 | 5 | ||
6 | 6 | let b = ["1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "3", "3", "3", "3", "3", "3", "3", "3", "3", "3", "3", "3", "4", "4", "4", "4", "4", "4", "5", "5", "5"] | |
7 | 7 | ||
8 | 8 | func c (d) = { | |
9 | 9 | let e = ((((d.transactionId + d.callerPublicKey) + lastBlock.generationSignature) + toBytes(lastBlock.timestamp)) + toBytes(lastBlock.height)) | |
10 | 10 | sha256(e) | |
11 | 11 | } | |
12 | 12 | ||
13 | 13 | ||
14 | 14 | func f (d) = { | |
15 | 15 | let g = sha256(((((d.transactionId + d.callerPublicKey) + lastBlock.generationSignature) + toBytes(lastBlock.timestamp)) + toBytes(lastBlock.height))) | |
16 | 16 | let h = toInt(g) | |
17 | 17 | b[(h % a)] | |
18 | 18 | } | |
19 | 19 | ||
20 | 20 | ||
21 | 21 | func i (d) = { | |
22 | 22 | let j = (wavesBalance(this) / 100) | |
23 | 23 | let k = extract(d.payment) | |
24 | 24 | if (!(isDefined(d.payment))) | |
25 | 25 | then throw("Should be with Payment in Waves") | |
26 | 26 | else if (isDefined(k.assetId)) | |
27 | 27 | then throw("Payment should be in Waves") | |
28 | 28 | else if ((k.amount > j)) | |
29 | 29 | then throw(("Payment should be less than " + toString(j))) | |
30 | 30 | else { | |
31 | 31 | let l = toBase58String(d.caller.bytes) | |
32 | 32 | let m = c(d) | |
33 | 33 | let n = f(d) | |
34 | - | let o = toString(lastBlock.timestamp) | |
34 | + | let o = f(d) | |
35 | + | let p = f(d) | |
36 | + | let q = toString(lastBlock.timestamp) | |
35 | 37 | if ((500 > (toInt(m) % 1000))) | |
36 | - | then ScriptResult(WriteSet([DataEntry(("Win_111_" + o), n)]), TransferSet([ScriptTransfer(d.caller, ((k.amount * 190) / 100), unit)])) | |
38 | + | then ScriptResult(WriteSet([DataEntry(((((("Win_111_" + q) + "_") + n) + o) + p), n)]), TransferSet([ScriptTransfer(d.caller, ((k.amount * 190) / 100), unit)])) | |
37 | 39 | else ScriptResult(WriteSet([DataEntry("Loos", l)]), TransferSet(nil)) | |
38 | 40 | } | |
39 | 41 | } | |
40 | 42 | ||
41 | 43 | ||
42 | 44 | @Callable(d) | |
43 | 45 | func lotto () = i(d) | |
44 | 46 | ||
45 | 47 |
github/deemru/w8io/026f985 29.51 ms ◑