tx · D5ACfPU2pD8u68txzcjrEATedxkXyZJTcEMxCbshGPpU

3N4Pj4MutKVgrmcuX7jgyVGWoBhDyKYFZBj:  -0.01400000 Waves

2019.10.08 13:44 [710719] smart account 3N4Pj4MutKVgrmcuX7jgyVGWoBhDyKYFZBj > SELF 0.00000000 Waves

{ "type": 13, "id": "D5ACfPU2pD8u68txzcjrEATedxkXyZJTcEMxCbshGPpU", "fee": 1400000, "feeAssetId": null, "timestamp": 1570531455426, "version": 1, "sender": "3N4Pj4MutKVgrmcuX7jgyVGWoBhDyKYFZBj", "senderPublicKey": "7YuxEiQSearE3DvFS84DXzV5gad9qxsq4bTy633SAYBj", "proofs": [ "44Z5xduJACeyY5QQjK3nLqJc8ighfCf4S6ZufWVJPUEkubr1s4W6E9MMHWYrLozfn1pbszkehA3QUcxQYs8dBvZg" ], "script": "base64:AAIDAAAAAAAAAAAAAAB3AQAAAA5nZXROdW1iZXJCeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAAAQAAAA5nZXRTdHJpbmdCeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAgAAAAABAAAADGdldEJvb2xCeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEGwAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAHQm9vbGVhbgQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQcBAAAAGGdldE51bWJlckJ5QWRkcmVzc0FuZEtleQAAAAIAAAAHYWRkcmVzcwAAAANrZXkEAAAAByRtYXRjaDAJA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AAnR4AQAAAAZ2ZXJpZnkAAAAABAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAQTGVhc2VUcmFuc2FjdGlvbgQAAAAHbGVhc2VUeAUAAAAHJG1hdGNoMAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAJAAJZAAAAAQkBAAAAGWdldE93bmVyUHViS2V5QnlMZWFzZVR4SWQAAAABCQACWAAAAAEIBQAAAAdsZWFzZVR4AAAAAmlkAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABZMZWFzZUNhbmNlbFRyYW5zYWN0aW9uBAAAAAl1bmxlYXNlVHgFAAAAByRtYXRjaDAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACQACWQAAAAEJAQAAABlnZXRPd25lclB1YktleUJ5TGVhc2VUeElkAAAAAQkAAlgAAAABCAUAAAAJdW5sZWFzZVR4AAAAB2xlYXNlSWQJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5F4Gytw==", "chainId": 84, "height": 710719, "spentComplexity": 0 } View: original | compacted Prev: J28N8ukZMQ82gAEvaPjJiVtKJT5RMr96uCTGFoYY6dMx Next: 44YpwBoTQpDScBqHTXBfTsNjjdmYNksj3S9hwvje94Mk Diff:
OldNewDifferences
3333 }
3434
3535
36+func getStringByAddressAndKey (address,key) = match getString(this, key) {
37+ case a: String =>
38+ a
39+ case _ =>
40+ ""
41+}
42+
43+
3644 let LISTSPLITSYMBOL = "_"
3745
3846 let LISTDATASYMBOL = "+"
3947
4048 let WAVELET = 100000000
49+
50+let CENTSINDOLLAR = 100
4151
4252 let CANCELED = "canceled"
4353
5767
5868 let VoteIntervalKey = "vote_interval"
5969
60-let MinSwapAmountKey = "min_swap_amount"
70+let MinWavesSwapAmountKey = "min_waves_swap_amount"
71+
72+let MinNeutrinoSwapAmountKey = "min_neutrino_swap_amount"
6173
6274 let PriceOffsetKey = "price_offset"
6375
111123
112124 let BlockExpireProvidingKey = "providing_expire_block"
113125
126+let ApprovedLeaseTxKey = "leasetx"
127+
128+let IsLeasingProfitTxExistKey = "is_leasing_profit"
129+
114130 func getAdminKey (count) = (AdminKey + toString(count))
115131
116132
153169 func getPriceHistoryKey (block) = ((PriceKey + "_") + toString(block))
154170
155171
172+func getOwnerPubKeyByLeaseTxIdKey (txId) = ((ApprovedLeaseTxKey + "_") + txId)
173+
174+
175+func getIsLeasingProfitTxExistKey (txId) = ((IsLeasingProfitTxExistKey + "_") + txId)
176+
177+
156178 func getOrderTotalKey (orderId) = (OrderTotalKey + orderId)
157179
158180
170192
171193 let price = getNumberByKey(PriceKey)
172194
173-func convertNeutrinoToWaves (amount) = ((amount * 100) / price)
195+func convertNeutrinoToWaves (amount) = ((((amount * 100) / price) * WAVELET) / CENTSINDOLLAR)
174196
175197
176-func convertWavesToNeutrino (amount) = ((amount * price) / 100)
198+func convertWavesToNeutrino (amount) = ((((amount * price) / 100) * CENTSINDOLLAR) / WAVELET)
177199
178200
179-func convertNeutrinoToBond (amount) = (amount / WAVELET)
201+func convertNeutrinoToBond (amount) = (amount / CENTSINDOLLAR)
180202
181203
182-func convertBondToNeutrino (amount) = (amount * WAVELET)
204+func convertBondToNeutrino (amount) = (amount * CENTSINDOLLAR)
183205
184206
185207 func convertWavesToBond (amount) = convertNeutrinoToBond(convertWavesToNeutrino(amount))
203225
204226 let isBlocked = getBoolByKey(IsBlockedKey)
205227
206-let minSwapAmount = getNumberByKey(MinSwapAmountKey)
228+let minWavesSwapAmount = getNumberByKey(MinWavesSwapAmountKey)
229+
230+let minNeutrinoSwapAmount = getNumberByKey(MinNeutrinoSwapAmountKey)
207231
208232 let neutrinoAssetId = fromBase58String(getStringByKey(NeutrinoAssetIdKey))
209233
241265
242266 let adminThree = getStringByKey(getAdminKey(2))
243267
268+func getOwnerPubKeyByLeaseTxId (owner) = getStringByAddressAndKey(rpdContract, getOwnerPubKeyByLeaseTxIdKey(owner))
269+
270+
244271 func getRPDContractBalance (assetId) = getNumberByAddressAndKey(rpdContract, getRPDContractBalanceKey(assetId))
272+
273+
274+func isLeasingProfitTxExist (txId) = getBoolByKey(getIsLeasingProfitTxExistKey(txId))
245275
246276
247277 func getAdminVoteInt (owner) = if (getBoolByKey(getAdminVoteKey(owner)))
433463 @Callable(i)
434464 func swapWavesToNeutrino () = {
435465 let pmt = extract(i.payment)
436- if ((minSwapAmount > pmt.amount))
466+ if ((minWavesSwapAmount > pmt.amount))
437467 then throw("amount less min")
438468 else if (isDefined(pmt.assetId))
439469 then throw("can use waves only")
450480 @Callable(i)
451481 func swapNeutrinoToWaves () = {
452482 let pmt = extract(i.payment)
453- if ((minSwapAmount > pmt.amount))
483+ if ((minNeutrinoSwapAmount > pmt.amount))
454484 then throw("amount less min")
455485 else if (isBlocked)
456486 then throw("contract is blocked")
511541
512542
513543 @Callable(i)
544+func addLeasingCheck (id) = {
545+ let tx = value(transferTransactionById(fromBase58String(id)))
546+ if (if ((tx.recipient != addressFromStringValue(rpdContract)))
547+ then true
548+ else isLeasingProfitTxExist(id))
549+ then throw("invalid transaction id")
550+ else {
551+ let amount = convertWavesToNeutrino(tx.amount)
552+ let newRpdSyncIndex = (rpdSyncIndex + 1)
553+ ScriptResult(WriteSet([DataEntry(RPDSyncIndexKey, newRpdSyncIndex), DataEntry(getRPDProfitKey(rpdSyncIndex), amount), DataEntry(getRPDSnapshotContractBalanceKey(rpdSyncIndex, neutrinoAssetId), getRPDContractBalance(neutrinoAssetId)), DataEntry(getRPDSnapshotContractBalanceKey(rpdSyncIndex, bondAssetId), getRPDContractBalance(bondAssetId)), DataEntry(getIsLeasingProfitTxExistKey(id), true)]), TransferSet([ScriptTransfer(addressFromStringValue(rpdContract), amount, neutrinoAssetId)]))
554+ }
555+ }
556+
557+
558+
559+@Callable(i)
514560 func executeOrder () = {
515561 let orderId = split(orderbook, LISTSPLITSYMBOL)[0]
516562 let orderTotal = getOrderTotal(orderId)
539585 }
540586
541587
588+
589+@Callable(i)
590+func transfer (account) = {
591+ let pmt = extract(i.payment)
592+ if (isDefined(pmt.assetId))
593+ then throw("can use waves only at the moment")
594+ else TransferSet([ScriptTransfer(addressFromStringValue(account), pmt.amount, unit)])
595+ }
596+
597+
598+@Verifier(tx)
599+func verify () = match tx {
600+ case leaseTx: LeaseTransaction =>
601+ sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(getOwnerPubKeyByLeaseTxId(toBase58String(leaseTx.id))))
602+ case unleaseTx: LeaseCancelTransaction =>
603+ sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(getOwnerPubKeyByLeaseTxId(toBase58String(unleaseTx.leaseId))))
604+ case _ =>
605+ sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
606+}
607+
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func getNumberByKey (key) = match getInteger(this, key) {
55 case a: Int =>
66 a
77 case _ =>
88 0
99 }
1010
1111
1212 func getStringByKey (key) = match getString(this, key) {
1313 case a: String =>
1414 a
1515 case _ =>
1616 ""
1717 }
1818
1919
2020 func getBoolByKey (key) = match getBoolean(this, key) {
2121 case a: Boolean =>
2222 a
2323 case _ =>
2424 false
2525 }
2626
2727
2828 func getNumberByAddressAndKey (address,key) = match getInteger(addressFromStringValue(address), key) {
2929 case a: Int =>
3030 a
3131 case _ =>
3232 0
3333 }
3434
3535
36+func getStringByAddressAndKey (address,key) = match getString(this, key) {
37+ case a: String =>
38+ a
39+ case _ =>
40+ ""
41+}
42+
43+
3644 let LISTSPLITSYMBOL = "_"
3745
3846 let LISTDATASYMBOL = "+"
3947
4048 let WAVELET = 100000000
49+
50+let CENTSINDOLLAR = 100
4151
4252 let CANCELED = "canceled"
4353
4454 let NEW = "new"
4555
4656 let FILLED = "filled"
4757
4858 let NeutrinoAssetIdKey = "neutrino_asset_id"
4959
5060 let BondAssetIdKey = "bond_asset_id"
5161
5262 let AuctionContractKey = "auction_contract"
5363
5464 let RPDContractKey = "rpd_contract"
5565
5666 let BalanceLockIntervalKey = "balance_lock_interval"
5767
5868 let VoteIntervalKey = "vote_interval"
5969
60-let MinSwapAmountKey = "min_swap_amount"
70+let MinWavesSwapAmountKey = "min_waves_swap_amount"
71+
72+let MinNeutrinoSwapAmountKey = "min_neutrino_swap_amount"
6173
6274 let PriceOffsetKey = "price_offset"
6375
6476 let ProvidingIntervalKey = "providing_interval"
6577
6678 let PriceKey = "price"
6779
6880 let NeutrinoBalanceKey = "neutrino_"
6981
7082 let WavesBalanceKey = "waves_"
7183
7284 let BalanceUnlockBlockKey = "balance_block_"
7385
7486 let OrderbookKey = "orderbook"
7587
7688 let OrderTotalKey = "order_total_"
7789
7890 let OrderOwnerKey = "order_owner_"
7991
8092 let OrderHeightKey = "order_height_"
8193
8294 let OrderFilledTotalKey = "order_filled_total_"
8395
8496 let OrderStatusKey = "order_status_"
8597
8698 let RPDSyncIndexKey = "rpd_sync_index"
8799
88100 let RPDProfitKey = "rpd_profit"
89101
90102 let RPDBalanceKey = "rpd_balance"
91103
92104 let IsBlockedKey = "is_blocked"
93105
94106 let BlackSwarmPriceKey = "black_swarm_price"
95107
96108 let AdminVoteKey = "admin_vote_"
97109
98110 let AdminVotePriceKey = "admin_vote_price_"
99111
100112 let BlockExpireVoteKey = "vote_expire_block"
101113
102114 let AdminKey = "admin_"
103115
104116 let IsPricePendingKey = "is_pending_price"
105117
106118 let OracleKey = "oracle_"
107119
108120 let OracleIsProvideKey = "oracle_is_provide_"
109121
110122 let OracleProvidePriceKey = "oracle_price_provide_"
111123
112124 let BlockExpireProvidingKey = "providing_expire_block"
113125
126+let ApprovedLeaseTxKey = "leasetx"
127+
128+let IsLeasingProfitTxExistKey = "is_leasing_profit"
129+
114130 func getAdminKey (count) = (AdminKey + toString(count))
115131
116132
117133 func getAdminVoteKey (owner) = (AdminVoteKey + owner)
118134
119135
120136 func getAdminVotePriceKey (owner) = (AdminVotePriceKey + owner)
121137
122138
123139 func getOracleKey (count) = (OracleKey + toString(count))
124140
125141
126142 func getOracleIsProvideKey (owner) = (OracleIsProvideKey + owner)
127143
128144
129145 func getOracleProvidePriceKey (owner) = (OracleProvidePriceKey + owner)
130146
131147
132148 func getRPDSnapshotContractBalanceKey (count,assetId) = ((((RPDBalanceKey + "_") + toBase58String(assetId)) + "_") + toString(count))
133149
134150
135151 func getRPDContractBalanceKey (assetId) = ((RPDBalanceKey + "_") + toBase58String(assetId))
136152
137153
138154 func getRPDProfitKey (count) = ((RPDProfitKey + "_") + toString(count))
139155
140156
141157 func getNeutrinoBalanceKey (owner) = (NeutrinoBalanceKey + owner)
142158
143159
144160 func getWavesBalanceKey (owner) = (WavesBalanceKey + owner)
145161
146162
147163 func getBalanceUnlockBlockKey (owner) = (BalanceUnlockBlockKey + owner)
148164
149165
150166 func getBlackSwarmPriceKey (block) = ((BlackSwarmPriceKey + "_") + toString(block))
151167
152168
153169 func getPriceHistoryKey (block) = ((PriceKey + "_") + toString(block))
154170
155171
172+func getOwnerPubKeyByLeaseTxIdKey (txId) = ((ApprovedLeaseTxKey + "_") + txId)
173+
174+
175+func getIsLeasingProfitTxExistKey (txId) = ((IsLeasingProfitTxExistKey + "_") + txId)
176+
177+
156178 func getOrderTotalKey (orderId) = (OrderTotalKey + orderId)
157179
158180
159181 func getOrderOwnerKey (orderId) = (OrderOwnerKey + orderId)
160182
161183
162184 func getOrderHeightKey (orderId) = (OrderHeightKey + orderId)
163185
164186
165187 func getOrderStatusKey (orderId) = (OrderStatusKey + orderId)
166188
167189
168190 func getOrderFilledTotalKey (orderId) = (OrderFilledTotalKey + orderId)
169191
170192
171193 let price = getNumberByKey(PriceKey)
172194
173-func convertNeutrinoToWaves (amount) = ((amount * 100) / price)
195+func convertNeutrinoToWaves (amount) = ((((amount * 100) / price) * WAVELET) / CENTSINDOLLAR)
174196
175197
176-func convertWavesToNeutrino (amount) = ((amount * price) / 100)
198+func convertWavesToNeutrino (amount) = ((((amount * price) / 100) * CENTSINDOLLAR) / WAVELET)
177199
178200
179-func convertNeutrinoToBond (amount) = (amount / WAVELET)
201+func convertNeutrinoToBond (amount) = (amount / CENTSINDOLLAR)
180202
181203
182-func convertBondToNeutrino (amount) = (amount * WAVELET)
204+func convertBondToNeutrino (amount) = (amount * CENTSINDOLLAR)
183205
184206
185207 func convertWavesToBond (amount) = convertNeutrinoToBond(convertWavesToNeutrino(amount))
186208
187209
188210 let providingInterval = getNumberByKey(ProvidingIntervalKey)
189211
190212 let blockExpireProviding = getNumberByKey(BlockExpireProvidingKey)
191213
192214 let isPricePending = getBoolByKey(IsPricePendingKey)
193215
194216 let percentPriceOffset = getNumberByKey(PriceOffsetKey)
195217
196218 let rpdSyncIndex = getNumberByKey(RPDSyncIndexKey)
197219
198220 let voteInterval = getNumberByKey(VoteIntervalKey)
199221
200222 let blockExpireVote = getNumberByKey(BlockExpireVoteKey)
201223
202224 let balanceLockInterval = getNumberByKey(BalanceLockIntervalKey)
203225
204226 let isBlocked = getBoolByKey(IsBlockedKey)
205227
206-let minSwapAmount = getNumberByKey(MinSwapAmountKey)
228+let minWavesSwapAmount = getNumberByKey(MinWavesSwapAmountKey)
229+
230+let minNeutrinoSwapAmount = getNumberByKey(MinNeutrinoSwapAmountKey)
207231
208232 let neutrinoAssetId = fromBase58String(getStringByKey(NeutrinoAssetIdKey))
209233
210234 let auctionContract = getStringByKey(AuctionContractKey)
211235
212236 let rpdContract = getStringByKey(RPDContractKey)
213237
214238 let reserve = wavesBalance(this)
215239
216240 let orderbook = getStringByKey(OrderbookKey)
217241
218242 let bondAssetId = fromBase58String(getStringByKey(BondAssetIdKey))
219243
220244 let bondSupply = {
221245 let info = extract(assetInfo(bondAssetId))
222246 (info.quantity - assetBalance(this, bondAssetId))
223247 }
224248
225249 let neutrinoSupply = {
226250 let info = extract(assetInfo(neutrinoAssetId))
227251 (info.quantity - assetBalance(this, neutrinoAssetId))
228252 }
229253
230254 let surplus = (convertWavesToNeutrino(reserve) - neutrinoSupply)
231255
232256 let oracleOne = getStringByKey(getOracleKey(0))
233257
234258 let oracleTwo = getStringByKey(getOracleKey(1))
235259
236260 let oracleThree = getStringByKey(getOracleKey(2))
237261
238262 let adminOne = getStringByKey(getAdminKey(0))
239263
240264 let adminTwo = getStringByKey(getAdminKey(1))
241265
242266 let adminThree = getStringByKey(getAdminKey(2))
243267
268+func getOwnerPubKeyByLeaseTxId (owner) = getStringByAddressAndKey(rpdContract, getOwnerPubKeyByLeaseTxIdKey(owner))
269+
270+
244271 func getRPDContractBalance (assetId) = getNumberByAddressAndKey(rpdContract, getRPDContractBalanceKey(assetId))
272+
273+
274+func isLeasingProfitTxExist (txId) = getBoolByKey(getIsLeasingProfitTxExistKey(txId))
245275
246276
247277 func getAdminVoteInt (owner) = if (getBoolByKey(getAdminVoteKey(owner)))
248278 then 1
249279 else 0
250280
251281
252282 func getAdminVotePrice (owner) = getNumberByKey(getAdminVotePriceKey(owner))
253283
254284
255285 func isOracleProvide (owner) = getBoolByKey(getOracleIsProvideKey(owner))
256286
257287
258288 func isOracleProvideInt (owner) = if (isOracleProvide(owner))
259289 then 1
260290 else 0
261291
262292
263293 func getOracleProvidePrice (owner) = getNumberByKey(getOracleProvidePriceKey(owner))
264294
265295
266296 func getWavesBalance (owner) = getNumberByKey(getWavesBalanceKey(owner))
267297
268298
269299 func getNeutrinoBalance (owner) = getNumberByKey(getNeutrinoBalanceKey(owner))
270300
271301
272302 func getUnlockBalanceBlock (owner) = getNumberByKey(getBalanceUnlockBlockKey(owner))
273303
274304
275305 func getOrderTotal (id) = getNumberByKey(getOrderTotalKey(id))
276306
277307
278308 func getOrderOwner (id) = getStringByKey(getOrderOwnerKey(id))
279309
280310
281311 func getOrderFilledTotal (id) = getNumberByKey(getOrderFilledTotalKey(id))
282312
283313
284314 func getRPDProfit (count) = getNumberByKey(getRPDProfitKey(count))
285315
286316
287317 func getOrderElementById (id) = (id + LISTSPLITSYMBOL)
288318
289319
290320 func addOrder (orderId) = (orderbook + getOrderElementById(orderId))
291321
292322
293323 func dropOrder (orderId) = {
294324 let parts = split(orderbook, getOrderElementById(orderId))
295325 (parts[0] + parts[1])
296326 }
297327
298328
299329 @Callable(i)
300330 func setCurrentPrice (newPrice) = {
301331 let account = toString(i.caller)
302332 let priceProvidingCount = (((isOracleProvideInt(oracleOne) + isOracleProvideInt(oracleTwo)) + isOracleProvideInt(oracleThree)) + 1)
303333 if (isBlocked)
304334 then throw("contract is blocked")
305335 else if (if (if ((account != oracleOne))
306336 then (account != oracleTwo)
307337 else false)
308338 then (account != oracleThree)
309339 else false)
310340 then throw("permission denied")
311341 else if (if ((blockExpireProviding >= height))
312342 then isOracleProvide(account)
313343 else false)
314344 then throw("price is already provided")
315345 else if (if ((height > blockExpireProviding))
316346 then isPricePending
317347 else false)
318348 then throw("use finilizeCurrentPrice")
319349 else WriteSet([DataEntry(getOracleProvidePriceKey(account), newPrice), DataEntry(BlockExpireProvidingKey, if ((height > blockExpireProviding))
320350 then (height + providingInterval)
321351 else blockExpireProviding), DataEntry(getOracleIsProvideKey(oracleOne), if ((height > blockExpireProviding))
322352 then false
323353 else isOracleProvide(oracleOne)), DataEntry(getOracleIsProvideKey(oracleTwo), if ((height > blockExpireProviding))
324354 then false
325355 else isOracleProvide(oracleTwo)), DataEntry(getOracleIsProvideKey(oracleThree), if ((height > blockExpireProviding))
326356 then false
327357 else isOracleProvide(oracleThree)), DataEntry(getOracleIsProvideKey(account), true), DataEntry(IsPricePendingKey, if (if ((blockExpireProviding >= height))
328358 then (priceProvidingCount >= 2)
329359 else false)
330360 then true
331361 else isPricePending)])
332362 }
333363
334364
335365
336366 @Callable(i)
337367 func finilizeCurrentPrice () = {
338368 let account = toString(i.caller)
339369 let priceProvidingCount = ((isOracleProvideInt(oracleOne) + isOracleProvideInt(oracleTwo)) + isOracleProvideInt(oracleThree))
340370 let newPrice = ((((getOracleProvidePrice(oracleOne) * isOracleProvideInt(oracleOne)) + (getOracleProvidePrice(oracleTwo) * isOracleProvideInt(oracleTwo))) + (getOracleProvidePrice(oracleThree) * isOracleProvideInt(oracleThree))) / priceProvidingCount)
341371 if (isBlocked)
342372 then throw("contract is blocked")
343373 else if (if (if ((account != oracleOne))
344374 then (account != oracleTwo)
345375 else false)
346376 then (account != oracleThree)
347377 else false)
348378 then throw("permission denied")
349379 else if (if (!(isPricePending))
350380 then true
351381 else (blockExpireProviding >= height))
352382 then throw("wait for the end of the price providing")
353383 else if ((2 > priceProvidingCount))
354384 then throw("2/3 oracles need to set a price")
355385 else if (if ((newPrice >= (price + ((price * percentPriceOffset) / 100))))
356386 then true
357387 else ((price - ((price * percentPriceOffset) / 100)) >= newPrice))
358388 then WriteSet([DataEntry(IsBlockedKey, true), DataEntry(getBlackSwarmPriceKey(height), newPrice)])
359389 else WriteSet([DataEntry(PriceKey, newPrice), DataEntry(getPriceHistoryKey(height), newPrice), DataEntry(IsPricePendingKey, false)])
360390 }
361391
362392
363393
364394 @Callable(i)
365395 func adminUnlock (newPrice) = {
366396 let account = toString(i.caller)
367397 let adminOneVote = if ((account != adminOne))
368398 then getAdminVoteInt(adminOne)
369399 else 0
370400 let adminTwoVote = if ((account != adminTwo))
371401 then getAdminVoteInt(adminTwo)
372402 else 0
373403 let adminThreeVote = if ((account != adminThree))
374404 then getAdminVoteInt(adminThree)
375405 else 0
376406 let adminOnePrice = if (((getAdminVotePrice(adminOne) * adminOneVote) == newPrice))
377407 then 1
378408 else 0
379409 let adminTwoPrice = if (((getAdminVotePrice(adminTwo) * adminTwoVote) == newPrice))
380410 then 1
381411 else 0
382412 let adminThreePrice = if (((getAdminVotePrice(adminThree) * adminThreeVote) == newPrice))
383413 then 1
384414 else 0
385415 if (!(isBlocked))
386416 then throw("Contract is not blocked")
387417 else if (if (((((adminOnePrice + adminTwoPrice) + adminThreePrice) + 1) >= 2))
388418 then (blockExpireVote >= height)
389419 else false)
390420 then WriteSet([DataEntry(IsBlockedKey, false), DataEntry(PriceKey, newPrice), DataEntry(getPriceHistoryKey(height), newPrice), DataEntry(getAdminVoteKey(adminOne), false), DataEntry(getAdminVoteKey(adminTwo), false), DataEntry(getAdminVoteKey(adminThree), false), DataEntry(BlockExpireVoteKey, 0), DataEntry(BlockExpireProvidingKey, 0), DataEntry(IsPricePendingKey, false)])
391421 else WriteSet([DataEntry(getAdminVotePriceKey(account), newPrice), DataEntry(BlockExpireVoteKey, if ((height > blockExpireVote))
392422 then (height + voteInterval)
393423 else blockExpireVote), DataEntry(getAdminVoteKey(adminOne), if ((height > blockExpireVote))
394424 then false
395425 else (adminOneVote == 1)), DataEntry(getAdminVoteKey(adminTwo), if ((height > blockExpireVote))
396426 then false
397427 else (adminTwoVote == 1)), DataEntry(getAdminVoteKey(adminThree), if ((height > blockExpireVote))
398428 then false
399429 else (adminThreeVote == 1)), DataEntry(getAdminVoteKey(account), true)])
400430 }
401431
402432
403433
404434 @Callable(i)
405435 func adminLock () = {
406436 let account = toString(i.caller)
407437 let adminOneVote = if ((account != adminOne))
408438 then getAdminVoteInt(adminOne)
409439 else 1
410440 let adminTwoVote = if ((account != adminTwo))
411441 then getAdminVoteInt(adminTwo)
412442 else 1
413443 let adminThreeVote = if ((account != adminThree))
414444 then getAdminVoteInt(adminThree)
415445 else 1
416446 if (isBlocked)
417447 then throw("Contract is blocked")
418448 else if ((((adminOneVote + adminTwoVote) + adminThreeVote) >= 2))
419449 then WriteSet([DataEntry(IsBlockedKey, true), DataEntry(getAdminVoteKey(adminOne), false), DataEntry(getAdminVoteKey(adminTwo), false), DataEntry(getAdminVoteKey(adminThree), false), DataEntry(BlockExpireVoteKey, 0)])
420450 else WriteSet([DataEntry(BlockExpireVoteKey, if ((height > blockExpireVote))
421451 then (height + voteInterval)
422452 else blockExpireVote), DataEntry(getAdminVoteKey(adminOne), if ((height > blockExpireVote))
423453 then false
424454 else (adminOneVote == 1)), DataEntry(getAdminVoteKey(adminTwo), if ((height > blockExpireVote))
425455 then false
426456 else (adminTwoVote == 1)), DataEntry(getAdminVoteKey(adminThree), if ((height > blockExpireVote))
427457 then false
428458 else (adminThreeVote == 1))])
429459 }
430460
431461
432462
433463 @Callable(i)
434464 func swapWavesToNeutrino () = {
435465 let pmt = extract(i.payment)
436- if ((minSwapAmount > pmt.amount))
466+ if ((minWavesSwapAmount > pmt.amount))
437467 then throw("amount less min")
438468 else if (isDefined(pmt.assetId))
439469 then throw("can use waves only")
440470 else if (isBlocked)
441471 then throw("contract is blocked")
442472 else {
443473 let amount = convertWavesToNeutrino(pmt.amount)
444474 TransferSet([ScriptTransfer(i.caller, amount, neutrinoAssetId)])
445475 }
446476 }
447477
448478
449479
450480 @Callable(i)
451481 func swapNeutrinoToWaves () = {
452482 let pmt = extract(i.payment)
453- if ((minSwapAmount > pmt.amount))
483+ if ((minNeutrinoSwapAmount > pmt.amount))
454484 then throw("amount less min")
455485 else if (isBlocked)
456486 then throw("contract is blocked")
457487 else if ((pmt.assetId != neutrinoAssetId))
458488 then throw("can use neutrino only")
459489 else {
460490 let account = toBase58String(i.caller.bytes)
461491 let amount = convertNeutrinoToWaves(pmt.amount)
462492 WriteSet([DataEntry(getWavesBalanceKey(account), (getWavesBalance(account) + amount)), DataEntry(getBalanceUnlockBlockKey(account), (height + balanceLockInterval))])
463493 }
464494 }
465495
466496
467497
468498 @Callable(i)
469499 func withdraw (account) = if ((getUnlockBalanceBlock(account) > height))
470500 then throw("wait a couple of blocks for withdraw")
471501 else ScriptResult(WriteSet([DataEntry(getWavesBalanceKey(account), 0), DataEntry(getNeutrinoBalanceKey(account), 0)]), TransferSet([ScriptTransfer(addressFromStringValue(account), getNeutrinoBalance(account), neutrinoAssetId), ScriptTransfer(addressFromStringValue(account), getWavesBalance(account), unit)]))
472502
473503
474504
475505 @Callable(i)
476506 func generateBond () = {
477507 let deficit = (neutrinoSupply - convertWavesToNeutrino(reserve))
478508 let balanceAuction = assetBalance(addressFromStringValue(auctionContract), bondAssetId)
479509 let amount = (convertNeutrinoToBond(deficit) - balanceAuction)
480510 if (isBlocked)
481511 then throw("contract is blocked")
482512 else if ((amount > 0))
483513 then TransferSet([ScriptTransfer(addressFromStringValue(auctionContract), amount, bondAssetId)])
484514 else throw("bond were generated or do not need it")
485515 }
486516
487517
488518
489519 @Callable(i)
490520 func setOrder () = {
491521 let pmt = extract(i.payment)
492522 let newOrderId = toBase58String(keccak256(((toBytes(pmt.amount) + i.caller.bytes) + toBytes(height))))
493523 if ((pmt.assetId != bondAssetId))
494524 then throw("can use bond only")
495525 else if ((getOrderOwner(newOrderId) != ""))
496526 then throw("order exists")
497527 else WriteSet([DataEntry(OrderbookKey, addOrder(newOrderId)), DataEntry(getOrderTotalKey(newOrderId), pmt.amount), DataEntry(getOrderOwnerKey(newOrderId), toString(i.caller)), DataEntry(getOrderHeightKey(newOrderId), height), DataEntry(getOrderStatusKey(newOrderId), NEW)])
498528 }
499529
500530
501531
502532 @Callable(i)
503533 func cancelOrder (orderId) = {
504534 let owner = getOrderOwner(orderId)
505535 let amount = (getOrderTotal(orderId) - getOrderFilledTotal(orderId))
506536 if ((owner != toString(i.caller)))
507537 then throw("permission denied")
508538 else ScriptResult(WriteSet([DataEntry(OrderbookKey, dropOrder(orderId)), DataEntry(getOrderStatusKey(orderId), CANCELED)]), TransferSet([ScriptTransfer(i.caller, amount, bondAssetId)]))
509539 }
510540
511541
512542
513543 @Callable(i)
544+func addLeasingCheck (id) = {
545+ let tx = value(transferTransactionById(fromBase58String(id)))
546+ if (if ((tx.recipient != addressFromStringValue(rpdContract)))
547+ then true
548+ else isLeasingProfitTxExist(id))
549+ then throw("invalid transaction id")
550+ else {
551+ let amount = convertWavesToNeutrino(tx.amount)
552+ let newRpdSyncIndex = (rpdSyncIndex + 1)
553+ ScriptResult(WriteSet([DataEntry(RPDSyncIndexKey, newRpdSyncIndex), DataEntry(getRPDProfitKey(rpdSyncIndex), amount), DataEntry(getRPDSnapshotContractBalanceKey(rpdSyncIndex, neutrinoAssetId), getRPDContractBalance(neutrinoAssetId)), DataEntry(getRPDSnapshotContractBalanceKey(rpdSyncIndex, bondAssetId), getRPDContractBalance(bondAssetId)), DataEntry(getIsLeasingProfitTxExistKey(id), true)]), TransferSet([ScriptTransfer(addressFromStringValue(rpdContract), amount, neutrinoAssetId)]))
554+ }
555+ }
556+
557+
558+
559+@Callable(i)
514560 func executeOrder () = {
515561 let orderId = split(orderbook, LISTSPLITSYMBOL)[0]
516562 let orderTotal = getOrderTotal(orderId)
517563 let orderOwner = getOrderOwner(orderId)
518564 let filledTotal = getOrderFilledTotal(orderId)
519565 if (isBlocked)
520566 then throw("contract is blocked")
521567 else if ((0 >= surplus))
522568 then throw("surplus is less than zero")
523569 else if ((orderOwner == ""))
524570 then {
525571 let newRpdSyncIndex = (rpdSyncIndex + 1)
526572 ScriptResult(WriteSet([DataEntry(RPDSyncIndexKey, newRpdSyncIndex), DataEntry(getRPDProfitKey(rpdSyncIndex), surplus), DataEntry(getRPDSnapshotContractBalanceKey(rpdSyncIndex, neutrinoAssetId), getRPDContractBalance(neutrinoAssetId)), DataEntry(getRPDSnapshotContractBalanceKey(rpdSyncIndex, bondAssetId), getRPDContractBalance(bondAssetId))]), TransferSet([ScriptTransfer(addressFromStringValue(rpdContract), surplus, neutrinoAssetId)]))
527573 }
528574 else {
529575 let amount = (orderTotal - filledTotal)
530576 let surplusBond = convertNeutrinoToBond(surplus)
531577 let status = if ((surplusBond >= amount))
532578 then FILLED
533579 else NEW
534580 let newFilledTotal = if ((surplusBond >= amount))
535581 then orderTotal
536582 else surplusBond
537583 ScriptResult(WriteSet([DataEntry(OrderbookKey, dropOrder(orderId)), DataEntry(getOrderFilledTotalKey(orderId), (filledTotal + newFilledTotal)), DataEntry(getOrderStatusKey(orderId), status)]), TransferSet([ScriptTransfer(addressFromStringValue(orderOwner), convertBondToNeutrino(newFilledTotal), neutrinoAssetId)]))
538584 }
539585 }
540586
541587
588+
589+@Callable(i)
590+func transfer (account) = {
591+ let pmt = extract(i.payment)
592+ if (isDefined(pmt.assetId))
593+ then throw("can use waves only at the moment")
594+ else TransferSet([ScriptTransfer(addressFromStringValue(account), pmt.amount, unit)])
595+ }
596+
597+
598+@Verifier(tx)
599+func verify () = match tx {
600+ case leaseTx: LeaseTransaction =>
601+ sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(getOwnerPubKeyByLeaseTxId(toBase58String(leaseTx.id))))
602+ case unleaseTx: LeaseCancelTransaction =>
603+ sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(getOwnerPubKeyByLeaseTxId(toBase58String(unleaseTx.leaseId))))
604+ case _ =>
605+ sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
606+}
607+

github/deemru/w8io/026f985 
118.79 ms