tx · BzvUFNqxE3fpi86qLQz7ZDUqVPohaG1f15Kb7KkCm9gW

3MshBTYYGc24JWzE2aYEktiz5KzeNQGA4GV:  -0.02500000 Waves

2023.08.14 16:16 [2710280] smart account 3MshBTYYGc24JWzE2aYEktiz5KzeNQGA4GV > SELF 0.00000000 Waves

{ "type": 13, "id": "BzvUFNqxE3fpi86qLQz7ZDUqVPohaG1f15Kb7KkCm9gW", "fee": 2500000, "feeAssetId": null, "timestamp": 1692019048445, "version": 2, "chainId": 84, "sender": "3MshBTYYGc24JWzE2aYEktiz5KzeNQGA4GV", "senderPublicKey": "GKmJ6BchUgQfwKp4mp5eX8Y9xLioYRm6e1gDfFgdAcCr", "proofs": [ "5GrimhK4WzfYuCGQ11sqMMmdzAb1vur97WhL1Uwahsz9qVGAzh2iPyzoA2EvfHDxovyFFmDqkyoagrAcWf38M1jz" ], "script": "base64:AAIFAAAAAAAAACEIAhIICgYBAQEBAQQSAwoBARIDCgEBEgMKAQESBAoCCAgAAAARAAAAAAtCTUxfVG9rZW5JRAEAAAAAAAAAACNwcmVzYWxlX3RpbWVzdGFtcF9jb250cm9sbGVyX3B1YmtleQEAAAAg463XstSKNtaiPAMTm2AWTDVjxzAiveOx6Vx7CmnuvCMAAAAAEmNvbnRyb2xsZXJfYWRkcmVzcwkBAAAAFGFkZHJlc3NGcm9tUHVibGljS2V5AAAAAQUAAAAjcHJlc2FsZV90aW1lc3RhbXBfY29udHJvbGxlcl9wdWJrZXkAAAAADmV4cGlyZWR0c2Vycm9yAgAAADhTdGFydCBUaW1lc3RhbXAgY2FuJ3QgYmUgbGVzcyB0aGFuIGxhc3QgYmxvY2sgVGltZXN0YW1wLgAAAAAHdHNlcnJvcgIAAAA8RW5kIFRpbWVzdGFtcCBjYW4ndCBiZSBsZXNzIHRoYW4gb3IgZXF1YWwgdG8gU3RhcnQgVGltZXN0YW1wAAAAAApwcmljZWVycm9yAgAAACZUb2tlbiBQcmljZSBjYW4ndCBiZSBsZXNzIHRoYW4g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ABCUAAAABBQAAABJjb250cm9sbGVyX2FkZHJlc3MCAAAAIiBpcyBBdXRob3JpemVkIEFkZHJlc3MgdG8gU2lnbiBpdC4JAARMAAAAAgUAAAAFYXNzZXQJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgIAAAALQk1MX1Rva2VuSUQJAAJYAAAAAQUAAAAHYXNzZXRJZAkABEwAAAACCQEAAAAEQnVybgAAAAIFAAAAB2Fzc2V0SWQAAAAAAAAAAAEFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5L2lEhw==", "height": 2710280, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FtTcXfRCUHVgnKZHpnmuxRRtWU6WY8q8mDogiUzL53EA Next: 7KmVuA9JbTvrbn2ku6zohnJVWMCZLKpSFj2depMv5aSu Full:
OldNewDifferences
1-{-# STDLIB_VERSION 4 #-}
1+{-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let USDTAssetID = base58'Zn3cLHW7aAVPm5aACcTjvg7e7iEy2cKDtbowok5qa9H'
4+let BML_TokenID = base58''
55
6-let CODEAssetID = base58'44Mq8KqUhM94t93MiBq3S22iiuGczMxpKmse5dBy2w5y'
6+let presale_timestamp_controller_pubkey = base58'GKmJ6BchUgQfwKp4mp5eX8Y9xLioYRm6e1gDfFgdAcCr'
77
8-let CollectCODEFeeAddress = addressFromPublicKey(base58'6Z73KxcX3sugpiStpSRXxKxTmWqCaLVwFeM6kwyiKVDR')
8+let controller_address = addressFromPublicKey(presale_timestamp_controller_pubkey)
99
10-let CollectUSDTSwapFeeAddress = addressFromPublicKey(base58'6Z73KxcX3sugpiStpSRXxKxTmWqCaLVwFeM6kwyiKVDR')
10+let expiredtserror = "Start Timestamp can't be less than last block Timestamp."
1111
12-let CollectAssetSwapFeeAddress = addressFromPublicKey(base58'6Z73KxcX3sugpiStpSRXxKxTmWqCaLVwFeM6kwyiKVDR')
12+let tserror = "End Timestamp can't be less than or equal to Start Timestamp"
13+
14+let priceerror = "Token Price can't be less than or Zero"
15+
16+let caperror = "Soft Cap Amount can't be more than Hard Cap Amount."
17+
18+let ordermsg = "<h1>Presale Order Submitted Successfully!</h1><br>"
19+
20+let presale_init_msg = "<h1>PreSale Parameters Submitted Successfully!</h1><br>"
21+
22+let pymterror = "DApp Need WAVES Token as Attach payment[1]."
23+
24+let orderpymterror = "Attached payment[1] is less than token price "
25+
26+let launch_error = "Dapp will start Pre-Sale at Timestamp "
27+
28+let minbalerror = "Minimum 0.1 WAVES required on Your Address, Please hold min. 0.1 WAVES on your Address to place order."
29+
30+let presale_end_err = "Pre-Sale is over for this Round."
31+
32+let presale_not_end_err = "Pre-Sale is not over for this Round."
33+
34+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."
35+
36+let refund_init_msg = "<h1>Refund Received Successfully!.</h1><br>"
1337
1438 @Callable(i)
15-func RegisterPairForVoting (EnterAssetID,days) = {
16- let pmt1 = value(i.payments[0])
17- let pmt2 = value(i.payments[1])
18- let maximumvotingdays = 90
19- let currentKey = toBase58String(i.caller.bytes)
20- let TN = !(isDefined(pmt2.assetId))
21- let oneday = 1440
22- let NoOfDaysBlocks = (oneday * days)
23- let gap = (NoOfDaysBlocks - 43199)
24- let votesrequired = ((100000 + ((11574 * gap) / 10000)) * 100000000)
25- let votingExpire = (height + NoOfDaysBlocks)
26- let fetchpair = getString(this, ("Pair_UV_" + EnterAssetID))
27- let votingstatus = "F"
28- let assetinfopmt2 = fromBase58String(EnterAssetID)
29- if ((43 > size(EnterAssetID)))
30- then throw("Wrong AssetID is Entered for Voting. Please Enter a Valid AssetID. Probably you entered an AssetID less than 43 Chars.")
31- else if ((29 >= days))
32- then throw("Enter no. of days in between 30 to 90.")
33- else if ((days > maximumvotingdays))
34- then throw("You Entered days greater than 90 please Enter no. of days in between 1 to 90.")
35- else if ((fetchpair == EnterAssetID))
36- then throw("Pair Already Exist in Voting List.")
37- else if ((size(i.payments) != 2))
38- then throw("Two attached assets expected as payment. Kindly Attach payment1 = CODE Token & payment2 = Token you want to List for Voting.")
39- else if ((pmt1.assetId != CODEAssetID))
40- then throw("Incorrect asset attached for Voting in payment[1], please attach 2000 CODE Token only.")
41- else if ((pmt1.amount != 10000000))
42- then throw((((("You attached only " + toString(fraction(pmt1.amount, 1, 100000000))) + ".") + toString(fraction(pmt1.amount, 1, 10000000))) + " CODE for Voting in payment[1], please attach 2000 CODE Token."))
43- else if ((pmt2.assetId != assetinfopmt2))
44- then throw("Input String & Attached AssetID in payment2 is not matching.")
45- else if ((TN == true))
46- then throw("You Attached TN Asset ID for Voting, please attach fsTN instead of TN or Token You want to list in payment[2].")
47- else [StringEntry(("Pair_UV_" + EnterAssetID), EnterAssetID), StringEntry(("Voting_Status_" + EnterAssetID), votingstatus), IntegerEntry(("Voting_SH_" + EnterAssetID), height), IntegerEntry(("Voting_EH_" + EnterAssetID), votingExpire), IntegerEntry(("Voting_Period_" + EnterAssetID), NoOfDaysBlocks), IntegerEntry(("Listing_Fee_" + EnterAssetID), pmt1.amount), IntegerEntry(("Votes_Req_" + EnterAssetID), (votesrequired / 3)), IntegerEntry(("Votes_Rcvd_" + EnterAssetID), 0), ScriptTransfer(CollectCODEFeeAddress, pmt1.amount, CODEAssetID)]
39+func SetPreSaleParameters (Presale_Start_TimeStamp,Presale_End_TimeStamp,Token_Price,Soft_Cap_Amount,Hard_Cap_Amount,Allow_Refund) = {
40+ let StartTS = Presale_Start_TimeStamp
41+ let EndTS = Presale_End_TimeStamp
42+ let read_funding_round = match getInteger(this, "Current_Funding_Round") {
43+ case a: Int =>
44+ a
45+ case _ =>
46+ 0
47+ }
48+ let current_round = (read_funding_round + 1)
49+ if ((i.caller != controller_address))
50+ then throw((("This Address is not Authorized. Only " + toString(controller_address)) + " is Authorized Address to Sign it."))
51+ else if ((lastBlock.timestamp > Presale_Start_TimeStamp))
52+ then throw(expiredtserror)
53+ else if ((size(toString(Presale_Start_TimeStamp)) != 13))
54+ then throw("Start Timestamp is Wrong. Please Enter a Valid Timestamp. Probably you entered an Timestamp less than 13 Chars.")
55+ else if ((size(toString(Presale_End_TimeStamp)) != 13))
56+ then throw("End Timestamp is Wrong. Please Enter a Valid Timestamp. Probably you entered an Timestamp less than 13 Chars.")
57+ else if ((1 > Token_Price))
58+ then throw(priceerror)
59+ else if ((StartTS >= EndTS))
60+ then throw(tserror)
61+ else if ((Soft_Cap_Amount > Hard_Cap_Amount))
62+ then throw(caperror)
63+ 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)]
4864 }
4965
5066
5167
5268 @Callable(i)
53-func DoVoting (EnterAssetID) = {
69+func PlacePresaleOrder (Enter_Presale_Round) = {
70+ let read_round_token_price = valueOrErrorMessage(getInteger(this, (toString(Enter_Presale_Round) + "_Token_Price")), "Token Price not Found for this Presale Round.")
71+ let read_round_start_ts = valueOrErrorMessage(getInteger(this, (toString(Enter_Presale_Round) + "_Presale_Start_TimeStamp")), "Start Timestamp not Found for this Presale Round.")
72+ let read_round_end_ts = valueOrErrorMessage(getInteger(this, (toString(Enter_Presale_Round) + "_Presale_End_TimeStamp")), "End Timestamp not Found for this Presale Round.")
73+ let read_Soft_Cap_Amount = valueOrErrorMessage(getInteger(this, (toString(Enter_Presale_Round) + "_Soft_Cap_Amount")), "Soft Cap Amount not Found for this Presale Round.")
74+ let read_Hard_Cap_Amount = valueOrErrorMessage(getInteger(this, (toString(Enter_Presale_Round) + "_Hard_Cap_Amount")), "Hard Cap Amount not Found for this Presale Round.")
75+ let read_Allow_Refund = valueOrErrorMessage(getBoolean(this, (toString(Enter_Presale_Round) + "_Allow_Refund")), "Refund is not set for this Presale Round.")
76+ let WAVES = unit
77+ let currentKey = toBase58String(i.caller.bytes)
5478 let pmt = if ((size(i.payments) == 1))
5579 then i.payments[0]
56- else throw((toBase58String(CODEAssetID) + "CODE Token is required as Attached payment"))
57- let calleraddress = toBase58String(i.caller.bytes)
58- let NewVotingStatus = "P"
59- let checkendheight = getIntegerValue(this, ("Voting_EH_" + EnterAssetID))
60- let checkpairisavailableornot = getString(this, ("Pair_UV_" + EnterAssetID))
61- let checkvotesrequired = getIntegerValue(this, ("Votes_Req_" + EnterAssetID))
62- let checkvotesreceived = getIntegerValue(this, ("Votes_Rcvd_" + EnterAssetID))
63- let VotingStatus = getStringValue(this, ("Voting_Status_" + EnterAssetID))
64- let currentvotes = match getInteger(this, ("Votes_Rcvd_" + EnterAssetID)) {
80+ else throw(pymterror)
81+ let read_funds_collection = match getInteger(this, (toString(Enter_Presale_Round) + "_Funds_Collection")) {
6582 case a: Int =>
6683 a
6784 case _ =>
6885 0
6986 }
70- let newvotescount = (currentvotes + pmt.amount)
71- let individualvotes = match getInteger(this, ((("Votes_Rcvd_" + calleraddress) + "_") + EnterAssetID)) {
72- case b: Int =>
73- b
87+ let total_funds_collection = (read_funds_collection + pmt.amount)
88+ let read_auto_withdraw_txns = match getInteger(this, (toString(Enter_Presale_Round) + "_total_auto_withdraw_txns")) {
89+ case a: Int =>
90+ a
7491 case _ =>
7592 0
7693 }
77- let individualvotescount = (individualvotes + pmt.amount)
78- let checkwhitelist = (checkvotesreceived >= checkvotesrequired)
79- let info = valueOrErrorMessage(assetInfo(fromBase58String(EnterAssetID)), (("Asset " + EnterAssetID) + " doesn't exist"))
80- if ((checkpairisavailableornot != EnterAssetID))
81- then throw("Pair is not available in Voting List.")
82- else if ((height > checkendheight))
83- then throw((("Voting timeline for " + EnterAssetID) + " is expired."))
84- else if ((pmt.assetId != CODEAssetID))
85- then throw((("Kindly Attach Only " + toBase58String(CODEAssetID)) + " Token."))
86- else if ((VotingStatus == NewVotingStatus))
87- then throw((("Voting for " + EnterAssetID) + " pair is completed & it’s available in whitelist."))
88- else if (checkwhitelist)
89- then [StringEntry(("Voting_Status_" + EnterAssetID), NewVotingStatus), IntegerEntry(((("Balance_of_" + EnterAssetID) + "_") + toBase58String(USDTAssetID)), 0), IntegerEntry(((("Balance_of_" + toBase58String(USDTAssetID)) + "_") + EnterAssetID), 0), IntegerEntry(("Total_of_Pair_Txns_" + EnterAssetID), 0), IntegerEntry(((("Total_Swap_Fee_Collected_" + EnterAssetID) + "_") + toBase58String(USDTAssetID)), 0), IntegerEntry(("Total_Swap_Fee_Collected_" + EnterAssetID), 0), IntegerEntry(((("Votes_Rcvd_" + calleraddress) + "_") + EnterAssetID), individualvotescount)]
90- else [IntegerEntry(("Votes_Rcvd_" + EnterAssetID), newvotescount), IntegerEntry(((("Votes_Rcvd_" + calleraddress) + "_") + EnterAssetID), individualvotescount)]
94+ let total_auto_withdraw_txns = (read_auto_withdraw_txns + 1)
95+ let read_total_txns = match getInteger(this, (toString(Enter_Presale_Round) + "_total_txns")) {
96+ case a: Int =>
97+ a
98+ case _ =>
99+ 0
100+ }
101+ let total_txns = (read_total_txns + 1)
102+ let read_user_total_funds_deposited = match getInteger(this, ((toString(Enter_Presale_Round) + "_") + currentKey)) {
103+ case a: Int =>
104+ a
105+ case _ =>
106+ 0
107+ }
108+ let user_total_funds_deposited = (read_user_total_funds_deposited + pmt.amount)
109+ let pending_softcap_status = (read_Soft_Cap_Amount - total_funds_collection)
110+ let pending_hardcap_status = (read_Hard_Cap_Amount - total_funds_collection)
111+ if (isDefined(pmt.assetId))
112+ then throw(pymterror)
113+ else if ((read_round_token_price > pmt.amount))
114+ then throw((((orderpymterror + "[") + toString(read_round_token_price)) + "/10^8.]"))
115+ else if ((read_round_start_ts > lastBlock.timestamp))
116+ then throw((launch_error + toString(read_round_start_ts)))
117+ else if ((lastBlock.timestamp > read_round_end_ts))
118+ then throw(presale_end_err)
119+ else if (if ((pending_softcap_status > 0))
120+ then (pending_hardcap_status > 0)
121+ else false)
122+ 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_auto_withdraw_txns"), read_auto_withdraw_txns), 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)]
123+ else if (if (if ((0 >= pending_softcap_status))
124+ then (pending_hardcap_status > 0)
125+ else false)
126+ then (total_auto_withdraw_txns == 1)
127+ else false)
128+ 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_auto_withdraw_txns"), total_auto_withdraw_txns), 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), ScriptTransfer(controller_address, total_funds_collection, unit), StringEntry("message", ordermsg)]
129+ else if (if (if ((0 >= pending_softcap_status))
130+ then (pending_hardcap_status > 0)
131+ else false)
132+ then (total_auto_withdraw_txns > 1)
133+ else false)
134+ 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_auto_withdraw_txns"), total_auto_withdraw_txns), 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), ScriptTransfer(controller_address, pmt.amount, unit), StringEntry("message", ordermsg)]
135+ else if (if (if ((0 >= pending_softcap_status))
136+ then (0 >= pending_hardcap_status)
137+ else false)
138+ then (total_auto_withdraw_txns == 1)
139+ else false)
140+ 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_auto_withdraw_txns"), total_auto_withdraw_txns), 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), ScriptTransfer(controller_address, total_funds_collection, unit), StringEntry("message", ordermsg)]
141+ else if (if (if ((0 >= pending_softcap_status))
142+ then (0 >= pending_hardcap_status)
143+ else false)
144+ then (total_auto_withdraw_txns > 1)
145+ else false)
146+ 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_auto_withdraw_txns"), total_auto_withdraw_txns), 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), ScriptTransfer(controller_address, pmt.amount, unit), StringEntry("message", ordermsg)]
147+ else throw("Error.")
91148 }
92149
93150
94151
95152 @Callable(i)
96-func WithdrawVotedTokens (EnterAssetID) = {
97- let pmt = if ((size(i.payments) == 1))
98- then i.payments[0]
99- else throw("0.1 TN Token is required as Attached payment.")
100- let calleraddress = toBase58String(i.caller.bytes)
101- let checkendheight = getIntegerValue(this, ("Voting_EH_" + EnterAssetID))
102- let checkpairisavailableornot = getString(this, ("Pair_UV_" + EnterAssetID))
103- let checkuservotingbalance = valueOrErrorMessage(getInteger(this, ((("Votes_Rcvd_" + calleraddress) + "_") + EnterAssetID)), (calleraddress + " Address never voted & exist in list."))
104- let pendingblocksforprojectexpire = (checkendheight - height)
105- if ((checkpairisavailableornot != EnterAssetID))
106- then throw("Pair is not available in Voting List.")
107- else if ((checkendheight > height))
108- then throw((("Voting Already Running. You can withdraw your CODE Token after " + toString(pendingblocksforprojectexpire)) + " blocks"))
109- else if ((0 >= checkuservotingbalance))
110- then throw("You don't have any dues of CODE balance in this Voting Pair.")
111- else if (isDefined(pmt.assetId))
112- then throw("Don't attach any other asset. Please attach 0.1 TN as a fee to release your token")
113- else if ((pmt.amount != 10000000))
114- then throw("Please attach 0.1 TN as a fee to release your token.")
115- else [IntegerEntry(((("Votes_Rcvd_" + calleraddress) + "_") + EnterAssetID), 0), ScriptTransfer(i.caller, checkuservotingbalance, CODEAssetID)]
153+func Refund (Enter_Presale_Round) = {
154+ let WAVES = unit
155+ let currentKey = toBase58String(i.caller.bytes)
156+ let read_Initiated_Height = valueOrErrorMessage(getInteger(this, (toString(Enter_Presale_Round) + "_Initiated_Height")), "Initiated Height not Found for this Presale Round.")
157+ let read_round_token_price = valueOrErrorMessage(getInteger(this, (toString(Enter_Presale_Round) + "_Token_Price")), "Token Price not Found for this Presale Round.")
158+ let read_round_start_ts = valueOrErrorMessage(getInteger(this, (toString(Enter_Presale_Round) + "_Presale_Start_TimeStamp")), "Start Timestamp not Found for this Presale Round.")
159+ let read_round_end_ts = valueOrErrorMessage(getInteger(this, (toString(Enter_Presale_Round) + "_Presale_End_TimeStamp")), "End Timestamp not Found for this Presale Round.")
160+ let read_Soft_Cap_Amount = valueOrErrorMessage(getInteger(this, (toString(Enter_Presale_Round) + "_Soft_Cap_Amount")), "Soft Cap Amount not Found for this Presale Round.")
161+ let read_Hard_Cap_Amount = valueOrErrorMessage(getInteger(this, (toString(Enter_Presale_Round) + "_Hard_Cap_Amount")), "Hard Cap Amount not Found for this Presale Round.")
162+ let read_total_funds_collection = valueOrErrorMessage(getInteger(this, (toString(Enter_Presale_Round) + "_Funds_Collection")), "Total Funds Collection not Found for this Presale Round.")
163+ 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.")
164+ let read_Allow_Refund = valueOrErrorMessage(getBoolean(this, (toString(Enter_Presale_Round) + "_Allow_Refund")), "Allow_Refund has no Boolen Entry for this Presale Round.")
165+ let pending_softcap_status = (read_Soft_Cap_Amount - read_total_funds_collection)
166+ let pending_hardcap_status = (read_Hard_Cap_Amount - read_total_funds_collection)
167+ let milliseconds = 1000
168+ let minute = (60 * milliseconds)
169+ let round_time_difference = (read_round_end_ts - read_round_start_ts)
170+ let additional_safe_blocks = 10
171+ let blockstimetomature = ((read_Initiated_Height + fraction(round_time_difference, 1, minute)) + additional_safe_blocks)
172+ let pending_refunds = (read_total_funds_collection - read_user_total_funds_deposited)
173+ if ((blockstimetomature > lastBlock.height))
174+ then throw((((presale_not_end_err + " Please Wait Until ~") + toString(blockstimetomature)) + " Height is reached."))
175+ else if ((read_Allow_Refund == false))
176+ then throw(refund_err)
177+ else if ((read_user_total_funds_deposited == 0))
178+ then throw("Refund has been Already Claimed by this Address.")
179+ else if (if ((pending_softcap_status > 0))
180+ then (pending_hardcap_status > 0)
181+ else false)
182+ 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)]
183+ else if (if ((0 >= pending_softcap_status))
184+ then (pending_hardcap_status > 0)
185+ else false)
186+ then throw("SoftCap Already Reached for this Round. Please Click on 'Claim Tokens' Function to Receive Your Tokens.")
187+ else if (if ((0 >= pending_softcap_status))
188+ then (0 >= pending_hardcap_status)
189+ else false)
190+ then throw("SoftCap and Hard Already Reached for this Round. Please Click on Claim to Receive Your Tokens.")
191+ else throw("Wrong Entry Found.")
116192 }
117193
118194
119195
120196 @Callable(i)
121-func IssueLPToken (EnterAssetID) = {
122- let adminrights = valueOrErrorMessage(getString(this, "LP_Admin_Rights"), "LP Admin Rights are Not Included into Smart Contract. Deploy Admin Rights First.")
123- let calleraddress = toBase58String(i.caller.bytes)
124- let checkpairisavailableornot = valueOrErrorMessage(getString(this, ("Pair_UV_" + EnterAssetID)), "Asset not Found in Whitelisted Token")
125- let info = valueOrErrorMessage(assetInfo(fromBase58String(EnterAssetID)), (("Asset " + EnterAssetID) + " doesn't exist"))
126- let name = info.name
127- let decimals = info.decimals
128- let NewVotingStatus = "P"
129- let VotingStatus = valueOrErrorMessage(getString(this, ("Voting_Status_" + EnterAssetID)), ("Voting Status is Missing for " + EnterAssetID))
130- let LPissue = Issue((("LP-" + take(name, 8)) + "-USDT"), (((("LP-" + name) + "-USDT") + " is a Liquidity Provider Token Issued Against ") + EnterAssetID), (1 * pow(10, 0, fraction((decimals + 6), 1, 2), 0, 0, UP)), fraction((decimals + 6), 1, 2), true)
131- let LPid = calculateAssetId(LPissue)
132- if ((adminrights != calleraddress))
133- then throw((("Your are not allowded to Issue LP Token. Only " + adminrights) + " can issue the LP Token."))
134- else if ((checkpairisavailableornot != EnterAssetID))
135- then throw("Pair is not available in Voting List.")
136- else if ((VotingStatus != NewVotingStatus))
137- then throw("LP Token must be a Whitelisted Token.")
138- else [LPissue, StringEntry(("LP_" + EnterAssetID), toBase58String(LPid))]
197+func Claim_Tokens (Enter_Presale_Round) = {
198+ let currentKey = toBase58String(i.caller.bytes)
199+ let scale = 100000000
200+ let read_soft_cap_status = valueOrErrorMessage(getString(this, (toString(Enter_Presale_Round) + "_softcap_status")), "SoftCap Status not Found for this Presale Round.")
201+ let read_hard_cap_status = valueOrErrorMessage(getString(this, (toString(Enter_Presale_Round) + "_hardcap_status")), "HardCap Status not Found for this Presale Round.")
202+ let read_round_token_price = valueOrErrorMessage(getInteger(this, (toString(Enter_Presale_Round) + "_Token_Price")), "Token Price not Found for this Presale Round.")
203+ 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.")
204+ let calculate_total_tokens = fraction(read_user_total_funds_deposited, scale, read_round_token_price)
205+ let user_tokens_claim_amount = fraction(read_user_total_funds_deposited, scale, read_round_token_price)
206+ let read_total_tokens_claimed = match getInteger(this, (toString(Enter_Presale_Round) + "_Tokens_Claimed")) {
207+ case a: Int =>
208+ a
209+ case _ =>
210+ 0
211+ }
212+ let total_tokens_claimed = (read_total_tokens_claimed + user_tokens_claim_amount)
213+ let pending_tokens_claimed = (calculate_total_tokens - user_tokens_claim_amount)
214+ if ((read_soft_cap_status == "No"))
215+ then throw("No Tokens Claim,as SoftCap Amount didn't reach numbers for this Round.")
216+ else if (if ((read_soft_cap_status == "Yes"))
217+ then true
218+ else (read_hard_cap_status == "Yes"))
219+ then [IntegerEntry((toString(Enter_Presale_Round) + "_Tokens_Claimed"), total_tokens_claimed), IntegerEntry((toString(Enter_Presale_Round) + "_Pending_Tokens_To_Claim"), pending_tokens_claimed), ScriptTransfer(addressFromStringValue(currentKey), user_tokens_claim_amount, BML_TokenID)]
220+ else throw("Wrong Entry Found.")
139221 }
140222
141223
142224
143225 @Callable(i)
144-func SwapAssetToUSDTPairEntry (EnterAssetID) = {
145- let calleraddress = toBase58String(i.caller.bytes)
146- let pmt = if ((size(i.payments) == 1))
147- then i.payments[0]
148- else throw("Whitelisted Token is required as Attached payment[1].")
149- let checkpairisavailableornot = getString(this, ("Pair_UV_" + EnterAssetID))
150- let VotingStatus = getStringValue(this, ("Voting_Status_" + EnterAssetID))
151- let CheckUSDTBalance = getIntegerValue(this, ((("Balance_of_" + EnterAssetID) + "_") + toBase58String(USDTAssetID)))
152- let CheckAssetBalance = getIntegerValue(this, ((("Balance_of_" + toBase58String(USDTAssetID)) + "_") + EnterAssetID))
153- let newbalanceofUSDT = fraction(CheckUSDTBalance, CheckAssetBalance, (CheckAssetBalance + pmt.amount))
154- let quantityofpriceasset = (CheckUSDTBalance - newbalanceofUSDT)
155- let CurrentVotingStatus = "F"
156- let SwapFee = 3
157- let SwapFeetoreceive = ((quantityofpriceasset * SwapFee) / 1000)
158- let userbalancetoreceive = (quantityofpriceasset - SwapFeetoreceive)
159- let SumupofAssetToUSDTSwapFee = match getInteger(this, ((("Total_Swap_Fee_Collected_" + EnterAssetID) + "_") + toBase58String(USDTAssetID))) {
160- case a: Int =>
161- a
162- case _ =>
163- 0
164- }
165- let NewSumupofAssetToUSDTSwapFee = (SumupofAssetToUSDTSwapFee + SwapFeetoreceive)
166- let SumupAssetBalance = match getInteger(this, ((("Balance_of_" + toBase58String(USDTAssetID)) + "_") + EnterAssetID)) {
167- case a: Int =>
168- a
169- case _ =>
170- 0
171- }
172- let NewSumupofAssetBalance = (CheckAssetBalance + pmt.amount)
173- let SumupUSDTBalance = match getInteger(this, ((("Balance_of_" + EnterAssetID) + "_") + toBase58String(USDTAssetID))) {
174- case a: Int =>
175- a
176- case _ =>
177- 0
178- }
179- let NewSumupofUSDTBalance = (CheckUSDTBalance - quantityofpriceasset)
180- let TOPT = match getIntegerValue(this, ("Total_of_Pair_Txns_" + EnterAssetID)) {
181- case a: Int =>
182- a
183- case _ =>
184- 0
185- }
186- let NewTPT = (TOPT + 1)
187- if ((EnterAssetID == toBase58String(USDTAssetID)))
188- then throw("Input can Never be a USDT AssetID. Enter Whitelisted AssetID in input & Attach Whitelisted Asset as an attachment Token in payment[1].")
189- else if ((checkpairisavailableornot != EnterAssetID))
190- then throw("Pair is not available in Whitelisted Asset.")
191- else if ((VotingStatus == CurrentVotingStatus))
192- then throw((EnterAssetID + " is not A Whitelisted Token Yet."))
193- else if ((pmt.assetId == USDTAssetID))
194- then throw("You can't Attach USDT as an Attached Payment. Only Whitelisted Tokens are accepted.")
195- else if ((pmt.assetId != fromBase58String(EnterAssetID)))
196- then throw(("Incorrect asset attached, please attach or send " + EnterAssetID))
197- else if ((CheckUSDTBalance == 0))
198- then throw("Swap Pair Need to Add Liquidity first into Pool. Only After that Pair will be activated for Swapping.")
199- else if ((CheckAssetBalance == 0))
200- then throw("Swap Pair Need to Add Liquidity first into Pool. Only After that Pair will be activated for Swapping.")
201- else if ((10000000 > quantityofpriceasset))
202- then throw((("Your Attached Asset Amount is very low. Attach More " + EnterAssetID) + " Tokens to Claim the minimum Amount of 10 dollar atleast."))
203- else if ((quantityofpriceasset > CheckUSDTBalance))
204- then throw((("Pool Only has a Liquidity of " + toString((CheckUSDTBalance / pow(10, 0, 6, 0, 0, UP)))) + " USDT. Add Liquidity into Pool."))
205- else [IntegerEntry(((("Total_Swap_Fee_Collected_" + EnterAssetID) + "_") + toBase58String(USDTAssetID)), NewSumupofAssetToUSDTSwapFee), IntegerEntry(("Total_of_Pair_Txns_" + EnterAssetID), NewTPT), IntegerEntry(((("Balance_of_" + toBase58String(USDTAssetID)) + "_") + EnterAssetID), NewSumupofAssetBalance), IntegerEntry(((("Balance_of_" + EnterAssetID) + "_") + toBase58String(USDTAssetID)), NewSumupofUSDTBalance), ScriptTransfer(i.caller, userbalancetoreceive, USDTAssetID), ScriptTransfer(CollectUSDTSwapFeeAddress, SwapFeetoreceive, USDTAssetID)]
226+func Mint_BML (TokenName,TokenDescription) = {
227+ let asset = Issue(TokenName, TokenDescription, 1, 8, true)
228+ let assetId = calculateAssetId(asset)
229+ if ((i.caller != controller_address))
230+ then throw((("This Address is not Authorized. Only " + toString(controller_address)) + " is Authorized Address to Sign it."))
231+ else [asset, StringEntry("BML_TokenID", toBase58String(assetId)), Burn(assetId, 1)]
206232 }
207233
208234
209-
210-@Callable(i)
211-func SwapUSDTToAssetPairEntry (EnterAssetID) = {
212- let calleraddress = toBase58String(i.caller.bytes)
213- let pmt = if ((size(i.payments) == 1))
214- then i.payments[0]
215- else throw("Only USDT Token is required as an Attached payment[1].")
216- let CheckUSDTBalance = getIntegerValue(this, ((("Balance_of_" + EnterAssetID) + "_") + toBase58String(USDTAssetID)))
217- let CheckAssetBalance = getIntegerValue(this, ((("Balance_of_" + toBase58String(USDTAssetID)) + "_") + EnterAssetID))
218- let newbalanceofAsset = fraction(CheckUSDTBalance, CheckAssetBalance, (CheckUSDTBalance + pmt.amount))
219- let quantityofpriceasset = (CheckAssetBalance - newbalanceofAsset)
220- let checkpairisavailableornot = getString(this, ("Pair_UV_" + EnterAssetID))
221- let VotingStatus = getStringValue(this, ("Voting_Status_" + EnterAssetID))
222- let CurrentVotingStatus = "F"
223- let SwapFee = 3
224- let SwapFeetoreceive = ((quantityofpriceasset * SwapFee) / 1000)
225- let userbalancetoreceive = (quantityofpriceasset - SwapFeetoreceive)
226- let SumupofUSDTToAssetSwapFee = match getInteger(this, ("Total_Swap_Fee_Collected_" + EnterAssetID)) {
227- case a: Int =>
228- a
229- case _ =>
230- 0
231- }
232- let NewSumupofUSDTToAssetSwapFee = (SumupofUSDTToAssetSwapFee + SwapFeetoreceive)
233- let SumupAssetBalance = match getInteger(this, ((("Balance_of_" + toBase58String(USDTAssetID)) + "_") + EnterAssetID)) {
234- case a: Int =>
235- a
236- case _ =>
237- 0
238- }
239- let NewSumupofAssetBalance = (CheckAssetBalance - quantityofpriceasset)
240- let SumupUSDTBalance = match getInteger(this, ((("Balance_of_" + EnterAssetID) + "_") + toBase58String(USDTAssetID))) {
241- case a: Int =>
242- a
243- case _ =>
244- 0
245- }
246- let NewSumupofUSDTBalance = (CheckUSDTBalance + pmt.amount)
247- let TOPT = match getIntegerValue(this, ("Total_of_Pair_Txns_" + EnterAssetID)) {
248- case a: Int =>
249- a
250- case _ =>
251- 0
252- }
253- let NewTPT = (TOPT + 1)
254- if ((checkpairisavailableornot != EnterAssetID))
255- then throw("Pair is not available in Whitelisted Asset.")
256- else if ((VotingStatus == CurrentVotingStatus))
257- then throw((EnterAssetID + " is not A Whitelisted Token Yet."))
258- else if ((EnterAssetID == toBase58String(USDTAssetID)))
259- then throw("Input can Never be a USDT AssetID. Enter Whitelisted AssetID in input & Attach USDT as an attachment Token in payment[1].")
260- else if ((pmt.assetId != USDTAssetID))
261- then throw("You can Attach USDT as an Attached Payment[1] to Swap USDT To Required Token. Any other asset else than USDT will be rejected.")
262- else if ((10000000 > pmt.amount))
263- then throw("Your Attached USDT Amount is very low. Attach Atleast 10 USDT to Claim the minimum Tokens.")
264- else if ((CheckUSDTBalance == 0))
265- then throw("Swap Pair Need to Add Liquidity first into Pool. Only After that Pair will be activated for Swapping.")
266- else if ((CheckAssetBalance == 0))
267- then throw("Swap Pair Need to Add Liquidity first into Pool. Only After that Pair will be activated for Swapping.")
268- else if ((quantityofpriceasset > CheckAssetBalance))
269- then throw((("Pool Only has a Liquidity of " + toString(CheckAssetBalance)) + " Tokens. Add Liquidity into Pool."))
270- else [IntegerEntry(("Total_Swap_Fee_Collected_" + EnterAssetID), NewSumupofUSDTToAssetSwapFee), IntegerEntry(("Total_of_Pair_Txns_" + EnterAssetID), NewTPT), IntegerEntry(((("Balance_of_" + toBase58String(USDTAssetID)) + "_") + EnterAssetID), NewSumupofAssetBalance), IntegerEntry(((("Balance_of_" + EnterAssetID) + "_") + toBase58String(USDTAssetID)), NewSumupofUSDTBalance), ScriptTransfer(i.caller, userbalancetoreceive, fromBase58String(EnterAssetID)), ScriptTransfer(CollectAssetSwapFeeAddress, SwapFeetoreceive, fromBase58String(EnterAssetID))]
271- }
272-
273-
274-
275-@Callable(i)
276-func AddLiquidity (EnterAssetID) = {
277- let calleraddress = toBase58String(i.caller.bytes)
278- let pmt1 = value(i.payments[0])
279- let pmt2 = value(i.payments[1])
280- let checkpairisavailableornot = getString(this, ("Pair_UV_" + EnterAssetID))
281- let VotingStatus = getStringValue(this, ("Voting_Status_" + EnterAssetID))
282- let ReissueassetId = fromBase58String(valueOrErrorMessage(getString(this, ("LP_" + EnterAssetID)), "LP Token is Missing or May be not Generated."))
283- let CurrentVotingStatus = "F"
284- let CheckUSDTBalance = getIntegerValue(this, ((("Balance_of_" + EnterAssetID) + "_") + toBase58String(USDTAssetID)))
285- let CheckAssetBalance = getIntegerValue(this, ((("Balance_of_" + toBase58String(USDTAssetID)) + "_") + EnterAssetID))
286- let decimalsinfo = valueOrErrorMessage(assetInfo(fromBase58String(EnterAssetID)), (("Asset " + EnterAssetID) + " doesn't exist"))
287- let decimals = decimalsinfo.decimals
288- let arg1 = pow((CheckUSDTBalance / pow(10, 6, 6, 0, 0, UP)), 0, 1, 0, 0, UP)
289- let arg2 = pow((CheckAssetBalance / pow(10, decimals, decimals, 0, 0, UP)), 0, 1, 0, 0, UP)
290- let args3 = pow((((arg1 * 1000000) / arg2) * pow(10, 0, decimals, 0, 0, UP)), 0, 1, 0, 0, UP)
291- let bothassetsdecimals = (6 + decimals)
292- let sharedecimals = (bothassetsdecimals / 2)
293- let quantityofEnterAssetID = fraction(args3, pmt1.amount, pow(10, 0, bothassetsdecimals, 0, 0, UP))
294- let quantityofLPToken1 = pow((fraction(pmt1.amount, 1, pow(10, 0, decimals, 0, 0, UP)) * fraction(pmt2.amount, 1, pow(10, 0, 6, 0, 0, UP))), 0, 5, 1, sharedecimals, DOWN)
295- let USDTHoldingInPair = match getInteger(this, ((("Balance_of_" + EnterAssetID) + "_") + toBase58String(USDTAssetID))) {
296- case a: Int =>
297- a
298- case _ =>
299- 0
300- }
301- let NewUSDTHoldingInPair = (USDTHoldingInPair + pmt2.amount)
302- let AssetHoldingInPair = match getInteger(this, ((("Balance_of_" + toBase58String(USDTAssetID)) + "_") + EnterAssetID)) {
303- case a: Int =>
304- a
305- case _ =>
306- 0
307- }
308- let NewAssetHoldingInPair = (AssetHoldingInPair + pmt1.amount)
309- let LPTokenIssued = match getIntegerValue(this, ("Total_LP_" + EnterAssetID)) {
310- case a: Int =>
311- a
312- case _ =>
313- 0
314- }
315- let NewLPTokenIssued = (LPTokenIssued + quantityofLPToken1)
316- if ((checkpairisavailableornot != EnterAssetID))
317- then throw("Pair is not available in Whitelisted Asset.")
318- else if ((VotingStatus == CurrentVotingStatus))
319- then throw((EnterAssetID + " is not A Whitelisted Token Yet."))
320- else if ((EnterAssetID == toBase58String(USDTAssetID)))
321- then throw("Input can Never be a USDT AssetID. Enter Whitelisted AssetID in input as well as in payment[1] & Attach USDT as an attachment Token in payment[2].")
322- else if ((size(i.payments) != 2))
323- then throw("Two attached assets expected as payment in 50%-50%. Kindly Attach payment1 = Token you want to add for Liquidity & payment2 = Equivalent Amount of USDT Token.")
324- else if ((pmt1.assetId == USDTAssetID))
325- then throw("You Attached USDT asset in payment[1], please attach only whitelisted Token in payment[1] along with USDT in payment[2].")
326- else if ((pmt1.assetId != fromBase58String(EnterAssetID)))
327- then throw("Incorrect asset attached for Liquidity in payment[1], please attach String Asset or Whitelisted Token only.")
328- else if ((pmt1.assetId != fromBase58String(EnterAssetID)))
329- then throw("Incorrect asset attached for Liquidity in payment[1], please attach String Asset or Whitelisted Token only.")
330- else if ((pmt2.assetId != USDTAssetID))
331- then throw("Wrong Asset Attached in payments[2], Please attach payment[1] = Liquidity Token & payment[2] = USDT Token.")
332- else if ((10000000 > pmt2.amount))
333- then throw("please attach atleast 10 USDT in payment[2] & Equivalent worth of Token in payment[1]")
334- else if ((pmt2.amount != quantityofEnterAssetID))
335- then throw(("Attached payment[2] quantity is not matching as per attached payment[1].payment[2] must be " + toString(quantityofEnterAssetID)))
336- else [IntegerEntry(((("Balance_of_" + EnterAssetID) + "_") + toBase58String(USDTAssetID)), NewUSDTHoldingInPair), IntegerEntry(((("Balance_of_" + toBase58String(USDTAssetID)) + "_") + EnterAssetID), NewAssetHoldingInPair), IntegerEntry(("Total_LP_" + EnterAssetID), NewLPTokenIssued), Reissue(ReissueassetId, quantityofLPToken1, true), ScriptTransfer(i.caller, quantityofLPToken1, ReissueassetId)]
337- }
338-
339-
340-
341-@Callable(i)
342-func RemoveLiquidity (EnterAssetID) = {
343- let calleraddress = toBase58String(i.caller.bytes)
344- let pmt = if ((size(i.payments) == 1))
345- then i.payments[0]
346- else throw("No payment attached, Please Attach LP Token as payment[1].")
347- let checkpairisavailableornot = getString(this, ("Pair_UV_" + EnterAssetID))
348- let VotingStatus = getStringValue(this, ("Voting_Status_" + EnterAssetID))
349- let ReissueableassetId = fromBase58String(valueOrErrorMessage(getString(this, ("LP_" + EnterAssetID)), "LP Token is Missing or not Generated."))
350- let CurrentVotingStatus = "F"
351- let CheckUSDTBalance = getIntegerValue(this, ((("Balance_of_" + EnterAssetID) + "_") + toBase58String(USDTAssetID)))
352- let CheckAssetBalance = getIntegerValue(this, ((("Balance_of_" + toBase58String(USDTAssetID)) + "_") + EnterAssetID))
353- let decimalsinfo = valueOrErrorMessage(assetInfo(fromBase58String(EnterAssetID)), (("Asset " + EnterAssetID) + " doesn't exist"))
354- let decimals = decimalsinfo.decimals
355- let arg1 = pow((CheckUSDTBalance / pow(10, 6, 6, 0, 0, UP)), 0, 1, 0, 0, UP)
356- let arg2 = pow((CheckAssetBalance / pow(10, decimals, decimals, 0, 0, UP)), 0, 1, 0, 0, UP)
357- let args3 = pow((((arg1 * 1000000) / arg2) * pow(10, 0, decimals, 0, 0, UP)), 0, 1, 0, 0, UP)
358- let bothassetsdecimals = (6 + decimals)
359- let sharedecimals = (bothassetsdecimals / 2)
360- let SquareofAttachedPymt = fraction(pow(pmt.amount, sharedecimals, 2, 0, 6, HALFUP), 1, fraction(args3, 1, pow(10, 0, 6, 0, 0, UP)))
361- let SqrtofAttachPymt = pow(SquareofAttachedPymt, 0, 5, 1, sharedecimals, DOWN)
362- let UserLPWorth = fraction(args3, SqrtofAttachPymt, pow(10, 0, bothassetsdecimals, 0, 0, UP))
363- let USDTHoldingInPair = match getInteger(this, ((("Balance_of_" + EnterAssetID) + "_") + toBase58String(USDTAssetID))) {
364- case a: Int =>
365- a
366- case _ =>
367- 0
368- }
369- let NewUSDTHoldingInPair = (USDTHoldingInPair - UserLPWorth)
370- let AssetHoldingInPair = match getInteger(this, ((("Balance_of_" + toBase58String(USDTAssetID)) + "_") + EnterAssetID)) {
371- case a: Int =>
372- a
373- case _ =>
374- 0
375- }
376- let NewAssetHoldingInPair = (AssetHoldingInPair - SqrtofAttachPymt)
377- let LPTokenIssued = match getIntegerValue(this, ("Total_LP_" + EnterAssetID)) {
378- case a: Int =>
379- a
380- case _ =>
381- 0
382- }
383- let NewLPTokenIssued = (LPTokenIssued - pmt.amount)
384- if ((checkpairisavailableornot != EnterAssetID))
385- then throw("Pair is not available in Whitelist.")
386- else if ((VotingStatus == CurrentVotingStatus))
387- then throw((EnterAssetID + " is not A Whitelist Token Yet."))
388- else if ((fromBase58String(EnterAssetID) == USDTAssetID))
389- then throw("Don't choose USDT AssetID as Input, Only Whitelisted Asset as Input String & Attach LP Tokens as payment[1]")
390- else if ((pmt.assetId != ReissueableassetId))
391- then throw("Wrong Asset is attached in payment[1] or LP Token Not Found or Missing.")
392- else [Burn(ReissueableassetId, pmt.amount), IntegerEntry(("Total_LP_" + EnterAssetID), NewLPTokenIssued), IntegerEntry(((("Balance_of_" + EnterAssetID) + "_") + toBase58String(USDTAssetID)), NewUSDTHoldingInPair), IntegerEntry(((("Balance_of_" + toBase58String(USDTAssetID)) + "_") + EnterAssetID), NewAssetHoldingInPair), ScriptTransfer(i.caller, UserLPWorth, USDTAssetID), ScriptTransfer(i.caller, SqrtofAttachPymt, fromBase58String(EnterAssetID))]
393- }
394-
395-
396-
397-@Callable(i)
398-func RemoveEntry (Key,Key1,Key2,Key3) = [DeleteEntry(Key), DeleteEntry(Key1), DeleteEntry(Key2), DeleteEntry(Key3)]
399-
400-
401235 @Verifier(tx)
402-func verify () = match tx {
403- case _ =>
404- sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
405-}
236+func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
406237

github/deemru/w8io/169f3d6 
62.57 ms