tx · AL576tv4t5ZNJoETcS8Y7WPurMwY7jdvRdBsf3MqrZYd 3MsEYrugWRGMvdKBKChVCjg2qoKea8Ko9vY: -0.00700000 Waves 2022.07.06 20:58 [2128157] smart account 3MsEYrugWRGMvdKBKChVCjg2qoKea8Ko9vY > SELF 0.00000000 Waves
{ "type": 13, "id": "AL576tv4t5ZNJoETcS8Y7WPurMwY7jdvRdBsf3MqrZYd", "fee": 700000, "feeAssetId": null, "timestamp": 1657130335010, "version": 2, "chainId": 84, "sender": "3MsEYrugWRGMvdKBKChVCjg2qoKea8Ko9vY", "senderPublicKey": "A8DvbFTEjyHFvpK57CmHu6QKczzymTB5sgqq8xxjNsXG", "proofs": [ "4Ub6qtjyMH863xKCktCP5HsNfMWzzc3CghojH3R1oWtpuJtzTTi61KiVyb3XFP9jyiyStgFkqEjqduihdUndceKp" ], "script": "base64:AAIFAAAAAAAAAAcIAhIDCgEIAAAABgAAAAADU0VQAgAAAAJfXwEAAAAVa2V5QmVuZWZpY2lhcnlBZGRyZXNzAAAAAAIAAAAdJXMlc19fY2ZnX19iZW5lZmljaWFyeUFkZHJlc3MBAAAAFmtleUNvbnN0cnVjdG9ySW50ZXJ2YWwAAAAAAgAAACElcyVzX19jZmdfX25vZGVDb250cnVjdG9ySW50ZXJ2YWwBAAAAE2tleUxhc3RVcGRhdGVIZWlnaHQAAAAAAgAAABUlc19fbGFzdFVwZGF0ZWRIZWlnaHQBAAAAE2tleVNjcmlwdFVwZGF0ZUhhc2gAAAAAAgAAABQlc19fc2NyaXB0VXBkYXRlSGFzaAAAAAAMbm9kZVJlZ2lzdHJ5CQEAAAARQGV4dHJOYXRpdmUoMTA2MikAAAABAgAAACMzTXNVOTM2YnJpcVEyWFpNcGtoV2RyVjhFc053bTVpQ3VSWQAAAAEAAAABaQEAAAALY29uc3RydWN0b3IAAAABAAAAF2JlbmVmaWNpYXJ5QWRkcmVzc1N0cjU4AwkBAAAAAiE9AAAAAgUAAAAEdGhpcwgFAAAAAWkAAA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Axub2RlUmVnaXN0cnkJAQAAABNrZXlTY3JpcHRVcGRhdGVIYXNoAAAAAAIAAAAABAAAAAthbGxvd0J5SGFzaAMJAQAAAAIhPQAAAAIFAAAAC2FsbG93ZWRIYXNoAgAAAAAJAAAAAAAAAgUAAAALYWxsb3dlZEhhc2gFAAAABGhhc2gHBAAAAAphbGxvd0J5U2lnCQAJxgAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleQMFAAAACmFsbG93QnlTaWcGBQAAAAthbGxvd0J5SGFzaAkAAAIAAAABAgAAAAtub3QgYWxsb3dlZNuVxGk=", "height": 2128157, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EUwaWMp11KX9TWQUdwzhtStRNThrPS4Fd9TmD6KQ1JSa Next: B4Yy3ovpSn5jGaBUonzhQcxt7eEaXSVXAqjbfBVqihWe Diff:
Old | New | Differences | |
---|---|---|---|
60 | 60 | then (s == r) | |
61 | 61 | else false | |
62 | 62 | let u = sigVerify_32Kb(j.bodyBytes, j.proofs[0], j.senderPublicKey) | |
63 | - | if ( | |
63 | + | if (u) | |
64 | 64 | then true | |
65 | - | else t) | |
66 | - | then true | |
67 | - | else throw(((("SetScriptTransaction - allowBySig=" + toString(u)) + " allowByHash=") + toString(t))) | |
65 | + | else t | |
68 | 66 | } | |
69 | 67 | else throw("not allowed") | |
70 | 68 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "__" | |
5 | 5 | ||
6 | 6 | func b () = "%s%s__cfg__beneficiaryAddress" | |
7 | 7 | ||
8 | 8 | ||
9 | 9 | func c () = "%s%s__cfg__nodeContructorInterval" | |
10 | 10 | ||
11 | 11 | ||
12 | 12 | func d () = "%s__lastUpdatedHeight" | |
13 | 13 | ||
14 | 14 | ||
15 | 15 | func e () = "%s__scriptUpdateHash" | |
16 | 16 | ||
17 | 17 | ||
18 | 18 | let f = addressFromStringValue("3MsU936briqQ2XZMpkhWdrV8EsNwm5iCuRY") | |
19 | 19 | ||
20 | 20 | @Callable(g) | |
21 | 21 | func constructor (h) = if ((this != g.caller)) | |
22 | 22 | then throw("permissions denied") | |
23 | 23 | else { | |
24 | 24 | let i = addressFromStringValue(h) | |
25 | 25 | if ((i == this)) | |
26 | 26 | then throw("mining node address is not allowed as a beneficiaryAddress") | |
27 | 27 | else [StringEntry(b(), toString(i)), IntegerEntry(d(), height)] | |
28 | 28 | } | |
29 | 29 | ||
30 | 30 | ||
31 | 31 | @Verifier(j) | |
32 | 32 | func k () = { | |
33 | 33 | let l = j | |
34 | 34 | if ($isInstanceOf(l, "InvokeScriptTransaction")) | |
35 | 35 | then { | |
36 | 36 | let m = l | |
37 | 37 | if ((m.fee > (5 * 100000))) | |
38 | 38 | then throw(("InvokeScriptTransaction - fee amount is greater than max allowed: " + toString(m.fee))) | |
39 | 39 | else if (isDefined(m.feeAssetId)) | |
40 | 40 | then throw("InvokeScriptTransaction - only WAVES is allowed as feeAssetId") | |
41 | 41 | else if ((addressFromRecipient(m.dApp) == f)) | |
42 | 42 | then true | |
43 | 43 | else if ((addressFromRecipient(m.dApp) == this)) | |
44 | 44 | then { | |
45 | 45 | let n = valueOrElse(getInteger(this, d()), 0) | |
46 | 46 | let o = valueOrElse(getInteger(f, c()), 43200) | |
47 | 47 | if ((o > (height - n))) | |
48 | 48 | then throw("InvokeScriptTransaction - impossible to call constructor very often") | |
49 | 49 | else sigVerify_32Kb(j.bodyBytes, j.proofs[0], j.senderPublicKey) | |
50 | 50 | } | |
51 | 51 | else throw("InvokeScriptTransaction - invalid dapp address") | |
52 | 52 | } | |
53 | 53 | else if ($isInstanceOf(l, "SetScriptTransaction")) | |
54 | 54 | then { | |
55 | 55 | let p = l | |
56 | 56 | let q = value(p.script) | |
57 | 57 | let r = toBase58String(keccak256_32Kb(blake2b256_32Kb(q))) | |
58 | 58 | let s = valueOrElse(getString(f, e()), "") | |
59 | 59 | let t = if ((s != "")) | |
60 | 60 | then (s == r) | |
61 | 61 | else false | |
62 | 62 | let u = sigVerify_32Kb(j.bodyBytes, j.proofs[0], j.senderPublicKey) | |
63 | - | if ( | |
63 | + | if (u) | |
64 | 64 | then true | |
65 | - | else t) | |
66 | - | then true | |
67 | - | else throw(((("SetScriptTransaction - allowBySig=" + toString(u)) + " allowByHash=") + toString(t))) | |
65 | + | else t | |
68 | 66 | } | |
69 | 67 | else throw("not allowed") | |
70 | 68 | } | |
71 | 69 |
github/deemru/w8io/169f3d6 23.92 ms ◑