tx · 2ABDdTt6BirjynaBq4FLw6jaovDY55J3tVMdoeRRUYM2 3MxnEkmoWrYFsHRZDJMw77y9wCDAgB39ftt: -0.01000000 Waves 2023.06.21 01:23 [2631553] smart account 3MxnEkmoWrYFsHRZDJMw77y9wCDAgB39ftt > SELF 0.00000000 Waves
{ "type": 13, "id": "2ABDdTt6BirjynaBq4FLw6jaovDY55J3tVMdoeRRUYM2", "fee": 1000000, "feeAssetId": null, "timestamp": 1687299863345, "version": 2, "chainId": 84, "sender": "3MxnEkmoWrYFsHRZDJMw77y9wCDAgB39ftt", "senderPublicKey": "Dtj8LFhKm9c6b5sQXEGNawR8YdhfrXvYCcsYzRddC9dU", "proofs": [ "5kofdaum2e81CXAjKWyHL4wV5d2NcHdxa5x7ytYS4LZcnLbXyPF6iDxumpsZdfxm3dX7jZNVXZWG3WsjfLM41vcy" ], "script": "base64:BgIGCAISABIABQAMa1VzZXJQYXltZW50AgdQYXltZW50AARrV29uAgNXb24ACXNlcGFyYXRvcgIBXwEJcmFuZG9taXplAgVieXRlcwVyYW5nZQQEaGFzaAkA9wMBBQVieXRlcwQFaW5kZXgJALEJAQUEaGFzaAkAagIFBWluZGV4BQVyYW5nZQEIY291bnRpbmcBBWJ5dGVzBAVjb3VudAkBCXJhbmRvbWl6ZQIFBWJ5dGVzAAoDCQBnAgUFY291bnQAAwcGAgFpAQtwYXJzZVN0cnVjdAADCQECIT0CCAUBaQZjYWxsZXIFBHRoaXMJAAIBAgpPbmx5IG93bmVyBAx3aW5uZXJTdHJ1Y3QJAQhjb3VudGluZwEIBQFpDXRyYW5zYWN0aW9uSWQJAMwIAgkBDEJvb2xlYW5FbnRyeQIJAKwCAgkArAICCQCsAgIFBGtXb24FCXNlcGFyYXRvcgkApQgBCAUBaQZjYWxsZXIJAKQDAQkBCXJhbmRvbWl6ZQIIBQFpDXRyYW5zYWN0aW9uSWQA6AcFDHdpbm5lclN0cnVjdAkAzAgCCQEMQm9vbGVhbkVudHJ5AgUEa1dvbgUMd2lubmVyU3RydWN0BQNuaWwBaQEJc3RhcnRHYW1lAAQGYW1vdW50CQEFdmFsdWUBCAkAkQMCCAUBaQhwYXltZW50cwAABmFtb3VudAMJAQIhPQIICQCRAwIIBQFpCHBheW1lbnRzAAAHYXNzZXRJZAUEdW5pdAkAAgECDFBheSBpbiB3YXZlcwQNbnVsbEluaXRTdG9yZQkA/AcEBQR0aGlzAgtwYXJzZVN0cnVjdAUDbmlsBQNuaWwDCQAAAgUNbnVsbEluaXRTdG9yZQUNbnVsbEluaXRTdG9yZQQDd29uCQETdmFsdWVPckVycm9yTWVzc2FnZQIJAJsIAgUEdGhpcwUEa1dvbgISU3RvcmFnZSByZWFkIGVycm9yAwUDd29uCQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMIBQFpBmNhbGxlcgkAaAIFBmFtb3VudAACBQR1bml0BQNuaWwFA25pbAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgA25TFg", "height": 2631553, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FcQXqyA2kmmJVmWfmZscfU5pjMzk9LCEnkj6w47cStio Next: none Diff:
Old | New | Differences | |
---|---|---|---|
37 | 37 | let m = value(k.payments[0].amount) | |
38 | 38 | if ((k.payments[0].assetId != unit)) | |
39 | 39 | then throw("Pay in waves") | |
40 | - | else if ((m > 10)) | |
41 | - | then throw("Too much amount") | |
42 | - | else { | |
43 | - | let n = invoke(this, "parseStruct", nil, nil) | |
44 | - | if ((n == n)) | |
45 | - | then { | |
46 | - | let o = valueOrErrorMessage(getBoolean(this, b), "Storage read error") | |
47 | - | if (o) | |
48 | - | then [ScriptTransfer(k.caller, (m * 2), unit)] | |
49 | - | else nil | |
50 | - | } | |
51 | - | else throw("Strict value is not equal to itself.") | |
52 | - | } | |
40 | + | else { | |
41 | + | let n = invoke(this, "parseStruct", nil, nil) | |
42 | + | if ((n == n)) | |
43 | + | then { | |
44 | + | let o = valueOrErrorMessage(getBoolean(this, b), "Storage read error") | |
45 | + | if (o) | |
46 | + | then [ScriptTransfer(k.caller, (m * 2), unit)] | |
47 | + | else nil | |
48 | + | } | |
49 | + | else throw("Strict value is not equal to itself.") | |
50 | + | } | |
53 | 51 | } | |
54 | 52 | ||
55 | 53 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "Payment" | |
5 | 5 | ||
6 | 6 | let b = "Won" | |
7 | 7 | ||
8 | 8 | let c = "_" | |
9 | 9 | ||
10 | 10 | func d (e,f) = { | |
11 | 11 | let g = sha256(e) | |
12 | 12 | let h = toInt(g) | |
13 | 13 | (h % f) | |
14 | 14 | } | |
15 | 15 | ||
16 | 16 | ||
17 | 17 | func i (e) = { | |
18 | 18 | let j = d(e, 10) | |
19 | 19 | if ((j >= 3)) | |
20 | 20 | then false | |
21 | 21 | else true | |
22 | 22 | } | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | @Callable(k) | |
26 | 26 | func parseStruct () = if ((k.caller != this)) | |
27 | 27 | then throw("Only owner") | |
28 | 28 | else { | |
29 | 29 | let l = i(k.transactionId) | |
30 | 30 | [BooleanEntry((((b + c) + toString(k.caller)) + toString(d(k.transactionId, 1000))), l), BooleanEntry(b, l)] | |
31 | 31 | } | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | ||
35 | 35 | @Callable(k) | |
36 | 36 | func startGame () = { | |
37 | 37 | let m = value(k.payments[0].amount) | |
38 | 38 | if ((k.payments[0].assetId != unit)) | |
39 | 39 | then throw("Pay in waves") | |
40 | - | else if ((m > 10)) | |
41 | - | then throw("Too much amount") | |
42 | - | else { | |
43 | - | let n = invoke(this, "parseStruct", nil, nil) | |
44 | - | if ((n == n)) | |
45 | - | then { | |
46 | - | let o = valueOrErrorMessage(getBoolean(this, b), "Storage read error") | |
47 | - | if (o) | |
48 | - | then [ScriptTransfer(k.caller, (m * 2), unit)] | |
49 | - | else nil | |
50 | - | } | |
51 | - | else throw("Strict value is not equal to itself.") | |
52 | - | } | |
40 | + | else { | |
41 | + | let n = invoke(this, "parseStruct", nil, nil) | |
42 | + | if ((n == n)) | |
43 | + | then { | |
44 | + | let o = valueOrErrorMessage(getBoolean(this, b), "Storage read error") | |
45 | + | if (o) | |
46 | + | then [ScriptTransfer(k.caller, (m * 2), unit)] | |
47 | + | else nil | |
48 | + | } | |
49 | + | else throw("Strict value is not equal to itself.") | |
50 | + | } | |
53 | 51 | } | |
54 | 52 | ||
55 | 53 |
github/deemru/w8io/026f985 31.22 ms ◑