tx · C5P19qGN9fzE7n3DnAbjjWstRTf6oSYhCNdcM1WCZN7m

3Mrnje6z2xa3xuXyU2Lk6ynKy8tsRnnt4Bv:  -0.01400000 Waves

2021.08.12 11:52 [1654947] smart account 3Mrnje6z2xa3xuXyU2Lk6ynKy8tsRnnt4Bv > SELF 0.00000000 Waves

{ "type": 13, "id": "C5P19qGN9fzE7n3DnAbjjWstRTf6oSYhCNdcM1WCZN7m", "fee": 1400000, "feeAssetId": null, "timestamp": 1628758346850, "version": 2, "chainId": 84, "sender": "3Mrnje6z2xa3xuXyU2Lk6ynKy8tsRnnt4Bv", "senderPublicKey": "28sGn7FYnmxceAmnGYiDiKuMK1QyXiqX8zQXfKDnrc8t", "proofs": [ "57sAr4urZiyADTSoA6xTdWeAVd9Kk7ddQFrCccjWcpxHKcsELo3AS4qxNQBYNscGZMk4DAqRzWNMXr3xAx9DrFuR" ], "script": "base64:AAIEAAAAAAAAAAwIAhIECgIIARIAEgAAAAAAAAAAAwAAAAFpAQAAABVSZWdpc3RlclBhaXJGb3JWb3RpbmcAAAACAAAACEFzc2V0SUQxAAAABGRheXMEAAAABHBtdDEJAQAAAAV2YWx1ZQAAAAEJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAEAAAABHBtdDIJAQAAAAV2YWx1ZQAAAAEJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAEEAAAAEW1heGltdW12b3RpbmdkYXlzAAAAAAAAAABaBAAAAA1CYWxsZXRBc3NldElEAQAAACAtb1sBuZ3lSm8ahGink+4TF5YYAu/xRHYwe1h195OooAQAAAALVVNEVEFzc2V0SUQBAAAAIF9XaRjICieBJvFbl+3E7E35wrtZyxIYi4RgoF+m9/zzBAAAAApjdXJyZW50S2V5CQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMEAAAAAlROCQEAAAABIQAAAAEJAQAAAAlpc0RlZmluZWQAAAABCAUAAAAEcG10MgAAAA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1ZWRCYWxsZXQDCQEAAAACIT0AAAACCAUAAAADcG10AAAAB2Fzc2V0SWQFAAAADUJhbGxldEFzc2V0SUQJAAACAAAAAQIAAABKS2luZGx5IERlcG9zaXQgT25seSA0NE1xOEtxVWhNOTR0OTNNaUJxM1MyMmlpdUdjek14cEttc2U1ZEJ5Mnc1eSAoQmFsbGV0KS4DCQAAZgAAAAIAAAAAAAABhqAIBQAAAANwbXQAAAAGYW1vdW50CQAAAgAAAAECAAAAMEF0dGFjaCBBbW91bnQgbXVzdCBiZSBncmVhdGVyIHRoYW4gMC4wMDEgQmFsbGV0LgkABEwAAAACCQEAAAAEQnVybgAAAAIFAAAADUJhbGxldEFzc2V0SUQIBQAAAANwbXQAAAAGYW1vdW50CQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACAgAAABRUb3RhbF9Jc3N1ZWRfQmFsbGV0OgUAAAARVG90YWxJc3N1ZWRCYWxsZXQJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAICAAAAG1RvdGFsX0JhbGxldF9SZXNlcnZlX0luX1ROOgUAAAASQmFsbGV0UmVzZXJ2ZVZhbHVlCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACAgAAABpCYWxsZXRfQmFja3VwX1ZhbHVlX0luX1ROOgUAAAARQmFsbGV0QmFja3VwUHJpY2UJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAABJjYWxjdWxhdGVidXJudmFsdWUFAAAABHVuaXQFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAByRtYXRjaDAFAAAAAnR4CQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleUFnUhA=", "height": 1654947, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2axr1n6FiMcLjRCi6QWxnFC2tAunVKdX3Ye6C23oTVid Next: BJR2NFBoSjB4jf4Qp8BAZyjyvDbKH9tWP1fnKYm5jxJz Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-func checkVotingPair (AssetID1) = match getString(this, AssetID1) {
5- case a: String =>
6- a
7- case _ =>
8- "NONE"
9-}
104
115
126 @Callable(i)
1913 let currentKey = toBase58String(i.caller.bytes)
2014 let TN = !(isDefined(pmt2.assetId))
2115 let oneday = 1440
22- let NoOfDaysBlocks = (1440 * days)
16+ let NoOfDaysBlocks = (oneday * days)
17+ let gap = (NoOfDaysBlocks - 43199)
18+ let votesrequired = (100000 + (fraction(11574, 1, 10000) * gap))
2319 let votingExpire = (height + NoOfDaysBlocks)
2420 let fetchpair = getString(this, ("Pair_Under_Voting_" + AssetID1))
2521 if ((44 > size(AssetID1)))
2622 then throw("Wrong AssetID1 is Entered for Voting. Please Enter a Valid AssetID1. Probably you entered an ASSETID1 less than 44 Chars.")
27- else if ((0 >= days))
28- then throw("Enter no. of days in between 1 to 90.")
23+ else if ((29 >= days))
24+ then throw("Enter no. of days in between 30 to 90.")
2925 else if ((days > maximumvotingdays))
3026 then throw("You Entered days greater than 90 please Enter no. of days in between 1 to 90.")
3127 else if ((fetchpair == AssetID1))
4036 then throw("You Attached TN Asset ID for Voting, please attach the Token You want to list in payment[2].")
4137 else if ((pmt2.assetId == BalletAssetID))
4238 then throw("You Attached Ballet asset for Voting in both payments, please attach the Token You want to list in payment[2].")
43- else [StringEntry(("Pair_Under_Voting_" + AssetID1), AssetID1), IntegerEntry(("Voting_Start_Height_" + AssetID1), height), IntegerEntry(("Voting_End_Height_" + AssetID1), votingExpire), IntegerEntry(("Voting_Period_" + AssetID1), NoOfDaysBlocks), IntegerEntry(("Voting_Listing_Fee_" + AssetID1), pmt1.amount)]
39+ else [StringEntry(("Pair_Under_Voting_" + AssetID1), AssetID1), 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), pmt1.amount)]
4440 }
4541
4642
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-func checkVotingPair (AssetID1) = match getString(this, AssetID1) {
5- case a: String =>
6- a
7- case _ =>
8- "NONE"
9-}
104
115
126 @Callable(i)
137 func RegisterPairForVoting (AssetID1,days) = {
148 let pmt1 = value(i.payments[0])
159 let pmt2 = value(i.payments[1])
1610 let maximumvotingdays = 90
1711 let BalletAssetID = base58'44Mq8KqUhM94t93MiBq3S22iiuGczMxpKmse5dBy2w5y'
1812 let USDTAssetID = base58'7RB3BWayeCVPq3kkpkeJZAFv2DYCB5gEwnutEpRofaw4'
1913 let currentKey = toBase58String(i.caller.bytes)
2014 let TN = !(isDefined(pmt2.assetId))
2115 let oneday = 1440
22- let NoOfDaysBlocks = (1440 * days)
16+ let NoOfDaysBlocks = (oneday * days)
17+ let gap = (NoOfDaysBlocks - 43199)
18+ let votesrequired = (100000 + (fraction(11574, 1, 10000) * gap))
2319 let votingExpire = (height + NoOfDaysBlocks)
2420 let fetchpair = getString(this, ("Pair_Under_Voting_" + AssetID1))
2521 if ((44 > size(AssetID1)))
2622 then throw("Wrong AssetID1 is Entered for Voting. Please Enter a Valid AssetID1. Probably you entered an ASSETID1 less than 44 Chars.")
27- else if ((0 >= days))
28- then throw("Enter no. of days in between 1 to 90.")
23+ else if ((29 >= days))
24+ then throw("Enter no. of days in between 30 to 90.")
2925 else if ((days > maximumvotingdays))
3026 then throw("You Entered days greater than 90 please Enter no. of days in between 1 to 90.")
3127 else if ((fetchpair == AssetID1))
3228 then throw("Pair Already Exist in Voting List.")
3329 else if ((size(i.payments) != 2))
3430 then throw("Two attached assets expected as payment. Kindly Attach payment1 = Ballet Token and payment2 = Token You want to add to List for Voting.")
3531 else if ((pmt1.assetId != BalletAssetID))
3632 then throw("Incorrect asset attached for Voting in payment[1], please attach 1000 Ballet Token only.")
3733 else if ((40000000 > pmt1.amount))
3834 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."))
3935 else if ((TN == true))
4036 then throw("You Attached TN Asset ID for Voting, please attach the Token You want to list in payment[2].")
4137 else if ((pmt2.assetId == BalletAssetID))
4238 then throw("You Attached Ballet asset for Voting in both payments, please attach the Token You want to list in payment[2].")
43- else [StringEntry(("Pair_Under_Voting_" + AssetID1), AssetID1), IntegerEntry(("Voting_Start_Height_" + AssetID1), height), IntegerEntry(("Voting_End_Height_" + AssetID1), votingExpire), IntegerEntry(("Voting_Period_" + AssetID1), NoOfDaysBlocks), IntegerEntry(("Voting_Listing_Fee_" + AssetID1), pmt1.amount)]
39+ else [StringEntry(("Pair_Under_Voting_" + AssetID1), AssetID1), 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), pmt1.amount)]
4440 }
4541
4642
4743
4844 @Callable(i)
4945 func IssueBallet () = {
5046 let pmt = value(i.payments[0])
5147 let currentKey = toBase58String(i.caller.bytes)
5248 let BalletAssetID = base58'44Mq8KqUhM94t93MiBq3S22iiuGczMxpKmse5dBy2w5y'
5349 let PricePerBallet = getIntegerValue(this, "BALLET/TN")
5450 let NewBalletToUser = fraction(100000, pmt.amount, PricePerBallet)
5551 let PreviousIssuedBallet = getIntegerValue(this, "Total_Issued_Ballet:")
5652 let TotalIssuedBallet = (PreviousIssuedBallet + NewBalletToUser)
5753 let PreviousBalletReserveValue = getIntegerValue(this, "Total_Ballet_Reserve_In_TN:")
5854 let BalletReserveValue = (PreviousBalletReserveValue + pmt.amount)
5955 let PreviousBalletBackupPrice = getIntegerValue(this, "Ballet_Backup_Value_In_TN:")
6056 let BalletBackupPrice = fraction(100000, BalletReserveValue, TotalIssuedBallet)
6157 let FeeAddress = base58'8d4zGuTjT3h67Z4DatzMXdXXW1GvoQhMTjwCGFxJuene'
6258 if (isDefined(pmt.assetId))
6359 then throw("Incorrect asset attached, please attach TN.")
6460 else if ((5000000 > pmt.amount))
6561 then throw("Please Attach minimum 0.05 TN To Issue Ballet Asset.")
6662 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)]
6763 }
6864
6965
7066
7167 @Callable(i)
7268 func Liquidate () = {
7369 let currentKey = toBase58String(i.callerPublicKey)
7470 let pmt = value(i.payments[0])
7571 let BalletAssetID = base58'44Mq8KqUhM94t93MiBq3S22iiuGczMxpKmse5dBy2w5y'
7672 let PreviousIssuedBallet = getIntegerValue(this, "Total_Issued_Ballet:")
7773 let TotalIssuedBallet = (PreviousIssuedBallet - pmt.amount)
7874 let PreviousBalletReserveValue = getIntegerValue(this, "Total_Ballet_Reserve_In_TN:")
7975 let PreviousBalletBackupPrice = getIntegerValue(this, "Ballet_Backup_Value_In_TN:")
8076 let calculateburnvalue = fraction(PreviousBalletBackupPrice, pmt.amount, 100000)
8177 let BalletReserveValue = (PreviousBalletReserveValue - calculateburnvalue)
8278 let BalletBackupPrice = fraction(100000, BalletReserveValue, TotalIssuedBallet)
8379 if ((pmt.assetId != BalletAssetID))
8480 then throw("Kindly Deposit Only 44Mq8KqUhM94t93MiBq3S22iiuGczMxpKmse5dBy2w5y (Ballet).")
8581 else if ((100000 > pmt.amount))
8682 then throw("Attach Amount must be greater than 0.001 Ballet.")
8783 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)]
8884 }
8985
9086
9187 @Verifier(tx)
9288 func verify () = match tx {
9389 case _ =>
9490 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
9591 }
9692

github/deemru/w8io/169f3d6 
46.68 ms