tx · 5FyRQDEF2LWCy4b5eLdxntRp7Xu9nTR2Jyv4N2cGbPJJ 3N9yLpbAaoLMhek6yCo3Rx15onvi8wY6jFV: -0.01000000 Waves 2020.08.13 05:56 [1130210] smart account 3N9yLpbAaoLMhek6yCo3Rx15onvi8wY6jFV > SELF 0.00000000 Waves
{ "type": 13, "id": "5FyRQDEF2LWCy4b5eLdxntRp7Xu9nTR2Jyv4N2cGbPJJ", "fee": 1000000, "feeAssetId": null, "timestamp": 1597287440043, "version": 1, "sender": "3N9yLpbAaoLMhek6yCo3Rx15onvi8wY6jFV", "senderPublicKey": "EhvCujhdc95RoYsWab9P4vx4rEC2Ezo9H3hLgEYtGvsB", "proofs": [ "2zwVXfFLargt1euKJBpfCo7epRXmDcFboeG81Fr6VZgwGDme4JPb2M46gLvFyWxamcdbhMwyVDpKeJVnXLgWvfky" ], "script": "base64:AwQAAAAETk9ORQIAAAAEbm9uZQQAAAALdXNlcnNQdWJLZXkBAAAAIKeP6tgl4CP2PWCZbTcLVLGPExrT9u/W4PAFsxrOIcYHBAAAAAl1c2Vyc0FkZHIJAQAAABRhZGRyZXNzRnJvbVB1YmxpY0tleQAAAAEFAAAAC3VzZXJzUHViS2V5BAAAAARidG5zAQAAACDFLOWBobFDqtyu6bkFDRsq16C369fJHs5Bnyp0LEWdcwQAAAAEYnRuZgEAAAAgAcfavlePt+AR+muoBefYqFrjn0Oc5fUH1esIaonljXkKAQAAAAh2ZXJpZmllcgAAAAEAAAAHYWNjb3VudAMJAAAAAAAAAgUAAAAHYWNjb3VudAUAAAAEdGhpcwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAAt1c2Vy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5zYWN0aW9uBAAAAAFlBQAAAAckbWF0Y2gwBwMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAPQnVyblRyYW5zYWN0aW9uBAAAAARidXJuBQAAAAckbWF0Y2gwCQEAAAAIdmVyaWZpZXIAAAABBQAAAAl1c2Vyc0FkZHIDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAD0RhdGFUcmFuc2FjdGlvbgQAAAABZAUAAAAHJG1hdGNoMAkBAAAACHZlcmlmaWVyAAAAAQUAAAAJdXNlcnNBZGRyAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABRTZXRTY3JpcHRUcmFuc2FjdGlvbgQAAAABcwUAAAAHJG1hdGNoMAkBAAAACHZlcmlmaWVyAAAAAQUAAAAJdXNlcnNBZGRyAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABBMZWFzZVRyYW5zYWN0aW9uBAAAAAFsBQAAAAckbWF0Y2gwCQEAAAAUYWxsb3dlZEFkZHJTcG9uc29yZWQAAAABCQAEJAAAAAEIBQAAAAFsAAAACXJlY2lwaWVudAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAWTGVhc2VDYW5jZWxUcmFuc2FjdGlvbgQAAAABYwUAAAAHJG1hdGNoMAkBAAAACHZlcmlmaWVyAAAAAQUAAAAEdGhpcwdCHcay", "chainId": 84, "height": 1130210, "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'CH6NGp8BFPQ8gm6cPeVG9S3ZWp7m39eQnZU3eTdZgayU' | |
5 | + | let usersAddr = addressFromPublicKey(usersPubKey) | |
6 | + | let btns = base58'EGh2LufqeTEdihgaDz6iZosJtsyY98sqkHX2WP8Csnw4' | |
7 | + | let btnf = base58'7xAHFCPLRSa7XfNNbnd9DMPd9SkgpNfrptFvE4pJE7J' | |
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 $list14741545 = tokensIdList | |
45 | + | let $size14741545 = size($list14741545) | |
46 | + | let $acc014741545 = toBase58String(extract(assetId)) | |
47 | + | if (($size14741545 == 0)) | |
48 | + | then $acc014741545 | |
49 | + | else { | |
50 | + | let $acc114741545 = containTokenId($acc014741545, $list14741545[0]) | |
51 | + | if (($size14741545 == 1)) | |
52 | + | then $acc114741545 | |
53 | + | else { | |
54 | + | let $acc214741545 = containTokenId($acc114741545, $list14741545[1]) | |
55 | + | if (($size14741545 == 2)) | |
56 | + | then $acc214741545 | |
57 | + | else { | |
58 | + | let $acc314741545 = containTokenId($acc214741545, $list14741545[2]) | |
59 | + | if (($size14741545 == 3)) | |
60 | + | then $acc314741545 | |
61 | + | else { | |
62 | + | let $acc414741545 = containTokenId($acc314741545, $list14741545[3]) | |
63 | + | if (($size14741545 == 4)) | |
64 | + | then $acc414741545 | |
65 | + | else { | |
66 | + | let $acc514741545 = containTokenId($acc414741545, $list14741545[4]) | |
67 | + | if (($size14741545 == 5)) | |
68 | + | then $acc514741545 | |
69 | + | else { | |
70 | + | let $acc614741545 = containTokenId($acc514741545, $list14741545[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 $list19792026 = addrsList | |
96 | + | let $size19792026 = size($list19792026) | |
97 | + | let $acc019792026 = toString(addr) | |
98 | + | if (($size19792026 == 0)) | |
99 | + | then $acc019792026 | |
100 | + | else { | |
101 | + | let $acc119792026 = containAddr($acc019792026, $list19792026[0]) | |
102 | + | if (($size19792026 == 1)) | |
103 | + | then $acc119792026 | |
104 | + | else { | |
105 | + | let $acc219792026 = containAddr($acc119792026, $list19792026[1]) | |
106 | + | if (($size19792026 == 2)) | |
107 | + | then $acc219792026 | |
108 | + | else { | |
109 | + | let $acc319792026 = containAddr($acc219792026, $list19792026[2]) | |
110 | + | if (($size19792026 == 3)) | |
111 | + | then $acc319792026 | |
112 | + | else { | |
113 | + | let $acc419792026 = containAddr($acc319792026, $list19792026[3]) | |
114 | + | if (($size19792026 == 4)) | |
115 | + | then $acc419792026 | |
116 | + | else { | |
117 | + | let $acc519792026 = containAddr($acc419792026, $list19792026[4]) | |
118 | + | if (($size19792026 == 5)) | |
119 | + | then $acc519792026 | |
120 | + | else { | |
121 | + | let $acc619792026 = containAddr($acc519792026, $list19792026[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/169f3d6 18.78 ms ◑