tx · G4E1EtA2zTujWdoTHVerbnxHH1L1CKPJcK1fPJgRHZsE 3MxdaTYVJHgaTxdqfzMGzF5D4gqDXH8dUje: -0.02200000 Waves 2022.12.20 10:57 [2368340] smart account 3MxdaTYVJHgaTxdqfzMGzF5D4gqDXH8dUje > SELF 0.00000000 Waves
{ "type": 13, "id": "G4E1EtA2zTujWdoTHVerbnxHH1L1CKPJcK1fPJgRHZsE", "fee": 2200000, "feeAssetId": null, "timestamp": 1671523067358, "version": 2, "chainId": 84, "sender": "3MxdaTYVJHgaTxdqfzMGzF5D4gqDXH8dUje", "senderPublicKey": "71dLMGej17QGvPwSWGwXgcU2oD9aGy6ubg9E8oDfV1yT", "proofs": [ "fiiQ1jNgyCVDEvhXKXzNWSqkvpiNr98Tyju7rxp9agXwVX8Bkwor8xoPqHYCjcMPitD2CT9Cwh9YeYRDqaNeQaT" ], "script": "base64:BgJaCAISBAoCCAgSDgoMCAgICAgICAgICAgIEg0KCwgICAgICAgICAgIEgYKBAgICAgSBAoCCAgSBwoFCAEBCAESBAoCCAgSBAoCCAgSBgoECAgICBIGCgQICAgISQAHVkVSU0lPTgIFMS4xLjYBDmdldFN0cmluZ0J5S2V5AQNrZXkJAQt2YWx1ZU9yRWxzZQIJAJ0IAgUEdGhpcwUDa2V5AgAACHVuaXRUZXN0BwAJb3JhY2xlRmVlCQEFdmFsdWUBCQCmCAEJAQ5nZXRTdHJpbmdCeUtleQECD2NvbmZfb3JhY2xlX2ZlZQAIc2lnbkRhcHAJAQV2YWx1ZQEJAKYIAQkBDmdldFN0cmluZ0J5S2V5AQIRY29uZl9zaWdud2ViX2RhcHAAC2ZlZVJlY2VpdmVyCQEOZ2V0U3RyaW5nQnlLZXkBAhFjb25mX2ZlZV9yZWNlaXZlcgAIdXNlckRhcHADBQh1bml0VGVzdAkBBXZhbHVlAQkApggBAiMzTXQ0UkdNRXlqU1dZQW9jVFBxZDU1d2RIUVFCM1BVMlVDbQkBBXZhbHVlAQkApggBCQEOZ2V0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0SWQJAGUCBQZiaWROYnIAAQkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCQEHQWRkcmVzcwEJANkEAQUNcmV0dXJuTW9uZXlUbwkBDXBhcnNlSW50VmFsdWUBCQCRAwIFCmJpZERhdGFBcnIAAQUHYXNzZXRJZAUDbmlsAG9+TW0=", "height": 2368340, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FxmQ977Wxv6n79SbP2PiqTaP2wmWf62ayufW62WVNJQp Next: 3fy3AgF6fBsL4cSinwprJEbKRYQbrWJs7LGGTkw5UYjg Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let | |
4 | + | let VERSION = "1.1.6" | |
5 | 5 | ||
6 | - | let usdnAssetId = base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p' | |
7 | - | ||
8 | - | let usdnAssetIdString = "DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p" | |
9 | - | ||
10 | - | let usdnWavesLPTokenAssetId = base58'7KZbJrVopwJhkdwbe1eFDBbex4dkY63MxjTNjqXtrzj1' | |
11 | - | ||
12 | - | let routingPuzzlePool = addressFromStringValue("3PGFHzVGT4NTigwCKP1NcwoXkodVZwvBuuU") | |
13 | - | ||
14 | - | let nonRoutingPuzzlePool = addressFromStringValue("3PDrYPF6izza2sXWffzTPF7e2Fcir2CMpki") | |
15 | - | ||
16 | - | let surfAssetId = base58'At8D6NFFpheCbvKVnjVoeLL84Eo8NZn6ovManxfLaFWL' | |
17 | - | ||
18 | - | let surfAssetIdString = "At8D6NFFpheCbvKVnjVoeLL84Eo8NZn6ovManxfLaFWL" | |
19 | - | ||
20 | - | let nonRoutingPuzzleSurfPool = addressFromStringValue("3P7r93vXHuusageNJVGwzqaz3WMotAu49Yz") | |
21 | - | ||
22 | - | let swopSurfPool = addressFromStringValue("3PLp9KrdrbWAvSFHGJVEaszUubquz3M6mfe") | |
23 | - | ||
24 | - | let wxAssetId = base58'Atqv59EYzjFGuitKVnMRk6H8FukjoV3ktPorbEys25on' | |
25 | - | ||
26 | - | let wxAssetIdString = "Atqv59EYzjFGuitKVnMRk6H8FukjoV3ktPorbEys25on" | |
27 | - | ||
28 | - | let swopWxPool = addressFromStringValue("3PKi4G3VX2k42ZSmNNrmvgdDH7JzRaUhY7R") | |
29 | - | ||
30 | - | let wxWxPool = addressFromStringValue("3PCENpEKe8atwELZ7oCSmcdEfcRuKTrUx99") | |
31 | - | ||
32 | - | let usdnWxLPTokenAssetId = base58'F2AKkA513k5yHEJkLsU6vWxCYYk811GpjLhwEv2WGwZ9' | |
33 | - | ||
34 | - | let wxUsdcPool = addressFromStringValue("3PC3HtupBxBmy4WtZf1Tym1vrxg9MwbZRK1") | |
35 | - | ||
36 | - | let usdcAssetIdString = "6XtHjpXbs9RRJP2Sr9GUyVqzACcby9TkThHXnjVC5CDJ" | |
37 | - | ||
38 | - | let usdcAssetId = base58'6XtHjpXbs9RRJP2Sr9GUyVqzACcby9TkThHXnjVC5CDJ' | |
39 | - | ||
40 | - | let usdcWxLPTokenAssetId = base58'EK6N7S38xbtBT3SxAqoGdDLCiX6rojX6G169CnSyuE5' | |
41 | - | ||
42 | - | let puzzleUsdcPool = addressFromStringValue("3P93Kqz8PUbCudvMyjbci54WxQrtBtw4dbZ") | |
43 | - | ||
44 | - | let wxUsdtPool = addressFromStringValue("3P8KMyAJCPWNcyedqrmymxaeWonvmkhGauz") | |
45 | - | ||
46 | - | let usdtAssetIdString = "34N9YcEETLWn93qYQ64EsP1x89tSruJU44RrEMSXXEPJ" | |
47 | - | ||
48 | - | let usdtAssetId = base58'34N9YcEETLWn93qYQ64EsP1x89tSruJU44RrEMSXXEPJ' | |
49 | - | ||
50 | - | let usdtWxLPTokenAssetId = base58'97zHFp1C3cB7qfvx8Xv5f2rWp9nUSG5UnAamfPcW6txf' | |
51 | - | ||
52 | - | let puzzleUsdtPool = addressFromStringValue("3P93Kqz8PUbCudvMyjbci54WxQrtBtw4dbZ") | |
53 | - | ||
54 | - | let wxTsnPool = addressFromStringValue("3PH832eKnw67PFvJfUg9Knz6BHM87QvjMeL") | |
55 | - | ||
56 | - | let tsnAssetIdString = "8t4DPWTwPzpatHA9AkTxWAB47THnYzBsDnoY7fQqbG91" | |
57 | - | ||
58 | - | let tsnAssetId = base58'8t4DPWTwPzpatHA9AkTxWAB47THnYzBsDnoY7fQqbG91' | |
59 | - | ||
60 | - | let tsnWxLPTokenAssetId = base58'EbwpqrZjrvi7XLowkM5Z2rg7xVdzfg6S5ec9asarpAU9' | |
61 | - | ||
62 | - | let puzzleTsnPool = addressFromStringValue("3PN1eJpdhJyRptcN9iLTarsJBtR2Kb3NXSU") | |
63 | - | ||
64 | - | let wxBtcPool = addressFromStringValue("3PCBWDTA6jrFswd7gQgaE3Xk7gLM5RKofvp") | |
65 | - | ||
66 | - | let swopBtcPool = addressFromStringValue("3PACj2DLTw3uUhsUmT98zHU5M4hPufbHKav") | |
67 | - | ||
68 | - | let btcAssetIdString = "8LQW8f7P5d5PZM7GtZEBgaqRPGSzS3DfPuiXrURJ4AJS" | |
69 | - | ||
70 | - | let btcAssetId = base58'8LQW8f7P5d5PZM7GtZEBgaqRPGSzS3DfPuiXrURJ4AJS' | |
71 | - | ||
72 | - | let btcWxLPTokenAssetId = base58'8WhH5CCJ6NakPvEvAJcizqqD7H6axhupdYHDFumSDwsy' | |
73 | - | ||
74 | - | let btcSwopLpToken = base58'58RNQJqLQ3tYYpkjuJujWzLzMX3nzpGn6bTC8LfLtgAM' | |
75 | - | ||
76 | - | let wxEthPool = addressFromStringValue("3PEMqetsaJDbYMw1XGovmE37FB8VUhGnX9A") | |
77 | - | ||
78 | - | let ethAssetIdString = "474jTeYx2r2Va35794tCScAXWJG9hU2HcgxzMowaZUnu" | |
79 | - | ||
80 | - | let ethAssetId = base58'474jTeYx2r2Va35794tCScAXWJG9hU2HcgxzMowaZUnu' | |
81 | - | ||
82 | - | let ethWxLPTokenAssetId = base58'6gtgBD12xZkUTnzGofoFJpMg5gYG1FP6PaGyLviVQjbh' | |
83 | - | ||
84 | - | let swopEthPool = addressFromStringValue("3PNEC4YKqZiMMytFrYRVtpW2ujvi3aGXRPm") | |
85 | - | ||
86 | - | let ethSwopLpToken = base58'H8wRVSgq82j6YU1K7jXVpDXHpd5m91t3bmCzRR7uFGc7' | |
87 | - | ||
88 | - | let wxLtcPool = addressFromStringValue("3P94wvu5gA7VhjPgAB3twaeqdwHCwNK2vsn") | |
89 | - | ||
90 | - | let ltcAssetIdString = "HZk1mbfuJpmxU1Fs4AX5MWLVYtctsNcg6e2C6VKqK8zk" | |
91 | - | ||
92 | - | let ltcAssetId = base58'HZk1mbfuJpmxU1Fs4AX5MWLVYtctsNcg6e2C6VKqK8zk' | |
93 | - | ||
94 | - | let ltcWxLPTokenAssetId = base58'CNkqC6GPi888WdJ1EuVtu9JGZ9VHpAn8eTHwR8YZxXbv' | |
95 | - | ||
96 | - | let swopLtcPool = addressFromStringValue("3P32Rjpo9YHoHaorLSxvnV6CkKFXyfDCkJh") | |
97 | - | ||
98 | - | let ltcSwopLpToken = base58'2npCQ21bzjEgBYWMepyd95aA3vwXaQpPBXnHtmmXadXF' | |
99 | - | ||
100 | - | let wxWestPool = addressFromStringValue("3PFxchXqKNjgP1CcbgFZjHyrEj9xMbSeLU3") | |
101 | - | ||
102 | - | let westAssetIdString = "4LHHvYGNKJUg5hj65aGD5vgScvCBmLpdRFtjokvCjSL8" | |
103 | - | ||
104 | - | let westAssetId = base58'4LHHvYGNKJUg5hj65aGD5vgScvCBmLpdRFtjokvCjSL8' | |
105 | - | ||
106 | - | let westWxLPTokenAssetId = base58'CaryXC3PhVr1rTxUGk8Bx7CcoxPX9ea3F5RGFiCe98Jr' | |
107 | - | ||
108 | - | let swopWestPool = addressFromStringValue("3P6DLdJTP2EySq9MFdJu6beUevrQd2sVVBh") | |
109 | - | ||
110 | - | let westSwopLpToken = base58'8g1Ki9cvjjhLUTyNwd4MaZ4fNfNTVc92Cb6f8My4qb1A' | |
111 | - | ||
112 | - | let wxEggPool = addressFromStringValue("3P3Y38zymCHoTM6qcE9JcEA8rhaGTQbVMgu") | |
113 | - | ||
114 | - | let eggAssetIdString = "C1iWsKGqLwjHUndiQ7iXpdmPum9PeCDFfyXBdJJosDRS" | |
115 | - | ||
116 | - | let eggAssetId = base58'C1iWsKGqLwjHUndiQ7iXpdmPum9PeCDFfyXBdJJosDRS' | |
117 | - | ||
118 | - | let eggWxLPTokenAssetId = base58'EsGs3xQLW8QSRiABfztfVLe8u5a2pvNfkdti4VYes1ms' | |
119 | - | ||
120 | - | let swopEggPool = addressFromStringValue("3PEeJQRJT4v4XvSUBPmxhdWKz439nae7KtQ") | |
121 | - | ||
122 | - | let eggSwopLpToken = base58'2wk64hhVqjC3DgJa9HE9bcV7dCazuRtCSs6giqBAbBak' | |
123 | - | ||
124 | - | let swopPlutoPool = addressFromStringValue("3PDSXwwA2xAtmxeo2bebDP3AA5ynZ2Krgnw") | |
125 | - | ||
126 | - | let plutoSwopLpToken = base58'CBFNT7ti8bGzESndbsNB376Ug4fQ2ZyhXzdY892edTqq' | |
127 | - | ||
128 | - | let plutoAssetIdString = "Ajso6nTTjptu2UHLx6hfSXVtHFtRBJCkKYd5SAyj7zf5" | |
129 | - | ||
130 | - | let plutoAssetId = base58'Ajso6nTTjptu2UHLx6hfSXVtHFtRBJCkKYd5SAyj7zf5' | |
131 | - | ||
132 | - | let puzzlePlutoPool = addressFromStringValue("3P93Kqz8PUbCudvMyjbci54WxQrtBtw4dbZ") | |
133 | - | ||
134 | - | func getIntegerByKey (key) = valueOrElse(getInteger(this, key), 35) | |
6 | + | func getStringByKey (key) = valueOrElse(getString(this, key), "") | |
135 | 7 | ||
136 | 8 | ||
137 | - | let | |
9 | + | let unitTest = false | |
138 | 10 | ||
139 | - | @Callable(i) | |
140 | - | func set (a) = if ((i.caller != this)) | |
141 | - | then throw("you are not allowed to set!") | |
142 | - | else [IntegerEntry("montant", a)] | |
11 | + | let oracleFee = value(addressFromString(getStringByKey("conf_oracle_fee"))) | |
12 | + | ||
13 | + | let signDapp = value(addressFromString(getStringByKey("conf_signweb_dapp"))) | |
14 | + | ||
15 | + | let feeReceiver = getStringByKey("conf_fee_receiver") | |
16 | + | ||
17 | + | let userDapp = if (unitTest) | |
18 | + | then value(addressFromString("3Mt4RGMEyjSWYAocTPqd55wdHQQB3PU2UCm")) | |
19 | + | else value(addressFromString(getStringByKey("conf_users_dapp"))) | |
20 | + | ||
21 | + | let whitelistDapp = value(addressFromString(getStringByKey("conf_whitelist_dapp"))) | |
22 | + | ||
23 | + | let signAssetId = fromBase58String(getStringByKey("conf_accepted_asset_SIGN")) | |
24 | + | ||
25 | + | let usdnAssetId = fromBase58String(getStringByKey("conf_accepted_asset_USDN")) | |
26 | + | ||
27 | + | let wavesAssetId = base58'' | |
28 | + | ||
29 | + | let chris = getStringByKey("conf_admin_1") | |
30 | + | ||
31 | + | func getIntegerByKeyFromOracle (key) = valueOrErrorMessage(getInteger(oracleFee, key), "Integer undefine or 0 in oracle") | |
32 | + | ||
33 | + | ||
34 | + | func getIntegerByKey (key) = valueOrElse(getInteger(this, key), 0) | |
35 | + | ||
36 | + | ||
37 | + | func checkWhitelist (key) = valueOrElse(getInteger(whitelistDapp, key), 0) | |
38 | + | ||
39 | + | ||
40 | + | func getBooleanByKey (key) = valueOrElse(getBoolean(this, key), false) | |
41 | + | ||
42 | + | ||
43 | + | let signCut = 7 | |
44 | + | ||
45 | + | let usdnWaveCut = 10 | |
46 | + | ||
47 | + | let defaultLicence = getStringByKey("conf_default_licence") | |
48 | + | ||
49 | + | let defaultHashLicence = getStringByKey("conf_default_licence_hash") | |
50 | + | ||
51 | + | let dappRunning = valueOrElse(getBoolean(userDapp, "conf_dapp_is_running"), true) | |
52 | + | ||
53 | + | let maintenanceMSG = valueOrElse(getString(userDapp, "conf_maintenance_msg"), "") | |
54 | + | ||
55 | + | let userSuspended = "SUSPENDED" | |
56 | + | ||
57 | + | let userRemoved = "REMOVED" | |
58 | + | ||
59 | + | let userUnregistered = "UNREGISTERED" | |
60 | + | ||
61 | + | let userAllowed = "ALLOWED" | |
62 | + | ||
63 | + | let currentCertificationPrice = getIntegerByKeyFromOracle(("certification_fee_" + toBase58String(signAssetId))) | |
64 | + | ||
65 | + | func checkSignCertificate (signID,Owner,sha256Hash) = match getString(signDapp, ((("data_fc_" + signID) + "_") + Owner)) { | |
66 | + | case a: String => | |
67 | + | if (contains(a, sha256Hash)) | |
68 | + | then true | |
69 | + | else false | |
70 | + | case _ => | |
71 | + | false | |
72 | + | } | |
73 | + | ||
74 | + | ||
75 | + | func validateCID (cid) = if (contains(cid, "/")) | |
76 | + | then if (if ((76 > size(cid))) | |
77 | + | then (size(split(cid, "/")[0]) == 59) | |
78 | + | else false) | |
79 | + | then (16 > size(split(cid, "/")[1])) | |
80 | + | else false | |
81 | + | else false | |
82 | + | ||
83 | + | ||
84 | + | func validateHash (hash) = (size(hash) == 64) | |
85 | + | ||
86 | + | ||
87 | + | func keyUserStatus (caller) = ("user_status_" + caller) | |
88 | + | ||
89 | + | ||
90 | + | func keyDate (caller,artId) = ((("art_date_" + artId) + "_") + caller) | |
91 | + | ||
92 | + | ||
93 | + | func keyName (caller,artId) = ((("art_name_" + artId) + "_") + caller) | |
94 | + | ||
95 | + | ||
96 | + | func keyDesc (caller,artId) = ((("art_desc_" + artId) + "_") + caller) | |
97 | + | ||
98 | + | ||
99 | + | func keyDisplayCid (caller,artId) = ((("art_display_cid_" + artId) + "_") + caller) | |
100 | + | ||
101 | + | ||
102 | + | func keyExportHash (caller,artId) = ((("art_export_hash_" + artId) + "_") + caller) | |
103 | + | ||
104 | + | ||
105 | + | func keyExportCid (caller,artId) = ((("art_export_cid_" + artId) + "_") + caller) | |
106 | + | ||
107 | + | ||
108 | + | func keyMaxMint (caller,artId) = ((("art_maxmint_" + artId) + "_") + caller) | |
109 | + | ||
110 | + | ||
111 | + | func keySignID (caller,artId) = ((("art_signid_" + artId) + "_") + caller) | |
112 | + | ||
113 | + | ||
114 | + | func keyIssued (caller,artId) = ((("art_issued_" + artId) + "_") + caller) | |
115 | + | ||
116 | + | ||
117 | + | func keyOnSale (caller,artId) = ((("art_onsale_" + artId) + "_") + caller) | |
118 | + | ||
119 | + | ||
120 | + | func keyLicenceHash (caller,artId) = ((("art_licence_hash_" + artId) + "_") + caller) | |
121 | + | ||
122 | + | ||
123 | + | func keyLicenceCid (caller,artId) = ((("art_licence_cid_" + artId) + "_") + caller) | |
124 | + | ||
125 | + | ||
126 | + | func keyTags (caller,artId) = ((("art_tags_" + artId) + "_") + caller) | |
127 | + | ||
128 | + | ||
129 | + | func keyType (caller,artId) = ((("art_type_" + artId) + "_") + caller) | |
130 | + | ||
131 | + | ||
132 | + | func keyNote (caller,artId) = ((("art_note_" + artId) + "_") + caller) | |
133 | + | ||
134 | + | ||
135 | + | func keyCrawler (caller,artId) = ((("art_crawler_cid_" + artId) + "_") + caller) | |
136 | + | ||
137 | + | ||
138 | + | func keyPrice (caller,artId) = ((("art_price_" + artId) + "_") + caller) | |
139 | + | ||
140 | + | ||
141 | + | func keyEndSale (caller,artId) = ((("art_endsale_" + artId) + "_") + caller) | |
142 | + | ||
143 | + | ||
144 | + | func keyAssetIdAccepted (caller,artId) = ((("art_assetAccepted_" + artId) + "_") + caller) | |
145 | + | ||
146 | + | ||
147 | + | func keyFlag (caller,artId) = ((("art_flag_" + artId) + "_") + caller) | |
148 | + | ||
149 | + | ||
150 | + | func keyArtistAgentAddr (artistAddr) = ("artist_agent_" + artistAddr) | |
151 | + | ||
152 | + | ||
153 | + | func keyPrimaryShare (artistAddr) = ("artist_agent_primary_" + artistAddr) | |
154 | + | ||
155 | + | ||
156 | + | func keyHashByTxidAddr (caller,txid) = ((("get_hashbytxidaddr_" + txid) + "_") + caller) | |
157 | + | ||
158 | + | ||
159 | + | func keyOwnerByHash (sha256Hash) = ("get_owner_by_hash_" + sha256Hash) | |
160 | + | ||
161 | + | ||
162 | + | func keyidBySignid (caller,signId) = ((("get_artidbysignid_" + signId) + "_") + caller) | |
163 | + | ||
164 | + | ||
165 | + | func keyTxidByHashOwner (sha256Hash,caller) = ("get_txid_by_hash_owner_" + toBase58String(sha256_16Kb(toBytes((sha256Hash + caller))))) | |
166 | + | ||
167 | + | ||
168 | + | func validateAllCID (cidDisplay,cidExport,cidLicence) = if (!(validateCID(cidDisplay))) | |
169 | + | then throw("Wrong Display CID") | |
170 | + | else if (!(validateCID(cidExport))) | |
171 | + | then throw("Wrong Export CID") | |
172 | + | else if (if ((cidLicence != "")) | |
173 | + | then !(validateCID(cidLicence)) | |
174 | + | else false) | |
175 | + | then throw("Wrong Licence CID") | |
176 | + | else true | |
177 | + | ||
178 | + | ||
179 | + | func validateAllHash (sha256Export,sha256Licence) = if (!(validateHash(sha256Export))) | |
180 | + | then throw("Export Hash 64 char. max") | |
181 | + | else if (!(validateHash(sha256Licence))) | |
182 | + | then throw("Licence Hash 64 char. max") | |
183 | + | else true | |
184 | + | ||
185 | + | ||
186 | + | func validateString (str,max) = if ((size(str) == 0)) | |
187 | + | then throw("Field cannot be is empty") | |
188 | + | else if ((size(str) > max)) | |
189 | + | then throw((str + " is too long")) | |
190 | + | else true | |
191 | + | ||
192 | + | ||
193 | + | func validateUser (caller) = { | |
194 | + | let userStatus = valueOrElse(getString(userDapp, keyUserStatus(caller)), userUnregistered) | |
195 | + | if (if ((userStatus == userUnregistered)) | |
196 | + | then true | |
197 | + | else (userStatus == userAllowed)) | |
198 | + | then "Register this account first with \"Account\" tab" | |
199 | + | else if ((userStatus == userSuspended)) | |
200 | + | then "Account suspended" | |
201 | + | else if ((userStatus == userRemoved)) | |
202 | + | then "Account removed" | |
203 | + | else "" | |
204 | + | } | |
205 | + | ||
206 | + | ||
207 | + | func setLIcence (cidLicence,sha256Licence) = { | |
208 | + | let cid = if ((size(cidLicence) == 0)) | |
209 | + | then defaultLicence | |
210 | + | else cidLicence | |
211 | + | let hash = if ((size(sha256Licence) == 0)) | |
212 | + | then defaultHashLicence | |
213 | + | else sha256Licence | |
214 | + | $Tuple2(cid, hash) | |
215 | + | } | |
216 | + | ||
217 | + | ||
218 | + | func validateArtworkData (caller,cidDisplay,cidExport,licenceCID,sha256Export,licenceHash,name,description,tags) = { | |
219 | + | let checkUser = validateUser(caller) | |
220 | + | if ((checkUser != "")) | |
221 | + | then throw(checkUser) | |
222 | + | else if ((size(cidDisplay) == 0)) | |
223 | + | then throw("Display CID cannot be empty") | |
224 | + | else if (!(validateAllCID(cidDisplay, cidExport, licenceCID))) | |
225 | + | then throw("Problem with CID") | |
226 | + | else if (!(validateAllHash(sha256Export, licenceHash))) | |
227 | + | then throw("Problem with Hashes") | |
228 | + | else if (!(validateString(name, 100))) | |
229 | + | then throw("100 Char. max name") | |
230 | + | else if (!(validateString(description, 1000))) | |
231 | + | then throw("1000 Char. max description") | |
232 | + | else if ((size(split(tags, ",")) > 5)) | |
233 | + | then throw("5 tags max.") | |
234 | + | else "" | |
235 | + | } | |
236 | + | ||
237 | + | ||
238 | + | func isPayment (i) = if ((size(i.payments) == 0)) | |
239 | + | then throw("No payment attached") | |
240 | + | else { | |
241 | + | let payment = value(i.payments[0]) | |
242 | + | let amount = value(payment.amount) | |
243 | + | $Tuple2(payment, amount) | |
244 | + | } | |
245 | + | ||
246 | + | ||
247 | + | func validatePayment (i) = { | |
248 | + | let $t083918427 = isPayment(i) | |
249 | + | let payment = $t083918427._1 | |
250 | + | let amount = $t083918427._2 | |
251 | + | let assetId = if (if (isDefined(payment.assetId)) | |
252 | + | then (payment.assetId == signAssetId) | |
253 | + | else false) | |
254 | + | then payment.assetId | |
255 | + | else throw("Only SIGN token accepted as transaction fee") | |
256 | + | if ((amount != currentCertificationPrice)) | |
257 | + | then throw(("Payment amount should be " + toString(currentCertificationPrice))) | |
258 | + | else $Tuple2(amount, assetId) | |
259 | + | } | |
260 | + | ||
261 | + | ||
262 | + | func isArtMinted (addrToUse,artId) = match getInteger(this, keyIssued(addrToUse, artId)) { | |
263 | + | case b: Int => | |
264 | + | if ((b != 0)) | |
265 | + | then true | |
266 | + | else false | |
267 | + | case _ => | |
268 | + | false | |
269 | + | } | |
270 | + | ||
271 | + | ||
272 | + | func validatePriceAssetId (i,priceAssetId,artworkPrice) = { | |
273 | + | let $t090209056 = isPayment(i) | |
274 | + | let payment = $t090209056._1 | |
275 | + | let amount = $t090209056._2 | |
276 | + | let assetId = if (!(isDefined(payment.assetId))) | |
277 | + | then unit | |
278 | + | else if (if ((size(priceAssetId) > 0)) | |
279 | + | then (toBase58String(value(payment.assetId)) == priceAssetId) | |
280 | + | else false) | |
281 | + | then payment.assetId | |
282 | + | else throw("Wrong asset id") | |
283 | + | if (if ((assetId == unit)) | |
284 | + | then (priceAssetId != "") | |
285 | + | else false) | |
286 | + | then throw("Wrong asset id") | |
287 | + | else if ((artworkPrice != amount)) | |
288 | + | then throw("Payment don't match") | |
289 | + | else $Tuple2(amount, assetId) | |
290 | + | } | |
291 | + | ||
292 | + | ||
293 | + | func acceptedAssetIds (assetId) = if (if (if (if ((assetId != toBase58String(signAssetId))) | |
294 | + | then (assetId != toBase58String(wavesAssetId)) | |
295 | + | else false) | |
296 | + | then (assetId != "WAVES") | |
297 | + | else false) | |
298 | + | then (assetId != toBase58String(usdnAssetId)) | |
299 | + | else false) | |
300 | + | then throw("Only SIGN, USDN or WAVES accepted") | |
301 | + | else true | |
302 | + | ||
303 | + | ||
304 | + | func validateMinSell (assetId,price) = { | |
305 | + | let minSellWaves = if (unitTest) | |
306 | + | then 10 | |
307 | + | else getIntegerByKeyFromOracle("waves_min_sell") | |
308 | + | let minSellUsdn = 1000000 | |
309 | + | let minSellSign = if (unitTest) | |
310 | + | then 1 | |
311 | + | else (currentCertificationPrice * 2) | |
312 | + | if (if (if (if (if ((assetId == toBase58String(usdnAssetId))) | |
313 | + | then (minSellUsdn > price) | |
314 | + | else false) | |
315 | + | then (price != 0) | |
316 | + | else false) | |
317 | + | then true | |
318 | + | else if (if ((assetId == toBase58String(signAssetId))) | |
319 | + | then (minSellSign > price) | |
320 | + | else false) | |
321 | + | then (price != 0) | |
322 | + | else false) | |
323 | + | then true | |
324 | + | else if (if (if ((assetId == toBase58String(wavesAssetId))) | |
325 | + | then true | |
326 | + | else (assetId == "WAVES")) | |
327 | + | then (minSellWaves > price) | |
328 | + | else false) | |
329 | + | then (price != 0) | |
330 | + | else false) | |
331 | + | then throw("Wrong minimum sell price") | |
332 | + | else true | |
333 | + | } | |
334 | + | ||
335 | + | ||
336 | + | func getBidAssetId (assetId) = if ((assetId == "WAVES")) | |
337 | + | then unit | |
338 | + | else fromBase58String(assetId) | |
339 | + | ||
340 | + | ||
341 | + | func getPriceAssetIdFromBid (bidDataKey) = { | |
342 | + | let bidData = getStringByKey((bidDataKey + "_OPEN")) | |
343 | + | if ((bidData == "")) | |
344 | + | then throw("Bid not found") | |
345 | + | else { | |
346 | + | let bidDataArr = split(bidData, "_") | |
347 | + | let bidAmount = parseIntValue(bidDataArr[1]) | |
348 | + | let bidAssetId = getBidAssetId(bidDataArr[0]) | |
349 | + | if ((0 >= bidAmount)) | |
350 | + | then throw("Wrong amount") | |
351 | + | else $Tuple2(bidAmount, bidAssetId) | |
352 | + | } | |
353 | + | } | |
354 | + | ||
355 | + | ||
356 | + | func idCallerDate (i) = if (!(dappRunning)) | |
357 | + | then throw(maintenanceMSG) | |
358 | + | else $Tuple3(toBase58String(i.transactionId), toBase58String(i.caller.bytes), lastBlock.timestamp) | |
359 | + | ||
360 | + | ||
361 | + | func buyMint (i,artId,issuer,bidId,bidOwner) = { | |
362 | + | let $t01128111340 = idCallerDate(i) | |
363 | + | let id = $t01128111340._1 | |
364 | + | let caller = $t01128111340._2 | |
365 | + | let date = $t01128111340._3 | |
366 | + | let isBid = if (if (if ((toBase58String(i.caller.bytes) == issuer)) | |
367 | + | then (bidOwner != "") | |
368 | + | else false) | |
369 | + | then (bidId != "") | |
370 | + | else false) | |
371 | + | then true | |
372 | + | else false | |
373 | + | let blockEnd = getIntegerByKey(keyEndSale(caller, artId)) | |
374 | + | if (if (if ((blockEnd != 0)) | |
375 | + | then (height >= blockEnd) | |
376 | + | else false) | |
377 | + | then !(isBid) | |
378 | + | else false) | |
379 | + | then throw("Sale ended.") | |
380 | + | else { | |
381 | + | let callerIsIssuer = (toBase58String(i.caller.bytes) == issuer) | |
382 | + | let totalNFT = getIntegerByKey("total_nft_issued") | |
383 | + | let signID = getStringByKey(keySignID(issuer, artId)) | |
384 | + | let artworkName = getStringByKey(keyName(issuer, artId)) | |
385 | + | if ((artworkName == "")) | |
386 | + | then throw("Art doesn't exist") | |
387 | + | else { | |
388 | + | let isOnSale = getBooleanByKey(keyOnSale(issuer, artId)) | |
389 | + | let amountSold = getIntegerByKey(keyIssued(issuer, artId)) | |
390 | + | let artworkPrice = if (callerIsIssuer) | |
391 | + | then (currentCertificationPrice * 2) | |
392 | + | else getIntegerByKey(keyPrice(issuer, artId)) | |
393 | + | let priceAssetId = if (callerIsIssuer) | |
394 | + | then toBase58String(signAssetId) | |
395 | + | else getStringByKey(keyAssetIdAccepted(issuer, artId)) | |
396 | + | let maxCanSell = getIntegerByKey(keyMaxMint(issuer, artId)) | |
397 | + | if (if (if (!(isBid)) | |
398 | + | then !(callerIsIssuer) | |
399 | + | else false) | |
400 | + | then if (if ((0 >= artworkPrice)) | |
401 | + | then true | |
402 | + | else !(isOnSale)) | |
403 | + | then true | |
404 | + | else (0 >= maxCanSell) | |
405 | + | else false) | |
406 | + | then throw("Art not for sale") | |
407 | + | else if (if (if (!(isBid)) | |
408 | + | then callerIsIssuer | |
409 | + | else false) | |
410 | + | then (0 >= maxCanSell) | |
411 | + | else false) | |
412 | + | then throw("Max issuable not set") | |
413 | + | else { | |
414 | + | let checkUser = validateUser(issuer) | |
415 | + | if (if (isBid) | |
416 | + | then (checkUser != "") | |
417 | + | else false) | |
418 | + | then throw(checkUser) | |
419 | + | else { | |
420 | + | let bidDataKey = ((((((("bid_" + artId) + "_") + issuer) + "_") + bidOwner) + "_") + bidId) | |
421 | + | let $t01309113258 = if (isBid) | |
422 | + | then getPriceAssetIdFromBid(bidDataKey) | |
423 | + | else validatePriceAssetId(i, priceAssetId, artworkPrice) | |
424 | + | let amount = $t01309113258._1 | |
425 | + | let assetId = $t01309113258._2 | |
426 | + | let agent = valueOrElse(getString(userDapp, keyArtistAgentAddr(issuer)), feeReceiver) | |
427 | + | let agentShare = valueOrElse(getInteger(userDapp, keyPrimaryShare(issuer)), 0) | |
428 | + | let isWhitelisted = checkWhitelist(issuer) | |
429 | + | let cut = if ((isWhitelisted > height)) | |
430 | + | then 0 | |
431 | + | else if ((assetId == signAssetId)) | |
432 | + | then signCut | |
433 | + | else usdnWaveCut | |
434 | + | let amountForSign = fraction(amount, cut, 100) | |
435 | + | let amountForAgent = if (if (if ((agent != feeReceiver)) | |
436 | + | then (agentShare > 0) | |
437 | + | else false) | |
438 | + | then (height > isWhitelisted) | |
439 | + | else false) | |
440 | + | then fraction(amount, agentShare, 100) | |
441 | + | else 0 | |
442 | + | let amountForCreator = (amount - amountForSign) | |
443 | + | if ((amountSold == maxCanSell)) | |
444 | + | then throw("Art sold out") | |
445 | + | else { | |
446 | + | let newAmountSold = (amountSold + 1) | |
447 | + | let issueMeta = ((((((((((("Creator: " + issuer) + ", | |
448 | + | ArtID: ") + artId) + ", | |
449 | + | SignID: ") + signID) + ", | |
450 | + | Artwork name: ") + artworkName) + ", | |
451 | + | Issue: ") + toString(newAmountSold)) + "/") + toString(maxCanSell)) | |
452 | + | let issueNFT = Issue(("SA_" + toString((totalNFT + 1))), issueMeta, 1, 0, false) | |
453 | + | let idNFT = calculateAssetId(issueNFT) | |
454 | + | let sellStatus = if (if ((newAmountSold == maxCanSell)) | |
455 | + | then true | |
456 | + | else !(isOnSale)) | |
457 | + | then false | |
458 | + | else true | |
459 | + | let receiveNFT = if (if (if ((caller == issuer)) | |
460 | + | then (bidOwner != "") | |
461 | + | else false) | |
462 | + | then (bidId != "") | |
463 | + | else false) | |
464 | + | then addressFromStringValue(bidOwner) | |
465 | + | else i.caller | |
466 | + | let assetIdBid = if (!(isDefined(assetId))) | |
467 | + | then "WAVES" | |
468 | + | else toBase58String(value(assetId)) | |
469 | + | let bidData = getStringByKey((bidDataKey + "_OPEN")) | |
470 | + | let bidDelOld = DeleteEntry((bidDataKey + "_OPEN")) | |
471 | + | let bidUpdate = StringEntry((bidDataKey + "_CLOSED"), ((bidData + "_") + toString(date))) | |
472 | + | let soldKey = ((((((("art_sold_" + toString(newAmountSold)) + "_of_") + toString(maxCanSell)) + "_") + artId) + "_") + issuer) | |
473 | + | let soldValue = if (!(isBid)) | |
474 | + | then ((((((((((caller + "_") + toString(date)) + "_") + id) + "_") + toString(artworkPrice)) + "_") + priceAssetId) + "_") + toBase58String(idNFT)) | |
475 | + | else ((((((((((toString(receiveNFT) + "_") + toString(date)) + "_") + id) + "_") + toString(amount)) + "_") + assetIdBid) + "_") + toBase58String(idNFT)) | |
476 | + | let soldData = StringEntry(soldKey, soldValue) | |
477 | + | let commissions = if ((amountForAgent != 0)) | |
478 | + | then [ScriptTransfer(Address(fromBase58String(feeReceiver)), (amountForSign - amountForAgent), assetId), ScriptTransfer(Address(fromBase58String(agent)), amountForAgent, assetId)] | |
479 | + | else [ScriptTransfer(Address(fromBase58String(feeReceiver)), amountForSign, assetId)] | |
480 | + | let buyRes = ([IntegerEntry(keyIssued(issuer, artId), newAmountSold), StringEntry(("nft_" + toBase58String(idNFT)), soldKey), IntegerEntry("total_nft_issued", (totalNFT + 1)), IntegerEntry(keyEndSale(issuer, artId), 0), BooleanEntry(keyOnSale(issuer, artId), sellStatus), issueNFT, ScriptTransfer(Address(fromBase58String(issuer)), amountForCreator, assetId), ScriptTransfer(receiveNFT, 1, idNFT)] ++ commissions) | |
481 | + | if (isBid) | |
482 | + | then [soldData, bidUpdate, bidDelOld] :: buyRes | |
483 | + | else soldData :: buyRes | |
484 | + | } | |
485 | + | } | |
486 | + | } | |
487 | + | } | |
488 | + | } | |
489 | + | } | |
490 | + | ||
491 | + | ||
492 | + | @Callable(invoke) | |
493 | + | func setConf (key,val) = { | |
494 | + | let caller = toString(invoke.caller) | |
495 | + | if (containsElement([chris, toString(this)], caller)) | |
496 | + | then if (contains(key, "conf_")) | |
497 | + | then [StringEntry(key, val)] | |
498 | + | else throw("Entries starting with conf_ only") | |
499 | + | else throw("You are not allowed to change this") | |
500 | + | } | |
143 | 501 | ||
144 | 502 | ||
145 | 503 | ||
146 | 504 | @Callable(i) | |
147 | - | func a1 () = if ((i.caller != this)) | |
148 | - | then throw("you are not allowed to arb!") | |
505 | + | func addArtwork (sha256Hash,signID,name,description,tags,type,cidDisplay,sha256Export,cidExport,sha256Licence,cidLicence,crawler) = { | |
506 | + | let $t01704317086 = idCallerDate(i) | |
507 | + | let artId = $t01704317086._1 | |
508 | + | let caller = $t01704317086._2 | |
509 | + | let date = $t01704317086._3 | |
510 | + | if (!(validateHash(sha256Hash))) | |
511 | + | then throw("Hash should be 64 characters maximum") | |
512 | + | else { | |
513 | + | let $t01718717256 = setLIcence(cidLicence, sha256Licence) | |
514 | + | let licenceCID = $t01718717256._1 | |
515 | + | let licenceHash = $t01718717256._2 | |
516 | + | let validateArtwork = validateArtworkData(caller, cidDisplay, cidExport, licenceCID, sha256Export, licenceHash, name, description, tags) | |
517 | + | if ((validateArtwork != "")) | |
518 | + | then throw("Something went wrong!") | |
519 | + | else { | |
520 | + | let $t01747517517 = validatePayment(i) | |
521 | + | let amount = $t01747517517._1 | |
522 | + | let assetId = $t01747517517._2 | |
523 | + | if (!(isDefined(amount))) | |
524 | + | then throw("Something went wrong") | |
525 | + | else { | |
526 | + | let entryExist = getStringByKey(keyTxidByHashOwner(sha256Hash, caller)) | |
527 | + | if ((entryExist != "")) | |
528 | + | then throw("You already added it") | |
529 | + | else { | |
530 | + | let hashExist = getStringByKey(keyOwnerByHash(sha256Hash)) | |
531 | + | if ((hashExist != "")) | |
532 | + | then throw("Hash already registered") | |
533 | + | else { | |
534 | + | let isSignCertified = checkSignCertificate(signID, caller, sha256Hash) | |
535 | + | if (!(isSignCertified)) | |
536 | + | then throw("Sign Certificate not found for this address.") | |
537 | + | else [StringEntry(keyOwnerByHash(sha256Hash), caller), StringEntry(keyTxidByHashOwner(sha256Hash, caller), artId), IntegerEntry(keyDate(caller, artId), date), StringEntry(keyName(caller, artId), name), StringEntry(keyDesc(caller, artId), description), StringEntry(keyDisplayCid(caller, artId), cidDisplay), StringEntry(keyExportCid(caller, artId), cidExport), StringEntry(keyExportHash(caller, artId), sha256Export), StringEntry(keyLicenceHash(caller, artId), licenceHash), StringEntry(keyLicenceCid(caller, artId), licenceCID), StringEntry(keyType(caller, artId), type), StringEntry(keyTags(caller, artId), tags), IntegerEntry(keyMaxMint(caller, artId), 0), StringEntry(keySignID(caller, artId), signID), IntegerEntry(keyIssued(caller, artId), 0), BooleanEntry(keyOnSale(caller, artId), false), StringEntry(keyidBySignid(caller, signID), artId), StringEntry(keyHashByTxidAddr(caller, artId), sha256Hash), StringEntry(keyCrawler(caller, artId), crawler), ScriptTransfer(Address(fromBase58String(feeReceiver)), amount, assetId)] | |
538 | + | } | |
539 | + | } | |
540 | + | } | |
541 | + | } | |
542 | + | } | |
543 | + | } | |
544 | + | ||
545 | + | ||
546 | + | ||
547 | + | @Callable(i) | |
548 | + | func updateArtwork (txid,name,description,tags,type,cidDisplay,sha256Export,cidExport,sha256Licence,cidLicence,crawler) = if (!(dappRunning)) | |
549 | + | then throw(maintenanceMSG) | |
149 | 550 | else { | |
150 | - | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
151 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
152 | - | then { | |
153 | - | let wavesBalanceBefore = wavesBalance(this).available | |
154 | - | if ((wavesBalanceBefore == wavesBalanceBefore)) | |
155 | - | then { | |
156 | - | let buyOnPuzzle = invoke(nonRoutingPuzzlePool, "swap", ["WAVES", 1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
157 | - | if ((buyOnPuzzle == buyOnPuzzle)) | |
158 | - | then { | |
159 | - | let wavesBalToSwap = (wavesBalance(this).available - wavesBalanceBefore) | |
160 | - | if ((0 >= wavesBalToSwap)) | |
161 | - | then throw("nothing to arb") | |
162 | - | else { | |
163 | - | let putTheTokenInThePool = invoke(wxPool, "putOneTkn", [1, false], [AttachedPayment(unit, wavesBalToSwap)]) | |
164 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
165 | - | then { | |
166 | - | let lpTokenBalance = assetBalance(this, usdnWavesLPTokenAssetId) | |
167 | - | if ((lpTokenBalance == lpTokenBalance)) | |
168 | - | then { | |
169 | - | let sellPoolToken = invoke(wxPool, "getOneTkn", [usdnAssetIdString, 1], [AttachedPayment(usdnWavesLPTokenAssetId, lpTokenBalance)]) | |
170 | - | if ((sellPoolToken == sellPoolToken)) | |
171 | - | then { | |
172 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
173 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
174 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
175 | - | then throw("WU PUZZLE -> WX [($_$)]") | |
176 | - | else nil | |
177 | - | else throw("Strict value is not equal to itself.") | |
178 | - | } | |
179 | - | else throw("Strict value is not equal to itself.") | |
180 | - | } | |
181 | - | else throw("Strict value is not equal to itself.") | |
182 | - | } | |
183 | - | else throw("Strict value is not equal to itself.") | |
184 | - | } | |
185 | - | } | |
186 | - | else throw("Strict value is not equal to itself.") | |
551 | + | let caller = toBase58String(i.caller.bytes) | |
552 | + | let $t02024920318 = setLIcence(cidLicence, sha256Licence) | |
553 | + | let licenceCID = $t02024920318._1 | |
554 | + | let licenceHash = $t02024920318._2 | |
555 | + | let validateArtwork = validateArtworkData(caller, cidDisplay, cidExport, licenceCID, sha256Export, licenceHash, name, description, tags) | |
556 | + | if ((validateArtwork != "")) | |
557 | + | then throw("Something went wrong!") | |
558 | + | else { | |
559 | + | let entryExist = getStringByKey(keyName(caller, txid)) | |
560 | + | if ((entryExist == "")) | |
561 | + | then throw("Entry not found") | |
562 | + | else { | |
563 | + | let flag = getStringByKey(keyFlag(caller, txid)) | |
564 | + | if ((flag == "ILLEGAL")) | |
565 | + | then throw("Cannot update ILLEGAL artwork") | |
566 | + | else if (!(isArtMinted(caller, txid))) | |
567 | + | then [StringEntry(keyName(caller, txid), name), StringEntry(keyDesc(caller, txid), description), StringEntry(keyDisplayCid(caller, txid), cidDisplay), StringEntry(keyExportCid(caller, txid), cidExport), StringEntry(keyExportHash(caller, txid), sha256Export), StringEntry(keyLicenceCid(caller, txid), licenceCID), StringEntry(keyLicenceHash(caller, txid), licenceHash), StringEntry(keyTags(caller, txid), tags), StringEntry(keyType(caller, txid), type), StringEntry(keyCrawler(caller, txid), crawler)] | |
568 | + | else throw("Already minted") | |
187 | 569 | } | |
188 | - | else throw("Strict value is not equal to itself.") | |
189 | 570 | } | |
190 | - | else throw("Strict value is not equal to itself.") | |
191 | 571 | } | |
192 | 572 | ||
193 | 573 | ||
194 | 574 | ||
195 | 575 | @Callable(i) | |
196 | - | func a2 () = if ((i.caller != this)) | |
197 | - | then throw("you are not allowed to arb!") | |
198 | - | else { | |
199 | - | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
200 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
201 | - | then { | |
202 | - | let wavesBalanceBefore = wavesBalance(this).available | |
203 | - | if ((wavesBalanceBefore == wavesBalanceBefore)) | |
204 | - | then { | |
205 | - | let putTheTokenInThePool = invoke(wxPool, "putOneTkn", [1, false], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
206 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
207 | - | then { | |
208 | - | let lpTokenBalance = assetBalance(this, usdnWavesLPTokenAssetId) | |
209 | - | if ((lpTokenBalance == lpTokenBalance)) | |
210 | - | then { | |
211 | - | let sellPoolToken = invoke(wxPool, "getOneTkn", ["WAVES", 1], [AttachedPayment(usdnWavesLPTokenAssetId, lpTokenBalance)]) | |
212 | - | if ((sellPoolToken == sellPoolToken)) | |
213 | - | then { | |
214 | - | let wavesBalToSwap = (wavesBalance(this).available - wavesBalanceBefore) | |
215 | - | if ((0 >= wavesBalToSwap)) | |
216 | - | then throw("nothing to arb") | |
217 | - | else { | |
218 | - | let buyOnPuzzle = invoke(nonRoutingPuzzlePool, "swap", [usdnAssetIdString, 1], [AttachedPayment(unit, wavesBalToSwap)]) | |
219 | - | if ((buyOnPuzzle == buyOnPuzzle)) | |
220 | - | then { | |
221 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
222 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
223 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
224 | - | then throw("WU WX -> PUZZLE [($_$)]") | |
225 | - | else nil | |
226 | - | else throw("Strict value is not equal to itself.") | |
227 | - | } | |
228 | - | else throw("Strict value is not equal to itself.") | |
229 | - | } | |
230 | - | } | |
231 | - | else throw("Strict value is not equal to itself.") | |
232 | - | } | |
233 | - | else throw("Strict value is not equal to itself.") | |
234 | - | } | |
235 | - | else throw("Strict value is not equal to itself.") | |
236 | - | } | |
237 | - | else throw("Strict value is not equal to itself.") | |
238 | - | } | |
239 | - | else throw("Strict value is not equal to itself.") | |
240 | - | } | |
576 | + | func flagArtwork (artId,addr,flag,note) = { | |
577 | + | let $t02174321777 = idCallerDate(i) | |
578 | + | let id = $t02174321777._1 | |
579 | + | let caller = $t02174321777._2 | |
580 | + | if (containsElement([chris, toString(this)], caller)) | |
581 | + | then if (containsElement(["CONSENT", "", "CHANGE_REQUIRED", "FLAGGED", "ILLEGAL"], flag)) | |
582 | + | then [StringEntry(keyFlag(addr, artId), flag), StringEntry(keyNote(addr, artId), note)] | |
583 | + | else throw(("Unknow status " + flag)) | |
584 | + | else throw("You are not allowed") | |
585 | + | } | |
241 | 586 | ||
242 | 587 | ||
243 | 588 | ||
244 | 589 | @Callable(i) | |
245 | - | func a3 () = if ((i.caller != this)) | |
246 | - | then throw("you are not allowed to arb!") | |
247 | - | else { | |
248 | - | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
249 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
250 | - | then { | |
251 | - | let buySurfOnPuzzle = invoke(nonRoutingPuzzleSurfPool, "swap", [surfAssetIdString, 1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
252 | - | if ((buySurfOnPuzzle == buySurfOnPuzzle)) | |
253 | - | then { | |
254 | - | let surfBalToSwap = assetBalance(this, surfAssetId) | |
255 | - | let swapSurfOnSwop = invoke(swopSurfPool, "exchange", [1], [AttachedPayment(surfAssetId, surfBalToSwap)]) | |
256 | - | if ((swapSurfOnSwop == swapSurfOnSwop)) | |
257 | - | then { | |
258 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
259 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
260 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
261 | - | then throw("SURF PUZZLE -> SWOP [($_$)]") | |
262 | - | else nil | |
263 | - | else throw("Strict value is not equal to itself.") | |
264 | - | } | |
265 | - | else throw("Strict value is not equal to itself.") | |
266 | - | } | |
267 | - | else throw("Strict value is not equal to itself.") | |
268 | - | } | |
269 | - | else throw("Strict value is not equal to itself.") | |
270 | - | } | |
590 | + | func deleteArtwork (artId,addr) = { | |
591 | + | let $t02221322247 = idCallerDate(i) | |
592 | + | let id = $t02221322247._1 | |
593 | + | let caller = $t02221322247._2 | |
594 | + | let addrToUse = if (containsElement([chris, toString(this)], caller)) | |
595 | + | then addr | |
596 | + | else caller | |
597 | + | let entryExist = valueOrErrorMessage(getStringByKey(keyName(addrToUse, artId)), "No art matching for this address") | |
598 | + | if ((entryExist == "")) | |
599 | + | then throw("No art matching for this address") | |
600 | + | else { | |
601 | + | let sha256Hash = getStringByKey(keyHashByTxidAddr(addrToUse, artId)) | |
602 | + | if ((sha256Hash == "")) | |
603 | + | then throw("No art hash matching for this address") | |
604 | + | else { | |
605 | + | let signID = getStringByKey(keySignID(addrToUse, artId)) | |
606 | + | if ((signID == "")) | |
607 | + | then throw("No SIGN ID matching") | |
608 | + | else { | |
609 | + | let dataToDelete = [DeleteEntry(keyDate(addrToUse, artId)), DeleteEntry(keyName(addrToUse, artId)), DeleteEntry(keyDesc(addrToUse, artId)), DeleteEntry(keyDisplayCid(addrToUse, artId)), DeleteEntry(keyExportCid(addrToUse, artId)), DeleteEntry(keyExportHash(addrToUse, artId)), DeleteEntry(keyLicenceHash(addrToUse, artId)), DeleteEntry(keyLicenceCid(addrToUse, artId)), DeleteEntry(keyType(addrToUse, artId)), DeleteEntry(keyTags(addrToUse, artId)), DeleteEntry(keyMaxMint(addrToUse, artId)), DeleteEntry(keySignID(addrToUse, artId)), DeleteEntry(keyIssued(addrToUse, artId)), DeleteEntry(keyOnSale(addrToUse, artId)), DeleteEntry(keyFlag(addrToUse, artId)), DeleteEntry(keyPrice(addrToUse, artId)), DeleteEntry(keyAssetIdAccepted(addrToUse, artId)), DeleteEntry(keyOwnerByHash(sha256Hash)), DeleteEntry(keyidBySignid(addrToUse, signID)), DeleteEntry(keyTxidByHashOwner(sha256Hash, addrToUse)), DeleteEntry(keyEndSale(addrToUse, artId)), DeleteEntry(keyNote(addrToUse, artId)), DeleteEntry(keyCrawler(addrToUse, artId))] | |
610 | + | if (!(isArtMinted(addrToUse, artId))) | |
611 | + | then if (!(dappRunning)) | |
612 | + | then throw(maintenanceMSG) | |
613 | + | else dataToDelete | |
614 | + | else if (containsElement([chris, toString(this)], caller)) | |
615 | + | then dataToDelete | |
616 | + | else throw("Art already minted, you cannot delete it") | |
617 | + | } | |
618 | + | } | |
619 | + | } | |
620 | + | } | |
271 | 621 | ||
272 | 622 | ||
273 | 623 | ||
274 | 624 | @Callable(i) | |
275 | - | func a4 () = if ((i.caller != this)) | |
276 | - | then throw("you are not allowed to arb!") | |
277 | - | else { | |
278 | - | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
279 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
280 | - | then { | |
281 | - | let swapToSurfOnSwop = invoke(swopSurfPool, "exchange", [1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
282 | - | if ((swapToSurfOnSwop == swapToSurfOnSwop)) | |
283 | - | then { | |
284 | - | let surfBalToSwap = assetBalance(this, surfAssetId) | |
285 | - | let sellSurfOnPuzzle = invoke(nonRoutingPuzzleSurfPool, "swap", [usdnAssetIdString, 1], [AttachedPayment(surfAssetId, surfBalToSwap)]) | |
286 | - | if ((sellSurfOnPuzzle == sellSurfOnPuzzle)) | |
287 | - | then { | |
288 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
289 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
290 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
291 | - | then throw("SURF SWOP -> PUZZLE [($_$)]") | |
292 | - | else nil | |
293 | - | else throw("Strict value is not equal to itself.") | |
625 | + | func sellArtwork (artId,price,maxMint,assetId,blockEnd) = { | |
626 | + | let $t02501425048 = idCallerDate(i) | |
627 | + | let id = $t02501425048._1 | |
628 | + | let caller = $t02501425048._2 | |
629 | + | let artworkName = getStringByKey(keyName(caller, artId)) | |
630 | + | if ((artworkName == "")) | |
631 | + | then throw("This art doesn't match your account") | |
632 | + | else { | |
633 | + | let flag = getStringByKey(keyFlag(caller, artId)) | |
634 | + | if (containsElement(["CHANGE_REQUIRED", "FLAGGED", "ILLEGAL"], flag)) | |
635 | + | then throw("Flagged artwork") | |
636 | + | else { | |
637 | + | let bidNbr = getIntegerByKey(("current_bidamount_" + artId)) | |
638 | + | if ((0 > blockEnd)) | |
639 | + | then throw("Negative end") | |
640 | + | else if (if ((blockEnd > 0)) | |
641 | + | then if ((maxMint != 1)) | |
642 | + | then true | |
643 | + | else (price != 0) | |
644 | + | else false) | |
645 | + | then throw("Timed offer only allowed for unique edition and offer only") | |
646 | + | else { | |
647 | + | let baseHeight = if ((blockEnd == 0)) | |
648 | + | then 0 | |
649 | + | else height | |
650 | + | if (!(acceptedAssetIds(assetId))) | |
651 | + | then throw("Something went wrong!") | |
652 | + | else if (!(validateMinSell(assetId, price))) | |
653 | + | then throw("Something went wrong!") | |
654 | + | else { | |
655 | + | let checkUser = validateUser(caller) | |
656 | + | if ((checkUser != "")) | |
657 | + | then throw(checkUser) | |
658 | + | else { | |
659 | + | let amountSold = getIntegerByKey(keyIssued(caller, artId)) | |
660 | + | let maxCanSell = getIntegerByKey(keyMaxMint(caller, artId)) | |
661 | + | if ((maxMint > 100)) | |
662 | + | then throw("100 editions max per artwork") | |
663 | + | else if (if ((amountSold != 0)) | |
664 | + | then (amountSold == maxCanSell) | |
665 | + | else false) | |
666 | + | then throw("Max edition reached.") | |
667 | + | else if (if ((amountSold > 0)) | |
668 | + | then (maxCanSell != maxMint) | |
669 | + | else false) | |
670 | + | then throw("Cannot change maximum issuable anymore") | |
671 | + | else if (if ((bidNbr > 0)) | |
672 | + | then (maxCanSell != maxMint) | |
673 | + | else false) | |
674 | + | then throw("Cannot change maximum issuable with active orders") | |
675 | + | else { | |
676 | + | let sellStatus = if (if ((price > 0)) | |
677 | + | then (maxMint > 0) | |
678 | + | else false) | |
679 | + | then true | |
680 | + | else false | |
681 | + | [BooleanEntry(keyOnSale(caller, artId), sellStatus), IntegerEntry(keyPrice(caller, artId), price), IntegerEntry(keyMaxMint(caller, artId), maxMint), StringEntry(keyAssetIdAccepted(caller, artId), assetId), IntegerEntry(keyEndSale(caller, artId), (baseHeight + blockEnd))] | |
682 | + | } | |
683 | + | } | |
684 | + | } | |
294 | 685 | } | |
295 | - | else throw("Strict value is not equal to itself.") | |
296 | - | } | |
297 | - | else throw("Strict value is not equal to itself.") | |
298 | - | } | |
299 | - | else throw("Strict value is not equal to itself.") | |
300 | - | } | |
686 | + | } | |
687 | + | } | |
688 | + | } | |
301 | 689 | ||
302 | 690 | ||
303 | 691 | ||
304 | 692 | @Callable(i) | |
305 | - | func a5 () = if ((i.caller != this)) | |
306 | - | then throw("you are not allowed to arb!") | |
307 | - | else { | |
308 | - | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
309 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
310 | - | then { | |
311 | - | let putTheTokenInThePool = invoke(wxWxPool, "putOneTkn", [1, false], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
312 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
313 | - | then { | |
314 | - | let lpTokenBalance = assetBalance(this, usdnWxLPTokenAssetId) | |
315 | - | if ((lpTokenBalance == lpTokenBalance)) | |
316 | - | then { | |
317 | - | let sellPoolToken = invoke(wxWxPool, "getOneTkn", [wxAssetIdString, 1], [AttachedPayment(usdnWxLPTokenAssetId, lpTokenBalance)]) | |
318 | - | if ((sellPoolToken == sellPoolToken)) | |
319 | - | then { | |
320 | - | let wxBalToSwap = assetBalance(this, wxAssetId) | |
321 | - | let swapWxOnSwop = invoke(swopWxPool, "exchange", [1], [AttachedPayment(wxAssetId, wxBalToSwap)]) | |
322 | - | if ((swapWxOnSwop == swapWxOnSwop)) | |
323 | - | then { | |
324 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
325 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
326 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
327 | - | then throw("WX WX -> SWOP [($_$)]") | |
328 | - | else nil | |
329 | - | else throw("Strict value is not equal to itself.") | |
330 | - | } | |
331 | - | else throw("Strict value is not equal to itself.") | |
332 | - | } | |
333 | - | else throw("Strict value is not equal to itself.") | |
334 | - | } | |
335 | - | else throw("Strict value is not equal to itself.") | |
336 | - | } | |
337 | - | else throw("Strict value is not equal to itself.") | |
338 | - | } | |
339 | - | else throw("Strict value is not equal to itself.") | |
340 | - | } | |
693 | + | func buyArtwork (artId,issuer) = buyMint(i, artId, issuer, "", "") | |
341 | 694 | ||
342 | 695 | ||
343 | 696 | ||
344 | 697 | @Callable(i) | |
345 | - | func a6 () = if ((i.caller != this)) | |
346 | - | then throw("you are not allowed to arb!") | |
347 | - | else { | |
348 | - | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
349 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
350 | - | then { | |
351 | - | let swapToWxOnSwop = invoke(swopWxPool, "exchange", [1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
352 | - | if ((swapToWxOnSwop == swapToWxOnSwop)) | |
353 | - | then { | |
354 | - | let wxBalToSwap = assetBalance(this, wxAssetId) | |
355 | - | let putTheTokenInThePool = invoke(wxWxPool, "putOneTkn", [1, false], [AttachedPayment(wxAssetId, wxBalToSwap)]) | |
356 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
357 | - | then { | |
358 | - | let lpTokenBalance = assetBalance(this, usdnWxLPTokenAssetId) | |
359 | - | if ((lpTokenBalance == lpTokenBalance)) | |
360 | - | then { | |
361 | - | let sellPoolToken = invoke(wxWxPool, "getOneTkn", [usdnAssetIdString, 1], [AttachedPayment(usdnWxLPTokenAssetId, lpTokenBalance)]) | |
362 | - | if ((sellPoolToken == sellPoolToken)) | |
363 | - | then { | |
364 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
365 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
366 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
367 | - | then throw("WX SWOP -> WX [($_$)]") | |
368 | - | else nil | |
369 | - | else throw("Strict value is not equal to itself.") | |
370 | - | } | |
371 | - | else throw("Strict value is not equal to itself.") | |
372 | - | } | |
373 | - | else throw("Strict value is not equal to itself.") | |
374 | - | } | |
375 | - | else throw("Strict value is not equal to itself.") | |
698 | + | func setBid (artId,issuer) = { | |
699 | + | let $t02730527345 = idCallerDate(i) | |
700 | + | let id = $t02730527345._1 | |
701 | + | let caller = $t02730527345._2 | |
702 | + | let date = $t02730527345._3 | |
703 | + | let $t02735027386 = isPayment(i) | |
704 | + | let payment = $t02735027386._1 | |
705 | + | let amount = $t02735027386._2 | |
706 | + | let assetId = if (!(isDefined(payment.assetId))) | |
707 | + | then "WAVES" | |
708 | + | else toBase58String(value(payment.assetId)) | |
709 | + | let blockEnd = getIntegerByKey(keyEndSale(issuer, artId)) | |
710 | + | if (if ((blockEnd != 0)) | |
711 | + | then (height >= blockEnd) | |
712 | + | else false) | |
713 | + | then throw("Sale ended.") | |
714 | + | else { | |
715 | + | let bidNbr = getIntegerByKey(("current_bidamount_" + artId)) | |
716 | + | if (!(acceptedAssetIds(assetId))) | |
717 | + | then throw("asset not accepted") | |
718 | + | else if (!(validateMinSell(assetId, amount))) | |
719 | + | then throw("Wrong min sell") | |
720 | + | else { | |
721 | + | let amountSold = getIntegerByKey(keyIssued(issuer, artId)) | |
722 | + | let maxCanSell = getIntegerByKey(keyMaxMint(issuer, artId)) | |
723 | + | if ((0 >= maxCanSell)) | |
724 | + | then throw("No max edition set for this artwork") | |
725 | + | else if ((amountSold >= maxCanSell)) | |
726 | + | then throw("Sold out, you cannot bid") | |
727 | + | else [StringEntry((((((((("bid_" + artId) + "_") + issuer) + "_") + caller) + "_") + id) + "_OPEN"), ((((assetId + "_") + toString(amount)) + "_") + toString(date))), IntegerEntry(("current_bidamount_" + artId), (bidNbr + 1))] | |
376 | 728 | } | |
377 | - | else throw("Strict value is not equal to itself.") | |
378 | - | } | |
379 | - | else throw("Strict value is not equal to itself.") | |
380 | - | } | |
729 | + | } | |
730 | + | } | |
381 | 731 | ||
382 | 732 | ||
383 | 733 | ||
384 | 734 | @Callable(i) | |
385 | - | func a7 () = if ((i.caller != this)) | |
386 | - | then throw("you are not allowed to arb!") | |
387 | - | else { | |
388 | - | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
389 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
390 | - | then { | |
391 | - | let buyUsdcOnPuzzle = invoke(puzzleUsdcPool, "swap", [usdcAssetIdString, 1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
392 | - | if ((buyUsdcOnPuzzle == buyUsdcOnPuzzle)) | |
393 | - | then { | |
394 | - | let usdcBalToSwap = assetBalance(this, usdcAssetId) | |
395 | - | if ((usdcBalToSwap == usdcBalToSwap)) | |
396 | - | then { | |
397 | - | let putTheTokenInThePool = invoke(wxUsdcPool, "putOneTknV2", [1, false], [AttachedPayment(usdcAssetId, usdcBalToSwap)]) | |
398 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
399 | - | then { | |
400 | - | let lpTokenBalance = assetBalance(this, usdcWxLPTokenAssetId) | |
401 | - | if ((lpTokenBalance == lpTokenBalance)) | |
402 | - | then { | |
403 | - | let sellPoolToken = invoke(wxUsdcPool, "getOneTknV2", [usdnAssetIdString, 1], [AttachedPayment(usdcWxLPTokenAssetId, lpTokenBalance)]) | |
404 | - | if ((sellPoolToken == sellPoolToken)) | |
405 | - | then { | |
406 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
407 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
408 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
409 | - | then throw("USDC PUZZLE -> WX [($_$)]") | |
410 | - | else nil | |
411 | - | else throw("Strict value is not equal to itself.") | |
412 | - | } | |
413 | - | else throw("Strict value is not equal to itself.") | |
414 | - | } | |
415 | - | else throw("Strict value is not equal to itself.") | |
416 | - | } | |
417 | - | else throw("Strict value is not equal to itself.") | |
418 | - | } | |
419 | - | else throw("Strict value is not equal to itself.") | |
420 | - | } | |
421 | - | else throw("Strict value is not equal to itself.") | |
422 | - | } | |
423 | - | else throw("Strict value is not equal to itself.") | |
424 | - | } | |
735 | + | func acceptBid (artId,issuer,bidId,bidOwner) = { | |
736 | + | let caller = toBase58String(i.caller.bytes) | |
737 | + | if ((caller != issuer)) | |
738 | + | then throw("You cannot do this action") | |
739 | + | else buyMint(i, artId, issuer, bidId, bidOwner) | |
740 | + | } | |
425 | 741 | ||
426 | 742 | ||
427 | 743 | ||
428 | 744 | @Callable(i) | |
429 | - | func a8 () = if ((i.caller != this)) | |
430 | - | then throw("you are not allowed to arb!") | |
431 | - | else { | |
432 | - | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
433 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
434 | - | then { | |
435 | - | let putTheTokenInThePool = invoke(wxUsdcPool, "putOneTknV2", [1, false], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
436 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
437 | - | then { | |
438 | - | let lpTokenBalance = assetBalance(this, usdcWxLPTokenAssetId) | |
439 | - | if ((lpTokenBalance == lpTokenBalance)) | |
440 | - | then { | |
441 | - | let sellPoolToken = invoke(wxUsdcPool, "getOneTknV2", [usdcAssetIdString, 1], [AttachedPayment(usdcWxLPTokenAssetId, lpTokenBalance)]) | |
442 | - | if ((sellPoolToken == sellPoolToken)) | |
443 | - | then { | |
444 | - | let usdcBalToSwap = assetBalance(this, usdcAssetId) | |
445 | - | if ((usdcBalToSwap == usdcBalToSwap)) | |
446 | - | then { | |
447 | - | let sellUsdcOnPuzzle = invoke(puzzleUsdcPool, "swap", [usdnAssetIdString, 1], [AttachedPayment(usdcAssetId, usdcBalToSwap)]) | |
448 | - | if ((sellUsdcOnPuzzle == sellUsdcOnPuzzle)) | |
449 | - | then { | |
450 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
451 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
452 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
453 | - | then throw("USDC WX -> PUZZLE [($_$)]") | |
454 | - | else nil | |
455 | - | else throw("Strict value is not equal to itself.") | |
456 | - | } | |
457 | - | else throw("Strict value is not equal to itself.") | |
458 | - | } | |
459 | - | else throw("Strict value is not equal to itself.") | |
460 | - | } | |
461 | - | else throw("Strict value is not equal to itself.") | |
462 | - | } | |
463 | - | else throw("Strict value is not equal to itself.") | |
464 | - | } | |
465 | - | else throw("Strict value is not equal to itself.") | |
466 | - | } | |
467 | - | else throw("Strict value is not equal to itself.") | |
468 | - | } | |
745 | + | func cancelBid (artId,issuer,bidId,bidOwner) = { | |
746 | + | let $t02881328874 = idCallerDate(i) | |
747 | + | let id = $t02881328874._1 | |
748 | + | let caller = $t02881328874._2 | |
749 | + | let date = $t02881328874._3 | |
750 | + | if (if ((caller != bidOwner)) | |
751 | + | then (caller != issuer) | |
752 | + | else false) | |
753 | + | then throw("You cannot do this action") | |
754 | + | else { | |
755 | + | let returnMoneyTo = if ((caller == issuer)) | |
756 | + | then bidOwner | |
757 | + | else caller | |
758 | + | let bidNbr = getIntegerByKey(("current_bidamount_" + artId)) | |
759 | + | let bidDataKey = ((((((("bid_" + artId) + "_") + issuer) + "_") + bidOwner) + "_") + bidId) | |
760 | + | let bidData = getStringByKey((bidDataKey + "_OPEN")) | |
761 | + | if ((bidData == "")) | |
762 | + | then throw("Bid not found") | |
763 | + | else { | |
764 | + | let bidDataArr = split(bidData, "_") | |
765 | + | let assetId = getBidAssetId(bidDataArr[0]) | |
766 | + | let bidStatus = "CANCELED" | |
767 | + | [DeleteEntry((bidDataKey + "_OPEN")), StringEntry(((bidDataKey + "_") + bidStatus), ((bidData + "_") + toString(date))), IntegerEntry(("current_bidamount_" + artId), (bidNbr - 1)), ScriptTransfer(Address(fromBase58String(returnMoneyTo)), parseIntValue(bidDataArr[1]), assetId)] | |
768 | + | } | |
769 | + | } | |
770 | + | } | |
469 | 771 | ||
470 | - | ||
471 | - | ||
472 | - | @Callable(i) | |
473 | - | func a9 () = if ((i.caller != this)) | |
474 | - | then throw("you are not allowed to arb!") | |
475 | - | else { | |
476 | - | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
477 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
478 | - | then { | |
479 | - | let buyUsdtOnPuzzle = invoke(puzzleUsdtPool, "swap", [usdtAssetIdString, 1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
480 | - | if ((buyUsdtOnPuzzle == buyUsdtOnPuzzle)) | |
481 | - | then { | |
482 | - | let usdtBalToSwap = assetBalance(this, usdtAssetId) | |
483 | - | if ((usdtBalToSwap == usdtBalToSwap)) | |
484 | - | then { | |
485 | - | let putTheTokenInThePool = invoke(wxUsdtPool, "putOneTknV2", [1, false], [AttachedPayment(usdtAssetId, usdtBalToSwap)]) | |
486 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
487 | - | then { | |
488 | - | let lpTokenBalance = assetBalance(this, usdtWxLPTokenAssetId) | |
489 | - | if ((lpTokenBalance == lpTokenBalance)) | |
490 | - | then { | |
491 | - | let sellPoolToken = invoke(wxUsdtPool, "getOneTknV2", [usdnAssetIdString, 1], [AttachedPayment(usdtWxLPTokenAssetId, lpTokenBalance)]) | |
492 | - | if ((sellPoolToken == sellPoolToken)) | |
493 | - | then { | |
494 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
495 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
496 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
497 | - | then throw("USDT PUZZLE -> WX [($_$)]") | |
498 | - | else nil | |
499 | - | else throw("Strict value is not equal to itself.") | |
500 | - | } | |
501 | - | else throw("Strict value is not equal to itself.") | |
502 | - | } | |
503 | - | else throw("Strict value is not equal to itself.") | |
504 | - | } | |
505 | - | else throw("Strict value is not equal to itself.") | |
506 | - | } | |
507 | - | else throw("Strict value is not equal to itself.") | |
508 | - | } | |
509 | - | else throw("Strict value is not equal to itself.") | |
510 | - | } | |
511 | - | else throw("Strict value is not equal to itself.") | |
512 | - | } | |
513 | - | ||
514 | - | ||
515 | - | ||
516 | - | @Callable(i) | |
517 | - | func a10 () = if ((i.caller != this)) | |
518 | - | then throw("you are not allowed to arb!") | |
519 | - | else { | |
520 | - | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
521 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
522 | - | then { | |
523 | - | let putTheTokenInThePool = invoke(wxUsdtPool, "putOneTknV2", [1, false], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
524 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
525 | - | then { | |
526 | - | let lpTokenBalance = assetBalance(this, usdtWxLPTokenAssetId) | |
527 | - | if ((lpTokenBalance == lpTokenBalance)) | |
528 | - | then { | |
529 | - | let sellPoolToken = invoke(wxUsdtPool, "getOneTknV2", [usdtAssetIdString, 1], [AttachedPayment(usdtWxLPTokenAssetId, lpTokenBalance)]) | |
530 | - | if ((sellPoolToken == sellPoolToken)) | |
531 | - | then { | |
532 | - | let usdtBalToSwap = assetBalance(this, usdtAssetId) | |
533 | - | if ((usdtBalToSwap == usdtBalToSwap)) | |
534 | - | then { | |
535 | - | let sellUsdtOnPuzzle = invoke(puzzleUsdtPool, "swap", [usdnAssetIdString, 1], [AttachedPayment(usdtAssetId, usdtBalToSwap)]) | |
536 | - | if ((sellUsdtOnPuzzle == sellUsdtOnPuzzle)) | |
537 | - | then { | |
538 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
539 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
540 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
541 | - | then throw("USDT WX -> PUZZLE [($_$)]") | |
542 | - | else nil | |
543 | - | else throw("Strict value is not equal to itself.") | |
544 | - | } | |
545 | - | else throw("Strict value is not equal to itself.") | |
546 | - | } | |
547 | - | else throw("Strict value is not equal to itself.") | |
548 | - | } | |
549 | - | else throw("Strict value is not equal to itself.") | |
550 | - | } | |
551 | - | else throw("Strict value is not equal to itself.") | |
552 | - | } | |
553 | - | else throw("Strict value is not equal to itself.") | |
554 | - | } | |
555 | - | else throw("Strict value is not equal to itself.") | |
556 | - | } | |
557 | - | ||
558 | - | ||
559 | - | ||
560 | - | @Callable(i) | |
561 | - | func a11 () = if ((i.caller != this)) | |
562 | - | then throw("you are not allowed to arb!") | |
563 | - | else { | |
564 | - | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
565 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
566 | - | then { | |
567 | - | let buyTsnOnPuzzle = invoke(puzzleTsnPool, "swap", [tsnAssetIdString, 1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
568 | - | if ((buyTsnOnPuzzle == buyTsnOnPuzzle)) | |
569 | - | then { | |
570 | - | let tsnBalToSwap = assetBalance(this, tsnAssetId) | |
571 | - | if ((tsnBalToSwap == tsnBalToSwap)) | |
572 | - | then { | |
573 | - | let putTheTokenInThePool = invoke(wxTsnPool, "putOneTkn", [1, false], [AttachedPayment(tsnAssetId, tsnBalToSwap)]) | |
574 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
575 | - | then { | |
576 | - | let lpTokenBalance = assetBalance(this, tsnWxLPTokenAssetId) | |
577 | - | if ((lpTokenBalance == lpTokenBalance)) | |
578 | - | then { | |
579 | - | let sellPoolToken = invoke(wxTsnPool, "getOneTkn", [usdnAssetIdString, 1], [AttachedPayment(tsnWxLPTokenAssetId, lpTokenBalance)]) | |
580 | - | if ((sellPoolToken == sellPoolToken)) | |
581 | - | then { | |
582 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
583 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
584 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
585 | - | then throw("TSN PUZZLE -> WX [($_$)]") | |
586 | - | else nil | |
587 | - | else throw("Strict value is not equal to itself.") | |
588 | - | } | |
589 | - | else throw("Strict value is not equal to itself.") | |
590 | - | } | |
591 | - | else throw("Strict value is not equal to itself.") | |
592 | - | } | |
593 | - | else throw("Strict value is not equal to itself.") | |
594 | - | } | |
595 | - | else throw("Strict value is not equal to itself.") | |
596 | - | } | |
597 | - | else throw("Strict value is not equal to itself.") | |
598 | - | } | |
599 | - | else throw("Strict value is not equal to itself.") | |
600 | - | } | |
601 | - | ||
602 | - | ||
603 | - | ||
604 | - | @Callable(i) | |
605 | - | func a12 () = if ((i.caller != this)) | |
606 | - | then throw("you are not allowed to arb!") | |
607 | - | else { | |
608 | - | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
609 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
610 | - | then { | |
611 | - | let putTheTokenInThePool = invoke(wxTsnPool, "putOneTkn", [1, false], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
612 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
613 | - | then { | |
614 | - | let lpTokenBalance = assetBalance(this, tsnWxLPTokenAssetId) | |
615 | - | if ((lpTokenBalance == lpTokenBalance)) | |
616 | - | then { | |
617 | - | let sellPoolToken = invoke(wxTsnPool, "getOneTkn", [tsnAssetIdString, 1], [AttachedPayment(tsnWxLPTokenAssetId, lpTokenBalance)]) | |
618 | - | if ((sellPoolToken == sellPoolToken)) | |
619 | - | then { | |
620 | - | let tsnBalToSwap = assetBalance(this, tsnAssetId) | |
621 | - | if ((tsnBalToSwap == tsnBalToSwap)) | |
622 | - | then { | |
623 | - | let selltsnOnPuzzle = invoke(puzzleTsnPool, "swap", [usdnAssetIdString, 1], [AttachedPayment(tsnAssetId, tsnBalToSwap)]) | |
624 | - | if ((selltsnOnPuzzle == selltsnOnPuzzle)) | |
625 | - | then { | |
626 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
627 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
628 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
629 | - | then throw("TSN WX -> PUZZLE [($_$)]") | |
630 | - | else nil | |
631 | - | else throw("Strict value is not equal to itself.") | |
632 | - | } | |
633 | - | else throw("Strict value is not equal to itself.") | |
634 | - | } | |
635 | - | else throw("Strict value is not equal to itself.") | |
636 | - | } | |
637 | - | else throw("Strict value is not equal to itself.") | |
638 | - | } | |
639 | - | else throw("Strict value is not equal to itself.") | |
640 | - | } | |
641 | - | else throw("Strict value is not equal to itself.") | |
642 | - | } | |
643 | - | else throw("Strict value is not equal to itself.") | |
644 | - | } | |
645 | - | ||
646 | - | ||
647 | - | ||
648 | - | @Callable(i) | |
649 | - | func a13 () = if ((i.caller != this)) | |
650 | - | then throw("you are not allowed to arb!") | |
651 | - | else { | |
652 | - | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
653 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
654 | - | then { | |
655 | - | let putTheTokenInThePool = invoke(wxBtcPool, "putOneTkn", [1, false], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
656 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
657 | - | then { | |
658 | - | let lpTokenBalance = assetBalance(this, btcWxLPTokenAssetId) | |
659 | - | if ((lpTokenBalance == lpTokenBalance)) | |
660 | - | then { | |
661 | - | let sellPoolToken = invoke(wxBtcPool, "getOneTkn", [btcAssetIdString, 1], [AttachedPayment(btcWxLPTokenAssetId, lpTokenBalance)]) | |
662 | - | if ((sellPoolToken == sellPoolToken)) | |
663 | - | then { | |
664 | - | let btcBalToSwap = assetBalance(this, btcAssetId) | |
665 | - | let swapBtcOnSwop = invoke(swopBtcPool, "exchange", [1], [AttachedPayment(btcAssetId, btcBalToSwap)]) | |
666 | - | if ((swapBtcOnSwop == swapBtcOnSwop)) | |
667 | - | then { | |
668 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
669 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
670 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
671 | - | then throw("BTC WX -> SWOP [($_$)]") | |
672 | - | else nil | |
673 | - | else throw("Strict value is not equal to itself.") | |
674 | - | } | |
675 | - | else throw("Strict value is not equal to itself.") | |
676 | - | } | |
677 | - | else throw("Strict value is not equal to itself.") | |
678 | - | } | |
679 | - | else throw("Strict value is not equal to itself.") | |
680 | - | } | |
681 | - | else throw("Strict value is not equal to itself.") | |
682 | - | } | |
683 | - | else throw("Strict value is not equal to itself.") | |
684 | - | } | |
685 | - | ||
686 | - | ||
687 | - | ||
688 | - | @Callable(i) | |
689 | - | func a14 () = if ((i.caller != this)) | |
690 | - | then throw("you are not allowed to arb!") | |
691 | - | else { | |
692 | - | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
693 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
694 | - | then { | |
695 | - | let swapToBtcOnSwop = invoke(swopBtcPool, "exchange", [1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
696 | - | if ((swapToBtcOnSwop == swapToBtcOnSwop)) | |
697 | - | then { | |
698 | - | let btcBalToSwap = assetBalance(this, btcAssetId) | |
699 | - | let putTheTokenInThePool = invoke(wxBtcPool, "putOneTkn", [1, false], [AttachedPayment(btcAssetId, btcBalToSwap)]) | |
700 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
701 | - | then { | |
702 | - | let lpTokenBalance = assetBalance(this, btcWxLPTokenAssetId) | |
703 | - | if ((lpTokenBalance == lpTokenBalance)) | |
704 | - | then { | |
705 | - | let sellPoolToken = invoke(wxBtcPool, "getOneTkn", [usdnAssetIdString, 1], [AttachedPayment(btcWxLPTokenAssetId, lpTokenBalance)]) | |
706 | - | if ((sellPoolToken == sellPoolToken)) | |
707 | - | then { | |
708 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
709 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
710 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
711 | - | then throw("BTC SWOP -> WX [($_$)]") | |
712 | - | else nil | |
713 | - | else throw("Strict value is not equal to itself.") | |
714 | - | } | |
715 | - | else throw("Strict value is not equal to itself.") | |
716 | - | } | |
717 | - | else throw("Strict value is not equal to itself.") | |
718 | - | } | |
719 | - | else throw("Strict value is not equal to itself.") | |
720 | - | } | |
721 | - | else throw("Strict value is not equal to itself.") | |
722 | - | } | |
723 | - | else throw("Strict value is not equal to itself.") | |
724 | - | } | |
725 | - | ||
726 | - | ||
727 | - | ||
728 | - | @Callable(i) | |
729 | - | func a15 () = if ((i.caller != this)) | |
730 | - | then throw("you are not allowed to arb!") | |
731 | - | else { | |
732 | - | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
733 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
734 | - | then { | |
735 | - | let putTheTokenInThePool = invoke(wxEthPool, "putOneTkn", [1, false], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
736 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
737 | - | then { | |
738 | - | let lpTokenBalance = assetBalance(this, ethWxLPTokenAssetId) | |
739 | - | if ((lpTokenBalance == lpTokenBalance)) | |
740 | - | then { | |
741 | - | let sellPoolToken = invoke(wxEthPool, "getOneTkn", [ethAssetIdString, 1], [AttachedPayment(ethWxLPTokenAssetId, lpTokenBalance)]) | |
742 | - | if ((sellPoolToken == sellPoolToken)) | |
743 | - | then { | |
744 | - | let ethBalToSwap = assetBalance(this, ethAssetId) | |
745 | - | let swapEthOnSwop = invoke(swopEthPool, "exchange", [1], [AttachedPayment(ethAssetId, ethBalToSwap)]) | |
746 | - | if ((swapEthOnSwop == swapEthOnSwop)) | |
747 | - | then { | |
748 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
749 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
750 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
751 | - | then throw("ETH WX -> SWOP [($_$)]") | |
752 | - | else nil | |
753 | - | else throw("Strict value is not equal to itself.") | |
754 | - | } | |
755 | - | else throw("Strict value is not equal to itself.") | |
756 | - | } | |
757 | - | else throw("Strict value is not equal to itself.") | |
758 | - | } | |
759 | - | else throw("Strict value is not equal to itself.") | |
760 | - | } | |
761 | - | else throw("Strict value is not equal to itself.") | |
762 | - | } | |
763 | - | else throw("Strict value is not equal to itself.") | |
764 | - | } | |
765 | - | ||
766 | - | ||
767 | - | ||
768 | - | @Callable(i) | |
769 | - | func a16 () = if ((i.caller != this)) | |
770 | - | then throw("you are not allowed to arb!") | |
771 | - | else { | |
772 | - | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
773 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
774 | - | then { | |
775 | - | let swapToEthOnSwop = invoke(swopEthPool, "exchange", [1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
776 | - | if ((swapToEthOnSwop == swapToEthOnSwop)) | |
777 | - | then { | |
778 | - | let ethBalToSwap = assetBalance(this, ethAssetId) | |
779 | - | let putTheTokenInThePool = invoke(wxEthPool, "putOneTkn", [1, false], [AttachedPayment(ethAssetId, ethBalToSwap)]) | |
780 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
781 | - | then { | |
782 | - | let lpTokenBalance = assetBalance(this, ethWxLPTokenAssetId) | |
783 | - | if ((lpTokenBalance == lpTokenBalance)) | |
784 | - | then { | |
785 | - | let sellPoolToken = invoke(wxEthPool, "getOneTkn", [usdnAssetIdString, 1], [AttachedPayment(ethWxLPTokenAssetId, lpTokenBalance)]) | |
786 | - | if ((sellPoolToken == sellPoolToken)) | |
787 | - | then { | |
788 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
789 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
790 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
791 | - | then throw("ETH SWOP -> WX [($_$)]") | |
792 | - | else nil | |
793 | - | else throw("Strict value is not equal to itself.") | |
794 | - | } | |
795 | - | else throw("Strict value is not equal to itself.") | |
796 | - | } | |
797 | - | else throw("Strict value is not equal to itself.") | |
798 | - | } | |
799 | - | else throw("Strict value is not equal to itself.") | |
800 | - | } | |
801 | - | else throw("Strict value is not equal to itself.") | |
802 | - | } | |
803 | - | else throw("Strict value is not equal to itself.") | |
804 | - | } | |
805 | - | ||
806 | - | ||
807 | - | ||
808 | - | @Callable(i) | |
809 | - | func a17 () = if ((i.caller != this)) | |
810 | - | then throw("you are not allowed to arb!") | |
811 | - | else { | |
812 | - | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
813 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
814 | - | then { | |
815 | - | let putTheTokenInThePool = invoke(wxLtcPool, "putOneTkn", [1, false], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
816 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
817 | - | then { | |
818 | - | let lpTokenBalance = assetBalance(this, ltcWxLPTokenAssetId) | |
819 | - | if ((lpTokenBalance == lpTokenBalance)) | |
820 | - | then { | |
821 | - | let sellPoolToken = invoke(wxLtcPool, "getOneTkn", [ltcAssetIdString, 1], [AttachedPayment(ltcWxLPTokenAssetId, lpTokenBalance)]) | |
822 | - | if ((sellPoolToken == sellPoolToken)) | |
823 | - | then { | |
824 | - | let ltcBalToSwap = assetBalance(this, ltcAssetId) | |
825 | - | let swapLtcOnSwop = invoke(swopLtcPool, "exchange", [1], [AttachedPayment(ltcAssetId, ltcBalToSwap)]) | |
826 | - | if ((swapLtcOnSwop == swapLtcOnSwop)) | |
827 | - | then { | |
828 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
829 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
830 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
831 | - | then throw("LTC WX -> SWOP [($_$)]") | |
832 | - | else nil | |
833 | - | else throw("Strict value is not equal to itself.") | |
834 | - | } | |
835 | - | else throw("Strict value is not equal to itself.") | |
836 | - | } | |
837 | - | else throw("Strict value is not equal to itself.") | |
838 | - | } | |
839 | - | else throw("Strict value is not equal to itself.") | |
840 | - | } | |
841 | - | else throw("Strict value is not equal to itself.") | |
842 | - | } | |
843 | - | else throw("Strict value is not equal to itself.") | |
844 | - | } | |
845 | - | ||
846 | - | ||
847 | - | ||
848 | - | @Callable(i) | |
849 | - | func a18 () = if ((i.caller != this)) | |
850 | - | then throw("you are not allowed to arb!") | |
851 | - | else { | |
852 | - | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
853 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
854 | - | then { | |
855 | - | let swapToLtcOnSwop = invoke(swopLtcPool, "exchange", [1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
856 | - | if ((swapToLtcOnSwop == swapToLtcOnSwop)) | |
857 | - | then { | |
858 | - | let ltcBalToSwap = assetBalance(this, ltcAssetId) | |
859 | - | let putTheTokenInThePool = invoke(wxLtcPool, "putOneTkn", [1, false], [AttachedPayment(ltcAssetId, ltcBalToSwap)]) | |
860 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
861 | - | then { | |
862 | - | let lpTokenBalance = assetBalance(this, ltcWxLPTokenAssetId) | |
863 | - | if ((lpTokenBalance == lpTokenBalance)) | |
864 | - | then { | |
865 | - | let sellPoolToken = invoke(wxLtcPool, "getOneTkn", [usdnAssetIdString, 1], [AttachedPayment(ltcWxLPTokenAssetId, lpTokenBalance)]) | |
866 | - | if ((sellPoolToken == sellPoolToken)) | |
867 | - | then { | |
868 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
869 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
870 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
871 | - | then throw("LTC SWOP -> WX [($_$)]") | |
872 | - | else nil | |
873 | - | else throw("Strict value is not equal to itself.") | |
874 | - | } | |
875 | - | else throw("Strict value is not equal to itself.") | |
876 | - | } | |
877 | - | else throw("Strict value is not equal to itself.") | |
878 | - | } | |
879 | - | else throw("Strict value is not equal to itself.") | |
880 | - | } | |
881 | - | else throw("Strict value is not equal to itself.") | |
882 | - | } | |
883 | - | else throw("Strict value is not equal to itself.") | |
884 | - | } | |
885 | - | ||
886 | - | ||
887 | - | ||
888 | - | @Callable(i) | |
889 | - | func a19 () = if ((i.caller != this)) | |
890 | - | then throw("you are not allowed to arb!") | |
891 | - | else { | |
892 | - | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
893 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
894 | - | then { | |
895 | - | let putTheTokenInThePool = invoke(wxWestPool, "putOneTkn", [1, false], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
896 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
897 | - | then { | |
898 | - | let lpTokenBalance = assetBalance(this, westWxLPTokenAssetId) | |
899 | - | if ((lpTokenBalance == lpTokenBalance)) | |
900 | - | then { | |
901 | - | let sellPoolToken = invoke(wxWestPool, "getOneTkn", [westAssetIdString, 1], [AttachedPayment(westWxLPTokenAssetId, lpTokenBalance)]) | |
902 | - | if ((sellPoolToken == sellPoolToken)) | |
903 | - | then { | |
904 | - | let westBalToSwap = assetBalance(this, westAssetId) | |
905 | - | let swapWestOnSwop = invoke(swopWestPool, "exchange", [1], [AttachedPayment(westAssetId, westBalToSwap)]) | |
906 | - | if ((swapWestOnSwop == swapWestOnSwop)) | |
907 | - | then { | |
908 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
909 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
910 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
911 | - | then throw("WEST WX -> SWOP [($_$)]") | |
912 | - | else nil | |
913 | - | else throw("Strict value is not equal to itself.") | |
914 | - | } | |
915 | - | else throw("Strict value is not equal to itself.") | |
916 | - | } | |
917 | - | else throw("Strict value is not equal to itself.") | |
918 | - | } | |
919 | - | else throw("Strict value is not equal to itself.") | |
920 | - | } | |
921 | - | else throw("Strict value is not equal to itself.") | |
922 | - | } | |
923 | - | else throw("Strict value is not equal to itself.") | |
924 | - | } | |
925 | - | ||
926 | - | ||
927 | - | ||
928 | - | @Callable(i) | |
929 | - | func a20 () = if ((i.caller != this)) | |
930 | - | then throw("you are not allowed to arb!") | |
931 | - | else { | |
932 | - | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
933 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
934 | - | then { | |
935 | - | let swapToWestOnSwop = invoke(swopWestPool, "exchange", [1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
936 | - | if ((swapToWestOnSwop == swapToWestOnSwop)) | |
937 | - | then { | |
938 | - | let westBalToSwap = assetBalance(this, westAssetId) | |
939 | - | let putTheTokenInThePool = invoke(wxWestPool, "putOneTkn", [1, false], [AttachedPayment(westAssetId, westBalToSwap)]) | |
940 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
941 | - | then { | |
942 | - | let lpTokenBalance = assetBalance(this, westWxLPTokenAssetId) | |
943 | - | if ((lpTokenBalance == lpTokenBalance)) | |
944 | - | then { | |
945 | - | let sellPoolToken = invoke(wxWestPool, "getOneTkn", [usdnAssetIdString, 1], [AttachedPayment(westWxLPTokenAssetId, lpTokenBalance)]) | |
946 | - | if ((sellPoolToken == sellPoolToken)) | |
947 | - | then { | |
948 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
949 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
950 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
951 | - | then throw("WEST SWOP -> WX [($_$)]") | |
952 | - | else nil | |
953 | - | else throw("Strict value is not equal to itself.") | |
954 | - | } | |
955 | - | else throw("Strict value is not equal to itself.") | |
956 | - | } | |
957 | - | else throw("Strict value is not equal to itself.") | |
958 | - | } | |
959 | - | else throw("Strict value is not equal to itself.") | |
960 | - | } | |
961 | - | else throw("Strict value is not equal to itself.") | |
962 | - | } | |
963 | - | else throw("Strict value is not equal to itself.") | |
964 | - | } | |
965 | - | ||
966 | - | ||
967 | - | ||
968 | - | @Callable(i) | |
969 | - | func a21 () = if ((i.caller != this)) | |
970 | - | then throw("you are not allowed to arb!") | |
971 | - | else { | |
972 | - | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
973 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
974 | - | then { | |
975 | - | let putTheTokenInThePool = invoke(wxEggPool, "putOneTkn", [1, false], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
976 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
977 | - | then { | |
978 | - | let lpTokenBalance = assetBalance(this, eggWxLPTokenAssetId) | |
979 | - | if ((lpTokenBalance == lpTokenBalance)) | |
980 | - | then { | |
981 | - | let sellPoolToken = invoke(wxEggPool, "getOneTkn", [eggAssetIdString, 1], [AttachedPayment(eggWxLPTokenAssetId, lpTokenBalance)]) | |
982 | - | if ((sellPoolToken == sellPoolToken)) | |
983 | - | then { | |
984 | - | let eggBalToSwap = assetBalance(this, eggAssetId) | |
985 | - | let swapEggOnSwop = invoke(swopEggPool, "exchange", [1], [AttachedPayment(eggAssetId, eggBalToSwap)]) | |
986 | - | if ((swapEggOnSwop == swapEggOnSwop)) | |
987 | - | then { | |
988 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
989 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
990 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
991 | - | then throw("EGG WX -> SWOP [($_$)]") | |
992 | - | else nil | |
993 | - | else throw("Strict value is not equal to itself.") | |
994 | - | } | |
995 | - | else throw("Strict value is not equal to itself.") | |
996 | - | } | |
997 | - | else throw("Strict value is not equal to itself.") | |
998 | - | } | |
999 | - | else throw("Strict value is not equal to itself.") | |
1000 | - | } | |
1001 | - | else throw("Strict value is not equal to itself.") | |
1002 | - | } | |
1003 | - | else throw("Strict value is not equal to itself.") | |
1004 | - | } | |
1005 | - | ||
1006 | - | ||
1007 | - | ||
1008 | - | @Callable(i) | |
1009 | - | func a22 () = if ((i.caller != this)) | |
1010 | - | then throw("you are not allowed to arb!") | |
1011 | - | else { | |
1012 | - | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
1013 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
1014 | - | then { | |
1015 | - | let swapToEggOnSwop = invoke(swopEggPool, "exchange", [1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
1016 | - | if ((swapToEggOnSwop == swapToEggOnSwop)) | |
1017 | - | then { | |
1018 | - | let eggBalToSwap = assetBalance(this, eggAssetId) | |
1019 | - | let putTheTokenInThePool = invoke(wxEggPool, "putOneTkn", [1, false], [AttachedPayment(eggAssetId, eggBalToSwap)]) | |
1020 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
1021 | - | then { | |
1022 | - | let lpTokenBalance = assetBalance(this, eggWxLPTokenAssetId) | |
1023 | - | if ((lpTokenBalance == lpTokenBalance)) | |
1024 | - | then { | |
1025 | - | let sellPoolToken = invoke(wxEggPool, "getOneTkn", [usdnAssetIdString, 1], [AttachedPayment(eggWxLPTokenAssetId, lpTokenBalance)]) | |
1026 | - | if ((sellPoolToken == sellPoolToken)) | |
1027 | - | then { | |
1028 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
1029 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
1030 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
1031 | - | then throw("EGG SWOP -> WX [($_$)]") | |
1032 | - | else nil | |
1033 | - | else throw("Strict value is not equal to itself.") | |
1034 | - | } | |
1035 | - | else throw("Strict value is not equal to itself.") | |
1036 | - | } | |
1037 | - | else throw("Strict value is not equal to itself.") | |
1038 | - | } | |
1039 | - | else throw("Strict value is not equal to itself.") | |
1040 | - | } | |
1041 | - | else throw("Strict value is not equal to itself.") | |
1042 | - | } | |
1043 | - | else throw("Strict value is not equal to itself.") | |
1044 | - | } | |
1045 | - | ||
1046 | - | ||
1047 | - | ||
1048 | - | @Callable(i) | |
1049 | - | func a23 () = if ((i.caller != this)) | |
1050 | - | then throw("you are not allowed to arb!") | |
1051 | - | else { | |
1052 | - | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
1053 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
1054 | - | then { | |
1055 | - | let buyPlutoOnPuzzle = invoke(puzzlePlutoPool, "swap", [plutoAssetIdString, 1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
1056 | - | if ((buyPlutoOnPuzzle == buyPlutoOnPuzzle)) | |
1057 | - | then { | |
1058 | - | let plutoBalToSwap = assetBalance(this, plutoAssetId) | |
1059 | - | let swapPlutoOnSwop = invoke(swopPlutoPool, "exchange", [1], [AttachedPayment(plutoAssetId, plutoBalToSwap)]) | |
1060 | - | if ((swapPlutoOnSwop == swapPlutoOnSwop)) | |
1061 | - | then { | |
1062 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
1063 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
1064 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
1065 | - | then throw("PLUTO PUZZLE -> SWOP [($_$)]") | |
1066 | - | else nil | |
1067 | - | else throw("Strict value is not equal to itself.") | |
1068 | - | } | |
1069 | - | else throw("Strict value is not equal to itself.") | |
1070 | - | } | |
1071 | - | else throw("Strict value is not equal to itself.") | |
1072 | - | } | |
1073 | - | else throw("Strict value is not equal to itself.") | |
1074 | - | } | |
1075 | - | ||
1076 | - | ||
1077 | - | ||
1078 | - | @Callable(i) | |
1079 | - | func a24 () = if ((i.caller != this)) | |
1080 | - | then throw("you are not allowed to arb!") | |
1081 | - | else { | |
1082 | - | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
1083 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
1084 | - | then { | |
1085 | - | let swapToPlutoOnSwop = invoke(swopPlutoPool, "exchange", [1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
1086 | - | if ((swapToPlutoOnSwop == swapToPlutoOnSwop)) | |
1087 | - | then { | |
1088 | - | let plutoBalToSwap = assetBalance(this, plutoAssetId) | |
1089 | - | let sellPlutoOnPuzzle = invoke(puzzlePlutoPool, "swap", [usdnAssetIdString, 1], [AttachedPayment(plutoAssetId, plutoBalToSwap)]) | |
1090 | - | if ((sellPlutoOnPuzzle == sellPlutoOnPuzzle)) | |
1091 | - | then { | |
1092 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
1093 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
1094 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
1095 | - | then throw("PLUTO SWOP -> PUZZLE [($_$)]") | |
1096 | - | else nil | |
1097 | - | else throw("Strict value is not equal to itself.") | |
1098 | - | } | |
1099 | - | else throw("Strict value is not equal to itself.") | |
1100 | - | } | |
1101 | - | else throw("Strict value is not equal to itself.") | |
1102 | - | } | |
1103 | - | else throw("Strict value is not equal to itself.") | |
1104 | - | } | |
1105 | - | ||
1106 | - | ||
1107 | - | @Verifier(tx) | |
1108 | - | func verify () = sigVerify_128Kb(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
1109 | 772 |
github/deemru/w8io/026f985 106.73 ms ◑