tx · C94QWUQWHN3ZGTSug4Fzx8V858V6nZC4QkhKU5qgjQUP 3N4EFimhkN5F5mh7kUkL9tuTFRxMa4kmvpN: -0.01400000 Waves 2020.08.07 18:19 [1122179] smart account 3N4EFimhkN5F5mh7kUkL9tuTFRxMa4kmvpN > SELF 0.00000000 Waves
{ "type": 13, "id": "C94QWUQWHN3ZGTSug4Fzx8V858V6nZC4QkhKU5qgjQUP", "fee": 1400000, "feeAssetId": null, "timestamp": 1596812736378, "version": 1, "sender": "3N4EFimhkN5F5mh7kUkL9tuTFRxMa4kmvpN", "senderPublicKey": "GFK7PYB6cXjs4wEDvwEwkzcx1NxSS7QwXSxy7JmaBcXk", "proofs": [], "script": "base64:AwQAAAALYWRkcmVzc0Jvb2sJAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVRWgdR5NBM7vuJoxo7QLI34uXJ2wFdvAd4EAAAAE3doaXRlbGlzdEFkZHJlc3NLZXkCAAAAEHdoaXRlbGlzdEFkZHJlc3MEAAAAF2RBcHBXaGl0ZWxpc3RBZGRyZXNzS2V5AgAAABRkQXBwV2hpdGVsaXN0QWRkcmVzcwQAAAARbWF0Y2hlckFkZHJlc3NLZXkCAAAADm1hdGNoZXJBZGRyZXNzBAAAABFnYXRld2F5QWRkcmVzc0tleQIAAAAOZ2F0ZXdheUFkZHJlc3MEAAAAFmdhdGV3YXlDb250cm9sQXNzZXRLZXkCAAAAE2dhdGV3YXlDb250cm9sQXNzZXQEAAAACnZhbGlkU3RhdGUAAAAAAAAAA+gEAAAAA3ZlcgIAAAAFNS4wLjIKAQAAABJnZXRBZGRyZXNzRnJvbUJvb2sAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAthZGRyZXNzQm9vawUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWEFAAAAByRtYXRjaDAJAQAAAAdBZGRyZXNzAAAAAQkAAlkAAAABBQAAAAFhCQAAAgAAAAECAAAABm5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W52b2tlU2NyaXB0VHJhbnNhY3Rpb24EAAAAAnR4BQAAAAckbWF0Y2gwBAAAAAckbWF0Y2gxCAUAAAACdHgAAAAHcGF5bWVudAMJAAABAAAAAgUAAAAHJG1hdGNoMQIAAAAPQXR0YWNoZWRQYXltZW50BAAAAAFhBQAAAAckbWF0Y2gxBAAAAAckbWF0Y2gyCQAEGgAAAAIJAQAAABJnZXRBZGRyZXNzRnJvbUJvb2sAAAABBQAAABdkQXBwV2hpdGVsaXN0QWRkcmVzc0tleQkAAlgAAAABCAkABCQAAAABCAUAAAACdHgAAAAEZEFwcAAAAAVieXRlcwMJAAABAAAAAgUAAAAHJG1hdGNoMgIAAAADSW50BAAAAAZ1bnVzZWQFAAAAByRtYXRjaDIGBwYJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5RO9o2w==", "chainId": 84, "height": 1122179, "spentComplexity": 0 } View: original | compacted Prev: DzLVqZqDXv4ySHYLAbMLAFF8SPkfpadHPr9MWZNQLk4a Next: BYtvQTtxgeJjtiSmZ3EE71Uf8wKUmhBKdjFGRffkvqPi Diff:
Old | New | Differences | |
---|---|---|---|
7 | 7 | let gatewayAddressKey = "gatewayAddress" | |
8 | 8 | let gatewayControlAssetKey = "gatewayControlAsset" | |
9 | 9 | let validState = 1000 | |
10 | - | let ver = "5.0. | |
10 | + | let ver = "5.0.2" | |
11 | 11 | func getAddressFromBook (key) = match getString(addressBook, key) { | |
12 | 12 | case a: String => | |
13 | 13 | Address(fromBase58String(a)) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# CONTENT_TYPE EXPRESSION #-} | |
3 | 3 | let addressBook = Address(base58'3MwoVRAPfC2NKuuYJKHVAVtUFhq8MyTEfQh') | |
4 | 4 | let whitelistAddressKey = "whitelistAddress" | |
5 | 5 | let dAppWhitelistAddressKey = "dAppWhitelistAddress" | |
6 | 6 | let matcherAddressKey = "matcherAddress" | |
7 | 7 | let gatewayAddressKey = "gatewayAddress" | |
8 | 8 | let gatewayControlAssetKey = "gatewayControlAsset" | |
9 | 9 | let validState = 1000 | |
10 | - | let ver = "5.0. | |
10 | + | let ver = "5.0.2" | |
11 | 11 | func getAddressFromBook (key) = match getString(addressBook, key) { | |
12 | 12 | case a: String => | |
13 | 13 | Address(fromBase58String(a)) | |
14 | 14 | case _ => | |
15 | 15 | throw("no key") | |
16 | 16 | } | |
17 | 17 | ||
18 | 18 | func getAssetFromAddressBook () = match getString(extract(addressBook), gatewayControlAssetKey) { | |
19 | 19 | case a: String => | |
20 | 20 | toBytes(a) | |
21 | 21 | case _ => | |
22 | 22 | throw("no key") | |
23 | 23 | } | |
24 | 24 | ||
25 | 25 | match tx { | |
26 | 26 | case o: Order => | |
27 | 27 | if (sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)) | |
28 | 28 | then (addressFromPublicKey(o.matcherPublicKey) == getAddressFromBook(matcherAddressKey)) | |
29 | 29 | else false | |
30 | 30 | case tx: TransferTransaction => | |
31 | 31 | if (!(sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey))) | |
32 | 32 | then throw("Transaction must be signed by owner") | |
33 | 33 | else { | |
34 | 34 | let userState = getInteger(getAddressFromBook(whitelistAddressKey), toBase58String(tx.sender.bytes)) | |
35 | 35 | if (!(isDefined(userState))) | |
36 | 36 | then throw("Address not in whitelist") | |
37 | 37 | else if ((userState != validState)) | |
38 | 38 | then throw("User not in valid state") | |
39 | 39 | else if (!(isDefined(tx.assetId))) | |
40 | 40 | then { | |
41 | 41 | let key = (toBase58String(tx.sender.bytes) + "_WAVES") | |
42 | 42 | let minAmount = getInteger(getAddressFromBook(whitelistAddressKey), key) | |
43 | 43 | if (isDefined(minAmount)) | |
44 | 44 | then { | |
45 | 45 | let curBalance = wavesBalance(extract(tx.sender)) | |
46 | 46 | if ((extract(minAmount) > (curBalance - tx.amount))) | |
47 | 47 | then throw("Unable to send such amount (type=2)") | |
48 | 48 | else true | |
49 | 49 | } | |
50 | 50 | else { | |
51 | 51 | let keyOverall = "res_WAVES" | |
52 | 52 | let minAmountOverall = getInteger(getAddressFromBook(whitelistAddressKey), keyOverall) | |
53 | 53 | if (isDefined(minAmountOverall)) | |
54 | 54 | then { | |
55 | 55 | let curBalance = wavesBalance(extract(tx.sender)) | |
56 | 56 | if ((extract(minAmountOverall) > (curBalance - tx.amount))) | |
57 | 57 | then throw("Unable to send such amount (type=1)") | |
58 | 58 | else true | |
59 | 59 | } | |
60 | 60 | else true | |
61 | 61 | } | |
62 | 62 | } | |
63 | 63 | else if ((tx.assetId == getAssetFromAddressBook())) | |
64 | 64 | then (tx.recipient == getAddressFromBook(gatewayAddressKey)) | |
65 | 65 | else { | |
66 | 66 | let white1List = toBase58String(tx.sender.bytes) | |
67 | 67 | let assetTxt = toBase58String(extract(tx.assetId)) | |
68 | 68 | let white1ListAsset = ((white1List + "_") + assetTxt) | |
69 | 69 | let white1ListOverall = ("res_" + assetTxt) | |
70 | 70 | let white1ListAssetEntry = getInteger(getAddressFromBook(whitelistAddressKey), white1ListAsset) | |
71 | 71 | if (!(isDefined(white1ListAssetEntry))) | |
72 | 72 | then { | |
73 | 73 | let white1ListOverallEntry = getInteger(getAddressFromBook(whitelistAddressKey), white1ListOverall) | |
74 | 74 | if (!(isDefined(white1ListOverallEntry))) | |
75 | 75 | then true | |
76 | 76 | else { | |
77 | 77 | let cur1Balance = assetBalance(tx.sender, tx.assetId) | |
78 | 78 | if ((extract(white1ListOverallEntry) > (cur1Balance - tx.amount))) | |
79 | 79 | then throw("Unable to send such amount (type=1)") | |
80 | 80 | else true | |
81 | 81 | } | |
82 | 82 | } | |
83 | 83 | else { | |
84 | 84 | let cur1Balance = assetBalance(tx.sender, tx.assetId) | |
85 | 85 | if ((extract(white1ListAssetEntry) > (cur1Balance - tx.amount))) | |
86 | 86 | then throw("Unable to send such amount (type=2)") | |
87 | 87 | else true | |
88 | 88 | } | |
89 | 89 | } | |
90 | 90 | } | |
91 | 91 | case tx: SetScriptTransaction => | |
92 | 92 | let txId = toBase58String(tx.id) | |
93 | 93 | let pAddress1 = getAddressFromBook("pAddress1") | |
94 | 94 | let pAddress2 = getAddressFromBook("pAddress2") | |
95 | 95 | let pAddress3 = getAddressFromBook("pAddress3") | |
96 | 96 | let pAddress4 = getAddressFromBook("pAddress4") | |
97 | 97 | let pAddress5 = getAddressFromBook("pAddress5") | |
98 | 98 | let pAddress6 = getAddressFromBook("pAddress6") | |
99 | 99 | let pAddress7 = getAddressFromBook("pAddress7") | |
100 | 100 | let pAddress8 = getAddressFromBook("pAddress8") | |
101 | 101 | let pKey1Signed = if (isDefined(getInteger(pAddress1, txId))) | |
102 | 102 | then 1 | |
103 | 103 | else 0 | |
104 | 104 | let pKey2Signed = if (isDefined(getInteger(pAddress2, txId))) | |
105 | 105 | then 1 | |
106 | 106 | else 0 | |
107 | 107 | let pKey3Signed = if (isDefined(getInteger(pAddress3, txId))) | |
108 | 108 | then 1 | |
109 | 109 | else 0 | |
110 | 110 | let pKey4Signed = if (isDefined(getInteger(pAddress4, txId))) | |
111 | 111 | then 1 | |
112 | 112 | else 0 | |
113 | 113 | let pKey5Signed = if (isDefined(getInteger(pAddress5, txId))) | |
114 | 114 | then 1 | |
115 | 115 | else 0 | |
116 | 116 | let pKey6Signed = if (isDefined(getInteger(pAddress6, txId))) | |
117 | 117 | then 1 | |
118 | 118 | else 0 | |
119 | 119 | let pKey7Signed = if (isDefined(getInteger(pAddress7, txId))) | |
120 | 120 | then 1 | |
121 | 121 | else 0 | |
122 | 122 | let pKey8Signed = if (isDefined(getInteger(pAddress8, txId))) | |
123 | 123 | then 1 | |
124 | 124 | else 0 | |
125 | 125 | ((((((((pKey1Signed + pKey2Signed) + pKey3Signed) + pKey4Signed) + pKey5Signed) + pKey6Signed) + pKey7Signed) + pKey8Signed) >= 3) | |
126 | 126 | case tx: LeaseTransaction => | |
127 | 127 | false | |
128 | 128 | case tx: SponsorFeeTransaction => | |
129 | 129 | false | |
130 | 130 | case tx: MassTransferTransaction => | |
131 | 131 | false | |
132 | 132 | case tx: IssueTransaction => | |
133 | 133 | false | |
134 | 134 | case tx: ReissueTransaction => | |
135 | 135 | false | |
136 | 136 | case tx: BurnTransaction => | |
137 | 137 | false | |
138 | 138 | case tx: ExchangeTransaction => | |
139 | 139 | false | |
140 | 140 | case tx: InvokeScriptTransaction => | |
141 | 141 | match tx.payment { | |
142 | 142 | case a: AttachedPayment => | |
143 | 143 | match getInteger(getAddressFromBook(dAppWhitelistAddressKey), toBase58String(addressFromRecipient(tx.dApp).bytes)) { | |
144 | 144 | case unused: Int => | |
145 | 145 | true | |
146 | 146 | case _ => | |
147 | 147 | false | |
148 | 148 | } | |
149 | 149 | case _ => | |
150 | 150 | true | |
151 | 151 | } | |
152 | 152 | case _ => | |
153 | 153 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
154 | 154 | } |
github/deemru/w8io/026f985 64.70 ms ◑