tx · AkyAUqLriQsTR3wSh8SMJ4EiCPnT9sVbv7wZC2aRU833 3MqVkF33wRVpm1odFZ7buWunkQrB8y6KWQU: -1.00400000 Waves 2020.04.03 18:57 [938194] smart asset 3MqVkF33wRVpm1odFZ7buWunkQrB8y6KWQU > SELF 0 KARMA
{ "type": 15, "id": "AkyAUqLriQsTR3wSh8SMJ4EiCPnT9sVbv7wZC2aRU833", "fee": 100400000, "feeAssetId": null, "timestamp": 1585929389158, "version": 1, "sender": "3MqVkF33wRVpm1odFZ7buWunkQrB8y6KWQU", "senderPublicKey": "UTN6pqKeKEScSzDAsnUb11wBPCkCGr4V5NyWZB9hFHy", "proofs": [ "5sorAvMfgV6nsWRWcKRgvLtV2YuTrvz5RbbZYuDfgrkTX3FKd8yyHRfGGigBG7VSpcamQwHQebEvpHabRPvxkRXQ" ], "assetId": "BZjCBg7ZKG6VHphfkMXD2N4dneXK7Pq84zuoZ2odmcVE", "script": "base64:AwQAAAAQd2hpdGVsaXN0QWRkcmVzcwkBAAAAB0FkZHJlc3MAAAABAQAAABoBVLLimz67CUQJNoVouJYmvTIXbUaFQRQgNQQAAAAUZEFwcFdoaXRlbGlzdEFkZHJlc3MJAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVR+ZQJfWyfFbW//7FjY3Cz3zzwo/8TmrxYEAAAAC2RBcHBBZGRyZXNzCQEAAAARYWRkcmVzc0Zyb21TdHJpbmcAAAABAgAAACMzTXFWa0YzM3dSVnBtMW9kRlo3YnVXdW5rUXJCOHk2S1dRVQQAAAAJcEFkZHJlc3MxCQEAAAARYWRkcmVzc0Zyb21TdHJpbmcAAAABAgAAACMzTkNWRGFUMUFTYlJkNDJoQlN3NEVHNm9qR1ZSR3R2TWl6MQQAAAAJcEFkZHJlc3MyCQEAAAARYWRkcmVzc0Zyb21TdHJpbmcAAAABAgAAACMzTXMya1RBeGRyY1hEeHdlZGZiTmpTaTZld0dDVXF0M2hlWgQAAAAJcEFkZHJlc3MzCQEAAAARYWRkcm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AFGRBcHBXaGl0ZWxpc3RBZGRyZXNzCQACWAAAAAEICAUAAAACdHgAAAAGc2VuZGVyAAAABWJ5dGVzAwkAAAEAAAACBQAAAAckbWF0Y2gxAgAAAANJbnQEAAAABnVudXNlZAUAAAAHJG1hdGNoMQYHBAAAABZyZWNpcGllbnRBZGRyZXNzRnJvbVR4CQACWAAAAAEICQAEJAAAAAEIBQAAAAJ0eAAAAAlyZWNpcGllbnQAAAAFYnl0ZXMEAAAADmlzQWNjb3VudEFsbG93BAAAAAckbWF0Y2gxCQAEGgAAAAIFAAAAEHdoaXRlbGlzdEFkZHJlc3MFAAAAFnJlY2lwaWVudEFkZHJlc3NGcm9tVHgDCQAAAQAAAAIFAAAAByRtYXRjaDECAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMQUAAAABYQD/////////AQMJAABnAAAAAgUAAAAOaXNBY2NvdW50QWxsb3cFAAAACnZhbGlkU3RhdGUFAAAACWFsbG93U2VuZAcHSyemCw==", "chainId": 84, "height": 938194, "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 3 #-} | |
2 | + | {-# CONTENT_TYPE EXPRESSION #-} | |
3 | + | let whitelistAddress = Address(base58'3N6DwWxT82nGJUwBwd7L514r2u71gr7WhwJ') | |
4 | + | let dAppWhitelistAddress = Address(base58'3N1SPvLZgv6FMfe5WNUtnPzt3okYxcJhYnR') | |
5 | + | let dAppAddress = addressFromString("3MqVkF33wRVpm1odFZ7buWunkQrB8y6KWQU") | |
6 | + | let pAddress1 = addressFromString("3NCVDaT1ASbRd42hBSw4EG6ojGVRGtvMiz1") | |
7 | + | let pAddress2 = addressFromString("3Ms2kTAxdrcXDxwedfbNjSi6ewGCUqt3heZ") | |
8 | + | let pAddress3 = addressFromString("3N6ognm7xnQSFiownS1Df1LacJUQXvfDFLe") | |
9 | + | let pAddress4 = addressFromString("3MtVCmN9MZbWf9qxiMFoEPBrdc2fLp3SvuC") | |
10 | + | let pAddress5 = addressFromString("3MuWG8gsTK4RQBsm97sMCuUXW99JvRxwYSg") | |
11 | + | let ver = "2.0.2-testnet" | |
12 | + | let validState = 1000 | |
13 | + | match tx { | |
14 | + | case tx: BurnTransaction => | |
15 | + | (tx.sender == dAppAddress) | |
16 | + | case tx: ReissueTransaction => | |
17 | + | (tx.sender == dAppAddress) | |
18 | + | case tx: SetAssetScriptTransaction => | |
19 | + | let pKey1Signed = if (isDefined(getInteger(extract(pAddress1), toBase58String(tx.id)))) | |
20 | + | then 1 | |
21 | + | else 0 | |
22 | + | let pKey2Signed = if (isDefined(getInteger(extract(pAddress2), toBase58String(tx.id)))) | |
23 | + | then 1 | |
24 | + | else 0 | |
25 | + | let pKey3Signed = if (isDefined(getInteger(extract(pAddress3), toBase58String(tx.id)))) | |
26 | + | then 1 | |
27 | + | else 0 | |
28 | + | let pKey4Signed = if (isDefined(getInteger(extract(pAddress4), toBase58String(tx.id)))) | |
29 | + | then 1 | |
30 | + | else 0 | |
31 | + | let pKey5Signed = if (isDefined(getInteger(extract(pAddress5), toBase58String(tx.id)))) | |
32 | + | then 1 | |
33 | + | else 0 | |
34 | + | (((((pKey1Signed + pKey2Signed) + pKey3Signed) + pKey4Signed) + pKey5Signed) >= 3) | |
35 | + | case tx: InvokeScriptTransaction => | |
36 | + | match getInteger(dAppWhitelistAddress, toBase58String(addressFromRecipient(tx.dApp).bytes)) { | |
37 | + | case unused: Int => | |
38 | + | true | |
39 | + | case _ => | |
40 | + | false | |
41 | + | } | |
42 | + | case tx: TransferTransaction => | |
43 | + | let allowSend = match getInteger(dAppWhitelistAddress, toBase58String(tx.sender.bytes)) { | |
44 | + | case unused: Int => | |
45 | + | true | |
46 | + | case _ => | |
47 | + | false | |
48 | + | } | |
49 | + | let recipientAddressFromTx = toBase58String(addressFromRecipient(tx.recipient).bytes) | |
50 | + | let isAccountAllow = match getInteger(whitelistAddress, recipientAddressFromTx) { | |
51 | + | case a: Int => | |
52 | + | a | |
53 | + | case _ => | |
54 | + | -255 | |
55 | + | } | |
56 | + | if ((isAccountAllow >= validState)) | |
57 | + | then allowSend | |
58 | + | else false | |
59 | + | case _ => | |
60 | + | false | |
61 | + | } |
github/deemru/w8io/169f3d6 33.74 ms ◑