tx · BnD6je8YQg5BCFX5tegRxjZWkmgqLX8Y5x68W6Y2UmE2

3Mrnje6z2xa3xuXyU2Lk6ynKy8tsRnnt4Bv:  -0.01400000 Waves

2021.08.11 15:36 [1653715] smart account 3Mrnje6z2xa3xuXyU2Lk6ynKy8tsRnnt4Bv > SELF 0.00000000 Waves

{ "type": 13, "id": "BnD6je8YQg5BCFX5tegRxjZWkmgqLX8Y5x68W6Y2UmE2", "fee": 1400000, "feeAssetId": null, "timestamp": 1628685369986, "version": 2, "chainId": 84, "sender": "3Mrnje6z2xa3xuXyU2Lk6ynKy8tsRnnt4Bv", "senderPublicKey": "28sGn7FYnmxceAmnGYiDiKuMK1QyXiqX8zQXfKDnrc8t", "proofs": [ "3aL1xTWv1XC8N5VVJtYpePtSZg9Zz2g93xF9NSBF5ksXpXm99MshkfGExibYorqtqkT9NZhJWNztWiWc2vN4mpE9" ], "script": "base64:AAIDAAAAAAAAAAgIARIECgIIAQAAAAEBAAAAD2NoZWNrVm90aW5nUGFpcgAAAAEAAAAIQXNzZXRJRDEEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwUAAAAIQXNzZXRJRDEDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQIAAAAETk9ORQAAAAEAAAABaQEAAAAGVm90aW5nAAAAAgAAAAhBc3NldElEMQAAAARkYXlzBAAAAANwbXQJAQAAAAdleHRyYWN0AAAAAQgFAAAAAWkAAAAHcGF5bWVudAQAAAARbWF4aW11bXZvdGluZ2RheXMAAAAAAAAAAFoEAAAADUJhbGxldEFzc2V0SUQBAAAAIC1vWwG5neVKbxqEaKeT7hMXlhgC7/FEdjB7WHX3k6igBAAAAAtVU0RUQXNzZXRJRAEAAAAgX1dpGMgKJ4Em8VuX7cTsTfnCu1nLEhiLhGCgX6b3/PMEAAAAD1ZvdGluZ1BhaXJFeGlzdAkBAAAAD2NoZWNrVm90aW5nUGFpcgAAAAEFAAAACEFzc2V0SUQxAwkBAAAAAiE9AAAAAgUAAAAPVm90aW5nUGFpckV4aXN0AgAAAAROT05FCQAAAgAAAAECAAAAHlRoaXMgVm90aW5nIFBhaXIgYWxyZWFkeSBFeGlzdAMJAABmAAAAAgkAATEAAAABBQAAAAhBc3NldElEMQAAAAAAAAAALAkAAAIAAAABAgAAAENXcm9uZyBBc3NldElEMSBpcyBFbnRlcmVkIGZvciBWb3RpbmcuIFBsZWFzZSBFbnRlciBhIFZhbGlkIEFzc2V0SUQxAwkBAAAAAiE9AAAAAggFAAAAA3BtdAAAAAdhc3NldElkBQAAAA1CYWxsZXRBc3NldElECQAAAgAAAAECAAAARUluY29ycmVjdCBhc3NldCBhdHRhY2hlZCBmb3IgVm90aW5nLCBwbGVhc2UgYXR0YWNoIEJhbGxldCBUb2tlbiBvbmx5LgQAAAAKY3VycmVudEtleQkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzCQEAAAAMU2NyaXB0UmVzdWx0AAAAAgkBAAAACFdyaXRlU2V0AAAAAQUAAAADbmlsCQEAAAALVHJhbnNmZXJTZXQAAAABBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAABAAAAAckbWF0Y2gwBQAAAAJ0eAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkSHHml", "height": 1653715, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: ARdfPBYdCpUnJCCJQcAWmgPUcP7wDjS1ELof96dPRULV Next: 51dAouHTHtkJMAQKn8A4nPxmmakfxGFVRkRoLMWSPeAS Full:
OldNewDifferences
1-{-# STDLIB_VERSION 4 #-}
1+{-# STDLIB_VERSION 3 #-}
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+}
410
511
612 @Callable(i)
7-func IssueBallet () = {
8- let pmt = value(i.payments[0])
9- let currentKey = toBase58String(i.caller.bytes)
13+func Voting (AssetID1,days) = {
14+ let pmt = extract(i.payment)
15+ let maximumvotingdays = 90
1016 let BalletAssetID = base58'44Mq8KqUhM94t93MiBq3S22iiuGczMxpKmse5dBy2w5y'
11- let PricePerBallet = getIntegerValue(this, "BALLET/TN")
12- let NewBalletToUser = fraction(100000, pmt.amount, PricePerBallet)
13- let PreviousIssuedBallet = getIntegerValue(this, "Total_Issued_Ballet:")
14- let TotalIssuedBallet = (PreviousIssuedBallet + NewBalletToUser)
15- let PreviousBalletReserveValue = getIntegerValue(this, "Total_Ballet_Reserve_In_TN:")
16- let BalletReserveValue = (PreviousBalletReserveValue + pmt.amount)
17- let PreviousBalletBackupPrice = getIntegerValue(this, "Ballet_Backup_Value_In_TN:")
18- let BalletBackupPrice = fraction(100000, BalletReserveValue, TotalIssuedBallet)
19- let FeeAddress = base58'8d4zGuTjT3h67Z4DatzMXdXXW1GvoQhMTjwCGFxJuene'
20- if (isDefined(pmt.assetId))
21- then throw("Incorrect asset attached, please attach TN.")
22- else if ((5000000 > pmt.amount))
23- then throw("Please Attach minimum 0.05 TN To Issue Ballet Asset.")
24- 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)]
25- }
26-
27-
28-
29-@Callable(i)
30-func Liquidate () = {
31- let currentKey = toBase58String(i.callerPublicKey)
32- let pmt = value(i.payments[0])
33- let BalletAssetID = base58'44Mq8KqUhM94t93MiBq3S22iiuGczMxpKmse5dBy2w5y'
34- let PreviousIssuedBallet = getIntegerValue(this, "Total_Issued_Ballet:")
35- let TotalIssuedBallet = (PreviousIssuedBallet - pmt.amount)
36- let PreviousBalletReserveValue = getIntegerValue(this, "Total_Ballet_Reserve_In_TN:")
37- let PreviousBalletBackupPrice = getIntegerValue(this, "Ballet_Backup_Value_In_TN:")
38- let calculateburnvalue = fraction(PreviousBalletBackupPrice, pmt.amount, 100000)
39- let BalletReserveValue = (PreviousBalletReserveValue - calculateburnvalue)
40- let BalletBackupPrice = fraction(100000, BalletReserveValue, TotalIssuedBallet)
41- if ((pmt.assetId != BalletAssetID))
42- then throw("Kindly Deposit Only 44Mq8KqUhM94t93MiBq3S22iiuGczMxpKmse5dBy2w5y (Ballet).")
43- else if ((100000 > pmt.amount))
44- then throw("Attach Amount must be greater than 0.001 Ballet.")
45- 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)]
17+ let USDTAssetID = base58'7RB3BWayeCVPq3kkpkeJZAFv2DYCB5gEwnutEpRofaw4'
18+ let VotingPairExist = checkVotingPair(AssetID1)
19+ if ((VotingPairExist != "NONE"))
20+ then throw("This Voting Pair already Exist")
21+ else if ((size(AssetID1) > 44))
22+ then throw("Wrong AssetID1 is Entered for Voting. Please Enter a Valid AssetID1")
23+ else if ((pmt.assetId != BalletAssetID))
24+ then throw("Incorrect asset attached for Voting, please attach Ballet Token only.")
25+ else {
26+ let currentKey = toBase58String(i.caller.bytes)
27+ ScriptResult(WriteSet(nil), TransferSet(nil))
28+ }
4629 }
4730
4831
4932 @Verifier(tx)
50-func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
33+func verify () = match tx {
34+ case _ =>
35+ sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
36+}
5137

github/deemru/w8io/169f3d6 
33.61 ms