tx · FFezNEZ8yGjhDV9vLy468prmn4jJqkaDUkuUX7ikgiPZ 3MqxhXjG6DVDwFuLsaBz7sgt38iwHj9Da7f: -0.01000000 Waves 2022.10.26 00:39 [2288486] smart account 3MqxhXjG6DVDwFuLsaBz7sgt38iwHj9Da7f > SELF 0.00000000 Waves
{ "type": 13, "id": "FFezNEZ8yGjhDV9vLy468prmn4jJqkaDUkuUX7ikgiPZ", "fee": 1000000, "feeAssetId": null, "timestamp": 1666734012869, "version": 2, "chainId": 84, "sender": "3MqxhXjG6DVDwFuLsaBz7sgt38iwHj9Da7f", "senderPublicKey": "24F9Fvi53bZzs4e399kBtXVRriDkrJjjVpfMwrVBfX9N", "proofs": [ "3Pi31dYZZbS9UaEGuqDaiPfGfAuRGWBstZgPbm9eW51TWAKVu3RNstx2MD1vgJFh3TXaYwBpoJSrYZpir2Zaxmwt" ], "script": "base64:BgJDCAISBwoFCAgICAgSDAoKCAgICAgICAgICBIECgIICBIMCgoICAgICAgICAgIEggKBggICAgICBIECgIICBIECgIICAUAEGFkbWluX3dhbGxldF9vbmUCIzNOOHg5bWI0ODFpMms2Y0c3UTlYVVYzZTVuemgxbWR6c055ABBhZG1pbl93YWxsZXRfdHdvAiMzTjNEQ25namlkaXZrSmJUSndGVEV2YllSVGZmQ1dWQkxDTAASYWRtaW5fd2FsbGV0X3RocmVlAiMzTjkxVkJrdG9UUFNCTDZOa0hSc0FNMURMV0gyVDZxdlFycwEUY2hlY2tfYWRtaW5zX3dhbGxldHMBC3VzZXJfd2FsbGV0AwMDCQAAAgULdXNlcl93YWxsZXQFEGFkbWluX3dhbGxldF9vbmUGCQAAAgULdXNlcl93YWxsZXQFEGFkbWluX3dhbGxldF90d28GCQAAAgULdXNlcl93YWxsZXQFEmFkbWluX3dhbGxldF90aHJlZQYHAQ10cnlHZXRJbnRlZ2VyAQNrZXkEByRtYXRjaDAJAJoIAgUEdGhpcwUDa2V5AwkAAQIFByRtYXRjaDACA0ludAQBYgUHJG1hdGNoMA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nN0b3J5XwULc3RvcnlfdHhfaWQCDF9mYXZvcml0ZV9pZAkAZAIFAmlkAAEJAMwIAgkBDEludGVnZXJFbnRyeQIJAKwCAgkArAICAgV1c2VyXwUGd2FsbGV0AgxfZmF2b3JpdGVfaWQJAGQCBQd1c2VyX2lkAAEFA25pbAkAAgECVUVSUlJPUiAhLCBhZGRfdG9fZmF2b3JpdGVzLCBNRVNTQUdFOiBzb3JyeSB5b3UgYXJlIG5vdCBhbGxvdyB0byBpbnZva2UgdGhpcyBmdW5hY3Rpb24BAnR4AQZ2ZXJpZnkACQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5iRrotw==", "height": 2288486, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DGFdcXhBYsZjySHdzD5pNtzkVs6F15yRBH1CwxR5xBuo Next: E3vree88TY7N7KM2Zk4bcU87y7ksfM7PkNg26KBhqtP Diff:
Old | New | Differences | |
---|---|---|---|
29 | 29 | then true | |
30 | 30 | else check_admins_wallets(toString(i.caller))) | |
31 | 31 | then { | |
32 | - | let tx_id = | |
32 | + | let tx_id = toBase64String(i.transactionId) | |
33 | 33 | [StringEntry((("blog_" + tx_id) + "_publisher"), publisher), StringEntry((("blog_" + tx_id) + "_arweave_tx_id"), arweave_tx_id), StringEntry((("blog_" + tx_id) + "_signature"), signature), StringEntry((("blog_" + tx_id) + "_blog_cover"), blog_cover), StringEntry((("blog_" + tx_id) + "_titel"), titel)] | |
34 | 34 | } | |
35 | 35 | else throw("ERRROR !, add_blog, MESSAGE: sorry you are not allow to invoke this funaction") |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let admin_wallet_one = "3N8x9mb481i2k6cG7Q9XUV3e5nzh1mdzsNy" | |
5 | 5 | ||
6 | 6 | let admin_wallet_two = "3N3DCngjidivkJbTJwFTEvbYRTffCWVBLCL" | |
7 | 7 | ||
8 | 8 | let admin_wallet_three = "3N91VBktoTPSBL6NkHRsAM1DLWH2T6qvQrs" | |
9 | 9 | ||
10 | 10 | func check_admins_wallets (user_wallet) = if (if (if ((user_wallet == admin_wallet_one)) | |
11 | 11 | then true | |
12 | 12 | else (user_wallet == admin_wallet_two)) | |
13 | 13 | then true | |
14 | 14 | else (user_wallet == admin_wallet_three)) | |
15 | 15 | then true | |
16 | 16 | else false | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | func tryGetInteger (key) = match getInteger(this, key) { | |
20 | 20 | case b: Int => | |
21 | 21 | b | |
22 | 22 | case _ => | |
23 | 23 | 0 | |
24 | 24 | } | |
25 | 25 | ||
26 | 26 | ||
27 | 27 | @Callable(i) | |
28 | 28 | func add_blog (publisher,titel,arweave_tx_id,signature,blog_cover) = if (if ((toString(i.caller) == publisher)) | |
29 | 29 | then true | |
30 | 30 | else check_admins_wallets(toString(i.caller))) | |
31 | 31 | then { | |
32 | - | let tx_id = | |
32 | + | let tx_id = toBase64String(i.transactionId) | |
33 | 33 | [StringEntry((("blog_" + tx_id) + "_publisher"), publisher), StringEntry((("blog_" + tx_id) + "_arweave_tx_id"), arweave_tx_id), StringEntry((("blog_" + tx_id) + "_signature"), signature), StringEntry((("blog_" + tx_id) + "_blog_cover"), blog_cover), StringEntry((("blog_" + tx_id) + "_titel"), titel)] | |
34 | 34 | } | |
35 | 35 | else throw("ERRROR !, add_blog, MESSAGE: sorry you are not allow to invoke this funaction") | |
36 | 36 | ||
37 | 37 | ||
38 | 38 | ||
39 | 39 | @Callable(i) | |
40 | 40 | func add_story (publisher,titel,arweave_tx_id,signature,story_cover,description,tags,language,categorys,status) = if (if ((toString(i.caller) == publisher)) | |
41 | 41 | then true | |
42 | 42 | else check_admins_wallets(toString(i.caller))) | |
43 | 43 | then { | |
44 | 44 | let tx_id = toUtf8String(i.transactionId) | |
45 | 45 | [StringEntry((("story_" + tx_id) + "_publisher"), publisher), StringEntry((("story_" + tx_id) + "_arweave_tx_id"), arweave_tx_id), StringEntry((("story_" + tx_id) + "_signature"), signature), StringEntry((("story_" + tx_id) + "_story_cover"), story_cover), StringEntry((("story_" + tx_id) + "_titel"), titel), StringEntry((("story_" + tx_id) + "_description"), description), StringEntry((("story_" + tx_id) + "_tags"), tags), StringEntry((("story_" + tx_id) + "_language"), language), StringEntry((("story_" + tx_id) + "_categorys"), categorys), StringEntry((("story_" + tx_id) + "_status"), status)] | |
46 | 46 | } | |
47 | 47 | else throw("ERRROR !, add_story, MESSAGE: sorry you are not allow to invoke this funaction") | |
48 | 48 | ||
49 | 49 | ||
50 | 50 | ||
51 | 51 | @Callable(i) | |
52 | 52 | func add_chapter (story_tx_id,chapter_arweave_tx_id) = { | |
53 | 53 | let last_chapter_id = tryGetInteger((("Story_" + story_tx_id) + "_last_chapter_id")) | |
54 | 54 | let tx_id = toUtf8String(i.transactionId) | |
55 | 55 | [StringEntry(((("story_" + story_tx_id) + "_chapter_") + toString(last_chapter_id)), tx_id), StringEntry((("chapter_" + tx_id) + "_arweave_tx_id"), chapter_arweave_tx_id), StringEntry((("chapter_" + tx_id) + "_story_tx_id"), story_tx_id), IntegerEntry((("chapter_" + tx_id) + "_id"), last_chapter_id), IntegerEntry((("Story_" + story_tx_id) + "_last_chapter_id"), (last_chapter_id + 1))] | |
56 | 56 | } | |
57 | 57 | ||
58 | 58 | ||
59 | 59 | ||
60 | 60 | @Callable(i) | |
61 | 61 | func set_user_data (wallet,name,image_link,cover_link,bio,google_analytics,twitter,telegram,yandex_analytics,notes) = if (if ((toString(i.caller) == wallet)) | |
62 | 62 | then true | |
63 | 63 | else check_admins_wallets(toString(i.caller))) | |
64 | 64 | then [StringEntry((("user_" + wallet) + "_joined"), "yes"), StringEntry((("user_" + wallet) + "_name"), name), StringEntry((("user_" + wallet) + "_imageLink"), image_link), StringEntry((("user_" + wallet) + "_coverLink"), cover_link), StringEntry((("user_" + wallet) + "_bio"), bio), StringEntry((("user_" + wallet) + "_googleAnalytics"), google_analytics), StringEntry((("user_" + wallet) + "_yandexAnalytics"), yandex_analytics), StringEntry((("user_" + wallet) + "_twitter"), twitter), StringEntry((("user_" + wallet) + "_telegram"), telegram), StringEntry((("user_" + wallet) + "_notes"), notes)] | |
65 | 65 | else throw("ERRROR !, set_user_data, MESSAGE: sorry you are not allow to invoke this funaction") | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | ||
69 | 69 | @Callable(i) | |
70 | 70 | func set_verified_user (wallet,name,twitter,telegram,email,notes) = if (check_admins_wallets(toString(i.caller))) | |
71 | 71 | then [StringEntry((("user_" + wallet) + "_verified"), "yes"), StringEntry((("user_" + wallet) + "_verified_name"), name), StringEntry((("user_" + wallet) + "_verified_twitter"), twitter), StringEntry((("user_" + wallet) + "_verified_telegram"), telegram), StringEntry((("user_" + wallet) + "_verified_notes"), notes)] | |
72 | 72 | else throw("ERRROR !, set_verified_user, MESSAGE: sorry you are not allow to invoke this funaction") | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | ||
76 | 76 | @Callable(i) | |
77 | 77 | func add_blog_to_favorites (wallet,blog_tx_id) = if (if ((toString(i.caller) == wallet)) | |
78 | 78 | then true | |
79 | 79 | else check_admins_wallets(toString(i.caller))) | |
80 | 80 | then { | |
81 | 81 | let id = tryGetInteger((("blog_" + blog_tx_id) + "_favorite_id")) | |
82 | 82 | let user_id = tryGetInteger((("user_" + wallet) + "_favorite_id")) | |
83 | 83 | [StringEntry(((("user_" + wallet) + "_blog_favorite_") + toString(user_id)), blog_tx_id), StringEntry(((("blog_" + blog_tx_id) + "_favorite_") + toString(id)), wallet), IntegerEntry((("blog_" + blog_tx_id) + "_favorite_id"), (id + 1)), IntegerEntry((("user_" + wallet) + "_favorite_id"), (user_id + 1))] | |
84 | 84 | } | |
85 | 85 | else throw("ERRROR !, add_to_favorites, MESSAGE: sorry you are not allow to invoke this funaction") | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | ||
89 | 89 | @Callable(i) | |
90 | 90 | func add_story_to_favorites (wallet,story_tx_id) = if (if ((toString(i.caller) == wallet)) | |
91 | 91 | then true | |
92 | 92 | else check_admins_wallets(toString(i.caller))) | |
93 | 93 | then { | |
94 | 94 | let id = tryGetInteger((("story_" + story_tx_id) + "_favorite_id")) | |
95 | 95 | let user_id = tryGetInteger((("user_" + wallet) + "_favorite_id")) | |
96 | 96 | [StringEntry(((("user_" + wallet) + "_story_favorite_") + toString(user_id)), story_tx_id), StringEntry(((("story_" + story_tx_id) + "_favorite_") + toString(id)), wallet), IntegerEntry((("story_" + story_tx_id) + "_favorite_id"), (id + 1)), IntegerEntry((("user_" + wallet) + "_favorite_id"), (user_id + 1))] | |
97 | 97 | } | |
98 | 98 | else throw("ERRROR !, add_to_favorites, MESSAGE: sorry you are not allow to invoke this funaction") | |
99 | 99 | ||
100 | 100 | ||
101 | 101 | @Verifier(tx) | |
102 | 102 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
103 | 103 |
github/deemru/w8io/169f3d6 41.13 ms ◑