tx · 5AMGjU5cusckgeRz3EPKhSuMwvGyCgnQsCCMqxhKuZZA

3MwoWxBwFKxjUKK53Rxbnwrs8m2MsVMPPa7:  -0.01000000 Waves

2023.11.28 15:29 [2863251] smart account 3MwoWxBwFKxjUKK53Rxbnwrs8m2MsVMPPa7 > SELF 0.00000000 Waves

{ "type": 13, "id": "5AMGjU5cusckgeRz3EPKhSuMwvGyCgnQsCCMqxhKuZZA", "fee": 1000000, "feeAssetId": null, "timestamp": 1701174581379, "version": 2, "chainId": 84, "sender": "3MwoWxBwFKxjUKK53Rxbnwrs8m2MsVMPPa7", "senderPublicKey": "6oay51Q6zPcFP9bSwUC4Potx2KGyD4AUjpL5uLR4QeRN", "proofs": [ "3qzyFbAqSNrwSMQw2sPDnbvAvtrYdxwo8gXDFLM1GxwPnELokaZuiCf5XhXjaEmRpYyEVNv6UuuMCNjDZvynfNTo" ], "script": "base64:AAIFAAAAAAAAABIIAhIOCgwIAQEBCAgBAQEIAQEAAAADAAAAABF1c2VyX2JhbGFuY2VfZGFwcAkBAAAAEUBleHRyTmF0aXZlKDEwNjIpAAAAAQIAAAAjM04xczJ3NE5IZ2JyWHhOWlhIOVJ0YVZUOXB0SFJKY2dTcDIAAAAAFERhcHBfQWRkcmVzc19wdWJfa2V5AQAAACDI7Zjahu5VNVhgxzyW6CpbYvUiMMUf5OyBUQlo584acwAAAAARd2hpdGVsaXN0X2FkZHJlc3MJAQAAABRhZGRyZXNzRnJvbVB1YmxpY0tleQAAAAEFAAAAFERhcHBfQWRkcmVzc19wdWJfa2V5AAAAAQAAAAFpAQAAABVQbGFjZU9yZGVyV2l0aFZvdWNoZXIAAAAMAAAADEZ1bmN0aW9uTmFtZQAAAA5Wb3VjaGVyX0Ftb3VudAAAAAZBbW91bnQAAAAPT3B0aW9uQ291bnRlcklEAAAAB1VzZXJfSUQAAAAMVXNlcl9BZGRyZXNzAAAABVByaWNlAAAAC0NhbGxfTGltaXRzAAAAClB1dF9MaW1pdHMAAAANT3JhY2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kAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAACAAAAAQIAAAAkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAAAAAH+lQH0=", "height": 2863251, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9VmKkK1rJsjizvHBQC9vnbuNnScAThqsexvSWSS4c1nT Next: 3KS2C8NRqbmSTTA9VXLGWpSStstvnPwXqKTML9sqajpX Diff:
OldNewDifferences
77
88 let whitelist_address = addressFromPublicKey(Dapp_Address_pub_key)
99
10-let maximum_voucher_size = 100000000
11-
1210 @Callable(i)
13-func Issue_Vouchers (Voucher_Amount,User_ID,User_Address) = {
14- let read_TotalVouchersBalance = valueOrErrorMessage(getInteger(this, "Available_Vouchers_Balance"), "Available_Vouchers_Balance Entry is not Found. Initiate Fill_Vouchers_Liquidity Function first.")
15- let update_TotalVouchersBalance = (read_TotalVouchersBalance - Voucher_Amount)
16- let VouchersIssuedToUser = match getInteger(this, ("Total_Vouchers_Issued_To_" + User_Address)) {
17- case a: Int =>
18- a
19- case _ =>
20- 0
21- }
22- let TotalVouchersIssuedToUser = (VouchersIssuedToUser + 1)
23- let VouchersAmountIssuedToUser = match getInteger(this, ("Total_Vouchers_Amount_Issued_To_" + User_Address)) {
24- case a: Int =>
25- a
26- case _ =>
27- 0
28- }
29- let TotalVouchersAmountIssuedToUser = (VouchersAmountIssuedToUser + Voucher_Amount)
30- let PreviousVouchersBalanceofUser = match getInteger(this, (User_Address + "_Voucher_Balance")) {
31- case a: Int =>
32- a
33- case _ =>
34- 0
35- }
36- let TotalVouchersBalanceofUser = (PreviousVouchersBalanceofUser + Voucher_Amount)
37- if ((i.caller != whitelist_address))
38- then throw((("This Address is not Authorized. Only " + toString(whitelist_address)) + " is Authorized Address to Sign it."))
39- else if ((0 >= Voucher_Amount))
40- then throw("Voucher Balance can't be 0 or go in negative State. Increase the Voucher Amount.")
41- else if ((0 >= update_TotalVouchersBalance))
42- then throw((("Updated Voucher Balance can't go in negative State of " + toString(update_TotalVouchersBalance)) + " /10^8 WAVES. Reduce the Voucher Amount."))
43- else if ((Voucher_Amount > maximum_voucher_size))
44- then throw((("Input Voucher Balance can't exceed the set maximum limit of " + toString(maximum_voucher_size)) + "/10^8 Waves."))
45- else [IntegerEntry(("Total_Vouchers_Issued_To_" + User_Address), TotalVouchersIssuedToUser), IntegerEntry(("Total_Vouchers_Amount_Issued_To_" + User_Address), TotalVouchersAmountIssuedToUser), IntegerEntry((User_Address + "_Voucher_Balance"), TotalVouchersBalanceofUser), IntegerEntry("Available_Vouchers_Balance", update_TotalVouchersBalance)]
46- }
47-
48-
49-
50-@Callable(i)
51-func placeoptionCallWithVoucher (FunctionName,Voucher_Amount,Amount,OptionCounterID,User_ID,User_Address,Price,Call_Limits,Put_Limits,Oracle_Status,Start_Order_Timestamp,End_Order_Timestamp) = {
52- let y = invoke(user_balance_dapp, FunctionName, [Amount, OptionCounterID, User_ID, User_Address, Price, Call_Limits, Put_Limits, Oracle_Status, Start_Order_Timestamp, End_Order_Timestamp], nil)
53- if ((y == y))
54- then if ((i.caller != whitelist_address))
55- then throw((("This Address is not Authorized. Only " + toString(whitelist_address)) + " is Authorized Address to Sign it."))
56- else [StringEntry("D2D_Status", "Passed")]
11+func PlaceOrderWithVoucher (FunctionName,Voucher_Amount,Amount,OptionCounterID,User_ID,User_Address,Price,Call_Limits,Put_Limits,Oracle_Status,Start_Order_Timestamp,End_Order_Timestamp) = {
12+ let x = invoke(user_balance_dapp, "Issue_Vouchers", [Voucher_Amount, User_ID, User_Address], nil)
13+ if ((x == x))
14+ then {
15+ let y = invoke(user_balance_dapp, FunctionName, [Amount, OptionCounterID, User_ID, User_Address, Price, Call_Limits, Put_Limits, Oracle_Status, Start_Order_Timestamp, End_Order_Timestamp], nil)
16+ if ((y == y))
17+ then if ((i.caller != whitelist_address))
18+ then throw((("This Address is not Authorized. Only " + toString(whitelist_address)) + " is Authorized Address to Sign it."))
19+ else [StringEntry("D2D_Status", "Passed")]
20+ else throw("Strict value is not equal to itself.")
21+ }
5722 else throw("Strict value is not equal to itself.")
5823 }
5924
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let user_balance_dapp = addressFromStringValue("3N1s2w4NHgbrXxNZXH9RtaVT9ptHRJcgSp2")
55
66 let Dapp_Address_pub_key = base58'EXLfxKmqhQPiProBaoPatTentUSZX5Dd8A8bYDcmfNwt'
77
88 let whitelist_address = addressFromPublicKey(Dapp_Address_pub_key)
99
10-let maximum_voucher_size = 100000000
11-
1210 @Callable(i)
13-func Issue_Vouchers (Voucher_Amount,User_ID,User_Address) = {
14- let read_TotalVouchersBalance = valueOrErrorMessage(getInteger(this, "Available_Vouchers_Balance"), "Available_Vouchers_Balance Entry is not Found. Initiate Fill_Vouchers_Liquidity Function first.")
15- let update_TotalVouchersBalance = (read_TotalVouchersBalance - Voucher_Amount)
16- let VouchersIssuedToUser = match getInteger(this, ("Total_Vouchers_Issued_To_" + User_Address)) {
17- case a: Int =>
18- a
19- case _ =>
20- 0
21- }
22- let TotalVouchersIssuedToUser = (VouchersIssuedToUser + 1)
23- let VouchersAmountIssuedToUser = match getInteger(this, ("Total_Vouchers_Amount_Issued_To_" + User_Address)) {
24- case a: Int =>
25- a
26- case _ =>
27- 0
28- }
29- let TotalVouchersAmountIssuedToUser = (VouchersAmountIssuedToUser + Voucher_Amount)
30- let PreviousVouchersBalanceofUser = match getInteger(this, (User_Address + "_Voucher_Balance")) {
31- case a: Int =>
32- a
33- case _ =>
34- 0
35- }
36- let TotalVouchersBalanceofUser = (PreviousVouchersBalanceofUser + Voucher_Amount)
37- if ((i.caller != whitelist_address))
38- then throw((("This Address is not Authorized. Only " + toString(whitelist_address)) + " is Authorized Address to Sign it."))
39- else if ((0 >= Voucher_Amount))
40- then throw("Voucher Balance can't be 0 or go in negative State. Increase the Voucher Amount.")
41- else if ((0 >= update_TotalVouchersBalance))
42- then throw((("Updated Voucher Balance can't go in negative State of " + toString(update_TotalVouchersBalance)) + " /10^8 WAVES. Reduce the Voucher Amount."))
43- else if ((Voucher_Amount > maximum_voucher_size))
44- then throw((("Input Voucher Balance can't exceed the set maximum limit of " + toString(maximum_voucher_size)) + "/10^8 Waves."))
45- else [IntegerEntry(("Total_Vouchers_Issued_To_" + User_Address), TotalVouchersIssuedToUser), IntegerEntry(("Total_Vouchers_Amount_Issued_To_" + User_Address), TotalVouchersAmountIssuedToUser), IntegerEntry((User_Address + "_Voucher_Balance"), TotalVouchersBalanceofUser), IntegerEntry("Available_Vouchers_Balance", update_TotalVouchersBalance)]
46- }
47-
48-
49-
50-@Callable(i)
51-func placeoptionCallWithVoucher (FunctionName,Voucher_Amount,Amount,OptionCounterID,User_ID,User_Address,Price,Call_Limits,Put_Limits,Oracle_Status,Start_Order_Timestamp,End_Order_Timestamp) = {
52- let y = invoke(user_balance_dapp, FunctionName, [Amount, OptionCounterID, User_ID, User_Address, Price, Call_Limits, Put_Limits, Oracle_Status, Start_Order_Timestamp, End_Order_Timestamp], nil)
53- if ((y == y))
54- then if ((i.caller != whitelist_address))
55- then throw((("This Address is not Authorized. Only " + toString(whitelist_address)) + " is Authorized Address to Sign it."))
56- else [StringEntry("D2D_Status", "Passed")]
11+func PlaceOrderWithVoucher (FunctionName,Voucher_Amount,Amount,OptionCounterID,User_ID,User_Address,Price,Call_Limits,Put_Limits,Oracle_Status,Start_Order_Timestamp,End_Order_Timestamp) = {
12+ let x = invoke(user_balance_dapp, "Issue_Vouchers", [Voucher_Amount, User_ID, User_Address], nil)
13+ if ((x == x))
14+ then {
15+ let y = invoke(user_balance_dapp, FunctionName, [Amount, OptionCounterID, User_ID, User_Address, Price, Call_Limits, Put_Limits, Oracle_Status, Start_Order_Timestamp, End_Order_Timestamp], nil)
16+ if ((y == y))
17+ then if ((i.caller != whitelist_address))
18+ then throw((("This Address is not Authorized. Only " + toString(whitelist_address)) + " is Authorized Address to Sign it."))
19+ else [StringEntry("D2D_Status", "Passed")]
20+ else throw("Strict value is not equal to itself.")
21+ }
5722 else throw("Strict value is not equal to itself.")
5823 }
5924
6025

github/deemru/w8io/873ac7e 
36.25 ms