tx · E3xoVdYoerPZsX7snyFKhtxnzaAUpDVyttk5qBRQdbw5

3MvTsZLYhU4bGijfdULLDAUEiZVryxJVQPJ:  -0.01400000 Waves

2023.01.15 18:51 [2406268] smart account 3MvTsZLYhU4bGijfdULLDAUEiZVryxJVQPJ > SELF 0.00000000 Waves

{ "type": 13, "id": "E3xoVdYoerPZsX7snyFKhtxnzaAUpDVyttk5qBRQdbw5", "fee": 1400000, "feeAssetId": null, "timestamp": 1673797865178, "version": 2, "chainId": 84, "sender": "3MvTsZLYhU4bGijfdULLDAUEiZVryxJVQPJ", "senderPublicKey": "6hSe4di8vdVexXUoSJQ1unZB3n287fgHNBP7PberpTez", "proofs": [ "a9TannizGKJHWDPLLhXLPnyJniZpks3uSmkZ8pn5Ezfx4uGzGfUcDwLmJu6JwCkPXBe9EhM5PCj8jVjJhpySDAD" ], "script": "base64:AAIFAAAAAAAAAA4IAhIAEgMKAQESAwoBAQAAAAAAAAADAAAAAWkBAAAAD3BsYWNlb3B0aW9uQ2FsbAAAAAAEAAAADWNhbGxlcmFkZHJlc3MJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAAScmVhZF9vcmFjbGVfc3RhdHVzCQEAAAARQGV4dHJOYXRpdmUoMTA1MykAAAACBQAAAAR0aGlzAgAAAA1vcmFjbGVfc3RhdHVzBAAAABRyZWFkX09wdGlvbkNvdW50ZXJJRAkBAAAAEUBleHRyTmF0aXZlKDEwNTApAAAAAgUAAAAEdGhpcwIAAAAOMW1fY29udHJhY3RfaWQEAAAACmdldGJ0Y2RhdGEJAQAAABFAZXh0ck5hdGl2ZSgxMDUzKQAAAAIFAAAABHRoaXMJAAEsAAAAAgIAAAAHMW1fYnRjXwkAAaQAAAABBQAAABRyZWFkX09wdGlvbkNvdW50ZXJJRAQAAAAGc3dhcExpCQAEtQAAAAIFAAAACmdldGJ0Y2RhdGECAAAAAV8EAAAABXByaWNlCQABkQAAAAIFAAAABnN3YXBMaQAAAAAAA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UHVibGljS2V5KjoYcw==", "height": 2406268, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DyWgXsgoUWzSifRFispC6Bu4RT59qs7bqBNjKSJtmMUW Next: none Diff:
OldNewDifferences
4545 let splitStartEndCounter = split(getOptionCall_Sequencedata, "_")
4646 let getStartCounter = splitStartEndCounter[0]
4747 let getEndCounter = splitStartEndCounter[1]
48- let getbtcdata = getStringValue(addressFromPublicKey(base58'6hSe4di8vdVexXUoSJQ1unZB3n287fgHNBP7PberpTez'), ("1m_btc_" + getStartCounter))
49- let getbtcdata1 = getStringValue(addressFromPublicKey(base58'6hSe4di8vdVexXUoSJQ1unZB3n287fgHNBP7PberpTez'), ("1m_btc_" + getEndCounter))
50- let StartEndPriceDiff = (parseIntValue(getbtcdata) - parseIntValue(getbtcdata1))
51-[StringEntry("Start_value", getStartCounter), IntegerEntry("Price_Diff", StartEndPriceDiff), DeleteEntry(((("Call_Start_End_" + calleraddress) + "_") + toString(Call_Sequence))), DeleteEntry(getOptionCallPrice)]
48+ let getbtcdata = getIntegerValue(this, ("1m_btc_" + getStartCounter))
49+ let getbtcdata1 = getIntegerValue(this, ("1m_btc_" + getEndCounter))
50+ let StartEndPriceDiff = (getbtcdata - getbtcdata1)
51+ if ((StartEndPriceDiff > 0))
52+ then throw("Price is not Positive")
53+ else [StringEntry("Start_value", getStartCounter), IntegerEntry("Price_Diff", StartEndPriceDiff), DeleteEntry(((("Call_Start_End_" + calleraddress) + "_") + toString(Call_Sequence))), DeleteEntry(getOptionCallPrice)]
5254 }
5355
5456
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(i)
77 func placeoptionCall () = {
88 let calleraddress = toBase58String(i.caller.bytes)
99 let read_oracle_status = getStringValue(this, "oracle_status")
1010 let read_OptionCounterID = getIntegerValue(this, "1m_contract_id")
1111 let getbtcdata = getStringValue(this, ("1m_btc_" + toString(read_OptionCounterID)))
1212 let swapLi = split(getbtcdata, "_")
1313 let price = swapLi[0]
1414 let block = parseIntValue(swapLi[2])
1515 let checkblockgap = (height - block)
1616 let OptionExpireCounterID = (read_OptionCounterID + 15)
1717 let PreviousCall = match getInteger(this, "Total_Calls") {
1818 case a: Int =>
1919 a
2020 case _ =>
2121 0
2222 }
2323 let TotalCall = (PreviousCall + 1)
2424 let PreviousUserCall = match getInteger(this, (calleraddress + "_Total_Calls")) {
2525 case a: Int =>
2626 a
2727 case _ =>
2828 0
2929 }
3030 let TotalUserCall = (PreviousUserCall + 1)
3131 if ((checkblockgap > 2))
3232 then throw("Something Wrong with Oracle or Height is not matched.")
3333 else if ((read_oracle_status == "Close"))
3434 then throw("Oracle is closed. Wait Until Oracle is Turned On.")
3535 else [StringEntry(((("Call_" + calleraddress) + "_") + toString(TotalUserCall)), price), StringEntry(((("Call_Start_End_" + calleraddress) + "_") + toString(TotalUserCall)), ((toString(read_OptionCounterID) + "_") + toString(OptionExpireCounterID))), IntegerEntry("Total_Calls", TotalCall), IntegerEntry((calleraddress + "_Total_Calls"), TotalUserCall)]
3636 }
3737
3838
3939
4040 @Callable(i)
4141 func ClaimCall (Call_Sequence) = {
4242 let calleraddress = toBase58String(i.caller.bytes)
4343 let getOptionCallPrice = ((("Call_" + calleraddress) + "_") + toString(Call_Sequence))
4444 let getOptionCall_Sequencedata = getStringValue(this, ((("Call_Start_End_" + calleraddress) + "_") + toString(Call_Sequence)))
4545 let splitStartEndCounter = split(getOptionCall_Sequencedata, "_")
4646 let getStartCounter = splitStartEndCounter[0]
4747 let getEndCounter = splitStartEndCounter[1]
48- let getbtcdata = getStringValue(addressFromPublicKey(base58'6hSe4di8vdVexXUoSJQ1unZB3n287fgHNBP7PberpTez'), ("1m_btc_" + getStartCounter))
49- let getbtcdata1 = getStringValue(addressFromPublicKey(base58'6hSe4di8vdVexXUoSJQ1unZB3n287fgHNBP7PberpTez'), ("1m_btc_" + getEndCounter))
50- let StartEndPriceDiff = (parseIntValue(getbtcdata) - parseIntValue(getbtcdata1))
51-[StringEntry("Start_value", getStartCounter), IntegerEntry("Price_Diff", StartEndPriceDiff), DeleteEntry(((("Call_Start_End_" + calleraddress) + "_") + toString(Call_Sequence))), DeleteEntry(getOptionCallPrice)]
48+ let getbtcdata = getIntegerValue(this, ("1m_btc_" + getStartCounter))
49+ let getbtcdata1 = getIntegerValue(this, ("1m_btc_" + getEndCounter))
50+ let StartEndPriceDiff = (getbtcdata - getbtcdata1)
51+ if ((StartEndPriceDiff > 0))
52+ then throw("Price is not Positive")
53+ else [StringEntry("Start_value", getStartCounter), IntegerEntry("Price_Diff", StartEndPriceDiff), DeleteEntry(((("Call_Start_End_" + calleraddress) + "_") + toString(Call_Sequence))), DeleteEntry(getOptionCallPrice)]
5254 }
5355
5456
5557
5658 @Callable(i)
5759 func calldata (Counter) = {
5860 let getbtcdata = getStringValue(addressFromPublicKey(base58'6hSe4di8vdVexXUoSJQ1unZB3n287fgHNBP7PberpTez'), ("1m_btc_" + toString(Counter)))
5961 let swapLi = split(getbtcdata, "_")
6062 let price = swapLi[0]
6163 let time = swapLi[1]
6264 let blockheight = swapLi[2]
6365 let div = swapLi[3]
6466 [StringEntry("price", swapLi[0]), StringEntry("time", swapLi[1]), StringEntry("blockheight", swapLi[2]), StringEntry("div", swapLi[3])]
6567 }
6668
6769
6870 @Verifier(tx)
6971 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
7072

github/deemru/w8io/169f3d6 
30.28 ms