tx · FdLHaeRqRh15YivVxV729uznRmwiSCFiuUUeH6bBxFLw

3N5bfRJRGX6vqJPKVaubUTWkgQRPTeAFMEa:  -0.01400000 Waves

2022.05.28 17:23 [2071636] smart account 3N5bfRJRGX6vqJPKVaubUTWkgQRPTeAFMEa > SELF 0.00000000 Waves

{ "type": 13, "id": "FdLHaeRqRh15YivVxV729uznRmwiSCFiuUUeH6bBxFLw", "fee": 1400000, "feeAssetId": null, "timestamp": 1653747796180, "version": 2, "chainId": 84, "sender": "3N5bfRJRGX6vqJPKVaubUTWkgQRPTeAFMEa", "senderPublicKey": "CYf1Tg7CgpZxaix8DPBSZAzFs5io8qAPuhbe3sproNmY", "proofs": [ "48uNWoM7DhPse26ESPQQXcRc2fG5zcyH4v1aTUdgKBdb2xGseVgpyKW3MYLAToTpWyBtgJMQQycjRU1AMZFa6dbi" ], "script": "base64:AAIFAAAAAAAAAAYIAhIAEgAAAAAFAAAAAAtVU1ROQXNzZXRJRAEAAAAgZT73g67dG4ChZhQ2CUXjfEpRH5dYyBAJkYT+Tc8rMrYAAAAAC1VTRFRBc3NldElEAQAAACD0NPJEoKaVcLA62QAal819hhYdQl83FUDxF7HRh6LUlwAAAAATSXNzdWVVU1RORmVlQWRkcmVzcwkBAAAAFGFkZHJlc3NGcm9tUHVibGljS2V5AAAAAQEAAAAgUoPZoIvXkJI7M+XgQERyG3Ox4PxeH5gdLMWeskjH4iAAAAAABHR4bnMEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwIAAAAJVG90YWx0eG5zAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAAAAAACXRvdGFsdHhucwkAAGQAAAACBQAAAAR0eG5zAAAAAAAAAAABAAAAAgAAAAFpAQAAAAlJc3N1ZVVTVE4AAAAABAAAAANwbXQDCQAAAAAAAAIJAAGQAAAAAQgFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAA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QAAAAxJbnRlZ2VyRW50cnkAAAACAgAAABpVU1ROX0JhY2t1cF9WYWx1ZV9Jbl9VU0RUOgUAAAAPVVNUTkJhY2t1cFByaWNlCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAICAAAAB21lc3NhZ2UCAAAAKjxoMT5VU1ROIExpcXVpZGF0ZWQgU3VjY2Vzc2Z1bGx5ITwvaDE+PGJyPgkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIJAABlAAAAAgUAAAASY2FsY3VsYXRlYnVybnZhbHVlBQAAAAtGZWVzQ2hhcmdlZAUAAAAEdW5pdAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAABNJc3N1ZVVTVE5GZWVBZGRyZXNzBQAAAAtGZWVzQ2hhcmdlZAUAAAALVVNUTkFzc2V0SUQFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAByRtYXRjaDAFAAAAAnR4CQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleRghYSM=", "height": 2071636, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3DJvWrMNbercNB5Rq4ckCuxUaq7bmqK5vgZoWP5QqxDU Next: EsEt4GJ4Z88S4e55HbN32nrobJUSD8zsbmyCTnnv5aWZ Diff:
OldNewDifferences
2929 let TotalIssuedUSTN = (PreviousIssuedUSTN + NewUSTNToUser)
3030 let PendingMinting = (USTNCurrentCap - TotalIssuedUSTN)
3131 let PreviousUSTNReserveValue = getIntegerValue(this, "Total_USTN_Reserve_In_USDT:")
32- let fee = match getInteger(this, "Total_Fee_Collected") {
33- case a: Int =>
34- a
35- case _ =>
36- 0
37- }
3832 let USTNReserveValue = (PreviousUSTNReserveValue + pmt.amount)
3933 let PreviousUSTNBackupPrice = getIntegerValue(this, "USTN_Backup_Value_In_USDT:")
4034 let USTNBackupPrice = fraction(100000, USTNReserveValue, TotalIssuedUSTN)
6458 let calculateburnvalue = fraction(PreviousUSTNBackupPrice, pmt.amount, 100000)
6559 let USTNReserveValue = (PreviousUSTNReserveValue - calculateburnvalue)
6660 let USTNBackupPrice = fraction(100000, USTNReserveValue, TotalIssuedUSTN)
61+ let fee = match getInteger(this, "Total_Fee_Collected") {
62+ case a: Int =>
63+ a
64+ case _ =>
65+ 0
66+ }
6767 let FeesCharged = 25000000
6868 if ((pmt.assetId != USTNAssetID))
6969 then throw((("Kindly Deposit Only " + toBase58String(USTNAssetID)) + " (USTN)."))
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let USTNAssetID = base58'7pDsD9A2rm9SvENMqNq5vwGmJn9nQJxbe492Pok1SHPs'
55
66 let USDTAssetID = base58'HSHJecCLGF7DEPA23dJe6WwroaLeDnik5eptjxEJYvwY'
77
88 let IssueUSTNFeeAddress = addressFromPublicKey(base58'6Z73KxcX3sugpiStpSRXxKxTmWqCaLVwFeM6kwyiKVDR')
99
1010 let txns = match getInteger(this, "Totaltxns") {
1111 case a: Int =>
1212 a
1313 case _ =>
1414 0
1515 }
1616
1717 let totaltxns = (txns + 1)
1818
1919 @Callable(i)
2020 func IssueUSTN () = {
2121 let pmt = if ((size(i.payments) == 1))
2222 then i.payments[0]
2323 else throw((("No Payments Attached Please Attach " + toBase58String(USDTAssetID)) + " Asset Only."))
2424 let currentKey = toBase58String(i.caller.bytes)
2525 let PricePerUSTN = getIntegerValue(this, "USTN/USDT")
2626 let USTNCurrentCap = getIntegerValue(this, "USTNCurrentCap")
2727 let NewUSTNToUser = fraction(100000, pmt.amount, PricePerUSTN)
2828 let PreviousIssuedUSTN = getIntegerValue(this, "Total_Issued_USTN:")
2929 let TotalIssuedUSTN = (PreviousIssuedUSTN + NewUSTNToUser)
3030 let PendingMinting = (USTNCurrentCap - TotalIssuedUSTN)
3131 let PreviousUSTNReserveValue = getIntegerValue(this, "Total_USTN_Reserve_In_USDT:")
32- let fee = match getInteger(this, "Total_Fee_Collected") {
33- case a: Int =>
34- a
35- case _ =>
36- 0
37- }
3832 let USTNReserveValue = (PreviousUSTNReserveValue + pmt.amount)
3933 let PreviousUSTNBackupPrice = getIntegerValue(this, "USTN_Backup_Value_In_USDT:")
4034 let USTNBackupPrice = fraction(100000, USTNReserveValue, TotalIssuedUSTN)
4135 if ((pmt.assetId != USDTAssetID))
4236 then throw("Incorrect asset attached, please attach USDT.")
4337 else if ((1000000 > pmt.amount))
4438 then throw("Please Attach minimum 0.01 USDT To Issue USTN Asset.")
4539 else if ((TotalIssuedUSTN > USTNCurrentCap))
4640 then throw((((((("USTN Minting is about to reach the Cap of " + toString(USTNCurrentCap)) + "/10^8 USTN. Please Reduce your Minting Order by ") + toString(PendingMinting)) + " or put ") + toString((USTNCurrentCap - PreviousIssuedUSTN))) + "/10^8"))
4741 else [IntegerEntry("Total_Issued_USTN:", TotalIssuedUSTN), IntegerEntry("Balance_Minting_USTN:", PendingMinting), IntegerEntry("Total_USTN_Reserve_In_USDT:", USTNReserveValue), IntegerEntry("USTN_Backup_Value_In_USDT:", USTNBackupPrice), IntegerEntry("Totaltxns", totaltxns), StringEntry("message", "<h1>USTN Issued Successfully!</h1><br>"), Reissue(USTNAssetID, NewUSTNToUser, true), ScriptTransfer(i.caller, NewUSTNToUser, USTNAssetID)]
4842 }
4943
5044
5145
5246 @Callable(i)
5347 func Liquidate () = {
5448 let currentKey = toBase58String(i.callerPublicKey)
5549 let pmt = value(i.payments[0])
5650 let PreviousIssuedUSTN = getIntegerValue(this, "Total_Issued_USTN:")
5751 let PreviousBurnedUSTN = getIntegerValue(this, "Total_Burned_USTN:")
5852 let USTNCurrentCap = getIntegerValue(this, "USTNCurrentCap")
5953 let TotalIssuedUSTN = (PreviousIssuedUSTN - pmt.amount)
6054 let TotalBurnedUSTN = (PreviousBurnedUSTN + pmt.amount)
6155 let PendingMinting = (USTNCurrentCap - TotalIssuedUSTN)
6256 let PreviousUSTNReserveValue = getIntegerValue(this, "Total_USTN_Reserve_In_USDT:")
6357 let PreviousUSTNBackupPrice = getIntegerValue(this, "USTN_Backup_Value_In_USDT:")
6458 let calculateburnvalue = fraction(PreviousUSTNBackupPrice, pmt.amount, 100000)
6559 let USTNReserveValue = (PreviousUSTNReserveValue - calculateburnvalue)
6660 let USTNBackupPrice = fraction(100000, USTNReserveValue, TotalIssuedUSTN)
61+ let fee = match getInteger(this, "Total_Fee_Collected") {
62+ case a: Int =>
63+ a
64+ case _ =>
65+ 0
66+ }
6767 let FeesCharged = 25000000
6868 if ((pmt.assetId != USTNAssetID))
6969 then throw((("Kindly Deposit Only " + toBase58String(USTNAssetID)) + " (USTN)."))
7070 else if ((100000000 >= pmt.amount))
7171 then throw("Attach Amount must be greater than or equal to 1 USTN.")
7272 else [Burn(USTNAssetID, pmt.amount), IntegerEntry("Totaltxns", totaltxns), IntegerEntry("Total_Issued_USTN:", TotalIssuedUSTN), IntegerEntry("Total_Fee_Collected", FeesCharged), IntegerEntry("Total_Burned_USTN:", TotalBurnedUSTN), IntegerEntry("Balance_Minting_USTN:", PendingMinting), IntegerEntry("Total_USTN_Reserve_In_USDT:", USTNReserveValue), IntegerEntry("USTN_Backup_Value_In_USDT:", USTNBackupPrice), StringEntry("message", "<h1>USTN Liquidated Successfully!</h1><br>"), ScriptTransfer(i.caller, (calculateburnvalue - FeesCharged), unit), ScriptTransfer(IssueUSTNFeeAddress, FeesCharged, USTNAssetID)]
7373 }
7474
7575
7676 @Verifier(tx)
7777 func verify () = match tx {
7878 case _ =>
7979 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
8080 }
8181

github/deemru/w8io/169f3d6 
131.20 ms