tx · GHTtampMdJ7L6sYwrumUSMUrHEMz9NHuT557CAm9PM4r 3NAvkjmcnABkkPMF9MkVUTRd8QohzxShzkp: -0.01000000 Waves 2021.02.01 12:51 [1378947] smart account 3NAvkjmcnABkkPMF9MkVUTRd8QohzxShzkp > SELF 0.00000000 Waves
{ "type": 13, "id": "GHTtampMdJ7L6sYwrumUSMUrHEMz9NHuT557CAm9PM4r", "fee": 1000000, "feeAssetId": null, "timestamp": 1612173095259, "version": 2, "chainId": 84, "sender": "3NAvkjmcnABkkPMF9MkVUTRd8QohzxShzkp", "senderPublicKey": "Xbd9p1KqQ1qGuB1yUNe55y1LcEQxQYgnoXR4Sc5XfdB", "proofs": [ "2NyhRDsswksJCKbcsvuRYWufYscWMWu4YPiWL6eZp1y2gLWWD21odZ1wbq4AV3Buxi9BHy3hxSDXd8t2uyXm2T4D" ], "script": "base64:AAIEAAAAAAAAAA0IAhIDCgEIEgQKAggIAAAAAwAAAAALRU1UUFlTVFJJTkcCAAAAAAEAAAAQZ2V0U3RyaW5nRnJvbUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAANzdHIFAAAAByRtYXRjaDAFAAAAA3N0cgUAAAALRU1UUFlTVFJJTkcBAAAADWlzVmFsaWRTZW5kZXIAAAABAAAABnNlbmRlcgQAAAAVZW50cnlGb3JTZW5kZXJBZGRyZXNzCQEAAAAQZ2V0U3RyaW5nRnJvbUtleQAAAAEFAAAABnNlbmRlcgMJAAAAAAAAAgUAAAAVZW50cnlGb3JTZW5kZXJBZGRyZXNzBQAAAAtFTVRQWVNUUklORwcGAAAAAgAAAAFpAQAAAAdhZGRVc2VyAAAAAQAAAARuYW1lBAAAAAZzZW5kZXIJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwMJAQAAAA1pc1ZhbGlkU2VuZGVyAAAAAQUAAAAGc2VuZGVyCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIFAAAABG5hbWUCAAAABHVzZXIFAAAAA25pbAkAAAIAAAABAgAAACBTZW5kZXIgbm90IGFsbG93ZWQgdG8gYWRkIHVzZXJzIQAAAAFpAQAAAA5hZGRSZXF1aXJlbWVudAAAAAIAAAALcmVxdWlyZW1lbnQAAAALZGVzY3JpcHRpb24EAAAABnNlbmRlcgkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzAwkBAAAADWlzVmFsaWRTZW5kZXIAAAABBQAAAAZzZW5kZXIJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkAASwAAAACCQACWAAAAAEIBQAAAAFpAAAADXRyYW5zYWN0aW9uSWQCAAAADF9yZXF1aXJlbWVudAUAAAALcmVxdWlyZW1lbnQJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkAASwAAAACCQACWAAAAAEIBQAAAAFpAAAADXRyYW5zYWN0aW9uSWQCAAAAF19yZXF1aXJlbWVudERlc2NyaXB0aW9uBQAAAAtkZXNjcmlwdGlvbgUAAAADbmlsCQAAAgAAAAECAAAAIFNlbmRlciBub3QgYWxsb3dlZCB0byBhZGQgdXNlcnMhAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAHJG1hdGNoMAUAAAACdHgH5ayCQA==", "height": 1378947, "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(name, "user")] | |
27 | + | else throw("Sender not allowed to add users!") | |
28 | + | } | |
29 | + | ||
30 | + | ||
31 | + | ||
32 | + | @Callable(i) | |
33 | + | func addRequirement (requirement,description) = { | |
34 | + | let sender = toBase58String(i.caller.bytes) | |
35 | + | if (isValidSender(sender)) | |
36 | + | then [StringEntry((toBase58String(i.transactionId) + "_requirement"), requirement), StringEntry((toBase58String(i.transactionId) + "_requirementDescription"), description)] | |
37 | + | else throw("Sender not allowed to add users!") | |
38 | + | } | |
39 | + | ||
40 | + | ||
41 | + | @Verifier(tx) | |
42 | + | func verify () = match tx { | |
43 | + | case _ => | |
44 | + | false | |
45 | + | } | |
46 | + |
github/deemru/w8io/03bedc9 12.91 ms ◑![]()