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