tx · DDm94CenkCkSGinB7Bd3TPiDWmi7W134WJe8JfxkeC1p 3N2ZtCEGncHQjQF4g4oQBDeRRZoUQ3kJ7Nm: -0.01400000 Waves 2023.03.24 12:52 [2503929] smart account 3N2ZtCEGncHQjQF4g4oQBDeRRZoUQ3kJ7Nm > SELF 0.00000000 Waves
{ "type": 13, "id": "DDm94CenkCkSGinB7Bd3TPiDWmi7W134WJe8JfxkeC1p", "fee": 1400000, "feeAssetId": null, "timestamp": 1679651542074, "version": 2, "chainId": 84, "sender": "3N2ZtCEGncHQjQF4g4oQBDeRRZoUQ3kJ7Nm", "senderPublicKey": "EKmhAeU9yA52DSvBnr1WtWQWyyiCrauDYkmgnTns7ZkA", "proofs": [ "3As7edUdxGWLssmse3RJdvtSXsmpcPfDVUVk2twKKM6htY8piH9nginvTTsP35Zh5SzctFSyETWKJbLC85fyjB4b" ], "script": "base64:AAIFAAAAAAAAAA8IAhILCgkBAQEBAQEIAQEAAAAIAAAAABREYXBwX0FkZHJlc3NfcHViX2tleQEAAAAgO3RF8b5QOeRSsZiONgCOv+riQ9YfIBAqDV0YsQ0EQwwAAAAAGHByb2R1Y3RfbGF1bmNoX3RpbWVzdGFtcAAAAAGGCkXsAAAAAAAUcHJvZHVjdF9sYXVuY2hfZXJyb3ICAAAAI1Byb2R1Y3QgTGF1bmNoIFRpbWVzdGFtcCBpcyBzZXQgYXQgAAAAABBub19wYXltZW50X2Vycm9yAgAAADdObyBwYXltZW50IGF0dGFjaGVkLCBQbGVhc2UgQXR0YWNoIFRva2VuIGluIHBheW1lbnRbMV0uAAAAABJjbG9zZWRfb3JhY2xlX2Vyb3ICAAAAMU9yYWNsZSBpcyBjbG9zZWQuIFdhaXQgVW50aWwgT3JhY2xlIGlzIFR1cm5lZCBPbi4AAAAAEXdoaXRlbGlzdF9hZGRyZXNzCQEAAAAUYWRkcmVzc0Zyb21QdWJsaWNLZXkAAAABBQAAABREYXBwX0FkZHJlc3NfcHViX2tleQAAAAASbWluaW11bV9v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CQABpAAAAAEFAAAAFHJlYWRfT3B0aW9uQ291bnRlcklEBQAAAB5Ub3RhbFVzZXJDYWxsaW5TcGVjaWZpY0NvdW50ZXIFAAAAA25pbAAAAADscyF8", "height": 2503929, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6MaKphL7UKAoPnuvEviYUpm9rMvfDhvw9Y6ZMQfJiMbV Next: 6ARt7ebvjbErdkRLYQhVrH1S9xCpcsXL5UWeWrZ61muE Diff:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let Dapp_Address_pub_key = base58'GR7cD6khNNwt62EpPbrxYZz5aLTEQSBfQaJeRVcNGSEH' | |
5 | - | ||
6 | - | let claim_oracle_pub_key = base58'2QAu6RR2Us6PVYjkp4AiteazWSGeWYq9esHsx1uy9vA9' | |
7 | - | ||
8 | - | let Org_Address_pub_key = base58'2QAu6RR2Us6PVYjkp4AiteazWSGeWYq9esHsx1uy9vA9' | |
9 | - | ||
10 | - | let referral_Ac_Address_pub_key = base58'2QAu6RR2Us6PVYjkp4AiteazWSGeWYq9esHsx1uy9vA9' | |
11 | - | ||
12 | - | let LP_Ac_Address_pub_key = base58'2QAu6RR2Us6PVYjkp4AiteazWSGeWYq9esHsx1uy9vA9' | |
13 | - | ||
14 | - | let validators_Ac_Address_pub_key = base58'2QAu6RR2Us6PVYjkp4AiteazWSGeWYq9esHsx1uy9vA9' | |
4 | + | let Dapp_Address_pub_key = base58'515tSAyMUbAb8kKjcpGDpqALGfCgcwfWmWKKkcBKTcGB' | |
15 | 5 | ||
16 | 6 | let product_launch_timestamp = 1675209600000 | |
17 | 7 | ||
21 | 11 | ||
22 | 12 | let closed_oracle_eror = "Oracle is closed. Wait Until Oracle is Turned On." | |
23 | 13 | ||
24 | - | let Org_Address_Share = 5000 | |
25 | - | ||
26 | - | let referral_Ac_Address_Share = 1750 | |
27 | - | ||
28 | - | let LP_Ac_Address_Share = 3000 | |
29 | - | ||
30 | - | let oracle_controller_address = addressFromPublicKey(Dapp_Address_pub_key) | |
31 | - | ||
32 | - | let claim_oracle_address = addressFromPublicKey(claim_oracle_pub_key) | |
33 | - | ||
34 | - | let org_account = addressFromPublicKey(Org_Address_pub_key) | |
14 | + | let whitelist_address = addressFromPublicKey(Dapp_Address_pub_key) | |
35 | 15 | ||
36 | 16 | let minimum_order_size = 10000000 | |
37 | 17 | ||
107 | 87 | 0 | |
108 | 88 | } | |
109 | 89 | let Funds_at_risk = House_risk | |
110 | - | if ((product_launch_timestamp > lastBlock.timestamp)) | |
111 | - | then throw((product_launch_error + toString(product_launch_timestamp))) | |
112 | - | else if ((Oracle_Status == "Close")) | |
113 | - | then throw(closed_oracle_eror) | |
114 | - | else if ((ifBlacklisted == "Yes")) | |
115 | - | then throw((calleraddress + " Address is Blacklisted. Please contact Admin to Whitelist it.")) | |
116 | - | else if (isDefined(pmt.assetId)) | |
117 | - | then throw("Only TN is allowed to deposit at the moment") | |
118 | - | else if ((lastBlock.timestamp >= read_end_order_permit_timestamp)) | |
119 | - | then throw("Option Order placing Timing Limits are Over. Please Join in Next Cycle.") | |
120 | - | else if ((minimum_order_size > pmt.amount)) | |
121 | - | then throw((("Placed Order Size is less than [" + toString(minimum_order_size)) + "/10^8] TN.")) | |
122 | - | else if ((pmt.amount > maximum_order_size)) | |
123 | - | then throw((("Placed Order Size is more than [" + toString(maximum_order_size)) + "/10^8] TN.")) | |
124 | - | else [StringEntry(((("Call_" + calleraddress) + "_") + toString(TotalUserCall)), toString(Price)), IntegerEntry(((("Call_Amount_" + calleraddress) + "_") + toString(TotalUserCall)), pmt.amount), StringEntry(((("Call_Start_End_" + calleraddress) + "_") + 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", new_total_pool_liquidity), IntegerEntry(("Total_Pool_Liquidity_" + toString(read_OptionCounterID)), (new_total_pool_liquidity - TotalFundsAddedInSpecificOptionOrder)), 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((calleraddress + "_Total_Calls"), TotalUserCall), IntegerEntry(((calleraddress + "_Total_Calls_") + toString(read_OptionCounterID)), TotalUserCallinSpecificCounter)] | |
90 | + | if ((i.caller != whitelist_address)) | |
91 | + | then throw((("This Address is not Authorized. Only " + toString(whitelist_address)) + " is Authorized Address to Sign it.")) | |
92 | + | else if ((product_launch_timestamp > lastBlock.timestamp)) | |
93 | + | then throw((product_launch_error + toString(product_launch_timestamp))) | |
94 | + | else if ((Oracle_Status == "Close")) | |
95 | + | then throw(closed_oracle_eror) | |
96 | + | else if ((ifBlacklisted == "Yes")) | |
97 | + | then throw((calleraddress + " Address is Blacklisted. Please contact Admin to Whitelist it.")) | |
98 | + | else if (isDefined(pmt.assetId)) | |
99 | + | then throw("Only TN is allowed to deposit at the moment") | |
100 | + | else if ((lastBlock.timestamp >= read_end_order_permit_timestamp)) | |
101 | + | then throw("Option Order placing Timing Limits are Over. Please Join in Next Cycle.") | |
102 | + | else if ((minimum_order_size > pmt.amount)) | |
103 | + | then throw((("Placed Order Size is less than [" + toString(minimum_order_size)) + "/10^8] TN.")) | |
104 | + | else if ((pmt.amount > maximum_order_size)) | |
105 | + | then throw((("Placed Order Size is more than [" + toString(maximum_order_size)) + "/10^8] TN.")) | |
106 | + | else [StringEntry(((("Call_" + calleraddress) + "_") + toString(TotalUserCall)), toString(Price)), IntegerEntry(((("Call_Amount_" + calleraddress) + "_") + toString(TotalUserCall)), pmt.amount), StringEntry(((("Call_Start_End_" + calleraddress) + "_") + 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", new_total_pool_liquidity), IntegerEntry(("Total_Pool_Liquidity_" + toString(read_OptionCounterID)), (new_total_pool_liquidity - TotalFundsAddedInSpecificOptionOrder)), 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((calleraddress + "_Total_Calls"), TotalUserCall), IntegerEntry(((calleraddress + "_Total_Calls_") + toString(read_OptionCounterID)), TotalUserCallinSpecificCounter)] | |
125 | 107 | } | |
126 | 108 | ||
127 | 109 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let Dapp_Address_pub_key = base58'GR7cD6khNNwt62EpPbrxYZz5aLTEQSBfQaJeRVcNGSEH' | |
5 | - | ||
6 | - | let claim_oracle_pub_key = base58'2QAu6RR2Us6PVYjkp4AiteazWSGeWYq9esHsx1uy9vA9' | |
7 | - | ||
8 | - | let Org_Address_pub_key = base58'2QAu6RR2Us6PVYjkp4AiteazWSGeWYq9esHsx1uy9vA9' | |
9 | - | ||
10 | - | let referral_Ac_Address_pub_key = base58'2QAu6RR2Us6PVYjkp4AiteazWSGeWYq9esHsx1uy9vA9' | |
11 | - | ||
12 | - | let LP_Ac_Address_pub_key = base58'2QAu6RR2Us6PVYjkp4AiteazWSGeWYq9esHsx1uy9vA9' | |
13 | - | ||
14 | - | let validators_Ac_Address_pub_key = base58'2QAu6RR2Us6PVYjkp4AiteazWSGeWYq9esHsx1uy9vA9' | |
4 | + | let Dapp_Address_pub_key = base58'515tSAyMUbAb8kKjcpGDpqALGfCgcwfWmWKKkcBKTcGB' | |
15 | 5 | ||
16 | 6 | let product_launch_timestamp = 1675209600000 | |
17 | 7 | ||
18 | 8 | let product_launch_error = "Product Launch Timestamp is set at " | |
19 | 9 | ||
20 | 10 | let no_payment_error = "No payment attached, Please Attach Token in payment[1]." | |
21 | 11 | ||
22 | 12 | let closed_oracle_eror = "Oracle is closed. Wait Until Oracle is Turned On." | |
23 | 13 | ||
24 | - | let Org_Address_Share = 5000 | |
25 | - | ||
26 | - | let referral_Ac_Address_Share = 1750 | |
27 | - | ||
28 | - | let LP_Ac_Address_Share = 3000 | |
29 | - | ||
30 | - | let oracle_controller_address = addressFromPublicKey(Dapp_Address_pub_key) | |
31 | - | ||
32 | - | let claim_oracle_address = addressFromPublicKey(claim_oracle_pub_key) | |
33 | - | ||
34 | - | let org_account = addressFromPublicKey(Org_Address_pub_key) | |
14 | + | let whitelist_address = addressFromPublicKey(Dapp_Address_pub_key) | |
35 | 15 | ||
36 | 16 | let minimum_order_size = 10000000 | |
37 | 17 | ||
38 | 18 | let maximum_order_size = 10000000000 | |
39 | 19 | ||
40 | 20 | @Callable(i) | |
41 | 21 | func placeoptionCall (Total_Pool_Liquidity,OptionCounterID,House_risk,Price,Call_Limits,Put_Limits,Oracle_Status,Start_Order_Timestamp,End_Order_Timestamp) = { | |
42 | 22 | let calleraddress = toBase58String(i.caller.bytes) | |
43 | 23 | let pmt = if ((size(i.payments) == 1)) | |
44 | 24 | then i.payments[0] | |
45 | 25 | else throw(no_payment_error) | |
46 | 26 | let ifBlacklisted = getString(this, ("addr_BLACKLISTED_" + calleraddress)) | |
47 | 27 | let read_start_order_permit_timestamp = Start_Order_Timestamp | |
48 | 28 | let read_end_order_permit_timestamp = End_Order_Timestamp | |
49 | 29 | let read_total_pool_liquidity = Total_Pool_Liquidity | |
50 | 30 | let new_total_pool_liquidity = (read_total_pool_liquidity + pmt.amount) | |
51 | 31 | let read_OptionCounterID = OptionCounterID | |
52 | 32 | let OpionExpireCounter = 1 | |
53 | 33 | let OptionExpireCounterID = (read_OptionCounterID + OpionExpireCounter) | |
54 | 34 | let PreviousOptionOrders = match getInteger(this, "Total_Option_Orders") { | |
55 | 35 | case a: Int => | |
56 | 36 | a | |
57 | 37 | case _ => | |
58 | 38 | 0 | |
59 | 39 | } | |
60 | 40 | let TotalOptionOrders = (PreviousOptionOrders + 1) | |
61 | 41 | let PreviousFundsAddedInSpecificOptionOrder = match getInteger(this, ("Total_Funds_Added_In_Option_Order_" + toString(read_OptionCounterID))) { | |
62 | 42 | case a: Int => | |
63 | 43 | a | |
64 | 44 | case _ => | |
65 | 45 | 0 | |
66 | 46 | } | |
67 | 47 | let TotalFundsAddedInSpecificOptionOrder = (PreviousFundsAddedInSpecificOptionOrder + pmt.amount) | |
68 | 48 | let PreviousOptionOrdersinSpecificCounter = match getInteger(this, ("Total_Option_Orders_" + toString(read_OptionCounterID))) { | |
69 | 49 | case a: Int => | |
70 | 50 | a | |
71 | 51 | case _ => | |
72 | 52 | 0 | |
73 | 53 | } | |
74 | 54 | let TotalOptionOrdersinSpecificCounter = (PreviousOptionOrdersinSpecificCounter + 1) | |
75 | 55 | let PreviousCall = match getInteger(this, "Total_Calls") { | |
76 | 56 | case a: Int => | |
77 | 57 | a | |
78 | 58 | case _ => | |
79 | 59 | 0 | |
80 | 60 | } | |
81 | 61 | let TotalCall = (PreviousCall + 1) | |
82 | 62 | let PreviousCallinSpecificCounter = match getInteger(this, ("Total_Calls_" + toString(read_OptionCounterID))) { | |
83 | 63 | case a: Int => | |
84 | 64 | a | |
85 | 65 | case _ => | |
86 | 66 | 0 | |
87 | 67 | } | |
88 | 68 | let TotalCallinSpecificCounter = (PreviousCallinSpecificCounter + 1) | |
89 | 69 | let PreviousUserCall = match getInteger(this, (calleraddress + "_Total_Calls")) { | |
90 | 70 | case a: Int => | |
91 | 71 | a | |
92 | 72 | case _ => | |
93 | 73 | 0 | |
94 | 74 | } | |
95 | 75 | let TotalUserCall = (PreviousUserCall + 1) | |
96 | 76 | let PreviousUserCallinSpecificCounter = match getInteger(this, ((calleraddress + "_Total_Calls_") + toString(read_OptionCounterID))) { | |
97 | 77 | case a: Int => | |
98 | 78 | a | |
99 | 79 | case _ => | |
100 | 80 | 0 | |
101 | 81 | } | |
102 | 82 | let TotalUserCallinSpecificCounter = (PreviousUserCallinSpecificCounter + 1) | |
103 | 83 | let Pending_Option_limits = match getInteger(this, "Pending_Option_Limits") { | |
104 | 84 | case a: Int => | |
105 | 85 | a | |
106 | 86 | case _ => | |
107 | 87 | 0 | |
108 | 88 | } | |
109 | 89 | let Funds_at_risk = House_risk | |
110 | - | if ((product_launch_timestamp > lastBlock.timestamp)) | |
111 | - | then throw((product_launch_error + toString(product_launch_timestamp))) | |
112 | - | else if ((Oracle_Status == "Close")) | |
113 | - | then throw(closed_oracle_eror) | |
114 | - | else if ((ifBlacklisted == "Yes")) | |
115 | - | then throw((calleraddress + " Address is Blacklisted. Please contact Admin to Whitelist it.")) | |
116 | - | else if (isDefined(pmt.assetId)) | |
117 | - | then throw("Only TN is allowed to deposit at the moment") | |
118 | - | else if ((lastBlock.timestamp >= read_end_order_permit_timestamp)) | |
119 | - | then throw("Option Order placing Timing Limits are Over. Please Join in Next Cycle.") | |
120 | - | else if ((minimum_order_size > pmt.amount)) | |
121 | - | then throw((("Placed Order Size is less than [" + toString(minimum_order_size)) + "/10^8] TN.")) | |
122 | - | else if ((pmt.amount > maximum_order_size)) | |
123 | - | then throw((("Placed Order Size is more than [" + toString(maximum_order_size)) + "/10^8] TN.")) | |
124 | - | else [StringEntry(((("Call_" + calleraddress) + "_") + toString(TotalUserCall)), toString(Price)), IntegerEntry(((("Call_Amount_" + calleraddress) + "_") + toString(TotalUserCall)), pmt.amount), StringEntry(((("Call_Start_End_" + calleraddress) + "_") + 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", new_total_pool_liquidity), IntegerEntry(("Total_Pool_Liquidity_" + toString(read_OptionCounterID)), (new_total_pool_liquidity - TotalFundsAddedInSpecificOptionOrder)), 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((calleraddress + "_Total_Calls"), TotalUserCall), IntegerEntry(((calleraddress + "_Total_Calls_") + toString(read_OptionCounterID)), TotalUserCallinSpecificCounter)] | |
90 | + | if ((i.caller != whitelist_address)) | |
91 | + | then throw((("This Address is not Authorized. Only " + toString(whitelist_address)) + " is Authorized Address to Sign it.")) | |
92 | + | else if ((product_launch_timestamp > lastBlock.timestamp)) | |
93 | + | then throw((product_launch_error + toString(product_launch_timestamp))) | |
94 | + | else if ((Oracle_Status == "Close")) | |
95 | + | then throw(closed_oracle_eror) | |
96 | + | else if ((ifBlacklisted == "Yes")) | |
97 | + | then throw((calleraddress + " Address is Blacklisted. Please contact Admin to Whitelist it.")) | |
98 | + | else if (isDefined(pmt.assetId)) | |
99 | + | then throw("Only TN is allowed to deposit at the moment") | |
100 | + | else if ((lastBlock.timestamp >= read_end_order_permit_timestamp)) | |
101 | + | then throw("Option Order placing Timing Limits are Over. Please Join in Next Cycle.") | |
102 | + | else if ((minimum_order_size > pmt.amount)) | |
103 | + | then throw((("Placed Order Size is less than [" + toString(minimum_order_size)) + "/10^8] TN.")) | |
104 | + | else if ((pmt.amount > maximum_order_size)) | |
105 | + | then throw((("Placed Order Size is more than [" + toString(maximum_order_size)) + "/10^8] TN.")) | |
106 | + | else [StringEntry(((("Call_" + calleraddress) + "_") + toString(TotalUserCall)), toString(Price)), IntegerEntry(((("Call_Amount_" + calleraddress) + "_") + toString(TotalUserCall)), pmt.amount), StringEntry(((("Call_Start_End_" + calleraddress) + "_") + 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", new_total_pool_liquidity), IntegerEntry(("Total_Pool_Liquidity_" + toString(read_OptionCounterID)), (new_total_pool_liquidity - TotalFundsAddedInSpecificOptionOrder)), 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((calleraddress + "_Total_Calls"), TotalUserCall), IntegerEntry(((calleraddress + "_Total_Calls_") + toString(read_OptionCounterID)), TotalUserCallinSpecificCounter)] | |
125 | 107 | } | |
126 | 108 | ||
127 | 109 |
github/deemru/w8io/026f985 36.63 ms ◑