tx · E2UEhaJioiQDDWxWBLa7C8jVpX3aH1ojEuLmoK5MKrAc 3N4ynz2uyA7cErymQd46zgwVJEEfXYDRXtA: -0.01500000 Waves 2023.08.02 11:57 [2692748] smart account 3N4ynz2uyA7cErymQd46zgwVJEEfXYDRXtA > SELF 0.00000000 Waves
{ "type": 13, "id": "E2UEhaJioiQDDWxWBLa7C8jVpX3aH1ojEuLmoK5MKrAc", "fee": 1500000, "feeAssetId": null, "timestamp": 1690966628671, "version": 2, "chainId": 84, "sender": "3N4ynz2uyA7cErymQd46zgwVJEEfXYDRXtA", "senderPublicKey": "CiRX9ubobzbD36ZwTyuBFiPnPkmzMQ7GDsF3hMoVbcVR", "proofs": [ "41TpqdLYsoVhDiHgFXP4AHs4Xun5qbwT5qN5drXdD1gbb72MbiQvNnifdir4Weu9E5UY5hGUxLazRaJWAaGhvBfW" ], "script": "base64:AAIEAAAAAAAAABAIAhIHCgUBAQEBARIDCgEBAAAADAAAAAAjcHJlc2FsZV90aW1lc3RhbXBfY29udHJvbGxlcl9wdWJrZXkBAAAAIOOt17LUijbWojwDE5tgFkw1Y8cwIr3jselcewpp7rwjAAAAABJjb250cm9sbGVyX2FkZHJlc3MJAQAAABRhZGRyZXNzRnJvbVB1YmxpY0tleQAAAAEFAAAAI3ByZXNhbGVfdGltZXN0YW1wX2NvbnRyb2xsZXJfcHVia2V5AAAAAAd0c2Vycm9yAgAAADxFbmQgVGltZXN0YW1wIGNhbid0IGJlIGxlc3MgdGhhbiBvciBlcXVhbCB0byBTdGFydCBUaW1lc3RhbXAAAAAACnByaWNlZXJyb3ICAAAAJlRva2VuIFByaWNlIGNhbid0IGJlIGxlc3MgdGhhbiBvciBaZXJvAAAAAAhjYXBlcnJvcgIAAAAzU29mdCBDYXAgQW1vdW50IGNhbid0IGJlIG1vcmUgdGhhbiBIYXJkIENhcCBBbW91bnQuAAAAAAhvcmRlcm1zZwIAAAAqPGgxPk9yZGVyIFN1Ym1pdHRlZCBTdWNjZXNzZnVsb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0dXMFAAAAFnNvZnRjYXBfcmVhY2hfc3RhdHVzXzIJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgIAAAAUaGFyZGNhcF9yZWFjaF9zdGF0dXMFAAAAFmhhcmRjYXBfcmVhY2hfc3RhdHVzXzIJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgIAAAAHbWVzc2FnZQUAAAAIb3JkZXJtc2cFAAAAA25pbAkAAAIAAAABAgAAAAZFcnJvci4AAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tlefCsbD8=", "height": 2692748, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Ezg5DzcMot3xgmkdhxxYJxb5RMM2NPaovSazy29dz8vf Next: BRryWRwhwQrWMPqeFbAZskWQi67nvjzwepyczvnrCM51 Diff:
Old | New | Differences | |
---|---|---|---|
96 | 96 | then throw((((orderpymterror + "[") + toString(read_round_token_price)) + "/10^8.]")) | |
97 | 97 | else if ((read_round_start_ts > lastBlock.timestamp)) | |
98 | 98 | then throw((launch_error + toString(read_round_start_ts))) | |
99 | - | else if ((read_Soft_Cap_Amount | |
99 | + | else if ((total_funds_collection > read_Soft_Cap_Amount)) | |
100 | 100 | 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), StringEntry("softcap_reach_status", softcap_reach_status_1), StringEntry("hardcap_reach_status", hardcap_reach_status_1), StringEntry("message", ordermsg)] | |
101 | 101 | else if ((total_funds_collection >= read_Soft_Cap_Amount)) | |
102 | 102 | 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), StringEntry("softcap_reach_status", softcap_reach_status_2), StringEntry("message", ordermsg)] |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
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 | 7 | ||
8 | 8 | let tserror = "End Timestamp can't be less than or equal to Start Timestamp" | |
9 | 9 | ||
10 | 10 | let priceerror = "Token Price can't be less than or Zero" | |
11 | 11 | ||
12 | 12 | let caperror = "Soft Cap Amount can't be more than Hard Cap Amount." | |
13 | 13 | ||
14 | 14 | let ordermsg = "<h1>Order Submitted Successfully!</h1><br>" | |
15 | 15 | ||
16 | 16 | let presale_init_msg = "<h1>PreSale Parameters Submitted Successfully!</h1><br>" | |
17 | 17 | ||
18 | 18 | let pymterror = "DApp Need WAVES Token as Attach payment[1]." | |
19 | 19 | ||
20 | 20 | let orderpymterror = "Attached payment[1] is less than token price " | |
21 | 21 | ||
22 | 22 | let launch_error = "Dapp will start Pre-Sale at Timestamp " | |
23 | 23 | ||
24 | 24 | let minbalerror = "Minimum 0.1 WAVES required on Your Address, Please hold min. 0.1 WAVES on your Address to place order." | |
25 | 25 | ||
26 | 26 | let voteErr = "Pre-Sale is over for this Round." | |
27 | 27 | ||
28 | 28 | @Callable(i) | |
29 | 29 | func SetPreSaleParameters (Presale_Start_TimeStamp,Presale_End_TimeStamp,Token_Price,Soft_Cap_Amount,Hard_Cap_Amount) = { | |
30 | 30 | let StartTS = Presale_Start_TimeStamp | |
31 | 31 | let EndTS = Presale_End_TimeStamp | |
32 | 32 | let read_funding_round = match getInteger(this, "Current_Funding_Round") { | |
33 | 33 | case a: Int => | |
34 | 34 | a | |
35 | 35 | case _ => | |
36 | 36 | 0 | |
37 | 37 | } | |
38 | 38 | let current_round = (read_funding_round + 1) | |
39 | 39 | if ((i.caller != controller_address)) | |
40 | 40 | then throw((("This Address is not Authorized. Only " + toString(controller_address)) + " is Authorized Address to Sign it.")) | |
41 | 41 | else if ((size(toString(Presale_Start_TimeStamp)) != 13)) | |
42 | 42 | then throw("Start Timestamp is Wrong. Please Enter a Valid Timestamp. Probably you entered an Timestamp less than 13 Chars.") | |
43 | 43 | else if ((size(toString(Presale_End_TimeStamp)) != 13)) | |
44 | 44 | then throw("End Timestamp is Wrong. Please Enter a Valid Timestamp. Probably you entered an Timestamp less than 13 Chars.") | |
45 | 45 | else if ((1 > Token_Price)) | |
46 | 46 | then throw(priceerror) | |
47 | 47 | else if ((StartTS >= EndTS)) | |
48 | 48 | then throw(tserror) | |
49 | 49 | else if ((Soft_Cap_Amount > Hard_Cap_Amount)) | |
50 | 50 | then throw(caperror) | |
51 | 51 | 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), StringEntry("message", presale_init_msg)] | |
52 | 52 | } | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | ||
56 | 56 | @Callable(i) | |
57 | 57 | func PlacePresaleOrder (Enter_Presale_Round) = { | |
58 | 58 | let read_round_token_price = valueOrErrorMessage(getInteger(this, (toString(Enter_Presale_Round) + "_Token_Price")), "Token Price not Found for this Presale Round.") | |
59 | 59 | let read_round_start_ts = valueOrErrorMessage(getInteger(this, (toString(Enter_Presale_Round) + "_Presale_Start_TimeStamp")), "Start Timestamp not Found for this Presale Round.") | |
60 | 60 | let read_round_end_ts = valueOrErrorMessage(getInteger(this, (toString(Enter_Presale_Round) + "_Presale_End_TimeStamp")), "End Timestamp not Found for this Presale Round.") | |
61 | 61 | let read_Soft_Cap_Amount = valueOrErrorMessage(getInteger(this, (toString(Enter_Presale_Round) + "_Soft_Cap_Amount")), "Soft Cap Amount not Found for this Presale Round.") | |
62 | 62 | let read_Hard_Cap_Amount = valueOrErrorMessage(getInteger(this, (toString(Enter_Presale_Round) + "_Hard_Cap_Amount")), "Hard Cap Amount not Found for this Presale Round.") | |
63 | 63 | let softcap_reach_status_1 = "No" | |
64 | 64 | let softcap_reach_status_2 = "Yes" | |
65 | 65 | let hardcap_reach_status_1 = "No" | |
66 | 66 | let hardcap_reach_status_2 = "Yes" | |
67 | 67 | let WAVES = unit | |
68 | 68 | let currentKey = toBase58String(i.caller.bytes) | |
69 | 69 | let pmt = if ((size(i.payments) == 1)) | |
70 | 70 | then i.payments[0] | |
71 | 71 | else throw(pymterror) | |
72 | 72 | let read_funds_collection = match getInteger(this, (toString(Enter_Presale_Round) + "_Funds_Collection")) { | |
73 | 73 | case a: Int => | |
74 | 74 | a | |
75 | 75 | case _ => | |
76 | 76 | 0 | |
77 | 77 | } | |
78 | 78 | let total_funds_collection = (read_funds_collection + pmt.amount) | |
79 | 79 | let read_total_txns = match getInteger(this, (toString(Enter_Presale_Round) + "_total_txns")) { | |
80 | 80 | case a: Int => | |
81 | 81 | a | |
82 | 82 | case _ => | |
83 | 83 | 0 | |
84 | 84 | } | |
85 | 85 | let total_txns = (read_total_txns + 1) | |
86 | 86 | let read_user_total_funds_deposited = match getInteger(this, ((toString(Enter_Presale_Round) + "_") + currentKey)) { | |
87 | 87 | case a: Int => | |
88 | 88 | a | |
89 | 89 | case _ => | |
90 | 90 | 0 | |
91 | 91 | } | |
92 | 92 | let user_total_funds_deposited = (read_user_total_funds_deposited + pmt.amount) | |
93 | 93 | if (isDefined(pmt.assetId)) | |
94 | 94 | then throw(pymterror) | |
95 | 95 | else if ((read_round_token_price > pmt.amount)) | |
96 | 96 | then throw((((orderpymterror + "[") + toString(read_round_token_price)) + "/10^8.]")) | |
97 | 97 | else if ((read_round_start_ts > lastBlock.timestamp)) | |
98 | 98 | then throw((launch_error + toString(read_round_start_ts))) | |
99 | - | else if ((read_Soft_Cap_Amount | |
99 | + | else if ((total_funds_collection > read_Soft_Cap_Amount)) | |
100 | 100 | 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), StringEntry("softcap_reach_status", softcap_reach_status_1), StringEntry("hardcap_reach_status", hardcap_reach_status_1), StringEntry("message", ordermsg)] | |
101 | 101 | else if ((total_funds_collection >= read_Soft_Cap_Amount)) | |
102 | 102 | 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), StringEntry("softcap_reach_status", softcap_reach_status_2), StringEntry("message", ordermsg)] | |
103 | 103 | else if ((total_funds_collection >= read_Hard_Cap_Amount)) | |
104 | 104 | 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), StringEntry("softcap_reach_status", softcap_reach_status_2), StringEntry("hardcap_reach_status", hardcap_reach_status_2), StringEntry("message", ordermsg)] | |
105 | 105 | else throw("Error.") | |
106 | 106 | } | |
107 | 107 | ||
108 | 108 | ||
109 | 109 | @Verifier(tx) | |
110 | 110 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
111 | 111 |
github/deemru/w8io/026f985 34.64 ms ◑