tx · 8AtYS9g8E7Toide5aLeKE1VXkXgJHHGdJgyMwmCTqZRX

3N8Dbbs1NjXoQTmpxKzgJeyudMwKnTUXh5i:  -0.01400000 Waves

2021.01.05 19:36 [1340346] smart account 3N8Dbbs1NjXoQTmpxKzgJeyudMwKnTUXh5i > SELF 0.00000000 Waves

{ "type": 13, "id": "8AtYS9g8E7Toide5aLeKE1VXkXgJHHGdJgyMwmCTqZRX", "fee": 1400000, "feeAssetId": null, "timestamp": 1609864635000, "version": 2, "chainId": 84, "sender": "3N8Dbbs1NjXoQTmpxKzgJeyudMwKnTUXh5i", "senderPublicKey": "B9fC9nfXwLx5j1rojcEe3bVyZGpM6UD3ZpDTA4dW63h", "proofs": [ "4AiUiLY5kTevYkrwjiT6GSSi5XufA4YegxEX9eBX5sgbAccFkgke291eQbSEukfti6QjUgW6xvCkLVdZyWyGXZrL", "23MnR4xe5hp3AiTf9iKzvGb7QeDBTvHBaUikU3rhyKoPmzAjSRB6LYbaqVRKbw43Hm9wP7t4sG3SEw1uVuxdXfdu" ], "script": "base64:BAQAAAALZGlnaWxpcmFQYXkBAAAAID0HOFHYXYpCB2C8RjDY8m3ndBlb8WihoYLw1tvHVwgrBAAAAAxzcG9uc29yVG9rZW4BAAAAIF0xC+0nwtqd1CxX9Y/+nUsawhMMb0TR82Wj5My6EPg+BAAAAAxwYXltZW50VG9rZW4BAAAAINUa1XJy5UC96rHuuRV8oDs9miGKfVUIoeiwBqYZd/niBAAAAApwcm94eVdhdmVzAQAAACALvZdwHed5WebRs21jKDRN9242fzutjnj6yaz93a9NdwQAAAAGYmFubmVkAAAAAAAABiY4BAAAAApLWUNQZW5kaW5nAAAAAAAAAAAABAAAAA10cmFuc2ZlckJsb2NrAAAAAAAAAABkBAAAAAxwYXltZW50QmxvY2sAAAAAAAAAAMgEAAAACWZ1bmRCbG9jawAAAAAAAAABLAQAAAAQcGF5bWVudEZ1bmRCbG9jawAAAAAAAAABkAQAAAAKdXBwZXJCbG9jawAAAAAAAA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hc3NUcmFuc2ZlclRyYW5zYWN0aW9uBAAAAANtdHQFAAAAByRtYXRjaDAHBlyfZuU=", "height": 1340346, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7sAGC2EJFjn2mgug2aam3qRGCNHenwgYNG1ijXWKPNjz Next: none Diff:
OldNewDifferences
1-{-# STDLIB_VERSION 3 #-}
1+{-# STDLIB_VERSION 4 #-}
22 {-# CONTENT_TYPE EXPRESSION #-}
33 let digiliraPay = base58'57EFni8M1XesEurFh3c4jnpLExP2PCPd5TRrwMjePAT4'
4-let gateway = Address(base58'3NCpyPuNzUaB7LFS4KBzwzWVnXmjur582oy')
54 let sponsorToken = base58'7GnHzTaDe3YbDiCD9rueHiSfPB7hdanPpN4Ab79fJGtD'
65 let paymentToken = base58'FLsa9hfu1jvXC6jhDP2x6DHHQHK2qiKPtS7D74ZFNsE1'
7-let banned = 403
6+let proxyWaves = base58'nqAJcPZzdav7orQg3U78Nno2eF4J9bmeBbU2WtPaYkv'
7+let banned = 403000
88 let KYCPending = 0
9-let KYCVer1 = 1
10-let KYCVer2 = 2
11-let KYCVer3 = 3
12-let isMerchant = 5
13-let isOk = 7
9+let transferBlock = 100
10+let paymentBlock = 200
11+let fundBlock = 300
12+let paymentFundBlock = 400
13+let upperBlock = 500
1414 match tx {
1515 case w: TransferTransaction =>
16- let data = getInteger(gateway, toBase58String(w.sender.bytes))
17- let isUser = getInteger(gateway, toBase58String(addressFromRecipient(w.recipient).bytes))
16+ let myStatus = getInteger(addressFromPublicKey(digiliraPay), toBase58String(w.sender.bytes))
17+ let isUser = getInteger(addressFromPublicKey(digiliraPay), toBase58String(addressFromRecipient(w.recipient).bytes))
1818 let feeToken = w.feeAssetId
19+ let feeAmount = w.fee
20+ let asset = valueOrElse(w.assetId, proxyWaves)
21+ let isAsset = getInteger(addressFromPublicKey(digiliraPay), toBase58String(asset))
1922 if (isDefined(isUser))
2023 then if (isDefined(feeToken))
2124 then if ((feeToken == sponsorToken))
22- then true
25+ then if (isDefined(isAsset))
26+ then if ((isAsset == banned))
27+ then throw("Can not transfer this asset 1")
28+ else if (if ((valueOrElse(isAsset, banned) >= transferBlock))
29+ then (upperBlock >= valueOrElse(isAsset, banned))
30+ else false)
31+ then if ((valueOrElse(isUser, 0) >= valueOrElse(isAsset, banned)))
32+ then true
33+ else throw("This asset has special requirements 2")
34+ else throw("Can not transfer this asset 1")
35+ else true
2336 else if ((feeToken == paymentToken))
2437 then if ((w.recipient == addressFromPublicKey(digiliraPay)))
38+ then if ((myStatus == KYCPending))
39+ then throw("KYC Pending")
40+ else if ((myStatus == banned))
41+ then throw("Account Banned Can't Operate")
42+ else if ((feeAmount > 10))
43+ then throw("Not Allowed")
44+ else if ((isAsset == banned))
45+ then throw("Can not transfer this asset 3")
46+ else if (if (if ((valueOrElse(isAsset, banned) >= paymentBlock))
47+ then (fundBlock >= valueOrElse(isAsset, banned))
48+ else false)
49+ then true
50+ else if ((valueOrElse(isAsset, banned) >= paymentFundBlock))
51+ then (upperBlock >= valueOrElse(isAsset, banned))
52+ else false)
53+ then if ((valueOrElse(myStatus, 0) >= valueOrElse(isAsset, banned)))
54+ then true
55+ else throw("This asset has special requirements 2")
56+ else throw("Can not transfer this asset 4")
57+ else throw("Unfortunately you can only use this token for payments")
58+ else if (isDefined(isAsset))
59+ then if ((isAsset == banned))
60+ then throw("Can not transfer this asset 5")
61+ else if ((valueOrElse(isUser, 0) >= valueOrElse(isAsset, banned)))
62+ then true
63+ else throw("This asset has special requirements 5")
64+ else true
65+ else if (isDefined(isAsset))
66+ then if ((valueOrElse(isAsset, 0) == banned))
67+ then throw("Can not transfer this asset")
68+ else if ((valueOrElse(isUser, 0) >= valueOrElse(isAsset, banned)))
2569 then true
26- else throw("Unfortunately you can only use this token for payments")
27- else true
28- else true
29- else if (isDefined(feeToken))
30- then if ((feeToken == sponsorToken))
31- then throw("Cannot use this token for none DigiliraPay users transfers.")
32- else if ((feeToken == paymentToken))
33- then throw("Cannot use this token for none payment transfers.")
34- else true
35- else true
70+ else throw("This asset has special requirements 1")
71+ else true
72+ else if (isDefined(isAsset))
73+ then throw("cant transfer")
74+ else if (isDefined(feeToken))
75+ then if ((feeToken == sponsorToken))
76+ then throw("Cannot use this token for none DigiliraPay users transfers.")
77+ else if ((feeToken == paymentToken))
78+ then throw("Unfortunately you can only use this token for payments")
79+ else true
80+ else true
3681 case x: Order|LeaseTransaction|BurnTransaction =>
3782 false
3883 case t: DataTransaction|ExchangeTransaction|SetScriptTransaction =>
3984 sigVerify(t.bodyBytes, t.proofs[1], digiliraPay)
4085 case mtt: MassTransferTransaction =>
41- let firstRecipient = mtt.transfers[0].recipient
42- let firstAmount = mtt.transfers[0].amount
43- let assetId = extract(mtt.assetId)
4486 false
4587 case _ =>
4688 true
Full:
OldNewDifferences
1-{-# STDLIB_VERSION 3 #-}
1+{-# STDLIB_VERSION 4 #-}
22 {-# CONTENT_TYPE EXPRESSION #-}
33 let digiliraPay = base58'57EFni8M1XesEurFh3c4jnpLExP2PCPd5TRrwMjePAT4'
4-let gateway = Address(base58'3NCpyPuNzUaB7LFS4KBzwzWVnXmjur582oy')
54 let sponsorToken = base58'7GnHzTaDe3YbDiCD9rueHiSfPB7hdanPpN4Ab79fJGtD'
65 let paymentToken = base58'FLsa9hfu1jvXC6jhDP2x6DHHQHK2qiKPtS7D74ZFNsE1'
7-let banned = 403
6+let proxyWaves = base58'nqAJcPZzdav7orQg3U78Nno2eF4J9bmeBbU2WtPaYkv'
7+let banned = 403000
88 let KYCPending = 0
9-let KYCVer1 = 1
10-let KYCVer2 = 2
11-let KYCVer3 = 3
12-let isMerchant = 5
13-let isOk = 7
9+let transferBlock = 100
10+let paymentBlock = 200
11+let fundBlock = 300
12+let paymentFundBlock = 400
13+let upperBlock = 500
1414 match tx {
1515 case w: TransferTransaction =>
16- let data = getInteger(gateway, toBase58String(w.sender.bytes))
17- let isUser = getInteger(gateway, toBase58String(addressFromRecipient(w.recipient).bytes))
16+ let myStatus = getInteger(addressFromPublicKey(digiliraPay), toBase58String(w.sender.bytes))
17+ let isUser = getInteger(addressFromPublicKey(digiliraPay), toBase58String(addressFromRecipient(w.recipient).bytes))
1818 let feeToken = w.feeAssetId
19+ let feeAmount = w.fee
20+ let asset = valueOrElse(w.assetId, proxyWaves)
21+ let isAsset = getInteger(addressFromPublicKey(digiliraPay), toBase58String(asset))
1922 if (isDefined(isUser))
2023 then if (isDefined(feeToken))
2124 then if ((feeToken == sponsorToken))
22- then true
25+ then if (isDefined(isAsset))
26+ then if ((isAsset == banned))
27+ then throw("Can not transfer this asset 1")
28+ else if (if ((valueOrElse(isAsset, banned) >= transferBlock))
29+ then (upperBlock >= valueOrElse(isAsset, banned))
30+ else false)
31+ then if ((valueOrElse(isUser, 0) >= valueOrElse(isAsset, banned)))
32+ then true
33+ else throw("This asset has special requirements 2")
34+ else throw("Can not transfer this asset 1")
35+ else true
2336 else if ((feeToken == paymentToken))
2437 then if ((w.recipient == addressFromPublicKey(digiliraPay)))
38+ then if ((myStatus == KYCPending))
39+ then throw("KYC Pending")
40+ else if ((myStatus == banned))
41+ then throw("Account Banned Can't Operate")
42+ else if ((feeAmount > 10))
43+ then throw("Not Allowed")
44+ else if ((isAsset == banned))
45+ then throw("Can not transfer this asset 3")
46+ else if (if (if ((valueOrElse(isAsset, banned) >= paymentBlock))
47+ then (fundBlock >= valueOrElse(isAsset, banned))
48+ else false)
49+ then true
50+ else if ((valueOrElse(isAsset, banned) >= paymentFundBlock))
51+ then (upperBlock >= valueOrElse(isAsset, banned))
52+ else false)
53+ then if ((valueOrElse(myStatus, 0) >= valueOrElse(isAsset, banned)))
54+ then true
55+ else throw("This asset has special requirements 2")
56+ else throw("Can not transfer this asset 4")
57+ else throw("Unfortunately you can only use this token for payments")
58+ else if (isDefined(isAsset))
59+ then if ((isAsset == banned))
60+ then throw("Can not transfer this asset 5")
61+ else if ((valueOrElse(isUser, 0) >= valueOrElse(isAsset, banned)))
62+ then true
63+ else throw("This asset has special requirements 5")
64+ else true
65+ else if (isDefined(isAsset))
66+ then if ((valueOrElse(isAsset, 0) == banned))
67+ then throw("Can not transfer this asset")
68+ else if ((valueOrElse(isUser, 0) >= valueOrElse(isAsset, banned)))
2569 then true
26- else throw("Unfortunately you can only use this token for payments")
27- else true
28- else true
29- else if (isDefined(feeToken))
30- then if ((feeToken == sponsorToken))
31- then throw("Cannot use this token for none DigiliraPay users transfers.")
32- else if ((feeToken == paymentToken))
33- then throw("Cannot use this token for none payment transfers.")
34- else true
35- else true
70+ else throw("This asset has special requirements 1")
71+ else true
72+ else if (isDefined(isAsset))
73+ then throw("cant transfer")
74+ else if (isDefined(feeToken))
75+ then if ((feeToken == sponsorToken))
76+ then throw("Cannot use this token for none DigiliraPay users transfers.")
77+ else if ((feeToken == paymentToken))
78+ then throw("Unfortunately you can only use this token for payments")
79+ else true
80+ else true
3681 case x: Order|LeaseTransaction|BurnTransaction =>
3782 false
3883 case t: DataTransaction|ExchangeTransaction|SetScriptTransaction =>
3984 sigVerify(t.bodyBytes, t.proofs[1], digiliraPay)
4085 case mtt: MassTransferTransaction =>
41- let firstRecipient = mtt.transfers[0].recipient
42- let firstAmount = mtt.transfers[0].amount
43- let assetId = extract(mtt.assetId)
4486 false
4587 case _ =>
4688 true
4789 }

github/deemru/w8io/026f985 
54.96 ms