tx · EPooFgHCk3EoXQifTBZQmEn9k5kFtp3P3LogSYnPU6Su 3N5Ldr1EyMpjqRpkpSpT8zFoRiwTueM5eht: -0.01000000 Waves 2019.12.29 20:10 [830631] smart account 3N5Ldr1EyMpjqRpkpSpT8zFoRiwTueM5eht > SELF 0.00000000 Waves
{ "type": 13, "id": "EPooFgHCk3EoXQifTBZQmEn9k5kFtp3P3LogSYnPU6Su", "fee": 1000000, "feeAssetId": null, "timestamp": 1577639471936, "version": 1, "sender": "3N5Ldr1EyMpjqRpkpSpT8zFoRiwTueM5eht", "senderPublicKey": "4fJ4CtfeiAwUHtFkbGcdbufXTqjXFLkNH9qb8ZHabWZc", "proofs": [ "rFbr8dh8omR5A1GpsrdQdHWGfT8ocnuxfc6wrcLBCRZfGYPfxkmoBMCSrQYZUyKzZ5UxN7zCgT4L6EEvGiqP3ws" ], "script": "base64:AAIDAAAAAAAAAB0IARIPCg0ICAgICAgBCAgICAEEEggKBggBAQEBAQAAACIAAAAAF3Jlc2N1ZVRpbWVDb25kaXRpb25MZXNzAgAAAARsZXNzAAAAABdyZXNjdWVUaW1lQ29uZGl0aW9uTW9yZQIAAAAEbW9yZQAAAAAgcmVzY3VlVGltZUNhdGVnb3J5VmVyeVByb2R1Y3RpdmUCAAAADnZlcnlQcm9kdWN0aXZlAAAAABxyZXNjdWVUaW1lQ2F0ZWdvcnlQcm9kdWN0aXZlAgAAAApwcm9kdWN0aXZlAAAAABlyZXNjdWVUaW1lQ2F0ZWdvcnlOZXV0cmFsAgAAAAduZXV0cmFsAAAAAB1yZXNjdWVUaW1lQ2F0ZWdvcnlEaXN0cmFjdGluZwIAAAALZGlzdHJhY3RpbmcAAAAAIXJlc2N1ZVRpbWVDYXRlZ29yeVZlcnlEaXN0cmFjdGluZwIAAAAPdmVyeURpc3RyYWN0aW5nAAAAAAxzdGF0dXNBY3RpdmUCAAAABmFjdGl2ZQAAAAALc3RhdHVzUGF1c2UCAAAABXBhdXNlAAAAAA1zdGF0dXNTdW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nCQAETAAAAAIJAQAAAB1zZXRSZWN1ZXRpbWVSZWNvcmRTdGF0dXNWYWx1ZQAAAAYFAAAABGRhdGUFAAAADnZlcnlQcm9kdWN0aXZlBQAAAApwcm9kdWN0aXZlBQAAAAduZXV0cmFsBQAAAAtkaXN0cmFjdGluZwUAAAAPdmVyeURpc3RyYWN0aW5nBQAAAANuaWwAAAAA2eQklg==", "chainId": 84, "height": 830631, "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_<" + 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_<" + 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), setStringRecord("startDate", startDate), setStringRecord("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/169f3d6 19.33 ms ◑