tx · 3DJvWrMNbercNB5Rq4ckCuxUaq7bmqK5vgZoWP5QqxDU

3N5bfRJRGX6vqJPKVaubUTWkgQRPTeAFMEa:  -0.01400000 Waves

2022.05.28 14:18 [2071631] smart account 3N5bfRJRGX6vqJPKVaubUTWkgQRPTeAFMEa > SELF 0.00000000 Waves

{ "type": 13, "id": "3DJvWrMNbercNB5Rq4ckCuxUaq7bmqK5vgZoWP5QqxDU", "fee": 1400000, "feeAssetId": null, "timestamp": 1653747522205, "version": 2, "chainId": 84, "sender": "3N5bfRJRGX6vqJPKVaubUTWkgQRPTeAFMEa", "senderPublicKey": "CYf1Tg7CgpZxaix8DPBSZAzFs5io8qAPuhbe3sproNmY", "proofs": [ "5QDxPYvcGNzMAq2UEuhiN7RJLSu75jcycZbVwgbqFoTaUF79yTdy6WB2hn5W98eWNTnTSTR6KbaBA8nHviYE7WRj" ], "script": "base64:AAIFAAAAAAAAAAYIAhIAEgAAAAAFAAAAAAtVU1ROQXNzZXRJRAEAAAAgZT73g67dG4ChZhQ2CUXjfEpRH5dYyBAJkYT+Tc8rMrYAAAAAC1VTRFRBc3NldElEAQAAACD0NPJEoKaVcLA62QAal819hhYdQl83FUDxF7HRh6LUlwAAAAATSXNzdWVVU1RORmVlQWRkcmVzcwkBAAAAFGFkZHJlc3NGcm9tUHVibGljS2V5AAAAAQEAAAAgUoPZoIvXkJI7M+XgQERyG3Ox4PxeH5gdLMWeskjH4iAAAAAABHR4bnMEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwIAAAAJVG90YWx0eG5zAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAAAAAACXRvdGFsdHhucwkAAGQAAAACBQAAAAR0eG5zAAAAAAAAAAABAAAAAgAAAAFpAQAAAAlJc3N1ZVVTVE4AAAAABAAAAANwbXQDCQAAAAAAAAIJAAGQAAAAAQgFAAAAAWkAAAAIcGF5bWVudH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lCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACAgAAABpVU1ROX0JhY2t1cF9WYWx1ZV9Jbl9VU0RUOgUAAAAPVVNUTkJhY2t1cFByaWNlCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAICAAAAB21lc3NhZ2UCAAAAKjxoMT5VU1ROIExpcXVpZGF0ZWQgU3VjY2Vzc2Z1bGx5ITwvaDE+PGJyPgkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIJAABlAAAAAgUAAAASY2FsY3VsYXRlYnVybnZhbHVlBQAAAAtGZWVzQ2hhcmdlZAUAAAAEdW5pdAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAABNJc3N1ZVVTVE5GZWVBZGRyZXNzBQAAAAtGZWVzQ2hhcmdlZAUAAAALVVNUTkFzc2V0SUQFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAByRtYXRjaDAFAAAAAnR4CQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tlecPmS4E=", "height": 2071631, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: vHtQaXJYMbudfbjxaCxQk3QAGCWsZMZ5omvSZNvJREN Next: FdLHaeRqRh15YivVxV729uznRmwiSCFiuUUeH6bBxFLw Diff:
OldNewDifferences
4040 let USTNBackupPrice = fraction(100000, USTNReserveValue, TotalIssuedUSTN)
4141 if ((pmt.assetId != USDTAssetID))
4242 then throw("Incorrect asset attached, please attach USDT.")
43- else if ((10000 > pmt.amount))
43+ else if ((1000000 > pmt.amount))
4444 then throw("Please Attach minimum 0.01 USDT To Issue USTN Asset.")
4545 else if ((TotalIssuedUSTN > USTNCurrentCap))
4646 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"))
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:")
3232 let fee = match getInteger(this, "Total_Fee_Collected") {
3333 case a: Int =>
3434 a
3535 case _ =>
3636 0
3737 }
3838 let USTNReserveValue = (PreviousUSTNReserveValue + pmt.amount)
3939 let PreviousUSTNBackupPrice = getIntegerValue(this, "USTN_Backup_Value_In_USDT:")
4040 let USTNBackupPrice = fraction(100000, USTNReserveValue, TotalIssuedUSTN)
4141 if ((pmt.assetId != USDTAssetID))
4242 then throw("Incorrect asset attached, please attach USDT.")
43- else if ((10000 > pmt.amount))
43+ else if ((1000000 > pmt.amount))
4444 then throw("Please Attach minimum 0.01 USDT To Issue USTN Asset.")
4545 else if ((TotalIssuedUSTN > USTNCurrentCap))
4646 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"))
4747 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)]
4848 }
4949
5050
5151
5252 @Callable(i)
5353 func Liquidate () = {
5454 let currentKey = toBase58String(i.callerPublicKey)
5555 let pmt = value(i.payments[0])
5656 let PreviousIssuedUSTN = getIntegerValue(this, "Total_Issued_USTN:")
5757 let PreviousBurnedUSTN = getIntegerValue(this, "Total_Burned_USTN:")
5858 let USTNCurrentCap = getIntegerValue(this, "USTNCurrentCap")
5959 let TotalIssuedUSTN = (PreviousIssuedUSTN - pmt.amount)
6060 let TotalBurnedUSTN = (PreviousBurnedUSTN + pmt.amount)
6161 let PendingMinting = (USTNCurrentCap - TotalIssuedUSTN)
6262 let PreviousUSTNReserveValue = getIntegerValue(this, "Total_USTN_Reserve_In_USDT:")
6363 let PreviousUSTNBackupPrice = getIntegerValue(this, "USTN_Backup_Value_In_USDT:")
6464 let calculateburnvalue = fraction(PreviousUSTNBackupPrice, pmt.amount, 100000)
6565 let USTNReserveValue = (PreviousUSTNReserveValue - calculateburnvalue)
6666 let USTNBackupPrice = fraction(100000, USTNReserveValue, TotalIssuedUSTN)
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 
31.51 ms