tx · 7iBxHL8khf2ypaiaMh4zkyvYnMUtPSpGDxf5KzV15gS3 3MvTsZLYhU4bGijfdULLDAUEiZVryxJVQPJ: -0.01400000 Waves 2023.01.15 18:13 [2406226] smart account 3MvTsZLYhU4bGijfdULLDAUEiZVryxJVQPJ > SELF 0.00000000 Waves
{ "type": 13, "id": "7iBxHL8khf2ypaiaMh4zkyvYnMUtPSpGDxf5KzV15gS3", "fee": 1400000, "feeAssetId": null, "timestamp": 1673795647622, "version": 2, "chainId": 84, "sender": "3MvTsZLYhU4bGijfdULLDAUEiZVryxJVQPJ", "senderPublicKey": "6hSe4di8vdVexXUoSJQ1unZB3n287fgHNBP7PberpTez", "proofs": [ "4J2SBR3tb4HPFHt4mmLaZQfNMC1svSCb2hm1apNaMyfBre6GHgEVFyhvABej6VXqC8d42yK71Em8reCokYbmhCqc" ], "script": "base64:AAIFAAAAAAAAAA4IAhIAEgMKAQESAwoBAQAAAAAAAAADAAAAAWkBAAAAD3BsYWNlb3B0aW9uQ2FsbAAAAAAEAAAADWNhbGxlcmFkZHJlc3MJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAAScmVhZF9vcmFjbGVfc3RhdHVzCQEAAAARQGV4dHJOYXRpdmUoMTA1MykAAAACBQAAAAR0aGlzAgAAAA1vcmFjbGVfc3RhdHVzBAAAABRyZWFkX09wdGlvbkNvdW50ZXJJRAkBAAAAEUBleHRyTmF0aXZlKDEwNTApAAAAAgUAAAAEdGhpcwIAAAAOMW1fY29udHJhY3RfaWQEAAAACmdldGJ0Y2RhdGEJAQAAABFAZXh0ck5hdGl2ZSgxMDUzKQAAAAIFAAAABHRoaXMJAAEsAAAAAgIAAAAHMW1fYnRjXwkAAaQAAAABBQAAABRyZWFkX09wdGlvbkNvdW50ZXJJRAQAAAAGc3dhcExpCQAEtQAAAAIFAAAACmdldGJ0Y2RhdGECAAAAAV8EAAAABXByaWNlCQABkQAAAAIFAAAABnN3YXBMaQAAAAAAAAA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AACBQAAAAZzd2FwTGkAAAAAAAAAAAAJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgIAAAAEdGltZQkAAZEAAAACBQAAAAZzd2FwTGkAAAAAAAAAAAEJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgIAAAALYmxvY2toZWlnaHQJAAGRAAAAAgUAAAAGc3dhcExpAAAAAAAAAAACCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAICAAAAA2RpdgkAAZEAAAACBQAAAAZzd2FwTGkAAAAAAAAAAAMFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5Yob+1w==", "height": 2406226, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 29AwsDPaMD4wpFVof2piAYVx8R1Rv9SLweG3VLCdVav9 Next: 4wo6k2X7BjJZ795zdtZ5NPnUdgYYMx8YpzU8ayA72pRe Diff:
Old | New | Differences | |
---|---|---|---|
38 | 38 | ||
39 | 39 | ||
40 | 40 | @Callable(i) | |
41 | + | func ClaimCall (UserCallID) = { | |
42 | + | let calleraddress = toBase58String(i.caller.bytes) | |
43 | + | let getUserCallID = getStringValue(this, ((("Call_Start_End_" + calleraddress) + "_") + toString(UserCallID))) | |
44 | + | let getStartEndCounter = split(getUserCallID, "_") | |
45 | + | let getStartCounter = getStartEndCounter[0] | |
46 | + | let getbtcdata = getStringValue(addressFromPublicKey(base58'6hSe4di8vdVexXUoSJQ1unZB3n287fgHNBP7PberpTez'), ("1m_btc_" + getStartCounter)) | |
47 | + | [DeleteEntry(((("Call_Start_End_" + calleraddress) + "_") + toString(UserCallID))), DeleteEntry(((("Call_" + calleraddress) + "_") + toString(UserCallID)))] | |
48 | + | } | |
49 | + | ||
50 | + | ||
51 | + | ||
52 | + | @Callable(i) | |
41 | 53 | func calldata (Counter) = { | |
42 | 54 | let getbtcdata = getStringValue(addressFromPublicKey(base58'6hSe4di8vdVexXUoSJQ1unZB3n287fgHNBP7PberpTez'), ("1m_btc_" + toString(Counter))) | |
43 | 55 | let swapLi = split(getbtcdata, "_") |
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 | 16 | let OptionExpireCounterID = (read_OptionCounterID + 15) | |
17 | 17 | let PreviousCall = match getInteger(this, "Total_Calls") { | |
18 | 18 | case a: Int => | |
19 | 19 | a | |
20 | 20 | case _ => | |
21 | 21 | 0 | |
22 | 22 | } | |
23 | 23 | let TotalCall = (PreviousCall + 1) | |
24 | 24 | let PreviousUserCall = match getInteger(this, (calleraddress + "_Total_Calls")) { | |
25 | 25 | case a: Int => | |
26 | 26 | a | |
27 | 27 | case _ => | |
28 | 28 | 0 | |
29 | 29 | } | |
30 | 30 | let TotalUserCall = (PreviousUserCall + 1) | |
31 | 31 | if ((checkblockgap > 2)) | |
32 | 32 | then throw("Something Wrong with Oracle or Height is not matched.") | |
33 | 33 | else if ((read_oracle_status == "Close")) | |
34 | 34 | then throw("Oracle is closed. Wait Until Oracle is Turned On.") | |
35 | 35 | 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)] | |
36 | 36 | } | |
37 | 37 | ||
38 | 38 | ||
39 | 39 | ||
40 | 40 | @Callable(i) | |
41 | + | func ClaimCall (UserCallID) = { | |
42 | + | let calleraddress = toBase58String(i.caller.bytes) | |
43 | + | let getUserCallID = getStringValue(this, ((("Call_Start_End_" + calleraddress) + "_") + toString(UserCallID))) | |
44 | + | let getStartEndCounter = split(getUserCallID, "_") | |
45 | + | let getStartCounter = getStartEndCounter[0] | |
46 | + | let getbtcdata = getStringValue(addressFromPublicKey(base58'6hSe4di8vdVexXUoSJQ1unZB3n287fgHNBP7PberpTez'), ("1m_btc_" + getStartCounter)) | |
47 | + | [DeleteEntry(((("Call_Start_End_" + calleraddress) + "_") + toString(UserCallID))), DeleteEntry(((("Call_" + calleraddress) + "_") + toString(UserCallID)))] | |
48 | + | } | |
49 | + | ||
50 | + | ||
51 | + | ||
52 | + | @Callable(i) | |
41 | 53 | func calldata (Counter) = { | |
42 | 54 | let getbtcdata = getStringValue(addressFromPublicKey(base58'6hSe4di8vdVexXUoSJQ1unZB3n287fgHNBP7PberpTez'), ("1m_btc_" + toString(Counter))) | |
43 | 55 | let swapLi = split(getbtcdata, "_") | |
44 | 56 | let price = swapLi[0] | |
45 | 57 | let time = swapLi[1] | |
46 | 58 | let blockheight = swapLi[2] | |
47 | 59 | let div = swapLi[3] | |
48 | 60 | [StringEntry("price", swapLi[0]), StringEntry("time", swapLi[1]), StringEntry("blockheight", swapLi[2]), StringEntry("div", swapLi[3])] | |
49 | 61 | } | |
50 | 62 | ||
51 | 63 | ||
52 | 64 | @Verifier(tx) | |
53 | 65 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
54 | 66 |
github/deemru/w8io/169f3d6 40.18 ms ◑