tx · CCGoNuCe8aAhpRtGgdhNyuiLxf48cboTLAkRBCvAK6sf

3N8WReJD4Qpop8qu1h5ULusVwUmnt7yemiP:  -0.01000000 Waves

2019.08.02 22:11 [613629] smart account 3N8WReJD4Qpop8qu1h5ULusVwUmnt7yemiP > SELF 0.00000000 Waves

{ "type": 13, "id": "CCGoNuCe8aAhpRtGgdhNyuiLxf48cboTLAkRBCvAK6sf", "fee": 1000000, "feeAssetId": null, "timestamp": 1564773117067, "version": 1, "sender": "3N8WReJD4Qpop8qu1h5ULusVwUmnt7yemiP", "senderPublicKey": "GGFF77SnpJEQmG1T1Gidevd7cUEUVccwW3q8TZ1DoRfj", "proofs": [ "3fM3Z8BXMsvZ1rTtJKRniJijU4GoWKza9wpgHAEpXxq1A9sjuqHViDcfWBcWCUFrxHVg8LTUNHVwxCNLfhRyCTCg" ], "script": "base64:AAIDAAAAAAAAAAAAAAAFAAAAAAtFTVRQWVNUUklORwIAAAAAAAAAAAlFVkFMVUFURUQCAAAACUVWQUxVQVRFRAEAAAAQZ2V0U3RyaW5nRnJvbUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAANzdHIFAAAAByRtYXRjaDAFAAAAA3N0cgUAAAALRU1UUFlTVFJJTkcBAAAADWlzVmFsaWRTZW5kZXIAAAABAAAABnNlbmRlcgQAAAAVZW50cnlGb3JTZW5kZXJBZGRyZXNzCQEAAAAQZ2V0U3RyaW5nRnJvbUtleQAAAAEFAAAABnNlbmRlcgMJAAAAAAAAAgUAAAAVZW50cnlGb3JTZW5kZXJBZGRyZXNzBQAAAAtFTVRQWVNUUklORwcGAQAAABVzZW5kZXJOb3RZZXRFdmFsdWF0ZWQAAAABAAAABnNlbmRlcgQAAAAVZW50cnlGb3JTZW5kZXJBZGRyZXNzCQEAAAAQZ2V0U3RyaW5nRnJvbUtleQAAAAEFA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GlvbgUAAAADbmlsCQAAAgAAAAECAAAAKFNlbmRlciBub3QgYWxsb3dlZCB0byBjb25zb2xpZGF0ZSByaXNrcyEAAAABaQEAAAAMZXZhbHVhdGVSaXNrAAAAAwAAAAJpZAAAAAtwcm9iYWJpbGl0eQAAAAZpbXBhY3QEAAAABnNlbmRlcgkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzAwMJAQAAAA1pc1ZhbGlkU2VuZGVyAAAAAQUAAAAGc2VuZGVyCQEAAAAVc2VuZGVyTm90WWV0RXZhbHVhdGVkAAAAAQUAAAAGc2VuZGVyBwkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgUAAAACaWQCAAAAAV8JAAJYAAAAAQgFAAAAAWkAAAANdHJhbnNhY3Rpb25JZAIAAAAFX3Byb2IFAAAAC3Byb2JhYmlsaXR5CQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACBQAAAAJpZAIAAAABXwkAAlgAAAABCAUAAAABaQAAAA10cmFuc2FjdGlvbklkAgAAAARfaW1wBQAAAAZpbXBhY3QJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAABnNlbmRlcgUAAAAJRVZBTFVBVEVEBQAAAANuaWwJAAACAAAAAQIAAAA0U2VuZGVyIG5vdCBhbGxvd2VkIHRvIGV2YWx1YXRlIG9yIGV2YWx1YXRlZCBhbHJlYWR5IQAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAByRtYXRjaDAFAAAAAnR4Bp02bSk=", "chainId": 84, "height": 613629, "spentComplexity": 0 } View: original | compacted Prev: none Next: ESvAxyGDVEXEdJnCMRK1p2kDMFh8xtbxKiojNv9KQdmS Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 3 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let EMTPYSTRING = ""
5+
6+let EVALUATED = "EVALUATED"
7+
8+func getStringFromKey (key) = match getString(this, key) {
9+ case str: String =>
10+ str
11+ case _ =>
12+ EMTPYSTRING
13+}
14+
15+
16+func isValidSender (sender) = {
17+ let entryForSenderAddress = getStringFromKey(sender)
18+ if ((entryForSenderAddress == EMTPYSTRING))
19+ then false
20+ else true
21+ }
22+
23+
24+func senderNotYetEvaluated (sender) = {
25+ let entryForSenderAddress = getStringFromKey(sender)
26+ if ((entryForSenderAddress != EVALUATED))
27+ then true
28+ else false
29+ }
30+
31+
32+@Callable(i)
33+func addRisk (name,description) = {
34+ let sender = toBase58String(i.caller.bytes)
35+ if (isValidSender(sender))
36+ then WriteSet([DataEntry((toBase58String(i.transactionId) + "_name"), name), DataEntry((toBase58String(i.transactionId) + "_description"), description)])
37+ else throw("Sender not allowed to store risks!")
38+ }
39+
40+
41+
42+@Callable(i)
43+func addConsolidatedRisk (name,description) = {
44+ let sender = toBase58String(i.caller.bytes)
45+ if (isValidSender(sender))
46+ then WriteSet([DataEntry((toBase58String(i.transactionId) + "_consolidated_name"), name), DataEntry((toBase58String(i.transactionId) + "_consolidated_description"), description)])
47+ else throw("Sender not allowed to consolidate risks!")
48+ }
49+
50+
51+
52+@Callable(i)
53+func evaluateRisk (id,probability,impact) = {
54+ let sender = toBase58String(i.caller.bytes)
55+ if (if (isValidSender(sender))
56+ then senderNotYetEvaluated(sender)
57+ else false)
58+ then WriteSet([DataEntry((((id + "_") + toBase58String(i.transactionId)) + "_prob"), probability), DataEntry((((id + "_") + toBase58String(i.transactionId)) + "_imp"), impact), DataEntry(sender, EVALUATED)])
59+ else throw("Sender not allowed to evaluate or evaluated already!")
60+ }
61+
62+
63+@Verifier(tx)
64+func verify () = match tx {
65+ case _ =>
66+ true
67+}
68+

github/deemru/w8io/026f985 
16.75 ms