tx · EjVBa1xgEKhAhKqQmVb83oW6fnWe7kfkqHWAEAbaJT46

3MrY2B4BMDLsndDAeCfHeyVQchyo6fcXnUW:  -0.01000000 Waves

2022.02.21 23:15 [1933888] smart account 3MrY2B4BMDLsndDAeCfHeyVQchyo6fcXnUW > SELF 0.00000000 Waves

{ "type": 13, "id": "EjVBa1xgEKhAhKqQmVb83oW6fnWe7kfkqHWAEAbaJT46", "fee": 1000000, "feeAssetId": null, "timestamp": 1645474510456, "version": 2, "chainId": 84, "sender": "3MrY2B4BMDLsndDAeCfHeyVQchyo6fcXnUW", "senderPublicKey": "4NgQjohUrh7azxu2PyFFPyoCJBuDACKTvjEEeLuGza9P", "proofs": [ "3Yyqqs4rTH3fGvnFWQoP6XQvHi64ZSEEuzMhHeBUDj4ap8qKxoU3juJEPHfbcZNcTWbygPw3UfmdMpvPE6aFjjrq" ], "script": "base64:AAIFAAAAAAAAAAcIAhIDCgEIAAAAAgEAAAAPZ2V0QWNjZXNzU3RhdHVzAAAAAQAAAANrZXkJAAEsAAAAAgkAASwAAAACAgAAAAV1c2VyXwUAAAADa2V5AgAAAAdfYWNjZXNzAQAAAAloYXNBY2Nlc3MAAAABAAAAB2FkZHJlc3MEAAAAByRtYXRjaDAJAAQiAAAAAQkBAAAAD2dldEFjY2Vzc1N0YXR1cwAAAAEFAAAAB2FkZHJlc3MDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABcwUAAAAHJG1hdGNoMAYHAAAAAQAAAAFpAQAAAAlhdXRob3JpemUAAAABAAAABXRva2VuBAAAAAdhZGRyZXNzCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMDCQEAAAACIT0AAAACCQEAAAAJaGFzQWNjZXNzAAAAAQUAAAAHYWRkcmVzcwYJAAACAAAAAQIAAAAJTm8gQWNjZXNzCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIJAQAAAA9nZXRBY2Nlc3NTdGF0dXMAAAABBQAAAAdhZGRyZXNzBQAAAAV0b2tlbgUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAHc21hcnRQSwEAAAAg7FpWyjKbzVZft//RzetcP6VR/RgE9mP8EUAKGEvbQl0EAAAABXNtYXJ0CQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAUAAAAHc21hcnRQSwQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAFFNldFNjcmlwdFRyYW5zYWN0aW9uBAAAAAF0BQAAAAckbWF0Y2gwBQAAAAVzbWFydAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAPRGF0YVRyYW5zYWN0aW9uBAAAAAF0BQAAAAckbWF0Y2gwBQAAAAVzbWFydAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAXSW52b2tlU2NyaXB0VHJhbnNhY3Rpb24EAAAAAXQFAAAAByRtYXRjaDAGAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABNUcmFuc2ZlclRyYW5zYWN0aW9uBAAAAAF0BQAAAAckbWF0Y2gwBQAAAAVzbWFydAeWB4iV", "height": 1933888, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 5 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+func getAccessStatus (key) = (("user_" + key) + "_access")
5+
6+
7+func hasAccess (address) = match getString(getAccessStatus(address)) {
8+ case s: String =>
9+ true
10+ case _ =>
11+ false
12+}
13+
14+
15+@Callable(i)
16+func authorize (token) = {
17+ let address = toBase58String(i.caller.bytes)
18+ if ((hasAccess(address) != true))
19+ then throw("No Access")
20+ else [StringEntry(getAccessStatus(address), token)]
21+ }
22+
23+
24+@Verifier(tx)
25+func verify () = {
26+ let smartPK = base58'Gud7Z17wiZEMZiHRbn48k2D9H13jmLEDZZ8b7NCfjRJL'
27+ let smart = sigVerify(tx.bodyBytes, tx.proofs[0], smartPK)
28+ match tx {
29+ case t: SetScriptTransaction =>
30+ smart
31+ case t: DataTransaction =>
32+ smart
33+ case t: InvokeScriptTransaction =>
34+ true
35+ case t: TransferTransaction =>
36+ smart
37+ case _ =>
38+ false
39+ }
40+ }
41+

github/deemru/w8io/169f3d6 
17.37 ms