tx · 6BvLea1kBzC95ctiydJ8pvjMd3xgEBk3LKcSJZTvmt9p

3Ms9YDMep25yKVDZmzP8PaG6vpZMyRN1kJp:  -0.01000000 Waves

2022.05.15 18:31 [2052973] smart account 3Ms9YDMep25yKVDZmzP8PaG6vpZMyRN1kJp > SELF 0.00000000 Waves

{ "type": 13, "id": "6BvLea1kBzC95ctiydJ8pvjMd3xgEBk3LKcSJZTvmt9p", "fee": 1000000, "feeAssetId": null, "timestamp": 1652628694887, "version": 2, "chainId": 84, "sender": "3Ms9YDMep25yKVDZmzP8PaG6vpZMyRN1kJp", "senderPublicKey": "DBFsF67y4W1PHwv8PvsfD9mctboYQZBGGNm7EwHckCgh", "proofs": [ "22t7DL6CqiLvq8jxZpCEVSwUd7aAz3Wx5GWTqfjsv2iMMvQcMCpTE5i5Bd4LDiiayyAiKn35552cAczUR7Vz3ZMc" ], "script": "base64:AAIFAAAAAAAAABcIAhIDCgEIEgUKAwgICBIHCgUICAgICAAAAA4BAAAADWtleUNvbGxlY3Rpb24AAAACAAAABmNhbGxlcgAAAAxjb2xsZWN0aW9uSWQJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAAC2NvbGxlY3Rpb25fBQAAAAxjb2xsZWN0aW9uSWQCAAAAAV8FAAAABmNhbGxlcgEAAAAaa2V5U3ViY29sbGVjdGlvbkNvbGxlY3Rpb24AAAADAAAABmNhbGxlcgAAAAxjb2xsZWN0aW9uSWQAAAAKY29sbGVjdGlvbgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAAGXN1YmNvbGxlY3Rpb25fY29sbGVjdGlvbl8FAAAADGNvbGxlY3Rpb25JZAIAAAABXwUAAAAGY2FsbGVyAgAAAAFfBQAAAApjb2xsZWN0aW9uAQAAAAlrZXlPblNhbGUAAAACAAAABmNhbGxlcgAAAAxjb2xsZWN0aW9uSWQJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAAC2FydF9vbnNhbGVfBQAAAAxjb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vbgUAAAANc3ViY29sbGVjdGlvbgkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQEAAAAaa2V5U3ViY29sbGVjdGlvbkNvbGxlY3Rpb24AAAADBQAAAAZjYWxsZXIFAAAABWFydElkBQAAAApjb2xsZWN0aW9uBQAAAANuaWwFAAAAA25pbAQAAAAfdmFsaWRhdGVBbmRQcm9jZXNzUGF5bWVudEludm9rZQkAA/wAAAAECQEAAAATdmFsdWVPckVycm9yTWVzc2FnZQAAAAIFAAAACXN0YWtlRGFwcAIAAAAOdGhpcyBub3QgZm91bmQCAAAAGXZhbGlkYXRlQW5kUHJvY2Vzc1BheW1lbnQFAAAAA25pbAkABEwAAAACCQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAABQAAAANuaWwDCQAAAAAAAAIFAAAAH3ZhbGlkYXRlQW5kUHJvY2Vzc1BheW1lbnRJbnZva2UFAAAAH3ZhbGlkYXRlQW5kUHJvY2Vzc1BheW1lbnRJbnZva2UJAAROAAAAAgUAAAANZGVsZXRlRW50cmllcwkBAAAAC2NvbGxlY3Rpb25zAAAABQUAAAAFYXJ0SWQFAAAAAWkFAAAACmNvbGxlY3Rpb24FAAAADXN1YmNvbGxlY3Rpb24FAAAABmNhbGxlcgkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4AAAAA+dmSdQ==", "height": 2052973, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GSKmWSumBcLoFBGSxVgrpk3Y8aW4Z7SnRXKCiSWwCUiA Next: E3DysGMQruAnQ5CDE2TBjjxUoD4fys7Doy3zUQmewKA Diff:
OldNewDifferences
2626
2727 let oracleFee = valueOrErrorMessage(addressFromString(oracle), "Collections dapp doesnt have oracle defined")
2828
29+let stakeDapp = addressFromString(valueOrErrorMessage(getString(oracleFee, "stakeDapp"), "sconexDapp not found"))
30+
2931 let sconexDapp = getStringValue(oracleFee, sconexDappKey)
3032
3133 func getBooleanByKey (key) = valueOrElse(getBoolean(addressFromStringValue(sconexDapp), key), false)
3234
3335
34-func invokerIsSconexDapp (invoker) = if ((invoker == addressFromString(sconexDapp)))
35- then true
36- else throw("Only the sconex dapp can invoke this")
36+func invokerIsSconexDapp (invoker) = if ((invoker != addressFromString(sconexDapp)))
37+ then throw("Only the sconex dapp can invoke this")
38+ else true
3739
3840
3941 func getStringByKeyFromDapp (dapp,key) = valueOrElse(getString(dapp, key), "")
5658
5759
5860 @Callable(i)
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")
61+func collectionProcess (collection,subcollection,creator) = if (if (!(invokerIsSconexDapp(i.caller)))
62+ then (i.caller != this)
63+ else false)
64+ then throw("Wrong invoker")
65+ else $Tuple2(collections(toBase58String(i.transactionId), i, collection, subcollection, creator), toBase58String(i.transactionId))
6466
6567
6668
7678 else (oldSubcollection != subcollection))
7779 then [DeleteEntry(keySubcollectionCollection(caller, artId, collection))]
7880 else nil
79- (deleteEntries ++ collections(artId, i, collection, subcollection, caller))
81+ let validateAndProcessPaymentInvoke = invoke(valueOrErrorMessage(stakeDapp, "this not found"), "validateAndProcessPayment", nil, [i.payments[0]])
82+ if ((validateAndProcessPaymentInvoke == validateAndProcessPaymentInvoke))
83+ then (deleteEntries ++ collections(artId, i, collection, subcollection, caller))
84+ else throw("Strict value is not equal to itself.")
8085 }
8186 }
8287
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
29+let stakeDapp = addressFromString(valueOrErrorMessage(getString(oracleFee, "stakeDapp"), "sconexDapp not found"))
30+
2931 let sconexDapp = getStringValue(oracleFee, sconexDappKey)
3032
3133 func getBooleanByKey (key) = valueOrElse(getBoolean(addressFromStringValue(sconexDapp), key), false)
3234
3335
34-func invokerIsSconexDapp (invoker) = if ((invoker == addressFromString(sconexDapp)))
35- then true
36- else throw("Only the sconex dapp can invoke this")
36+func invokerIsSconexDapp (invoker) = if ((invoker != addressFromString(sconexDapp)))
37+ then throw("Only the sconex dapp can invoke this")
38+ else true
3739
3840
3941 func getStringByKeyFromDapp (dapp,key) = valueOrElse(getString(dapp, key), "")
4042
4143
4244 func collections (collectionId,i,collection,subcollection,creator) = if ((collection == ""))
4345 then throw("Collections can not be empty!")
4446 else if ((subcollection == ""))
4547 then [StringEntry(keyCollection(creator, collectionId), collection)]
4648 else [StringEntry(keyCollection(creator, collectionId), collection), StringEntry(keySubcollectionCollection(creator, collectionId, collection), subcollection)]
4749
4850
4951 @Callable(i)
5052 func initDapp (dappKey) = if ((i.caller != this))
5153 then throw("You cannot do this action")
5254 else if ((oracle != ""))
5355 then throw("oracle already set, you can't override!")
5456 else [StringEntry(oracleKey, dappKey)]
5557
5658
5759
5860 @Callable(i)
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")
61+func collectionProcess (collection,subcollection,creator) = if (if (!(invokerIsSconexDapp(i.caller)))
62+ then (i.caller != this)
63+ else false)
64+ then throw("Wrong invoker")
65+ else $Tuple2(collections(toBase58String(i.transactionId), i, collection, subcollection, creator), toBase58String(i.transactionId))
6466
6567
6668
6769 @Callable(i)
6870 func updateCollection (oldCollection,oldSubcollection,artId,collection,subcollection) = {
6971 let caller = toBase58String(i.caller.bytes)
7072 let saleKey = keyOnSale(artId, caller)
7173 if (getBooleanByKey(saleKey))
7274 then throw("Can not update collection from artwork for sale")
7375 else {
7476 let deleteEntries = if (if ((oldCollection != collection))
7577 then true
7678 else (oldSubcollection != subcollection))
7779 then [DeleteEntry(keySubcollectionCollection(caller, artId, collection))]
7880 else nil
79- (deleteEntries ++ collections(artId, i, collection, subcollection, caller))
81+ let validateAndProcessPaymentInvoke = invoke(valueOrErrorMessage(stakeDapp, "this not found"), "validateAndProcessPayment", nil, [i.payments[0]])
82+ if ((validateAndProcessPaymentInvoke == validateAndProcessPaymentInvoke))
83+ then (deleteEntries ++ collections(artId, i, collection, subcollection, caller))
84+ else throw("Strict value is not equal to itself.")
8085 }
8186 }
8287
8388

github/deemru/w8io/026f985 
32.80 ms