tx · 5kfijHSdfGWcdjiUPY3FMaLnM6y6ngBHMJgEc9SAGr6f 3N3HcmfU1kxFj1x7PdZNnGZhGRELxC9gVbr: -0.01400000 Waves 2021.01.05 14:14 [1340016] smart account 3N3HcmfU1kxFj1x7PdZNnGZhGRELxC9gVbr > SELF 0.00000000 Waves
{ "type": 13, "id": "5kfijHSdfGWcdjiUPY3FMaLnM6y6ngBHMJgEc9SAGr6f", "fee": 1400000, "feeAssetId": null, "timestamp": 1609845276372, "version": 2, "chainId": 84, "sender": "3N3HcmfU1kxFj1x7PdZNnGZhGRELxC9gVbr", "senderPublicKey": "CdPKZLUm4NiopSyscAvon7a9kzDkN2DomZqxEo1ba9ox", "proofs": [ "BuGfRx2N2avbduwfkWFy8xq4rLeQKXsQQkhDU2e3YfA4sFMP1TSW1Q8u2jAXbkTrSi9omZgrNjzjhXwSzcQP34M", "2Yhw6GeceEJubP2PcJeT7k27jVn7SYChZUhHk78Sae3cNomxhPW1MQA69bKd8QcLgcULCMbT7cDnntfwNyVxLsWD" ], "script": "base64:BAQAAAALZGlnaWxpcmFQYXkBAAAAID0HOFHYXYpCB2C8RjDY8m3ndBlb8WihoYLw1tvHVwgrBAAAAAxzcG9uc29yVG9rZW4BAAAAIF0xC+0nwtqd1CxX9Y/+nUsawhMMb0TR82Wj5My6EPg+BAAAAAxwYXltZW50VG9rZW4BAAAAINUa1XJy5UC96rHuuRV8oDs9miGKfVUIoeiwBqYZd/niBAAAAApwcm94eVdhdmVzAQAAACALvZdwHed5WebRs21jKDRN9242fzutjnj6yaz93a9NdwQAAAAGYmFubmVkAAAAAAAABiY4BAAAAApLWUNQZW5kaW5nAAAAAAAAAAAABAAAAA10cmFuc2ZlckJsb2NrAAAAAAAAAABkBAAAAAxwYXltZW50QmxvY2sAAAAAAAAAAMgEAAAACWZ1bmRCbG9jawAAAAAAAAABLAQAAAAQcGF5bWVudEZ1bmRCbG9jawAAAAAAAAABkAQAAAAKdXBwZXJCbG9jawAAAAAAAAAB9AQ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gAAADtDYW5ub3QgdXNlIHRoaXMgdG9rZW4gZm9yIG5vbmUgRGlnaWxpcmFQYXkgdXNlcnMgdHJhbnNmZXJzLgMJAAAAAAAAAgUAAAAIZmVlVG9rZW4FAAAADHBheW1lbnRUb2tlbgkAAAIAAAABAgAAADZVbmZvcnR1bmF0ZWx5IHlvdSBjYW4gb25seSB1c2UgdGhpcyB0b2tlbiBmb3IgcGF5bWVudHMGBgMDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABU9yZGVyBgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAQTGVhc2VUcmFuc2FjdGlvbgYJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAPQnVyblRyYW5zYWN0aW9uBAAAAAF4BQAAAAckbWF0Y2gwBwMDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAD0RhdGFUcmFuc2FjdGlvbgYDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAE0V4Y2hhbmdlVHJhbnNhY3Rpb24GCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAFFNldFNjcmlwdFRyYW5zYWN0aW9uBAAAAAF0BQAAAAckbWF0Y2gwCQAB9AAAAAMIBQAAAAF0AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAABdAAAAAZwcm9vZnMAAAAAAAAAAAEFAAAAC2RpZ2lsaXJhUGF5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABdNYXNzVHJhbnNmZXJUcmFuc2FjdGlvbgQAAAADbXR0BQAAAAckbWF0Y2gwBwYgbdo2", "height": 1340016, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CeX2HXXQdbUxc1UV3KirAMM3MywVyBHT52Q9vqHbuDoq Next: 3sSDD33ikyJCCm2jSMudJZ7GsqPyzZBW4veLoSpdWyYZ Diff:
Old | New | Differences | |
---|---|---|---|
3 | 3 | let digiliraPay = base58'57EFni8M1XesEurFh3c4jnpLExP2PCPd5TRrwMjePAT4' | |
4 | 4 | let sponsorToken = base58'7GnHzTaDe3YbDiCD9rueHiSfPB7hdanPpN4Ab79fJGtD' | |
5 | 5 | let paymentToken = base58'FLsa9hfu1jvXC6jhDP2x6DHHQHK2qiKPtS7D74ZFNsE1' | |
6 | + | let proxyWaves = base58'nqAJcPZzdav7orQg3U78Nno2eF4J9bmeBbU2WtPaYkv' | |
6 | 7 | let banned = 403000 | |
7 | 8 | let KYCPending = 0 | |
8 | 9 | let transferBlock = 100 | |
16 | 17 | let isUser = getInteger(addressFromPublicKey(digiliraPay), toBase58String(addressFromRecipient(w.recipient).bytes)) | |
17 | 18 | let feeToken = w.feeAssetId | |
18 | 19 | let feeAmount = w.fee | |
19 | - | let asset = | |
20 | + | let asset = valueOrElse(w.assetId, proxyWaves) | |
20 | 21 | let isAsset = getInteger(addressFromPublicKey(digiliraPay), toBase58String(asset)) | |
21 | 22 | if (isDefined(isUser)) | |
22 | 23 | then if (isDefined(feeToken)) | |
53 | 54 | else if (isDefined(isAsset)) | |
54 | 55 | then if ((isAsset == banned)) | |
55 | 56 | then throw("Can not transfer this asset 5") | |
56 | - | else if ((valueOrElse( | |
57 | + | else if ((valueOrElse(myStatus, 0) >= valueOrElse(isAsset, banned))) | |
57 | 58 | then true | |
58 | 59 | else throw("This asset has special requirements 2") | |
59 | 60 | else true |
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 | + | let proxyWaves = base58'nqAJcPZzdav7orQg3U78Nno2eF4J9bmeBbU2WtPaYkv' | |
6 | 7 | let banned = 403000 | |
7 | 8 | let KYCPending = 0 | |
8 | 9 | let transferBlock = 100 | |
9 | 10 | let paymentBlock = 200 | |
10 | 11 | let fundBlock = 300 | |
11 | 12 | let paymentFundBlock = 400 | |
12 | 13 | let upperBlock = 500 | |
13 | 14 | match tx { | |
14 | 15 | case w: TransferTransaction => | |
15 | 16 | let myStatus = getInteger(addressFromPublicKey(digiliraPay), toBase58String(w.sender.bytes)) | |
16 | 17 | let isUser = getInteger(addressFromPublicKey(digiliraPay), toBase58String(addressFromRecipient(w.recipient).bytes)) | |
17 | 18 | let feeToken = w.feeAssetId | |
18 | 19 | let feeAmount = w.fee | |
19 | - | let asset = | |
20 | + | let asset = valueOrElse(w.assetId, proxyWaves) | |
20 | 21 | let isAsset = getInteger(addressFromPublicKey(digiliraPay), toBase58String(asset)) | |
21 | 22 | if (isDefined(isUser)) | |
22 | 23 | then if (isDefined(feeToken)) | |
23 | 24 | then if ((feeToken == sponsorToken)) | |
24 | 25 | then if (isDefined(isAsset)) | |
25 | 26 | then if ((isAsset == banned)) | |
26 | 27 | then throw("Can not transfer this asset 1") | |
27 | 28 | else if ((valueOrElse(isUser, 0) >= valueOrElse(isAsset, banned))) | |
28 | 29 | then true | |
29 | 30 | else throw("Can not transfer this asset 1") | |
30 | 31 | else true | |
31 | 32 | else if ((feeToken == paymentToken)) | |
32 | 33 | then if ((w.recipient == addressFromPublicKey(digiliraPay))) | |
33 | 34 | then if ((myStatus == KYCPending)) | |
34 | 35 | then throw("KYC Pending") | |
35 | 36 | else if ((myStatus == banned)) | |
36 | 37 | then throw("Account Banned Can't Operate") | |
37 | 38 | else if ((feeAmount > 10)) | |
38 | 39 | then throw("Not Allowed") | |
39 | 40 | else if ((isAsset == banned)) | |
40 | 41 | then throw("Can not transfer this asset 3") | |
41 | 42 | else if (if (if ((valueOrElse(isAsset, banned) >= paymentBlock)) | |
42 | 43 | then (fundBlock >= valueOrElse(isAsset, banned)) | |
43 | 44 | else false) | |
44 | 45 | then true | |
45 | 46 | else if ((valueOrElse(isAsset, banned) >= paymentFundBlock)) | |
46 | 47 | then (upperBlock >= valueOrElse(isAsset, banned)) | |
47 | 48 | else false) | |
48 | 49 | then if ((valueOrElse(isUser, 0) >= valueOrElse(isAsset, banned))) | |
49 | 50 | then true | |
50 | 51 | else throw("This asset has special requirements 2") | |
51 | 52 | else throw("Can not transfer this asset 4") | |
52 | 53 | else throw("Unfortunately you can only use this token for payments") | |
53 | 54 | else if (isDefined(isAsset)) | |
54 | 55 | then if ((isAsset == banned)) | |
55 | 56 | then throw("Can not transfer this asset 5") | |
56 | - | else if ((valueOrElse( | |
57 | + | else if ((valueOrElse(myStatus, 0) >= valueOrElse(isAsset, banned))) | |
57 | 58 | then true | |
58 | 59 | else throw("This asset has special requirements 2") | |
59 | 60 | else true | |
60 | 61 | else if (isDefined(isAsset)) | |
61 | 62 | then if ((valueOrElse(isAsset, 0) == banned)) | |
62 | 63 | then throw("Can not transfer this asset") | |
63 | 64 | else if ((valueOrElse(isUser, 0) >= valueOrElse(isAsset, banned))) | |
64 | 65 | then true | |
65 | 66 | else throw("This asset has special requirements 1") | |
66 | 67 | else true | |
67 | 68 | else if (isDefined(feeToken)) | |
68 | 69 | then if ((feeToken == sponsorToken)) | |
69 | 70 | then throw("Cannot use this token for none DigiliraPay users transfers.") | |
70 | 71 | else if ((feeToken == paymentToken)) | |
71 | 72 | then throw("Unfortunately you can only use this token for payments") | |
72 | 73 | else true | |
73 | 74 | else true | |
74 | 75 | case x: Order|LeaseTransaction|BurnTransaction => | |
75 | 76 | false | |
76 | 77 | case t: DataTransaction|ExchangeTransaction|SetScriptTransaction => | |
77 | 78 | sigVerify(t.bodyBytes, t.proofs[1], digiliraPay) | |
78 | 79 | case mtt: MassTransferTransaction => | |
79 | 80 | false | |
80 | 81 | case _ => | |
81 | 82 | true | |
82 | 83 | } |
github/deemru/w8io/169f3d6 33.77 ms ◑