tx · 7Jibi6PwQYbnjLc22B49PiCURZnSwycn1DMETTcDQ7u5

3N4ynz2uyA7cErymQd46zgwVJEEfXYDRXtA:  -0.02000000 Waves

2023.08.10 07:49 [2704030] smart account 3N4ynz2uyA7cErymQd46zgwVJEEfXYDRXtA > SELF 0.00000000 Waves

{ "type": 13, "id": "7Jibi6PwQYbnjLc22B49PiCURZnSwycn1DMETTcDQ7u5", "fee": 2000000, "feeAssetId": null, "timestamp": 1691643002246, "version": 2, "chainId": 84, "sender": "3N4ynz2uyA7cErymQd46zgwVJEEfXYDRXtA", "senderPublicKey": "CiRX9ubobzbD36ZwTyuBFiPnPkmzMQ7GDsF3hMoVbcVR", "proofs": [ "cAH2MHALjuGQAXg93mdw4ggT7eRnLNMni3UFCNxtjvqBN7XRBQuQvB2g1zfLQUJhq1pF3pNCGp8ffVQB5rxJTxo" ], "script": "base64:AAIFAAAAAAAAABYIAhIICgYBAQEBAQQSAwoBARIDCgEBAAAADwAAAAAjcHJlc2FsZV90aW1lc3RhbXBfY29udHJvbGxlcl9wdWJrZXkBAAAAIOOt17LUijbWojwDE5tgFkw1Y8cwIr3jselcewpp7rwjAAAAABJjb250cm9sbGVyX2FkZHJlc3MJAQAAABRhZGRyZXNzRnJvbVB1YmxpY0tleQAAAAEFAAAAI3ByZXNhbGVfdGltZXN0YW1wX2NvbnRyb2xsZXJfcHVia2V5AAAAAAd0c2Vycm9yAgAAADxFbmQgVGltZXN0YW1wIGNhbid0IGJlIGxlc3MgdGhhbiBvciBlcXVhbCB0byBTdGFydCBUaW1lc3RhbXAAAAAACnByaWNlZXJyb3ICAAAAJlRva2VuIFByaWNlIGNhbid0IGJlIGxlc3MgdGhhbiBvciBaZXJvAAAAAAhjYXBlcnJvcgIAAAAzU29mdCBDYXAgQW1vdW50IGNhbid0IGJlIG1vcmUgdGhhbiBIYXJkIENhcCBBbW91bnQuAAAAAAhvcmRlcm1zZwIAAAAqPGgxPk9yZGVyIFN1Ym1pdHRlZCBTdWNjZXNz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SGFyZCBBbHJlYWR5IFJlYWNoZWQgZm9yIHRoaXMgUm91bmQuIFBsZWFzZSBDbGljayBvbiBDbGFpbSB0byBSZWNlaXZlIFlvdXIgVG9rZW5zLgkAAAIAAAABAgAAABFXcm9uZyBFdHJ5IEZvdW5kLgAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5oWV9DQ==", "height": 2704030, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9yRGktn9YvxTe56Pw1EtAxoRueg1FPKiCbqguNuwuBh9 Next: D8zMTsJX6ZyWM9q7hPUXYQ6un31czypbDTTDxXxv8w14 Diff:
OldNewDifferences
1515
1616 let presale_init_msg = "<h1>PreSale Parameters Submitted Successfully!</h1><br>"
1717
18+let refund_init_msg = "<h1>Refund Received Successfully!.</h1><br>"
19+
1820 let pymterror = "DApp Need WAVES Token as Attach payment[1]."
1921
2022 let orderpymterror = "Attached payment[1] is less than token price "
2426 let minbalerror = "Minimum 0.1 WAVES required on Your Address, Please hold min. 0.1 WAVES on your Address to place order."
2527
2628 let presale_end_err = "Pre-Sale is over for this Round."
29+
30+let presale_not_end_err = "Pre-Sale is not over for this Round."
31+
32+let refund_err = "PreSale was Set with False to Refund, so no Refund allowed for this Round."
2733
2834 @Callable(i)
2935 func SetPreSaleParameters (Presale_Start_TimeStamp,Presale_End_TimeStamp,Token_Price,Soft_Cap_Amount,Hard_Cap_Amount,Allow_Refund) = {
113119 }
114120
115121
122+
123+@Callable(i)
124+func Refund (Enter_Presale_Round) = {
125+ let currentKey = toBase58String(i.caller.bytes)
126+ let read_round_token_price = valueOrErrorMessage(getInteger(this, (toString(Enter_Presale_Round) + "_Token_Price")), "Token Price not Found for this Presale Round.")
127+ let read_round_start_ts = valueOrErrorMessage(getInteger(this, (toString(Enter_Presale_Round) + "_Presale_Start_TimeStamp")), "Start Timestamp not Found for this Presale Round.")
128+ let read_round_end_ts = valueOrErrorMessage(getInteger(this, (toString(Enter_Presale_Round) + "_Presale_End_TimeStamp")), "End Timestamp not Found for this Presale Round.")
129+ let read_Soft_Cap_Amount = valueOrErrorMessage(getInteger(this, (toString(Enter_Presale_Round) + "_Soft_Cap_Amount")), "Soft Cap Amount not Found for this Presale Round.")
130+ let read_Hard_Cap_Amount = valueOrErrorMessage(getInteger(this, (toString(Enter_Presale_Round) + "_Hard_Cap_Amount")), "Hard Cap Amount not Found for this Presale Round.")
131+ let read_total_funds_collection = valueOrErrorMessage(getInteger(this, (toString(Enter_Presale_Round) + "_Funds_Collection")), "Total Funds Collection not Found for this Presale Round.")
132+ let read_user_total_funds_deposited = valueOrErrorMessage(getInteger(this, ((toString(Enter_Presale_Round) + "_") + currentKey)), "No Deposit was made by this Address for this Presale Round.")
133+ let read_Allow_Refund = valueOrErrorMessage(getBoolean(this, (toString(Enter_Presale_Round) + "_Allow_Refund")), "Allow_Refund has no Boolen Entry for this Presale Round.")
134+ let pending_softcap_status = (read_Soft_Cap_Amount - read_total_funds_collection)
135+ let pending_hardcap_status = (read_Hard_Cap_Amount - read_total_funds_collection)
136+ if ((read_round_end_ts > lastBlock.timestamp))
137+ then throw(presale_not_end_err)
138+ else if ((read_Allow_Refund == false))
139+ then throw(refund_err)
140+ else if (if ((pending_softcap_status > 0))
141+ then (pending_hardcap_status > 0)
142+ else false)
143+ then [ScriptTransfer(addressFromStringValue(currentKey), read_user_total_funds_deposited, unit), IntegerEntry(((toString(Enter_Presale_Round) + "_") + currentKey), 0), StringEntry("message", refund_init_msg)]
144+ else if (if ((0 >= pending_softcap_status))
145+ then (pending_hardcap_status > 0)
146+ else false)
147+ then throw("SoftCap Already Reached for this Round. Please Click on Claim to Receive Your Tokens.")
148+ else if (if ((0 >= pending_softcap_status))
149+ then (0 >= pending_hardcap_status)
150+ else false)
151+ then throw("SoftCap and Hard Already Reached for this Round. Please Click on Claim to Receive Your Tokens.")
152+ else throw("Wrong Etry Found.")
153+ }
154+
155+
116156 @Verifier(tx)
117157 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
118158
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let presale_timestamp_controller_pubkey = base58'GKmJ6BchUgQfwKp4mp5eX8Y9xLioYRm6e1gDfFgdAcCr'
55
66 let controller_address = addressFromPublicKey(presale_timestamp_controller_pubkey)
77
88 let tserror = "End Timestamp can't be less than or equal to Start Timestamp"
99
1010 let priceerror = "Token Price can't be less than or Zero"
1111
1212 let caperror = "Soft Cap Amount can't be more than Hard Cap Amount."
1313
1414 let ordermsg = "<h1>Order Submitted Successfully!</h1><br>"
1515
1616 let presale_init_msg = "<h1>PreSale Parameters Submitted Successfully!</h1><br>"
1717
18+let refund_init_msg = "<h1>Refund Received Successfully!.</h1><br>"
19+
1820 let pymterror = "DApp Need WAVES Token as Attach payment[1]."
1921
2022 let orderpymterror = "Attached payment[1] is less than token price "
2123
2224 let launch_error = "Dapp will start Pre-Sale at Timestamp "
2325
2426 let minbalerror = "Minimum 0.1 WAVES required on Your Address, Please hold min. 0.1 WAVES on your Address to place order."
2527
2628 let presale_end_err = "Pre-Sale is over for this Round."
29+
30+let presale_not_end_err = "Pre-Sale is not over for this Round."
31+
32+let refund_err = "PreSale was Set with False to Refund, so no Refund allowed for this Round."
2733
2834 @Callable(i)
2935 func SetPreSaleParameters (Presale_Start_TimeStamp,Presale_End_TimeStamp,Token_Price,Soft_Cap_Amount,Hard_Cap_Amount,Allow_Refund) = {
3036 let StartTS = Presale_Start_TimeStamp
3137 let EndTS = Presale_End_TimeStamp
3238 let read_funding_round = match getInteger(this, "Current_Funding_Round") {
3339 case a: Int =>
3440 a
3541 case _ =>
3642 0
3743 }
3844 let current_round = (read_funding_round + 1)
3945 if ((i.caller != controller_address))
4046 then throw((("This Address is not Authorized. Only " + toString(controller_address)) + " is Authorized Address to Sign it."))
4147 else if ((size(toString(Presale_Start_TimeStamp)) != 13))
4248 then throw("Start Timestamp is Wrong. Please Enter a Valid Timestamp. Probably you entered an Timestamp less than 13 Chars.")
4349 else if ((size(toString(Presale_End_TimeStamp)) != 13))
4450 then throw("End Timestamp is Wrong. Please Enter a Valid Timestamp. Probably you entered an Timestamp less than 13 Chars.")
4551 else if ((1 > Token_Price))
4652 then throw(priceerror)
4753 else if ((StartTS >= EndTS))
4854 then throw(tserror)
4955 else if ((Soft_Cap_Amount > Hard_Cap_Amount))
5056 then throw(caperror)
5157 else [IntegerEntry("Current_Funding_Round", current_round), IntegerEntry((toString(current_round) + "_Presale_Start_TimeStamp"), StartTS), IntegerEntry((toString(current_round) + "_Presale_End_TimeStamp"), EndTS), IntegerEntry((toString(current_round) + "_Token_Price"), Token_Price), IntegerEntry((toString(current_round) + "_Soft_Cap_Amount"), Soft_Cap_Amount), IntegerEntry((toString(current_round) + "_Hard_Cap_Amount"), Hard_Cap_Amount), IntegerEntry((toString(current_round) + "_Initiated_Height"), height), BooleanEntry((toString(current_round) + "_Allow_Refund"), Allow_Refund), StringEntry("message", presale_init_msg)]
5258 }
5359
5460
5561
5662 @Callable(i)
5763 func PlacePresaleOrder (Enter_Presale_Round) = {
5864 let read_round_token_price = valueOrErrorMessage(getInteger(this, (toString(Enter_Presale_Round) + "_Token_Price")), "Token Price not Found for this Presale Round.")
5965 let read_round_start_ts = valueOrErrorMessage(getInteger(this, (toString(Enter_Presale_Round) + "_Presale_Start_TimeStamp")), "Start Timestamp not Found for this Presale Round.")
6066 let read_round_end_ts = valueOrErrorMessage(getInteger(this, (toString(Enter_Presale_Round) + "_Presale_End_TimeStamp")), "End Timestamp not Found for this Presale Round.")
6167 let read_Soft_Cap_Amount = valueOrErrorMessage(getInteger(this, (toString(Enter_Presale_Round) + "_Soft_Cap_Amount")), "Soft Cap Amount not Found for this Presale Round.")
6268 let read_Hard_Cap_Amount = valueOrErrorMessage(getInteger(this, (toString(Enter_Presale_Round) + "_Hard_Cap_Amount")), "Hard Cap Amount not Found for this Presale Round.")
6369 let read_Allow_Refund = valueOrErrorMessage(getBoolean(this, (toString(Enter_Presale_Round) + "_Allow_Refund")), "Refund is not set for this Presale Round.")
6470 let WAVES = unit
6571 let currentKey = toBase58String(i.caller.bytes)
6672 let pmt = if ((size(i.payments) == 1))
6773 then i.payments[0]
6874 else throw(pymterror)
6975 let read_funds_collection = match getInteger(this, (toString(Enter_Presale_Round) + "_Funds_Collection")) {
7076 case a: Int =>
7177 a
7278 case _ =>
7379 0
7480 }
7581 let total_funds_collection = (read_funds_collection + pmt.amount)
7682 let read_total_txns = match getInteger(this, (toString(Enter_Presale_Round) + "_total_txns")) {
7783 case a: Int =>
7884 a
7985 case _ =>
8086 0
8187 }
8288 let total_txns = (read_total_txns + 1)
8389 let read_user_total_funds_deposited = match getInteger(this, ((toString(Enter_Presale_Round) + "_") + currentKey)) {
8490 case a: Int =>
8591 a
8692 case _ =>
8793 0
8894 }
8995 let user_total_funds_deposited = (read_user_total_funds_deposited + pmt.amount)
9096 let pending_softcap_status = (read_Soft_Cap_Amount - total_funds_collection)
9197 let pending_hardcap_status = (read_Hard_Cap_Amount - total_funds_collection)
9298 if (isDefined(pmt.assetId))
9399 then throw(pymterror)
94100 else if ((read_round_token_price > pmt.amount))
95101 then throw((((orderpymterror + "[") + toString(read_round_token_price)) + "/10^8.]"))
96102 else if ((read_round_start_ts > lastBlock.timestamp))
97103 then throw((launch_error + toString(read_round_start_ts)))
98104 else if ((lastBlock.timestamp > read_round_end_ts))
99105 then throw(presale_end_err)
100106 else if (if ((pending_softcap_status > 0))
101107 then (pending_hardcap_status > 0)
102108 else false)
103109 then [IntegerEntry((toString(Enter_Presale_Round) + "_Funds_Collection"), total_funds_collection), IntegerEntry(((toString(Enter_Presale_Round) + "_") + currentKey), user_total_funds_deposited), IntegerEntry((toString(Enter_Presale_Round) + "_total_txns"), total_txns), IntegerEntry((toString(Enter_Presale_Round) + "_pending_softcap_status"), pending_softcap_status), IntegerEntry((toString(Enter_Presale_Round) + "_pending_hardcap_status"), pending_hardcap_status), StringEntry((toString(Enter_Presale_Round) + "_softcap_status"), "No"), StringEntry((toString(Enter_Presale_Round) + "_hardcap_status"), "No"), BooleanEntry((toString(Enter_Presale_Round) + "_Allow_Refund"), read_Allow_Refund), StringEntry("message", ordermsg)]
104110 else if (if ((0 >= pending_softcap_status))
105111 then (pending_hardcap_status > 0)
106112 else false)
107113 then [IntegerEntry((toString(Enter_Presale_Round) + "_Funds_Collection"), total_funds_collection), IntegerEntry(((toString(Enter_Presale_Round) + "_") + currentKey), user_total_funds_deposited), IntegerEntry((toString(Enter_Presale_Round) + "_total_txns"), total_txns), IntegerEntry((toString(Enter_Presale_Round) + "_pending_softcap_status"), pending_softcap_status), IntegerEntry((toString(Enter_Presale_Round) + "_pending_hardcap_status"), pending_hardcap_status), StringEntry((toString(Enter_Presale_Round) + "_softcap_status"), "Yes"), StringEntry((toString(Enter_Presale_Round) + "_hardcap_status"), "No"), BooleanEntry((toString(Enter_Presale_Round) + "_Allow_Refund"), false), StringEntry("message", ordermsg)]
108114 else if (if ((0 >= pending_softcap_status))
109115 then (0 >= pending_hardcap_status)
110116 else false)
111117 then [IntegerEntry((toString(Enter_Presale_Round) + "_Funds_Collection"), total_funds_collection), IntegerEntry(((toString(Enter_Presale_Round) + "_") + currentKey), user_total_funds_deposited), IntegerEntry((toString(Enter_Presale_Round) + "_total_txns"), total_txns), IntegerEntry((toString(Enter_Presale_Round) + "_pending_softcap_status"), pending_softcap_status), IntegerEntry((toString(Enter_Presale_Round) + "_pending_hardcap_status"), pending_hardcap_status), StringEntry((toString(Enter_Presale_Round) + "_softcap_status"), "Yes"), StringEntry((toString(Enter_Presale_Round) + "_hardcap_status"), "Yes"), BooleanEntry((toString(Enter_Presale_Round) + "_Allow_Refund"), false), StringEntry("message", ordermsg)]
112118 else throw("Error.")
113119 }
114120
115121
122+
123+@Callable(i)
124+func Refund (Enter_Presale_Round) = {
125+ let currentKey = toBase58String(i.caller.bytes)
126+ let read_round_token_price = valueOrErrorMessage(getInteger(this, (toString(Enter_Presale_Round) + "_Token_Price")), "Token Price not Found for this Presale Round.")
127+ let read_round_start_ts = valueOrErrorMessage(getInteger(this, (toString(Enter_Presale_Round) + "_Presale_Start_TimeStamp")), "Start Timestamp not Found for this Presale Round.")
128+ let read_round_end_ts = valueOrErrorMessage(getInteger(this, (toString(Enter_Presale_Round) + "_Presale_End_TimeStamp")), "End Timestamp not Found for this Presale Round.")
129+ let read_Soft_Cap_Amount = valueOrErrorMessage(getInteger(this, (toString(Enter_Presale_Round) + "_Soft_Cap_Amount")), "Soft Cap Amount not Found for this Presale Round.")
130+ let read_Hard_Cap_Amount = valueOrErrorMessage(getInteger(this, (toString(Enter_Presale_Round) + "_Hard_Cap_Amount")), "Hard Cap Amount not Found for this Presale Round.")
131+ let read_total_funds_collection = valueOrErrorMessage(getInteger(this, (toString(Enter_Presale_Round) + "_Funds_Collection")), "Total Funds Collection not Found for this Presale Round.")
132+ let read_user_total_funds_deposited = valueOrErrorMessage(getInteger(this, ((toString(Enter_Presale_Round) + "_") + currentKey)), "No Deposit was made by this Address for this Presale Round.")
133+ let read_Allow_Refund = valueOrErrorMessage(getBoolean(this, (toString(Enter_Presale_Round) + "_Allow_Refund")), "Allow_Refund has no Boolen Entry for this Presale Round.")
134+ let pending_softcap_status = (read_Soft_Cap_Amount - read_total_funds_collection)
135+ let pending_hardcap_status = (read_Hard_Cap_Amount - read_total_funds_collection)
136+ if ((read_round_end_ts > lastBlock.timestamp))
137+ then throw(presale_not_end_err)
138+ else if ((read_Allow_Refund == false))
139+ then throw(refund_err)
140+ else if (if ((pending_softcap_status > 0))
141+ then (pending_hardcap_status > 0)
142+ else false)
143+ then [ScriptTransfer(addressFromStringValue(currentKey), read_user_total_funds_deposited, unit), IntegerEntry(((toString(Enter_Presale_Round) + "_") + currentKey), 0), StringEntry("message", refund_init_msg)]
144+ else if (if ((0 >= pending_softcap_status))
145+ then (pending_hardcap_status > 0)
146+ else false)
147+ then throw("SoftCap Already Reached for this Round. Please Click on Claim to Receive Your Tokens.")
148+ else if (if ((0 >= pending_softcap_status))
149+ then (0 >= pending_hardcap_status)
150+ else false)
151+ then throw("SoftCap and Hard Already Reached for this Round. Please Click on Claim to Receive Your Tokens.")
152+ else throw("Wrong Etry Found.")
153+ }
154+
155+
116156 @Verifier(tx)
117157 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
118158

github/deemru/w8io/026f985 
30.25 ms