tx · 3Hx8yNJr6F6NFAtZigQcCQ59HMDfWEVEdjiRdLxcbRm2 3MuYXjuK6g34ym8eYLEtqP7WjaLvSjXgYko: -0.01000000 Waves 2020.01.16 17:35 [856830] smart account 3MuYXjuK6g34ym8eYLEtqP7WjaLvSjXgYko > SELF 0.00000000 Waves
{ "type": 13, "id": "3Hx8yNJr6F6NFAtZigQcCQ59HMDfWEVEdjiRdLxcbRm2", "fee": 1000000, "feeAssetId": null, "timestamp": 1579185353806, "version": 1, "sender": "3MuYXjuK6g34ym8eYLEtqP7WjaLvSjXgYko", "senderPublicKey": "6AtWmePxW3WymQYUNSeFnn9nbB2GBLpXdP6iAvsSai85", "proofs": [ "3EmDFcdZwUi81KevdBnB9oR58rTLZbfzt7C6L3A9tV4VvApHhTuXarXhPaUmkwkVbzEePzNBgz8q3JGGVGdCycc4" ], "script": "base64:AAIDAAAAAAAAAB0IARIPCg0ICAgIAQEBCAgICAEEEggKBgEBAQEBAQAAACIAAAAAF3Jlc2N1ZVRpbWVDb25kaXRpb25MZXNzAgAAAARsZXNzAAAAABdyZXNjdWVUaW1lQ29uZGl0aW9uTW9yZQIAAAAEbW9yZQAAAAAgcmVzY3VlVGltZUNhdGVnb3J5VmVyeVByb2R1Y3RpdmUCAAAADnZlcnlQcm9kdWN0aXZlAAAAABxyZXNjdWVUaW1lQ2F0ZWdvcnlQcm9kdWN0aXZlAgAAAApwcm9kdWN0aXZlAAAAABlyZXNjdWVUaW1lQ2F0ZWdvcnlOZXV0cmFsAgAAAAduZXV0cmFsAAAAAB1yZXNjdWVUaW1lQ2F0ZWdvcnlEaXN0cmFjdGluZwIAAAALZGlzdHJhY3RpbmcAAAAAIXJlc2N1ZVRpbWVDYXRlZ29yeVZlcnlEaXN0cmFjdGluZwIAAAAPdmVyeURpc3RyYWN0aW5nAAAAAAxzdGF0dXNBY3RpdmUCAAAABmFjdGl2ZQAAAAALc3RhdHVzUGF1c2UCAAAABXBhdXNlAAAAAA1zdGF0dXNTdWNjZX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yeURpc3RyYWN0aW5nCQAETAAAAAIJAQAAAB1zZXRSZWN1ZXRpbWVSZWNvcmRTdGF0dXNWYWx1ZQAAAAYFAAAABGRhdGUFAAAADnZlcnlQcm9kdWN0aXZlBQAAAApwcm9kdWN0aXZlBQAAAAduZXV0cmFsBQAAAAtkaXN0cmFjdGluZwUAAAAPdmVyeURpc3RyYWN0aW5nBQAAAANuaWwAAAAAkShJMw==", "chainId": 84, "height": 856830, "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 3 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let rescueTimeConditionLess = "less" | |
5 | + | ||
6 | + | let rescueTimeConditionMore = "more" | |
7 | + | ||
8 | + | let rescueTimeCategoryVeryProductive = "veryProductive" | |
9 | + | ||
10 | + | let rescueTimeCategoryProductive = "productive" | |
11 | + | ||
12 | + | let rescueTimeCategoryNeutral = "neutral" | |
13 | + | ||
14 | + | let rescueTimeCategoryDistracting = "distracting" | |
15 | + | ||
16 | + | let rescueTimeCategoryVeryDistracting = "veryDistracting" | |
17 | + | ||
18 | + | let statusActive = "active" | |
19 | + | ||
20 | + | let statusPause = "pause" | |
21 | + | ||
22 | + | let statusSuccess = "success" | |
23 | + | ||
24 | + | let statusFail = "fail" | |
25 | + | ||
26 | + | let integrationServicesRescueTime = "rescueTime" | |
27 | + | ||
28 | + | let weekDayMonday = "monday" | |
29 | + | ||
30 | + | let weekDayTuesday = "tuesday" | |
31 | + | ||
32 | + | let weekDayWednesday = "wednesday" | |
33 | + | ||
34 | + | let weekDayThursday = "thursday" | |
35 | + | ||
36 | + | let weekDayFriday = "friday" | |
37 | + | ||
38 | + | let weekDaySaturday = "saturday" | |
39 | + | ||
40 | + | let weekDaySunday = "sunday" | |
41 | + | ||
42 | + | func throwUndefinedError () = throw("undefinedError") | |
43 | + | ||
44 | + | ||
45 | + | func getIntegerRecordOr (accountAddress,key,default) = if (isDefined(getInteger(this, key))) | |
46 | + | then getIntegerValue(this, key) | |
47 | + | else default | |
48 | + | ||
49 | + | ||
50 | + | func getIntegerRecord (accountAddress,key) = getIntegerValue(this, key) | |
51 | + | ||
52 | + | ||
53 | + | func setIntegerRecord (key,value) = DataEntry(key, value) | |
54 | + | ||
55 | + | ||
56 | + | func getStringOr (accountAddress,key,default) = if (isDefined(getInteger(this, key))) | |
57 | + | then getStringValue(this, key) | |
58 | + | else default | |
59 | + | ||
60 | + | ||
61 | + | func getStringRecord (accountAddress,key) = getStringValue(this, key) | |
62 | + | ||
63 | + | ||
64 | + | func setStringRecord (key,value) = DataEntry(key, value) | |
65 | + | ||
66 | + | ||
67 | + | func getBooleanRecord (accountAddress,key) = getBooleanValue(this, key) | |
68 | + | ||
69 | + | ||
70 | + | func setBooleanRecord (key,value) = DataEntry(key, value) | |
71 | + | ||
72 | + | ||
73 | + | func getBinaryRecord (accountAddress,key) = getBinaryValue(this, key) | |
74 | + | ||
75 | + | ||
76 | + | func setBinaryRecord (key,value) = DataEntry(key, value) | |
77 | + | ||
78 | + | ||
79 | + | func isRecordDefined (key) = if (if (if (isDefined(getBinary(this, key))) | |
80 | + | then true | |
81 | + | else isDefined(getString(this, key))) | |
82 | + | then true | |
83 | + | else isDefined(getBoolean(this, key))) | |
84 | + | then true | |
85 | + | else isDefined(getInteger(this, key)) | |
86 | + | ||
87 | + | ||
88 | + | func setRecuetimeRecordStatusValue (date,veryProductive,productive,neutral,distracting,veryDistracting) = { | |
89 | + | let recordStatusKey = (("record_<" + toString(date)) + ">") | |
90 | + | let rescueTimeConditionAmount = getIntegerRecordOr(this, "rescueTimeConditionAmount", 0) | |
91 | + | let rescueTimeCondition = getStringRecord(this, "rescueTimeCondition") | |
92 | + | let rescueTimeCategory = getStringRecord(this, "rescueTimeCategory") | |
93 | + | let statusValue = if ((rescueTimeCondition == rescueTimeConditionLess)) | |
94 | + | then if ((rescueTimeCategory == rescueTimeCategoryVeryProductive)) | |
95 | + | then (rescueTimeConditionAmount >= veryProductive) | |
96 | + | else if ((rescueTimeCategory == rescueTimeCategoryProductive)) | |
97 | + | then (rescueTimeConditionAmount >= productive) | |
98 | + | else if ((rescueTimeCategory == rescueTimeCategoryNeutral)) | |
99 | + | then (rescueTimeConditionAmount >= neutral) | |
100 | + | else if ((rescueTimeCategory == rescueTimeCategoryDistracting)) | |
101 | + | then (rescueTimeConditionAmount >= distracting) | |
102 | + | else (rescueTimeConditionAmount >= veryDistracting) | |
103 | + | else if ((rescueTimeCategory == rescueTimeCategoryVeryProductive)) | |
104 | + | then (veryProductive >= rescueTimeConditionAmount) | |
105 | + | else if ((rescueTimeCategory == rescueTimeCategoryProductive)) | |
106 | + | then (productive >= rescueTimeConditionAmount) | |
107 | + | else if ((rescueTimeCategory == rescueTimeCategoryNeutral)) | |
108 | + | then (neutral >= rescueTimeConditionAmount) | |
109 | + | else if ((rescueTimeCategory == rescueTimeCategoryDistracting)) | |
110 | + | then (distracting >= rescueTimeConditionAmount) | |
111 | + | else (veryDistracting >= rescueTimeConditionAmount) | |
112 | + | setBooleanRecord(recordStatusKey, statusValue) | |
113 | + | } | |
114 | + | ||
115 | + | ||
116 | + | func getCategoryRecordKey (date,rescueTimeCategoryVeryProductive) = (((("record_<" + toString(date)) + ">__category_<") + rescueTimeCategoryVeryProductive) + ">") | |
117 | + | ||
118 | + | ||
119 | + | func setCategoryRecordValue (date,category,value) = setIntegerRecord(getCategoryRecordKey(date, category), value) | |
120 | + | ||
121 | + | ||
122 | + | @Callable(i) | |
123 | + | func setup (userAddress,integrationService,name,description,startDate,endDate,rescueTimeConditionAmount,rescueTimeCondition,rescueTimeCategory,trackDays,attempsCount,bet,isPrivate) = WriteSet([setStringRecord("userAddress", userAddress), setStringRecord("status", statusActive), setStringRecord("integrationService", integrationServicesRescueTime), setStringRecord("name", name), setStringRecord("description", description), setIntegerRecord("startDate", startDate), setIntegerRecord("endDate", endDate), setIntegerRecord("rescueTimeConditionAmount", rescueTimeConditionAmount), setStringRecord("rescueTimeCondition", rescueTimeCondition), setStringRecord("rescueTimeCategory", rescueTimeCategory), setStringRecord("trackDays", trackDays), setStringRecord("attempsCount", attempsCount), setIntegerRecord("failedAttemptsCount", 0), setIntegerRecord("bet", bet), setBooleanRecord("isPrivate", isPrivate)]) | |
124 | + | ||
125 | + | ||
126 | + | ||
127 | + | @Callable(i) | |
128 | + | func addRecord (date,veryProductive,productive,neutral,distracting,veryDistracting) = WriteSet([setCategoryRecordValue(date, rescueTimeCategoryVeryProductive, veryProductive), setCategoryRecordValue(date, rescueTimeCategoryProductive, productive), setCategoryRecordValue(date, rescueTimeCategoryNeutral, neutral), setCategoryRecordValue(date, rescueTimeCategoryDistracting, distracting), setCategoryRecordValue(date, rescueTimeCategoryVeryDistracting, veryDistracting), setCategoryRecordValue(date, rescueTimeCategoryVeryDistracting, veryDistracting), setRecuetimeRecordStatusValue(date, veryProductive, productive, neutral, distracting, veryDistracting)]) | |
129 | + | ||
130 | + |
github/deemru/w8io/026f985 27.88 ms ◑