tx · 9ds3wQ2FjtY8FEeqPCzkXcZVjvmBqoGAtzs9Hh8ffjPP 3NB6ox2MsVn1XTGr9pgDcESc6kCa8Bi5RpF: -0.01000000 Waves 2021.03.13 17:07 [1436008] smart account 3NB6ox2MsVn1XTGr9pgDcESc6kCa8Bi5RpF > SELF 0.00000000 Waves
{ "type": 13, "id": "9ds3wQ2FjtY8FEeqPCzkXcZVjvmBqoGAtzs9Hh8ffjPP", "fee": 1000000, "feeAssetId": null, "timestamp": 1615644488521, "version": 2, "chainId": 84, "sender": "3NB6ox2MsVn1XTGr9pgDcESc6kCa8Bi5RpF", "senderPublicKey": "3Q2q23gYtZf22utuRGMc4gByarH4Pj1ZutRTRxVLjxWm", "proofs": [ "4wfomFtsLxtTFXrkfaYK8pZz61n7DYweXzyLiU4NuAaT7dbLQpdnBm2Q2Z6WuH6RUFZTFLiYgjq2FnrK95Us8Q3y" ], "script": "base64:AAIEAAAAAAAAABMIAhIDCgEIEgQKAggIEgQKAggIAAAAAwAAAAALRU1UUFlTVFJJTkcCAAAAAAEAAAAQZ2V0U3RyaW5nRnJvbUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAANzdHIFAAAAByRtYXRjaDAFAAAAA3N0cgUAAAALRU1UUFlTVFJJTkcBAAAADWlzVmFsaWRTZW5kZXIAAAABAAAABnNlbmRlcgQAAAAVZW50cnlGb3JTZW5kZXJBZGRyZXNzCQEAAAAQZ2V0U3RyaW5nRnJvbUtleQAAAAEFAAAABnNlbmRlcgMJAAAAAAAAAgUAAAAVZW50cnlGb3JTZW5kZXJBZGRyZXNzBQAAAAtFTVRQWVNUUklORwcGAAAAAwAAAAFpAQAAAAdhZGRVc2VyAAAAAQAAAARuYW1lBAAAAAZzZW5kZXIJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwMJAQA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AIJAAEsAAAAAgkAASwAAAACCQACWAAAAAEIBQAAAAFpAAAADXRyYW5zYWN0aW9uSWQCAAAADV9yZXF1aXJlbWVudF8FAAAAEnJlcXVpcmVtZW50QWRkcmVzcwIAAAATX2FjY2VwdGFuY2Vjcml0ZXJpYQUAAAASYWNjZXB0YW5jZUNyaXRlcmlhBQAAAANuaWwJAAACAAAAAQIAAAAgU2VuZGVyIG5vdCBhbGxvd2VkIHRvIGFkZCB1c2VycyEAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAABAAAAAckbWF0Y2gwBQAAAAJ0eAfv0iHs", "height": 1436008, "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) + "_requirement_name"), requirement), StringEntry((toBase58String(i.transactionId) + "_requirement_description"), requirementDescription)] | |
37 | + | else throw("Sender not allowed to add users!") | |
38 | + | } | |
39 | + | ||
40 | + | ||
41 | + | ||
42 | + | @Callable(i) | |
43 | + | func addAcceptanceCriteria (requirementAddress,acceptanceCriteria) = { | |
44 | + | let sender = toBase58String(i.caller.bytes) | |
45 | + | if (isValidSender(sender)) | |
46 | + | then [StringEntry((((toBase58String(i.transactionId) + "_requirement_") + requirementAddress) + "_acceptancecriteria"), acceptanceCriteria)] | |
47 | + | else throw("Sender not allowed to add users!") | |
48 | + | } | |
49 | + | ||
50 | + | ||
51 | + | @Verifier(tx) | |
52 | + | func verify () = match tx { | |
53 | + | case _ => | |
54 | + | false | |
55 | + | } | |
56 | + |
github/deemru/w8io/03bedc9 29.09 ms ◑![]()