tx · 2SWcmdCYC3mdBhQAnxoMvd6SbyBoULeRfXS49wR2arFx 3MxqKwurkP77Ch4YU4nqeRmvKUfUQjrSkTp: -0.01400000 Waves 2021.01.25 11:59 [1368819] smart account 3MxqKwurkP77Ch4YU4nqeRmvKUfUQjrSkTp > SELF 0.00000000 Waves
{ "type": 13, "id": "2SWcmdCYC3mdBhQAnxoMvd6SbyBoULeRfXS49wR2arFx", "fee": 1400000, "feeAssetId": null, "timestamp": 1611565142000, "version": 2, "chainId": 84, "sender": "3MxqKwurkP77Ch4YU4nqeRmvKUfUQjrSkTp", "senderPublicKey": "5HL6Pec7uBHK6WcEjzgWku78zrBjNswXjZ1QG4uWxc2M", "proofs": [ "47cWM5T6maUWEphsCmpa7RqDEfzhkT3gm13tsFTHNFyAZpuC2JL98r1JAKitVhuUF6RNp5REnbAZNyqs6WrKD9Tb", "7b71v4rHAMu7VkbHQm5TW9psFmudRW2NAGSwDxXjXNjypUYr6cDDKpcWPJdau6oyhNdSkSC2RaeyN891SWoJNmq" ], "script": "base64:BAQAAAALZGlnaWxpcmFQYXkBAAAAID0HOFHYXYpCB2C8RjDY8m3ndBlb8WihoYLw1tvHVwgrBAAAAAxzcG9uc29yVG9rZW4BAAAAIF0xC+0nwtqd1CxX9Y/+nUsawhMMb0TR82Wj5My6EPg+BAAAAAxwYXltZW50VG9rZW4BAAAAINUa1XJy5UC96rHuuRV8oDs9miGKfVUIoeiwBqYZd/niBAAAAApwcm94eVdhdmVzAQAAACALvZdwHed5WebRs21jKDRN9242fzutjnj6yaz93a9NdwQAAAAGYmFubmVkAAAAAAAABiY4BAAAAApLWUNQZW5kaW5nAAAAAAAAAAAABAAAABBub25GdW5naWJsZUJsb2NrAAAAAAAAAABkBAAAAA10cmFuc2ZlckJsb2NrAAAAAAAAAABkBAAAAAxwYXltZW50QmxvY2sAAAAAAAAAAMgEAAAACWZ1bmRCbG9jawAAAAAAAAABLAQAAAAQcGF5bWVudEZ1bmRCbG9jawAAAAAAAAABkAQ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RtYXRjaDACAAAAD0RhdGFUcmFuc2FjdGlvbgYDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAE0V4Y2hhbmdlVHJhbnNhY3Rpb24GCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAFFNldFNjcmlwdFRyYW5zYWN0aW9uBAAAAAF0BQAAAAckbWF0Y2gwCQAB9AAAAAMIBQAAAAF0AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAABdAAAAAZwcm9vZnMAAAAAAAAAAAEFAAAAC2RpZ2lsaXJhUGF5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABdNYXNzVHJhbnNmZXJUcmFuc2FjdGlvbgQAAAADbXR0BQAAAAckbWF0Y2gwBwbt/UuB", "height": 1368819, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AxqWKzYuNNFDRGiQBBxm5cKqPtbQwtH5jLM6kjTFcd17 Next: none Diff:
Old | New | Differences | |
---|---|---|---|
6 | 6 | let proxyWaves = base58'nqAJcPZzdav7orQg3U78Nno2eF4J9bmeBbU2WtPaYkv' | |
7 | 7 | let banned = 403000 | |
8 | 8 | let KYCPending = 0 | |
9 | + | let nonFungibleBlock = 100 | |
9 | 10 | let transferBlock = 100 | |
10 | 11 | let paymentBlock = 200 | |
11 | 12 | let fundBlock = 300 | |
24 | 25 | then if ((feeToken == sponsorToken)) | |
25 | 26 | then if (isDefined(isAsset)) | |
26 | 27 | then if ((isAsset == banned)) | |
27 | - | then throw(" | |
28 | + | then throw("This asset cannot be transfered.") | |
28 | 29 | else if (if ((valueOrElse(isAsset, banned) >= transferBlock)) | |
29 | 30 | then (upperBlock >= valueOrElse(isAsset, banned)) | |
30 | 31 | else false) | |
31 | 32 | then if ((valueOrElse(isUser, 0) >= valueOrElse(isAsset, banned))) | |
32 | 33 | then true | |
33 | - | else throw(" | |
34 | - | else throw(" | |
34 | + | else throw("To transfer this asset user permission must be set correctly.") | |
35 | + | else throw("Transfer is not available right now.") | |
35 | 36 | else true | |
36 | 37 | else if ((feeToken == paymentToken)) | |
37 | 38 | then if ((w.recipient == addressFromPublicKey(digiliraPay))) | |
70 | 71 | else throw("This asset has special requirements 1") | |
71 | 72 | else true | |
72 | 73 | else if (isDefined(isAsset)) | |
73 | - | then throw("cant transfer") | |
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.") | |
74 | 79 | else if (isDefined(feeToken)) | |
75 | 80 | then if ((feeToken == sponsorToken)) | |
76 | 81 | then throw("Cannot use this token for none DigiliraPay users transfers.") |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# CONTENT_TYPE EXPRESSION #-} | |
3 | 3 | let digiliraPay = base58'57EFni8M1XesEurFh3c4jnpLExP2PCPd5TRrwMjePAT4' | |
4 | 4 | let sponsorToken = base58'7GnHzTaDe3YbDiCD9rueHiSfPB7hdanPpN4Ab79fJGtD' | |
5 | 5 | let paymentToken = base58'FLsa9hfu1jvXC6jhDP2x6DHHQHK2qiKPtS7D74ZFNsE1' | |
6 | 6 | let proxyWaves = base58'nqAJcPZzdav7orQg3U78Nno2eF4J9bmeBbU2WtPaYkv' | |
7 | 7 | let banned = 403000 | |
8 | 8 | let KYCPending = 0 | |
9 | + | let nonFungibleBlock = 100 | |
9 | 10 | let transferBlock = 100 | |
10 | 11 | let paymentBlock = 200 | |
11 | 12 | let fundBlock = 300 | |
12 | 13 | let paymentFundBlock = 400 | |
13 | 14 | let upperBlock = 500 | |
14 | 15 | match tx { | |
15 | 16 | case w: TransferTransaction => | |
16 | 17 | let myStatus = getInteger(addressFromPublicKey(digiliraPay), toBase58String(w.sender.bytes)) | |
17 | 18 | let isUser = getInteger(addressFromPublicKey(digiliraPay), toBase58String(addressFromRecipient(w.recipient).bytes)) | |
18 | 19 | let feeToken = w.feeAssetId | |
19 | 20 | let feeAmount = w.fee | |
20 | 21 | let asset = valueOrElse(w.assetId, proxyWaves) | |
21 | 22 | let isAsset = getInteger(addressFromPublicKey(digiliraPay), toBase58String(asset)) | |
22 | 23 | if (isDefined(isUser)) | |
23 | 24 | then if (isDefined(feeToken)) | |
24 | 25 | then if ((feeToken == sponsorToken)) | |
25 | 26 | then if (isDefined(isAsset)) | |
26 | 27 | then if ((isAsset == banned)) | |
27 | - | then throw(" | |
28 | + | then throw("This asset cannot be transfered.") | |
28 | 29 | else if (if ((valueOrElse(isAsset, banned) >= transferBlock)) | |
29 | 30 | then (upperBlock >= valueOrElse(isAsset, banned)) | |
30 | 31 | else false) | |
31 | 32 | then if ((valueOrElse(isUser, 0) >= valueOrElse(isAsset, banned))) | |
32 | 33 | then true | |
33 | - | else throw(" | |
34 | - | else throw(" | |
34 | + | else throw("To transfer this asset user permission must be set correctly.") | |
35 | + | else throw("Transfer is not available right now.") | |
35 | 36 | else true | |
36 | 37 | else if ((feeToken == paymentToken)) | |
37 | 38 | then if ((w.recipient == addressFromPublicKey(digiliraPay))) | |
38 | 39 | then if ((myStatus == KYCPending)) | |
39 | 40 | then throw("KYC Pending") | |
40 | 41 | else if ((myStatus == banned)) | |
41 | 42 | then throw("Account Banned Can't Operate") | |
42 | 43 | else if ((feeAmount > 10)) | |
43 | 44 | then throw("Not Allowed") | |
44 | 45 | else if ((isAsset == banned)) | |
45 | 46 | then throw("Can not transfer this asset 3") | |
46 | 47 | else if (if (if ((valueOrElse(isAsset, banned) >= paymentBlock)) | |
47 | 48 | then (fundBlock >= valueOrElse(isAsset, banned)) | |
48 | 49 | else false) | |
49 | 50 | then true | |
50 | 51 | else if ((valueOrElse(isAsset, banned) >= paymentFundBlock)) | |
51 | 52 | then (upperBlock >= valueOrElse(isAsset, banned)) | |
52 | 53 | else false) | |
53 | 54 | then if ((valueOrElse(myStatus, 0) >= valueOrElse(isAsset, banned))) | |
54 | 55 | then true | |
55 | 56 | else throw("This asset has special requirements 2") | |
56 | 57 | else throw("Can not transfer this asset 4") | |
57 | 58 | else throw("Unfortunately you can only use this token for payments") | |
58 | 59 | else if (isDefined(isAsset)) | |
59 | 60 | then if ((isAsset == banned)) | |
60 | 61 | then throw("Can not transfer this asset 5") | |
61 | 62 | else if ((valueOrElse(isUser, 0) >= valueOrElse(isAsset, banned))) | |
62 | 63 | then true | |
63 | 64 | else throw("This asset has special requirements 5") | |
64 | 65 | else true | |
65 | 66 | else if (isDefined(isAsset)) | |
66 | 67 | then if ((valueOrElse(isAsset, 0) == banned)) | |
67 | 68 | then throw("Can not transfer this asset") | |
68 | 69 | else if ((valueOrElse(isUser, 0) >= valueOrElse(isAsset, banned))) | |
69 | 70 | then true | |
70 | 71 | else throw("This asset has special requirements 1") | |
71 | 72 | else true | |
72 | 73 | else if (isDefined(isAsset)) | |
73 | - | then throw("cant transfer") | |
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.") | |
74 | 79 | else if (isDefined(feeToken)) | |
75 | 80 | then if ((feeToken == sponsorToken)) | |
76 | 81 | then throw("Cannot use this token for none DigiliraPay users transfers.") | |
77 | 82 | else if ((feeToken == paymentToken)) | |
78 | 83 | then throw("Unfortunately you can only use this token for payments") | |
79 | 84 | else true | |
80 | 85 | else true | |
81 | 86 | case x: Order|LeaseTransaction|BurnTransaction => | |
82 | 87 | false | |
83 | 88 | case t: DataTransaction|ExchangeTransaction|SetScriptTransaction => | |
84 | 89 | sigVerify(t.bodyBytes, t.proofs[1], digiliraPay) | |
85 | 90 | case mtt: MassTransferTransaction => | |
86 | 91 | false | |
87 | 92 | case _ => | |
88 | 93 | true | |
89 | 94 | } |
github/deemru/w8io/026f985 41.96 ms ◑