tx · 5y7HuEB5uXrZJhJUzmzukogHj2psMvJbKkUiT1AY4bpW

3NA1zc7miK3bRpabCkfdAy3ugT1abEH4XvC:  -0.01400000 Waves

2021.02.01 12:09 [1378905] smart account 3NA1zc7miK3bRpabCkfdAy3ugT1abEH4XvC > SELF 0.00000000 Waves

{ "type": 13, "id": "5y7HuEB5uXrZJhJUzmzukogHj2psMvJbKkUiT1AY4bpW", "fee": 1400000, "feeAssetId": null, "timestamp": 1612170706000, "version": 2, "chainId": 84, "sender": "3NA1zc7miK3bRpabCkfdAy3ugT1abEH4XvC", "senderPublicKey": "FGEpfdbsnGgv2u4E4kJ7aJdEoww9djxfupn8jGYjrxYu", "proofs": [ "W86C2hi5oe1VRPPf2ooR6s4K6SYcdWH65TwZEhxtdZtDJVPG74qZq3v2oRg3eK2qDHKasmAAqVFW2S8cmiRnJE6", "5pXT2eG2F2P9tuA19MbJw81CKVgQxq6Xg74JzsMD8ExviWJUYahLczbBrCXL8EPpGzQjFvwbPEqmADhHdKgZjHsB" ], "script": "base64:BAQAAAALZGlnaWxpcmFQYXkBAAAAID0HOFHYXYpCB2C8RjDY8m3ndBlb8WihoYLw1tvHVwgrBAAAAAdnYXRld2F5AQAAACA9BzhR2F2KQgdgvEYw2PJt53QZW/FooaGC8Nbbx1cIKwQAAAAMc3BvbnNvclRva2VuAQAAACBdMQvtJ8LandQsV/WP/p1LGsITDG9E0fNlo+TMuhD4PgQAAAAMcGF5bWVudFRva2VuAQAAACDVGtVycuVAveqx7rkVfKA7PZohin1VCKHosAamGXf54gQAAAANcmVjb3ZlcnlUb2tlbgEAAAAg1RrVcnLlQL3qse65FXygOz2aIYp9VQih6LAGphl3+eIEAAAACnByb3h5V2F2ZXMBAAAABBOr2TMEAAAACXJlY292ZXJ5MQEAAAAgPQc4UdhdikIHYLxGMNjybed0GVvxaKGhgvDW28dXCCsEAAAACXJlY292ZXJ5MgEAAAAgPQc4UdhdikIHYLxGMNjybed0GVvxaKGhgvDW28dXCCsEAAAAC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AF0BQAAAAckbWF0Y2gwBAAAAAJzMQMJAAH0AAAAAwgFAAAAAXQAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAF0AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAXQAAAAPc2VuZGVyUHVibGljS2V5AAAAAAAAAAABAAAAAAAAAAAABAAAAAJzMgMJAAH0AAAAAwgFAAAAAXQAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAF0AAAABnByb29mcwAAAAAAAAAAAQUAAAALZGlnaWxpcmFQYXkAAAAAAAAAAAEAAAAAAAAAAAADCQAAAAAAAAIJAABkAAAAAgUAAAACczEFAAAAAnMyAAAAAAAAAAACBgkAAAIAAAABAgAAAAxVbmF1dGhvcml6ZWQJAQAAAAhyZWNvdmVyeQAAAAC5zE8q", "height": 1378905, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BKWH97QijCgN5ipHVwopQ9WxZRudphX6Uogewj4dkX6C Next: 49xSA8fWZ2uyaaxjazyaahrxjHVQbx72zMcTD2mbqifz Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# CONTENT_TYPE EXPRESSION #-}
33 let digiliraPay = base58'57EFni8M1XesEurFh3c4jnpLExP2PCPd5TRrwMjePAT4'
4+let gateway = base58'57EFni8M1XesEurFh3c4jnpLExP2PCPd5TRrwMjePAT4'
45 let sponsorToken = base58'7GnHzTaDe3YbDiCD9rueHiSfPB7hdanPpN4Ab79fJGtD'
56 let paymentToken = base58'FLsa9hfu1jvXC6jhDP2x6DHHQHK2qiKPtS7D74ZFNsE1'
6-let proxyWaves = base58'nqAJcPZzdav7orQg3U78Nno2eF4J9bmeBbU2WtPaYkv'
7+let recoveryToken = base58'FLsa9hfu1jvXC6jhDP2x6DHHQHK2qiKPtS7D74ZFNsE1'
8+let proxyWaves = base58'WAVES'
9+let recovery1 = base58'57EFni8M1XesEurFh3c4jnpLExP2PCPd5TRrwMjePAT4'
10+let recovery2 = base58'57EFni8M1XesEurFh3c4jnpLExP2PCPd5TRrwMjePAT4'
11+let recovery3 = base58'57EFni8M1XesEurFh3c4jnpLExP2PCPd5TRrwMjePAT4'
712 let banned = 403000
8-let KYCPending = 0
9-let nonFungibleBlock = 100
13+let digiliraPayOnly = 99
1014 let transferBlock = 100
1115 let paymentBlock = 200
12-let fundBlock = 300
13-let paymentFundBlock = 400
14-let upperBlock = 500
16+let paymentFundBlock = 300
17+let fundBlock = 400
18+func recovery () = {
19+ let s1 = if (sigVerify(tx.bodyBytes, tx.proofs[0], recovery1))
20+ then 1
21+ else 0
22+ let s2 = if (sigVerify(tx.bodyBytes, tx.proofs[1], recovery2))
23+ then 1
24+ else 0
25+ let s3 = if (sigVerify(tx.bodyBytes, tx.proofs[2], recovery3))
26+ then 1
27+ else 0
28+ if ((((s1 + s2) + s3) >= 2))
29+ then true
30+ else throw("Unauthorized")
31+ }
32+
33+func checkFee (w) = {
34+ let fee = w.fee
35+ let isFeePaymentToken = (w.feeAssetId == paymentToken)
36+ let isFeeSponsorToken = (w.feeAssetId == sponsorToken)
37+ let unScriptedFee = 5
38+ let scriptedFee = 9
39+ let isScripted = match assetInfo(valueOrElse(w.assetId, proxyWaves)) {
40+ case asset: Asset =>
41+ if (asset.scripted)
42+ then true
43+ else false
44+ case _ =>
45+ false
46+ }
47+ if (if (!(isFeePaymentToken))
48+ then !(isFeeSponsorToken)
49+ else false)
50+ then sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
51+ else if (if (if (isScripted)
52+ then (fee == scriptedFee)
53+ else false)
54+ then true
55+ else if (!(isScripted))
56+ then (fee == unScriptedFee)
57+ else false)
58+ then sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
59+ else throw((toString(fee) + " feeAmount is wrong"))
60+ }
61+
62+func getStatus (key) = valueOrElse(getInteger(addressFromPublicKey(digiliraPay), toBase58String(key)), 0)
63+
1564 match tx {
1665 case w: TransferTransaction =>
17- let myStatus = getInteger(addressFromPublicKey(digiliraPay), toBase58String(w.sender.bytes))
18- let isUser = getInteger(addressFromPublicKey(digiliraPay), toBase58String(addressFromRecipient(w.recipient).bytes))
19- let feeToken = w.feeAssetId
20- let feeAmount = w.fee
21- let asset = valueOrElse(w.assetId, proxyWaves)
22- let isAsset = getInteger(addressFromPublicKey(digiliraPay), toBase58String(asset))
23- if (isDefined(isUser))
24- then if (isDefined(feeToken))
25- then if ((feeToken == sponsorToken))
26- then if (isDefined(isAsset))
27- then if ((isAsset == banned))
28- then throw("This asset cannot be transfered.")
29- else if (if ((valueOrElse(isAsset, banned) >= transferBlock))
30- then (upperBlock >= valueOrElse(isAsset, banned))
31- else false)
32- then if ((valueOrElse(isUser, 0) >= valueOrElse(isAsset, banned)))
33- then true
34- else throw("To transfer this asset user permission must be set correctly.")
35- else throw("Transfer is not available right now.")
36- else true
37- else if ((feeToken == paymentToken))
38- then if ((w.recipient == addressFromPublicKey(digiliraPay)))
39- then if ((myStatus == KYCPending))
40- then throw("KYC Pending")
41- else if ((myStatus == banned))
42- then throw("Account Banned Can't Operate")
43- else if ((feeAmount > 10))
44- then throw("Not Allowed")
45- else if ((isAsset == banned))
46- then throw("Can not transfer this asset 3")
47- else if (if (if ((valueOrElse(isAsset, banned) >= paymentBlock))
48- then (fundBlock >= valueOrElse(isAsset, banned))
49- else false)
66+ let myStatus = getStatus(w.sender.bytes)
67+ let recipientStatus = getStatus(addressFromRecipient(w.recipient).bytes)
68+ let assetStatus = getStatus(valueOrElse(w.assetId, proxyWaves))
69+ let digiliraRecipient = (recipientStatus > 0)
70+ let myStatusBanned = (myStatus == banned)
71+ let recipientStatusBanned = (recipientStatus == banned)
72+ let assetStatusBanned = (assetStatus == banned)
73+ let somethingBanned = if (if (myStatusBanned)
74+ then true
75+ else recipientStatusBanned)
76+ then true
77+ else assetStatusBanned
78+ let isFeeRecoveryToken = (w.feeAssetId == recoveryToken)
79+ let isRecipientGateway = (w.recipient == addressFromPublicKey(gateway))
80+ let isFeePaymentToken = (w.feeAssetId == paymentToken)
81+ let isFeeSponsorToken = (w.feeAssetId == sponsorToken)
82+ let isExclusiveToken = (digiliraPayOnly == valueOrElse(assetStatus, 0))
83+ let isDigiliraPayExclusive = (digiliraPayOnly > valueOrElse(assetStatus, 0))
84+ let permissionTransferToDP = if ((valueOrElse(assetStatus, banned) > valueOrElse(recipientStatus, 0)))
85+ then true
86+ else (valueOrElse(assetStatus, banned) > valueOrElse(myStatus, 0))
87+ let permissionPayment = if ((fundBlock > valueOrElse(assetStatus, 0)))
88+ then (valueOrElse(assetStatus, 0) >= paymentBlock)
89+ else false
90+ let permissionTransferNotDP = if ((transferBlock > valueOrElse(assetStatus, 0)))
91+ then true
92+ else (valueOrElse(assetStatus, 0) >= paymentFundBlock)
93+ let isRecovery = if (if (if (digiliraRecipient)
94+ then isFeeRecoveryToken
95+ else false)
96+ then isRecipientGateway
97+ else false)
98+ then myStatusBanned
99+ else false
100+ if (if (isRecovery)
101+ then recovery()
102+ else false)
103+ then true
104+ else if (digiliraRecipient)
105+ then {
106+ let prolog = "Transfer to DigiliraPay recipient: "
107+ if (myStatusBanned)
108+ then throw((prolog + "This account has been suspended."))
109+ else if (recipientStatusBanned)
110+ then throw((prolog + "Recipient's account has been suspended."))
111+ else if (assetStatusBanned)
112+ then throw((prolog + "Asset cannot be transfered."))
113+ else if (permissionTransferToDP)
114+ then throw((prolog + "Asset cannot be transfered. Recipient/Sender is not eligible."))
115+ else if (isDigiliraPayExclusive)
116+ then throw((prolog + "Non-Transferable Token."))
117+ else if (isRecipientGateway)
118+ then if (if (permissionPayment)
50119 then true
51- else if ((valueOrElse(isAsset, banned) >= paymentFundBlock))
52- then (upperBlock >= valueOrElse(isAsset, banned))
53- else false)
54- then if ((valueOrElse(myStatus, 0) >= valueOrElse(isAsset, banned)))
55- then true
56- else throw("This asset has special requirements 2")
57- else throw("Can not transfer this asset 4")
58- else throw("Unfortunately you can only use this token for payments")
59- else if (isDefined(isAsset))
60- then if ((isAsset == banned))
61- then throw("Can not transfer this asset 5")
62- else if ((valueOrElse(isUser, 0) >= valueOrElse(isAsset, banned)))
63- then true
64- else throw("This asset has special requirements 5")
65- else true
66- else if (isDefined(isAsset))
67- then if ((valueOrElse(isAsset, 0) == banned))
68- then throw("Can not transfer this asset")
69- else if ((valueOrElse(isUser, 0) >= valueOrElse(isAsset, banned)))
70- then true
71- else throw("This asset has special requirements 1")
72- else true
73- else if (isDefined(isAsset))
74- then if (if ((valueOrElse(isAsset, banned) >= transferBlock))
75- then (fundBlock >= valueOrElse(isAsset, banned))
76- else false)
77- then true
78- else throw("Cannot transfer this token to none DigiliraPay users.")
79- else if (isDefined(feeToken))
80- then if ((feeToken == sponsorToken))
81- then throw("Cannot use this token for none DigiliraPay users transfers.")
82- else if ((feeToken == paymentToken))
83- then throw("Unfortunately you can only use this token for payments")
84- else true
85- else true
86- case x: Order|LeaseTransaction|BurnTransaction =>
87- false
88- case t: DataTransaction|ExchangeTransaction|SetScriptTransaction =>
89- sigVerify(t.bodyBytes, t.proofs[1], digiliraPay)
90- case mtt: MassTransferTransaction =>
91- false
120+ else isExclusiveToken)
121+ then checkFee(w)
122+ else throw((prolog + "Asset cannot be used on payments."))
123+ else if (isFeePaymentToken)
124+ then throw((prolog + "Payment Token cannot be used."))
125+ else checkFee(w)
126+ }
127+ else {
128+ let prolog = "Transfer to not DigiliraPay recipient: "
129+ if (isFeeSponsorToken)
130+ then throw((prolog + "Sponsor Token cannot be used."))
131+ else if (isFeePaymentToken)
132+ then throw((prolog + "Payment Token cannot be used."))
133+ else if (myStatusBanned)
134+ then throw((prolog + "This account has been suspended."))
135+ else if (permissionTransferNotDP)
136+ then throw((prolog + "This asset cannot be transfered."))
137+ else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
138+ }
139+ case t: DataTransaction|SetScriptTransaction =>
140+ let s1 = if (sigVerify(t.bodyBytes, t.proofs[0], t.senderPublicKey))
141+ then 1
142+ else 0
143+ let s2 = if (sigVerify(t.bodyBytes, t.proofs[1], digiliraPay))
144+ then 1
145+ else 0
146+ if (((s1 + s2) == 2))
147+ then true
148+ else throw("Unauthorized")
92149 case _ =>
93- true
150+ recovery()
94151 }

github/deemru/w8io/169f3d6 
29.18 ms