tx · He3qQYAotDYyBDLrrqX3LDvy9yHnm8knnzEHF35fHBd8 3NBTaQWocEgTPqF54fZR1Rr8vr5FczGtQGi: -0.01000000 Waves 2021.03.16 23:05 [1440728] smart account 3NBTaQWocEgTPqF54fZR1Rr8vr5FczGtQGi > SELF 0.00000000 Waves
{ "type": 13, "id": "He3qQYAotDYyBDLrrqX3LDvy9yHnm8knnzEHF35fHBd8", "fee": 1000000, "feeAssetId": null, "timestamp": 1615925194504, "version": 2, "chainId": 84, "sender": "3NBTaQWocEgTPqF54fZR1Rr8vr5FczGtQGi", "senderPublicKey": "GLPHtR6QPHrUisuaagr4XDucurAjnjoYnTfZfp8pXxT7", "proofs": [ "3ih263wzy7673jKNbG8CqZGRyxFC9Xgh2sUmX3uZAC65ytajsGYNcjTRH8eM57xhRAnVFWDiyZrZUwyMYQx3vhBY" ], "script": "base64:AAIEAAAAAAAAADMIAhIDCgEIEgQKAggIEgUKAwgICBIECgIICBIECgIICBIFCgMICAgSBAoCCAgSBAoCCAgAAAADAAAAAAtFTVRQWVNUUklORwIAAAAAAQAAABBnZXRTdHJpbmdGcm9tS2V5AAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAA3N0cgUAAAAHJG1hdGNoMAUAAAADc3RyBQAAAAtFTVRQWVNUUklORwEAAAANaXNWYWxpZFNlbmRlcgAAAAEAAAAGc2VuZGVyBAAAABVlbnRyeUZvclNlbmRlckFkZHJlc3MJAQAAABBnZXRTdHJpbmdGcm9tS2V5AAAAAQUAAAAGc2VuZGVyAwkAAAAAAAACBQAAABVlbnRyeUZvclNlbmRlckFkZHJlc3MFAAAAC0VNVFBZU1RSSU5HBwYAAAAIAAAAAWkBAAAAB2FkZFVzZXIAAAABAAAABG5hbWUEAAAABnNlbmRlcgkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dG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ALX3Rhc2tTdGF0dXMCAAAABkNMT1NFRAUAAAADbmlsCQAAAgAAAAECAAAAIFNlbmRlciBub3QgYWxsb3dlZCB0byBhZGQgdXNlcnMhAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAHJG1hdGNoMAUAAAACdHgH7QoMig==", "height": 1440728, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 4 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let EMTPYSTRING = "" | |
5 | + | ||
6 | + | func getStringFromKey (key) = match getString(this, key) { | |
7 | + | case str: String => | |
8 | + | str | |
9 | + | case _ => | |
10 | + | EMTPYSTRING | |
11 | + | } | |
12 | + | ||
13 | + | ||
14 | + | func isValidSender (sender) = { | |
15 | + | let entryForSenderAddress = getStringFromKey(sender) | |
16 | + | if ((entryForSenderAddress == EMTPYSTRING)) | |
17 | + | then false | |
18 | + | else true | |
19 | + | } | |
20 | + | ||
21 | + | ||
22 | + | @Callable(i) | |
23 | + | func addUser (name) = { | |
24 | + | let sender = toBase58String(i.caller.bytes) | |
25 | + | if (isValidSender(sender)) | |
26 | + | then [StringEntry((toBase58String(i.transactionId) + "_user"), name)] | |
27 | + | else throw("Sender not allowed to add users!") | |
28 | + | } | |
29 | + | ||
30 | + | ||
31 | + | ||
32 | + | @Callable(i) | |
33 | + | func addRequirement (requirement,requirementDescription) = { | |
34 | + | let sender = toBase58String(i.caller.bytes) | |
35 | + | if (isValidSender(sender)) | |
36 | + | then [StringEntry((toBase58String(i.transactionId) + "_requirementName"), requirement), StringEntry((toBase58String(i.transactionId) + "_requirementDescription"), requirementDescription)] | |
37 | + | else throw("Sender not allowed to add users!") | |
38 | + | } | |
39 | + | ||
40 | + | ||
41 | + | ||
42 | + | @Callable(i) | |
43 | + | func addMilestone (milestone,estimatedDate,createdDate) = { | |
44 | + | let sender = toBase58String(i.caller.bytes) | |
45 | + | if (isValidSender(sender)) | |
46 | + | then [StringEntry((toBase58String(i.transactionId) + "_milestoneDef"), milestone), StringEntry((toBase58String(i.transactionId) + "_milestoneEstimatedDate"), estimatedDate), StringEntry((toBase58String(i.transactionId) + "_milestoneCreatedDate"), createdDate)] | |
47 | + | else throw("Sender not allowed to add users!") | |
48 | + | } | |
49 | + | ||
50 | + | ||
51 | + | ||
52 | + | @Callable(i) | |
53 | + | func setMilestoneRequirementRelation (milestoneTransactionId,requirementTransactionId) = { | |
54 | + | let sender = toBase58String(i.caller.bytes) | |
55 | + | if (isValidSender(sender)) | |
56 | + | then [StringEntry((((toBase58String(i.transactionId) + "_milestone_") + milestoneTransactionId) + "_requirement"), requirementTransactionId)] | |
57 | + | else throw("Sender not allowed to add users!") | |
58 | + | } | |
59 | + | ||
60 | + | ||
61 | + | ||
62 | + | @Callable(i) | |
63 | + | func addAcceptanceCriteria (requirementAddress,acceptanceCriteria) = { | |
64 | + | let sender = toBase58String(i.caller.bytes) | |
65 | + | if (isValidSender(sender)) | |
66 | + | then [StringEntry((((toBase58String(i.transactionId) + "_requirement_") + requirementAddress) + "_acceptancecriteria"), acceptanceCriteria)] | |
67 | + | else throw("Sender not allowed to add users!") | |
68 | + | } | |
69 | + | ||
70 | + | ||
71 | + | ||
72 | + | @Callable(i) | |
73 | + | func addTask (requirementAddress,taskname,taskdescrription) = { | |
74 | + | let sender = toBase58String(i.caller.bytes) | |
75 | + | if (isValidSender(sender)) | |
76 | + | then [StringEntry((((toBase58String(i.transactionId) + "_requirement_") + requirementAddress) + "_taskName"), taskname), StringEntry((((toBase58String(i.transactionId) + "_requirement_") + requirementAddress) + "_taskDescription"), taskdescrription), StringEntry((((toBase58String(i.transactionId) + "_requirement_") + requirementAddress) + "_taskStatus"), "OPEN")] | |
77 | + | else throw("Sender not allowed to add users!") | |
78 | + | } | |
79 | + | ||
80 | + | ||
81 | + | ||
82 | + | @Callable(i) | |
83 | + | func changeTasksStatusToInProgress (requirementAddress,taskAddress) = { | |
84 | + | let sender = toBase58String(i.caller.bytes) | |
85 | + | if (isValidSender(sender)) | |
86 | + | then [StringEntry((((taskAddress + "_requirement_") + requirementAddress) + "_taskStatus"), "IN PROGRESS")] | |
87 | + | else throw("Sender not allowed to add users!") | |
88 | + | } | |
89 | + | ||
90 | + | ||
91 | + | ||
92 | + | @Callable(i) | |
93 | + | func changeTasksStatusToClosed (requirementAddress,taskAddress) = { | |
94 | + | let sender = toBase58String(i.caller.bytes) | |
95 | + | if (isValidSender(sender)) | |
96 | + | then [StringEntry((((taskAddress + "_requirement_") + requirementAddress) + "_taskStatus"), "CLOSED")] | |
97 | + | else throw("Sender not allowed to add users!") | |
98 | + | } | |
99 | + | ||
100 | + | ||
101 | + | @Verifier(tx) | |
102 | + | func verify () = match tx { | |
103 | + | case _ => | |
104 | + | false | |
105 | + | } | |
106 | + |
github/deemru/w8io/03bedc9 16.84 ms ◑![]()