tx · E5mxK6vqbRsnZNkr39B6j99G8Zb5WMamn1iECkaSWaVv 3MwhZUu4CdxSmM4Sdw83UengjTuB9tNRfat: -0.01000000 Waves 2021.03.16 16:40 [1440345] smart account 3MwhZUu4CdxSmM4Sdw83UengjTuB9tNRfat > SELF 0.00000000 Waves
{ "type": 13, "id": "E5mxK6vqbRsnZNkr39B6j99G8Zb5WMamn1iECkaSWaVv", "fee": 1000000, "feeAssetId": null, "timestamp": 1615902066280, "version": 2, "chainId": 84, "sender": "3MwhZUu4CdxSmM4Sdw83UengjTuB9tNRfat", "senderPublicKey": "B8D9mTsLQND5HkBt18f2EFruqHNYWYniqqb4wWTwRXib", "proofs": [ "53VNPc82kp5EdhA1DVoj4FDoucq5WHLv7cZjkUkAYuoTLeWYLGBSXUzbDpDZd4x8fwG1EtKjtYrEnrWnsko5XrPq" ], "script": "base64:AAIEAAAAAAAAACAIAhIDCgEIEgQKAggIEgUKAwgICBIECgIICBIECgIICAAAAAMAAAAAC0VNVFBZU1RSSU5HAgAAAAABAAAAEGdldFN0cmluZ0Zyb21LZXkAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAADc3RyBQAAAAckbWF0Y2gwBQAAAANzdHIFAAAAC0VNVFBZU1RSSU5HAQAAAA1pc1ZhbGlkU2VuZGVyAAAAAQAAAAZzZW5kZXIEAAAAFWVudHJ5Rm9yU2VuZGVyQWRkcmVzcwkBAAAAEGdldFN0cmluZ0Zyb21LZXkAAAABBQAAAAZzZW5kZXIDCQAAAAAAAAIFAAAAFWVudHJ5Rm9yU2VuZGVyQWRkcmVzcwUAAAALRU1UUFlTVFJJTkcHBgAAAAUAAAABaQEAAAAHYWRkVXNlcgAAAAEAAAAEbmFtZQQAAAAGc2VuZGVyCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMDCQEAAAANaXNWYW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IAAAAFYnl0ZXMDCQEAAAANaXNWYWxpZFNlbmRlcgAAAAEFAAAABnNlbmRlcgkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQACWAAAAAEIBQAAAAFpAAAADXRyYW5zYWN0aW9uSWQCAAAADV9yZXF1aXJlbWVudF8FAAAAEnJlcXVpcmVtZW50QWRkcmVzcwIAAAATX2FjY2VwdGFuY2Vjcml0ZXJpYQUAAAASYWNjZXB0YW5jZUNyaXRlcmlhBQAAAANuaWwJAAACAAAAAQIAAAAgU2VuZGVyIG5vdCBhbGxvd2VkIHRvIGFkZCB1c2VycyEAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAABAAAAAckbWF0Y2gwBQAAAAJ0eAcMVaqx", "height": 1440345, "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((("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 16.64 ms ◑![]()