tx · BLo55MqZY5fQVvsEVntbgyXXzZy3HbWdmBD1ayXfgG1q 3N4KJPUCyrQTytGziea29VhFHaG3xGVqfc3: -0.01000000 Waves 2020.09.01 23:07 [1158786] smart account 3N4KJPUCyrQTytGziea29VhFHaG3xGVqfc3 > SELF 0.00000000 Waves
{ "type": 13, "id": "BLo55MqZY5fQVvsEVntbgyXXzZy3HbWdmBD1ayXfgG1q", "fee": 1000000, "feeAssetId": null, "timestamp": 1598990889450, "version": 1, "sender": "3N4KJPUCyrQTytGziea29VhFHaG3xGVqfc3", "senderPublicKey": "Eh5VBiTtBV3hGcFxERFzC1tQk2rhbhcGy9SHuH6ekq7v", "proofs": [ "4xX1Z15D14P5VkgQJmAEpYnuvSvszBYq8hM6RvCw78CsXg1qMTJ4qoiCrwoWKD7V3KMbbkLSnZeSvfw4PhYigfMb" ], "script": "base64:AwQAAAAETk9ORQIAAAAEbm9uZQQAAAALdXNlcnNQdWJLZXkBAAAAIPydrA72S/G/qPL105WN4c3lhR51FLtWI7+jTG7YlGImBAAAAAl1c2Vyc0FkZHIJAQAAABRhZGRyZXNzRnJvbVB1YmxpY0tleQAAAAEFAAAAC3VzZXJzUHViS2V5BAAAAARidG5zAQAAACAoK1BREE28JDlAy12z5aQtS/7RSAbsW/i1F0rrpMd54wQAAAAEYnRuZgEAAAAgsEm48K1nU9UurezcoLA7yxqQlUl6zrvaVfFUXyTI2CYKAQAAAAh2ZXJpZmllcgAAAAEAAAAHYWNjb3VudAMJAAAAAAAAAgUAAAAHYWNjb3VudAUAAAAEdGhpcwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAAt1c2Vyc1B1YktleQo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uBAAAAAFlBQAAAAckbWF0Y2gwBwMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAPQnVyblRyYW5zYWN0aW9uBAAAAARidXJuBQAAAAckbWF0Y2gwCQEAAAAIdmVyaWZpZXIAAAABBQAAAAl1c2Vyc0FkZHIDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAD0RhdGFUcmFuc2FjdGlvbgQAAAABZAUAAAAHJG1hdGNoMAkBAAAACHZlcmlmaWVyAAAAAQUAAAAJdXNlcnNBZGRyAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABRTZXRTY3JpcHRUcmFuc2FjdGlvbgQAAAABcwUAAAAHJG1hdGNoMAkBAAAACHZlcmlmaWVyAAAAAQUAAAAJdXNlcnNBZGRyAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABBMZWFzZVRyYW5zYWN0aW9uBAAAAAFsBQAAAAckbWF0Y2gwCQEAAAAUYWxsb3dlZEFkZHJTcG9uc29yZWQAAAABCQAEJAAAAAEIBQAAAAFsAAAACXJlY2lwaWVudAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAWTGVhc2VDYW5jZWxUcmFuc2FjdGlvbgQAAAABYwUAAAAHJG1hdGNoMAkBAAAACHZlcmlmaWVyAAAAAQUAAAAEdGhpcwcxDKEf", "chainId": 84, "height": 1158786, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 3 #-} | |
2 | + | {-# CONTENT_TYPE EXPRESSION #-} | |
3 | + | let NONE = "none" | |
4 | + | let usersPubKey = base58'J17BnBFv5E2eJERWZ1MMVXmUuTQUhEi1PKrUmHHW3YCm' | |
5 | + | let usersAddr = addressFromPublicKey(usersPubKey) | |
6 | + | let btns = base58'3hocfBf4XApKEuqemQcXNcDukCZF5bLsacK6XK21zhra' | |
7 | + | let btnf = base58'Cs9xQbZnj54BvPan2PzhAdszJeQjoMmnsiawtXr8vBLR' | |
8 | + | func verifier (account) = if ((account == this)) | |
9 | + | then sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
10 | + | else sigVerify(tx.bodyBytes, tx.proofs[0], usersPubKey) | |
11 | + | ||
12 | + | func getStrVar (key) = { | |
13 | + | let str = match key { | |
14 | + | case s: String => | |
15 | + | s | |
16 | + | case _ => | |
17 | + | NONE | |
18 | + | } | |
19 | + | str | |
20 | + | } | |
21 | + | ||
22 | + | func containAddr (a,b) = { | |
23 | + | let addr = toString(addressFromPublicKey(fromBase58String(b))) | |
24 | + | if ((addr == a)) | |
25 | + | then true | |
26 | + | else if (if ((a == true)) | |
27 | + | then (addr != a) | |
28 | + | else false) | |
29 | + | then true | |
30 | + | else a | |
31 | + | } | |
32 | + | ||
33 | + | func containTokenId (a,b) = if ((b == a)) | |
34 | + | then true | |
35 | + | else if (if ((a == true)) | |
36 | + | then (b != a) | |
37 | + | else false) | |
38 | + | then true | |
39 | + | else a | |
40 | + | ||
41 | + | func allowedTransactionTokens (assetId) = { | |
42 | + | let tokensIdList = split(getStringValue(addressFromPublicKey(usersPubKey), "allowedTokenTransaction"), ",") | |
43 | + | let contain = { | |
44 | + | let $list14751546 = tokensIdList | |
45 | + | let $size14751546 = size($list14751546) | |
46 | + | let $acc014751546 = toBase58String(extract(assetId)) | |
47 | + | if (($size14751546 == 0)) | |
48 | + | then $acc014751546 | |
49 | + | else { | |
50 | + | let $acc114751546 = containTokenId($acc014751546, $list14751546[0]) | |
51 | + | if (($size14751546 == 1)) | |
52 | + | then $acc114751546 | |
53 | + | else { | |
54 | + | let $acc214751546 = containTokenId($acc114751546, $list14751546[1]) | |
55 | + | if (($size14751546 == 2)) | |
56 | + | then $acc214751546 | |
57 | + | else { | |
58 | + | let $acc314751546 = containTokenId($acc214751546, $list14751546[2]) | |
59 | + | if (($size14751546 == 3)) | |
60 | + | then $acc314751546 | |
61 | + | else { | |
62 | + | let $acc414751546 = containTokenId($acc314751546, $list14751546[3]) | |
63 | + | if (($size14751546 == 4)) | |
64 | + | then $acc414751546 | |
65 | + | else { | |
66 | + | let $acc514751546 = containTokenId($acc414751546, $list14751546[4]) | |
67 | + | if (($size14751546 == 5)) | |
68 | + | then $acc514751546 | |
69 | + | else { | |
70 | + | let $acc614751546 = containTokenId($acc514751546, $list14751546[5]) | |
71 | + | throw("List size exceed 5") | |
72 | + | } | |
73 | + | } | |
74 | + | } | |
75 | + | } | |
76 | + | } | |
77 | + | } | |
78 | + | } | |
79 | + | if (!(isDefined(assetId))) | |
80 | + | then true | |
81 | + | else if (if (isDefined(assetId)) | |
82 | + | then (contain == true) | |
83 | + | else false) | |
84 | + | then true | |
85 | + | else if (if (isDefined(assetId)) | |
86 | + | then (contain != true) | |
87 | + | else false) | |
88 | + | then throw((("This token ID " + getStrVar(contain)) + " is not allowed to operate in this account")) | |
89 | + | else verifier(usersAddr) | |
90 | + | } | |
91 | + | ||
92 | + | func allowedAddrSponsored (addr) = { | |
93 | + | let addrsList = split(getStringValue(addressFromPublicKey(usersPubKey), "allowedSponsorsAddr"), ",") | |
94 | + | let contain = { | |
95 | + | let $list19802027 = addrsList | |
96 | + | let $size19802027 = size($list19802027) | |
97 | + | let $acc019802027 = toString(addr) | |
98 | + | if (($size19802027 == 0)) | |
99 | + | then $acc019802027 | |
100 | + | else { | |
101 | + | let $acc119802027 = containAddr($acc019802027, $list19802027[0]) | |
102 | + | if (($size19802027 == 1)) | |
103 | + | then $acc119802027 | |
104 | + | else { | |
105 | + | let $acc219802027 = containAddr($acc119802027, $list19802027[1]) | |
106 | + | if (($size19802027 == 2)) | |
107 | + | then $acc219802027 | |
108 | + | else { | |
109 | + | let $acc319802027 = containAddr($acc219802027, $list19802027[2]) | |
110 | + | if (($size19802027 == 3)) | |
111 | + | then $acc319802027 | |
112 | + | else { | |
113 | + | let $acc419802027 = containAddr($acc319802027, $list19802027[3]) | |
114 | + | if (($size19802027 == 4)) | |
115 | + | then $acc419802027 | |
116 | + | else { | |
117 | + | let $acc519802027 = containAddr($acc419802027, $list19802027[4]) | |
118 | + | if (($size19802027 == 5)) | |
119 | + | then $acc519802027 | |
120 | + | else { | |
121 | + | let $acc619802027 = containAddr($acc519802027, $list19802027[5]) | |
122 | + | throw("List size exceed 5") | |
123 | + | } | |
124 | + | } | |
125 | + | } | |
126 | + | } | |
127 | + | } | |
128 | + | } | |
129 | + | } | |
130 | + | if ((contain != true)) | |
131 | + | then throw((("This address " + getStrVar(contain)) + " is not allowed to operate with the BitNodes sponsored token")) | |
132 | + | else verifier(this) | |
133 | + | } | |
134 | + | ||
135 | + | match tx { | |
136 | + | case t: TransferTransaction => | |
137 | + | if (if ((t.assetId != btnf)) | |
138 | + | then (t.feeAssetId != btnf) | |
139 | + | else false) | |
140 | + | then allowedTransactionTokens(t.assetId) | |
141 | + | else if (if ((t.assetId == btnf)) | |
142 | + | then true | |
143 | + | else (t.feeAssetId == btnf)) | |
144 | + | then allowedAddrSponsored(addressFromRecipient(t.recipient)) | |
145 | + | else throw("Operação não autorizada para contas centralizadas na Plataforma BitNodes") | |
146 | + | case ist: InvokeScriptTransaction => | |
147 | + | allowedAddrSponsored(addressFromRecipient(ist.dApp)) | |
148 | + | case o: Order => | |
149 | + | false | |
150 | + | case e: ExchangeTransaction => | |
151 | + | false | |
152 | + | case burn: BurnTransaction => | |
153 | + | verifier(usersAddr) | |
154 | + | case d: DataTransaction => | |
155 | + | verifier(usersAddr) | |
156 | + | case s: SetScriptTransaction => | |
157 | + | verifier(usersAddr) | |
158 | + | case l: LeaseTransaction => | |
159 | + | allowedAddrSponsored(addressFromRecipient(l.recipient)) | |
160 | + | case c: LeaseCancelTransaction => | |
161 | + | verifier(this) | |
162 | + | case _ => | |
163 | + | false | |
164 | + | } |
github/deemru/w8io/026f985 23.24 ms ◑