tx · 2Te1NUzKk4W7NfnDfdGbHv6Rxi8VN9hhGbfZi1i8182f

3Mrhtzv9KEtjx4mG47oxgjahHKW33oTntEV:  -1.00400000 Waves

2019.07.20 21:58 [594634] smart asset 3Mrhtzv9KEtjx4mG47oxgjahHKW33oTntEV > SELF 0.00000000 TUSD

{ "type": 15, "id": "2Te1NUzKk4W7NfnDfdGbHv6Rxi8VN9hhGbfZi1i8182f", "fee": 100400000, "feeAssetId": null, "timestamp": 1563649141465, "version": 1, "sender": "3Mrhtzv9KEtjx4mG47oxgjahHKW33oTntEV", "senderPublicKey": "DANkK8NJhJ9K7AHbve8QzKkbyvJzr5pbttLhba7d9BGm", "proofs": [ "4ZPCivEfKkM2XuVstxr1gpPh8KpKXPsPVoQfkBFhZEX6RsHZqqxF4vFw4EMDALfqS447hCQgRo4bomiAboS2ATDP" ], "assetId": "C7NpjX1zJ1JrSGw8AvpBwfwUHU44a2u6mhCjdkJgXgrT", "script": "base64:AgQAAAAObWF0Y2hlckFkZHJlc3MJAQAAABFhZGRyZXNzRnJvbVN0cmluZwAAAAECAAAAIzNNczhmU2ZBeEJMRGpLdk5WZ0FDUnpRb0JMQ3RDV3h0YXd1BAAAAA5nYXRld2F5QWRkcmVzcwkBAAAAEWFkZHJlc3NGcm9tU3RyaW5nAAAAAQIAAAAjM01yaHR6djlLRXRqeDRtRzQ3b3hnamFoSEtXMzNvVG50RVYEAAAADVdoaXRlbGlzdEFkZHIJAQAAABFhZGRyZXNzRnJvbVN0cmluZwAAAAECAAAAIzNONkR3V3hUODJuR0pVd0J3ZDdMNTE0cjJ1NzFncjdXaHdKBAAAAAp2YWxpZFN0YXRlAAAAAAAAAAPoBAAAAANWZXICAAAADTEuMS40LXRlc3RuZXQEAAAAByRtYXRjaDAFAAAAAnR4AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABdNYXNzVHJhbnNmZXJUcmFuc2FjdGlvbgQAAAACdHgFAAAAByRtYXRjaDAHAwkAAAEAAAACBQAAAAckbW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YcmCg2ZSsuK Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 2 #-}
2+{-# CONTENT_TYPE EXPRESSION #-}
3+let matcherAddress = addressFromString("3Ms8fSfAxBLDjKvNVgACRzQoBLCtCWxtawu")
4+let gatewayAddress = addressFromString("3Mrhtzv9KEtjx4mG47oxgjahHKW33oTntEV")
5+let WhitelistAddr = addressFromString("3N6DwWxT82nGJUwBwd7L514r2u71gr7WhwJ")
6+let validState = 1000
7+let Ver = "1.1.4-testnet"
8+match tx {
9+ case tx: MassTransferTransaction =>
10+ false
11+ case tx: TransferTransaction =>
12+ if (if ((tx.sender != gatewayAddress))
13+ then (tx.recipient != gatewayAddress)
14+ else false)
15+ then throw("Only transactions with a gateway are allowed")
16+ else if ((tx.sender == gatewayAddress))
17+ then true
18+ else {
19+ let white1List = toBase58String(tx.sender.bytes)
20+ let assetTxt = toBase58String(extract(tx.assetId))
21+ let white1ListAsset = ((white1List + "_") + assetTxt)
22+ let white1ListOverall = ("res_" + assetTxt)
23+ let white1ListEntry = getInteger(extract(WhitelistAddr), white1List)
24+ if (!(isDefined(white1ListEntry)))
25+ then throw("The sender's address is not in the white list")
26+ else if ((white1ListEntry != validState))
27+ then throw("Sender is not in valid state")
28+ else {
29+ let white1ListAssetEntry = getInteger(extract(WhitelistAddr), white1ListAsset)
30+ if (!(isDefined(white1ListAssetEntry)))
31+ then {
32+ let white1ListOverallEntry = getInteger(extract(WhitelistAddr), white1ListOverall)
33+ if (!(isDefined(white1ListOverallEntry)))
34+ then true
35+ else {
36+ let cur1Balance = assetBalance(tx.sender, tx.assetId)
37+ if ((extract(white1ListOverallEntry) > (cur1Balance - tx.amount)))
38+ then throw("Unable to send such amount (type=1)")
39+ else true
40+ }
41+ }
42+ else {
43+ let cur1Balance = assetBalance(tx.sender, tx.assetId)
44+ if ((extract(white1ListAssetEntry) > (cur1Balance - tx.amount)))
45+ then throw("Unable to send such amount (type=2)")
46+ else true
47+ }
48+ }
49+ }
50+ case tx: ExchangeTransaction =>
51+ if ((tx.sender != matcherAddress))
52+ then throw("Incorrect matcher address")
53+ else {
54+ let outcoming1Account = tx.buyOrder.sender
55+ let outcoming2Account = tx.sellOrder.sender
56+ let white1List = toBase58String(outcoming1Account.bytes)
57+ let white2List = toBase58String(outcoming2Account.bytes)
58+ let white1ListEntry = getInteger(extract(WhitelistAddr), toBase58String(outcoming1Account.bytes))
59+ let white2ListEntry = getInteger(extract(WhitelistAddr), toBase58String(outcoming2Account.bytes))
60+ if (!(isDefined(white1ListEntry)))
61+ then throw((("User " + white1List) + " not in white list"))
62+ else if ((white1ListEntry != validState))
63+ then throw((("User " + white1List) + " not in valid state"))
64+ else if (!(isDefined(white2ListEntry)))
65+ then throw((("User " + white2List) + " not in white list"))
66+ else if ((white2ListEntry != validState))
67+ then throw((("User " + white2List) + " not in valid state"))
68+ else true
69+ }
70+ case tx: SetAssetScriptTransaction =>
71+ let pAddress1 = addressFromString("3NCVDaT1ASbRd42hBSw4EG6ojGVRGtvMiz1")
72+ let pAddress2 = addressFromString("3Ms2kTAxdrcXDxwedfbNjSi6ewGCUqt3heZ")
73+ let pAddress3 = addressFromString("3N6ognm7xnQSFiownS1Df1LacJUQXvfDFLe")
74+ let pAddress4 = addressFromString("3MtVCmN9MZbWf9qxiMFoEPBrdc2fLp3SvuC")
75+ let pAddress5 = addressFromString("3MuWG8gsTK4RQBsm97sMCuUXW99JvRxwYSg")
76+ let pKey1Signed = if (isDefined(getInteger(extract(pAddress1), toBase58String(tx.id))))
77+ then 1
78+ else 0
79+ let pKey2Signed = if (isDefined(getInteger(extract(pAddress2), toBase58String(tx.id))))
80+ then 1
81+ else 0
82+ let pKey3Signed = if (isDefined(getInteger(extract(pAddress3), toBase58String(tx.id))))
83+ then 1
84+ else 0
85+ let pKey4Signed = if (isDefined(getInteger(extract(pAddress4), toBase58String(tx.id))))
86+ then 1
87+ else 0
88+ let pKey5Signed = if (isDefined(getInteger(extract(pAddress5), toBase58String(tx.id))))
89+ then 1
90+ else 0
91+ (((((pKey1Signed + pKey2Signed) + pKey3Signed) + pKey4Signed) + pKey5Signed) >= 3)
92+ case tx: BurnTransaction =>
93+ (tx.sender == gatewayAddress)
94+ case tx: ReissueTransaction =>
95+ (tx.sender == gatewayAddress)
96+ case _ =>
97+ false
98+}

github/deemru/w8io/169f3d6 
19.59 ms