tx · 3wWXEJsrtwTsYHVqxe5kdFZEzzcM9D9dJNMG4G5S5hxD 3MxZp5dE4bdw4ySwWuP8oa5u7oJ9v3mCd9o: -0.01400000 Waves 2020.09.18 15:09 [1182707] smart account 3MxZp5dE4bdw4ySwWuP8oa5u7oJ9v3mCd9o > SELF 0.00000000 Waves
{ "type": 13, "id": "3wWXEJsrtwTsYHVqxe5kdFZEzzcM9D9dJNMG4G5S5hxD", "fee": 1400000, "feeAssetId": null, "timestamp": 1600431001781, "version": 2, "chainId": 84, "sender": "3MxZp5dE4bdw4ySwWuP8oa5u7oJ9v3mCd9o", "senderPublicKey": "6Bsee4KX5PTUcBfCH4bFHLzLRZSPQF8HH4oYtNZFsCAG", "proofs": [ "yv5Cv5CJQQuSaXZnEyuCRPp1wzCYGKvKQquKJgjzXTbAjq7UZWjSqFsG56C7YqUWctXiKapEqiQStwSqQ1FbgtJ" ], "script": "base64:AAIEAAAAAAAAABoIAhIGCgQICAgIEg4KDAgICAgICAEICAgICAAAACsAAAAAD3N0b3JhZ2VWZXJpZmllcgkBAAAABXZhbHVlAAAAAQkABCYAAAABAgAAACMzTjJzNVJ0YUhQQmVuQ3N4MkVDY29GUmJZSHgzbm9aaFhXMQAAAAANdXNlcldoaXRlbGlzdAkBAAAABXZhbHVlAAAAAQkABCYAAAABAgAAACMzTXBKRWIzNlpReWsxaGFLbm9jYXlKY1lNMzFjTlBYUGlLMwAAAAAMc2lnblZlcmlmaWVyCQEAAAAFdmFsdWUAAAABCQAEJgAAAAECAAAAIzNOQzI4aFNpdnJtc1RVWGFZRDF4NkwzNjJKNFpwVW5vVGRCAAAAAA1hY2NlcHRlZFRva2VuAQAAACDopWq8yndC8nBhMjVKT0WDubke5ZlnF8Nx6tkLoQSt6wAAAAAGdXNkbklEAgAAACwzS0ZYQkdHTENqQTVaMkR1VzREcTlmRERySGpKSlAxWkVrYW9halN6dUtzQwAAAAAFYWRtaW4CAAAAIzNOQ3FwZGI4akhXMWQxaHFaZ2VTOUF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JFbnRyeQAAAAIJAQAAAA1rZXlBcnRNYXhNaW50AAAAAgUAAAANY2FsbGVyQWRkcmVzcwUAAAAFYXJ0SWQFAAAAB21heG1pbnQJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkBAAAADGtleUFydFNpZ25JRAAAAAIFAAAADWNhbGxlckFkZHJlc3MFAAAABWFydElkBQAAAAZzaWduSUQJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAQAAAAxrZXlBcnRJc3N1ZWQAAAACBQAAAA1jYWxsZXJBZGRyZXNzBQAAAAVhcnRJZAAAAAAAAAAAAAkABEwAAAACCQEAAAAMQm9vbGVhbkVudHJ5AAAAAgkBAAAADGtleUFydE9uU2FsZQAAAAIFAAAADWNhbGxlckFkZHJlc3MFAAAABWFydElkBwkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQEAAAATa2V5QXJ0QXJ0aWRCeVNpZ25pZAAAAAIFAAAADWNhbGxlckFkZHJlc3MFAAAABnNpZ25JRAUAAAAFYXJ0SWQJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgIAAAAObGFzdF9pbnZva2VfaWQFAAAABWFydElkBQAAAANuaWwAAAAA3hWM7Q==", "height": 1182707, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GGDFEb91qvr2CBSWBjxsKVWgRv7rLe3H91LR44UqzaAk Next: none Diff:
Old | New | Differences | |
---|---|---|---|
15 | 15 | ||
16 | 16 | let VERIFIEDONLY = true | |
17 | 17 | ||
18 | - | let userCreated = "CREATED" | |
18 | + | let userAllowed = "ALLOWED" | |
19 | + | ||
20 | + | let userRegistered = "REGISTERED" | |
19 | 21 | ||
20 | 22 | let userVerified = "VERIFIED" | |
21 | 23 | ||
116 | 118 | func keyArtOwnerByHash (sha256Hash) = ("art_owner_by_hash_" + sha256Hash) | |
117 | 119 | ||
118 | 120 | ||
121 | + | func keyArtArtidBySignid (callerAddr,signId) = ((("art_artidbysignid_" + signId) + "_") + callerAddr) | |
122 | + | ||
123 | + | ||
119 | 124 | func keyArtTxidByHashOwner (sha256Hash,callerAddr) = ("art_txid_by_hash_owner_" + toBase58String(sha256_16Kb(toBytes((sha256Hash + callerAddr))))) | |
120 | 125 | ||
121 | 126 | ||
124 | 129 | let callerAddr = toString(addressFromPublicKey(i.callerPublicKey)) | |
125 | 130 | let id = toBase58String(i.transactionId) | |
126 | 131 | let timestamp = lastBlock.timestamp | |
127 | - | [IntegerEntry(keyUserDate(callerAddr), timestamp), StringEntry(keyUserAddr(callerAddr), ((id + "_") + toString(lastBlock.timestamp))), StringEntry(keyUserName(callerAddr), name), StringEntry(keyUserDesc(callerAddr), description), StringEntry(keyUserSocial(callerAddr), social), StringEntry(keyUserThumb(callerAddr), thumb), BooleanEntry(keyUserIsArtist(callerAddr), false), StringEntry(keyUserStatus(callerAddr), | |
132 | + | [IntegerEntry(keyUserDate(callerAddr), timestamp), StringEntry(keyUserAddr(callerAddr), ((id + "_") + toString(lastBlock.timestamp))), StringEntry(keyUserName(callerAddr), name), StringEntry(keyUserDesc(callerAddr), description), StringEntry(keyUserSocial(callerAddr), social), StringEntry(keyUserThumb(callerAddr), thumb), BooleanEntry(keyUserIsArtist(callerAddr), false), StringEntry(keyUserStatus(callerAddr), userRegistered), StringEntry("last_invoke_id", id)] | |
128 | 133 | } | |
129 | 134 | ||
130 | 135 | ||
134 | 139 | let artId = toBase58String(invoke.transactionId) | |
135 | 140 | let callerAddress = toBase58String(invoke.caller.bytes) | |
136 | 141 | let timestamp = lastBlock.timestamp | |
137 | - | [StringEntry(keyArtOwnerByHash(sha256Hash), callerAddress), StringEntry(keyArtTxidByHashOwner(sha256Hash, callerAddress), artId), BooleanEntry(keyUserIsArtist(callerAddress), true), IntegerEntry(keyArtDate(callerAddress, artId), timestamp), StringEntry(keyArtName(callerAddress, artId), name), StringEntry(keyArtDesc(callerAddress, artId), description), StringEntry(keyArtDisplayCid(callerAddress, artId), cidDisplay), StringEntry(keyArtExportCid(callerAddress, artId), cidExport), StringEntry(keyArtExportHash(callerAddress, artId), sha256Export), StringEntry(keyArtLicenceHash(callerAddress, artId), sha256Licence), StringEntry(keyArtLicenceCid(callerAddress, artId), cidLicence), StringEntry(keyArtType(callerAddress, artId), type), StringEntry(keyArtTags(callerAddress, artId), tags), IntegerEntry(keyArtMaxMint(callerAddress, artId), maxmint), StringEntry(keyArtSignID(callerAddress, artId), signID), IntegerEntry(keyArtIssued(callerAddress, artId), 0), BooleanEntry(keyArtOnSale(callerAddress, artId), false), StringEntry("last_invoke_id", artId)] | |
142 | + | [StringEntry(keyArtOwnerByHash(sha256Hash), callerAddress), StringEntry(keyArtTxidByHashOwner(sha256Hash, callerAddress), artId), BooleanEntry(keyUserIsArtist(callerAddress), true), IntegerEntry(keyArtDate(callerAddress, artId), timestamp), StringEntry(keyArtName(callerAddress, artId), name), StringEntry(keyArtDesc(callerAddress, artId), description), StringEntry(keyArtDisplayCid(callerAddress, artId), cidDisplay), StringEntry(keyArtExportCid(callerAddress, artId), cidExport), StringEntry(keyArtExportHash(callerAddress, artId), sha256Export), StringEntry(keyArtLicenceHash(callerAddress, artId), sha256Licence), StringEntry(keyArtLicenceCid(callerAddress, artId), cidLicence), StringEntry(keyArtType(callerAddress, artId), type), StringEntry(keyArtTags(callerAddress, artId), tags), IntegerEntry(keyArtMaxMint(callerAddress, artId), maxmint), StringEntry(keyArtSignID(callerAddress, artId), signID), IntegerEntry(keyArtIssued(callerAddress, artId), 0), BooleanEntry(keyArtOnSale(callerAddress, artId), false), StringEntry(keyArtArtidBySignid(callerAddress, signID), artId), StringEntry("last_invoke_id", artId)] | |
138 | 143 | } | |
139 | 144 | ||
140 | 145 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let storageVerifier = value(addressFromString("3N2s5RtaHPBenCsx2ECcoFRbYHx3noZhXW1")) | |
5 | 5 | ||
6 | 6 | let userWhitelist = value(addressFromString("3MpJEb36ZQyk1haKnocayJcYM31cNPXPiK3")) | |
7 | 7 | ||
8 | 8 | let signVerifier = value(addressFromString("3NC28hSivrmsTUXaYD1x6L362J4ZpUnoTdB")) | |
9 | 9 | ||
10 | 10 | let acceptedToken = base58'Gf9t8FA4H3ssoZPCwrg3KwUFCci8zuUFP9ssRsUY3s6a' | |
11 | 11 | ||
12 | 12 | let usdnID = "3KFXBGGLCjA5Z2DuW4Dq9fDDrHjJJP1ZEkaoajSzuKsC" | |
13 | 13 | ||
14 | 14 | let admin = "3NCqpdb8jHW1d1hqZgeS9AE2MJ2Keh95jMC" | |
15 | 15 | ||
16 | 16 | let VERIFIEDONLY = true | |
17 | 17 | ||
18 | - | let userCreated = "CREATED" | |
18 | + | let userAllowed = "ALLOWED" | |
19 | + | ||
20 | + | let userRegistered = "REGISTERED" | |
19 | 21 | ||
20 | 22 | let userVerified = "VERIFIED" | |
21 | 23 | ||
22 | 24 | let userSuspended = "SUSPENDED" | |
23 | 25 | ||
24 | 26 | let userRemoved = "REMOVED" | |
25 | 27 | ||
26 | 28 | let userUnregistered = "UNREGISTERED" | |
27 | 29 | ||
28 | 30 | let onSale = "ON_SALE" | |
29 | 31 | ||
30 | 32 | let sold = "SOLD" | |
31 | 33 | ||
32 | 34 | let canceled = "CANCELED" | |
33 | 35 | ||
34 | 36 | func getStringByKey (key) = match getString(this, key) { | |
35 | 37 | case a: String => | |
36 | 38 | a | |
37 | 39 | case _ => | |
38 | 40 | "" | |
39 | 41 | } | |
40 | 42 | ||
41 | 43 | ||
42 | 44 | func getIntegerByKey (key) = match getInteger(this, key) { | |
43 | 45 | case i: Int => | |
44 | 46 | i | |
45 | 47 | case _ => | |
46 | 48 | 0 | |
47 | 49 | } | |
48 | 50 | ||
49 | 51 | ||
50 | 52 | func keyUserAddr (callerAddr) = ("user_" + callerAddr) | |
51 | 53 | ||
52 | 54 | ||
53 | 55 | func keyUserName (callerAddr) = ("user_name_" + callerAddr) | |
54 | 56 | ||
55 | 57 | ||
56 | 58 | func keyUserDesc (callerAddr) = ("user_desc_" + callerAddr) | |
57 | 59 | ||
58 | 60 | ||
59 | 61 | func keyUserSocial (callerAddr) = ("user_social_" + callerAddr) | |
60 | 62 | ||
61 | 63 | ||
62 | 64 | func keyUserThumb (callerAddr) = ("user_thumb_" + callerAddr) | |
63 | 65 | ||
64 | 66 | ||
65 | 67 | func keyUserIsArtist (callerAddr) = ("user_isartist_" + callerAddr) | |
66 | 68 | ||
67 | 69 | ||
68 | 70 | func keyUserStatus (callerAddr) = ("user_status_" + callerAddr) | |
69 | 71 | ||
70 | 72 | ||
71 | 73 | func keyUserDate (callerAddr) = ("user_date_" + callerAddr) | |
72 | 74 | ||
73 | 75 | ||
74 | 76 | func keyArtDate (callerAddr,artId) = ((("art_date_" + artId) + "_") + callerAddr) | |
75 | 77 | ||
76 | 78 | ||
77 | 79 | func keyArtName (callerAddr,artId) = ((("art_name_" + artId) + "_") + callerAddr) | |
78 | 80 | ||
79 | 81 | ||
80 | 82 | func keyArtDesc (callerAddr,artId) = ((("art_desc_" + artId) + "_") + callerAddr) | |
81 | 83 | ||
82 | 84 | ||
83 | 85 | func keyArtDisplayCid (callerAddr,artId) = ((("art_display_cid_" + artId) + "_") + callerAddr) | |
84 | 86 | ||
85 | 87 | ||
86 | 88 | func keyArtExportHash (callerAddr,artId) = ((("art_export_hash_" + artId) + "_") + callerAddr) | |
87 | 89 | ||
88 | 90 | ||
89 | 91 | func keyArtExportCid (callerAddr,artId) = ((("art_export_cid_" + artId) + "_") + callerAddr) | |
90 | 92 | ||
91 | 93 | ||
92 | 94 | func keyArtMaxMint (callerAddr,artId) = ((("art_maxmint_" + artId) + "_") + callerAddr) | |
93 | 95 | ||
94 | 96 | ||
95 | 97 | func keyArtSignID (callerAddr,artId) = ((("art_signid_" + artId) + "_") + callerAddr) | |
96 | 98 | ||
97 | 99 | ||
98 | 100 | func keyArtIssued (callerAddr,artId) = ((("art_issued_" + artId) + "_") + callerAddr) | |
99 | 101 | ||
100 | 102 | ||
101 | 103 | func keyArtOnSale (callerAddr,artId) = ((("art_onsale_" + artId) + "_") + callerAddr) | |
102 | 104 | ||
103 | 105 | ||
104 | 106 | func keyArtLicenceHash (callerAddr,artId) = ((("art_licence_hash_" + artId) + "_") + callerAddr) | |
105 | 107 | ||
106 | 108 | ||
107 | 109 | func keyArtLicenceCid (callerAddr,artId) = ((("art_licence_cid_" + artId) + "_") + callerAddr) | |
108 | 110 | ||
109 | 111 | ||
110 | 112 | func keyArtTags (callerAddr,artId) = ((("art_tags_" + artId) + "_") + callerAddr) | |
111 | 113 | ||
112 | 114 | ||
113 | 115 | func keyArtType (callerAddr,artId) = ((("art_type_" + artId) + "_") + callerAddr) | |
114 | 116 | ||
115 | 117 | ||
116 | 118 | func keyArtOwnerByHash (sha256Hash) = ("art_owner_by_hash_" + sha256Hash) | |
117 | 119 | ||
118 | 120 | ||
121 | + | func keyArtArtidBySignid (callerAddr,signId) = ((("art_artidbysignid_" + signId) + "_") + callerAddr) | |
122 | + | ||
123 | + | ||
119 | 124 | func keyArtTxidByHashOwner (sha256Hash,callerAddr) = ("art_txid_by_hash_owner_" + toBase58String(sha256_16Kb(toBytes((sha256Hash + callerAddr))))) | |
120 | 125 | ||
121 | 126 | ||
122 | 127 | @Callable(i) | |
123 | 128 | func registerUser (name,description,thumb,social) = { | |
124 | 129 | let callerAddr = toString(addressFromPublicKey(i.callerPublicKey)) | |
125 | 130 | let id = toBase58String(i.transactionId) | |
126 | 131 | let timestamp = lastBlock.timestamp | |
127 | - | [IntegerEntry(keyUserDate(callerAddr), timestamp), StringEntry(keyUserAddr(callerAddr), ((id + "_") + toString(lastBlock.timestamp))), StringEntry(keyUserName(callerAddr), name), StringEntry(keyUserDesc(callerAddr), description), StringEntry(keyUserSocial(callerAddr), social), StringEntry(keyUserThumb(callerAddr), thumb), BooleanEntry(keyUserIsArtist(callerAddr), false), StringEntry(keyUserStatus(callerAddr), | |
132 | + | [IntegerEntry(keyUserDate(callerAddr), timestamp), StringEntry(keyUserAddr(callerAddr), ((id + "_") + toString(lastBlock.timestamp))), StringEntry(keyUserName(callerAddr), name), StringEntry(keyUserDesc(callerAddr), description), StringEntry(keyUserSocial(callerAddr), social), StringEntry(keyUserThumb(callerAddr), thumb), BooleanEntry(keyUserIsArtist(callerAddr), false), StringEntry(keyUserStatus(callerAddr), userRegistered), StringEntry("last_invoke_id", id)] | |
128 | 133 | } | |
129 | 134 | ||
130 | 135 | ||
131 | 136 | ||
132 | 137 | @Callable(invoke) | |
133 | 138 | func addArtwork (sha256Hash,signID,name,description,tags,type,maxmint,cidDisplay,sha256Export,cidExport,sha256Licence,cidLicence) = { | |
134 | 139 | let artId = toBase58String(invoke.transactionId) | |
135 | 140 | let callerAddress = toBase58String(invoke.caller.bytes) | |
136 | 141 | let timestamp = lastBlock.timestamp | |
137 | - | [StringEntry(keyArtOwnerByHash(sha256Hash), callerAddress), StringEntry(keyArtTxidByHashOwner(sha256Hash, callerAddress), artId), BooleanEntry(keyUserIsArtist(callerAddress), true), IntegerEntry(keyArtDate(callerAddress, artId), timestamp), StringEntry(keyArtName(callerAddress, artId), name), StringEntry(keyArtDesc(callerAddress, artId), description), StringEntry(keyArtDisplayCid(callerAddress, artId), cidDisplay), StringEntry(keyArtExportCid(callerAddress, artId), cidExport), StringEntry(keyArtExportHash(callerAddress, artId), sha256Export), StringEntry(keyArtLicenceHash(callerAddress, artId), sha256Licence), StringEntry(keyArtLicenceCid(callerAddress, artId), cidLicence), StringEntry(keyArtType(callerAddress, artId), type), StringEntry(keyArtTags(callerAddress, artId), tags), IntegerEntry(keyArtMaxMint(callerAddress, artId), maxmint), StringEntry(keyArtSignID(callerAddress, artId), signID), IntegerEntry(keyArtIssued(callerAddress, artId), 0), BooleanEntry(keyArtOnSale(callerAddress, artId), false), StringEntry("last_invoke_id", artId)] | |
142 | + | [StringEntry(keyArtOwnerByHash(sha256Hash), callerAddress), StringEntry(keyArtTxidByHashOwner(sha256Hash, callerAddress), artId), BooleanEntry(keyUserIsArtist(callerAddress), true), IntegerEntry(keyArtDate(callerAddress, artId), timestamp), StringEntry(keyArtName(callerAddress, artId), name), StringEntry(keyArtDesc(callerAddress, artId), description), StringEntry(keyArtDisplayCid(callerAddress, artId), cidDisplay), StringEntry(keyArtExportCid(callerAddress, artId), cidExport), StringEntry(keyArtExportHash(callerAddress, artId), sha256Export), StringEntry(keyArtLicenceHash(callerAddress, artId), sha256Licence), StringEntry(keyArtLicenceCid(callerAddress, artId), cidLicence), StringEntry(keyArtType(callerAddress, artId), type), StringEntry(keyArtTags(callerAddress, artId), tags), IntegerEntry(keyArtMaxMint(callerAddress, artId), maxmint), StringEntry(keyArtSignID(callerAddress, artId), signID), IntegerEntry(keyArtIssued(callerAddress, artId), 0), BooleanEntry(keyArtOnSale(callerAddress, artId), false), StringEntry(keyArtArtidBySignid(callerAddress, signID), artId), StringEntry("last_invoke_id", artId)] | |
138 | 143 | } | |
139 | 144 | ||
140 | 145 |
github/deemru/w8io/026f985 51.03 ms ◑