tx · GGZYLwPcsSVmiogqJdW8gzV2tEaj9rqCrAk2X4bucUrG

3N1LKvrAUKZA6ZkaZs7zRHLUmRUz3wXKA5h:  -0.01000000 Waves

2020.07.26 23:05 [1104999] smart account 3N1LKvrAUKZA6ZkaZs7zRHLUmRUz3wXKA5h > SELF 0.00000000 Waves

{ "type": 13, "id": "GGZYLwPcsSVmiogqJdW8gzV2tEaj9rqCrAk2X4bucUrG", "fee": 1000000, "feeAssetId": null, "timestamp": 1595793949935, "version": 1, "sender": "3N1LKvrAUKZA6ZkaZs7zRHLUmRUz3wXKA5h", "senderPublicKey": "BpfmpVMdjKpox3z35iPV7xmaqFZ878wffzpuTjrQHvei", "proofs": [ "fLndqR6VBUEbpzco9FpZWaDzyqMnH7eSWJBg4k71VXAvwzQ17N68a2xRSyNrR53LdL52ssLjTRC2GKUHhHDZMNz" ], "script": "base64:AAIDAAAAAAAAAA4IARIFCgMICAgSAwoBCAAAAAEBAAAAF2NoZWNrQWRkcmVzc0luV2hpdGVsaXN0AAAAAQAAAAdhZGRyZXNzBgAAAAIAAAABaQEAAAANc3VibWl0QXJ0aWNsZQAAAAMAAAADYWlkAAAABXRpdGxlAAAABHRleHQEAAAAA2NpZAkAASwAAAACCQABLAAAAAIFAAAAA2FpZAIAAAABXwkABCUAAAABCAUAAAABaQAAAAZjYWxsZXIJAQAAAAxTY3JpcHRSZXN1bHQAAAACCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIFAAAAA2NpZAIAAAAFX3RleHQFAAAABHRleHQFAAAAA25pbAkBAAAAC1RyYW5zZmVyU2V0AAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIJAABoAAAAAgAAAAAAAAAABQAAAAAAAAGGoAUAAAAEdW5pdAUAAAADbmlsAAAAAWkBAAAAC3JlYWRBcnRpY2xlAAAAAQAAAANjaWQDCQAAAAAAAAIJAQAAABdjaGVja0FkZHJlc3NJbldoaXRlbGlzdAAAAAEIBQAAAAFpAAAABmNhbGxlcgcJAAACAAAAAQIAAAAgTm90IGluIHRoZSB2ZXJpZmllZCByZWFkZXJzIGxpc3QEAAAABXZpZXdzCQAEHQAAAAIFAAAABHRoaXMJAAEsAAAAAgUAAAADY2lkAgAAAAZfdmlld3MEAAAAEGN1cnJlbnRWaWV3U3RhdGUEAAAAByRtYXRjaDAJAAQbAAAAAgUAAAAEdGhpcwkAASwAAAACCQABLAAAAAIFAAAAA2NpZAIAAAAGX3ZpZXdfCQAEJQAAAAEIBQAAAAFpAAAABmNhbGxlcgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAHQm9vbGVhbgQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQcDBQAAABBjdXJyZW50Vmlld1N0YXRlCQAAAgAAAAECAAAADkFscmVhZHkgdmlld2VkCQEAAAAMU2NyaXB0UmVzdWx0AAAAAgkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIFAAAAA2NpZAIAAAAGX3ZpZXdfCQAEJQAAAAEIBQAAAAFpAAAABmNhbGxlcgYFAAAAA25pbAkBAAAAC1RyYW5zZmVyU2V0AAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIJAABoAAAAAgAAAAAAAAAABQAAAAAAAAGGoAUAAAAEdW5pdAUAAAADbmlsAAAAAJwZMLc=", "chainId": 84, "height": 1104999, "spentComplexity": 0 } View: original | compacted Prev: none Next: 2iQ6e544xboWwhTknN2f9pTciSTkNxoV8iAZ2KoYKP8j Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 3 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+func checkAddressInWhitelist (address) = true
5+
6+
7+@Callable(i)
8+func submitArticle (aid,title,text) = {
9+ let cid = ((aid + "_") + toString(i.caller))
10+ ScriptResult(WriteSet([DataEntry((cid + "_text"), text)]), TransferSet([ScriptTransfer(i.caller, (5 * 100000), unit)]))
11+ }
12+
13+
14+
15+@Callable(i)
16+func readArticle (cid) = if ((checkAddressInWhitelist(i.caller) == false))
17+ then throw("Not in the verified readers list")
18+ else {
19+ let views = getString(this, (cid + "_views"))
20+ let currentViewState = match getBoolean(this, ((cid + "_view_") + toString(i.caller))) {
21+ case a: Boolean =>
22+ a
23+ case _ =>
24+ false
25+ }
26+ if (currentViewState)
27+ then throw("Already viewed")
28+ else ScriptResult(WriteSet([DataEntry(((cid + "_view_") + toString(i.caller)), true)]), TransferSet([ScriptTransfer(i.caller, (5 * 100000), unit)]))
29+ }
30+
31+

github/deemru/w8io/169f3d6 
24.70 ms