tx · 38b3VGpcZ1oZmCLsoUQJm6Utu4FGXi9uPTjtaaATwH6g

3N3YQhTjmPkrnrwUFGdPUwkE21B3QDs32hv:  -0.01000000 Waves

2019.11.03 20:30 [749004] smart account 3N3YQhTjmPkrnrwUFGdPUwkE21B3QDs32hv > SELF 0.00000000 Waves

{ "type": 13, "id": "38b3VGpcZ1oZmCLsoUQJm6Utu4FGXi9uPTjtaaATwH6g", "fee": 1000000, "feeAssetId": null, "timestamp": 1572802221369, "version": 1, "sender": "3N3YQhTjmPkrnrwUFGdPUwkE21B3QDs32hv", "senderPublicKey": "4DnSrQryjsXVjb2Pxs61ttXcmLG221iqScdHw6wzMs8V", "proofs": [ "Mid3US75oWLbszRAjq45GxDm2msjW3Eso9UjCNQjg4jGczJu9Q1JuVuNbTMQDZgwBSLUGmH313afjZyt8wfETLh" ], "script": "base64:AAIDAAAAAAAAAB0IARIPCg0ICAgICAgBCAgICAEEEggKBggBAQEBAQAAAAsAAAAAFWdvYWxzSHVudGVyQXBwQWRkcmVzcwkBAAAAHEBleHRyVXNlcihhZGRyZXNzRnJvbVN0cmluZykAAAABAgAAACMzTjRQd3MxaFpHTXczcURkUmpoaW5oWHI2S1ZNa2NnZ2pnTAAAAAAXcmVzY3VlVGltZUNvbmRpdGlvbkxlc3MCAAAABGxlc3MAAAAAF3Jlc2N1ZVRpbWVDb25kaXRpb25Nb3JlAgAAAARtb3JlAAAAACByZXNjdWVUaW1lQ2F0ZWdvcnlWZXJ5UHJvZHVjdGl2ZQIAAAAOdmVyeVByb2R1Y3RpdmUAAAAAHHJlc2N1ZVRpbWVDYXRlZ29yeVByb2R1Y3RpdmUCAAAACnByb2R1Y3RpdmUAAAAAGXJlc2N1ZVRpbWVDYXRlZ29yeU5ldXRyYWwCAAAAB25ldXRyYWwAAAAAHXJlc2N1ZVRpbWVDYXRlZ29yeURpc3RyYWN0aW5nAgAAAAtkaXN0cmFjdGluZwAAAAAhcmVzY3VlVGltZUNhdGVnb3J5VmVyeURpc3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BQAAAA52ZXJ5UHJvZHVjdGl2ZQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAAbcHJvZHVjdGl2ZUNhdGVnb3J5UmVjb3JkS2V5BQAAAApwcm9kdWN0aXZlCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAABhuZXV0cmFsQ2F0ZWdvcnlSZWNvcmRLZXkFAAAAB25ldXRyYWwJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAAHGRpc3RyYWN0aW5nQ2F0ZWdvcnlSZWNvcmRLZXkFAAAAC2Rpc3RyYWN0aW5nCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAACB2ZXJ5RGlzdHJhY3RpbmdDYXRlZ29yeVJlY29yZEtleQUAAAAPdmVyeURpc3RyYWN0aW5nCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAACB2ZXJ5RGlzdHJhY3RpbmdDYXRlZ29yeVJlY29yZEtleQUAAAAPdmVyeURpc3RyYWN0aW5nCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAAA9yZWNvcmRTdGF0dXNLZXkFAAAAEXJlY29yZFN0YXR1c1ZhbHVlBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAABiPAnRg=", "chainId": 84, "height": 749004, "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 3 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let goalsHunterAppAddress = addressFromStringValue("3N4Pws1hZGMw3qDdRjhinhXr6KVMkcggjgL")
5+
6+let rescueTimeConditionLess = "less"
7+
8+let rescueTimeConditionMore = "more"
9+
10+let rescueTimeCategoryVeryProductive = "veryProductive"
11+
12+let rescueTimeCategoryProductive = "productive"
13+
14+let rescueTimeCategoryNeutral = "neutral"
15+
16+let rescueTimeCategoryDistracting = "distracting"
17+
18+let rescueTimeCategoryVeryDistracting = "veryDistracting"
19+
20+func getIntegerFromAccount (accountAddress,key) = match getInteger(accountAddress, key) {
21+ case i: Int =>
22+ i
23+ case _ =>
24+ 0
25+}
26+
27+
28+func getStringFromAccount (accountAddress,key) = match getString(accountAddress, key) {
29+ case i: String =>
30+ i
31+ case _ =>
32+ ""
33+}
34+
35+
36+func getRecordStatusValue (veryProductive,productive,neutral,distracting,veryDistracting) = {
37+ let conditionAmount = getIntegerFromAccount(this, "conditionAmount")
38+ let rescueTimeCondition = getStringFromAccount(this, "rescueTimeCondition")
39+ let rescueTimeCategory = getStringFromAccount(this, "rescueTimeCategory")
40+ if ((rescueTimeCondition == rescueTimeConditionLess))
41+ then if ((rescueTimeCategory == rescueTimeCategoryVeryProductive))
42+ then (conditionAmount >= veryProductive)
43+ else if ((rescueTimeCategory == rescueTimeCategoryVeryProductive))
44+ then (conditionAmount >= productive)
45+ else if ((rescueTimeCategory == rescueTimeCategoryProductive))
46+ then (conditionAmount >= neutral)
47+ else if ((rescueTimeCategory == rescueTimeCategoryNeutral))
48+ then (conditionAmount >= distracting)
49+ else (conditionAmount >= veryDistracting)
50+ else if ((rescueTimeCategory == rescueTimeCategoryVeryProductive))
51+ then (veryProductive >= conditionAmount)
52+ else if ((rescueTimeCategory == rescueTimeCategoryVeryProductive))
53+ then (productive >= conditionAmount)
54+ else if ((rescueTimeCategory == rescueTimeCategoryProductive))
55+ then (neutral >= conditionAmount)
56+ else if ((rescueTimeCategory == rescueTimeCategoryNeutral))
57+ then (distracting >= conditionAmount)
58+ else (veryDistracting >= conditionAmount)
59+ }
60+
61+
62+@Callable(i)
63+func setup (userAddress,integrationServices,name,description,startDate,endDate,conditionAmount,rescueTimeCondition,rescueTimeCategory,trackDays,attempsCount,bet,isPrivate) = WriteSet([DataEntry("userAddress", userAddress), DataEntry("status", "active"), DataEntry("integrationServices", integrationServices), DataEntry("name", name), DataEntry("description", description), DataEntry("startDate", startDate), DataEntry("endDate", endDate), DataEntry("conditionAmount", conditionAmount), DataEntry("rescueTimeCondition", rescueTimeCondition), DataEntry("rescueTimeCategory", rescueTimeCategory), DataEntry("trackDays", trackDays), DataEntry("attempsCount", attempsCount), DataEntry("failedAttemptsCount", 0), DataEntry("bet", bet), DataEntry("isPrivate", isPrivate)])
64+
65+
66+
67+@Callable(i)
68+func addRecord (date,veryProductive,productive,neutral,distracting,veryDistracting) = {
69+ let recordStatusKey = (("record_<" + date) + ">")
70+ let veryProductiveCategoryRecordKey = (((("record_<" + date) + ">__category_<") + rescueTimeCategoryVeryProductive) + ">")
71+ let productiveCategoryRecordKey = (((("record_<" + date) + ">__category_<") + rescueTimeCategoryProductive) + ">")
72+ let neutralCategoryRecordKey = (((("record_<" + date) + ">__category_<") + rescueTimeCategoryNeutral) + ">")
73+ let distractingCategoryRecordKey = (((("record_<" + date) + ">__category_<") + rescueTimeCategoryDistracting) + ">")
74+ let veryDistractingCategoryRecordKey = (((("record_<" + date) + ">__category_<") + rescueTimeCategoryVeryDistracting) + ">")
75+ let recordStatusValue = getRecordStatusValue(veryProductive, productive, neutral, distracting, veryDistracting)
76+ WriteSet([DataEntry(veryProductiveCategoryRecordKey, veryProductive), DataEntry(productiveCategoryRecordKey, productive), DataEntry(neutralCategoryRecordKey, neutral), DataEntry(distractingCategoryRecordKey, distracting), DataEntry(veryDistractingCategoryRecordKey, veryDistracting), DataEntry(veryDistractingCategoryRecordKey, veryDistracting), DataEntry(recordStatusKey, recordStatusValue)])
77+ }
78+
79+
80+@Verifier(tx)
81+func verify () = true
82+

github/deemru/w8io/169f3d6 
29.00 ms