tx · FPUCdRjnUXJAxcBCYdem8Zz52r9dzzdTcTpQBj64ncEi 3MvTsZLYhU4bGijfdULLDAUEiZVryxJVQPJ: -0.01400000 Waves 2023.01.15 17:29 [2406183] smart account 3MvTsZLYhU4bGijfdULLDAUEiZVryxJVQPJ > SELF 0.00000000 Waves
{ "type": 13, "id": "FPUCdRjnUXJAxcBCYdem8Zz52r9dzzdTcTpQBj64ncEi", "fee": 1400000, "feeAssetId": null, "timestamp": 1673792965573, "version": 2, "chainId": 84, "sender": "3MvTsZLYhU4bGijfdULLDAUEiZVryxJVQPJ", "senderPublicKey": "6hSe4di8vdVexXUoSJQ1unZB3n287fgHNBP7PberpTez", "proofs": [ "3eH7jPqJnWZPqBJRpsTMqN9Qsd9kFGV6DSSMWt3YZkEQcXjuMnNdJoFP7zCbBxVocFW9zJjSD8iBYwHTgtxYHoxD" ], "script": "base64:AAIFAAAAAAAAAAkIAhIAEgMKAQEAAAAAAAAAAgAAAAFpAQAAAA9wbGFjZW9wdGlvbkNhbGwAAAAABAAAAA1jYWxsZXJhZGRyZXNzCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMEAAAAEnJlYWRfb3JhY2xlX3N0YXR1cwkBAAAAEUBleHRyTmF0aXZlKDEwNTMpAAAAAgUAAAAEdGhpcwIAAAANb3JhY2xlX3N0YXR1cwQAAAAUcmVhZF9PcHRpb25Db3VudGVySUQJAQAAABFAZXh0ck5hdGl2ZSgxMDUwKQAAAAIFAAAABHRoaXMCAAAADjFtX2NvbnRyYWN0X2lkBAAAAApnZXRidGNkYXRhCQEAAAARQGV4dHJOYXRpdmUoMTA1MykAAAACBQAAAAR0aGlzCQABLAAAAAICAAAABzFtX2J0Y18JAAGkAAAAAQUAAAAUcmVhZF9PcHRpb25Db3VudGVySUQEAAAABnN3YXBMaQkABLUAAAACBQAAAApnZXRidGNkYXRhAgAAAAFfBAAAAAVwcmljZQkAAZEAAAACBQAAAAZzd2FwTGkAAAAAAAAAAAA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hcExpAAAAAAAAAAADBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tlearA6P0=", "height": 2406183, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CNgyZeGhCZL8Lv9tkCm3qPRwv1uXXED8BYGRp6gAK1j4 Next: 32RPYtt2PtRerR7GvimJuYBf5tHmWfSV8ho9HUrrDMUA Diff:
Old | New | Differences | |
---|---|---|---|
4 | 4 | ||
5 | 5 | ||
6 | 6 | @Callable(i) | |
7 | - | func placeoptionCall ( | |
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") | |
31 | 31 | then throw("Something Wrong with Oracle or Height is not matched.") | |
32 | 32 | else if ((read_oracle_status == "Close")) | |
33 | 33 | then throw("Oracle is closed. Wait Until Oracle is Turned On.") | |
34 | - | else if ((OptionEntry == "Call")) | |
35 | - | then [StringEntry(calleraddress, "Call"), StringEntry((calleraddress + "_price"), price), IntegerEntry("Total_Calls", TotalCall), IntegerEntry((calleraddress + "_Total_Calls"), TotalUserCall)] | |
36 | - | else throw("You can Place only ['Call'] Here.") | |
34 | + | else [StringEntry(((("Call_" + calleraddress) + "_") + toString(TotalUserCall)), price), IntegerEntry("Total_Calls", TotalCall), IntegerEntry((calleraddress + "_Total_Calls"), TotalUserCall)] | |
37 | 35 | } | |
38 | 36 | ||
39 | 37 |
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 | - | func placeoptionCall ( | |
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 PreviousCall = match getInteger(this, "Total_Calls") { | |
17 | 17 | case a: Int => | |
18 | 18 | a | |
19 | 19 | case _ => | |
20 | 20 | 0 | |
21 | 21 | } | |
22 | 22 | let TotalCall = (PreviousCall + 1) | |
23 | 23 | let PreviousUserCall = match getInteger(this, (calleraddress + "_Total_Calls")) { | |
24 | 24 | case a: Int => | |
25 | 25 | a | |
26 | 26 | case _ => | |
27 | 27 | 0 | |
28 | 28 | } | |
29 | 29 | let TotalUserCall = (PreviousUserCall + 1) | |
30 | 30 | if ((checkblockgap > 2)) | |
31 | 31 | then throw("Something Wrong with Oracle or Height is not matched.") | |
32 | 32 | else if ((read_oracle_status == "Close")) | |
33 | 33 | then throw("Oracle is closed. Wait Until Oracle is Turned On.") | |
34 | - | else if ((OptionEntry == "Call")) | |
35 | - | then [StringEntry(calleraddress, "Call"), StringEntry((calleraddress + "_price"), price), IntegerEntry("Total_Calls", TotalCall), IntegerEntry((calleraddress + "_Total_Calls"), TotalUserCall)] | |
36 | - | else throw("You can Place only ['Call'] Here.") | |
34 | + | else [StringEntry(((("Call_" + calleraddress) + "_") + toString(TotalUserCall)), price), IntegerEntry("Total_Calls", TotalCall), IntegerEntry((calleraddress + "_Total_Calls"), TotalUserCall)] | |
37 | 35 | } | |
38 | 36 | ||
39 | 37 | ||
40 | 38 | ||
41 | 39 | @Callable(i) | |
42 | 40 | func calldata (Counter) = { | |
43 | 41 | let getbtcdata = getStringValue(addressFromPublicKey(base58'6hSe4di8vdVexXUoSJQ1unZB3n287fgHNBP7PberpTez'), ("1m_btc_" + toString(Counter))) | |
44 | 42 | let swapLi = split(getbtcdata, "_") | |
45 | 43 | let price = swapLi[0] | |
46 | 44 | let time = swapLi[1] | |
47 | 45 | let blockheight = swapLi[2] | |
48 | 46 | let div = swapLi[3] | |
49 | 47 | [StringEntry("price", swapLi[0]), StringEntry("time", swapLi[1]), StringEntry("blockheight", swapLi[2]), StringEntry("div", swapLi[3])] | |
50 | 48 | } | |
51 | 49 | ||
52 | 50 | ||
53 | 51 | @Verifier(tx) | |
54 | 52 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
55 | 53 |
github/deemru/w8io/169f3d6 38.75 ms ◑