tx · 3ryEd59LbWWRTrbZtmMMTrrC1R2Qprumpq1SNaAFJ9sj 3N3HcmfU1kxFj1x7PdZNnGZhGRELxC9gVbr: -0.01400000 Waves 2021.01.05 11:48 [1339868] smart account 3N3HcmfU1kxFj1x7PdZNnGZhGRELxC9gVbr > SELF 0.00000000 Waves
{ "type": 13, "id": "3ryEd59LbWWRTrbZtmMMTrrC1R2Qprumpq1SNaAFJ9sj", "fee": 1400000, "feeAssetId": null, "timestamp": 1609836546059, "version": 2, "chainId": 84, "sender": "3N3HcmfU1kxFj1x7PdZNnGZhGRELxC9gVbr", "senderPublicKey": "CdPKZLUm4NiopSyscAvon7a9kzDkN2DomZqxEo1ba9ox", "proofs": [ "2h1MmFtyBvwbWZspLdRCadHBQZiHDqareDtegWgw4246LxXmxNHcfaiCJ9mSTruyp25jm49UktmeGinPTKA4NW9G", "5YoFKt96WXVTzceZkFwZZ8gzUcuoq2AbG1pVhSU6wKUgLz6E3tksZhpzqg2SgS3XG8ygsSWyCKqdcRaCbKffytVk" ], "script": "base64:BAQAAAALZGlnaWxpcmFQYXkBAAAAID0HOFHYXYpCB2C8RjDY8m3ndBlb8WihoYLw1tvHVwgrBAAAAAxzcG9uc29yVG9rZW4BAAAAIF0xC+0nwtqd1CxX9Y/+nUsawhMMb0TR82Wj5My6EPg+BAAAAAxwYXltZW50VG9rZW4BAAAAINUa1XJy5UC96rHuuRV8oDs9miGKfVUIoeiwBqYZd/niBAAAAAZiYW5uZWQAAAAAAAAAAZMEAAAACktZQ1BlbmRpbmcAAAAAAAAAAAAEAAAAByRtYXRjaDAFAAAAAnR4AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABNUcmFuc2ZlclRyYW5zYWN0aW9uBAAAAAF3BQAAAAckbWF0Y2gwBAAAAAhteVN0YXR1cwkABBoAAAACCQEAAAAUYWRkcmVzc0Zyb21QdWJsaWNLZXkAAAABBQAAAAtkaWdpbGlyYVBheQkAAlgAAAABCAgFAAAAAXcAAAAGc2VuZGVy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WVBbW91bnQAAAAAAAAAAAoJAAACAAAAAQIAAAALTm90IEFsbG93ZWQGCQAAAgAAAAECAAAANlVuZm9ydHVuYXRlbHkgeW91IGNhbiBvbmx5IHVzZSB0aGlzIHRva2VuIGZvciBwYXltZW50cwYGAwMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAFT3JkZXIGAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABBMZWFzZVRyYW5zYWN0aW9uBgkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAA9CdXJuVHJhbnNhY3Rpb24EAAAAAXgFAAAAByRtYXRjaDAHAwMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAPRGF0YVRyYW5zYWN0aW9uBgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATRXhjaGFuZ2VUcmFuc2FjdGlvbgYJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAAAAAXQFAAAAByRtYXRjaDAJAAH0AAAAAwgFAAAAAXQAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAF0AAAABnByb29mcwAAAAAAAAAAAQUAAAALZGlnaWxpcmFQYXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAF01hc3NUcmFuc2ZlclRyYW5zYWN0aW9uBAAAAANtdHQFAAAAByRtYXRjaDAHBnQRN08=", "height": 1339868, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4QRSnBoaokaYKkT2xcWxjpymKnpH7E9X14NU9rkD2rMf Next: 4A3mPmxGpPM2FfezY8AVdv7mSMrTkHwzBn2Na7umy6rM Diff:
Old | New | Differences | |
---|---|---|---|
1 | - | {-# STDLIB_VERSION | |
1 | + | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# CONTENT_TYPE EXPRESSION #-} | |
3 | 3 | let digiliraPay = base58'57EFni8M1XesEurFh3c4jnpLExP2PCPd5TRrwMjePAT4' | |
4 | 4 | let sponsorToken = base58'7GnHzTaDe3YbDiCD9rueHiSfPB7hdanPpN4Ab79fJGtD' | |
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 | - | let asset = | |
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)) | |
19 | 19 | then if (isDefined(isAsset)) | |
20 | 20 | then if ((isAsset == banned)) | |
21 | 21 | then throw("Can not transfer this asset") | |
22 | - | else if (( | |
22 | + | else if ((valueOrElse(isAsset, 0) >= valueOrElse(isUser, banned))) | |
23 | 23 | then true | |
24 | - | else | |
24 | + | else true | |
25 | 25 | else throw(toBase58String(asset)) | |
26 | 26 | else if ((feeToken == paymentToken)) | |
27 | 27 | then throw("cant use payment token") | |
28 | 28 | else if (isDefined(isAsset)) | |
29 | 29 | then if ((isAsset == banned)) | |
30 | 30 | then throw("Can not transfer this asset") | |
31 | - | else if (( | |
31 | + | else if ((valueOrElse(isAsset, 0) >= valueOrElse(isUser, banned))) | |
32 | 32 | then true | |
33 | 33 | else throw("This asset has special requirements") | |
34 | 34 | else true | |
35 | 35 | else if (isDefined(isAsset)) | |
36 | 36 | then if ((isAsset == banned)) | |
37 | 37 | then throw("Can not transfer this asset") | |
38 | - | else if (( | |
38 | + | else if ((valueOrElse(isAsset, 0) >= valueOrElse(isUser, banned))) | |
39 | 39 | then true | |
40 | 40 | else throw("This asset has special requirements") | |
41 | 41 | else true |
Old | New | Differences | |
---|---|---|---|
1 | - | {-# STDLIB_VERSION | |
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 | - | let asset = | |
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 | - | else if (( | |
22 | + | else if ((valueOrElse(isAsset, 0) >= valueOrElse(isUser, banned))) | |
23 | 23 | then true | |
24 | - | else | |
24 | + | else true | |
25 | 25 | else throw(toBase58String(asset)) | |
26 | 26 | else if ((feeToken == paymentToken)) | |
27 | 27 | then throw("cant use payment token") | |
28 | 28 | else if (isDefined(isAsset)) | |
29 | 29 | then if ((isAsset == banned)) | |
30 | 30 | then throw("Can not transfer this asset") | |
31 | - | else if (( | |
31 | + | else if ((valueOrElse(isAsset, 0) >= valueOrElse(isUser, banned))) | |
32 | 32 | then true | |
33 | 33 | else throw("This asset has special requirements") | |
34 | 34 | else true | |
35 | 35 | else if (isDefined(isAsset)) | |
36 | 36 | then if ((isAsset == banned)) | |
37 | 37 | then throw("Can not transfer this asset") | |
38 | - | else if (( | |
38 | + | else if ((valueOrElse(isAsset, 0) >= valueOrElse(isUser, banned))) | |
39 | 39 | then true | |
40 | 40 | else throw("This asset has special requirements") | |
41 | 41 | else true | |
42 | 42 | else if (isDefined(feeToken)) | |
43 | 43 | then if ((feeToken == sponsorToken)) | |
44 | 44 | then throw("Cannot use this token for none DigiliraPay users transfers.") | |
45 | 45 | else if ((feeToken == paymentToken)) | |
46 | 46 | then if ((w.recipient == addressFromPublicKey(digiliraPay))) | |
47 | 47 | then if ((myStatus == KYCPending)) | |
48 | 48 | then throw("KYC Pending") | |
49 | 49 | else if ((myStatus == banned)) | |
50 | 50 | then throw("Account Banned") | |
51 | 51 | else if ((feeAmount > 10)) | |
52 | 52 | then throw("Not Allowed") | |
53 | 53 | else true | |
54 | 54 | else 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 33.41 ms ◑