tx · HV97ECnYtakj1gAo33mTXs6tGsdTQvbRbYvNDsQWgwCv 3N2kVUxYqFz4rHNgnVr7ffhsnC7DptJ1BzH: -0.01000000 Waves 2023.04.21 20:38 [2544629] smart account 3N2kVUxYqFz4rHNgnVr7ffhsnC7DptJ1BzH > SELF 0.00000000 Waves
{ "type": 13, "id": "HV97ECnYtakj1gAo33mTXs6tGsdTQvbRbYvNDsQWgwCv", "fee": 1000000, "feeAssetId": null, "timestamp": 1682098787107, "version": 2, "chainId": 84, "sender": "3N2kVUxYqFz4rHNgnVr7ffhsnC7DptJ1BzH", "senderPublicKey": "8cCvpHrqwPyT7CYYANjtE4ZUgLzCDCqFDMVAX5RRZMPN", "proofs": [ "QiF6nz9oN3gprfi6RNhgDdQtL5PVCnVpqu7JcU32YAeDXLz3Txz6yPGpMhticniUbNMSHxHjbnJiQ5yxN8XBJmN" ], "script": "base64:BgJNCAISBwoFCAgICAgSDAoKCAgICAgICAgICBIECgIICBIMCgoICAgICAgICAgIEggKBggICAgICBIDCgEIEgMKAQgSBAoCCAgSBAoCCAgFABBhZG1pbl93YWxsZXRfb25lAiMzTXBEZkRUMzU5cVNTbU5GWm5NZW9QUXB5SkEyVTFLNTF1NQAQYWRtaW5fd2FsbGV0X3R3bwIjM04zRENuZ2ppZGl2a0piVEp3RlRFdmJZUlRmZkNXVkJMQ0wAEmFkbWluX3dhbGxldF90aHJlZQIjM044eDltYjQ4MWkyazZjRzdROVhVVjNlNW56aDFtZHpzTnkBFGNoZWNrX2FkbWluc193YWxsZXRzAQt1c2VyX3dhbGxldAMDAwkAAAIFC3VzZXJfd2FsbGV0BRBhZG1pbl93YWxsZXRfb25lBgkAAAIFC3VzZXJfd2FsbGV0BRBhZG1pbl93YWxsZXRfdHdvBgkAAAIFC3VzZXJfd2FsbGV0BRJhZG1pbl93YWxsZXRfdGhyZWUGBwENdHJ5R2V0SW50ZWdlcgEDa2V5BAckbWF0Y2gwCQCaCAIFBHRoaXMFA2tleQMJAAECBQckbW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kArAICCQCsAgICBnN0b3J5XwULc3RvcnlfdHhfaWQCDF9mYXZvcml0ZV9pZAkAZAIFAmlkAAEJAMwIAgkBDEludGVnZXJFbnRyeQIJAKwCAgkArAICAgV1c2VyXwUGd2FsbGV0AgxfZmF2b3JpdGVfaWQJAGQCBQd1c2VyX2lkAAEFA25pbAkAAgECVUVSUlJPUiAhLCBhZGRfdG9fZmF2b3JpdGVzLCBNRVNTQUdFOiBzb3JyeSB5b3UgYXJlIG5vdCBhbGxvdyB0byBpbnZva2UgdGhpcyBmdW5hY3Rpb24BAnR4AQZ2ZXJpZnkACQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5Hc/irA==", "height": 2544629, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DLmy1qSAcEb1sHcSKFLR4Xfbwe7NnYde15pgqNPSVsbp Next: BqfhcdR9oTcC49QSDQt6k6pKk5XAxGZHJin2XqjTdfSh Diff:
Old | New | Differences | |
---|---|---|---|
30 | 30 | else check_admins_wallets(toString(i.caller))) | |
31 | 31 | then { | |
32 | 32 | let tx_id = toBase58String(i.transactionId) | |
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)] | |
33 | + | let block = lastBlock | |
34 | + | let publish_time = block.timestamp | |
35 | + | [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), IntegerEntry((("blog_" + tx_id) + "_publish_time"), publish_time)] | |
34 | 36 | } | |
35 | 37 | else throw("ERRROR !, add_blog, MESSAGE: sorry you are not allow to invoke this funaction") | |
36 | 38 | ||
42 | 44 | else check_admins_wallets(toString(i.caller))) | |
43 | 45 | then { | |
44 | 46 | let tx_id = toBase58String(i.transactionId) | |
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)] | |
47 | + | let block = lastBlock | |
48 | + | let publish_time = block.timestamp | |
49 | + | [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), IntegerEntry((("story_" + tx_id) + "_publish_time"), publish_time)] | |
46 | 50 | } | |
47 | 51 | else throw("ERRROR !, add_story, MESSAGE: sorry you are not allow to invoke this funaction") | |
48 | 52 | ||
52 | 56 | func add_chapter (story_tx_id,chapter_arweave_tx_id) = { | |
53 | 57 | let last_chapter_id = tryGetInteger((("Story_" + story_tx_id) + "_last_chapter_id")) | |
54 | 58 | let tx_id = toBase58String(i.transactionId) | |
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))] | |
59 | + | let block = lastBlock | |
60 | + | let publish_time = block.timestamp | |
61 | + | [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)] | |
56 | 62 | } | |
57 | 63 | ||
58 | 64 | ||
70 | 76 | func set_verified_user (wallet,name,twitter,telegram,email,notes) = if (check_admins_wallets(toString(i.caller))) | |
71 | 77 | 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 | 78 | else throw("ERRROR !, set_verified_user, MESSAGE: sorry you are not allow to invoke this funaction") | |
79 | + | ||
80 | + | ||
81 | + | ||
82 | + | @Callable(i) | |
83 | + | func follow_user (wallet) = { | |
84 | + | let caller = toString(i.caller) | |
85 | + | [StringEntry(((("user_" + wallet) + "_followed_by_") + caller), "yes"), StringEntry(((("user_" + caller) + "_follow") + wallet), "yes")] | |
86 | + | } | |
87 | + | ||
88 | + | ||
89 | + | ||
90 | + | @Callable(i) | |
91 | + | func un_follow_user (wallet) = { | |
92 | + | let caller = toString(i.caller) | |
93 | + | [DeleteEntry(((("user_" + wallet) + "_followed_by_") + caller)), DeleteEntry(((("user_" + caller) + "_follow") + wallet))] | |
94 | + | } | |
73 | 95 | ||
74 | 96 | ||
75 | 97 |
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 | - | [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)] | |
33 | + | let block = lastBlock | |
34 | + | let publish_time = block.timestamp | |
35 | + | [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), IntegerEntry((("blog_" + tx_id) + "_publish_time"), publish_time)] | |
34 | 36 | } | |
35 | 37 | else throw("ERRROR !, add_blog, MESSAGE: sorry you are not allow to invoke this funaction") | |
36 | 38 | ||
37 | 39 | ||
38 | 40 | ||
39 | 41 | @Callable(i) | |
40 | 42 | func add_story (publisher,titel,arweave_tx_id,signature,story_cover,description,tags,language,categorys,status) = if (if ((toString(i.caller) == publisher)) | |
41 | 43 | then true | |
42 | 44 | else check_admins_wallets(toString(i.caller))) | |
43 | 45 | then { | |
44 | 46 | let tx_id = toBase58String(i.transactionId) | |
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)] | |
47 | + | let block = lastBlock | |
48 | + | let publish_time = block.timestamp | |
49 | + | [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), IntegerEntry((("story_" + tx_id) + "_publish_time"), publish_time)] | |
46 | 50 | } | |
47 | 51 | else throw("ERRROR !, add_story, MESSAGE: sorry you are not allow to invoke this funaction") | |
48 | 52 | ||
49 | 53 | ||
50 | 54 | ||
51 | 55 | @Callable(i) | |
52 | 56 | func add_chapter (story_tx_id,chapter_arweave_tx_id) = { | |
53 | 57 | let last_chapter_id = tryGetInteger((("Story_" + story_tx_id) + "_last_chapter_id")) | |
54 | 58 | let tx_id = toBase58String(i.transactionId) | |
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))] | |
59 | + | let block = lastBlock | |
60 | + | let publish_time = block.timestamp | |
61 | + | [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)] | |
56 | 62 | } | |
57 | 63 | ||
58 | 64 | ||
59 | 65 | ||
60 | 66 | @Callable(i) | |
61 | 67 | 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 | 68 | then true | |
63 | 69 | else check_admins_wallets(toString(i.caller))) | |
64 | 70 | 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 | 71 | else throw("ERRROR !, set_user_data, MESSAGE: sorry you are not allow to invoke this funaction") | |
66 | 72 | ||
67 | 73 | ||
68 | 74 | ||
69 | 75 | @Callable(i) | |
70 | 76 | func set_verified_user (wallet,name,twitter,telegram,email,notes) = if (check_admins_wallets(toString(i.caller))) | |
71 | 77 | 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 | 78 | else throw("ERRROR !, set_verified_user, MESSAGE: sorry you are not allow to invoke this funaction") | |
79 | + | ||
80 | + | ||
81 | + | ||
82 | + | @Callable(i) | |
83 | + | func follow_user (wallet) = { | |
84 | + | let caller = toString(i.caller) | |
85 | + | [StringEntry(((("user_" + wallet) + "_followed_by_") + caller), "yes"), StringEntry(((("user_" + caller) + "_follow") + wallet), "yes")] | |
86 | + | } | |
87 | + | ||
88 | + | ||
89 | + | ||
90 | + | @Callable(i) | |
91 | + | func un_follow_user (wallet) = { | |
92 | + | let caller = toString(i.caller) | |
93 | + | [DeleteEntry(((("user_" + wallet) + "_followed_by_") + caller)), DeleteEntry(((("user_" + caller) + "_follow") + wallet))] | |
94 | + | } | |
73 | 95 | ||
74 | 96 | ||
75 | 97 | ||
76 | 98 | @Callable(i) | |
77 | 99 | func add_blog_to_favorites (wallet,blog_tx_id) = if (if ((toString(i.caller) == wallet)) | |
78 | 100 | then true | |
79 | 101 | else check_admins_wallets(toString(i.caller))) | |
80 | 102 | then { | |
81 | 103 | let id = tryGetInteger((("blog_" + blog_tx_id) + "_favorite_id")) | |
82 | 104 | let user_id = tryGetInteger((("user_" + wallet) + "_favorite_id")) | |
83 | 105 | [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 | 106 | } | |
85 | 107 | else throw("ERRROR !, add_to_favorites, MESSAGE: sorry you are not allow to invoke this funaction") | |
86 | 108 | ||
87 | 109 | ||
88 | 110 | ||
89 | 111 | @Callable(i) | |
90 | 112 | func add_story_to_favorites (wallet,story_tx_id) = if (if ((toString(i.caller) == wallet)) | |
91 | 113 | then true | |
92 | 114 | else check_admins_wallets(toString(i.caller))) | |
93 | 115 | then { | |
94 | 116 | let id = tryGetInteger((("story_" + story_tx_id) + "_favorite_id")) | |
95 | 117 | let user_id = tryGetInteger((("user_" + wallet) + "_favorite_id")) | |
96 | 118 | [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 | 119 | } | |
98 | 120 | else throw("ERRROR !, add_to_favorites, MESSAGE: sorry you are not allow to invoke this funaction") | |
99 | 121 | ||
100 | 122 | ||
101 | 123 | @Verifier(tx) | |
102 | 124 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
103 | 125 |
github/deemru/w8io/026f985 70.97 ms ◑