tx · 8EsJ1mDbE4Hqni4CLbrXLu3zoo7odSgh8aNik4Et6zho

3MrWxXALfo2Dw1vi4Ydk8fEn766X3ZAVPky:  -0.01400000 Waves

2023.01.15 17:43 [2406199] smart account 3MrWxXALfo2Dw1vi4Ydk8fEn766X3ZAVPky > SELF 0.00000000 Waves

{ "type": 13, "id": "8EsJ1mDbE4Hqni4CLbrXLu3zoo7odSgh8aNik4Et6zho", "fee": 1400000, "feeAssetId": null, "timestamp": 1673793819815, "version": 2, "chainId": 84, "sender": "3MrWxXALfo2Dw1vi4Ydk8fEn766X3ZAVPky", "senderPublicKey": "2sHRUrJCMpDhAQEcN7Zhk3LqnD9zizebpxeQXpPoscQU", "proofs": [ "25X7bKjzQFZDYzdizVjCVgDT2zirYcExgd1keMpFMQSvuosoW3LqMhGDvoHfiiw4unxxRysoizwGNWj8xZh3HECQ" ], "script": "base64:AAIFAAAAAAAAAAkIAhIAEgMKAQEAAAAAAAAAAgAAAAFpAQAAAA9wbGFjZW9wdGlvbkNhbGwAAAAABAAAAA1jYWxsZXJhZGRyZXNzCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMEAAAAEnJlYWRfb3JhY2xlX3N0YXR1cwkBAAAAEUBleHRyTmF0aXZlKDEwNTMpAAAAAgUAAAAEdGhpcwIAAAANb3JhY2xlX3N0YXR1cwQAAAAUcmVhZF9PcHRpb25Db3VudGVySUQJAQAAABFAZXh0ck5hdGl2ZSgxMDUwKQAAAAIFAAAABHRoaXMCAAAADjFtX2NvbnRyYWN0X2lkBAAAAApnZXRidGNkYXRhCQEAAAARQGV4dHJOYXRpdmUoMTA1MykAAAACBQAAAAR0aGlzCQABLAAAAAICAAAABzFtX2J0Y18JAAGkAAAAAQUAAAAUcmVhZF9PcHRpb25Db3VudGVySUQEAAAABnN3YXBMaQkABLUAAAACBQAAAApnZXRidGNkYXRhAgAAAAFfBAAAAAVwcmljZQkAAZEAAAACBQAAAAZzd2FwTGkAAAAAAAAAAA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AAZEAAAACBQAAAAZzd2FwTGkAAAAAAAAAAAAJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgIAAAAEdGltZQkAAZEAAAACBQAAAAZzd2FwTGkAAAAAAAAAAAEJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgIAAAALYmxvY2toZWlnaHQJAAGRAAAAAgUAAAAGc3dhcExpAAAAAAAAAAACCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAICAAAAA2RpdgkAAZEAAAACBQAAAAZzd2FwTGkAAAAAAAAAAAMFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5ZyXrmg==", "height": 2406199, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FwCFFSqWi48XoZUA99TaBYTZtwy1N2JTPT8q2kDKtawx Next: 2ojPqJ6dUFofCkLoECK6yDDnhrRVPdrxLBjAHvBXyb1D Full:
OldNewDifferences
1-{-# STDLIB_VERSION 6 #-}
1+{-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-func validateArguments (recipients,amounts,paymentIdx,payments) = {
5- let recipientsSize = size(recipients)
6- let amountsSize = size(amounts)
7- let paymentIdxSize = size(paymentIdx)
8- let paymentsSize = size(payments)
9- let minAmount = min(amounts)
10- let minPaymentIdx = min(paymentIdx)
11- let maxPaymentIdx = max(paymentIdx)
12- func paymentsValidator (paymentAccum,nextPayment) = {
13- let $t0583620 = paymentAccum
14- let validPayments = $t0583620._1
15- let j = $t0583620._2
16- if ((j >= paymentsSize))
17- then $Tuple2(validPayments, (j + 1))
18- else {
19- func amountsAggregator (amountAccum,nextAmount) = {
20- let $t0775804 = amountAccum
21- let amount = $t0775804._1
22- let k = $t0775804._2
23- if (if ((k >= recipientsSize))
24- then true
25- else (paymentIdx[k] != j))
26- then $Tuple2(amount, (k + 1))
27- else $Tuple2((amount + nextAmount), (k + 1))
28- }
294
30- let aggregatedAmount = {
31- let $l = amounts
32- let $s = size($l)
33- let $acc0 = $Tuple2(0, 0)
34- func $f0_1 ($a,$i) = if (($i >= $s))
35- then $a
36- else amountsAggregator($a, $l[$i])
375
38- func $f0_2 ($a,$i) = if (($i >= $s))
39- then $a
40- else throw("List size exceeds 50")
41-
42- $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50)
43- }
44- if ((aggregatedAmount._1 == nextPayment.amount))
45- then $Tuple2((validPayments + 1), (j + 1))
46- else $Tuple2(validPayments, (j + 1))
47- }
48- }
49-
50- let paymentsValidation = {
51- let $l = payments
52- let $s = size($l)
53- let $acc0 = $Tuple2(0, 0)
54- func $f0_1 ($a,$i) = if (($i >= $s))
55- then $a
56- else paymentsValidator($a, $l[$i])
57-
58- func $f0_2 ($a,$i) = if (($i >= $s))
59- then $a
60- else throw("List size exceeds 10")
61-
62- $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
63- }
64- if (if (if (if (if (if (if (if ((recipientsSize == amountsSize))
65- then (recipientsSize == paymentIdxSize)
66- else false)
67- then (recipientsSize > 0)
68- else false)
69- then (50 >= recipientsSize)
70- else false)
71- then (paymentsSize > 0)
72- else false)
73- then (minAmount > 0)
74- else false)
75- then (minPaymentIdx == 0)
76- else false)
77- then (maxPaymentIdx == (paymentsSize - 1))
78- else false)
79- then (paymentsValidation._1 == paymentsSize)
80- else false
6+@Callable(i)
7+func placeoptionCall () = {
8+ let calleraddress = toBase58String(i.caller.bytes)
9+ let read_oracle_status = getStringValue(this, "oracle_status")
10+ let read_OptionCounterID = getIntegerValue(this, "1m_contract_id")
11+ let getbtcdata = getStringValue(this, ("1m_btc_" + toString(read_OptionCounterID)))
12+ let swapLi = split(getbtcdata, "_")
13+ let price = swapLi[0]
14+ let block = parseIntValue(swapLi[2])
15+ let checkblockgap = (height - block)
16+ let OptionExpireCounterID = (read_OptionCounterID + 15)
17+ let PreviousCall = match getInteger(this, "Total_Calls") {
18+ case a: Int =>
19+ a
20+ case _ =>
21+ 0
22+ }
23+ let TotalCall = (PreviousCall + 1)
24+ let PreviousUserCall = match getInteger(this, (calleraddress + "_Total_Calls")) {
25+ case a: Int =>
26+ a
27+ case _ =>
28+ 0
29+ }
30+ let TotalUserCall = (PreviousUserCall + 1)
31+ if ((checkblockgap > 2))
32+ then throw("Something Wrong with Oracle or Height is not matched.")
33+ else if ((read_oracle_status == "Close"))
34+ then throw("Oracle is closed. Wait Until Oracle is Turned On.")
35+ else [StringEntry(((("Call_" + calleraddress) + "_") + toString(TotalUserCall)), price), IntegerEntry(((("Call_Expire_" + calleraddress) + "_") + toString(TotalUserCall)), OptionExpireCounterID), IntegerEntry("Total_Calls", TotalCall), IntegerEntry((calleraddress + "_Total_Calls"), TotalUserCall)]
8136 }
8237
8338
39+
8440 @Callable(i)
85-func massTransfer (recipients,amounts,paymentIdx,attachment) = if (!(validateArguments(recipients, amounts, paymentIdx, i.payments)))
86- then throw("Invalid arguments")
87- else {
88- let recipientsSize = size(recipients)
89- func scriptTransfersGenerator (accum,next) = {
90- let $t019021934 = accum
91- let scriptTransfers = $t019021934._1
92- let j = $t019021934._2
93- if ((j >= recipientsSize))
94- then $Tuple2(scriptTransfers, (j + 1))
95- else $Tuple2((scriptTransfers :+ ScriptTransfer(addressFromStringValue(recipients[j]), next, i.payments[paymentIdx[j]].assetId)), (j + 1))
96- }
41+func calldata (Counter) = {
42+ let getbtcdata = getStringValue(addressFromPublicKey(base58'6hSe4di8vdVexXUoSJQ1unZB3n287fgHNBP7PberpTez'), ("1m_btc_" + toString(Counter)))
43+ let swapLi = split(getbtcdata, "_")
44+ let price = swapLi[0]
45+ let time = swapLi[1]
46+ let blockheight = swapLi[2]
47+ let div = swapLi[3]
48+[StringEntry("price", swapLi[0]), StringEntry("time", swapLi[1]), StringEntry("blockheight", swapLi[2]), StringEntry("div", swapLi[3])]
49+ }
9750
98- let result = {
99- let $l = amounts
100- let $s = size($l)
101- let $acc0 = $Tuple2(nil, 0)
102- func $f0_1 ($a,$i) = if (($i >= $s))
103- then $a
104- else scriptTransfersGenerator($a, $l[$i])
10551
106- func $f0_2 ($a,$i) = if (($i >= $s))
107- then $a
108- else throw("List size exceeds 50")
109-
110- $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50)
111- }
112- $Tuple2(result._1, unit)
113- }
114-
52+@Verifier(tx)
53+func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
11554

github/deemru/w8io/026f985 
32.87 ms