tx · 2MNdAPHfJNSwHpgqiX4Ut5z4p6KNYgV6MfDqe7F3Tfyk 3Mw6K53hftyg2kR7SgmrRvpSCWbyyukNQh9: -0.01000000 Waves 2020.04.20 20:30 [963104] smart account 3Mw6K53hftyg2kR7SgmrRvpSCWbyyukNQh9 > SELF 0.00000000 Waves
{ "type": 13, "id": "2MNdAPHfJNSwHpgqiX4Ut5z4p6KNYgV6MfDqe7F3Tfyk", "fee": 1000000, "feeAssetId": null, "timestamp": 1587403732350, "version": 1, "sender": "3Mw6K53hftyg2kR7SgmrRvpSCWbyyukNQh9", "senderPublicKey": "F9L1P95zgdEocovMFpakNYLKeuqBXBdoat3SW7rx6dsc", "proofs": [ "3FENc3rcGhBLFG15ffQAd3wfKwm1yukKkF9Acy1ebdUG2LqbuFSXuGF3W4nqWoVuDKBAtjGXjpSw6dNySB1uD4zH" ], "script": "base64:AAIDAAAAAAAAAB0IARIPCg0ICAgIAQEBCAgICAEIEggKBgEBAQEBAQAAACYAAAAAF3Jlc2N1ZVRpbWVDb25kaXRpb25MZXNzAgAAAARsZXNzAAAAABdyZXNjdWVUaW1lQ29uZGl0aW9uTW9yZQIAAAAEbW9yZQAAAAAgcmVzY3VlVGltZUNhdGVnb3J5VmVyeVByb2R1Y3RpdmUCAAAADnZlcnlQcm9kdWN0aXZlAAAAABxyZXNjdWVUaW1lQ2F0ZWdvcnlQcm9kdWN0aXZlAgAAAApwcm9kdWN0aXZlAAAAABlyZXNjdWVUaW1lQ2F0ZWdvcnlOZXV0cmFsAgAAAAduZXV0cmFsAAAAAB1yZXNjdWVUaW1lQ2F0ZWdvcnlEaXN0cmFjdGluZwIAAAALZGlzdHJhY3RpbmcAAAAAIXJlc2N1ZVRpbWVDYXRlZ29yeVZlcnlEaXN0cmFjdGluZwIAAAAPdmVyeURpc3RyYWN0aW5nAAAAAA1zdGF0dXNQZW5kaW5nAgAAAAdwZW5kaW5nAAAAAAxzdGF0dXNBY3RpdmUCAAAABmFjdGl2ZQAAAAALc3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AAAA92ZXJ5RGlzdHJhY3RpbmcFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAByRtYXRjaDAFAAAAAnR4AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABdJbnZva2VTY3JpcHRUcmFuc2FjdGlvbgQAAAABdAUAAAAHJG1hdGNoMAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkHY5dxhQ==", "chainId": 84, "height": 963104, "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 statusPending = "pending" | |
19 | + | ||
20 | + | let statusActive = "active" | |
21 | + | ||
22 | + | let statusPause = "pause" | |
23 | + | ||
24 | + | let statusSuccess = "success" | |
25 | + | ||
26 | + | let statusFail = "fail" | |
27 | + | ||
28 | + | let integrationServicesRescueTime = "rescueTime" | |
29 | + | ||
30 | + | let weekDayMonday = "monday" | |
31 | + | ||
32 | + | let weekDayTuesday = "tuesday" | |
33 | + | ||
34 | + | let weekDayWednesday = "wednesday" | |
35 | + | ||
36 | + | let weekDayThursday = "thursday" | |
37 | + | ||
38 | + | let weekDayFriday = "friday" | |
39 | + | ||
40 | + | let weekDaySaturday = "saturday" | |
41 | + | ||
42 | + | let weekDaySunday = "sunday" | |
43 | + | ||
44 | + | let statusKey = "status" | |
45 | + | ||
46 | + | func throwUndefinedError () = throw("undefinedError") | |
47 | + | ||
48 | + | ||
49 | + | func throwOutdatedGoalError () = throw("outdatedGoalError") | |
50 | + | ||
51 | + | ||
52 | + | func throwNotActiveGoalError () = throw("notActiveGoalError") | |
53 | + | ||
54 | + | ||
55 | + | func getIntegerRecordOr (accountAddress,key,default) = if (isDefined(getInteger(this, key))) | |
56 | + | then getIntegerValue(this, key) | |
57 | + | else default | |
58 | + | ||
59 | + | ||
60 | + | func getIntegerRecord (accountAddress,key) = getIntegerValue(this, key) | |
61 | + | ||
62 | + | ||
63 | + | func setIntegerRecord (key,value) = DataEntry(key, value) | |
64 | + | ||
65 | + | ||
66 | + | func getStringOr (accountAddress,key,default) = if (isDefined(getInteger(this, key))) | |
67 | + | then getStringValue(this, key) | |
68 | + | else default | |
69 | + | ||
70 | + | ||
71 | + | func getStringRecord (accountAddress,key) = getStringValue(this, key) | |
72 | + | ||
73 | + | ||
74 | + | func setStringRecord (key,value) = DataEntry(key, value) | |
75 | + | ||
76 | + | ||
77 | + | func getBooleanRecord (accountAddress,key) = getBooleanValue(this, key) | |
78 | + | ||
79 | + | ||
80 | + | func setBooleanRecord (key,value) = DataEntry(key, value) | |
81 | + | ||
82 | + | ||
83 | + | func getBinaryRecord (accountAddress,key) = getBinaryValue(this, key) | |
84 | + | ||
85 | + | ||
86 | + | func setBinaryRecord (key,value) = DataEntry(key, value) | |
87 | + | ||
88 | + | ||
89 | + | func isRecordDefined (key) = if (if (if (isDefined(getBinary(this, key))) | |
90 | + | then true | |
91 | + | else isDefined(getString(this, key))) | |
92 | + | then true | |
93 | + | else isDefined(getBoolean(this, key))) | |
94 | + | then true | |
95 | + | else isDefined(getInteger(this, key)) | |
96 | + | ||
97 | + | ||
98 | + | func setRecuetimeRecordStatusValue (date,veryProductive,productive,neutral,distracting,veryDistracting) = { | |
99 | + | let recordStatusKey = (("record_<" + toString(date)) + ">") | |
100 | + | let rescueTimeConditionAmount = getIntegerRecordOr(this, "rescueTimeConditionAmount", 0) | |
101 | + | let rescueTimeCondition = getStringRecord(this, "rescueTimeCondition") | |
102 | + | let rescueTimeCategory = getStringRecord(this, "rescueTimeCategory") | |
103 | + | let statusValue = if ((rescueTimeCondition == rescueTimeConditionLess)) | |
104 | + | then if ((rescueTimeCategory == rescueTimeCategoryVeryProductive)) | |
105 | + | then (rescueTimeConditionAmount >= veryProductive) | |
106 | + | else if ((rescueTimeCategory == rescueTimeCategoryProductive)) | |
107 | + | then (rescueTimeConditionAmount >= productive) | |
108 | + | else if ((rescueTimeCategory == rescueTimeCategoryNeutral)) | |
109 | + | then (rescueTimeConditionAmount >= neutral) | |
110 | + | else if ((rescueTimeCategory == rescueTimeCategoryDistracting)) | |
111 | + | then (rescueTimeConditionAmount >= distracting) | |
112 | + | else (rescueTimeConditionAmount >= veryDistracting) | |
113 | + | else if ((rescueTimeCategory == rescueTimeCategoryVeryProductive)) | |
114 | + | then (veryProductive >= rescueTimeConditionAmount) | |
115 | + | else if ((rescueTimeCategory == rescueTimeCategoryProductive)) | |
116 | + | then (productive >= rescueTimeConditionAmount) | |
117 | + | else if ((rescueTimeCategory == rescueTimeCategoryNeutral)) | |
118 | + | then (neutral >= rescueTimeConditionAmount) | |
119 | + | else if ((rescueTimeCategory == rescueTimeCategoryDistracting)) | |
120 | + | then (distracting >= rescueTimeConditionAmount) | |
121 | + | else (veryDistracting >= rescueTimeConditionAmount) | |
122 | + | setBooleanRecord(recordStatusKey, statusValue) | |
123 | + | } | |
124 | + | ||
125 | + | ||
126 | + | func getCategoryRecordKey (date,rescueTimeCategoryVeryProductive) = (((("record_<" + toString(date)) + ">__category_<") + rescueTimeCategoryVeryProductive) + ">") | |
127 | + | ||
128 | + | ||
129 | + | func setCategoryRecordValue (date,category,value) = setIntegerRecord(getCategoryRecordKey(date, category), value) | |
130 | + | ||
131 | + | ||
132 | + | @Callable(i) | |
133 | + | func setup (userAddress,integrationService,name,description,startDate,endDate,rescueTimeConditionAmount,rescueTimeCondition,rescueTimeCategory,trackDays,attempsCount,bet,betAsset) = 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), setStringRecord("betAsset", betAsset)]) | |
134 | + | ||
135 | + | ||
136 | + | ||
137 | + | @Callable(i) | |
138 | + | func addRecord (date,veryProductive,productive,neutral,distracting,veryDistracting) = { | |
139 | + | let startDateTimestamp = getIntegerRecordOr(this, "startDate", 0) | |
140 | + | let endDateTimestamp = getIntegerRecordOr(this, "endDate", 0) | |
141 | + | let isOutdatedGoal = if ((startDateTimestamp > date)) | |
142 | + | then (date > endDateTimestamp) | |
143 | + | else false | |
144 | + | let isNotActiveStatus = (getStringRecord(this, "status") != statusPending) | |
145 | + | if (isOutdatedGoal) | |
146 | + | then throwOutdatedGoalError() | |
147 | + | else if (isNotActiveStatus) | |
148 | + | then throwNotActiveGoalError() | |
149 | + | else 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)]) | |
150 | + | } | |
151 | + | ||
152 | + | ||
153 | + | @Verifier(tx) | |
154 | + | func verify () = match tx { | |
155 | + | case t: InvokeScriptTransaction => | |
156 | + | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
157 | + | case _ => | |
158 | + | false | |
159 | + | } | |
160 | + |
github/deemru/w8io/169f3d6 22.61 ms ◑