tx · GSKmWSumBcLoFBGSxVgrpk3Y8aW4Z7SnRXKCiSWwCUiA

3Ms9YDMep25yKVDZmzP8PaG6vpZMyRN1kJp:  -0.01000000 Waves

2022.02.27 14:36 [1941962] smart account 3Ms9YDMep25yKVDZmzP8PaG6vpZMyRN1kJp > SELF 0.00000000 Waves

{ "type": 13, "id": "GSKmWSumBcLoFBGSxVgrpk3Y8aW4Z7SnRXKCiSWwCUiA", "fee": 1000000, "feeAssetId": null, "timestamp": 1645961819331, "version": 2, "chainId": 84, "sender": "3Ms9YDMep25yKVDZmzP8PaG6vpZMyRN1kJp", "senderPublicKey": "DBFsF67y4W1PHwv8PvsfD9mctboYQZBGGNm7EwHckCgh", "proofs": [ "5UQ5XPJXVbapercyX6KZLFhsTPntRVEc6HkyNQyv6WusAhb1gHn6JU6jCi1LyeDweLkbJ2XjPFfhkABpv3fDb1vx" ], "script": "base64:AAIFAAAAAAAAABcIAhIDCgEIEgUKAwgICBIHCgUICAgICAAAAA0BAAAADWtleUNvbGxlY3Rpb24AAAACAAAABmNhbGxlcgAAAAxjb2xsZWN0aW9uSWQJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAAC2NvbGxlY3Rpb25fBQAAAAxjb2xsZWN0aW9uSWQCAAAAAV8FAAAABmNhbGxlcgEAAAAaa2V5U3ViY29sbGVjdGlvbkNvbGxlY3Rpb24AAAADAAAABmNhbGxlcgAAAAxjb2xsZWN0aW9uSWQAAAAKY29sbGVjdGlvbgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAAGXN1YmNvbGxlY3Rpb25fY29sbGVjdGlvbl8FAAAADGNvbGxlY3Rpb25JZAIAAAABXwUAAAAGY2FsbGVyAgAAAAFfBQAAAApjb2xsZWN0aW9uAQAAAAlrZXlPblNhbGUAAAACAAAABmNhbGxlcgAAAAxjb2xsZWN0aW9uSWQJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAAC2FydF9vbnNhbGVfBQAAAAx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AAANuaWwJAAROAAAAAgUAAAANZGVsZXRlRW50cmllcwkBAAAAC2NvbGxlY3Rpb25zAAAABQUAAAAFYXJ0SWQFAAAAAWkFAAAACmNvbGxlY3Rpb24FAAAADXN1YmNvbGxlY3Rpb24FAAAABmNhbGxlcgAAAADHyU+B", "height": 1941962, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7u6JvknCqMSsAD161gL4c18v3tdBK3N5qAryDTujh4qj Next: 6BvLea1kBzC95ctiydJ8pvjMd3xgEBk3LKcSJZTvmt9p Diff:
OldNewDifferences
3939 func getStringByKeyFromDapp (dapp,key) = valueOrElse(getString(dapp, key), "")
4040
4141
42-func collections (collectionId,i,collection,subcollection,creator) = if (if (invokerIsSconexDapp(i.caller))
43- then true
44- else (i.caller == this))
45- then if ((collection == ""))
46- then throw("Collections can not be empty!")
47- else if ((subcollection == ""))
48- then [StringEntry(keyCollection(creator, collectionId), collection)]
49- else [StringEntry(keyCollection(creator, collectionId), collection), StringEntry(keySubcollectionCollection(creator, collectionId, collection), subcollection)]
50- else throw("Wrong invoker")
42+func collections (collectionId,i,collection,subcollection,creator) = if ((collection == ""))
43+ then throw("Collections can not be empty!")
44+ else if ((subcollection == ""))
45+ then [StringEntry(keyCollection(creator, collectionId), collection)]
46+ else [StringEntry(keyCollection(creator, collectionId), collection), StringEntry(keySubcollectionCollection(creator, collectionId, collection), subcollection)]
5147
5248
5349 @Callable(i)
6056
6157
6258 @Callable(i)
63-func collectionProcess (collection,subcollection,creator) = $Tuple2(collections(toBase58String(i.transactionId), i, collection, subcollection, creator), toBase58String(i.transactionId))
59+func collectionProcess (collection,subcollection,creator) = if (if (invokerIsSconexDapp(i.caller))
60+ then true
61+ else (i.caller == this))
62+ then $Tuple2(collections(toBase58String(i.transactionId), i, collection, subcollection, creator), toBase58String(i.transactionId))
63+ else throw("Wrong invoker")
6464
6565
6666
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func keyCollection (caller,collectionId) = ((("collection_" + collectionId) + "_") + caller)
55
66
77 func keySubcollectionCollection (caller,collectionId,collection) = ((((("subcollection_collection_" + collectionId) + "_") + caller) + "_") + collection)
88
99
1010 func keyOnSale (caller,collectionId) = ((("art_onsale_" + collectionId) + "_") + caller)
1111
1212
1313 let sconexDappKey = "sconexDapp"
1414
1515 let oracleKey = "oracleKey"
1616
1717 func getStr (key) = match getString(this, key) {
1818 case b: String =>
1919 b
2020 case _ =>
2121 ""
2222 }
2323
2424
2525 let oracle = getStr(oracleKey)
2626
2727 let oracleFee = valueOrErrorMessage(addressFromString(oracle), "Collections dapp doesnt have oracle defined")
2828
2929 let sconexDapp = getStringValue(oracleFee, sconexDappKey)
3030
3131 func getBooleanByKey (key) = valueOrElse(getBoolean(addressFromStringValue(sconexDapp), key), false)
3232
3333
3434 func invokerIsSconexDapp (invoker) = if ((invoker == addressFromString(sconexDapp)))
3535 then true
3636 else throw("Only the sconex dapp can invoke this")
3737
3838
3939 func getStringByKeyFromDapp (dapp,key) = valueOrElse(getString(dapp, key), "")
4040
4141
42-func collections (collectionId,i,collection,subcollection,creator) = if (if (invokerIsSconexDapp(i.caller))
43- then true
44- else (i.caller == this))
45- then if ((collection == ""))
46- then throw("Collections can not be empty!")
47- else if ((subcollection == ""))
48- then [StringEntry(keyCollection(creator, collectionId), collection)]
49- else [StringEntry(keyCollection(creator, collectionId), collection), StringEntry(keySubcollectionCollection(creator, collectionId, collection), subcollection)]
50- else throw("Wrong invoker")
42+func collections (collectionId,i,collection,subcollection,creator) = if ((collection == ""))
43+ then throw("Collections can not be empty!")
44+ else if ((subcollection == ""))
45+ then [StringEntry(keyCollection(creator, collectionId), collection)]
46+ else [StringEntry(keyCollection(creator, collectionId), collection), StringEntry(keySubcollectionCollection(creator, collectionId, collection), subcollection)]
5147
5248
5349 @Callable(i)
5450 func initDapp (dappKey) = if ((i.caller != this))
5551 then throw("You cannot do this action")
5652 else if ((oracle != ""))
5753 then throw("oracle already set, you can't override!")
5854 else [StringEntry(oracleKey, dappKey)]
5955
6056
6157
6258 @Callable(i)
63-func collectionProcess (collection,subcollection,creator) = $Tuple2(collections(toBase58String(i.transactionId), i, collection, subcollection, creator), toBase58String(i.transactionId))
59+func collectionProcess (collection,subcollection,creator) = if (if (invokerIsSconexDapp(i.caller))
60+ then true
61+ else (i.caller == this))
62+ then $Tuple2(collections(toBase58String(i.transactionId), i, collection, subcollection, creator), toBase58String(i.transactionId))
63+ else throw("Wrong invoker")
6464
6565
6666
6767 @Callable(i)
6868 func updateCollection (oldCollection,oldSubcollection,artId,collection,subcollection) = {
6969 let caller = toBase58String(i.caller.bytes)
7070 let saleKey = keyOnSale(artId, caller)
7171 if (getBooleanByKey(saleKey))
7272 then throw("Can not update collection from artwork for sale")
7373 else {
7474 let deleteEntries = if (if ((oldCollection != collection))
7575 then true
7676 else (oldSubcollection != subcollection))
7777 then [DeleteEntry(keySubcollectionCollection(caller, artId, collection))]
7878 else nil
7979 (deleteEntries ++ collections(artId, i, collection, subcollection, caller))
8080 }
8181 }
8282
8383

github/deemru/w8io/026f985 
26.88 ms