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