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:AAIFAAAAAAAAABYIAhIICgYBAQEBAQQSAwoBARIDCgEBAAAAEAAAAAAjcHJlc2FsZV90aW1lc3RhbXBfY29udHJvbGxlcl9wdWJrZXkBAAAAIOOt17LUijbWojwDE5tgFkw1Y8cwIr3jselcewpp7rwjAAAAABJjb250cm9sbGVyX2FkZHJlc3MJAQAAABRhZGRyZXNzRnJvbVB1YmxpY0tleQAAAAEFAAAAI3ByZXNhbGVfdGltZXN0YW1wX2NvbnRyb2xsZXJfcHVia2V5AAAAAA5leHBpcmVkdHNlcnJvcgIAAAA4U3RhcnQgVGltZXN0YW1wIGNhbid0IGJlIGxlc3MgdGhhbiBsYXN0IGJsb2NrIFRpbWVzdGFtcC4AAAAAB3RzZXJyb3ICAAAAPEVuZCBUaW1lc3RhbXAgY2FuJ3QgYmUgbGVzcyB0aGFuIG9yIGVxdWFsIHRvIFN0YXJ0IFRpbWVzdGFtcAAAAAAKcHJpY2VlcnJvcgIAAAAmVG9rZW4gUHJpY2UgY2FuJ3QgYmUgbGVzcyB0aGFuIG9yIFplcm8AAAAACGNhcGVycm9yAgAAADN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AAAAEFAAAAE0VudGVyX1ByZXNhbGVfUm91bmQCAAAAAV8FAAAACmN1cnJlbnRLZXkAAAAAAAAAAAAJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgIAAAAHbWVzc2FnZQUAAAAPcmVmdW5kX2luaXRfbXNnBQAAAANuaWwDAwkAAGcAAAACAAAAAAAAAAAABQAAABZwZW5kaW5nX3NvZnRjYXBfc3RhdHVzCQAAZgAAAAIFAAAAFnBlbmRpbmdfaGFyZGNhcF9zdGF0dXMAAAAAAAAAAAAHCQAAAgAAAAECAAAAVVNvZnRDYXAgQWxyZWFkeSBSZWFjaGVkIGZvciB0aGlzIFJvdW5kLiBQbGVhc2UgQ2xpY2sgb24gQ2xhaW0gdG8gUmVjZWl2ZSBZb3VyIFRva2Vucy4DAwkAAGcAAAACAAAAAAAAAAAABQAAABZwZW5kaW5nX3NvZnRjYXBfc3RhdHVzCQAAZwAAAAIAAAAAAAAAAAAFAAAAFnBlbmRpbmdfaGFyZGNhcF9zdGF0dXMHCQAAAgAAAAECAAAAXlNvZnRDYXAgYW5kIEhhcmQgQWxyZWFkeSBSZWFjaGVkIGZvciB0aGlzIFJvdW5kLiBQbGVhc2UgQ2xpY2sgb24gQ2xhaW0gdG8gUmVjZWl2ZSBZb3VyIFRva2Vucy4JAAACAAAAAQIAAAASV3JvbmcgRW50cnkgRm91bmQuAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXnskupz", "height": 2704291, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GKfLFVDhVSuAa8bw2jwUviJ7exK4uDRZKx6JaBJjikg4 Next: 2NZJ5a8aN69ict6SsC24YpLUn5VXkghw5EQxosjDdxju Diff:
OldNewDifferences
55
66 let b = addressFromPublicKey(a)
77
8-let c = "End Timestamp can't be less than or equal to Start Timestamp"
8+let c = "Start Timestamp can't be less than last block Timestamp."
99
10-let d = "Token Price can't be less than or Zero"
10+let d = "End Timestamp can't be less than or equal to Start Timestamp"
1111
12-let e = "Soft Cap Amount can't be more than Hard Cap Amount."
12+let e = "Token Price can't be less than or Zero"
1313
14-let f = "<h1>Order Submitted Successfully!</h1><br>"
14+let f = "Soft Cap Amount can't be more than Hard Cap Amount."
1515
16-let g = "<h1>PreSale Parameters Submitted Successfully!</h1><br>"
16+let g = "<h1>Order Submitted Successfully!</h1><br>"
1717
18-let h = "<h1>Refund Received Successfully!.</h1><br>"
18+let h = "<h1>PreSale Parameters Submitted Successfully!</h1><br>"
1919
2020 let i = "DApp Need WAVES Token as Attach payment[1]."
2121
3131
3232 let o = "Softcap or Hard Cap already Reached or probably PreSale was Set with False to Refund, so no Refund allowed for this Round."
3333
34-@Callable(p)
35-func SetPreSaleParameters (q,r,s,t,u,v) = {
36- let w = q
34+let p = "<h1>Refund Received Successfully!.</h1><br>"
35+
36+@Callable(q)
37+func SetPreSaleParameters (r,s,t,u,v,w) = {
3738 let x = r
38- let y = {
39- let z = getInteger(this, "Current_Funding_Round")
40- if ($isInstanceOf(z, "Int"))
39+ let y = s
40+ let z = {
41+ let A = getInteger(this, "Current_Funding_Round")
42+ if ($isInstanceOf(A, "Int"))
4143 then {
42- let A = z
43- A
44+ let B = A
45+ B
4446 }
4547 else 0
4648 }
47- let B = (y + 1)
48- if ((p.caller != b))
49+ let C = (z + 1)
50+ if ((q.caller != b))
4951 then throw((("This Address is not Authorized. Only " + toString(b)) + " is Authorized Address to Sign it."))
50- else if ((size(toString(q)) != 13))
51- then throw("Start Timestamp is Wrong. Please Enter a Valid Timestamp. Probably you entered an Timestamp less than 13 Chars.")
52+ else if ((r > lastBlock.timestamp))
53+ then throw(c)
5254 else if ((size(toString(r)) != 13))
53- then throw("End Timestamp is Wrong. Please Enter a Valid Timestamp. Probably you entered an Timestamp less than 13 Chars.")
54- else if ((1 > s))
55- then throw(d)
56- else if ((w >= x))
57- then throw(c)
58- else if ((t > u))
59- then throw(e)
60- else [IntegerEntry("Current_Funding_Round", B), IntegerEntry((toString(B) + "_Presale_Start_TimeStamp"), w), IntegerEntry((toString(B) + "_Presale_End_TimeStamp"), x), IntegerEntry((toString(B) + "_Token_Price"), s), IntegerEntry((toString(B) + "_Soft_Cap_Amount"), t), IntegerEntry((toString(B) + "_Hard_Cap_Amount"), u), IntegerEntry((toString(B) + "_Initiated_Height"), height), BooleanEntry((toString(B) + "_Allow_Refund"), v), StringEntry("message", g)]
55+ then throw("Start Timestamp is Wrong. Please Enter a Valid Timestamp. Probably you entered an Timestamp less than 13 Chars.")
56+ else if ((size(toString(s)) != 13))
57+ then throw("End Timestamp is Wrong. Please Enter a Valid Timestamp. Probably you entered an Timestamp less than 13 Chars.")
58+ else if ((1 > t))
59+ then throw(e)
60+ else if ((x >= y))
61+ then throw(d)
62+ else if ((u > v))
63+ then throw(f)
64+ else [IntegerEntry("Current_Funding_Round", C), IntegerEntry((toString(C) + "_Presale_Start_TimeStamp"), x), IntegerEntry((toString(C) + "_Presale_End_TimeStamp"), y), IntegerEntry((toString(C) + "_Token_Price"), t), IntegerEntry((toString(C) + "_Soft_Cap_Amount"), u), IntegerEntry((toString(C) + "_Hard_Cap_Amount"), v), IntegerEntry((toString(C) + "_Initiated_Height"), height), BooleanEntry((toString(C) + "_Allow_Refund"), w), StringEntry("message", h)]
6165 }
6266
6367
6468
65-@Callable(p)
66-func PlacePresaleOrder (C) = {
67- let D = valueOrErrorMessage(getInteger(this, (toString(C) + "_Token_Price")), "Token Price not Found for this Presale Round.")
68- let E = valueOrErrorMessage(getInteger(this, (toString(C) + "_Presale_Start_TimeStamp")), "Start Timestamp not Found for this Presale Round.")
69- let F = valueOrErrorMessage(getInteger(this, (toString(C) + "_Presale_End_TimeStamp")), "End Timestamp not Found for this Presale Round.")
70- let G = valueOrErrorMessage(getInteger(this, (toString(C) + "_Soft_Cap_Amount")), "Soft Cap Amount not Found for this Presale Round.")
71- let H = valueOrErrorMessage(getInteger(this, (toString(C) + "_Hard_Cap_Amount")), "Hard Cap Amount not Found for this Presale Round.")
72- let I = valueOrErrorMessage(getBoolean(this, (toString(C) + "_Allow_Refund")), "Refund is not set for this Presale Round.")
73- let J = unit
74- let K = toBase58String(p.caller.bytes)
75- let L = if ((size(p.payments) == 1))
76- then p.payments[0]
69+@Callable(q)
70+func PlacePresaleOrder (D) = {
71+ let E = valueOrErrorMessage(getInteger(this, (toString(D) + "_Token_Price")), "Token Price not Found for this Presale Round.")
72+ let F = valueOrErrorMessage(getInteger(this, (toString(D) + "_Presale_Start_TimeStamp")), "Start Timestamp not Found for this Presale Round.")
73+ let G = valueOrErrorMessage(getInteger(this, (toString(D) + "_Presale_End_TimeStamp")), "End Timestamp not Found for this Presale Round.")
74+ let H = valueOrErrorMessage(getInteger(this, (toString(D) + "_Soft_Cap_Amount")), "Soft Cap Amount not Found for this Presale Round.")
75+ let I = valueOrErrorMessage(getInteger(this, (toString(D) + "_Hard_Cap_Amount")), "Hard Cap Amount not Found for this Presale Round.")
76+ let J = valueOrErrorMessage(getBoolean(this, (toString(D) + "_Allow_Refund")), "Refund is not set for this Presale Round.")
77+ let K = unit
78+ let L = toBase58String(q.caller.bytes)
79+ let M = if ((size(q.payments) == 1))
80+ then q.payments[0]
7781 else throw(i)
78- let M = {
79- let z = getInteger(this, (toString(C) + "_Funds_Collection"))
80- if ($isInstanceOf(z, "Int"))
82+ let N = {
83+ let A = getInteger(this, (toString(D) + "_Funds_Collection"))
84+ if ($isInstanceOf(A, "Int"))
8185 then {
82- let A = z
83- A
86+ let B = A
87+ B
8488 }
8589 else 0
8690 }
87- let N = (M + L.amount)
88- let O = {
89- let z = getInteger(this, (toString(C) + "_total_txns"))
90- if ($isInstanceOf(z, "Int"))
91+ let O = (N + M.amount)
92+ let P = {
93+ let A = getInteger(this, (toString(D) + "_total_txns"))
94+ if ($isInstanceOf(A, "Int"))
9195 then {
92- let A = z
93- A
96+ let B = A
97+ B
9498 }
9599 else 0
96100 }
97- let P = (O + 1)
98- let Q = {
99- let z = getInteger(this, ((toString(C) + "_") + K))
100- if ($isInstanceOf(z, "Int"))
101+ let Q = (P + 1)
102+ let R = {
103+ let A = getInteger(this, ((toString(D) + "_") + L))
104+ if ($isInstanceOf(A, "Int"))
101105 then {
102- let A = z
103- A
106+ let B = A
107+ B
104108 }
105109 else 0
106110 }
107- let R = (Q + L.amount)
108- let S = (G - N)
109- let T = (H - N)
110- if (isDefined(L.assetId))
111+ let S = (R + M.amount)
112+ let T = (H - O)
113+ let U = (I - O)
114+ if (isDefined(M.assetId))
111115 then throw(i)
112- else if ((D > L.amount))
113- then throw((((j + "[") + toString(D)) + "/10^8.]"))
114- else if ((E > lastBlock.timestamp))
115- then throw((k + toString(E)))
116- else if ((lastBlock.timestamp > F))
116+ else if ((E > M.amount))
117+ then throw((((j + "[") + toString(E)) + "/10^8.]"))
118+ else if ((F > lastBlock.timestamp))
119+ then throw((k + toString(F)))
120+ else if ((lastBlock.timestamp > G))
117121 then throw(m)
118- else if (if ((S > 0))
119- then (T > 0)
122+ else if (if ((T > 0))
123+ then (U > 0)
120124 else false)
121- then [IntegerEntry((toString(C) + "_Funds_Collection"), N), IntegerEntry(((toString(C) + "_") + K), R), IntegerEntry((toString(C) + "_total_txns"), P), IntegerEntry((toString(C) + "_pending_softcap_status"), S), IntegerEntry((toString(C) + "_pending_hardcap_status"), T), StringEntry((toString(C) + "_softcap_status"), "No"), StringEntry((toString(C) + "_hardcap_status"), "No"), BooleanEntry((toString(C) + "_Allow_Refund"), I), StringEntry("message", f)]
122- else if (if ((0 >= S))
123- then (T > 0)
125+ then [IntegerEntry((toString(D) + "_Funds_Collection"), O), IntegerEntry(((toString(D) + "_") + L), S), IntegerEntry((toString(D) + "_total_txns"), Q), IntegerEntry((toString(D) + "_pending_softcap_status"), T), IntegerEntry((toString(D) + "_pending_hardcap_status"), U), StringEntry((toString(D) + "_softcap_status"), "No"), StringEntry((toString(D) + "_hardcap_status"), "No"), BooleanEntry((toString(D) + "_Allow_Refund"), J), StringEntry("message", g)]
126+ else if (if ((0 >= T))
127+ then (U > 0)
124128 else false)
125- then [IntegerEntry((toString(C) + "_Funds_Collection"), N), IntegerEntry(((toString(C) + "_") + K), R), IntegerEntry((toString(C) + "_total_txns"), P), IntegerEntry((toString(C) + "_pending_softcap_status"), S), IntegerEntry((toString(C) + "_pending_hardcap_status"), T), StringEntry((toString(C) + "_softcap_status"), "Yes"), StringEntry((toString(C) + "_hardcap_status"), "No"), BooleanEntry((toString(C) + "_Allow_Refund"), false), StringEntry("message", f)]
126- else if (if ((0 >= S))
127- then (0 >= T)
129+ then [IntegerEntry((toString(D) + "_Funds_Collection"), O), IntegerEntry(((toString(D) + "_") + L), S), IntegerEntry((toString(D) + "_total_txns"), Q), IntegerEntry((toString(D) + "_pending_softcap_status"), T), IntegerEntry((toString(D) + "_pending_hardcap_status"), U), StringEntry((toString(D) + "_softcap_status"), "Yes"), StringEntry((toString(D) + "_hardcap_status"), "No"), BooleanEntry((toString(D) + "_Allow_Refund"), false), StringEntry("message", g)]
130+ else if (if ((0 >= T))
131+ then (0 >= U)
128132 else false)
129- then [IntegerEntry((toString(C) + "_Funds_Collection"), N), IntegerEntry(((toString(C) + "_") + K), R), IntegerEntry((toString(C) + "_total_txns"), P), IntegerEntry((toString(C) + "_pending_softcap_status"), S), IntegerEntry((toString(C) + "_pending_hardcap_status"), T), StringEntry((toString(C) + "_softcap_status"), "Yes"), StringEntry((toString(C) + "_hardcap_status"), "Yes"), BooleanEntry((toString(C) + "_Allow_Refund"), false), StringEntry("message", f)]
133+ then [IntegerEntry((toString(D) + "_Funds_Collection"), O), IntegerEntry(((toString(D) + "_") + L), S), IntegerEntry((toString(D) + "_total_txns"), Q), IntegerEntry((toString(D) + "_pending_softcap_status"), T), IntegerEntry((toString(D) + "_pending_hardcap_status"), U), StringEntry((toString(D) + "_softcap_status"), "Yes"), StringEntry((toString(D) + "_hardcap_status"), "Yes"), BooleanEntry((toString(D) + "_Allow_Refund"), false), StringEntry("message", g)]
130134 else throw("Error.")
131135 }
132136
133137
134138
135-@Callable(p)
136-func Refund (C) = {
137- let J = unit
138- let K = toBase58String(p.caller.bytes)
139- let U = valueOrErrorMessage(getInteger(this, (toString(C) + "_Initiated_Height")), "Initiated Height not Found for this Presale Round.")
140- let D = valueOrErrorMessage(getInteger(this, (toString(C) + "_Token_Price")), "Token Price not Found for this Presale Round.")
141- let E = valueOrErrorMessage(getInteger(this, (toString(C) + "_Presale_Start_TimeStamp")), "Start Timestamp not Found for this Presale Round.")
142- let F = valueOrErrorMessage(getInteger(this, (toString(C) + "_Presale_End_TimeStamp")), "End Timestamp not Found for this Presale Round.")
143- let G = valueOrErrorMessage(getInteger(this, (toString(C) + "_Soft_Cap_Amount")), "Soft Cap Amount not Found for this Presale Round.")
144- let H = valueOrErrorMessage(getInteger(this, (toString(C) + "_Hard_Cap_Amount")), "Hard Cap Amount not Found for this Presale Round.")
145- let V = valueOrErrorMessage(getInteger(this, (toString(C) + "_Funds_Collection")), "Total Funds Collection not Found for this Presale Round.")
146- let Q = valueOrErrorMessage(getInteger(this, ((toString(C) + "_") + K)), "No Deposit was made by this Address for this Presale Round.")
147- let I = valueOrErrorMessage(getBoolean(this, (toString(C) + "_Allow_Refund")), "Allow_Refund has no Boolen Entry for this Presale Round.")
148- let S = (G - V)
149- let T = (H - V)
150- let W = 1000
151- let X = (60 * W)
152- let Y = (F - E)
153- let Z = 10
154- let aa = ((U + fraction(Y, 1, X)) + Z)
155- let ab = (V - Q)
156- if ((aa > lastBlock.height))
157- then throw((((n + " Please Wait Until ~") + toString(aa)) + " Height is reached."))
158- else if ((I == false))
139+@Callable(q)
140+func Refund (D) = {
141+ let K = unit
142+ let L = toBase58String(q.caller.bytes)
143+ let V = valueOrErrorMessage(getInteger(this, (toString(D) + "_Initiated_Height")), "Initiated Height not Found for this Presale Round.")
144+ let E = valueOrErrorMessage(getInteger(this, (toString(D) + "_Token_Price")), "Token Price not Found for this Presale Round.")
145+ let F = valueOrErrorMessage(getInteger(this, (toString(D) + "_Presale_Start_TimeStamp")), "Start Timestamp not Found for this Presale Round.")
146+ let G = valueOrErrorMessage(getInteger(this, (toString(D) + "_Presale_End_TimeStamp")), "End Timestamp not Found for this Presale Round.")
147+ let H = valueOrErrorMessage(getInteger(this, (toString(D) + "_Soft_Cap_Amount")), "Soft Cap Amount not Found for this Presale Round.")
148+ let I = valueOrErrorMessage(getInteger(this, (toString(D) + "_Hard_Cap_Amount")), "Hard Cap Amount not Found for this Presale Round.")
149+ let W = valueOrErrorMessage(getInteger(this, (toString(D) + "_Funds_Collection")), "Total Funds Collection not Found for this Presale Round.")
150+ let R = valueOrErrorMessage(getInteger(this, ((toString(D) + "_") + L)), "No Deposit was made by this Address for this Presale Round.")
151+ let J = valueOrErrorMessage(getBoolean(this, (toString(D) + "_Allow_Refund")), "Allow_Refund has no Boolen Entry for this Presale Round.")
152+ let T = (H - W)
153+ let U = (I - W)
154+ let X = 1000
155+ let Y = (60 * X)
156+ let Z = (G - F)
157+ let aa = 10
158+ let ab = ((V + fraction(Z, 1, Y)) + aa)
159+ let ac = (W - R)
160+ if ((ab > lastBlock.height))
161+ then throw((((n + " Please Wait Until ~") + toString(ab)) + " Height is reached."))
162+ else if ((J == false))
159163 then throw(o)
160- else if ((Q == 0))
164+ else if ((R == 0))
161165 then throw("Refund has been Already Claimed by this Address.")
162- else if (if ((S > 0))
163- then (T > 0)
166+ else if (if ((T > 0))
167+ then (U > 0)
164168 else false)
165- then [ScriptTransfer(addressFromStringValue(K), Q, J), IntegerEntry(((toString(C) + "_") + "Pending_Refund"), ab), IntegerEntry(((toString(C) + "_") + K), 0), StringEntry("message", h)]
166- else if (if ((0 >= S))
167- then (T > 0)
169+ then [ScriptTransfer(addressFromStringValue(L), R, K), IntegerEntry(((toString(D) + "_") + "Pending_Refund"), ac), IntegerEntry(((toString(D) + "_") + L), 0), StringEntry("message", p)]
170+ else if (if ((0 >= T))
171+ then (U > 0)
168172 else false)
169173 then throw("SoftCap Already Reached for this Round. Please Click on Claim to Receive Your Tokens.")
170- else if (if ((0 >= S))
171- then (0 >= T)
174+ else if (if ((0 >= T))
175+ then (0 >= U)
172176 else false)
173177 then throw("SoftCap and Hard Already Reached for this Round. Please Click on Claim to Receive Your Tokens.")
174178 else throw("Wrong Entry Found.")
175179 }
176180
177181
178-@Verifier(ac)
179-func ad () = sigVerify(ac.bodyBytes, ac.proofs[0], ac.senderPublicKey)
182+@Verifier(ad)
183+func ae () = sigVerify(ad.bodyBytes, ad.proofs[0], ad.senderPublicKey)
180184
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = base58'GKmJ6BchUgQfwKp4mp5eX8Y9xLioYRm6e1gDfFgdAcCr'
55
66 let b = addressFromPublicKey(a)
77
8-let c = "End Timestamp can't be less than or equal to Start Timestamp"
8+let c = "Start Timestamp can't be less than last block Timestamp."
99
10-let d = "Token Price can't be less than or Zero"
10+let d = "End Timestamp can't be less than or equal to Start Timestamp"
1111
12-let e = "Soft Cap Amount can't be more than Hard Cap Amount."
12+let e = "Token Price can't be less than or Zero"
1313
14-let f = "<h1>Order Submitted Successfully!</h1><br>"
14+let f = "Soft Cap Amount can't be more than Hard Cap Amount."
1515
16-let g = "<h1>PreSale Parameters Submitted Successfully!</h1><br>"
16+let g = "<h1>Order Submitted Successfully!</h1><br>"
1717
18-let h = "<h1>Refund Received Successfully!.</h1><br>"
18+let h = "<h1>PreSale Parameters Submitted Successfully!</h1><br>"
1919
2020 let i = "DApp Need WAVES Token as Attach payment[1]."
2121
2222 let j = "Attached payment[1] is less than token price "
2323
2424 let k = "Dapp will start Pre-Sale at Timestamp "
2525
2626 let l = "Minimum 0.1 WAVES required on Your Address, Please hold min. 0.1 WAVES on your Address to place order."
2727
2828 let m = "Pre-Sale is over for this Round."
2929
3030 let n = "Pre-Sale is not over for this Round."
3131
3232 let o = "Softcap or Hard Cap already Reached or probably PreSale was Set with False to Refund, so no Refund allowed for this Round."
3333
34-@Callable(p)
35-func SetPreSaleParameters (q,r,s,t,u,v) = {
36- let w = q
34+let p = "<h1>Refund Received Successfully!.</h1><br>"
35+
36+@Callable(q)
37+func SetPreSaleParameters (r,s,t,u,v,w) = {
3738 let x = r
38- let y = {
39- let z = getInteger(this, "Current_Funding_Round")
40- if ($isInstanceOf(z, "Int"))
39+ let y = s
40+ let z = {
41+ let A = getInteger(this, "Current_Funding_Round")
42+ if ($isInstanceOf(A, "Int"))
4143 then {
42- let A = z
43- A
44+ let B = A
45+ B
4446 }
4547 else 0
4648 }
47- let B = (y + 1)
48- if ((p.caller != b))
49+ let C = (z + 1)
50+ if ((q.caller != b))
4951 then throw((("This Address is not Authorized. Only " + toString(b)) + " is Authorized Address to Sign it."))
50- else if ((size(toString(q)) != 13))
51- then throw("Start Timestamp is Wrong. Please Enter a Valid Timestamp. Probably you entered an Timestamp less than 13 Chars.")
52+ else if ((r > lastBlock.timestamp))
53+ then throw(c)
5254 else if ((size(toString(r)) != 13))
53- then throw("End Timestamp is Wrong. Please Enter a Valid Timestamp. Probably you entered an Timestamp less than 13 Chars.")
54- else if ((1 > s))
55- then throw(d)
56- else if ((w >= x))
57- then throw(c)
58- else if ((t > u))
59- then throw(e)
60- else [IntegerEntry("Current_Funding_Round", B), IntegerEntry((toString(B) + "_Presale_Start_TimeStamp"), w), IntegerEntry((toString(B) + "_Presale_End_TimeStamp"), x), IntegerEntry((toString(B) + "_Token_Price"), s), IntegerEntry((toString(B) + "_Soft_Cap_Amount"), t), IntegerEntry((toString(B) + "_Hard_Cap_Amount"), u), IntegerEntry((toString(B) + "_Initiated_Height"), height), BooleanEntry((toString(B) + "_Allow_Refund"), v), StringEntry("message", g)]
55+ then throw("Start Timestamp is Wrong. Please Enter a Valid Timestamp. Probably you entered an Timestamp less than 13 Chars.")
56+ else if ((size(toString(s)) != 13))
57+ then throw("End Timestamp is Wrong. Please Enter a Valid Timestamp. Probably you entered an Timestamp less than 13 Chars.")
58+ else if ((1 > t))
59+ then throw(e)
60+ else if ((x >= y))
61+ then throw(d)
62+ else if ((u > v))
63+ then throw(f)
64+ else [IntegerEntry("Current_Funding_Round", C), IntegerEntry((toString(C) + "_Presale_Start_TimeStamp"), x), IntegerEntry((toString(C) + "_Presale_End_TimeStamp"), y), IntegerEntry((toString(C) + "_Token_Price"), t), IntegerEntry((toString(C) + "_Soft_Cap_Amount"), u), IntegerEntry((toString(C) + "_Hard_Cap_Amount"), v), IntegerEntry((toString(C) + "_Initiated_Height"), height), BooleanEntry((toString(C) + "_Allow_Refund"), w), StringEntry("message", h)]
6165 }
6266
6367
6468
65-@Callable(p)
66-func PlacePresaleOrder (C) = {
67- let D = valueOrErrorMessage(getInteger(this, (toString(C) + "_Token_Price")), "Token Price not Found for this Presale Round.")
68- let E = valueOrErrorMessage(getInteger(this, (toString(C) + "_Presale_Start_TimeStamp")), "Start Timestamp not Found for this Presale Round.")
69- let F = valueOrErrorMessage(getInteger(this, (toString(C) + "_Presale_End_TimeStamp")), "End Timestamp not Found for this Presale Round.")
70- let G = valueOrErrorMessage(getInteger(this, (toString(C) + "_Soft_Cap_Amount")), "Soft Cap Amount not Found for this Presale Round.")
71- let H = valueOrErrorMessage(getInteger(this, (toString(C) + "_Hard_Cap_Amount")), "Hard Cap Amount not Found for this Presale Round.")
72- let I = valueOrErrorMessage(getBoolean(this, (toString(C) + "_Allow_Refund")), "Refund is not set for this Presale Round.")
73- let J = unit
74- let K = toBase58String(p.caller.bytes)
75- let L = if ((size(p.payments) == 1))
76- then p.payments[0]
69+@Callable(q)
70+func PlacePresaleOrder (D) = {
71+ let E = valueOrErrorMessage(getInteger(this, (toString(D) + "_Token_Price")), "Token Price not Found for this Presale Round.")
72+ let F = valueOrErrorMessage(getInteger(this, (toString(D) + "_Presale_Start_TimeStamp")), "Start Timestamp not Found for this Presale Round.")
73+ let G = valueOrErrorMessage(getInteger(this, (toString(D) + "_Presale_End_TimeStamp")), "End Timestamp not Found for this Presale Round.")
74+ let H = valueOrErrorMessage(getInteger(this, (toString(D) + "_Soft_Cap_Amount")), "Soft Cap Amount not Found for this Presale Round.")
75+ let I = valueOrErrorMessage(getInteger(this, (toString(D) + "_Hard_Cap_Amount")), "Hard Cap Amount not Found for this Presale Round.")
76+ let J = valueOrErrorMessage(getBoolean(this, (toString(D) + "_Allow_Refund")), "Refund is not set for this Presale Round.")
77+ let K = unit
78+ let L = toBase58String(q.caller.bytes)
79+ let M = if ((size(q.payments) == 1))
80+ then q.payments[0]
7781 else throw(i)
78- let M = {
79- let z = getInteger(this, (toString(C) + "_Funds_Collection"))
80- if ($isInstanceOf(z, "Int"))
82+ let N = {
83+ let A = getInteger(this, (toString(D) + "_Funds_Collection"))
84+ if ($isInstanceOf(A, "Int"))
8185 then {
82- let A = z
83- A
86+ let B = A
87+ B
8488 }
8589 else 0
8690 }
87- let N = (M + L.amount)
88- let O = {
89- let z = getInteger(this, (toString(C) + "_total_txns"))
90- if ($isInstanceOf(z, "Int"))
91+ let O = (N + M.amount)
92+ let P = {
93+ let A = getInteger(this, (toString(D) + "_total_txns"))
94+ if ($isInstanceOf(A, "Int"))
9195 then {
92- let A = z
93- A
96+ let B = A
97+ B
9498 }
9599 else 0
96100 }
97- let P = (O + 1)
98- let Q = {
99- let z = getInteger(this, ((toString(C) + "_") + K))
100- if ($isInstanceOf(z, "Int"))
101+ let Q = (P + 1)
102+ let R = {
103+ let A = getInteger(this, ((toString(D) + "_") + L))
104+ if ($isInstanceOf(A, "Int"))
101105 then {
102- let A = z
103- A
106+ let B = A
107+ B
104108 }
105109 else 0
106110 }
107- let R = (Q + L.amount)
108- let S = (G - N)
109- let T = (H - N)
110- if (isDefined(L.assetId))
111+ let S = (R + M.amount)
112+ let T = (H - O)
113+ let U = (I - O)
114+ if (isDefined(M.assetId))
111115 then throw(i)
112- else if ((D > L.amount))
113- then throw((((j + "[") + toString(D)) + "/10^8.]"))
114- else if ((E > lastBlock.timestamp))
115- then throw((k + toString(E)))
116- else if ((lastBlock.timestamp > F))
116+ else if ((E > M.amount))
117+ then throw((((j + "[") + toString(E)) + "/10^8.]"))
118+ else if ((F > lastBlock.timestamp))
119+ then throw((k + toString(F)))
120+ else if ((lastBlock.timestamp > G))
117121 then throw(m)
118- else if (if ((S > 0))
119- then (T > 0)
122+ else if (if ((T > 0))
123+ then (U > 0)
120124 else false)
121- then [IntegerEntry((toString(C) + "_Funds_Collection"), N), IntegerEntry(((toString(C) + "_") + K), R), IntegerEntry((toString(C) + "_total_txns"), P), IntegerEntry((toString(C) + "_pending_softcap_status"), S), IntegerEntry((toString(C) + "_pending_hardcap_status"), T), StringEntry((toString(C) + "_softcap_status"), "No"), StringEntry((toString(C) + "_hardcap_status"), "No"), BooleanEntry((toString(C) + "_Allow_Refund"), I), StringEntry("message", f)]
122- else if (if ((0 >= S))
123- then (T > 0)
125+ then [IntegerEntry((toString(D) + "_Funds_Collection"), O), IntegerEntry(((toString(D) + "_") + L), S), IntegerEntry((toString(D) + "_total_txns"), Q), IntegerEntry((toString(D) + "_pending_softcap_status"), T), IntegerEntry((toString(D) + "_pending_hardcap_status"), U), StringEntry((toString(D) + "_softcap_status"), "No"), StringEntry((toString(D) + "_hardcap_status"), "No"), BooleanEntry((toString(D) + "_Allow_Refund"), J), StringEntry("message", g)]
126+ else if (if ((0 >= T))
127+ then (U > 0)
124128 else false)
125- then [IntegerEntry((toString(C) + "_Funds_Collection"), N), IntegerEntry(((toString(C) + "_") + K), R), IntegerEntry((toString(C) + "_total_txns"), P), IntegerEntry((toString(C) + "_pending_softcap_status"), S), IntegerEntry((toString(C) + "_pending_hardcap_status"), T), StringEntry((toString(C) + "_softcap_status"), "Yes"), StringEntry((toString(C) + "_hardcap_status"), "No"), BooleanEntry((toString(C) + "_Allow_Refund"), false), StringEntry("message", f)]
126- else if (if ((0 >= S))
127- then (0 >= T)
129+ then [IntegerEntry((toString(D) + "_Funds_Collection"), O), IntegerEntry(((toString(D) + "_") + L), S), IntegerEntry((toString(D) + "_total_txns"), Q), IntegerEntry((toString(D) + "_pending_softcap_status"), T), IntegerEntry((toString(D) + "_pending_hardcap_status"), U), StringEntry((toString(D) + "_softcap_status"), "Yes"), StringEntry((toString(D) + "_hardcap_status"), "No"), BooleanEntry((toString(D) + "_Allow_Refund"), false), StringEntry("message", g)]
130+ else if (if ((0 >= T))
131+ then (0 >= U)
128132 else false)
129- then [IntegerEntry((toString(C) + "_Funds_Collection"), N), IntegerEntry(((toString(C) + "_") + K), R), IntegerEntry((toString(C) + "_total_txns"), P), IntegerEntry((toString(C) + "_pending_softcap_status"), S), IntegerEntry((toString(C) + "_pending_hardcap_status"), T), StringEntry((toString(C) + "_softcap_status"), "Yes"), StringEntry((toString(C) + "_hardcap_status"), "Yes"), BooleanEntry((toString(C) + "_Allow_Refund"), false), StringEntry("message", f)]
133+ then [IntegerEntry((toString(D) + "_Funds_Collection"), O), IntegerEntry(((toString(D) + "_") + L), S), IntegerEntry((toString(D) + "_total_txns"), Q), IntegerEntry((toString(D) + "_pending_softcap_status"), T), IntegerEntry((toString(D) + "_pending_hardcap_status"), U), StringEntry((toString(D) + "_softcap_status"), "Yes"), StringEntry((toString(D) + "_hardcap_status"), "Yes"), BooleanEntry((toString(D) + "_Allow_Refund"), false), StringEntry("message", g)]
130134 else throw("Error.")
131135 }
132136
133137
134138
135-@Callable(p)
136-func Refund (C) = {
137- let J = unit
138- let K = toBase58String(p.caller.bytes)
139- let U = valueOrErrorMessage(getInteger(this, (toString(C) + "_Initiated_Height")), "Initiated Height not Found for this Presale Round.")
140- let D = valueOrErrorMessage(getInteger(this, (toString(C) + "_Token_Price")), "Token Price not Found for this Presale Round.")
141- let E = valueOrErrorMessage(getInteger(this, (toString(C) + "_Presale_Start_TimeStamp")), "Start Timestamp not Found for this Presale Round.")
142- let F = valueOrErrorMessage(getInteger(this, (toString(C) + "_Presale_End_TimeStamp")), "End Timestamp not Found for this Presale Round.")
143- let G = valueOrErrorMessage(getInteger(this, (toString(C) + "_Soft_Cap_Amount")), "Soft Cap Amount not Found for this Presale Round.")
144- let H = valueOrErrorMessage(getInteger(this, (toString(C) + "_Hard_Cap_Amount")), "Hard Cap Amount not Found for this Presale Round.")
145- let V = valueOrErrorMessage(getInteger(this, (toString(C) + "_Funds_Collection")), "Total Funds Collection not Found for this Presale Round.")
146- let Q = valueOrErrorMessage(getInteger(this, ((toString(C) + "_") + K)), "No Deposit was made by this Address for this Presale Round.")
147- let I = valueOrErrorMessage(getBoolean(this, (toString(C) + "_Allow_Refund")), "Allow_Refund has no Boolen Entry for this Presale Round.")
148- let S = (G - V)
149- let T = (H - V)
150- let W = 1000
151- let X = (60 * W)
152- let Y = (F - E)
153- let Z = 10
154- let aa = ((U + fraction(Y, 1, X)) + Z)
155- let ab = (V - Q)
156- if ((aa > lastBlock.height))
157- then throw((((n + " Please Wait Until ~") + toString(aa)) + " Height is reached."))
158- else if ((I == false))
139+@Callable(q)
140+func Refund (D) = {
141+ let K = unit
142+ let L = toBase58String(q.caller.bytes)
143+ let V = valueOrErrorMessage(getInteger(this, (toString(D) + "_Initiated_Height")), "Initiated Height not Found for this Presale Round.")
144+ let E = valueOrErrorMessage(getInteger(this, (toString(D) + "_Token_Price")), "Token Price not Found for this Presale Round.")
145+ let F = valueOrErrorMessage(getInteger(this, (toString(D) + "_Presale_Start_TimeStamp")), "Start Timestamp not Found for this Presale Round.")
146+ let G = valueOrErrorMessage(getInteger(this, (toString(D) + "_Presale_End_TimeStamp")), "End Timestamp not Found for this Presale Round.")
147+ let H = valueOrErrorMessage(getInteger(this, (toString(D) + "_Soft_Cap_Amount")), "Soft Cap Amount not Found for this Presale Round.")
148+ let I = valueOrErrorMessage(getInteger(this, (toString(D) + "_Hard_Cap_Amount")), "Hard Cap Amount not Found for this Presale Round.")
149+ let W = valueOrErrorMessage(getInteger(this, (toString(D) + "_Funds_Collection")), "Total Funds Collection not Found for this Presale Round.")
150+ let R = valueOrErrorMessage(getInteger(this, ((toString(D) + "_") + L)), "No Deposit was made by this Address for this Presale Round.")
151+ let J = valueOrErrorMessage(getBoolean(this, (toString(D) + "_Allow_Refund")), "Allow_Refund has no Boolen Entry for this Presale Round.")
152+ let T = (H - W)
153+ let U = (I - W)
154+ let X = 1000
155+ let Y = (60 * X)
156+ let Z = (G - F)
157+ let aa = 10
158+ let ab = ((V + fraction(Z, 1, Y)) + aa)
159+ let ac = (W - R)
160+ if ((ab > lastBlock.height))
161+ then throw((((n + " Please Wait Until ~") + toString(ab)) + " Height is reached."))
162+ else if ((J == false))
159163 then throw(o)
160- else if ((Q == 0))
164+ else if ((R == 0))
161165 then throw("Refund has been Already Claimed by this Address.")
162- else if (if ((S > 0))
163- then (T > 0)
166+ else if (if ((T > 0))
167+ then (U > 0)
164168 else false)
165- then [ScriptTransfer(addressFromStringValue(K), Q, J), IntegerEntry(((toString(C) + "_") + "Pending_Refund"), ab), IntegerEntry(((toString(C) + "_") + K), 0), StringEntry("message", h)]
166- else if (if ((0 >= S))
167- then (T > 0)
169+ then [ScriptTransfer(addressFromStringValue(L), R, K), IntegerEntry(((toString(D) + "_") + "Pending_Refund"), ac), IntegerEntry(((toString(D) + "_") + L), 0), StringEntry("message", p)]
170+ else if (if ((0 >= T))
171+ then (U > 0)
168172 else false)
169173 then throw("SoftCap Already Reached for this Round. Please Click on Claim to Receive Your Tokens.")
170- else if (if ((0 >= S))
171- then (0 >= T)
174+ else if (if ((0 >= T))
175+ then (0 >= U)
172176 else false)
173177 then throw("SoftCap and Hard Already Reached for this Round. Please Click on Claim to Receive Your Tokens.")
174178 else throw("Wrong Entry Found.")
175179 }
176180
177181
178-@Verifier(ac)
179-func ad () = sigVerify(ac.bodyBytes, ac.proofs[0], ac.senderPublicKey)
182+@Verifier(ad)
183+func ae () = sigVerify(ad.bodyBytes, ad.proofs[0], ad.senderPublicKey)
180184

github/deemru/w8io/169f3d6 
92.72 ms