tx · FwnPwB138LCiBcoDzXQyLdooWreJjjoXGzr8A1ooz7fy 3Mrnje6z2xa3xuXyU2Lk6ynKy8tsRnnt4Bv: -0.01400000 Waves 2021.08.20 10:42 [1666386] smart account 3Mrnje6z2xa3xuXyU2Lk6ynKy8tsRnnt4Bv > SELF 0.00000000 Waves
{ "type": 13, "id": "FwnPwB138LCiBcoDzXQyLdooWreJjjoXGzr8A1ooz7fy", "fee": 1400000, "feeAssetId": null, "timestamp": 1629445402006, "version": 2, "chainId": 84, "sender": "3Mrnje6z2xa3xuXyU2Lk6ynKy8tsRnnt4Bv", "senderPublicKey": "28sGn7FYnmxceAmnGYiDiKuMK1QyXiqX8zQXfKDnrc8t", "proofs": [ "4LHJnujJknhoFin2JxUgMTcwnsk2T1nTsENYsjYPRsTkmbwN8Kgdmf5sgTrvkrDPs8skVZhEN2ZaJfv1RzgmeuPM" ], "script": "base64:AAIEAAAAAAAAABwIAhIFCgMIAQESABIAEgMKAQgSAwoBCBIDCgEIAAAAAAAAAAYAAAABaQEAAAAVUmVnaXN0ZXJQYWlyRm9yVm90aW5nAAAAAwAAAAhBc3NldElEMQAAAARkYXlzAAAADExpc3RpbmdQcmljZQQAAAAEcG10MQkBAAAABXZhbHVlAAAAAQkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAQAAAAEcG10MgkBAAAABXZhbHVlAAAAAQkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAQQAAAAKRmVlQWRkcmVzcwEAAAAgcT857UGuwl6lKR6zURKH3pDKrZTlUMsXWQXYxcjWeBsEAAAAEW1heGltdW12b3RpbmdkYXlzAAAAAAAAAABaBAAAAA1CYWxsZXRBc3NldElEAQAAACAtb1sBuZ3lSm8ahGink+4TF5YYAu/xRHYwe1h195OooAQAAAALVVNEVEFzc2V0SUQBAAAAIF9XaRjICieBJvFbl+3E7E35wrtZyxIYi4RgoF+m9/zzBAAAAApjdXJyZW50S2V5CQACWAAAAAEIC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JAAEsAAAAAgIAAAAPVm90ZXNfUmVjZWl2ZWRfBQAAAAxFbnRlckFzc2V0SUQJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQkAASwAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAJUHJpY2VfT2ZfBQAAAAxFbnRlckFzc2V0SUQCAAAAAV8JAAJYAAAAAQUAAAALVVNEVEFzc2V0SUQFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAByRtYXRjaDAFAAAAAnR4CQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleSJPI+0=", "height": 1666386, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7xR5bA1iUyKumhV4EKY6me5VJ3JGAJF85fSuuGfq1qJX Next: DtrBggEtLXzNGhU4T7fabBGNjdcJn5VhKm5j5dzjPDXv Diff:
Old | New | Differences | |
---|---|---|---|
4 | 4 | ||
5 | 5 | ||
6 | 6 | @Callable(i) | |
7 | - | func RegisterPairForVoting (AssetID1,days) = { | |
7 | + | func RegisterPairForVoting (AssetID1,days,ListingPrice) = { | |
8 | 8 | let pmt1 = value(i.payments[0]) | |
9 | 9 | let pmt2 = value(i.payments[1]) | |
10 | 10 | let FeeAddress = base58'8d4zGuTjT3h67Z4DatzMXdXXW1GvoQhMTjwCGFxJuene' | |
29 | 29 | then throw("You Entered days greater than 90 please Enter no. of days in between 1 to 90.") | |
30 | 30 | else if ((fetchpair == AssetID1)) | |
31 | 31 | then throw("Pair Already Exist in Voting List.") | |
32 | - | else if ((size(i.payments) != | |
32 | + | else if ((size(i.payments) != 2)) | |
33 | 33 | then throw("Two attached assets expected as payment. Kindly Attach payment1 = Ballet Token and payment2 = Token you want to add to List for Voting.") | |
34 | 34 | else if ((pmt1.assetId != BalletAssetID)) | |
35 | 35 | then throw("Incorrect asset attached for Voting in payment[1], please attach 1000 Ballet Token only.") | |
41 | 41 | then throw("You Attached TN Asset ID for Voting, please attach the Token You want to list in payment[2].") | |
42 | 42 | else if ((pmt2.assetId == BalletAssetID)) | |
43 | 43 | then throw("You Attached Ballet asset for Voting in both payments, please attach the Token You want to list in payment[2].") | |
44 | - | else [StringEntry(("Pair_Under_Voting_" + AssetID1), AssetID1), StringEntry(("Voting_Status_" + AssetID1), votingstatus), IntegerEntry(("Voting_Start_Height_" + AssetID1), height), IntegerEntry(("Voting_End_Height_" + AssetID1), votingExpire), IntegerEntry(("Voting_Period_" + AssetID1), NoOfDaysBlocks), IntegerEntry(("Voting_Listing_Fee_" + AssetID1), pmt1.amount), IntegerEntry(("Votes_Required_" + AssetID1), votesrequired), IntegerEntry(("Votes_Received_" + AssetID1), 0), ScriptTransfer(addressFromPublicKey(FeeAddress), pmt1.amount, BalletAssetID)] | |
44 | + | else [StringEntry(("Pair_Under_Voting_" + AssetID1), AssetID1), StringEntry(("Voting_Status_" + AssetID1), votingstatus), IntegerEntry(("Voting_Start_Height_" + AssetID1), height), IntegerEntry(("Voting_End_Height_" + AssetID1), votingExpire), IntegerEntry(("Voting_Period_" + AssetID1), NoOfDaysBlocks), IntegerEntry(("Voting_Listing_Fee_" + AssetID1), pmt1.amount), IntegerEntry(("Votes_Required_" + AssetID1), votesrequired), IntegerEntry(("Votes_Received_" + AssetID1), 0), IntegerEntry(((("Price_Of_" + AssetID1) + "_") + toBase58String(USDTAssetID)), ListingPrice), ScriptTransfer(addressFromPublicKey(FeeAddress), pmt1.amount, BalletAssetID)] | |
45 | 45 | } | |
46 | 46 | ||
47 | 47 | ||
162 | 162 | @Callable(i) | |
163 | 163 | func RemovePairEntry (EnterAssetID) = { | |
164 | 164 | let adminrights = getStringValue(this, "Polarity_Admin_Rights") | |
165 | + | let USDTAssetID = base58'7RB3BWayeCVPq3kkpkeJZAFv2DYCB5gEwnutEpRofaw4' | |
165 | 166 | let checkprojectexpireheight = getIntegerValue(this, ("Voting_End_Height_" + EnterAssetID)) | |
166 | 167 | let checkpairisavailableornot = getString(this, ("Pair_Under_Voting_" + EnterAssetID)) | |
167 | 168 | let VotingStatus = getStringValue(this, ("Voting_Status_" + EnterAssetID)) | |
177 | 178 | then throw((("Voting Already Running. You can remove the pair after " + toString(pendingblocksforprojectexpire)) + " Blocks")) | |
178 | 179 | else if ((VotingStatus == NewVotingStatus)) | |
179 | 180 | then throw((EnterAssetID + " is now Whitelisted. So you can't remove it.")) | |
180 | - | else [DeleteEntry(("Pair_Under_Voting_" + EnterAssetID)), DeleteEntry(("Voting_Start_Height_" + EnterAssetID)), DeleteEntry(("Voting_End_Height_" + EnterAssetID)), DeleteEntry(("Voting_Period_" + EnterAssetID)), DeleteEntry(("Votes_Required_" + EnterAssetID)), DeleteEntry(("Voting_Listing_Fee_" + EnterAssetID)), DeleteEntry(("Voting_Status_" + EnterAssetID)), DeleteEntry(("Votes_Received_" + EnterAssetID))] | |
181 | + | else [DeleteEntry(("Pair_Under_Voting_" + EnterAssetID)), DeleteEntry(("Voting_Start_Height_" + EnterAssetID)), DeleteEntry(("Voting_End_Height_" + EnterAssetID)), DeleteEntry(("Voting_Period_" + EnterAssetID)), DeleteEntry(("Votes_Required_" + EnterAssetID)), DeleteEntry(("Voting_Listing_Fee_" + EnterAssetID)), DeleteEntry(("Voting_Status_" + EnterAssetID)), DeleteEntry(("Votes_Received_" + EnterAssetID)), DeleteEntry(((("Price_Of_" + EnterAssetID) + "_") + toBase58String(USDTAssetID)))] | |
181 | 182 | } | |
182 | 183 | ||
183 | 184 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | ||
5 | 5 | ||
6 | 6 | @Callable(i) | |
7 | - | func RegisterPairForVoting (AssetID1,days) = { | |
7 | + | func RegisterPairForVoting (AssetID1,days,ListingPrice) = { | |
8 | 8 | let pmt1 = value(i.payments[0]) | |
9 | 9 | let pmt2 = value(i.payments[1]) | |
10 | 10 | let FeeAddress = base58'8d4zGuTjT3h67Z4DatzMXdXXW1GvoQhMTjwCGFxJuene' | |
11 | 11 | let maximumvotingdays = 90 | |
12 | 12 | let BalletAssetID = base58'44Mq8KqUhM94t93MiBq3S22iiuGczMxpKmse5dBy2w5y' | |
13 | 13 | let USDTAssetID = base58'7RB3BWayeCVPq3kkpkeJZAFv2DYCB5gEwnutEpRofaw4' | |
14 | 14 | let currentKey = toBase58String(i.caller.bytes) | |
15 | 15 | let TN = !(isDefined(pmt2.assetId)) | |
16 | 16 | let oneday = 1440 | |
17 | 17 | let NoOfDaysBlocks = (oneday * days) | |
18 | 18 | let gap = (NoOfDaysBlocks - 43199) | |
19 | 19 | let votesrequired = ((100000 + ((11574 * gap) / 10000)) * 100000000) | |
20 | 20 | let votingExpire = (height + NoOfDaysBlocks) | |
21 | 21 | let fetchpair = getString(this, ("Pair_Under_Voting_" + AssetID1)) | |
22 | 22 | let votingstatus = "Fail" | |
23 | 23 | let assetinfopmt2 = fromBase58String(AssetID1) | |
24 | 24 | if ((43 > size(AssetID1))) | |
25 | 25 | then throw("Wrong AssetID1 is Entered for Voting. Please Enter a Valid AssetID1. Probably you entered an ASSETID1 less than 43 Chars.") | |
26 | 26 | else if ((29 >= days)) | |
27 | 27 | then throw("Enter no. of days in between 30 to 90.") | |
28 | 28 | else if ((days > maximumvotingdays)) | |
29 | 29 | then throw("You Entered days greater than 90 please Enter no. of days in between 1 to 90.") | |
30 | 30 | else if ((fetchpair == AssetID1)) | |
31 | 31 | then throw("Pair Already Exist in Voting List.") | |
32 | - | else if ((size(i.payments) != | |
32 | + | else if ((size(i.payments) != 2)) | |
33 | 33 | then throw("Two attached assets expected as payment. Kindly Attach payment1 = Ballet Token and payment2 = Token you want to add to List for Voting.") | |
34 | 34 | else if ((pmt1.assetId != BalletAssetID)) | |
35 | 35 | then throw("Incorrect asset attached for Voting in payment[1], please attach 1000 Ballet Token only.") | |
36 | 36 | else if ((40000000 > pmt1.amount)) | |
37 | 37 | then throw((((("You attached only " + toString(fraction(pmt1.amount, 1, 100000000))) + ".") + toString(fraction(pmt1.amount, 1, 10000000))) + " Ballet for Voting in payment[1], please attach 1000 Ballet Token only.")) | |
38 | 38 | else if ((pmt2.assetId != assetinfopmt2)) | |
39 | 39 | then throw("Asset String Attached in ASSETID1 is not matching with Payment2 AssetID.") | |
40 | 40 | else if ((TN == true)) | |
41 | 41 | then throw("You Attached TN Asset ID for Voting, please attach the Token You want to list in payment[2].") | |
42 | 42 | else if ((pmt2.assetId == BalletAssetID)) | |
43 | 43 | then throw("You Attached Ballet asset for Voting in both payments, please attach the Token You want to list in payment[2].") | |
44 | - | else [StringEntry(("Pair_Under_Voting_" + AssetID1), AssetID1), StringEntry(("Voting_Status_" + AssetID1), votingstatus), IntegerEntry(("Voting_Start_Height_" + AssetID1), height), IntegerEntry(("Voting_End_Height_" + AssetID1), votingExpire), IntegerEntry(("Voting_Period_" + AssetID1), NoOfDaysBlocks), IntegerEntry(("Voting_Listing_Fee_" + AssetID1), pmt1.amount), IntegerEntry(("Votes_Required_" + AssetID1), votesrequired), IntegerEntry(("Votes_Received_" + AssetID1), 0), ScriptTransfer(addressFromPublicKey(FeeAddress), pmt1.amount, BalletAssetID)] | |
44 | + | else [StringEntry(("Pair_Under_Voting_" + AssetID1), AssetID1), StringEntry(("Voting_Status_" + AssetID1), votingstatus), IntegerEntry(("Voting_Start_Height_" + AssetID1), height), IntegerEntry(("Voting_End_Height_" + AssetID1), votingExpire), IntegerEntry(("Voting_Period_" + AssetID1), NoOfDaysBlocks), IntegerEntry(("Voting_Listing_Fee_" + AssetID1), pmt1.amount), IntegerEntry(("Votes_Required_" + AssetID1), votesrequired), IntegerEntry(("Votes_Received_" + AssetID1), 0), IntegerEntry(((("Price_Of_" + AssetID1) + "_") + toBase58String(USDTAssetID)), ListingPrice), ScriptTransfer(addressFromPublicKey(FeeAddress), pmt1.amount, BalletAssetID)] | |
45 | 45 | } | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | ||
49 | 49 | @Callable(i) | |
50 | 50 | func IssueBallet () = { | |
51 | 51 | let pmt = value(i.payments[0]) | |
52 | 52 | let currentKey = toBase58String(i.caller.bytes) | |
53 | 53 | let BalletAssetID = base58'44Mq8KqUhM94t93MiBq3S22iiuGczMxpKmse5dBy2w5y' | |
54 | 54 | let PricePerBallet = getIntegerValue(this, "BALLET/TN") | |
55 | 55 | let NewBalletToUser = fraction(100000, pmt.amount, PricePerBallet) | |
56 | 56 | let PreviousIssuedBallet = getIntegerValue(this, "Total_Issued_Ballet:") | |
57 | 57 | let TotalIssuedBallet = (PreviousIssuedBallet + NewBalletToUser) | |
58 | 58 | let PreviousBalletReserveValue = getIntegerValue(this, "Total_Ballet_Reserve_In_TN:") | |
59 | 59 | let BalletReserveValue = (PreviousBalletReserveValue + pmt.amount) | |
60 | 60 | let PreviousBalletBackupPrice = getIntegerValue(this, "Ballet_Backup_Value_In_TN:") | |
61 | 61 | let BalletBackupPrice = fraction(100000, BalletReserveValue, TotalIssuedBallet) | |
62 | 62 | let FeeAddress = base58'8d4zGuTjT3h67Z4DatzMXdXXW1GvoQhMTjwCGFxJuene' | |
63 | 63 | if (isDefined(pmt.assetId)) | |
64 | 64 | then throw("Incorrect asset attached, please attach TN.") | |
65 | 65 | else if ((5000000 > pmt.amount)) | |
66 | 66 | then throw("Please Attach minimum 0.05 TN To Issue Ballet Asset.") | |
67 | 67 | else [IntegerEntry("Total_Issued_Ballet:", TotalIssuedBallet), IntegerEntry("Total_Ballet_Reserve_In_TN:", BalletReserveValue), IntegerEntry("Ballet_Backup_Value_In_TN:", BalletBackupPrice), StringEntry("message", "<h1>Ballet Issued Successfully!</h1><br>"), Reissue(BalletAssetID, NewBalletToUser, true), ScriptTransfer(i.caller, ((NewBalletToUser * 99) / 100), BalletAssetID), ScriptTransfer(addressFromPublicKey(FeeAddress), ((NewBalletToUser * 1) / 100), BalletAssetID)] | |
68 | 68 | } | |
69 | 69 | ||
70 | 70 | ||
71 | 71 | ||
72 | 72 | @Callable(i) | |
73 | 73 | func Liquidate () = { | |
74 | 74 | let currentKey = toBase58String(i.callerPublicKey) | |
75 | 75 | let pmt = value(i.payments[0]) | |
76 | 76 | let BalletAssetID = base58'44Mq8KqUhM94t93MiBq3S22iiuGczMxpKmse5dBy2w5y' | |
77 | 77 | let PreviousIssuedBallet = getIntegerValue(this, "Total_Issued_Ballet:") | |
78 | 78 | let TotalIssuedBallet = (PreviousIssuedBallet - pmt.amount) | |
79 | 79 | let PreviousBalletReserveValue = getIntegerValue(this, "Total_Ballet_Reserve_In_TN:") | |
80 | 80 | let PreviousBalletBackupPrice = getIntegerValue(this, "Ballet_Backup_Value_In_TN:") | |
81 | 81 | let calculateburnvalue = fraction(PreviousBalletBackupPrice, pmt.amount, 100000) | |
82 | 82 | let BalletReserveValue = (PreviousBalletReserveValue - calculateburnvalue) | |
83 | 83 | let BalletBackupPrice = fraction(100000, BalletReserveValue, TotalIssuedBallet) | |
84 | 84 | if ((pmt.assetId != BalletAssetID)) | |
85 | 85 | then throw("Kindly Deposit Only 44Mq8KqUhM94t93MiBq3S22iiuGczMxpKmse5dBy2w5y (Ballet).") | |
86 | 86 | else if ((100000 > pmt.amount)) | |
87 | 87 | then throw("Attach Amount must be greater than 0.001 Ballet.") | |
88 | 88 | else [Burn(BalletAssetID, pmt.amount), IntegerEntry("Total_Issued_Ballet:", TotalIssuedBallet), IntegerEntry("Total_Ballet_Reserve_In_TN:", BalletReserveValue), IntegerEntry("Ballet_Backup_Value_In_TN:", BalletBackupPrice), ScriptTransfer(i.caller, calculateburnvalue, unit)] | |
89 | 89 | } | |
90 | 90 | ||
91 | 91 | ||
92 | 92 | ||
93 | 93 | @Callable(i) | |
94 | 94 | func DoVoting (EnterAssetID) = { | |
95 | 95 | let pmt = if ((size(i.payments) == 1)) | |
96 | 96 | then i.payments[0] | |
97 | 97 | else throw("Ballet Token is required as Attached payment") | |
98 | 98 | let calleraddress = toBase58String(i.caller.bytes) | |
99 | 99 | let BalletAssetID = base58'44Mq8KqUhM94t93MiBq3S22iiuGczMxpKmse5dBy2w5y' | |
100 | 100 | let NewVotingStatus = "Pass" | |
101 | 101 | let checkprojectexpireheight = getIntegerValue(this, ("Voting_End_Height_" + EnterAssetID)) | |
102 | 102 | let checkpairisavailableornot = getString(this, ("Pair_Under_Voting_" + EnterAssetID)) | |
103 | 103 | let checkvotesrequired = getIntegerValue(this, ("Votes_Required_" + EnterAssetID)) | |
104 | 104 | let checkvotesreceived = getIntegerValue(this, ("Votes_Received_" + EnterAssetID)) | |
105 | 105 | let VotingStatus = getStringValue(this, ("Voting_Status_" + EnterAssetID)) | |
106 | 106 | let currentvotes = match getInteger(this, ("Votes_Received_" + EnterAssetID)) { | |
107 | 107 | case a: Int => | |
108 | 108 | a | |
109 | 109 | case _ => | |
110 | 110 | 0 | |
111 | 111 | } | |
112 | 112 | let newvotescount = (currentvotes + pmt.amount) | |
113 | 113 | let individualvotes = match getInteger(this, ((("Votes_Received_" + calleraddress) + "_") + EnterAssetID)) { | |
114 | 114 | case b: Int => | |
115 | 115 | b | |
116 | 116 | case _ => | |
117 | 117 | 0 | |
118 | 118 | } | |
119 | 119 | let individualvotescount = (individualvotes + pmt.amount) | |
120 | 120 | let checkwhitelist = (checkvotesreceived >= checkvotesrequired) | |
121 | 121 | let info = valueOrErrorMessage(assetInfo(fromBase58String(EnterAssetID)), (("Asset " + EnterAssetID) + " doesn't exist")) | |
122 | 122 | let decimals = info.decimals | |
123 | 123 | if ((checkpairisavailableornot != EnterAssetID)) | |
124 | 124 | then throw("Pair is not available in Voting List.") | |
125 | 125 | else if ((height > checkprojectexpireheight)) | |
126 | 126 | then throw((("Voting timeline for " + EnterAssetID) + " is expired.")) | |
127 | 127 | else if ((pmt.assetId != BalletAssetID)) | |
128 | 128 | then throw("Kindly Attach Only 44Mq8KqUhM94t93MiBq3S22iiuGczMxpKmse5dBy2w5y (Ballet).") | |
129 | 129 | else if ((VotingStatus == NewVotingStatus)) | |
130 | 130 | then throw((("Voting for " + EnterAssetID) + " pair is completed and it’s available in whitelist.")) | |
131 | 131 | else if (checkwhitelist) | |
132 | 132 | then [StringEntry(("Voting_Status_" + EnterAssetID), NewVotingStatus), IntegerEntry(("Decimals_of_" + EnterAssetID), decimals)] | |
133 | 133 | else [IntegerEntry(("Votes_Received_" + EnterAssetID), newvotescount), IntegerEntry(((("Votes_Received_" + calleraddress) + "_") + EnterAssetID), individualvotescount)] | |
134 | 134 | } | |
135 | 135 | ||
136 | 136 | ||
137 | 137 | ||
138 | 138 | @Callable(i) | |
139 | 139 | func WithdrawVotedTokens (EnterAssetID) = { | |
140 | 140 | let pmt = i.payments[0] | |
141 | 141 | let calleraddress = toBase58String(i.caller.bytes) | |
142 | 142 | let BalletAssetID = base58'44Mq8KqUhM94t93MiBq3S22iiuGczMxpKmse5dBy2w5y' | |
143 | 143 | let checkprojectexpireheight = getIntegerValue(this, ("Voting_End_Height_" + EnterAssetID)) | |
144 | 144 | let checkpairisavailableornot = getString(this, ("Pair_Under_Voting_" + EnterAssetID)) | |
145 | 145 | let checkuservotingbalance = getIntegerValue(this, ((("Votes_Received_" + calleraddress) + "_") + EnterAssetID)) | |
146 | 146 | let pendingblocksforprojectexpire = (checkprojectexpireheight - height) | |
147 | 147 | if ((checkpairisavailableornot != EnterAssetID)) | |
148 | 148 | then throw("Pair is not available in Voting List.") | |
149 | 149 | else if ((checkprojectexpireheight > height)) | |
150 | 150 | then throw((("Voting Already Running. You can withdraw your Ballet Token only after the expire of " + toString(pendingblocksforprojectexpire)) + " Blocks")) | |
151 | 151 | else if ((0 >= checkuservotingbalance)) | |
152 | 152 | then throw("You don't have any dues of ballet balance in this Voting Pair.") | |
153 | 153 | else if (isDefined(pmt.assetId)) | |
154 | 154 | then throw("Don't attach any asset. If you still want to support we accept only TN as payment.") | |
155 | 155 | else if ((pmt.amount != 10000000)) | |
156 | 156 | then throw("Please attach 0.1 TN as a fee to release your token.") | |
157 | 157 | else [IntegerEntry(((("Votes_Received_" + calleraddress) + "_") + EnterAssetID), 0), ScriptTransfer(i.caller, checkuservotingbalance, BalletAssetID)] | |
158 | 158 | } | |
159 | 159 | ||
160 | 160 | ||
161 | 161 | ||
162 | 162 | @Callable(i) | |
163 | 163 | func RemovePairEntry (EnterAssetID) = { | |
164 | 164 | let adminrights = getStringValue(this, "Polarity_Admin_Rights") | |
165 | + | let USDTAssetID = base58'7RB3BWayeCVPq3kkpkeJZAFv2DYCB5gEwnutEpRofaw4' | |
165 | 166 | let checkprojectexpireheight = getIntegerValue(this, ("Voting_End_Height_" + EnterAssetID)) | |
166 | 167 | let checkpairisavailableornot = getString(this, ("Pair_Under_Voting_" + EnterAssetID)) | |
167 | 168 | let VotingStatus = getStringValue(this, ("Voting_Status_" + EnterAssetID)) | |
168 | 169 | let NewVotingStatus = "Pass" | |
169 | 170 | let calleraddress = toBase58String(i.caller.bytes) | |
170 | 171 | let currentheight = height | |
171 | 172 | let pendingblocksforprojectexpire = (checkprojectexpireheight - height) | |
172 | 173 | if ((checkpairisavailableornot != EnterAssetID)) | |
173 | 174 | then throw("Pair is not available in Voting List.") | |
174 | 175 | else if ((adminrights != calleraddress)) | |
175 | 176 | then throw((("I know You are not An Admin. Only " + adminrights) + " has rights to remove the pair.")) | |
176 | 177 | else if ((checkprojectexpireheight > height)) | |
177 | 178 | then throw((("Voting Already Running. You can remove the pair after " + toString(pendingblocksforprojectexpire)) + " Blocks")) | |
178 | 179 | else if ((VotingStatus == NewVotingStatus)) | |
179 | 180 | then throw((EnterAssetID + " is now Whitelisted. So you can't remove it.")) | |
180 | - | else [DeleteEntry(("Pair_Under_Voting_" + EnterAssetID)), DeleteEntry(("Voting_Start_Height_" + EnterAssetID)), DeleteEntry(("Voting_End_Height_" + EnterAssetID)), DeleteEntry(("Voting_Period_" + EnterAssetID)), DeleteEntry(("Votes_Required_" + EnterAssetID)), DeleteEntry(("Voting_Listing_Fee_" + EnterAssetID)), DeleteEntry(("Voting_Status_" + EnterAssetID)), DeleteEntry(("Votes_Received_" + EnterAssetID))] | |
181 | + | else [DeleteEntry(("Pair_Under_Voting_" + EnterAssetID)), DeleteEntry(("Voting_Start_Height_" + EnterAssetID)), DeleteEntry(("Voting_End_Height_" + EnterAssetID)), DeleteEntry(("Voting_Period_" + EnterAssetID)), DeleteEntry(("Votes_Required_" + EnterAssetID)), DeleteEntry(("Voting_Listing_Fee_" + EnterAssetID)), DeleteEntry(("Voting_Status_" + EnterAssetID)), DeleteEntry(("Votes_Received_" + EnterAssetID)), DeleteEntry(((("Price_Of_" + EnterAssetID) + "_") + toBase58String(USDTAssetID)))] | |
181 | 182 | } | |
182 | 183 | ||
183 | 184 | ||
184 | 185 | @Verifier(tx) | |
185 | 186 | func verify () = match tx { | |
186 | 187 | case _ => | |
187 | 188 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
188 | 189 | } | |
189 | 190 |
github/deemru/w8io/026f985 55.06 ms ◑