tx · CAwvpc4nKLND1DSMzkNcaDhVQpVe1ijtyqTx2fVdDexm 3MsEYrugWRGMvdKBKChVCjg2qoKea8Ko9vY: -0.00300000 Waves 2022.07.07 13:35 [2129155] smart account 3MsEYrugWRGMvdKBKChVCjg2qoKea8Ko9vY > SELF 0.00000000 Waves
{ "type": 13, "id": "CAwvpc4nKLND1DSMzkNcaDhVQpVe1ijtyqTx2fVdDexm", "fee": 300000, "feeAssetId": null, "timestamp": 1657190176796, "version": 2, "chainId": 84, "sender": "3MsEYrugWRGMvdKBKChVCjg2qoKea8Ko9vY", "senderPublicKey": "A8DvbFTEjyHFvpK57CmHu6QKczzymTB5sgqq8xxjNsXG", "proofs": [ "5ZarYsp8No4VJoaMFjo4UimTpnFdEpkzLGL25CjQABYPyGMfzMFPf9Gs2J9Kujhj8arxjynNEWsfnHnwFqHyMc7S" ], "script": "base64:AAIFAAAAAAAAAAcIAhIDCgEIAAAACAAAAAADU0VQAgAAAAJfXwAAAAAFTVVMVDgAAAAAAAX14QABAAAAFWtleUJlbmVmaWNpYXJ5QWRkcmVzcwAAAAACAAAAHSVzJXNfX2NmZ19fYmVuZWZpY2lhcnlBZGRyZXNzAQAAABZrZXlDb25zdHJ1Y3RvckludGVydmFsAAAAAAIAAAAhJXMlc19fY2ZnX19ub2RlQ29udHJ1Y3RvckludGVydmFsAQAAABNrZXlMYXN0VXBkYXRlSGVpZ2h0AAAAAAIAAAAVJXNfX2xhc3RVcGRhdGVkSGVpZ2h0AQAAABNrZXlTY3JpcHRVcGRhdGVIYXNoAAAAAAIAAAAdJXMlc19fbWluZXJfX3NjcmlwdFVwZGF0ZUhhc2gBAAAAGGtleVNjcmlwdFVwZGF0ZUFsbG93YW5jZQAAAAACAAAAIiVzJXNfX21pbmVyX19zY3JpcHRVcGRhdGVBbGxvd2FuY2UAAAAADG5vZGVSZWdpc3RyeQkBAAAAEUBleHRyTmF0aXZlKDEwNjIpAAAAAQIAAAAjM01zVTkzNmJyaXFRMlhaTXBraFd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0eAAAAANmZWUJAABpAAAAAgkAAGgAAAACAAAAAAAAAAACBQAAAAVNVUxUOAAAAAAAAAAACgkAAAIAAAABCQABLAAAAAICAAAAP1NldFNjcmlwdFRyYW5zYWN0aW9uIC0gZmVlIGFtb3VudCBpcyBncmVhdGVyIHRoYW4gbWF4IGFsbG93ZWQ6IAkAAaQAAAABCAUAAAADc3R4AAAAA2ZlZQQAAAALc2NyaXB0Qnl0ZXMJAQAAAAV2YWx1ZQAAAAEIBQAAAANzdHgAAAAGc2NyaXB0BAAAAARoYXNoCQACWAAAAAEJAArxAAAAAQUAAAALc2NyaXB0Qnl0ZXMEAAAAC2FsbG93ZWRIYXNoCQEAAAALdmFsdWVPckVsc2UAAAACCQAEHQAAAAIFAAAADG5vZGVSZWdpc3RyeQkBAAAAE2tleVNjcmlwdFVwZGF0ZUhhc2gAAAAAAgAAAAAEAAAAC3ZhbGlkQnlIYXNoAwkBAAAAAiE9AAAAAgUAAAALYWxsb3dlZEhhc2gCAAAAAAkAAAAAAAACBQAAAAthbGxvd2VkSGFzaAUAAAAEaGFzaAcEAAAADWFsbG93VG9VcGRhdGUJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQbAAAAAgUAAAAMbm9kZVJlZ2lzdHJ5CQEAAAAYa2V5U2NyaXB0VXBkYXRlQWxsb3dhbmNlAAAAAAcDBQAAAA1hbGxvd1RvVXBkYXRlBQAAAAt2YWxpZEJ5SGFzaAcJAAACAAAAAQIAAAALbm90IGFsbG93ZWQLxE0X", "height": 2129155, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CSBoRczciNow8QSq5YFuNwKweECUXb7joYJX41uGJvky Next: none Full:
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 | let b = 100000000 | |
7 | 7 | ||
8 | 8 | func c () = "%s%s__cfg__beneficiaryAddress" | |
9 | 9 | ||
10 | 10 | ||
11 | 11 | func d () = "%s%s__cfg__nodeContructorInterval" | |
12 | 12 | ||
13 | 13 | ||
14 | 14 | func e () = "%s__lastUpdatedHeight" | |
15 | 15 | ||
16 | 16 | ||
17 | 17 | func f () = "%s%s__miner__scriptUpdateHash" | |
18 | 18 | ||
19 | 19 | ||
20 | 20 | func g () = "%s%s__miner__scriptUpdateAllowance" | |
21 | 21 | ||
22 | 22 | ||
23 | 23 | let h = addressFromStringValue("3MsU936briqQ2XZMpkhWdrV8EsNwm5iCuRY") | |
24 | 24 | ||
25 | 25 | @Callable(i) | |
26 | 26 | func constructor (j) = if ((this != i.caller)) | |
27 | 27 | then throw("permissions denied") | |
28 | 28 | else { | |
29 | 29 | let k = addressFromStringValue(j) | |
30 | 30 | if ((k == this)) | |
31 | 31 | then throw("mining node address is not allowed as a beneficiaryAddress") | |
32 | 32 | else [StringEntry(c(), toString(k)), IntegerEntry(e(), height)] | |
33 | 33 | } | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | @Verifier(l) | |
37 | 37 | func m () = { | |
38 | 38 | let n = l | |
39 | 39 | if ($isInstanceOf(n, "InvokeScriptTransaction")) | |
40 | 40 | then { | |
41 | 41 | let o = n | |
42 | 42 | if ((o.fee > ((5 * b) / 1000))) | |
43 | 43 | then throw(("InvokeScriptTransaction - fee amount is greater than max allowed: " + toString(o.fee))) | |
44 | 44 | else if (isDefined(o.feeAssetId)) | |
45 | 45 | then throw("InvokeScriptTransaction - only WAVES is allowed as feeAssetId") | |
46 | 46 | else if ((addressFromRecipient(o.dApp) == h)) | |
47 | 47 | then true | |
48 | 48 | else if ((addressFromRecipient(o.dApp) == this)) | |
49 | 49 | then { | |
50 | 50 | let p = valueOrElse(getInteger(this, e()), 0) | |
51 | 51 | let q = valueOrElse(getInteger(h, d()), 43200) | |
52 | 52 | if ((q > (height - p))) | |
53 | 53 | then throw("InvokeScriptTransaction - impossible to call constructor very often") | |
54 | 54 | else sigVerify_32Kb(l.bodyBytes, l.proofs[0], l.senderPublicKey) | |
55 | 55 | } | |
56 | 56 | else throw("InvokeScriptTransaction - invalid dapp address") | |
57 | 57 | } | |
58 | 58 | else if ($isInstanceOf(n, "SetScriptTransaction")) | |
59 | 59 | then { | |
60 | 60 | let r = n | |
61 | 61 | if ((r.fee > ((2 * b) / 10))) | |
62 | 62 | then throw(("SetScriptTransaction - fee amount is greater than max allowed: " + toString(r.fee))) | |
63 | 63 | else { | |
64 | 64 | let s = value(r.script) | |
65 | 65 | let t = toBase58String(blake2b256_32Kb(s)) | |
66 | 66 | let u = valueOrElse(getString(h, f()), "") | |
67 | 67 | let v = if ((u != "")) | |
68 | 68 | then (u == t) | |
69 | 69 | else false | |
70 | 70 | let w = valueOrElse(getBoolean(h, g()), false) | |
71 | 71 | if (w) | |
72 | 72 | then v | |
73 | 73 | else false | |
74 | 74 | } | |
75 | 75 | } | |
76 | 76 | else throw("not allowed") | |
77 | 77 | } | |
78 | 78 |
github/deemru/w8io/169f3d6 23.64 ms ◑