tx · 32RPYtt2PtRerR7GvimJuYBf5tHmWfSV8ho9HUrrDMUA
3MvTsZLYhU4bGijfdULLDAUEiZVryxJVQPJ: -0.01400000 Waves
2023.01.15 17:45 [2406202] smart account 3MvTsZLYhU4bGijfdULLDAUEiZVryxJVQPJ > SELF 0.00000000 Waves
{
"type": 13,
"id": "32RPYtt2PtRerR7GvimJuYBf5tHmWfSV8ho9HUrrDMUA",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1673793969051,
"version": 2,
"chainId": 84,
"sender": "3MvTsZLYhU4bGijfdULLDAUEiZVryxJVQPJ",
"senderPublicKey": "6hSe4di8vdVexXUoSJQ1unZB3n287fgHNBP7PberpTez",
"proofs": [
"4gvwPJkBz6PBTZSUE8nEWpSfjcBvAmH5J5VW1aZ76B4wPxqE8thEFtK5FPnvDnHHu77Eksw5yRaAtCvY7vJeTVbV"
],
"script": "base64:AAIFAAAAAAAAAAkIAhIAEgMKAQEAAAAAAAAAAgAAAAFpAQAAAA9wbGFjZW9wdGlvbkNhbGwAAAAABAAAAA1jYWxsZXJhZGRyZXNzCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMEAAAAEnJlYWRfb3JhY2xlX3N0YXR1cwkBAAAAEUBleHRyTmF0aXZlKDEwNTMpAAAAAgUAAAAEdGhpcwIAAAANb3JhY2xlX3N0YXR1cwQAAAAUcmVhZF9PcHRpb25Db3VudGVySUQJAQAAABFAZXh0ck5hdGl2ZSgxMDUwKQAAAAIFAAAABHRoaXMCAAAADjFtX2NvbnRyYWN0X2lkBAAAAApnZXRidGNkYXRhCQEAAAARQGV4dHJOYXRpdmUoMTA1MykAAAACBQAAAAR0aGlzCQABLAAAAAICAAAABzFtX2J0Y18JAAGkAAAAAQUAAAAUcmVhZF9PcHRpb25Db3VudGVySUQEAAAABnN3YXBMaQkABLUAAAACBQAAAApnZXRidGNkYXRhAgAAAAFfBAAAAAVwcmljZQkAAZEAAAACBQAAAAZzd2FwTGkAAAAA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cmljZQkAAZEAAAACBQAAAAZzd2FwTGkAAAAAAAAAAAAJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgIAAAAEdGltZQkAAZEAAAACBQAAAAZzd2FwTGkAAAAAAAAAAAEJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgIAAAALYmxvY2toZWlnaHQJAAGRAAAAAgUAAAAGc3dhcExpAAAAAAAAAAACCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAICAAAAA2RpdgkAAZEAAAACBQAAAAZzd2FwTGkAAAAAAAAAAAMFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5ZyXrmg==",
"height": 2406202,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: FPUCdRjnUXJAxcBCYdem8Zz52r9dzzdTcTpQBj64ncEi
Next: 29AwsDPaMD4wpFVof2piAYVx8R1Rv9SLweG3VLCdVav9
Diff:
Old | New | | Differences |
---|
13 | 13 | | let price = swapLi[0] |
---|
14 | 14 | | let block = parseIntValue(swapLi[2]) |
---|
15 | 15 | | let checkblockgap = (height - block) |
---|
| 16 | + | let OptionExpireCounterID = (read_OptionCounterID + 15) |
---|
16 | 17 | | let PreviousCall = match getInteger(this, "Total_Calls") { |
---|
17 | 18 | | case a: Int => |
---|
18 | 19 | | a |
---|
|
31 | 32 | | then throw("Something Wrong with Oracle or Height is not matched.") |
---|
32 | 33 | | else if ((read_oracle_status == "Close")) |
---|
33 | 34 | | then throw("Oracle is closed. Wait Until Oracle is Turned On.") |
---|
34 | | - | else [StringEntry(((("Call_" + calleraddress) + "_") + toString(TotalUserCall)), price), IntegerEntry("Total_Calls", TotalCall), IntegerEntry((calleraddress + "_Total_Calls"), TotalUserCall)] |
---|
| 35 | + | else [StringEntry(((("Call_" + calleraddress) + "_") + toString(TotalUserCall)), price), IntegerEntry(((("Call_Expire_" + calleraddress) + "_") + toString(TotalUserCall)), OptionExpireCounterID), IntegerEntry("Total_Calls", TotalCall), IntegerEntry((calleraddress + "_Total_Calls"), TotalUserCall)] |
---|
35 | 36 | | } |
---|
36 | 37 | | |
---|
37 | 38 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | |
---|
5 | 5 | | |
---|
6 | 6 | | @Callable(i) |
---|
7 | 7 | | func placeoptionCall () = { |
---|
8 | 8 | | let calleraddress = toBase58String(i.caller.bytes) |
---|
9 | 9 | | let read_oracle_status = getStringValue(this, "oracle_status") |
---|
10 | 10 | | let read_OptionCounterID = getIntegerValue(this, "1m_contract_id") |
---|
11 | 11 | | let getbtcdata = getStringValue(this, ("1m_btc_" + toString(read_OptionCounterID))) |
---|
12 | 12 | | let swapLi = split(getbtcdata, "_") |
---|
13 | 13 | | let price = swapLi[0] |
---|
14 | 14 | | let block = parseIntValue(swapLi[2]) |
---|
15 | 15 | | let checkblockgap = (height - block) |
---|
| 16 | + | let OptionExpireCounterID = (read_OptionCounterID + 15) |
---|
16 | 17 | | let PreviousCall = match getInteger(this, "Total_Calls") { |
---|
17 | 18 | | case a: Int => |
---|
18 | 19 | | a |
---|
19 | 20 | | case _ => |
---|
20 | 21 | | 0 |
---|
21 | 22 | | } |
---|
22 | 23 | | let TotalCall = (PreviousCall + 1) |
---|
23 | 24 | | let PreviousUserCall = match getInteger(this, (calleraddress + "_Total_Calls")) { |
---|
24 | 25 | | case a: Int => |
---|
25 | 26 | | a |
---|
26 | 27 | | case _ => |
---|
27 | 28 | | 0 |
---|
28 | 29 | | } |
---|
29 | 30 | | let TotalUserCall = (PreviousUserCall + 1) |
---|
30 | 31 | | if ((checkblockgap > 2)) |
---|
31 | 32 | | then throw("Something Wrong with Oracle or Height is not matched.") |
---|
32 | 33 | | else if ((read_oracle_status == "Close")) |
---|
33 | 34 | | then throw("Oracle is closed. Wait Until Oracle is Turned On.") |
---|
34 | | - | else [StringEntry(((("Call_" + calleraddress) + "_") + toString(TotalUserCall)), price), IntegerEntry("Total_Calls", TotalCall), IntegerEntry((calleraddress + "_Total_Calls"), TotalUserCall)] |
---|
| 35 | + | else [StringEntry(((("Call_" + calleraddress) + "_") + toString(TotalUserCall)), price), IntegerEntry(((("Call_Expire_" + calleraddress) + "_") + toString(TotalUserCall)), OptionExpireCounterID), IntegerEntry("Total_Calls", TotalCall), IntegerEntry((calleraddress + "_Total_Calls"), TotalUserCall)] |
---|
35 | 36 | | } |
---|
36 | 37 | | |
---|
37 | 38 | | |
---|
38 | 39 | | |
---|
39 | 40 | | @Callable(i) |
---|
40 | 41 | | func calldata (Counter) = { |
---|
41 | 42 | | let getbtcdata = getStringValue(addressFromPublicKey(base58'6hSe4di8vdVexXUoSJQ1unZB3n287fgHNBP7PberpTez'), ("1m_btc_" + toString(Counter))) |
---|
42 | 43 | | let swapLi = split(getbtcdata, "_") |
---|
43 | 44 | | let price = swapLi[0] |
---|
44 | 45 | | let time = swapLi[1] |
---|
45 | 46 | | let blockheight = swapLi[2] |
---|
46 | 47 | | let div = swapLi[3] |
---|
47 | 48 | | [StringEntry("price", swapLi[0]), StringEntry("time", swapLi[1]), StringEntry("blockheight", swapLi[2]), StringEntry("div", swapLi[3])] |
---|
48 | 49 | | } |
---|
49 | 50 | | |
---|
50 | 51 | | |
---|
51 | 52 | | @Verifier(tx) |
---|
52 | 53 | | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) |
---|
53 | 54 | | |
---|