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:AAIEAAAAAAAAABoIAhIGCgQICAgIEg4KDAgICAgICAEICAgICAAAACsAAAAAD3N0b3JhZ2VWZXJpZmllcgkBAAAABXZhbHVlAAAAAQkABCYAAAABAgAAACMzTjJzNVJ0YUhQQmVuQ3N4MkVDY29GUmJZSHgzbm9aaFhXMQAAAAANdXNlcldoaXRlbGlzdAkBAAAABXZhbHVlAAAAAQkABCYAAAABAgAAACMzTXBKRWIzNlpReWsxaGFLbm9jYXlKY1lNMzFjTlBYUGlLMwAAAAAMc2lnblZlcmlmaWVyCQEAAAAFdmFsdWUAAAABCQAEJgAAAAECAAAAIzNOQzI4aFNpdnJtc1RVWGFZRDF4NkwzNjJKNFpwVW5vVGRCAAAAAA1hY2NlcHRlZFRva2VuAQAAACDopWq8yndC8nBhMjVKT0WDubke5ZlnF8Nx6tkLoQSt6wAAAAAGdXNkbklEAgAAACwzS0ZYQkdHTENqQTVaMkR1VzREcTlmRERySGpKSlAxWkVrYW9halN6dUtzQwAAAAAFYWRtaW4CAAAAIzNOQ3FwZGI4akhXMWQxaHFaZ2VTOU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XJFbnRyeQAAAAIJAQAAAA1rZXlBcnRNYXhNaW50AAAAAgUAAAANY2FsbGVyQWRkcmVzcwUAAAAFYXJ0SWQFAAAAB21heG1pbnQJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkBAAAADGtleUFydFNpZ25JRAAAAAIFAAAADWNhbGxlckFkZHJlc3MFAAAABWFydElkBQAAAAZzaWduSUQJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAQAAAAxrZXlBcnRJc3N1ZWQAAAACBQAAAA1jYWxsZXJBZGRyZXNzBQAAAAVhcnRJZAAAAAAAAAAAAAkABEwAAAACCQEAAAAMQm9vbGVhbkVudHJ5AAAAAgkBAAAADGtleUFydE9uU2FsZQAAAAIFAAAADWNhbGxlckFkZHJlc3MFAAAABWFydElkBwkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQEAAAATa2V5QXJ0QXJ0aWRCeVNpZ25pZAAAAAIFAAAADWNhbGxlckFkZHJlc3MFAAAABnNpZ25JRAUAAAAFYXJ0SWQJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgIAAAAObGFzdF9pbnZva2VfaWQFAAAABWFydElkBQAAAANuaWwAAAAA3hWM7Q==", "height": 1182707, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GGDFEb91qvr2CBSWBjxsKVWgRv7rLe3H91LR44UqzaAk Next: none Diff:
OldNewDifferences
1515
1616 let VERIFIEDONLY = true
1717
18-let userCreated = "CREATED"
18+let userAllowed = "ALLOWED"
19+
20+let userRegistered = "REGISTERED"
1921
2022 let userVerified = "VERIFIED"
2123
116118 func keyArtOwnerByHash (sha256Hash) = ("art_owner_by_hash_" + sha256Hash)
117119
118120
121+func keyArtArtidBySignid (callerAddr,signId) = ((("art_artidbysignid_" + signId) + "_") + callerAddr)
122+
123+
119124 func keyArtTxidByHashOwner (sha256Hash,callerAddr) = ("art_txid_by_hash_owner_" + toBase58String(sha256_16Kb(toBytes((sha256Hash + callerAddr)))))
120125
121126
124129 let callerAddr = toString(addressFromPublicKey(i.callerPublicKey))
125130 let id = toBase58String(i.transactionId)
126131 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), userCreated), StringEntry("last_invoke_id", id)]
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)]
128133 }
129134
130135
134139 let artId = toBase58String(invoke.transactionId)
135140 let callerAddress = toBase58String(invoke.caller.bytes)
136141 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)]
138143 }
139144
140145
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let storageVerifier = value(addressFromString("3N2s5RtaHPBenCsx2ECcoFRbYHx3noZhXW1"))
55
66 let userWhitelist = value(addressFromString("3MpJEb36ZQyk1haKnocayJcYM31cNPXPiK3"))
77
88 let signVerifier = value(addressFromString("3NC28hSivrmsTUXaYD1x6L362J4ZpUnoTdB"))
99
1010 let acceptedToken = base58'Gf9t8FA4H3ssoZPCwrg3KwUFCci8zuUFP9ssRsUY3s6a'
1111
1212 let usdnID = "3KFXBGGLCjA5Z2DuW4Dq9fDDrHjJJP1ZEkaoajSzuKsC"
1313
1414 let admin = "3NCqpdb8jHW1d1hqZgeS9AE2MJ2Keh95jMC"
1515
1616 let VERIFIEDONLY = true
1717
18-let userCreated = "CREATED"
18+let userAllowed = "ALLOWED"
19+
20+let userRegistered = "REGISTERED"
1921
2022 let userVerified = "VERIFIED"
2123
2224 let userSuspended = "SUSPENDED"
2325
2426 let userRemoved = "REMOVED"
2527
2628 let userUnregistered = "UNREGISTERED"
2729
2830 let onSale = "ON_SALE"
2931
3032 let sold = "SOLD"
3133
3234 let canceled = "CANCELED"
3335
3436 func getStringByKey (key) = match getString(this, key) {
3537 case a: String =>
3638 a
3739 case _ =>
3840 ""
3941 }
4042
4143
4244 func getIntegerByKey (key) = match getInteger(this, key) {
4345 case i: Int =>
4446 i
4547 case _ =>
4648 0
4749 }
4850
4951
5052 func keyUserAddr (callerAddr) = ("user_" + callerAddr)
5153
5254
5355 func keyUserName (callerAddr) = ("user_name_" + callerAddr)
5456
5557
5658 func keyUserDesc (callerAddr) = ("user_desc_" + callerAddr)
5759
5860
5961 func keyUserSocial (callerAddr) = ("user_social_" + callerAddr)
6062
6163
6264 func keyUserThumb (callerAddr) = ("user_thumb_" + callerAddr)
6365
6466
6567 func keyUserIsArtist (callerAddr) = ("user_isartist_" + callerAddr)
6668
6769
6870 func keyUserStatus (callerAddr) = ("user_status_" + callerAddr)
6971
7072
7173 func keyUserDate (callerAddr) = ("user_date_" + callerAddr)
7274
7375
7476 func keyArtDate (callerAddr,artId) = ((("art_date_" + artId) + "_") + callerAddr)
7577
7678
7779 func keyArtName (callerAddr,artId) = ((("art_name_" + artId) + "_") + callerAddr)
7880
7981
8082 func keyArtDesc (callerAddr,artId) = ((("art_desc_" + artId) + "_") + callerAddr)
8183
8284
8385 func keyArtDisplayCid (callerAddr,artId) = ((("art_display_cid_" + artId) + "_") + callerAddr)
8486
8587
8688 func keyArtExportHash (callerAddr,artId) = ((("art_export_hash_" + artId) + "_") + callerAddr)
8789
8890
8991 func keyArtExportCid (callerAddr,artId) = ((("art_export_cid_" + artId) + "_") + callerAddr)
9092
9193
9294 func keyArtMaxMint (callerAddr,artId) = ((("art_maxmint_" + artId) + "_") + callerAddr)
9395
9496
9597 func keyArtSignID (callerAddr,artId) = ((("art_signid_" + artId) + "_") + callerAddr)
9698
9799
98100 func keyArtIssued (callerAddr,artId) = ((("art_issued_" + artId) + "_") + callerAddr)
99101
100102
101103 func keyArtOnSale (callerAddr,artId) = ((("art_onsale_" + artId) + "_") + callerAddr)
102104
103105
104106 func keyArtLicenceHash (callerAddr,artId) = ((("art_licence_hash_" + artId) + "_") + callerAddr)
105107
106108
107109 func keyArtLicenceCid (callerAddr,artId) = ((("art_licence_cid_" + artId) + "_") + callerAddr)
108110
109111
110112 func keyArtTags (callerAddr,artId) = ((("art_tags_" + artId) + "_") + callerAddr)
111113
112114
113115 func keyArtType (callerAddr,artId) = ((("art_type_" + artId) + "_") + callerAddr)
114116
115117
116118 func keyArtOwnerByHash (sha256Hash) = ("art_owner_by_hash_" + sha256Hash)
117119
118120
121+func keyArtArtidBySignid (callerAddr,signId) = ((("art_artidbysignid_" + signId) + "_") + callerAddr)
122+
123+
119124 func keyArtTxidByHashOwner (sha256Hash,callerAddr) = ("art_txid_by_hash_owner_" + toBase58String(sha256_16Kb(toBytes((sha256Hash + callerAddr)))))
120125
121126
122127 @Callable(i)
123128 func registerUser (name,description,thumb,social) = {
124129 let callerAddr = toString(addressFromPublicKey(i.callerPublicKey))
125130 let id = toBase58String(i.transactionId)
126131 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), userCreated), StringEntry("last_invoke_id", id)]
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)]
128133 }
129134
130135
131136
132137 @Callable(invoke)
133138 func addArtwork (sha256Hash,signID,name,description,tags,type,maxmint,cidDisplay,sha256Export,cidExport,sha256Licence,cidLicence) = {
134139 let artId = toBase58String(invoke.transactionId)
135140 let callerAddress = toBase58String(invoke.caller.bytes)
136141 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)]
138143 }
139144
140145

github/deemru/w8io/026f985 
51.03 ms