tx · DVgfi9FY8WTjBpSSUj1po8pouLzGhkwwmZuMsEq667eH 3N3HcmfU1kxFj1x7PdZNnGZhGRELxC9gVbr: -0.01400000 Waves 2021.01.05 12:20 [1339898] smart account 3N3HcmfU1kxFj1x7PdZNnGZhGRELxC9gVbr > SELF 0.00000000 Waves
{ "type": 13, "id": "DVgfi9FY8WTjBpSSUj1po8pouLzGhkwwmZuMsEq667eH", "fee": 1400000, "feeAssetId": null, "timestamp": 1609838460910, "version": 2, "chainId": 84, "sender": "3N3HcmfU1kxFj1x7PdZNnGZhGRELxC9gVbr", "senderPublicKey": "CdPKZLUm4NiopSyscAvon7a9kzDkN2DomZqxEo1ba9ox", "proofs": [ "4JrHkHLZZywgZHUp3RV2Goz8h2MrVgfkUqECfemGb2QgZePd4uYQdKHdcLfMZo3SFygGUzDvYzhcQy2NCEB4wc5E", "3aFmR5J8SWruLx1zsUDn6fivVwZJUZ7nS3nTfnTzBEoSKGnRfLbbo7GM29Q8jJPKtJ6nPNBdDcisZhdjKm2TuoAX" ], "script": "base64:BAQAAAALZGlnaWxpcmFQYXkBAAAAID0HOFHYXYpCB2C8RjDY8m3ndBlb8WihoYLw1tvHVwgrBAAAAAxzcG9uc29yVG9rZW4BAAAAIF0xC+0nwtqd1CxX9Y/+nUsawhMMb0TR82Wj5My6EPg+BAAAAAxwYXltZW50VG9rZW4BAAAAINUa1XJy5UC96rHuuRV8oDs9miGKfVUIoeiwBqYZd/niBAAAAAZiYW5uZWQAAAAAAAAAAZMEAAAACktZQ1BlbmRpbmcAAAAAAAAAAAAEAAAAByRtYXRjaDAFAAAAAnR4AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABNUcmFuc2ZlclRyYW5zYWN0aW9uBAAAAAF3BQAAAAckbWF0Y2gwBAAAAAhteVN0YXR1cwkABBoAAAACCQEAAAAUYWRkcmVzc0Zyb21QdWJsaWNLZXkAAAABBQAAAAtkaWdpbGlyYVBheQkAAlgAAAABCAgFAAAAAXcAAAAGc2VuZG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W4JAAACAAAAAQIAAAA7Q2Fubm90IHVzZSB0aGlzIHRva2VuIGZvciBub25lIERpZ2lsaXJhUGF5IHVzZXJzIHRyYW5zZmVycy4DCQAAAAAAAAIFAAAACGZlZVRva2VuBQAAAAxwYXltZW50VG9rZW4JAAACAAAAAQIAAAA2VW5mb3J0dW5hdGVseSB5b3UgY2FuIG9ubHkgdXNlIHRoaXMgdG9rZW4gZm9yIHBheW1lbnRzBgYDAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAVPcmRlcgYDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAEExlYXNlVHJhbnNhY3Rpb24GCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAD0J1cm5UcmFuc2FjdGlvbgQAAAABeAUAAAAHJG1hdGNoMAcDAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAA9EYXRhVHJhbnNhY3Rpb24GAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABNFeGNoYW5nZVRyYW5zYWN0aW9uBgkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABRTZXRTY3JpcHRUcmFuc2FjdGlvbgQAAAABdAUAAAAHJG1hdGNoMAkAAfQAAAADCAUAAAABdAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAXQAAAAGcHJvb2ZzAAAAAAAAAAABBQAAAAtkaWdpbGlyYVBheQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAXTWFzc1RyYW5zZmVyVHJhbnNhY3Rpb24EAAAAA210dAUAAAAHJG1hdGNoMAcG8Yl/Fw==", "height": 1339898, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CfnYNEEdhnnGnQaogJ1vBbhPf9vadJP5Dv2eBPBT48LF Next: HWYzHZw7MKndDVASQYbP3WdfMrSZqiP8qtCVU3UqUbhj Diff:
Old | New | Differences | |
---|---|---|---|
24 | 24 | else true | |
25 | 25 | else throw(toBase58String(asset)) | |
26 | 26 | else if ((feeToken == paymentToken)) | |
27 | - | then throw("cant use payment token") | |
27 | + | then if ((w.recipient == addressFromPublicKey(digiliraPay))) | |
28 | + | then if ((myStatus == KYCPending)) | |
29 | + | then throw("KYC Pending") | |
30 | + | else if ((myStatus == banned)) | |
31 | + | then throw("Account Banned") | |
32 | + | else if ((feeAmount > 10)) | |
33 | + | then throw("Not Allowed") | |
34 | + | else true | |
35 | + | else throw("Unfortunately you can only use this token for payments") | |
28 | 36 | else if (isDefined(isAsset)) | |
29 | 37 | then if ((isAsset == banned)) | |
30 | 38 | then throw("Can not transfer this asset") | |
43 | 51 | then if ((feeToken == sponsorToken)) | |
44 | 52 | then throw("Cannot use this token for none DigiliraPay users transfers.") | |
45 | 53 | else if ((feeToken == paymentToken)) | |
46 | - | then if ((w.recipient == addressFromPublicKey(digiliraPay))) | |
47 | - | then if ((myStatus == KYCPending)) | |
48 | - | then throw("KYC Pending") | |
49 | - | else if ((myStatus == banned)) | |
50 | - | then throw("Account Banned") | |
51 | - | else if ((feeAmount > 10)) | |
52 | - | then throw("Not Allowed") | |
53 | - | else true | |
54 | - | else throw("Unfortunately you can only use this token for payments") | |
54 | + | then throw("Unfortunately you can only use this token for payments") | |
55 | 55 | else true | |
56 | 56 | else true | |
57 | 57 | case x: Order|LeaseTransaction|BurnTransaction => |
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 banned = 403 | |
7 | 7 | let KYCPending = 0 | |
8 | 8 | match tx { | |
9 | 9 | case w: TransferTransaction => | |
10 | 10 | let myStatus = getInteger(addressFromPublicKey(digiliraPay), toBase58String(w.sender.bytes)) | |
11 | 11 | let isUser = getInteger(addressFromPublicKey(digiliraPay), toBase58String(addressFromRecipient(w.recipient).bytes)) | |
12 | 12 | let feeToken = w.feeAssetId | |
13 | 13 | let feeAmount = w.fee | |
14 | 14 | let asset = value(w.assetId) | |
15 | 15 | let isAsset = getInteger(addressFromPublicKey(digiliraPay), toBase58String(asset)) | |
16 | 16 | if (isDefined(isUser)) | |
17 | 17 | then if (isDefined(feeToken)) | |
18 | 18 | then if ((feeToken == sponsorToken)) | |
19 | 19 | then if (isDefined(isAsset)) | |
20 | 20 | then if ((isAsset == banned)) | |
21 | 21 | then throw("Can not transfer this asset") | |
22 | 22 | else if ((valueOrElse(isUser, 0) >= valueOrElse(isAsset, banned))) | |
23 | 23 | then true | |
24 | 24 | else true | |
25 | 25 | else throw(toBase58String(asset)) | |
26 | 26 | else if ((feeToken == paymentToken)) | |
27 | - | then throw("cant use payment token") | |
27 | + | then if ((w.recipient == addressFromPublicKey(digiliraPay))) | |
28 | + | then if ((myStatus == KYCPending)) | |
29 | + | then throw("KYC Pending") | |
30 | + | else if ((myStatus == banned)) | |
31 | + | then throw("Account Banned") | |
32 | + | else if ((feeAmount > 10)) | |
33 | + | then throw("Not Allowed") | |
34 | + | else true | |
35 | + | else throw("Unfortunately you can only use this token for payments") | |
28 | 36 | else if (isDefined(isAsset)) | |
29 | 37 | then if ((isAsset == banned)) | |
30 | 38 | then throw("Can not transfer this asset") | |
31 | 39 | else if ((valueOrElse(isUser, 0) >= valueOrElse(isAsset, banned))) | |
32 | 40 | then true | |
33 | 41 | else throw("This asset has special requirements") | |
34 | 42 | else true | |
35 | 43 | else if (isDefined(isAsset)) | |
36 | 44 | then if ((valueOrElse(isAsset, 0) == banned)) | |
37 | 45 | then throw("Can not transfer this asset") | |
38 | 46 | else if ((valueOrElse(isUser, 0) >= valueOrElse(isAsset, banned))) | |
39 | 47 | then true | |
40 | 48 | else throw("This asset has special requirements") | |
41 | 49 | else true | |
42 | 50 | else if (isDefined(feeToken)) | |
43 | 51 | then if ((feeToken == sponsorToken)) | |
44 | 52 | then throw("Cannot use this token for none DigiliraPay users transfers.") | |
45 | 53 | else if ((feeToken == paymentToken)) | |
46 | - | then if ((w.recipient == addressFromPublicKey(digiliraPay))) | |
47 | - | then if ((myStatus == KYCPending)) | |
48 | - | then throw("KYC Pending") | |
49 | - | else if ((myStatus == banned)) | |
50 | - | then throw("Account Banned") | |
51 | - | else if ((feeAmount > 10)) | |
52 | - | then throw("Not Allowed") | |
53 | - | else true | |
54 | - | else throw("Unfortunately you can only use this token for payments") | |
54 | + | then throw("Unfortunately you can only use this token for payments") | |
55 | 55 | else true | |
56 | 56 | else true | |
57 | 57 | case x: Order|LeaseTransaction|BurnTransaction => | |
58 | 58 | false | |
59 | 59 | case t: DataTransaction|ExchangeTransaction|SetScriptTransaction => | |
60 | 60 | sigVerify(t.bodyBytes, t.proofs[1], digiliraPay) | |
61 | 61 | case mtt: MassTransferTransaction => | |
62 | 62 | false | |
63 | 63 | case _ => | |
64 | 64 | true | |
65 | 65 | } |
github/deemru/w8io/169f3d6 42.61 ms ◑