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