tx · HCNGDGyGfzRhMqLDS4WXtoEfiFqhQkHfRe9kBw74TiTS 3N4ynz2uyA7cErymQd46zgwVJEEfXYDRXtA: -0.02000000 Waves 2023.08.10 12:13 [2704291] smart account 3N4ynz2uyA7cErymQd46zgwVJEEfXYDRXtA > SELF 0.00000000 Waves
{ "type": 13, "id": "HCNGDGyGfzRhMqLDS4WXtoEfiFqhQkHfRe9kBw74TiTS", "fee": 2000000, "feeAssetId": null, "timestamp": 1691658802523, "version": 2, "chainId": 84, "sender": "3N4ynz2uyA7cErymQd46zgwVJEEfXYDRXtA", "senderPublicKey": "CiRX9ubobzbD36ZwTyuBFiPnPkmzMQ7GDsF3hMoVbcVR", "proofs": [ "2jKMKmT2GjtMatnzNeHQ2KUBsC4a1qnKZqhgRxStG8vUPDSwhLKHAoPr2YFxGGfi5dcuB5J4DU9TPRE7wnnd3Seu" ], "script": "base64:AAIFAAAAAAAAABYIAhIICgYBAQEBAQQSAwoBARIDCgEBAAAAEAAAAAAjcHJlc2FsZV90aW1lc3RhbXBfY29udHJvbGxlcl9wdWJrZXkBAAAAIOOt17LUijbWojwDE5tgFkw1Y8cwIr3jselcewpp7rwjAAAAABJjb250cm9sbGVyX2FkZHJlc3MJAQAAABRhZGRyZXNzRnJvbVB1YmxpY0tleQAAAAEFAAAAI3ByZXNhbGVfdGltZXN0YW1wX2NvbnRyb2xsZXJfcHVia2V5AAAAAA5leHBpcmVkdHNlcnJvcgIAAAA4U3RhcnQgVGltZXN0YW1wIGNhbid0IGJlIGxlc3MgdGhhbiBsYXN0IGJsb2NrIFRpbWVzdGFtcC4AAAAAB3RzZXJyb3ICAAAAPEVuZCBUaW1lc3RhbXAgY2FuJ3QgYmUgbGVzcyB0aGFuIG9yIGVxdWFsIHRvIFN0YXJ0IFRpbWVzdGFtcAAAAAAKcHJpY2VlcnJvcgIAAAAmVG9rZW4gUHJpY2UgY2FuJ3QgYmUgbGVzcyB0aGFuIG9yIFplcm8AAAAACGNhcGVycm9yAgAAADNT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AAAEFAAAAE0VudGVyX1ByZXNhbGVfUm91bmQCAAAAAV8FAAAACmN1cnJlbnRLZXkAAAAAAAAAAAAJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgIAAAAHbWVzc2FnZQUAAAAPcmVmdW5kX2luaXRfbXNnBQAAAANuaWwDAwkAAGcAAAACAAAAAAAAAAAABQAAABZwZW5kaW5nX3NvZnRjYXBfc3RhdHVzCQAAZgAAAAIFAAAAFnBlbmRpbmdfaGFyZGNhcF9zdGF0dXMAAAAAAAAAAAAHCQAAAgAAAAECAAAAVVNvZnRDYXAgQWxyZWFkeSBSZWFjaGVkIGZvciB0aGlzIFJvdW5kLiBQbGVhc2UgQ2xpY2sgb24gQ2xhaW0gdG8gUmVjZWl2ZSBZb3VyIFRva2Vucy4DAwkAAGcAAAACAAAAAAAAAAAABQAAABZwZW5kaW5nX3NvZnRjYXBfc3RhdHVzCQAAZwAAAAIAAAAAAAAAAAAFAAAAFnBlbmRpbmdfaGFyZGNhcF9zdGF0dXMHCQAAAgAAAAECAAAAXlNvZnRDYXAgYW5kIEhhcmQgQWxyZWFkeSBSZWFjaGVkIGZvciB0aGlzIFJvdW5kLiBQbGVhc2UgQ2xpY2sgb24gQ2xhaW0gdG8gUmVjZWl2ZSBZb3VyIFRva2Vucy4JAAACAAAAAQIAAAASV3JvbmcgRW50cnkgRm91bmQuAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXnskupz", "height": 2704291, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GKfLFVDhVSuAa8bw2jwUviJ7exK4uDRZKx6JaBJjikg4 Next: 2NZJ5a8aN69ict6SsC24YpLUn5VXkghw5EQxosjDdxju Diff:
Old | New | Differences | |
---|---|---|---|
4 | 4 | let presale_timestamp_controller_pubkey = base58'GKmJ6BchUgQfwKp4mp5eX8Y9xLioYRm6e1gDfFgdAcCr' | |
5 | 5 | ||
6 | 6 | let controller_address = addressFromPublicKey(presale_timestamp_controller_pubkey) | |
7 | + | ||
8 | + | let expiredtserror = "Start Timestamp can't be less than last block Timestamp." | |
7 | 9 | ||
8 | 10 | let tserror = "End Timestamp can't be less than or equal to Start Timestamp" | |
9 | 11 | ||
14 | 16 | let ordermsg = "<h1>Order Submitted Successfully!</h1><br>" | |
15 | 17 | ||
16 | 18 | let presale_init_msg = "<h1>PreSale Parameters Submitted Successfully!</h1><br>" | |
17 | - | ||
18 | - | let refund_init_msg = "<h1>Refund Received Successfully!.</h1><br>" | |
19 | 19 | ||
20 | 20 | let pymterror = "DApp Need WAVES Token as Attach payment[1]." | |
21 | 21 | ||
31 | 31 | ||
32 | 32 | let refund_err = "Softcap or Hard Cap already Reached or probably PreSale was Set with False to Refund, so no Refund allowed for this Round." | |
33 | 33 | ||
34 | + | let refund_init_msg = "<h1>Refund Received Successfully!.</h1><br>" | |
35 | + | ||
34 | 36 | @Callable(i) | |
35 | 37 | func SetPreSaleParameters (Presale_Start_TimeStamp,Presale_End_TimeStamp,Token_Price,Soft_Cap_Amount,Hard_Cap_Amount,Allow_Refund) = { | |
36 | 38 | let StartTS = Presale_Start_TimeStamp | |
44 | 46 | let current_round = (read_funding_round + 1) | |
45 | 47 | if ((i.caller != controller_address)) | |
46 | 48 | then throw((("This Address is not Authorized. Only " + toString(controller_address)) + " is Authorized Address to Sign it.")) | |
47 | - | else if ((size(toString(Presale_Start_TimeStamp)) != 13)) | |
48 | - | then throw("Start Timestamp is Wrong. Please Enter a Valid Timestamp. Probably you entered an Timestamp less than 13 Chars.") | |
49 | - | else if ((size(toString(Presale_End_TimeStamp)) != 13)) | |
50 | - | then throw("End Timestamp is Wrong. Please Enter a Valid Timestamp. Probably you entered an Timestamp less than 13 Chars.") | |
51 | - | else if ((1 > Token_Price)) | |
52 | - | then throw(priceerror) | |
53 | - | else if ((StartTS >= EndTS)) | |
54 | - | then throw(tserror) | |
55 | - | else if ((Soft_Cap_Amount > Hard_Cap_Amount)) | |
56 | - | then throw(caperror) | |
57 | - | 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)] | |
49 | + | else if ((Presale_Start_TimeStamp > lastBlock.timestamp)) | |
50 | + | then throw(expiredtserror) | |
51 | + | else if ((size(toString(Presale_Start_TimeStamp)) != 13)) | |
52 | + | then throw("Start Timestamp is Wrong. Please Enter a Valid Timestamp. Probably you entered an Timestamp less than 13 Chars.") | |
53 | + | else if ((size(toString(Presale_End_TimeStamp)) != 13)) | |
54 | + | then throw("End Timestamp is Wrong. Please Enter a Valid Timestamp. Probably you entered an Timestamp less than 13 Chars.") | |
55 | + | else if ((1 > Token_Price)) | |
56 | + | then throw(priceerror) | |
57 | + | else if ((StartTS >= EndTS)) | |
58 | + | then throw(tserror) | |
59 | + | else if ((Soft_Cap_Amount > Hard_Cap_Amount)) | |
60 | + | then throw(caperror) | |
61 | + | 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)] | |
58 | 62 | } | |
59 | 63 | ||
60 | 64 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let presale_timestamp_controller_pubkey = base58'GKmJ6BchUgQfwKp4mp5eX8Y9xLioYRm6e1gDfFgdAcCr' | |
5 | 5 | ||
6 | 6 | let controller_address = addressFromPublicKey(presale_timestamp_controller_pubkey) | |
7 | + | ||
8 | + | let expiredtserror = "Start Timestamp can't be less than last block Timestamp." | |
7 | 9 | ||
8 | 10 | let tserror = "End Timestamp can't be less than or equal to Start Timestamp" | |
9 | 11 | ||
10 | 12 | let priceerror = "Token Price can't be less than or Zero" | |
11 | 13 | ||
12 | 14 | let caperror = "Soft Cap Amount can't be more than Hard Cap Amount." | |
13 | 15 | ||
14 | 16 | let ordermsg = "<h1>Order Submitted Successfully!</h1><br>" | |
15 | 17 | ||
16 | 18 | let presale_init_msg = "<h1>PreSale Parameters Submitted Successfully!</h1><br>" | |
17 | - | ||
18 | - | let refund_init_msg = "<h1>Refund Received Successfully!.</h1><br>" | |
19 | 19 | ||
20 | 20 | let pymterror = "DApp Need WAVES Token as Attach payment[1]." | |
21 | 21 | ||
22 | 22 | let orderpymterror = "Attached payment[1] is less than token price " | |
23 | 23 | ||
24 | 24 | let launch_error = "Dapp will start Pre-Sale at Timestamp " | |
25 | 25 | ||
26 | 26 | let minbalerror = "Minimum 0.1 WAVES required on Your Address, Please hold min. 0.1 WAVES on your Address to place order." | |
27 | 27 | ||
28 | 28 | let presale_end_err = "Pre-Sale is over for this Round." | |
29 | 29 | ||
30 | 30 | let presale_not_end_err = "Pre-Sale is not over for this Round." | |
31 | 31 | ||
32 | 32 | let refund_err = "Softcap or Hard Cap already Reached or probably PreSale was Set with False to Refund, so no Refund allowed for this Round." | |
33 | 33 | ||
34 | + | let refund_init_msg = "<h1>Refund Received Successfully!.</h1><br>" | |
35 | + | ||
34 | 36 | @Callable(i) | |
35 | 37 | func SetPreSaleParameters (Presale_Start_TimeStamp,Presale_End_TimeStamp,Token_Price,Soft_Cap_Amount,Hard_Cap_Amount,Allow_Refund) = { | |
36 | 38 | let StartTS = Presale_Start_TimeStamp | |
37 | 39 | let EndTS = Presale_End_TimeStamp | |
38 | 40 | let read_funding_round = match getInteger(this, "Current_Funding_Round") { | |
39 | 41 | case a: Int => | |
40 | 42 | a | |
41 | 43 | case _ => | |
42 | 44 | 0 | |
43 | 45 | } | |
44 | 46 | let current_round = (read_funding_round + 1) | |
45 | 47 | if ((i.caller != controller_address)) | |
46 | 48 | then throw((("This Address is not Authorized. Only " + toString(controller_address)) + " is Authorized Address to Sign it.")) | |
47 | - | else if ((size(toString(Presale_Start_TimeStamp)) != 13)) | |
48 | - | then throw("Start Timestamp is Wrong. Please Enter a Valid Timestamp. Probably you entered an Timestamp less than 13 Chars.") | |
49 | - | else if ((size(toString(Presale_End_TimeStamp)) != 13)) | |
50 | - | then throw("End Timestamp is Wrong. Please Enter a Valid Timestamp. Probably you entered an Timestamp less than 13 Chars.") | |
51 | - | else if ((1 > Token_Price)) | |
52 | - | then throw(priceerror) | |
53 | - | else if ((StartTS >= EndTS)) | |
54 | - | then throw(tserror) | |
55 | - | else if ((Soft_Cap_Amount > Hard_Cap_Amount)) | |
56 | - | then throw(caperror) | |
57 | - | 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)] | |
49 | + | else if ((Presale_Start_TimeStamp > lastBlock.timestamp)) | |
50 | + | then throw(expiredtserror) | |
51 | + | else if ((size(toString(Presale_Start_TimeStamp)) != 13)) | |
52 | + | then throw("Start Timestamp is Wrong. Please Enter a Valid Timestamp. Probably you entered an Timestamp less than 13 Chars.") | |
53 | + | else if ((size(toString(Presale_End_TimeStamp)) != 13)) | |
54 | + | then throw("End Timestamp is Wrong. Please Enter a Valid Timestamp. Probably you entered an Timestamp less than 13 Chars.") | |
55 | + | else if ((1 > Token_Price)) | |
56 | + | then throw(priceerror) | |
57 | + | else if ((StartTS >= EndTS)) | |
58 | + | then throw(tserror) | |
59 | + | else if ((Soft_Cap_Amount > Hard_Cap_Amount)) | |
60 | + | then throw(caperror) | |
61 | + | 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)] | |
58 | 62 | } | |
59 | 63 | ||
60 | 64 | ||
61 | 65 | ||
62 | 66 | @Callable(i) | |
63 | 67 | func PlacePresaleOrder (Enter_Presale_Round) = { | |
64 | 68 | let read_round_token_price = valueOrErrorMessage(getInteger(this, (toString(Enter_Presale_Round) + "_Token_Price")), "Token Price not Found for this Presale Round.") | |
65 | 69 | let read_round_start_ts = valueOrErrorMessage(getInteger(this, (toString(Enter_Presale_Round) + "_Presale_Start_TimeStamp")), "Start Timestamp not Found for this Presale Round.") | |
66 | 70 | let read_round_end_ts = valueOrErrorMessage(getInteger(this, (toString(Enter_Presale_Round) + "_Presale_End_TimeStamp")), "End Timestamp not Found for this Presale Round.") | |
67 | 71 | let read_Soft_Cap_Amount = valueOrErrorMessage(getInteger(this, (toString(Enter_Presale_Round) + "_Soft_Cap_Amount")), "Soft Cap Amount not Found for this Presale Round.") | |
68 | 72 | let read_Hard_Cap_Amount = valueOrErrorMessage(getInteger(this, (toString(Enter_Presale_Round) + "_Hard_Cap_Amount")), "Hard Cap Amount not Found for this Presale Round.") | |
69 | 73 | let read_Allow_Refund = valueOrErrorMessage(getBoolean(this, (toString(Enter_Presale_Round) + "_Allow_Refund")), "Refund is not set for this Presale Round.") | |
70 | 74 | let WAVES = unit | |
71 | 75 | let currentKey = toBase58String(i.caller.bytes) | |
72 | 76 | let pmt = if ((size(i.payments) == 1)) | |
73 | 77 | then i.payments[0] | |
74 | 78 | else throw(pymterror) | |
75 | 79 | let read_funds_collection = match getInteger(this, (toString(Enter_Presale_Round) + "_Funds_Collection")) { | |
76 | 80 | case a: Int => | |
77 | 81 | a | |
78 | 82 | case _ => | |
79 | 83 | 0 | |
80 | 84 | } | |
81 | 85 | let total_funds_collection = (read_funds_collection + pmt.amount) | |
82 | 86 | let read_total_txns = match getInteger(this, (toString(Enter_Presale_Round) + "_total_txns")) { | |
83 | 87 | case a: Int => | |
84 | 88 | a | |
85 | 89 | case _ => | |
86 | 90 | 0 | |
87 | 91 | } | |
88 | 92 | let total_txns = (read_total_txns + 1) | |
89 | 93 | let read_user_total_funds_deposited = match getInteger(this, ((toString(Enter_Presale_Round) + "_") + currentKey)) { | |
90 | 94 | case a: Int => | |
91 | 95 | a | |
92 | 96 | case _ => | |
93 | 97 | 0 | |
94 | 98 | } | |
95 | 99 | let user_total_funds_deposited = (read_user_total_funds_deposited + pmt.amount) | |
96 | 100 | let pending_softcap_status = (read_Soft_Cap_Amount - total_funds_collection) | |
97 | 101 | let pending_hardcap_status = (read_Hard_Cap_Amount - total_funds_collection) | |
98 | 102 | if (isDefined(pmt.assetId)) | |
99 | 103 | then throw(pymterror) | |
100 | 104 | else if ((read_round_token_price > pmt.amount)) | |
101 | 105 | then throw((((orderpymterror + "[") + toString(read_round_token_price)) + "/10^8.]")) | |
102 | 106 | else if ((read_round_start_ts > lastBlock.timestamp)) | |
103 | 107 | then throw((launch_error + toString(read_round_start_ts))) | |
104 | 108 | else if ((lastBlock.timestamp > read_round_end_ts)) | |
105 | 109 | then throw(presale_end_err) | |
106 | 110 | else if (if ((pending_softcap_status > 0)) | |
107 | 111 | then (pending_hardcap_status > 0) | |
108 | 112 | else false) | |
109 | 113 | 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)] | |
110 | 114 | else if (if ((0 >= pending_softcap_status)) | |
111 | 115 | then (pending_hardcap_status > 0) | |
112 | 116 | else false) | |
113 | 117 | 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)] | |
114 | 118 | else if (if ((0 >= pending_softcap_status)) | |
115 | 119 | then (0 >= pending_hardcap_status) | |
116 | 120 | else false) | |
117 | 121 | 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)] | |
118 | 122 | else throw("Error.") | |
119 | 123 | } | |
120 | 124 | ||
121 | 125 | ||
122 | 126 | ||
123 | 127 | @Callable(i) | |
124 | 128 | func Refund (Enter_Presale_Round) = { | |
125 | 129 | let WAVES = unit | |
126 | 130 | let currentKey = toBase58String(i.caller.bytes) | |
127 | 131 | let read_Initiated_Height = valueOrErrorMessage(getInteger(this, (toString(Enter_Presale_Round) + "_Initiated_Height")), "Initiated Height not Found for this Presale Round.") | |
128 | 132 | let read_round_token_price = valueOrErrorMessage(getInteger(this, (toString(Enter_Presale_Round) + "_Token_Price")), "Token Price not Found for this Presale Round.") | |
129 | 133 | let read_round_start_ts = valueOrErrorMessage(getInteger(this, (toString(Enter_Presale_Round) + "_Presale_Start_TimeStamp")), "Start Timestamp not Found for this Presale Round.") | |
130 | 134 | let read_round_end_ts = valueOrErrorMessage(getInteger(this, (toString(Enter_Presale_Round) + "_Presale_End_TimeStamp")), "End Timestamp not Found for this Presale Round.") | |
131 | 135 | let read_Soft_Cap_Amount = valueOrErrorMessage(getInteger(this, (toString(Enter_Presale_Round) + "_Soft_Cap_Amount")), "Soft Cap Amount not Found for this Presale Round.") | |
132 | 136 | let read_Hard_Cap_Amount = valueOrErrorMessage(getInteger(this, (toString(Enter_Presale_Round) + "_Hard_Cap_Amount")), "Hard Cap Amount not Found for this Presale Round.") | |
133 | 137 | let read_total_funds_collection = valueOrErrorMessage(getInteger(this, (toString(Enter_Presale_Round) + "_Funds_Collection")), "Total Funds Collection not Found for this Presale Round.") | |
134 | 138 | 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.") | |
135 | 139 | let read_Allow_Refund = valueOrErrorMessage(getBoolean(this, (toString(Enter_Presale_Round) + "_Allow_Refund")), "Allow_Refund has no Boolen Entry for this Presale Round.") | |
136 | 140 | let pending_softcap_status = (read_Soft_Cap_Amount - read_total_funds_collection) | |
137 | 141 | let pending_hardcap_status = (read_Hard_Cap_Amount - read_total_funds_collection) | |
138 | 142 | let milliseconds = 1000 | |
139 | 143 | let minute = (60 * milliseconds) | |
140 | 144 | let round_time_difference = (read_round_end_ts - read_round_start_ts) | |
141 | 145 | let additional_safe_blocks = 10 | |
142 | 146 | let blockstimetomature = ((read_Initiated_Height + fraction(round_time_difference, 1, minute)) + additional_safe_blocks) | |
143 | 147 | let pending_refunds = (read_total_funds_collection - read_user_total_funds_deposited) | |
144 | 148 | if ((blockstimetomature > lastBlock.height)) | |
145 | 149 | then throw((((presale_not_end_err + " Please Wait Until ~") + toString(blockstimetomature)) + " Height is reached.")) | |
146 | 150 | else if ((read_Allow_Refund == false)) | |
147 | 151 | then throw(refund_err) | |
148 | 152 | else if ((read_user_total_funds_deposited == 0)) | |
149 | 153 | then throw("Refund has been Already Claimed by this Address.") | |
150 | 154 | else if (if ((pending_softcap_status > 0)) | |
151 | 155 | then (pending_hardcap_status > 0) | |
152 | 156 | else false) | |
153 | 157 | then [ScriptTransfer(addressFromStringValue(currentKey), read_user_total_funds_deposited, WAVES), IntegerEntry(((toString(Enter_Presale_Round) + "_") + "Pending_Refund"), pending_refunds), IntegerEntry(((toString(Enter_Presale_Round) + "_") + currentKey), 0), StringEntry("message", refund_init_msg)] | |
154 | 158 | else if (if ((0 >= pending_softcap_status)) | |
155 | 159 | then (pending_hardcap_status > 0) | |
156 | 160 | else false) | |
157 | 161 | then throw("SoftCap Already Reached for this Round. Please Click on Claim to Receive Your Tokens.") | |
158 | 162 | else if (if ((0 >= pending_softcap_status)) | |
159 | 163 | then (0 >= pending_hardcap_status) | |
160 | 164 | else false) | |
161 | 165 | then throw("SoftCap and Hard Already Reached for this Round. Please Click on Claim to Receive Your Tokens.") | |
162 | 166 | else throw("Wrong Entry Found.") | |
163 | 167 | } | |
164 | 168 | ||
165 | 169 | ||
166 | 170 | @Verifier(tx) | |
167 | 171 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
168 | 172 |
github/deemru/w8io/026f985 35.08 ms ◑