tx · HREr9sZyM5xXy2aMHj88pYFsVpPeR2Jbh6Jh6FGtkmtv 3N7gDAesioPnkoUPGvC4wsoGe3gmfAt1Dat: -0.01000000 Waves 2021.03.16 14:19 [1440199] smart account 3N7gDAesioPnkoUPGvC4wsoGe3gmfAt1Dat > SELF 0.00000000 Waves
{ "type": 13, "id": "HREr9sZyM5xXy2aMHj88pYFsVpPeR2Jbh6Jh6FGtkmtv", "fee": 1000000, "feeAssetId": null, "timestamp": 1615893621870, "version": 2, "chainId": 84, "sender": "3N7gDAesioPnkoUPGvC4wsoGe3gmfAt1Dat", "senderPublicKey": "5fU7WaAeJa3G4u8hhN4f4pPgDNKKzYc26H69gG3wfij1", "proofs": [ "2YHnxbHVLz9rDNsJJyv7pFdVXApNVXjPqUAChXqYbNbuXUES1pwC26YzMDF9M1YxK3NKR8gtSHSdHNPWNGHzP3gc" ], "script": "base64:AAIEAAAAAAAAACAIAhIDCgEIEgQKAggIEgUKAwgICBIECgIICBIECgIICAAAAAMAAAAAC0VNVFBZU1RSSU5HAgAAAAABAAAAEGdldFN0cmluZ0Zyb21LZXkAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAADc3RyBQAAAAckbWF0Y2gwBQAAAANzdHIFAAAAC0VNVFBZU1RSSU5HAQAAAA1pc1ZhbGlkU2VuZGVyAAAAAQAAAAZzZW5kZXIEAAAAFWVudHJ5Rm9yU2VuZGVyQWRkcmVzcwkBAAAAEGdldFN0cmluZ0Zyb21LZXkAAAABBQAAAAZzZW5kZXIDCQAAAAAAAAIFAAAAFWVudHJ5Rm9yU2VuZGVyQWRkcmVzcwUAAAALRU1UUFlTVFJJTkcHBgAAAAUAAAABaQEAAAAHYWRkVXNlcgAAAAEAAAAEbmFtZQQAAAAGc2VuZGVyCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMDCQ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XMDCQEAAAANaXNWYWxpZFNlbmRlcgAAAAEFAAAABnNlbmRlcgkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQACWAAAAAEIBQAAAAFpAAAADXRyYW5zYWN0aW9uSWQCAAAADV9yZXF1aXJlbWVudF8FAAAAEnJlcXVpcmVtZW50QWRkcmVzcwIAAAATX2FjY2VwdGFuY2Vjcml0ZXJpYQUAAAASYWNjZXB0YW5jZUNyaXRlcmlhBQAAAANuaWwJAAACAAAAAQIAAAAgU2VuZGVyIG5vdCBhbGxvd2VkIHRvIGFkZCB1c2VycyEAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAABAAAAAckbWF0Y2gwBQAAAAJ0eAd0ZceU", "height": 1440199, "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) + "_milestone"), milestone), StringEntry((toBase58String(i.transactionId) + "_estimatedDate"), estimatedDate), StringEntry((toBase58String(i.transactionId) + "_createdDate"), 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((("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 | + | @Verifier(tx) | |
72 | + | func verify () = match tx { | |
73 | + | case _ => | |
74 | + | false | |
75 | + | } | |
76 | + |
github/deemru/w8io/03bedc9 15.38 ms ◑![]()