tx · 9e1XetvHS3FuZwdzFQfZuVr1JfCwe53L3HLDUpZ2MZu8 3MvZyCymGXKM3uCapzSzAQsdgNpo2sNqFpE: -0.01400000 Waves 2021.02.04 14:15 [1383363] smart account 3MvZyCymGXKM3uCapzSzAQsdgNpo2sNqFpE > SELF 0.00000000 Waves
{ "type": 13, "id": "9e1XetvHS3FuZwdzFQfZuVr1JfCwe53L3HLDUpZ2MZu8", "fee": 1400000, "feeAssetId": null, "timestamp": 1612437321000, "version": 1, "sender": "3MvZyCymGXKM3uCapzSzAQsdgNpo2sNqFpE", "senderPublicKey": "97WFB82ibgqRXg7VdJauTLcMM7G9w6m4ot4sqaLptGuz", "proofs": [ "64WZHxkh7XBqqMav1mmaxWsdoyBnizc24rkjjD7oa2W4RM3QmZE11twtHsocAsqB4FeU8Vnbq9tyP6JypH46qTKQ", "3iW2myh1cRZFivT2RpZymBxW1JWuQCnn3ZD4tX1Grr3xYMjfvZvihX1ACWdgd8mKMXNm9MP3REx24zszyafNYnj2" ], "script": "base64:BAQAAAALZGlnaWxpcmFQYXkBAAAAID0HOFHYXYpCB2C8RjDY8m3ndBlb8WihoYLw1tvHVwgrBAAAAAdnYXRld2F5AQAAACA9BzhR2F2KQgdgvEYw2PJt53QZW/FooaGC8Nbbx1cIKwQAAAAMc3BvbnNvclRva2VuAQAAACBdMQvtJ8LandQsV/WP/p1LGsITDG9E0fNlo+TMuhD4PgQAAAAMcGF5bWVudFRva2VuAQAAACDVGtVycuVAveqx7rkVfKA7PZohin1VCKHosAamGXf54gQAAAANcmVjb3ZlcnlUb2tlbgEAAAAg1RrVcnLlQL3qse65FXygOz2aIYp9VQih6LAGphl3+eIEAAAACnByb3h5V2F2ZXMBAAAABBOr2TMEAAAACXJlY292ZXJ5MQEAAAAgPQc4UdhdikIHYLxGMNjybed0GVvxaKGhgvDW28dXCCsEAAAACXJlY292ZXJ5MgEAAAAgPQc4UdhdikIHYLxGMNjybed0GVvxaKGhgvDW28dXCCsEAAAACXJlY292Z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AAAAAAAABBQAAAAtkaWdpbGlyYVBheQAAAAAAAAAAAQAAAAAAAAAAAAMJAAAAAAAAAgkAAGQAAAACBQAAAAJzMQUAAAACczIAAAAAAAAAAAIGCQAAAgAAAAECAAAAF0ludGVncml0eSBDaGVjayBGYWlsZWQhCQEAAAAIcmVjb3ZlcnkAAAAAHZWHww==", "chainId": 84, "height": 1383363, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3VbSHkdjoETGTXwijBem6aqkV3mQjUK3osK54DT94NzZ Next: none Diff:
Old | New | Differences | |
---|---|---|---|
121 | 121 | } | |
122 | 122 | else { | |
123 | 123 | let prolog = "Transfer to not DigiliraPay recipient: " | |
124 | - | if (isFeeSponsorToken) | |
125 | - | then throw((prolog + "Sponsor Token cannot be used.")) | |
126 | - | else if (isFeePaymentToken) | |
127 | - | then throw((prolog + "Payment Token cannot be used.")) | |
128 | - | else if (myStatusBanned) | |
129 | - | then throw((prolog + "This account has been suspended.")) | |
130 | - | else if (permissionTransferNotDP) | |
131 | - | then throw((prolog + "This asset cannot be transfered.")) | |
132 | - | else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
124 | + | if (isFeePaymentToken) | |
125 | + | then throw((prolog + "Payment Token cannot be used.")) | |
126 | + | else if (myStatusBanned) | |
127 | + | then throw((prolog + "This account has been suspended.")) | |
128 | + | else if (permissionTransferNotDP) | |
129 | + | then throw((prolog + "This asset cannot be transfered.")) | |
130 | + | else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
133 | 131 | } | |
134 | 132 | case t: DataTransaction|SetScriptTransaction => | |
135 | 133 | let s1 = if (sigVerify(t.bodyBytes, t.proofs[0], t.senderPublicKey)) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# CONTENT_TYPE EXPRESSION #-} | |
3 | 3 | let digiliraPay = base58'57EFni8M1XesEurFh3c4jnpLExP2PCPd5TRrwMjePAT4' | |
4 | 4 | let gateway = base58'57EFni8M1XesEurFh3c4jnpLExP2PCPd5TRrwMjePAT4' | |
5 | 5 | let sponsorToken = base58'7GnHzTaDe3YbDiCD9rueHiSfPB7hdanPpN4Ab79fJGtD' | |
6 | 6 | let paymentToken = base58'FLsa9hfu1jvXC6jhDP2x6DHHQHK2qiKPtS7D74ZFNsE1' | |
7 | 7 | let recoveryToken = base58'FLsa9hfu1jvXC6jhDP2x6DHHQHK2qiKPtS7D74ZFNsE1' | |
8 | 8 | let proxyWaves = base58'WAVES' | |
9 | 9 | let recovery1 = base58'57EFni8M1XesEurFh3c4jnpLExP2PCPd5TRrwMjePAT4' | |
10 | 10 | let recovery2 = base58'57EFni8M1XesEurFh3c4jnpLExP2PCPd5TRrwMjePAT4' | |
11 | 11 | let recovery3 = base58'57EFni8M1XesEurFh3c4jnpLExP2PCPd5TRrwMjePAT4' | |
12 | 12 | let banned = 403000 | |
13 | 13 | let digiliraPayOnly = 99 | |
14 | 14 | let transferBlock = 100 | |
15 | 15 | let paymentBlock = 200 | |
16 | 16 | let paymentFundBlock = 300 | |
17 | 17 | let fundBlock = 400 | |
18 | 18 | func recovery () = { | |
19 | 19 | let s1 = if (sigVerify(tx.bodyBytes, tx.proofs[0], recovery1)) | |
20 | 20 | then 1 | |
21 | 21 | else 0 | |
22 | 22 | let s2 = if (sigVerify(tx.bodyBytes, tx.proofs[1], recovery2)) | |
23 | 23 | then 1 | |
24 | 24 | else 0 | |
25 | 25 | let s3 = if (sigVerify(tx.bodyBytes, tx.proofs[2], recovery3)) | |
26 | 26 | then 1 | |
27 | 27 | else 0 | |
28 | 28 | if ((((s1 + s2) + s3) >= 2)) | |
29 | 29 | then true | |
30 | 30 | else throw("Unauthorized") | |
31 | 31 | } | |
32 | 32 | ||
33 | 33 | func checkFee (w) = { | |
34 | 34 | let fee = w.fee | |
35 | 35 | let isFeePaymentToken = (w.feeAssetId == paymentToken) | |
36 | 36 | let isFeeSponsorToken = (w.feeAssetId == sponsorToken) | |
37 | 37 | let unScriptedFee = 5 | |
38 | 38 | let scriptedFee = 9 | |
39 | 39 | let isScripted = match assetInfo(valueOrElse(w.assetId, proxyWaves)) { | |
40 | 40 | case asset: Asset => | |
41 | 41 | if (asset.scripted) | |
42 | 42 | then true | |
43 | 43 | else false | |
44 | 44 | case _ => | |
45 | 45 | false | |
46 | 46 | } | |
47 | 47 | if (if (!(isFeePaymentToken)) | |
48 | 48 | then !(isFeeSponsorToken) | |
49 | 49 | else false) | |
50 | 50 | then sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
51 | 51 | else if (if (if (isScripted) | |
52 | 52 | then (fee == scriptedFee) | |
53 | 53 | else false) | |
54 | 54 | then true | |
55 | 55 | else if (!(isScripted)) | |
56 | 56 | then (fee == unScriptedFee) | |
57 | 57 | else false) | |
58 | 58 | then sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
59 | 59 | else throw((toString(fee) + " feeAmount is wrong")) | |
60 | 60 | } | |
61 | 61 | ||
62 | 62 | func getStatus (key) = valueOrElse(getInteger(addressFromPublicKey(digiliraPay), toBase58String(key)), 0) | |
63 | 63 | ||
64 | 64 | match tx { | |
65 | 65 | case w: TransferTransaction => | |
66 | 66 | let myStatus = getStatus(w.sender.bytes) | |
67 | 67 | let recipientStatus = getStatus(addressFromRecipient(w.recipient).bytes) | |
68 | 68 | let assetStatus = getStatus(valueOrElse(w.assetId, proxyWaves)) | |
69 | 69 | let digiliraRecipient = (recipientStatus > 0) | |
70 | 70 | let myStatusBanned = (myStatus == banned) | |
71 | 71 | let recipientStatusBanned = (recipientStatus == banned) | |
72 | 72 | let assetStatusBanned = (assetStatus == banned) | |
73 | 73 | let isFeeRecoveryToken = (w.feeAssetId == recoveryToken) | |
74 | 74 | let isRecipientGateway = (w.recipient == addressFromPublicKey(gateway)) | |
75 | 75 | let isFeePaymentToken = (w.feeAssetId == paymentToken) | |
76 | 76 | let isFeeSponsorToken = (w.feeAssetId == sponsorToken) | |
77 | 77 | let isExclusiveToken = (digiliraPayOnly == valueOrElse(assetStatus, 0)) | |
78 | 78 | let isDigiliraPayExclusive = (digiliraPayOnly > valueOrElse(assetStatus, 0)) | |
79 | 79 | let permissionTransferToDP = if ((valueOrElse(assetStatus, banned) > valueOrElse(recipientStatus, 0))) | |
80 | 80 | then true | |
81 | 81 | else (valueOrElse(assetStatus, banned) > valueOrElse(myStatus, 0)) | |
82 | 82 | let permissionPayment = if ((fundBlock > valueOrElse(assetStatus, 0))) | |
83 | 83 | then (valueOrElse(assetStatus, 0) >= paymentBlock) | |
84 | 84 | else false | |
85 | 85 | let permissionTransferNotDP = if ((transferBlock > valueOrElse(assetStatus, 0))) | |
86 | 86 | then true | |
87 | 87 | else (valueOrElse(assetStatus, 0) >= paymentFundBlock) | |
88 | 88 | let isRecovery = if (if (if (digiliraRecipient) | |
89 | 89 | then isFeeRecoveryToken | |
90 | 90 | else false) | |
91 | 91 | then isRecipientGateway | |
92 | 92 | else false) | |
93 | 93 | then myStatusBanned | |
94 | 94 | else false | |
95 | 95 | if (if (isRecovery) | |
96 | 96 | then recovery() | |
97 | 97 | else false) | |
98 | 98 | then true | |
99 | 99 | else if (digiliraRecipient) | |
100 | 100 | then { | |
101 | 101 | let prolog = "Transfer to DigiliraPay recipient: " | |
102 | 102 | if (myStatusBanned) | |
103 | 103 | then throw((prolog + "This account has been suspended.")) | |
104 | 104 | else if (recipientStatusBanned) | |
105 | 105 | then throw((prolog + "Recipient's account has been suspended.")) | |
106 | 106 | else if (assetStatusBanned) | |
107 | 107 | then throw((prolog + "Asset cannot be transfered.")) | |
108 | 108 | else if (permissionTransferToDP) | |
109 | 109 | then throw((prolog + "Asset cannot be transfered. Recipient/Sender is not eligible.")) | |
110 | 110 | else if (isDigiliraPayExclusive) | |
111 | 111 | then throw((prolog + "Non-Transferable Token.")) | |
112 | 112 | else if (isRecipientGateway) | |
113 | 113 | then if (if (permissionPayment) | |
114 | 114 | then true | |
115 | 115 | else isExclusiveToken) | |
116 | 116 | then checkFee(w) | |
117 | 117 | else throw((prolog + "Asset cannot be used on payments.")) | |
118 | 118 | else if (isFeePaymentToken) | |
119 | 119 | then throw((prolog + "Payment Token cannot be used.")) | |
120 | 120 | else checkFee(w) | |
121 | 121 | } | |
122 | 122 | else { | |
123 | 123 | let prolog = "Transfer to not DigiliraPay recipient: " | |
124 | - | if (isFeeSponsorToken) | |
125 | - | then throw((prolog + "Sponsor Token cannot be used.")) | |
126 | - | else if (isFeePaymentToken) | |
127 | - | then throw((prolog + "Payment Token cannot be used.")) | |
128 | - | else if (myStatusBanned) | |
129 | - | then throw((prolog + "This account has been suspended.")) | |
130 | - | else if (permissionTransferNotDP) | |
131 | - | then throw((prolog + "This asset cannot be transfered.")) | |
132 | - | else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
124 | + | if (isFeePaymentToken) | |
125 | + | then throw((prolog + "Payment Token cannot be used.")) | |
126 | + | else if (myStatusBanned) | |
127 | + | then throw((prolog + "This account has been suspended.")) | |
128 | + | else if (permissionTransferNotDP) | |
129 | + | then throw((prolog + "This asset cannot be transfered.")) | |
130 | + | else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
133 | 131 | } | |
134 | 132 | case t: DataTransaction|SetScriptTransaction => | |
135 | 133 | let s1 = if (sigVerify(t.bodyBytes, t.proofs[0], t.senderPublicKey)) | |
136 | 134 | then 1 | |
137 | 135 | else 0 | |
138 | 136 | let s2 = if (sigVerify(t.bodyBytes, t.proofs[1], digiliraPay)) | |
139 | 137 | then 1 | |
140 | 138 | else 0 | |
141 | 139 | if (((s1 + s2) == 2)) | |
142 | 140 | then true | |
143 | 141 | else throw("Integrity Check Failed!") | |
144 | 142 | case _ => | |
145 | 143 | recovery() | |
146 | 144 | } |
github/deemru/w8io/026f985 27.83 ms ◑