tx · DW1TbMdpRpX5kFqkVYvzuot7psk9hKWdtv7KpRECgnEk 3MpMVcYSYXQwqXPLqaApoHCs4AxovLCWuFB: -0.01000000 Waves 2019.08.25 00:20 [645769] smart account 3MpMVcYSYXQwqXPLqaApoHCs4AxovLCWuFB > SELF 0.00000000 Waves
{ "type": 13, "id": "DW1TbMdpRpX5kFqkVYvzuot7psk9hKWdtv7KpRECgnEk", "fee": 1000000, "feeAssetId": null, "timestamp": 1566681721157, "version": 1, "sender": "3MpMVcYSYXQwqXPLqaApoHCs4AxovLCWuFB", "senderPublicKey": "6GTtpcugRBTfcYcGc7a7o4ffZVrT3soKZ5tWo6sbJ46v", "proofs": [ "4CEmVpRfVz84rc3Upcp6gSy6xSwPcWKiUeAfu9i9RciFFEbtUwBapULB6aqmd9zxXVeis5LxLDTVg7NWVfw36qf2" ], "script": "base64:AwQAAAAObWF0Y2hlckFkZHJlc3MJAQAAABFhZGRyZXNzRnJvbVN0cmluZwAAAAECAAAAIzNNczhmU2ZBeEJMRGpLdk5WZ0FDUnpRb0JMQ3RDV3h0YXd1BAAAABBtYXRjaGVyUHVibGljS2V5AQAAACBThDuRiQKq/0TcMlLglZN11ZQJlziVeFsi3R5LSjzVTwQAAAAOZ2F0ZXdheUFkZHJlc3MJAQAAABFhZGRyZXNzRnJvbVN0cmluZwAAAAECAAAAIzNNcmh0enY5S0V0ang0bUc0N294Z2phaEhLVzMzb1RudEVWBAAAABB3aGl0ZWxpc3RBZGRyZXNzCQEAAAARYWRkcmVzc0Zyb21TdHJpbmcAAAABAgAAACMzTjZEd1d4VDgybkdKVXdCd2Q3TDUxNHIydTcxZ3I3V2h3SgQAAAAUZEFwcFdoaXRlbGlzdEFkZHJlc3MJAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVR+ZQJfWyfFbW//7FjY3Cz3zzwo/8TmrxYEAAAAGmdhdGV3YXlDb250cm9sQXNzZXRBZGRyZXNzAQAAACArlS8cOI4vNzn44tXygrX9yfMnghFc7hmxCAH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0eAUAAAAHJG1hdGNoMAcDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAElJlaXNzdWVUcmFuc2FjdGlvbgQAAAACdHgFAAAAByRtYXRjaDAHAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAA9CdXJuVHJhbnNhY3Rpb24EAAAAAnR4BQAAAAckbWF0Y2gwBwMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATRXhjaGFuZ2VUcmFuc2FjdGlvbgQAAAACdHgFAAAAByRtYXRjaDAHAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABdJbnZva2VTY3JpcHRUcmFuc2FjdGlvbgQAAAACdHgFAAAAByRtYXRjaDAEAAAAByRtYXRjaDEIBQAAAAJ0eAAAAAdwYXltZW50AwkAAAEAAAACBQAAAAckbWF0Y2gxAgAAAA9BdHRhY2hlZFBheW1lbnQEAAAAAWEFAAAAByRtYXRjaDEEAAAAByRtYXRjaDIJAAQaAAAAAgUAAAAUZEFwcFdoaXRlbGlzdEFkZHJlc3MJAAJYAAAAAQgJAAQkAAAAAQgFAAAAAnR4AAAABGRBcHAAAAAFYnl0ZXMDCQAAAQAAAAIFAAAAByRtYXRjaDICAAAAA0ludAQAAAAGdW51c2VkBQAAAAckbWF0Y2gyBgcGCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleTMyFpw=", "chainId": 84, "height": 645769, "spentComplexity": 0 } View: original | compacted Prev: none Next: ERP5tY3ZgzTXJ8uTUQWiVooUo7Ed5oG9fCEVzRkdv2y7 Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 3 #-} | |
2 | + | {-# CONTENT_TYPE EXPRESSION #-} | |
3 | + | let matcherAddress = addressFromString("3Ms8fSfAxBLDjKvNVgACRzQoBLCtCWxtawu") | |
4 | + | let matcherPublicKey = base58'6d1nbhBxLCxjUyL9xXcX2VVxj2kcKiYny7VqH4FwbApv' | |
5 | + | let gatewayAddress = addressFromString("3Mrhtzv9KEtjx4mG47oxgjahHKW33oTntEV") | |
6 | + | let whitelistAddress = addressFromString("3N6DwWxT82nGJUwBwd7L514r2u71gr7WhwJ") | |
7 | + | let dAppWhitelistAddress = Address(base58'3N1SPvLZgv6FMfe5WNUtnPzt3okYxcJhYnR') | |
8 | + | let gatewayControlAssetAddress = base58'3w8UGTKzu3YvwRrvWeDuXkUVxdg1RuX1VCy6QRw86Fw4' | |
9 | + | let pAddress1 = addressFromString("3NCVDaT1ASbRd42hBSw4EG6ojGVRGtvMiz1") | |
10 | + | let pAddress2 = addressFromString("3Ms2kTAxdrcXDxwedfbNjSi6ewGCUqt3heZ") | |
11 | + | let pAddress3 = addressFromString("3N6ognm7xnQSFiownS1Df1LacJUQXvfDFLe") | |
12 | + | let pAddress4 = addressFromString("3MtVCmN9MZbWf9qxiMFoEPBrdc2fLp3SvuC") | |
13 | + | let pAddress5 = addressFromString("3MuWG8gsTK4RQBsm97sMCuUXW99JvRxwYSg") | |
14 | + | let validState = 1000 | |
15 | + | let ver = "2.0.0-testnet" | |
16 | + | match tx { | |
17 | + | case o: Order => | |
18 | + | if (sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)) | |
19 | + | then (o.matcherPublicKey == matcherPublicKey) | |
20 | + | else false | |
21 | + | case tx: TransferTransaction => | |
22 | + | if (!(sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey))) | |
23 | + | then throw("Transaction must be signed by owner") | |
24 | + | else { | |
25 | + | let userState = getInteger(extract(whitelistAddress), toBase58String(tx.sender.bytes)) | |
26 | + | if (!(isDefined(userState))) | |
27 | + | then throw("Address not in whitelist") | |
28 | + | else if ((userState != validState)) | |
29 | + | then throw("User not in valid state") | |
30 | + | else if (!(isDefined(tx.assetId))) | |
31 | + | then { | |
32 | + | let key = (toBase58String(tx.sender.bytes) + "_WAVES") | |
33 | + | let minAmount = getInteger(extract(whitelistAddress), key) | |
34 | + | if (isDefined(minAmount)) | |
35 | + | then { | |
36 | + | let curBalance = wavesBalance(extract(tx.sender)) | |
37 | + | if ((extract(minAmount) > (curBalance - tx.amount))) | |
38 | + | then throw("Unable to send such amount (type=2)") | |
39 | + | else true | |
40 | + | } | |
41 | + | else { | |
42 | + | let keyOverall = "res_WAVES" | |
43 | + | let minAmountOverall = getInteger(extract(whitelistAddress), keyOverall) | |
44 | + | if (isDefined(minAmountOverall)) | |
45 | + | then { | |
46 | + | let curBalance = wavesBalance(extract(tx.sender)) | |
47 | + | if ((extract(minAmountOverall) > (curBalance - tx.amount))) | |
48 | + | then throw("Unable to send such amount (type=1)") | |
49 | + | else true | |
50 | + | } | |
51 | + | else true | |
52 | + | } | |
53 | + | } | |
54 | + | else if ((tx.assetId == gatewayControlAssetAddress)) | |
55 | + | then (tx.recipient == gatewayAddress) | |
56 | + | else { | |
57 | + | let white1List = toBase58String(tx.sender.bytes) | |
58 | + | let assetTxt = toBase58String(extract(tx.assetId)) | |
59 | + | let white1ListAsset = ((white1List + "_") + assetTxt) | |
60 | + | let white1ListOverall = ("res_" + assetTxt) | |
61 | + | let white1ListAssetEntry = getInteger(extract(whitelistAddress), white1ListAsset) | |
62 | + | if (!(isDefined(white1ListAssetEntry))) | |
63 | + | then { | |
64 | + | let white1ListOverallEntry = getInteger(extract(whitelistAddress), white1ListOverall) | |
65 | + | if (!(isDefined(white1ListOverallEntry))) | |
66 | + | then true | |
67 | + | else { | |
68 | + | let cur1Balance = assetBalance(tx.sender, tx.assetId) | |
69 | + | if ((extract(white1ListOverallEntry) > (cur1Balance - tx.amount))) | |
70 | + | then throw("Unable to send such amount (type=1)") | |
71 | + | else true | |
72 | + | } | |
73 | + | } | |
74 | + | else { | |
75 | + | let cur1Balance = assetBalance(tx.sender, tx.assetId) | |
76 | + | if ((extract(white1ListAssetEntry) > (cur1Balance - tx.amount))) | |
77 | + | then throw("Unable to send such amount (type=2)") | |
78 | + | else true | |
79 | + | } | |
80 | + | } | |
81 | + | } | |
82 | + | case tx: SetScriptTransaction => | |
83 | + | let pKey1Signed = if (isDefined(getInteger(extract(pAddress1), toBase58String(tx.id)))) | |
84 | + | then 1 | |
85 | + | else 0 | |
86 | + | let pKey2Signed = if (isDefined(getInteger(extract(pAddress2), toBase58String(tx.id)))) | |
87 | + | then 1 | |
88 | + | else 0 | |
89 | + | let pKey3Signed = if (isDefined(getInteger(extract(pAddress3), toBase58String(tx.id)))) | |
90 | + | then 1 | |
91 | + | else 0 | |
92 | + | let pKey4Signed = if (isDefined(getInteger(extract(pAddress4), toBase58String(tx.id)))) | |
93 | + | then 1 | |
94 | + | else 0 | |
95 | + | let pKey5Signed = if (isDefined(getInteger(extract(pAddress5), toBase58String(tx.id)))) | |
96 | + | then 1 | |
97 | + | else 0 | |
98 | + | (((((pKey1Signed + pKey2Signed) + pKey3Signed) + pKey4Signed) + pKey5Signed) >= 3) | |
99 | + | case tx: LeaseTransaction => | |
100 | + | false | |
101 | + | case tx: SponsorFeeTransaction => | |
102 | + | false | |
103 | + | case tx: MassTransferTransaction => | |
104 | + | false | |
105 | + | case tx: IssueTransaction => | |
106 | + | false | |
107 | + | case tx: ReissueTransaction => | |
108 | + | false | |
109 | + | case tx: BurnTransaction => | |
110 | + | false | |
111 | + | case tx: ExchangeTransaction => | |
112 | + | false | |
113 | + | case tx: InvokeScriptTransaction => | |
114 | + | match tx.payment { | |
115 | + | case a: AttachedPayment => | |
116 | + | match getInteger(dAppWhitelistAddress, toBase58String(addressFromRecipient(tx.dApp).bytes)) { | |
117 | + | case unused: Int => | |
118 | + | true | |
119 | + | case _ => | |
120 | + | false | |
121 | + | } | |
122 | + | case _ => | |
123 | + | true | |
124 | + | } | |
125 | + | case _ => | |
126 | + | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
127 | + | } |
github/deemru/w8io/026f985 22.11 ms ◑