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:AAIFAAAAAAAAABYIAhIICgYBAQEBAQQSAwoBARIDCgEBAAAADwAAAAAjcHJlc2FsZV90aW1lc3RhbXBfY29udHJvbGxlcl9wdWJrZXkBAAAAIOOt17LUijbWojwDE5tgFkw1Y8cwIr3jselcewpp7rwjAAAAABJjb250cm9sbGVyX2FkZHJlc3MJAQAAABRhZGRyZXNzRnJvbVB1YmxpY0tleQAAAAEFAAAAI3ByZXNhbGVfdGltZXN0YW1wX2NvbnRyb2xsZXJfcHVia2V5AAAAAAd0c2Vycm9yAgAAADxFbmQgVGltZXN0YW1wIGNhbid0IGJlIGxlc3MgdGhhbiBvciBlcXVhbCB0byBTdGFydCBUaW1lc3RhbXAAAAAACnByaWNlZXJyb3ICAAAAJlRva2VuIFByaWNlIGNhbid0IGJlIGxlc3MgdGhhbiBvciBaZXJvAAAAAAhjYXBlcnJvcgIAAAAzU29mdCBDYXAgQW1vdW50IGNhbid0IGJlIG1vcmUgdGhhbiBIYXJkIENhcCBBbW91bnQuAAAAAAhvcmRlcm1zZwIAAAAqPGgxPk9yZGVyIFN1Ym1pdHRlZCBTdWNjZXNzZ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GFyZCBBbHJlYWR5IFJlYWNoZWQgZm9yIHRoaXMgUm91bmQuIFBsZWFzZSBDbGljayBvbiBDbGFpbSB0byBSZWNlaXZlIFlvdXIgVG9rZW5zLgkAAAIAAAABAgAAABFXcm9uZyBFdHJ5IEZvdW5kLgAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5oWV9DQ==", "height": 2704030, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9yRGktn9YvxTe56Pw1EtAxoRueg1FPKiCbqguNuwuBh9 Next: D8zMTsJX6ZyWM9q7hPUXYQ6un31czypbDTTDxXxv8w14 Diff:
Old | New | Differences | |
---|---|---|---|
15 | 15 | ||
16 | 16 | let g = "<h1>PreSale Parameters Submitted Successfully!</h1><br>" | |
17 | 17 | ||
18 | - | let h = " | |
18 | + | let h = "<h1>Refund Received Successfully!.</h1><br>" | |
19 | 19 | ||
20 | - | let i = " | |
20 | + | let i = "DApp Need WAVES Token as Attach payment[1]." | |
21 | 21 | ||
22 | - | let j = " | |
22 | + | let j = "Attached payment[1] is less than token price " | |
23 | 23 | ||
24 | - | let k = " | |
24 | + | let k = "Dapp will start Pre-Sale at Timestamp " | |
25 | 25 | ||
26 | - | let l = " | |
26 | + | let l = "Minimum 0.1 WAVES required on Your Address, Please hold min. 0.1 WAVES on your Address to place order." | |
27 | 27 | ||
28 | - | @Callable(m) | |
29 | - | func SetPreSaleParameters (n,o,p,q,r,s) = { | |
30 | - | let t = n | |
31 | - | let u = o | |
32 | - | let v = { | |
33 | - | let w = getInteger(this, "Current_Funding_Round") | |
34 | - | if ($isInstanceOf(w, "Int")) | |
28 | + | let m = "Pre-Sale is over for this Round." | |
29 | + | ||
30 | + | let n = "Pre-Sale is not over for this Round." | |
31 | + | ||
32 | + | let o = "PreSale was Set with False to Refund, so no Refund allowed for this Round." | |
33 | + | ||
34 | + | @Callable(p) | |
35 | + | func SetPreSaleParameters (q,r,s,t,u,v) = { | |
36 | + | let w = q | |
37 | + | let x = r | |
38 | + | let y = { | |
39 | + | let z = getInteger(this, "Current_Funding_Round") | |
40 | + | if ($isInstanceOf(z, "Int")) | |
35 | 41 | then { | |
36 | - | let | |
37 | - | | |
42 | + | let A = z | |
43 | + | A | |
38 | 44 | } | |
39 | 45 | else 0 | |
40 | 46 | } | |
41 | - | let | |
42 | - | if (( | |
47 | + | let B = (y + 1) | |
48 | + | if ((p.caller != b)) | |
43 | 49 | then throw((("This Address is not Authorized. Only " + toString(b)) + " is Authorized Address to Sign it.")) | |
44 | - | else if ((size(toString( | |
50 | + | else if ((size(toString(q)) != 13)) | |
45 | 51 | then throw("Start Timestamp is Wrong. Please Enter a Valid Timestamp. Probably you entered an Timestamp less than 13 Chars.") | |
46 | - | else if ((size(toString( | |
52 | + | else if ((size(toString(r)) != 13)) | |
47 | 53 | then throw("End Timestamp is Wrong. Please Enter a Valid Timestamp. Probably you entered an Timestamp less than 13 Chars.") | |
48 | - | else if ((1 > | |
54 | + | else if ((1 > s)) | |
49 | 55 | then throw(d) | |
50 | - | else if (( | |
56 | + | else if ((w >= x)) | |
51 | 57 | then throw(c) | |
52 | - | else if (( | |
58 | + | else if ((t > u)) | |
53 | 59 | then throw(e) | |
54 | - | else [IntegerEntry("Current_Funding_Round", | |
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 | 61 | } | |
56 | 62 | ||
57 | 63 | ||
58 | 64 | ||
59 | - | @Callable( | |
60 | - | func PlacePresaleOrder ( | |
61 | - | let | |
62 | - | let | |
63 | - | let | |
64 | - | let | |
65 | - | let | |
66 | - | let | |
67 | - | let | |
68 | - | let | |
69 | - | let | |
70 | - | then | |
71 | - | else throw( | |
72 | - | let | |
73 | - | let | |
74 | - | if ($isInstanceOf( | |
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] | |
77 | + | else throw(i) | |
78 | + | let M = { | |
79 | + | let z = getInteger(this, (toString(C) + "_Funds_Collection")) | |
80 | + | if ($isInstanceOf(z, "Int")) | |
75 | 81 | then { | |
76 | - | let | |
77 | - | | |
82 | + | let A = z | |
83 | + | A | |
78 | 84 | } | |
79 | 85 | else 0 | |
80 | 86 | } | |
81 | - | let | |
82 | - | let | |
83 | - | let | |
84 | - | if ($isInstanceOf( | |
87 | + | let N = (M + L.amount) | |
88 | + | let O = { | |
89 | + | let z = getInteger(this, (toString(C) + "_total_txns")) | |
90 | + | if ($isInstanceOf(z, "Int")) | |
85 | 91 | then { | |
86 | - | let | |
87 | - | | |
92 | + | let A = z | |
93 | + | A | |
88 | 94 | } | |
89 | 95 | else 0 | |
90 | 96 | } | |
91 | - | let | |
92 | - | let | |
93 | - | let | |
94 | - | if ($isInstanceOf( | |
97 | + | let P = (O + 1) | |
98 | + | let Q = { | |
99 | + | let z = getInteger(this, ((toString(C) + "_") + K)) | |
100 | + | if ($isInstanceOf(z, "Int")) | |
95 | 101 | then { | |
96 | - | let | |
97 | - | | |
102 | + | let A = z | |
103 | + | A | |
98 | 104 | } | |
99 | 105 | else 0 | |
100 | 106 | } | |
101 | - | let | |
102 | - | let | |
103 | - | let | |
104 | - | if (isDefined( | |
105 | - | then throw( | |
106 | - | else if (( | |
107 | - | then throw(((( | |
108 | - | else if (( | |
109 | - | then throw(( | |
110 | - | else if ((lastBlock.timestamp > | |
111 | - | then throw( | |
112 | - | else if (if (( | |
113 | - | then ( | |
107 | + | let R = (Q + L.amount) | |
108 | + | let S = (G - N) | |
109 | + | let T = (H - N) | |
110 | + | if (isDefined(L.assetId)) | |
111 | + | 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)) | |
117 | + | then throw(m) | |
118 | + | else if (if ((S > 0)) | |
119 | + | then (T > 0) | |
114 | 120 | else false) | |
115 | - | then [IntegerEntry((toString( | |
116 | - | else if (if ((0 >= | |
117 | - | then ( | |
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) | |
118 | 124 | else false) | |
119 | - | then [IntegerEntry((toString( | |
120 | - | else if (if ((0 >= | |
121 | - | then (0 >= | |
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) | |
122 | 128 | else false) | |
123 | - | then [IntegerEntry((toString( | |
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)] | |
124 | 130 | else throw("Error.") | |
125 | 131 | } | |
126 | 132 | ||
127 | 133 | ||
128 | - | @Verifier(R) | |
129 | - | func S () = sigVerify(R.bodyBytes, R.proofs[0], R.senderPublicKey) | |
134 | + | ||
135 | + | @Callable(p) | |
136 | + | func Refund (C) = { | |
137 | + | let K = toBase58String(p.caller.bytes) | |
138 | + | let D = valueOrErrorMessage(getInteger(this, (toString(C) + "_Token_Price")), "Token Price not Found for this Presale Round.") | |
139 | + | let E = valueOrErrorMessage(getInteger(this, (toString(C) + "_Presale_Start_TimeStamp")), "Start Timestamp not Found for this Presale Round.") | |
140 | + | let F = valueOrErrorMessage(getInteger(this, (toString(C) + "_Presale_End_TimeStamp")), "End Timestamp not Found for this Presale Round.") | |
141 | + | let G = valueOrErrorMessage(getInteger(this, (toString(C) + "_Soft_Cap_Amount")), "Soft Cap Amount not Found for this Presale Round.") | |
142 | + | let H = valueOrErrorMessage(getInteger(this, (toString(C) + "_Hard_Cap_Amount")), "Hard Cap Amount not Found for this Presale Round.") | |
143 | + | let U = valueOrErrorMessage(getInteger(this, (toString(C) + "_Funds_Collection")), "Total Funds Collection not Found for this Presale Round.") | |
144 | + | let Q = valueOrErrorMessage(getInteger(this, ((toString(C) + "_") + K)), "No Deposit was made by this Address for this Presale Round.") | |
145 | + | let I = valueOrErrorMessage(getBoolean(this, (toString(C) + "_Allow_Refund")), "Allow_Refund has no Boolen Entry for this Presale Round.") | |
146 | + | let S = (G - U) | |
147 | + | let T = (H - U) | |
148 | + | if ((F > lastBlock.timestamp)) | |
149 | + | then throw(n) | |
150 | + | else if ((I == false)) | |
151 | + | then throw(o) | |
152 | + | else if (if ((S > 0)) | |
153 | + | then (T > 0) | |
154 | + | else false) | |
155 | + | then [ScriptTransfer(addressFromStringValue(K), Q, unit), IntegerEntry(((toString(C) + "_") + K), 0), StringEntry("message", h)] | |
156 | + | else if (if ((0 >= S)) | |
157 | + | then (T > 0) | |
158 | + | else false) | |
159 | + | then throw("SoftCap Already Reached for this Round. Please Click on Claim to Receive Your Tokens.") | |
160 | + | else if (if ((0 >= S)) | |
161 | + | then (0 >= T) | |
162 | + | else false) | |
163 | + | then throw("SoftCap and Hard Already Reached for this Round. Please Click on Claim to Receive Your Tokens.") | |
164 | + | else throw("Wrong Etry Found.") | |
165 | + | } | |
166 | + | ||
167 | + | ||
168 | + | @Verifier(V) | |
169 | + | func W () = sigVerify(V.bodyBytes, V.proofs[0], V.senderPublicKey) | |
130 | 170 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = base58'GKmJ6BchUgQfwKp4mp5eX8Y9xLioYRm6e1gDfFgdAcCr' | |
5 | 5 | ||
6 | 6 | let b = addressFromPublicKey(a) | |
7 | 7 | ||
8 | 8 | let c = "End Timestamp can't be less than or equal to Start Timestamp" | |
9 | 9 | ||
10 | 10 | let d = "Token Price can't be less than or Zero" | |
11 | 11 | ||
12 | 12 | let e = "Soft Cap Amount can't be more than Hard Cap Amount." | |
13 | 13 | ||
14 | 14 | let f = "<h1>Order Submitted Successfully!</h1><br>" | |
15 | 15 | ||
16 | 16 | let g = "<h1>PreSale Parameters Submitted Successfully!</h1><br>" | |
17 | 17 | ||
18 | - | let h = " | |
18 | + | let h = "<h1>Refund Received Successfully!.</h1><br>" | |
19 | 19 | ||
20 | - | let i = " | |
20 | + | let i = "DApp Need WAVES Token as Attach payment[1]." | |
21 | 21 | ||
22 | - | let j = " | |
22 | + | let j = "Attached payment[1] is less than token price " | |
23 | 23 | ||
24 | - | let k = " | |
24 | + | let k = "Dapp will start Pre-Sale at Timestamp " | |
25 | 25 | ||
26 | - | let l = " | |
26 | + | let l = "Minimum 0.1 WAVES required on Your Address, Please hold min. 0.1 WAVES on your Address to place order." | |
27 | 27 | ||
28 | - | @Callable(m) | |
29 | - | func SetPreSaleParameters (n,o,p,q,r,s) = { | |
30 | - | let t = n | |
31 | - | let u = o | |
32 | - | let v = { | |
33 | - | let w = getInteger(this, "Current_Funding_Round") | |
34 | - | if ($isInstanceOf(w, "Int")) | |
28 | + | let m = "Pre-Sale is over for this Round." | |
29 | + | ||
30 | + | let n = "Pre-Sale is not over for this Round." | |
31 | + | ||
32 | + | let o = "PreSale was Set with False to Refund, so no Refund allowed for this Round." | |
33 | + | ||
34 | + | @Callable(p) | |
35 | + | func SetPreSaleParameters (q,r,s,t,u,v) = { | |
36 | + | let w = q | |
37 | + | let x = r | |
38 | + | let y = { | |
39 | + | let z = getInteger(this, "Current_Funding_Round") | |
40 | + | if ($isInstanceOf(z, "Int")) | |
35 | 41 | then { | |
36 | - | let | |
37 | - | | |
42 | + | let A = z | |
43 | + | A | |
38 | 44 | } | |
39 | 45 | else 0 | |
40 | 46 | } | |
41 | - | let | |
42 | - | if (( | |
47 | + | let B = (y + 1) | |
48 | + | if ((p.caller != b)) | |
43 | 49 | then throw((("This Address is not Authorized. Only " + toString(b)) + " is Authorized Address to Sign it.")) | |
44 | - | else if ((size(toString( | |
50 | + | else if ((size(toString(q)) != 13)) | |
45 | 51 | then throw("Start Timestamp is Wrong. Please Enter a Valid Timestamp. Probably you entered an Timestamp less than 13 Chars.") | |
46 | - | else if ((size(toString( | |
52 | + | else if ((size(toString(r)) != 13)) | |
47 | 53 | then throw("End Timestamp is Wrong. Please Enter a Valid Timestamp. Probably you entered an Timestamp less than 13 Chars.") | |
48 | - | else if ((1 > | |
54 | + | else if ((1 > s)) | |
49 | 55 | then throw(d) | |
50 | - | else if (( | |
56 | + | else if ((w >= x)) | |
51 | 57 | then throw(c) | |
52 | - | else if (( | |
58 | + | else if ((t > u)) | |
53 | 59 | then throw(e) | |
54 | - | else [IntegerEntry("Current_Funding_Round", | |
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 | 61 | } | |
56 | 62 | ||
57 | 63 | ||
58 | 64 | ||
59 | - | @Callable( | |
60 | - | func PlacePresaleOrder ( | |
61 | - | let | |
62 | - | let | |
63 | - | let | |
64 | - | let | |
65 | - | let | |
66 | - | let | |
67 | - | let | |
68 | - | let | |
69 | - | let | |
70 | - | then | |
71 | - | else throw( | |
72 | - | let | |
73 | - | let | |
74 | - | if ($isInstanceOf( | |
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] | |
77 | + | else throw(i) | |
78 | + | let M = { | |
79 | + | let z = getInteger(this, (toString(C) + "_Funds_Collection")) | |
80 | + | if ($isInstanceOf(z, "Int")) | |
75 | 81 | then { | |
76 | - | let | |
77 | - | | |
82 | + | let A = z | |
83 | + | A | |
78 | 84 | } | |
79 | 85 | else 0 | |
80 | 86 | } | |
81 | - | let | |
82 | - | let | |
83 | - | let | |
84 | - | if ($isInstanceOf( | |
87 | + | let N = (M + L.amount) | |
88 | + | let O = { | |
89 | + | let z = getInteger(this, (toString(C) + "_total_txns")) | |
90 | + | if ($isInstanceOf(z, "Int")) | |
85 | 91 | then { | |
86 | - | let | |
87 | - | | |
92 | + | let A = z | |
93 | + | A | |
88 | 94 | } | |
89 | 95 | else 0 | |
90 | 96 | } | |
91 | - | let | |
92 | - | let | |
93 | - | let | |
94 | - | if ($isInstanceOf( | |
97 | + | let P = (O + 1) | |
98 | + | let Q = { | |
99 | + | let z = getInteger(this, ((toString(C) + "_") + K)) | |
100 | + | if ($isInstanceOf(z, "Int")) | |
95 | 101 | then { | |
96 | - | let | |
97 | - | | |
102 | + | let A = z | |
103 | + | A | |
98 | 104 | } | |
99 | 105 | else 0 | |
100 | 106 | } | |
101 | - | let | |
102 | - | let | |
103 | - | let | |
104 | - | if (isDefined( | |
105 | - | then throw( | |
106 | - | else if (( | |
107 | - | then throw(((( | |
108 | - | else if (( | |
109 | - | then throw(( | |
110 | - | else if ((lastBlock.timestamp > | |
111 | - | then throw( | |
112 | - | else if (if (( | |
113 | - | then ( | |
107 | + | let R = (Q + L.amount) | |
108 | + | let S = (G - N) | |
109 | + | let T = (H - N) | |
110 | + | if (isDefined(L.assetId)) | |
111 | + | 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)) | |
117 | + | then throw(m) | |
118 | + | else if (if ((S > 0)) | |
119 | + | then (T > 0) | |
114 | 120 | else false) | |
115 | - | then [IntegerEntry((toString( | |
116 | - | else if (if ((0 >= | |
117 | - | then ( | |
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) | |
118 | 124 | else false) | |
119 | - | then [IntegerEntry((toString( | |
120 | - | else if (if ((0 >= | |
121 | - | then (0 >= | |
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) | |
122 | 128 | else false) | |
123 | - | then [IntegerEntry((toString( | |
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)] | |
124 | 130 | else throw("Error.") | |
125 | 131 | } | |
126 | 132 | ||
127 | 133 | ||
128 | - | @Verifier(R) | |
129 | - | func S () = sigVerify(R.bodyBytes, R.proofs[0], R.senderPublicKey) | |
134 | + | ||
135 | + | @Callable(p) | |
136 | + | func Refund (C) = { | |
137 | + | let K = toBase58String(p.caller.bytes) | |
138 | + | let D = valueOrErrorMessage(getInteger(this, (toString(C) + "_Token_Price")), "Token Price not Found for this Presale Round.") | |
139 | + | let E = valueOrErrorMessage(getInteger(this, (toString(C) + "_Presale_Start_TimeStamp")), "Start Timestamp not Found for this Presale Round.") | |
140 | + | let F = valueOrErrorMessage(getInteger(this, (toString(C) + "_Presale_End_TimeStamp")), "End Timestamp not Found for this Presale Round.") | |
141 | + | let G = valueOrErrorMessage(getInteger(this, (toString(C) + "_Soft_Cap_Amount")), "Soft Cap Amount not Found for this Presale Round.") | |
142 | + | let H = valueOrErrorMessage(getInteger(this, (toString(C) + "_Hard_Cap_Amount")), "Hard Cap Amount not Found for this Presale Round.") | |
143 | + | let U = valueOrErrorMessage(getInteger(this, (toString(C) + "_Funds_Collection")), "Total Funds Collection not Found for this Presale Round.") | |
144 | + | let Q = valueOrErrorMessage(getInteger(this, ((toString(C) + "_") + K)), "No Deposit was made by this Address for this Presale Round.") | |
145 | + | let I = valueOrErrorMessage(getBoolean(this, (toString(C) + "_Allow_Refund")), "Allow_Refund has no Boolen Entry for this Presale Round.") | |
146 | + | let S = (G - U) | |
147 | + | let T = (H - U) | |
148 | + | if ((F > lastBlock.timestamp)) | |
149 | + | then throw(n) | |
150 | + | else if ((I == false)) | |
151 | + | then throw(o) | |
152 | + | else if (if ((S > 0)) | |
153 | + | then (T > 0) | |
154 | + | else false) | |
155 | + | then [ScriptTransfer(addressFromStringValue(K), Q, unit), IntegerEntry(((toString(C) + "_") + K), 0), StringEntry("message", h)] | |
156 | + | else if (if ((0 >= S)) | |
157 | + | then (T > 0) | |
158 | + | else false) | |
159 | + | then throw("SoftCap Already Reached for this Round. Please Click on Claim to Receive Your Tokens.") | |
160 | + | else if (if ((0 >= S)) | |
161 | + | then (0 >= T) | |
162 | + | else false) | |
163 | + | then throw("SoftCap and Hard Already Reached for this Round. Please Click on Claim to Receive Your Tokens.") | |
164 | + | else throw("Wrong Etry Found.") | |
165 | + | } | |
166 | + | ||
167 | + | ||
168 | + | @Verifier(V) | |
169 | + | func W () = sigVerify(V.bodyBytes, V.proofs[0], V.senderPublicKey) | |
130 | 170 |
github/deemru/w8io/169f3d6 82.93 ms ◑