tx · 3RDYs5hs1bpaHRARjRLoEUmTkGf4DzdTprMaAANdQF5G 3Mrnje6z2xa3xuXyU2Lk6ynKy8tsRnnt4Bv: -0.01400000 Waves 2021.08.11 21:27 [1654059] smart account 3Mrnje6z2xa3xuXyU2Lk6ynKy8tsRnnt4Bv > SELF 0.00000000 Waves
{ "type": 13, "id": "3RDYs5hs1bpaHRARjRLoEUmTkGf4DzdTprMaAANdQF5G", "fee": 1400000, "feeAssetId": null, "timestamp": 1628706500149, "version": 2, "chainId": 84, "sender": "3Mrnje6z2xa3xuXyU2Lk6ynKy8tsRnnt4Bv", "senderPublicKey": "28sGn7FYnmxceAmnGYiDiKuMK1QyXiqX8zQXfKDnrc8t", "proofs": [ "4LySb6C6V88dYnFXhGYmKoSR3wod49FKN5q1Lt2gvjEajwYCkRFxp4hN3cAkzf53DnfEvQ68HVqJSYuhKkNAwSmh" ], "script": "base64:AAIEAAAAAAAAAAwIAhIECgIIARIAEgAAAAABAQAAAA9jaGVja1ZvdGluZ1BhaXIAAAABAAAACEFzc2V0SUQxBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAACEFzc2V0SUQxAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWECAAAABE5PTkUAAAADAAAAAWkBAAAABlZvdGluZwAAAAIAAAAIQXNzZXRJRDEAAAAEZGF5cwQAAAAEcG10MQkBAAAABXZhbHVlAAAAAQkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAQAAAAEcG10MgkBAAAABXZhbHVlAAAAAQkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAQQAAAARbWF4aW11bXZvdGluZ2RheXMAAAAAAAAAAFoEAAAADUJhbGxldEFzc2V0SUQBAAAAIC1vWwG5neVKbxqEaKeT7hMXlhgC7/FEdjB7WHX3k6igBAAAAAtVU0RUQXNzZXRJRAEAAAAgX1dpG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b2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5YbfUNQ==", "height": 1654059, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DQcyxi5dKb6DfeQTWuwsmDxuhqMFp5SWyWPJ7y7mgLyY Next: GXe8DY6JiUGwX7tfVrRa2sRDW4yvAtNt7bGeXrXVujqj Diff:
Old | New | Differences | |
---|---|---|---|
29 | 29 | then throw("Incorrect asset attached for Voting in payment[1], please attach 1000 Ballet Token only.") | |
30 | 30 | else if ((40000000 > pmt1.amount)) | |
31 | 31 | 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.")) | |
32 | - | else if ((TN == | |
32 | + | else if ((TN == true)) | |
33 | 33 | then throw("You Attached TN Asset ID for Voting, please attach the Token You want to list in payment[2].") | |
34 | 34 | else if ((pmt2.assetId == BalletAssetID)) | |
35 | 35 | then throw("You Attached Ballet asset for Voting in both payments, please attach the Token You want to list in payment[2].") |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func checkVotingPair (AssetID1) = match getString(this, AssetID1) { | |
5 | 5 | case a: String => | |
6 | 6 | a | |
7 | 7 | case _ => | |
8 | 8 | "NONE" | |
9 | 9 | } | |
10 | 10 | ||
11 | 11 | ||
12 | 12 | @Callable(i) | |
13 | 13 | func Voting (AssetID1,days) = { | |
14 | 14 | let pmt1 = value(i.payments[0]) | |
15 | 15 | let pmt2 = value(i.payments[1]) | |
16 | 16 | let maximumvotingdays = 90 | |
17 | 17 | let BalletAssetID = base58'44Mq8KqUhM94t93MiBq3S22iiuGczMxpKmse5dBy2w5y' | |
18 | 18 | let USDTAssetID = base58'7RB3BWayeCVPq3kkpkeJZAFv2DYCB5gEwnutEpRofaw4' | |
19 | 19 | let VotingPairExist = checkVotingPair(AssetID1) | |
20 | 20 | let currentKey = toBase58String(i.caller.bytes) | |
21 | 21 | let TN = !(isDefined(pmt2.assetId)) | |
22 | 22 | if ((VotingPairExist != "NONE")) | |
23 | 23 | then throw("This Voting Pair already Exist") | |
24 | 24 | else if ((44 > size(AssetID1))) | |
25 | 25 | then throw("Wrong AssetID1 is Entered for Voting. Please Enter a Valid AssetID1. Probably you entered an ASSETID1 less than 44 Chars.") | |
26 | 26 | else if ((size(i.payments) != 2)) | |
27 | 27 | then throw("Two attached assets expected as payment. Kindly Attach payment1 = Ballet Token and payment2 = Token You want to add to List for Voting.") | |
28 | 28 | else if ((pmt1.assetId != BalletAssetID)) | |
29 | 29 | then throw("Incorrect asset attached for Voting in payment[1], please attach 1000 Ballet Token only.") | |
30 | 30 | else if ((40000000 > pmt1.amount)) | |
31 | 31 | 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.")) | |
32 | - | else if ((TN == | |
32 | + | else if ((TN == true)) | |
33 | 33 | then throw("You Attached TN Asset ID for Voting, please attach the Token You want to list in payment[2].") | |
34 | 34 | else if ((pmt2.assetId == BalletAssetID)) | |
35 | 35 | then throw("You Attached Ballet asset for Voting in both payments, please attach the Token You want to list in payment[2].") | |
36 | 36 | else [StringEntry("TRDToUSDN_Swap_Address", currentKey), IntegerEntry("TRDToUSDN_Swap_Height", height)] | |
37 | 37 | } | |
38 | 38 | ||
39 | 39 | ||
40 | 40 | ||
41 | 41 | @Callable(i) | |
42 | 42 | func IssueBallet () = { | |
43 | 43 | let pmt = value(i.payments[0]) | |
44 | 44 | let currentKey = toBase58String(i.caller.bytes) | |
45 | 45 | let BalletAssetID = base58'44Mq8KqUhM94t93MiBq3S22iiuGczMxpKmse5dBy2w5y' | |
46 | 46 | let PricePerBallet = getIntegerValue(this, "BALLET/TN") | |
47 | 47 | let NewBalletToUser = fraction(100000, pmt.amount, PricePerBallet) | |
48 | 48 | let PreviousIssuedBallet = getIntegerValue(this, "Total_Issued_Ballet:") | |
49 | 49 | let TotalIssuedBallet = (PreviousIssuedBallet + NewBalletToUser) | |
50 | 50 | let PreviousBalletReserveValue = getIntegerValue(this, "Total_Ballet_Reserve_In_TN:") | |
51 | 51 | let BalletReserveValue = (PreviousBalletReserveValue + pmt.amount) | |
52 | 52 | let PreviousBalletBackupPrice = getIntegerValue(this, "Ballet_Backup_Value_In_TN:") | |
53 | 53 | let BalletBackupPrice = fraction(100000, BalletReserveValue, TotalIssuedBallet) | |
54 | 54 | let FeeAddress = base58'8d4zGuTjT3h67Z4DatzMXdXXW1GvoQhMTjwCGFxJuene' | |
55 | 55 | if (isDefined(pmt.assetId)) | |
56 | 56 | then throw("Incorrect asset attached, please attach TN.") | |
57 | 57 | else if ((5000000 > pmt.amount)) | |
58 | 58 | then throw("Please Attach minimum 0.05 TN To Issue Ballet Asset.") | |
59 | 59 | 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)] | |
60 | 60 | } | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | ||
64 | 64 | @Callable(i) | |
65 | 65 | func Liquidate () = { | |
66 | 66 | let currentKey = toBase58String(i.callerPublicKey) | |
67 | 67 | let pmt = value(i.payments[0]) | |
68 | 68 | let BalletAssetID = base58'44Mq8KqUhM94t93MiBq3S22iiuGczMxpKmse5dBy2w5y' | |
69 | 69 | let PreviousIssuedBallet = getIntegerValue(this, "Total_Issued_Ballet:") | |
70 | 70 | let TotalIssuedBallet = (PreviousIssuedBallet - pmt.amount) | |
71 | 71 | let PreviousBalletReserveValue = getIntegerValue(this, "Total_Ballet_Reserve_In_TN:") | |
72 | 72 | let PreviousBalletBackupPrice = getIntegerValue(this, "Ballet_Backup_Value_In_TN:") | |
73 | 73 | let calculateburnvalue = fraction(PreviousBalletBackupPrice, pmt.amount, 100000) | |
74 | 74 | let BalletReserveValue = (PreviousBalletReserveValue - calculateburnvalue) | |
75 | 75 | let BalletBackupPrice = fraction(100000, BalletReserveValue, TotalIssuedBallet) | |
76 | 76 | if ((pmt.assetId != BalletAssetID)) | |
77 | 77 | then throw("Kindly Deposit Only 44Mq8KqUhM94t93MiBq3S22iiuGczMxpKmse5dBy2w5y (Ballet).") | |
78 | 78 | else if ((100000 > pmt.amount)) | |
79 | 79 | then throw("Attach Amount must be greater than 0.001 Ballet.") | |
80 | 80 | 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)] | |
81 | 81 | } | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | @Verifier(tx) | |
85 | 85 | func verify () = match tx { | |
86 | 86 | case _ => | |
87 | 87 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
88 | 88 | } | |
89 | 89 |
github/deemru/w8io/026f985 26.37 ms ◑