tx · DPjxpJMPMHjogUCQ7CzuPXyPA8tvA6TJVJTJfneuJ8UN 3N1s2w4NHgbrXxNZXH9RtaVT9ptHRJcgSp2: -0.02300000 Waves 2023.11.26 22:35 [2860799] smart account 3N1s2w4NHgbrXxNZXH9RtaVT9ptHRJcgSp2 > SELF 0.00000000 Waves
{ "type": 13, "id": "DPjxpJMPMHjogUCQ7CzuPXyPA8tvA6TJVJTJfneuJ8UN", "fee": 2300000, "feeAssetId": null, "timestamp": 1701027332338, "version": 2, "chainId": 84, "sender": "3N1s2w4NHgbrXxNZXH9RtaVT9ptHRJcgSp2", "senderPublicKey": "DNKNL32sAVUYg4iGA3tW8Z6VXrENmGCmKfG6DLar82aP", "proofs": [ "e7fDXNSpAxvLNHjbWAzKi2FtfWHrqphbS8zAdkxJzJbYRFemgy3ozFzTmyDcdDcMR7P65g8XfPpq58AxAoghGUY" ], "script": "base64:AAIFAAAAAAAAADAIAhIMCgoBAQgIAQEBCAEBEgwKCgEBCAgBAQEIAQESABIECgIIARIDCgEIEgMKAQgAAAALAAAAABZwb29sX2xpcXVpZGl0eV9hZGRyZXNzAgAAACMzTjR3QmdZdFdnSlcyTFRSZWYyZWtXUVRyRVhDUmZYbUdMaAAAAAAURGFwcF9BZGRyZXNzX3B1Yl9rZXkBAAAAIMjtmNqG7lU1WGDHPJboKlti9SIwxR/k7IFRCWjnzhpzAAAAABhwcm9kdWN0X2xhdW5jaF90aW1lc3RhbXAAAAABir9gFiAAAAAAC0N1cnJlbmN5X0lEAgAAAAVXQVZFUwAAAAAUcHJvZHVjdF9sYXVuY2hfZXJyb3ICAAAAI1Byb2R1Y3QgTGF1bmNoIFRpbWVzdGFtcCBpcyBzZXQgYXQgAAAAABBub19wYXltZW50X2Vycm9yAgAAADdObyBwYXltZW50IGF0dGFjaGVkLCBQbGVhc2UgQXR0YWNoIFRva2VuIGluIHBheW1lbnRbMV0uAAAAABJjbG9zZWRfb3JhY2xlX2Vyb3ICAAAAMU9yYWNsZSBpcyBj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AAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5CYkuoQ==", "height": 2860799, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EyvaQ5x8v9CzgCoxRK3f42Rwd2YRgxA9WDP8G9whHpbM Next: Dixr8Lx5aBFR5ZDQJffPHATEMpYnoycwm9ESNry3m8PR Diff:
Old | New | Differences | |
---|---|---|---|
19 | 19 | ||
20 | 20 | let network_fee = 900000 | |
21 | 21 | ||
22 | - | let voucher_claim_fee = 1500000 | |
23 | - | ||
24 | - | let maximum_vocucher_claim_amount = 50000000 | |
25 | - | ||
26 | 22 | let minimum_order_size = 10000000 | |
27 | 23 | ||
28 | 24 | let maximum_order_size = 10000000000 | |
29 | - | ||
30 | - | func Add_Voucher_to_User_Balance (User_Address,Amount) = { | |
31 | - | let PreviousUserDeposit = match getInteger(this, ((Currency_ID + "_") + User_Address)) { | |
32 | - | case a: Int => | |
33 | - | a | |
34 | - | case _ => | |
35 | - | 0 | |
36 | - | } | |
37 | - | let TotalUserDeposit = (PreviousUserDeposit + Amount) | |
38 | - | TotalUserDeposit | |
39 | - | } | |
40 | - | ||
41 | 25 | ||
42 | 26 | @Callable(i) | |
43 | 27 | func placeoptionCall (Amount,OptionCounterID,User_ID,User_Address,Price,Call_Limits,Put_Limits,Oracle_Status,Start_Order_Timestamp,End_Order_Timestamp) = { | |
101 | 85 | } | |
102 | 86 | let TotalUserCallinSpecificCounter = (PreviousUserCallinSpecificCounter + 1) | |
103 | 87 | let Funds_at_risk = fraction(read_TPL, 5, 100) | |
104 | - | if ((product_launch_timestamp > lastBlock.timestamp)) | |
105 | - | then throw((product_launch_error + toString(product_launch_timestamp))) | |
106 | - | else if ((Oracle_Status == "CLOSE")) | |
107 | - | then throw(closed_oracle_eror) | |
108 | - | else if ((ifBlacklisted == "Yes")) | |
109 | - | then throw((User_Address + " Address is Blacklisted. Please contact Admin to Whitelist it.")) | |
110 | - | else if ((lastBlock.timestamp >= read_end_order_permit_timestamp)) | |
111 | - | then throw("Option Order placing Timing Limits are Over. Please Join in Next Cycle.") | |
112 | - | else if ((TotalFundsAddedInSpecificOptionOrder > Funds_at_risk)) | |
113 | - | then throw((((("No more orders accepted, Option House Risk Size is only limited to " + toString(Funds_at_risk)) + ", Pending House Risk is ") + toString((Funds_at_risk - PreviousFundsAddedInSpecificOptionOrder))) + ". Join in next Cycle.")) | |
114 | - | else if ((minimum_order_size > Amount)) | |
115 | - | then throw((("Placed Order Size is less than [" + toString(minimum_order_size)) + "/10^8] WAVES.")) | |
116 | - | else if ((Amount > maximum_order_size)) | |
117 | - | then throw((("Placed Order Size is more than [" + toString(maximum_order_size)) + "/10^8] WAVES.")) | |
118 | - | else if ((0 > update_user_funds)) | |
119 | - | then throw(("Placed Order Amount is going negative. Please reduce the Order Size. Negative Fund Amount = " + toString(update_user_funds))) | |
120 | - | else if ((size(toString(Start_Order_Timestamp)) != 13)) | |
121 | - | then throw("Start Timestamp is Wrong. Please Enter a Valid Timestamp. Probably you entered an Timestamp less than 13 Chars.") | |
122 | - | else if ((size(toString(End_Order_Timestamp)) != 13)) | |
123 | - | then throw("End Timestamp is Wrong. Please Enter a Valid Timestamp. Probably you entered an Timestamp less than 13 Chars.") | |
124 | - | else [StringEntry(("User_ID_" + User_Address), User_ID), IntegerEntry(((Currency_ID + "_") + User_Address), update_user_funds), IntegerEntry("Network_Fee_To_Place_Order", network_fee), StringEntry(((("Call_" + User_Address) + "_") + toString(TotalUserCall)), toString(Price)), IntegerEntry(((("Call_Amount_" + User_Address) + "_") + toString(TotalUserCall)), Amount), StringEntry(((("Call_Start_End_" + User_Address) + "_") + toString(TotalUserCall)), ((toString(read_OptionCounterID) + "_") + toString(OptionExpireCounterID))), IntegerEntry("Total_Option_Orders", TotalOptionOrders), IntegerEntry(("Total_Funds_Added_In_Option_Order_" + toString(read_OptionCounterID)), TotalFundsAddedInSpecificOptionOrder), IntegerEntry("Total_Pool_Liquidity", read_TPL), IntegerEntry(("Funds_At_Risk_" + toString(read_OptionCounterID)), Funds_at_risk), IntegerEntry("Call_Limits", Call_Limits), IntegerEntry("Put_Limits", Put_Limits), IntegerEntry(("Total_Option_Orders_" + toString(read_OptionCounterID)), TotalOptionOrdersinSpecificCounter), IntegerEntry("Total_Calls", TotalCall), IntegerEntry(("Total_Calls_" + toString(read_OptionCounterID)), TotalCallinSpecificCounter), IntegerEntry((User_Address + "_Total_Calls"), TotalUserCall), IntegerEntry(((User_Address + "_Total_Calls_") + toString(read_OptionCounterID)), TotalUserCallinSpecificCounter), ScriptTransfer(whitelist_address, network_fee, unit), ScriptTransfer(addressFromStringValue(pool_liquidity_address), Amount, unit)] | |
88 | + | if ((i.caller != whitelist_address)) | |
89 | + | then throw((("This Address is not Authorized. Only " + toString(whitelist_address)) + " is Authorized Address to Sign it.")) | |
90 | + | else if ((product_launch_timestamp > lastBlock.timestamp)) | |
91 | + | then throw((product_launch_error + toString(product_launch_timestamp))) | |
92 | + | else if ((Oracle_Status == "CLOSE")) | |
93 | + | then throw(closed_oracle_eror) | |
94 | + | else if ((ifBlacklisted == "Yes")) | |
95 | + | then throw((User_Address + " Address is Blacklisted. Please contact Admin to Whitelist it.")) | |
96 | + | else if ((lastBlock.timestamp >= read_end_order_permit_timestamp)) | |
97 | + | then throw("Option Order placing Timing Limits are Over. Please Join in Next Cycle.") | |
98 | + | else if ((TotalFundsAddedInSpecificOptionOrder > Funds_at_risk)) | |
99 | + | then throw((((("No more orders accepted, Option House Risk Size is only limited to " + toString(Funds_at_risk)) + ", Pending House Risk is ") + toString((Funds_at_risk - PreviousFundsAddedInSpecificOptionOrder))) + ". Join in next Cycle.")) | |
100 | + | else if ((minimum_order_size > Amount)) | |
101 | + | then throw((("Placed Order Size is less than [" + toString(minimum_order_size)) + "/10^8] WAVES.")) | |
102 | + | else if ((Amount > maximum_order_size)) | |
103 | + | then throw((("Placed Order Size is more than [" + toString(maximum_order_size)) + "/10^8] WAVES.")) | |
104 | + | else if ((0 > update_user_funds)) | |
105 | + | then throw(("Placed Order Amount is going negative. Please reduce the Order Size. Negative Fund Amount = " + toString(update_user_funds))) | |
106 | + | else if ((size(toString(Start_Order_Timestamp)) != 13)) | |
107 | + | then throw("Start Timestamp is Wrong. Please Enter a Valid Timestamp. Probably you entered an Timestamp less than 13 Chars.") | |
108 | + | else if ((size(toString(End_Order_Timestamp)) != 13)) | |
109 | + | then throw("End Timestamp is Wrong. Please Enter a Valid Timestamp. Probably you entered an Timestamp less than 13 Chars.") | |
110 | + | else [StringEntry(("User_ID_" + User_Address), User_ID), IntegerEntry(((Currency_ID + "_") + User_Address), update_user_funds), IntegerEntry("Network_Fee_To_Place_Order", network_fee), StringEntry(((("Call_" + User_Address) + "_") + toString(TotalUserCall)), toString(Price)), IntegerEntry(((("Call_Amount_" + User_Address) + "_") + toString(TotalUserCall)), Amount), StringEntry(((("Call_Start_End_" + User_Address) + "_") + toString(TotalUserCall)), ((toString(read_OptionCounterID) + "_") + toString(OptionExpireCounterID))), IntegerEntry("Total_Option_Orders", TotalOptionOrders), IntegerEntry(("Total_Funds_Added_In_Option_Order_" + toString(read_OptionCounterID)), TotalFundsAddedInSpecificOptionOrder), IntegerEntry("Total_Pool_Liquidity", read_TPL), IntegerEntry(("Funds_At_Risk_" + toString(read_OptionCounterID)), Funds_at_risk), IntegerEntry("Call_Limits", Call_Limits), IntegerEntry("Put_Limits", Put_Limits), IntegerEntry(("Total_Option_Orders_" + toString(read_OptionCounterID)), TotalOptionOrdersinSpecificCounter), IntegerEntry("Total_Calls", TotalCall), IntegerEntry(("Total_Calls_" + toString(read_OptionCounterID)), TotalCallinSpecificCounter), IntegerEntry((User_Address + "_Total_Calls"), TotalUserCall), IntegerEntry(((User_Address + "_Total_Calls_") + toString(read_OptionCounterID)), TotalUserCallinSpecificCounter), ScriptTransfer(whitelist_address, network_fee, unit), ScriptTransfer(addressFromStringValue(pool_liquidity_address), Amount, unit)] | |
125 | 111 | } | |
126 | 112 | ||
127 | 113 | ||
248 | 234 | ||
249 | 235 | ||
250 | 236 | @Callable(i) | |
251 | - | func Fill_Vouchers_Liquidity () = { | |
252 | - | let calleraddress = toBase58String(i.caller.bytes) | |
253 | - | let pmt = if ((size(i.payments) == 1)) | |
254 | - | then i.payments[0] | |
255 | - | else throw("No payment attached, Please Attach only Whitelisted Tokens in payment[1].") | |
256 | - | let PreviousVouchersBalance = match getInteger(this, "Available_Vouchers_Balance") { | |
257 | - | case a: Int => | |
258 | - | a | |
259 | - | case _ => | |
260 | - | 0 | |
261 | - | } | |
262 | - | let TotalVouchersBalance = (PreviousVouchersBalance + pmt.amount) | |
263 | - | let PreviousVouchersCounterID = match getInteger(this, "Vouchers_Counter_ID") { | |
264 | - | case a: Int => | |
265 | - | a | |
266 | - | case _ => | |
267 | - | 0 | |
268 | - | } | |
269 | - | let TotalVouchersCounterID = (PreviousVouchersCounterID + 1) | |
270 | - | if (isDefined(pmt.assetId)) | |
271 | - | then throw("Only WAVES is allowed to deposit at the moment") | |
272 | - | else [IntegerEntry("Available_Vouchers_Balance", TotalVouchersBalance), IntegerEntry((toString(TotalVouchersCounterID) + "_Voucher_Amount"), pmt.amount), IntegerEntry("Vouchers_Counter_ID", TotalVouchersCounterID)] | |
273 | - | } | |
274 | - | ||
275 | - | ||
276 | - | ||
277 | - | @Callable(i) | |
278 | - | func Play_With_Vouchers (Amount,OptionCounterID,User_ID,User_Address,Price,Call_Limits,Put_Limits,Oracle_Status,Start_Order_Timestamp,End_Order_Timestamp) = { | |
279 | - | let read_vouchers_funds = valueOrErrorMessage(getInteger("Available_Vouchers_Balance"), "No Voucher Balance was found.") | |
280 | - | let User_Voucher_Balance = Add_Voucher_to_User_Balance(User_Address, Amount) | |
281 | - | let new_vouchers_funds = (read_vouchers_funds - Amount) | |
282 | - | let place_order = invoke(this, "placeoptionCall", [Amount, OptionCounterID, User_ID, User_Address, Price, Call_Limits, Put_Limits, Oracle_Status, Start_Order_Timestamp, End_Order_Timestamp], nil) | |
283 | - | if ((i.caller != whitelist_address)) | |
284 | - | then throw((("This Address is not Authorized. Only " + toString(whitelist_address)) + " is Authorized Address to Sign it.")) | |
285 | - | else if ((0 > new_vouchers_funds)) | |
286 | - | then throw((("Requested Voucher Amount is going in negative State of " + toString(new_vouchers_funds)) + "/10^8] WAVES.")) | |
287 | - | else if ((place_order == place_order)) | |
288 | - | then [IntegerEntry("Available_Vouchers_Balance", new_vouchers_funds)] | |
289 | - | else throw("Strict value is not equal to itself.") | |
290 | - | } | |
291 | - | ||
292 | - | ||
293 | - | ||
294 | - | @Callable(i) | |
295 | 237 | func WithdrawUserFunds (User_Address,Amount) = { | |
296 | 238 | let calleraddress = toBase58String(i.caller.bytes) | |
297 | 239 | let readuserbalance = getIntegerValue(((Currency_ID + "_") + User_Address)) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let pool_liquidity_address = "3N4wBgYtWgJW2LTRef2ekWQTrEXCRfXmGLh" | |
5 | 5 | ||
6 | 6 | let Dapp_Address_pub_key = base58'EXLfxKmqhQPiProBaoPatTentUSZX5Dd8A8bYDcmfNwt' | |
7 | 7 | ||
8 | 8 | let product_launch_timestamp = 1695427860000 | |
9 | 9 | ||
10 | 10 | let Currency_ID = "WAVES" | |
11 | 11 | ||
12 | 12 | let product_launch_error = "Product Launch Timestamp is set at " | |
13 | 13 | ||
14 | 14 | let no_payment_error = "No payment attached, Please Attach Token in payment[1]." | |
15 | 15 | ||
16 | 16 | let closed_oracle_eror = "Oracle is closed. Wait Until Oracle is Turned On." | |
17 | 17 | ||
18 | 18 | let whitelist_address = addressFromPublicKey(Dapp_Address_pub_key) | |
19 | 19 | ||
20 | 20 | let network_fee = 900000 | |
21 | 21 | ||
22 | - | let voucher_claim_fee = 1500000 | |
23 | - | ||
24 | - | let maximum_vocucher_claim_amount = 50000000 | |
25 | - | ||
26 | 22 | let minimum_order_size = 10000000 | |
27 | 23 | ||
28 | 24 | let maximum_order_size = 10000000000 | |
29 | - | ||
30 | - | func Add_Voucher_to_User_Balance (User_Address,Amount) = { | |
31 | - | let PreviousUserDeposit = match getInteger(this, ((Currency_ID + "_") + User_Address)) { | |
32 | - | case a: Int => | |
33 | - | a | |
34 | - | case _ => | |
35 | - | 0 | |
36 | - | } | |
37 | - | let TotalUserDeposit = (PreviousUserDeposit + Amount) | |
38 | - | TotalUserDeposit | |
39 | - | } | |
40 | - | ||
41 | 25 | ||
42 | 26 | @Callable(i) | |
43 | 27 | func placeoptionCall (Amount,OptionCounterID,User_ID,User_Address,Price,Call_Limits,Put_Limits,Oracle_Status,Start_Order_Timestamp,End_Order_Timestamp) = { | |
44 | 28 | let calleraddress = toBase58String(i.caller.bytes) | |
45 | 29 | let ifBlacklisted = getString(this, ("addr_BLACKLISTED_" + User_Address)) | |
46 | 30 | let read_TPL = valueOrErrorMessage(getInteger(addressFromStringValue(pool_liquidity_address), "Total_Pool_Liquidity"), "No Initial Pool Liquidity was Found.") | |
47 | 31 | let read_user_funds = getIntegerValue(((Currency_ID + "_") + User_Address)) | |
48 | 32 | let update_user_funds = ((read_user_funds - Amount) - network_fee) | |
49 | 33 | let read_start_order_permit_timestamp = Start_Order_Timestamp | |
50 | 34 | let read_end_order_permit_timestamp = End_Order_Timestamp | |
51 | 35 | let read_OptionCounterID = OptionCounterID | |
52 | 36 | let OpionExpireCounter = 1 | |
53 | 37 | let OptionExpireCounterID = (read_OptionCounterID + OpionExpireCounter) | |
54 | 38 | let PreviousOptionOrders = match getInteger(this, "Total_Option_Orders") { | |
55 | 39 | case a: Int => | |
56 | 40 | a | |
57 | 41 | case _ => | |
58 | 42 | 0 | |
59 | 43 | } | |
60 | 44 | let TotalOptionOrders = (PreviousOptionOrders + 1) | |
61 | 45 | let PreviousFundsAddedInSpecificOptionOrder = match getInteger(this, ("Total_Funds_Added_In_Option_Order_" + toString(read_OptionCounterID))) { | |
62 | 46 | case a: Int => | |
63 | 47 | a | |
64 | 48 | case _ => | |
65 | 49 | 0 | |
66 | 50 | } | |
67 | 51 | let TotalFundsAddedInSpecificOptionOrder = (PreviousFundsAddedInSpecificOptionOrder + Amount) | |
68 | 52 | let PreviousOptionOrdersinSpecificCounter = match getInteger(this, ("Total_Option_Orders_" + toString(read_OptionCounterID))) { | |
69 | 53 | case a: Int => | |
70 | 54 | a | |
71 | 55 | case _ => | |
72 | 56 | 0 | |
73 | 57 | } | |
74 | 58 | let TotalOptionOrdersinSpecificCounter = (PreviousOptionOrdersinSpecificCounter + 1) | |
75 | 59 | let PreviousCall = match getInteger(this, "Total_Calls") { | |
76 | 60 | case a: Int => | |
77 | 61 | a | |
78 | 62 | case _ => | |
79 | 63 | 0 | |
80 | 64 | } | |
81 | 65 | let TotalCall = (PreviousCall + 1) | |
82 | 66 | let PreviousCallinSpecificCounter = match getInteger(this, ("Total_Calls_" + toString(read_OptionCounterID))) { | |
83 | 67 | case a: Int => | |
84 | 68 | a | |
85 | 69 | case _ => | |
86 | 70 | 0 | |
87 | 71 | } | |
88 | 72 | let TotalCallinSpecificCounter = (PreviousCallinSpecificCounter + 1) | |
89 | 73 | let PreviousUserCall = match getInteger(this, (User_Address + "_Total_Calls")) { | |
90 | 74 | case a: Int => | |
91 | 75 | a | |
92 | 76 | case _ => | |
93 | 77 | 0 | |
94 | 78 | } | |
95 | 79 | let TotalUserCall = (PreviousUserCall + 1) | |
96 | 80 | let PreviousUserCallinSpecificCounter = match getInteger(this, ((User_Address + "_Total_Calls_") + toString(read_OptionCounterID))) { | |
97 | 81 | case a: Int => | |
98 | 82 | a | |
99 | 83 | case _ => | |
100 | 84 | 0 | |
101 | 85 | } | |
102 | 86 | let TotalUserCallinSpecificCounter = (PreviousUserCallinSpecificCounter + 1) | |
103 | 87 | let Funds_at_risk = fraction(read_TPL, 5, 100) | |
104 | - | if ((product_launch_timestamp > lastBlock.timestamp)) | |
105 | - | then throw((product_launch_error + toString(product_launch_timestamp))) | |
106 | - | else if ((Oracle_Status == "CLOSE")) | |
107 | - | then throw(closed_oracle_eror) | |
108 | - | else if ((ifBlacklisted == "Yes")) | |
109 | - | then throw((User_Address + " Address is Blacklisted. Please contact Admin to Whitelist it.")) | |
110 | - | else if ((lastBlock.timestamp >= read_end_order_permit_timestamp)) | |
111 | - | then throw("Option Order placing Timing Limits are Over. Please Join in Next Cycle.") | |
112 | - | else if ((TotalFundsAddedInSpecificOptionOrder > Funds_at_risk)) | |
113 | - | then throw((((("No more orders accepted, Option House Risk Size is only limited to " + toString(Funds_at_risk)) + ", Pending House Risk is ") + toString((Funds_at_risk - PreviousFundsAddedInSpecificOptionOrder))) + ". Join in next Cycle.")) | |
114 | - | else if ((minimum_order_size > Amount)) | |
115 | - | then throw((("Placed Order Size is less than [" + toString(minimum_order_size)) + "/10^8] WAVES.")) | |
116 | - | else if ((Amount > maximum_order_size)) | |
117 | - | then throw((("Placed Order Size is more than [" + toString(maximum_order_size)) + "/10^8] WAVES.")) | |
118 | - | else if ((0 > update_user_funds)) | |
119 | - | then throw(("Placed Order Amount is going negative. Please reduce the Order Size. Negative Fund Amount = " + toString(update_user_funds))) | |
120 | - | else if ((size(toString(Start_Order_Timestamp)) != 13)) | |
121 | - | then throw("Start Timestamp is Wrong. Please Enter a Valid Timestamp. Probably you entered an Timestamp less than 13 Chars.") | |
122 | - | else if ((size(toString(End_Order_Timestamp)) != 13)) | |
123 | - | then throw("End Timestamp is Wrong. Please Enter a Valid Timestamp. Probably you entered an Timestamp less than 13 Chars.") | |
124 | - | else [StringEntry(("User_ID_" + User_Address), User_ID), IntegerEntry(((Currency_ID + "_") + User_Address), update_user_funds), IntegerEntry("Network_Fee_To_Place_Order", network_fee), StringEntry(((("Call_" + User_Address) + "_") + toString(TotalUserCall)), toString(Price)), IntegerEntry(((("Call_Amount_" + User_Address) + "_") + toString(TotalUserCall)), Amount), StringEntry(((("Call_Start_End_" + User_Address) + "_") + toString(TotalUserCall)), ((toString(read_OptionCounterID) + "_") + toString(OptionExpireCounterID))), IntegerEntry("Total_Option_Orders", TotalOptionOrders), IntegerEntry(("Total_Funds_Added_In_Option_Order_" + toString(read_OptionCounterID)), TotalFundsAddedInSpecificOptionOrder), IntegerEntry("Total_Pool_Liquidity", read_TPL), IntegerEntry(("Funds_At_Risk_" + toString(read_OptionCounterID)), Funds_at_risk), IntegerEntry("Call_Limits", Call_Limits), IntegerEntry("Put_Limits", Put_Limits), IntegerEntry(("Total_Option_Orders_" + toString(read_OptionCounterID)), TotalOptionOrdersinSpecificCounter), IntegerEntry("Total_Calls", TotalCall), IntegerEntry(("Total_Calls_" + toString(read_OptionCounterID)), TotalCallinSpecificCounter), IntegerEntry((User_Address + "_Total_Calls"), TotalUserCall), IntegerEntry(((User_Address + "_Total_Calls_") + toString(read_OptionCounterID)), TotalUserCallinSpecificCounter), ScriptTransfer(whitelist_address, network_fee, unit), ScriptTransfer(addressFromStringValue(pool_liquidity_address), Amount, unit)] | |
88 | + | if ((i.caller != whitelist_address)) | |
89 | + | then throw((("This Address is not Authorized. Only " + toString(whitelist_address)) + " is Authorized Address to Sign it.")) | |
90 | + | else if ((product_launch_timestamp > lastBlock.timestamp)) | |
91 | + | then throw((product_launch_error + toString(product_launch_timestamp))) | |
92 | + | else if ((Oracle_Status == "CLOSE")) | |
93 | + | then throw(closed_oracle_eror) | |
94 | + | else if ((ifBlacklisted == "Yes")) | |
95 | + | then throw((User_Address + " Address is Blacklisted. Please contact Admin to Whitelist it.")) | |
96 | + | else if ((lastBlock.timestamp >= read_end_order_permit_timestamp)) | |
97 | + | then throw("Option Order placing Timing Limits are Over. Please Join in Next Cycle.") | |
98 | + | else if ((TotalFundsAddedInSpecificOptionOrder > Funds_at_risk)) | |
99 | + | then throw((((("No more orders accepted, Option House Risk Size is only limited to " + toString(Funds_at_risk)) + ", Pending House Risk is ") + toString((Funds_at_risk - PreviousFundsAddedInSpecificOptionOrder))) + ". Join in next Cycle.")) | |
100 | + | else if ((minimum_order_size > Amount)) | |
101 | + | then throw((("Placed Order Size is less than [" + toString(minimum_order_size)) + "/10^8] WAVES.")) | |
102 | + | else if ((Amount > maximum_order_size)) | |
103 | + | then throw((("Placed Order Size is more than [" + toString(maximum_order_size)) + "/10^8] WAVES.")) | |
104 | + | else if ((0 > update_user_funds)) | |
105 | + | then throw(("Placed Order Amount is going negative. Please reduce the Order Size. Negative Fund Amount = " + toString(update_user_funds))) | |
106 | + | else if ((size(toString(Start_Order_Timestamp)) != 13)) | |
107 | + | then throw("Start Timestamp is Wrong. Please Enter a Valid Timestamp. Probably you entered an Timestamp less than 13 Chars.") | |
108 | + | else if ((size(toString(End_Order_Timestamp)) != 13)) | |
109 | + | then throw("End Timestamp is Wrong. Please Enter a Valid Timestamp. Probably you entered an Timestamp less than 13 Chars.") | |
110 | + | else [StringEntry(("User_ID_" + User_Address), User_ID), IntegerEntry(((Currency_ID + "_") + User_Address), update_user_funds), IntegerEntry("Network_Fee_To_Place_Order", network_fee), StringEntry(((("Call_" + User_Address) + "_") + toString(TotalUserCall)), toString(Price)), IntegerEntry(((("Call_Amount_" + User_Address) + "_") + toString(TotalUserCall)), Amount), StringEntry(((("Call_Start_End_" + User_Address) + "_") + toString(TotalUserCall)), ((toString(read_OptionCounterID) + "_") + toString(OptionExpireCounterID))), IntegerEntry("Total_Option_Orders", TotalOptionOrders), IntegerEntry(("Total_Funds_Added_In_Option_Order_" + toString(read_OptionCounterID)), TotalFundsAddedInSpecificOptionOrder), IntegerEntry("Total_Pool_Liquidity", read_TPL), IntegerEntry(("Funds_At_Risk_" + toString(read_OptionCounterID)), Funds_at_risk), IntegerEntry("Call_Limits", Call_Limits), IntegerEntry("Put_Limits", Put_Limits), IntegerEntry(("Total_Option_Orders_" + toString(read_OptionCounterID)), TotalOptionOrdersinSpecificCounter), IntegerEntry("Total_Calls", TotalCall), IntegerEntry(("Total_Calls_" + toString(read_OptionCounterID)), TotalCallinSpecificCounter), IntegerEntry((User_Address + "_Total_Calls"), TotalUserCall), IntegerEntry(((User_Address + "_Total_Calls_") + toString(read_OptionCounterID)), TotalUserCallinSpecificCounter), ScriptTransfer(whitelist_address, network_fee, unit), ScriptTransfer(addressFromStringValue(pool_liquidity_address), Amount, unit)] | |
125 | 111 | } | |
126 | 112 | ||
127 | 113 | ||
128 | 114 | ||
129 | 115 | @Callable(i) | |
130 | 116 | func placeoptionPut (Amount,OptionCounterID,User_ID,User_Address,Price,Call_Limits,Put_Limits,Oracle_Status,Start_Order_Timestamp,End_Order_Timestamp) = { | |
131 | 117 | let calleraddress = toBase58String(i.caller.bytes) | |
132 | 118 | let ifBlacklisted = getString(this, ("addr_BLACKLISTED_" + User_Address)) | |
133 | 119 | let read_TPL = valueOrErrorMessage(getInteger(addressFromStringValue(pool_liquidity_address), "Total_Pool_Liquidity"), "No Initial Pool Liquidity was Found.") | |
134 | 120 | let read_user_funds = getIntegerValue(((Currency_ID + "_") + User_Address)) | |
135 | 121 | let update_user_funds = ((read_user_funds - Amount) - network_fee) | |
136 | 122 | let read_start_order_permit_timestamp = Start_Order_Timestamp | |
137 | 123 | let read_end_order_permit_timestamp = End_Order_Timestamp | |
138 | 124 | let read_OptionCounterID = OptionCounterID | |
139 | 125 | let OpionExpireCounter = 1 | |
140 | 126 | let OptionExpireCounterID = (read_OptionCounterID + OpionExpireCounter) | |
141 | 127 | let PreviousOptionOrders = match getInteger(this, "Total_Option_Orders") { | |
142 | 128 | case a: Int => | |
143 | 129 | a | |
144 | 130 | case _ => | |
145 | 131 | 0 | |
146 | 132 | } | |
147 | 133 | let TotalOptionOrders = (PreviousOptionOrders + 1) | |
148 | 134 | let PreviousFundsAddedInSpecificOptionOrder = match getInteger(this, ("Total_Funds_Added_In_Option_Order_" + toString(read_OptionCounterID))) { | |
149 | 135 | case a: Int => | |
150 | 136 | a | |
151 | 137 | case _ => | |
152 | 138 | 0 | |
153 | 139 | } | |
154 | 140 | let TotalFundsAddedInSpecificOptionOrder = (PreviousFundsAddedInSpecificOptionOrder + Amount) | |
155 | 141 | let PreviousOptionOrdersinSpecificCounter = match getInteger(this, ("Total_Option_Orders_" + toString(read_OptionCounterID))) { | |
156 | 142 | case a: Int => | |
157 | 143 | a | |
158 | 144 | case _ => | |
159 | 145 | 0 | |
160 | 146 | } | |
161 | 147 | let TotalOptionOrdersinSpecificCounter = (PreviousOptionOrdersinSpecificCounter + 1) | |
162 | 148 | let PreviousPut = match getInteger(this, "Total_Puts") { | |
163 | 149 | case a: Int => | |
164 | 150 | a | |
165 | 151 | case _ => | |
166 | 152 | 0 | |
167 | 153 | } | |
168 | 154 | let TotalPut = (PreviousPut + 1) | |
169 | 155 | let PreviousPutinSpecificCounter = match getInteger(this, ("Total_Puts_" + toString(read_OptionCounterID))) { | |
170 | 156 | case a: Int => | |
171 | 157 | a | |
172 | 158 | case _ => | |
173 | 159 | 0 | |
174 | 160 | } | |
175 | 161 | let TotalPutinSpecificCounter = (PreviousPutinSpecificCounter + 1) | |
176 | 162 | let PreviousUserPut = match getInteger(this, (User_Address + "_Total_Puts")) { | |
177 | 163 | case a: Int => | |
178 | 164 | a | |
179 | 165 | case _ => | |
180 | 166 | 0 | |
181 | 167 | } | |
182 | 168 | let TotalUserPut = (PreviousUserPut + 1) | |
183 | 169 | let PreviousUserPutinSpecificCounter = match getInteger(this, ((User_Address + "_Total_Puts_") + toString(read_OptionCounterID))) { | |
184 | 170 | case a: Int => | |
185 | 171 | a | |
186 | 172 | case _ => | |
187 | 173 | 0 | |
188 | 174 | } | |
189 | 175 | let TotalUserPutinSpecificCounter = (PreviousUserPutinSpecificCounter + 1) | |
190 | 176 | let Funds_at_risk = fraction(read_TPL, 5, 100) | |
191 | 177 | if ((i.caller != whitelist_address)) | |
192 | 178 | then throw((("This Address is not Authorized. Only " + toString(whitelist_address)) + " is Authorized Address to Sign it.")) | |
193 | 179 | else if ((product_launch_timestamp > lastBlock.timestamp)) | |
194 | 180 | then throw((product_launch_error + toString(product_launch_timestamp))) | |
195 | 181 | else if ((Oracle_Status == "CLOSE")) | |
196 | 182 | then throw(closed_oracle_eror) | |
197 | 183 | else if ((ifBlacklisted == "Yes")) | |
198 | 184 | then throw((User_Address + " Address is Blacklisted. Please contact Admin to Whitelist it.")) | |
199 | 185 | else if ((lastBlock.timestamp >= read_end_order_permit_timestamp)) | |
200 | 186 | then throw("Option Order placing Timing Limits are Over. Please Join in Next Cycle.") | |
201 | 187 | else if ((TotalFundsAddedInSpecificOptionOrder > Funds_at_risk)) | |
202 | 188 | then throw((((("No more orders accepted, Option House Risk Size is only limited to " + toString(Funds_at_risk)) + ", Pending House Risk is ") + toString((Funds_at_risk - PreviousFundsAddedInSpecificOptionOrder))) + ". Join in next Cycle.")) | |
203 | 189 | else if ((minimum_order_size > Amount)) | |
204 | 190 | then throw((("Placed Order Size is less than [" + toString(minimum_order_size)) + "/10^8] WAVES.")) | |
205 | 191 | else if ((Amount > maximum_order_size)) | |
206 | 192 | then throw((("Placed Order Size is more than [" + toString(maximum_order_size)) + "/10^8] WAVES.")) | |
207 | 193 | else if ((0 > update_user_funds)) | |
208 | 194 | then throw(("Placed Order Amount is going negative. Please reduce the Order Size. Negative Fund Amount = " + toString(update_user_funds))) | |
209 | 195 | else if ((size(toString(Start_Order_Timestamp)) != 13)) | |
210 | 196 | then throw("Start Timestamp is Wrong. Please Enter a Valid Timestamp. Probably you entered an Timestamp less than 13 Chars.") | |
211 | 197 | else if ((size(toString(End_Order_Timestamp)) != 13)) | |
212 | 198 | then throw("End Timestamp is Wrong. Please Enter a Valid Timestamp. Probably you entered an Timestamp less than 13 Chars.") | |
213 | 199 | else [StringEntry(("User_ID_" + User_Address), User_ID), IntegerEntry(((Currency_ID + "_") + User_Address), update_user_funds), IntegerEntry("Network_Fee_To_Place_Order", network_fee), StringEntry(((("Put_" + User_Address) + "_") + toString(TotalUserPut)), toString(Price)), IntegerEntry(((("Put_Amount_" + User_Address) + "_") + toString(TotalUserPut)), Amount), StringEntry(((("Put_Start_End_" + User_Address) + "_") + toString(TotalUserPut)), ((toString(read_OptionCounterID) + "_") + toString(OptionExpireCounterID))), IntegerEntry("Total_Option_Orders", TotalOptionOrders), IntegerEntry(("Total_Funds_Added_In_Option_Order_" + toString(read_OptionCounterID)), TotalFundsAddedInSpecificOptionOrder), IntegerEntry("Total_Pool_Liquidity", read_TPL), IntegerEntry(("Funds_At_Risk_" + toString(read_OptionCounterID)), Funds_at_risk), IntegerEntry("Call_Limits", Call_Limits), IntegerEntry("Put_Limits", Put_Limits), IntegerEntry(("Total_Option_Orders_" + toString(read_OptionCounterID)), TotalOptionOrdersinSpecificCounter), IntegerEntry("Total_Puts", TotalPut), IntegerEntry(("Total_Puts_" + toString(read_OptionCounterID)), TotalPutinSpecificCounter), IntegerEntry((User_Address + "_Total_Puts"), TotalUserPut), IntegerEntry(((User_Address + "_Total_Puts_") + toString(read_OptionCounterID)), TotalUserPutinSpecificCounter), ScriptTransfer(whitelist_address, network_fee, unit), ScriptTransfer(addressFromStringValue(pool_liquidity_address), Amount, unit)] | |
214 | 200 | } | |
215 | 201 | ||
216 | 202 | ||
217 | 203 | ||
218 | 204 | @Callable(i) | |
219 | 205 | func DepositUserFunds () = { | |
220 | 206 | let calleraddress = toBase58String(i.caller.bytes) | |
221 | 207 | let pmt = if ((size(i.payments) == 1)) | |
222 | 208 | then i.payments[0] | |
223 | 209 | else throw("No payment attached, Please Attach only Whitelisted Tokens in payment[1].") | |
224 | 210 | let ifBlacklisted = getString(this, ("addr_BLACKLISTED_" + calleraddress)) | |
225 | 211 | let PreviousUserDeposit = match getInteger(this, ((Currency_ID + "_") + calleraddress)) { | |
226 | 212 | case a: Int => | |
227 | 213 | a | |
228 | 214 | case _ => | |
229 | 215 | 0 | |
230 | 216 | } | |
231 | 217 | let TotalUserDeposit = (PreviousUserDeposit + pmt.amount) | |
232 | 218 | let PreviousDepositCounterID = match getInteger(this, "Deposit_Counter_ID") { | |
233 | 219 | case a: Int => | |
234 | 220 | a | |
235 | 221 | case _ => | |
236 | 222 | 0 | |
237 | 223 | } | |
238 | 224 | let TotalDepositCounterID = (PreviousDepositCounterID + 1) | |
239 | 225 | if ((product_launch_timestamp > lastBlock.timestamp)) | |
240 | 226 | then throw((product_launch_error + toString(product_launch_timestamp))) | |
241 | 227 | else if ((ifBlacklisted == "Yes")) | |
242 | 228 | then throw((calleraddress + " Address is Blacklisted. Please contact Admin to Whitelist it.")) | |
243 | 229 | else if (isDefined(pmt.assetId)) | |
244 | 230 | then throw("Only WAVES is allowed to deposit at the moment") | |
245 | 231 | else [IntegerEntry(((Currency_ID + "_") + calleraddress), TotalUserDeposit), IntegerEntry(((((toString(TotalDepositCounterID) + "_") + Currency_ID) + "_") + calleraddress), pmt.amount), IntegerEntry("Deposit_Counter_ID", TotalDepositCounterID)] | |
246 | 232 | } | |
247 | 233 | ||
248 | 234 | ||
249 | 235 | ||
250 | 236 | @Callable(i) | |
251 | - | func Fill_Vouchers_Liquidity () = { | |
252 | - | let calleraddress = toBase58String(i.caller.bytes) | |
253 | - | let pmt = if ((size(i.payments) == 1)) | |
254 | - | then i.payments[0] | |
255 | - | else throw("No payment attached, Please Attach only Whitelisted Tokens in payment[1].") | |
256 | - | let PreviousVouchersBalance = match getInteger(this, "Available_Vouchers_Balance") { | |
257 | - | case a: Int => | |
258 | - | a | |
259 | - | case _ => | |
260 | - | 0 | |
261 | - | } | |
262 | - | let TotalVouchersBalance = (PreviousVouchersBalance + pmt.amount) | |
263 | - | let PreviousVouchersCounterID = match getInteger(this, "Vouchers_Counter_ID") { | |
264 | - | case a: Int => | |
265 | - | a | |
266 | - | case _ => | |
267 | - | 0 | |
268 | - | } | |
269 | - | let TotalVouchersCounterID = (PreviousVouchersCounterID + 1) | |
270 | - | if (isDefined(pmt.assetId)) | |
271 | - | then throw("Only WAVES is allowed to deposit at the moment") | |
272 | - | else [IntegerEntry("Available_Vouchers_Balance", TotalVouchersBalance), IntegerEntry((toString(TotalVouchersCounterID) + "_Voucher_Amount"), pmt.amount), IntegerEntry("Vouchers_Counter_ID", TotalVouchersCounterID)] | |
273 | - | } | |
274 | - | ||
275 | - | ||
276 | - | ||
277 | - | @Callable(i) | |
278 | - | func Play_With_Vouchers (Amount,OptionCounterID,User_ID,User_Address,Price,Call_Limits,Put_Limits,Oracle_Status,Start_Order_Timestamp,End_Order_Timestamp) = { | |
279 | - | let read_vouchers_funds = valueOrErrorMessage(getInteger("Available_Vouchers_Balance"), "No Voucher Balance was found.") | |
280 | - | let User_Voucher_Balance = Add_Voucher_to_User_Balance(User_Address, Amount) | |
281 | - | let new_vouchers_funds = (read_vouchers_funds - Amount) | |
282 | - | let place_order = invoke(this, "placeoptionCall", [Amount, OptionCounterID, User_ID, User_Address, Price, Call_Limits, Put_Limits, Oracle_Status, Start_Order_Timestamp, End_Order_Timestamp], nil) | |
283 | - | if ((i.caller != whitelist_address)) | |
284 | - | then throw((("This Address is not Authorized. Only " + toString(whitelist_address)) + " is Authorized Address to Sign it.")) | |
285 | - | else if ((0 > new_vouchers_funds)) | |
286 | - | then throw((("Requested Voucher Amount is going in negative State of " + toString(new_vouchers_funds)) + "/10^8] WAVES.")) | |
287 | - | else if ((place_order == place_order)) | |
288 | - | then [IntegerEntry("Available_Vouchers_Balance", new_vouchers_funds)] | |
289 | - | else throw("Strict value is not equal to itself.") | |
290 | - | } | |
291 | - | ||
292 | - | ||
293 | - | ||
294 | - | @Callable(i) | |
295 | 237 | func WithdrawUserFunds (User_Address,Amount) = { | |
296 | 238 | let calleraddress = toBase58String(i.caller.bytes) | |
297 | 239 | let readuserbalance = getIntegerValue(((Currency_ID + "_") + User_Address)) | |
298 | 240 | let update_user_funds = ((readuserbalance - Amount) - network_fee) | |
299 | 241 | let minimim_withdraw_amount = 10000000 | |
300 | 242 | if ((i.caller != whitelist_address)) | |
301 | 243 | then throw((("This Address is not Authorized. Only " + toString(whitelist_address)) + " is Authorized Address to Sign it.")) | |
302 | 244 | else if ((minimim_withdraw_amount > Amount)) | |
303 | 245 | then throw((("Minimum Withdraw Amount is " + toString(minimim_withdraw_amount)) + "/10^8] WAVES.")) | |
304 | 246 | else if ((0 > update_user_funds)) | |
305 | 247 | then throw((("Placed Withdraw Amount is going in negative State of " + toString(update_user_funds)) + "/10^8] WAVES.")) | |
306 | 248 | else [IntegerEntry("Previous_Balance", readuserbalance), IntegerEntry("Network_Fee_To_Withdraw", network_fee), IntegerEntry(((Currency_ID + "_") + User_Address), update_user_funds), ScriptTransfer(whitelist_address, network_fee, unit), ScriptTransfer(addressFromStringValue(User_Address), Amount, unit)] | |
307 | 249 | } | |
308 | 250 | ||
309 | 251 | ||
310 | 252 | ||
311 | 253 | @Callable(i) | |
312 | 254 | func BlackListAddress (UserAddress) = { | |
313 | 255 | let ifBlacklisted = getString(this, ("addr_BLACKLISTED_" + UserAddress)) | |
314 | 256 | let PreviousBlackListAddress = match getInteger(this, "Total_Black_Listed_Address") { | |
315 | 257 | case a: Int => | |
316 | 258 | a | |
317 | 259 | case _ => | |
318 | 260 | 0 | |
319 | 261 | } | |
320 | 262 | let TotalBlackListAddress = (PreviousBlackListAddress + 1) | |
321 | 263 | if ((product_launch_timestamp > lastBlock.timestamp)) | |
322 | 264 | then throw((product_launch_error + toString(product_launch_timestamp))) | |
323 | 265 | else if ((i.caller != whitelist_address)) | |
324 | 266 | then throw((("This Address is not Authorized. Only " + toString(whitelist_address)) + " is Authorized Address to Sign it.")) | |
325 | 267 | else if ((ifBlacklisted == "Yes")) | |
326 | 268 | then throw("Address is already available in Blacklist.") | |
327 | 269 | else [StringEntry(("addr_BLACKLISTED_" + UserAddress), "Yes"), IntegerEntry("Total_Black_Listed_Address", TotalBlackListAddress)] | |
328 | 270 | } | |
329 | 271 | ||
330 | 272 | ||
331 | 273 | ||
332 | 274 | @Callable(i) | |
333 | 275 | func DeleteBlackListAddress (UserAddress) = { | |
334 | 276 | let ifBlacklisted = getString(this, ("addr_BLACKLISTED_" + UserAddress)) | |
335 | 277 | let PreviousBlackListAddress = match getInteger(this, "Total_Black_Listed_Address") { | |
336 | 278 | case a: Int => | |
337 | 279 | a | |
338 | 280 | case _ => | |
339 | 281 | 0 | |
340 | 282 | } | |
341 | 283 | let TotalBlackListAddress = (PreviousBlackListAddress - 1) | |
342 | 284 | if ((product_launch_timestamp > lastBlock.timestamp)) | |
343 | 285 | then throw(("Product Launch Timestamp is set at " + toString(product_launch_timestamp))) | |
344 | 286 | else if ((i.caller != whitelist_address)) | |
345 | 287 | then throw((("This Address is not Authorized. Only " + toString(whitelist_address)) + " is Authorized Address to Sign it.")) | |
346 | 288 | else if ((ifBlacklisted == "Yes")) | |
347 | 289 | then [DeleteEntry(("addr_BLACKLISTED_" + UserAddress)), IntegerEntry("Total_Black_Listed_Address", TotalBlackListAddress)] | |
348 | 290 | else throw("Address is not available in Blacklist.") | |
349 | 291 | } | |
350 | 292 | ||
351 | 293 | ||
352 | 294 | @Verifier(tx) | |
353 | 295 | func verify () = match tx { | |
354 | 296 | case t: Order|ExchangeTransaction|MassTransferTransaction|TransferTransaction => | |
355 | 297 | false | |
356 | 298 | case _ => | |
357 | 299 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
358 | 300 | } | |
359 | 301 |
github/deemru/w8io/169f3d6 62.45 ms ◑