tx · EjNWTXavRbUh9P3twmQDF3yGkDpqP8QMygUqfmW7iNPs 3N2kVUxYqFz4rHNgnVr7ffhsnC7DptJ1BzH: -0.01000000 Waves 2023.04.23 04:49 [2546557] smart account 3N2kVUxYqFz4rHNgnVr7ffhsnC7DptJ1BzH > SELF 0.00000000 Waves
{ "type": 13, "id": "EjNWTXavRbUh9P3twmQDF3yGkDpqP8QMygUqfmW7iNPs", "fee": 1000000, "feeAssetId": null, "timestamp": 1682214625858, "version": 2, "chainId": 84, "sender": "3N2kVUxYqFz4rHNgnVr7ffhsnC7DptJ1BzH", "senderPublicKey": "8cCvpHrqwPyT7CYYANjtE4ZUgLzCDCqFDMVAX5RRZMPN", "proofs": [ "3wCRWNtfjf7bHiP9Rd3VYJ1xbkMPjebFn9RA6GQxePa2HsvXvf9r5xR8i9phnDkWq7Y2fpWBRChHTz4e9ymvmZJ4" ], "script": "base64:BgJNCAISBwoFCAgICAgSDAoKCAgICAgICAgICBIECgIICBIMCgoICAgICAgICAgIEggKBggICAgICBIDCgEIEgMKAQgSBAoCCAgSBAoCCAgFABBhZG1pbl93YWxsZXRfb25lAiMzTXBEZkRUMzU5cVNTbU5GWm5NZW9QUXB5SkEyVTFLNTF1NQAQYWRtaW5fd2FsbGV0X3R3bwIjM04zRENuZ2ppZGl2a0piVEp3RlRFdmJZUlRmZkNXVkJMQ0wAEmFkbWluX3dhbGxldF90aHJlZQIjM044eDltYjQ4MWkyazZjRzdROVhVVjNlNW56aDFtZHpzTnkBFGNoZWNrX2FkbWluc193YWxsZXRzAQt1c2VyX3dhbGxldAMDAwkAAAIFC3VzZXJfd2FsbGV0BRBhZG1pbl93YWxsZXRfb25lBgkAAAIFC3VzZXJfd2FsbGV0BRBhZG1pbl93YWxsZXRfdHdvBgkAAAIFC3VzZXJfd2FsbGV0BRJhZG1pbl93YWxsZXRfdGhyZWUGBwENdHJ5R2V0SW50ZWdlcgEDa2V5BAckbWF0Y2gwCQCaCAIFBHRoaXMFA2tleQMJAAEC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"height": 2546557, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5anrxs2uvATurPbsEwXJxJZYAY9aP55fQDXqqhr4cLVr Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let admin_wallet_one = "3MpDfDT359qSSmNFZnMeoPQpyJA2U1K51u5" | |
5 | 5 | ||
6 | 6 | let admin_wallet_two = "3N3DCngjidivkJbTJwFTEvbYRTffCWVBLCL" | |
7 | 7 | ||
8 | 8 | let admin_wallet_three = "3N8x9mb481i2k6cG7Q9XUV3e5nzh1mdzsNy" | |
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 | 32 | let tx_id = toBase58String(i.transactionId) | |
33 | 33 | let block = lastBlock | |
34 | 34 | let publish_time = block.timestamp | |
35 | 35 | let blog_id = tryGetInteger((("user_" + publisher) + "_blog_id")) | |
36 | 36 | let new_blog_id = (blog_id + 1) | |
37 | 37 | [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), StringEntry(((("user_" + publisher) + "_blog") + toString(new_blog_id)), tx_id), IntegerEntry((("user_" + publisher) + "_blog_id"), new_blog_id), IntegerEntry((("blog_" + tx_id) + "_publish_time"), publish_time)] | |
38 | 38 | } | |
39 | 39 | else throw("ERRROR !, add_blog, MESSAGE: sorry you are not allow to invoke this funaction") | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | ||
43 | 43 | @Callable(i) | |
44 | 44 | func add_story (publisher,titel,arweave_tx_id,signature,story_cover,description,tags,language,categorys,status) = if (if ((toString(i.caller) == publisher)) | |
45 | 45 | then true | |
46 | 46 | else check_admins_wallets(toString(i.caller))) | |
47 | 47 | then { | |
48 | 48 | let tx_id = toBase58String(i.transactionId) | |
49 | 49 | let block = lastBlock | |
50 | 50 | let publish_time = block.timestamp | |
51 | 51 | let story_id = tryGetInteger((("user_" + publisher) + "_story_id")) | |
52 | 52 | let new_story_id = (story_id + 1) | |
53 | 53 | [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), StringEntry(((("user_" + publisher) + "_story") + toString(new_story_id)), tx_id), IntegerEntry((("user_" + publisher) + "_story_id"), new_story_id), IntegerEntry((("story_" + tx_id) + "_publish_time"), publish_time)] | |
54 | 54 | } | |
55 | 55 | else throw("ERRROR !, add_story, MESSAGE: sorry you are not allow to invoke this funaction") | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | ||
59 | 59 | @Callable(i) | |
60 | 60 | func add_chapter (story_tx_id,chapter_arweave_tx_id) = { | |
61 | 61 | let last_chapter_id = tryGetInteger((("story_" + story_tx_id) + "_last_chapter_id")) | |
62 | 62 | let tx_id = toBase58String(i.transactionId) | |
63 | 63 | let block = lastBlock | |
64 | 64 | let publish_time = block.timestamp | |
65 | 65 | [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)), IntegerEntry((("chapter_" + tx_id) + "_publish_time"), publish_time)] | |
66 | 66 | } | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | ||
70 | 70 | @Callable(i) | |
71 | 71 | func set_user_data (wallet,name,image_link,cover_link,bio,google_analytics,twitter,telegram,yandex_analytics,notes) = if (if ((toString(i.caller) == wallet)) | |
72 | 72 | then true | |
73 | 73 | else check_admins_wallets(toString(i.caller))) | |
74 | 74 | 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)] | |
75 | 75 | else throw("ERRROR !, set_user_data, MESSAGE: sorry you are not allow to invoke this funaction") | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | ||
79 | 79 | @Callable(i) | |
80 | 80 | func set_verified_user (wallet,name,twitter,telegram,email,notes) = if (check_admins_wallets(toString(i.caller))) | |
81 | 81 | 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)] | |
82 | 82 | else throw("ERRROR !, set_verified_user, MESSAGE: sorry you are not allow to invoke this funaction") | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | ||
86 | 86 | @Callable(i) | |
87 | 87 | func follow_user (wallet) = { | |
88 | 88 | let caller = toString(i.caller) | |
89 | 89 | [StringEntry(((("user_" + wallet) + "_followed_by_") + caller), "yes"), StringEntry(((("user_" + caller) + "_follow_") + wallet), "yes")] | |
90 | 90 | } | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | ||
94 | 94 | @Callable(i) | |
95 | 95 | func un_follow_user (wallet) = { | |
96 | 96 | let caller = toString(i.caller) | |
97 | 97 | [DeleteEntry(((("user_" + wallet) + "_followed_by_") + caller)), DeleteEntry(((("user_" + caller) + "_follow_") + wallet))] | |
98 | 98 | } | |
99 | 99 | ||
100 | 100 | ||
101 | 101 | ||
102 | 102 | @Callable(i) | |
103 | 103 | func add_blog_to_favorites (wallet,blog_tx_id) = if (if ((toString(i.caller) == wallet)) | |
104 | 104 | then true | |
105 | 105 | else check_admins_wallets(toString(i.caller))) | |
106 | 106 | then { | |
107 | 107 | let id = tryGetInteger((("blog_" + blog_tx_id) + "_favorite_id")) | |
108 | 108 | let user_id = tryGetInteger((("user_" + wallet) + "_favorite_id")) | |
109 | 109 | [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))] | |
110 | 110 | } | |
111 | 111 | else throw("ERRROR !, add_to_favorites, MESSAGE: sorry you are not allow to invoke this funaction") | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | ||
115 | 115 | @Callable(i) | |
116 | 116 | func add_story_to_favorites (wallet,story_tx_id) = if (if ((toString(i.caller) == wallet)) | |
117 | 117 | then true | |
118 | 118 | else check_admins_wallets(toString(i.caller))) | |
119 | 119 | then { | |
120 | 120 | let id = tryGetInteger((("story_" + story_tx_id) + "_favorite_id")) | |
121 | 121 | let user_id = tryGetInteger((("user_" + wallet) + "_favorite_id")) | |
122 | 122 | [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))] | |
123 | 123 | } | |
124 | 124 | else throw("ERRROR !, add_to_favorites, MESSAGE: sorry you are not allow to invoke this funaction") | |
125 | 125 | ||
126 | 126 | ||
127 | 127 | @Verifier(tx) | |
128 | 128 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
129 | 129 |
github/deemru/w8io/169f3d6 27.82 ms ◑