tx · ER6GS924y691gnqsHktKLKxHKCmyae3QFuRMGqbNaBRo

3MwJmgmMVD4KVZrhhAvmy3ufvDX9TN8xKa9:  -0.01400000 Waves

2022.05.29 11:16 [2072713] smart account 3MwJmgmMVD4KVZrhhAvmy3ufvDX9TN8xKa9 > SELF 0.00000000 Waves

{ "type": 13, "id": "ER6GS924y691gnqsHktKLKxHKCmyae3QFuRMGqbNaBRo", "fee": 1400000, "feeAssetId": null, "timestamp": 1653812195672, "version": 2, "chainId": 84, "sender": "3MwJmgmMVD4KVZrhhAvmy3ufvDX9TN8xKa9", "senderPublicKey": "8oL7nu18BhijZNKwmxWzaUpmNrA48i32oeCZiqKEKMYh", "proofs": [ "32jaeiuC19NQCZhy7YBkr2b1jnuwmvsi5e4dg41SgQEg4sha6AhE6YAN1hCt6mEAw1ypqvDkYZv57Av7emnqsHQU" ], "script": "base64:AAIFAAAAAAAAAAYIAhIAEgAAAAAFAAAAAAtVU1ROQXNzZXRJRAEAAAAgZT73g67dG4ChZhQ2CUXjfEpRH5dYyBAJkYT+Tc8rMrYAAAAAC1VTRFRBc3NldElEAQAAACD0NPJEoKaVcLA62QAal819hhYdQl83FUDxF7HRh6LUlwAAAAATSXNzdWVVU1RORmVlQWRkcmVzcwkBAAAAFGFkZHJlc3NGcm9tUHVibGljS2V5AAAAAQEAAAAgUoPZoIvXkJI7M+XgQERyG3Ox4PxeH5gdLMWeskjH4iAAAAAABHR4bnMEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwIAAAAJVG90YWx0eG5zAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAAAAAACXRvdGFsdHhucwkAAGQAAAACBQAAAAR0eG5zAAAAAAAAAAABAAAAAgAAAAFpAQAAAAlJc3N1ZVVTVE4AAAAABAAAAANwbXQDCQAAAAAAAAIJAAGQAAAAAQgFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAA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UQXNzZXRJRAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAABNJc3N1ZVVTVE5GZWVBZGRyZXNzBQAAAAtGZWVzQ2hhcmdlZAUAAAALVVNEVEFzc2V0SUQFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAByRtYXRjaDAFAAAAAnR4CQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleUngCto=", "height": 2072713, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: CSCUyZKaQtFB5nuAcVrpRfJoPghkABJrA1abzryGTBbs Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 5 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let USTNAssetID = base58'7pDsD9A2rm9SvENMqNq5vwGmJn9nQJxbe492Pok1SHPs'
5+
6+let USDTAssetID = base58'HSHJecCLGF7DEPA23dJe6WwroaLeDnik5eptjxEJYvwY'
7+
8+let IssueUSTNFeeAddress = addressFromPublicKey(base58'6Z73KxcX3sugpiStpSRXxKxTmWqCaLVwFeM6kwyiKVDR')
9+
10+let txns = match getInteger(this, "Totaltxns") {
11+ case a: Int =>
12+ a
13+ case _ =>
14+ 0
15+}
16+
17+let totaltxns = (txns + 1)
18+
19+@Callable(i)
20+func IssueUSTN () = {
21+ let pmt = if ((size(i.payments) == 1))
22+ then i.payments[0]
23+ else throw((("No Payments Attached Please Attach " + toBase58String(USDTAssetID)) + " Asset Only."))
24+ let currentKey = toBase58String(i.caller.bytes)
25+ let NewUSTNToUser = pmt.amount
26+ let PreviousIssuedUSTN = match getInteger(this, "Total_Issued_USTN:") {
27+ case a: Int =>
28+ a
29+ case _ =>
30+ 0
31+ }
32+ let TotalIssuedUSTN = (PreviousIssuedUSTN + NewUSTNToUser)
33+ let PreviousUSTNReserveValue = match getInteger(this, "Total_USTN_Reserve_In_USDT:") {
34+ case a: Int =>
35+ a
36+ case _ =>
37+ 0
38+ }
39+ let USTNReserveValue = (PreviousUSTNReserveValue + pmt.amount)
40+ if ((pmt.assetId != USDTAssetID))
41+ then throw("Incorrect asset attached, please attach USDT.")
42+ else if ((1000000 > pmt.amount))
43+ then throw("Please Attach minimum 0.01 USDT To Issue USTN Asset.")
44+ else [IntegerEntry("Total_Issued_USTN:", TotalIssuedUSTN), IntegerEntry("Total_USTN_Reserve_In_USDT:", USTNReserveValue), IntegerEntry("Totaltxns", totaltxns), StringEntry("message", "<h1>USTN Issued Successfully!</h1><br>"), Reissue(USTNAssetID, NewUSTNToUser, true), ScriptTransfer(i.caller, NewUSTNToUser, USTNAssetID)]
45+ }
46+
47+
48+
49+@Callable(i)
50+func Liquidate () = {
51+ let currentKey = toBase58String(i.callerPublicKey)
52+ let pmt = if ((size(i.payments) == 1))
53+ then i.payments[0]
54+ else throw((("No Payments Attached Please Attach " + toBase58String(USTNAssetID)) + " Asset Only."))
55+ let PreviousIssuedUSTN = getIntegerValue(this, "Total_Issued_USTN:")
56+ let PreviousBurnedUSTN = match getInteger(this, "Total_Burned_USTN:") {
57+ case a: Int =>
58+ a
59+ case _ =>
60+ 0
61+ }
62+ let TotalBurnedUSTN = (PreviousBurnedUSTN + pmt.amount)
63+ let TotalIssuedUSTN = (PreviousIssuedUSTN - pmt.amount)
64+ let PreviousUSTNReserveValue = getIntegerValue(this, "Total_USTN_Reserve_In_USDT:")
65+ let calculateburnvalue = pmt.amount
66+ let USTNReserveValue = (PreviousUSTNReserveValue - calculateburnvalue)
67+ let fee = match getInteger(this, "Total_Fee_Collected") {
68+ case a: Int =>
69+ a
70+ case _ =>
71+ 0
72+ }
73+ let FeesCharged = 25000000
74+ let totalfee = (fee + FeesCharged)
75+ if ((pmt.assetId != USTNAssetID))
76+ then throw((("Kindly Deposit Only " + toBase58String(USTNAssetID)) + " (USTN)."))
77+ else if ((100000000 > pmt.amount))
78+ then throw("Attach Amount must be greater than or equal to 1 USTN.")
79+ else [Burn(USTNAssetID, pmt.amount), IntegerEntry("Totaltxns", totaltxns), IntegerEntry("Total_Issued_USTN:", TotalIssuedUSTN), IntegerEntry("Total_Fee_Collected", totalfee), IntegerEntry("Total_Burned_USTN:", TotalBurnedUSTN), IntegerEntry("Total_USTN_Reserve_In_USDT:", USTNReserveValue), StringEntry("message", "<h1>USTN Liquidated Successfully!</h1><br>"), ScriptTransfer(i.caller, (calculateburnvalue - FeesCharged), USDTAssetID), ScriptTransfer(IssueUSTNFeeAddress, FeesCharged, USDTAssetID)]
80+ }
81+
82+
83+@Verifier(tx)
84+func verify () = match tx {
85+ case _ =>
86+ sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
87+}
88+

github/deemru/w8io/169f3d6 
21.95 ms