tx · AZhmoNxE9TMdLnQfrqgiGfBc73Rn29KeiX8Lx3ZVCvwJ

3N8iygiXd1v34PPaMSQb34SSrBwGxT2DpGK:  -0.01400000 Waves

2022.08.14 21:14 [2184486] smart account 3N8iygiXd1v34PPaMSQb34SSrBwGxT2DpGK > SELF 0.00000000 Waves

{ "type": 13, "id": "AZhmoNxE9TMdLnQfrqgiGfBc73Rn29KeiX8Lx3ZVCvwJ", "fee": 1400000, "feeAssetId": null, "timestamp": 1660500866986, "version": 2, "chainId": 84, "sender": "3N8iygiXd1v34PPaMSQb34SSrBwGxT2DpGK", "senderPublicKey": "FshLkkgzcLs6iQJ1Z8Nnfhm494tC8xZQczf9iXpZep3Y", "proofs": [ "cyQZ4mZ8jvYLBj9gtuEMKg9WfFofcDLtASq6MUtVctgjbs2gWth6VttNsGygFdQg8iUTEyrYr9WbNdvpiqfodWW" ], "script": "base64:AAIFAAAAAAAAAAYIAhIAEgAAAAAFAAAAAApCVENBc3NldElEAQAAACD0NPJEoKaVcLA62QAal819hhYdQl83FUDxF7HRh6LUlwAAAAALU0FUU0Fzc2V0SUQBAAAAIIQVHLyAa6peOQxN4R+aXTT73bjvUy7OZLsC9igQULD7AAAAABNJc3N1ZWZzVE5GZWVBZGRyZXNzCQEAAAAUYWRkcmVzc0Zyb21QdWJsaWNLZXkAAAABAQAAACBSg9mgi9eQkjsz5eBARHIbc7Hg/F4fmB0sxZ6ySMfiIAAAAAAEdHhucwQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzAgAAAAlUb3RhbHR4bnMDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAAAAAAJdG90YWx0eG5zCQAAZAAAAAIFAAAABHR4bnMAAAAAAAAAAAEAAAACAAAAAWkBAAAACUlzc3VlU0FUUwAAAAAEAAAAA3BtdAMJAAAAAAAAAgkAAZAAAAABCAUAAAABaQAAAAhwYXltZW50cwAAAAAA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AAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAAVQmFsYW5jZV9NaW50aW5nX1NBVFM6BQAAAA5QZW5kaW5nTWludGluZwkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAAaVG90YWxfU0FUU19SZXNlcnZlX0luX0JUQzoFAAAAEFNBVFNSZXNlcnZlVmFsdWUJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAICAAAAGVNBVFNfQmFja3VwX1ZhbHVlX0luX0JUQzoFAAAAD1NBVFNCYWNrdXBQcmljZQkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACAgAAAAdtZXNzYWdlAgAAACo8aDE+U0FUUyBMaXF1aWRhdGVkIFN1Y2Nlc3NmdWxseSE8L2gxPjxicj4JAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAABJjYWxjdWxhdGVidXJudmFsdWUFAAAACkJUQ0Fzc2V0SUQFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAByRtYXRjaDAFAAAAAnR4CQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tlefyjs+Y=", "height": 2184486, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GDacafw1jT8v461WPFqHuqXsqLLYGjxswE3NuhpYjFT4 Next: 7q4CZ3LqXAtdo7BWpZBegcDLQ619V1GoQAKCyKZ9wGdR Diff:
OldNewDifferences
2020 func IssueSATS () = {
2121 let pmt = if ((size(i.payments) == 1))
2222 then i.payments[0]
23- else throw((("No Payments Attached Please Attach " + toBase58String(BTCAssetID)) + " Asset Only."))
23+ else throw((("No Payments attached please attach [BTC] - " + toBase58String(BTCAssetID)) + " Asset Only."))
2424 let currentKey = toBase58String(i.caller.bytes)
2525 let PricePerSATS = getIntegerValue(this, "SATS/BTC")
2626 let SATSCurrentCap = getIntegerValue(this, "SATSCurrentCap")
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let BTCAssetID = base58'HSHJecCLGF7DEPA23dJe6WwroaLeDnik5eptjxEJYvwY'
55
66 let SATSAssetID = base58'9tbVJFXNxWGtZefTnuH9yojcYEPHwXGxhDvY4UK4qf2z'
77
88 let IssuefsTNFeeAddress = 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 IssueSATS () = {
2121 let pmt = if ((size(i.payments) == 1))
2222 then i.payments[0]
23- else throw((("No Payments Attached Please Attach " + toBase58String(BTCAssetID)) + " Asset Only."))
23+ else throw((("No Payments attached please attach [BTC] - " + toBase58String(BTCAssetID)) + " Asset Only."))
2424 let currentKey = toBase58String(i.caller.bytes)
2525 let PricePerSATS = getIntegerValue(this, "SATS/BTC")
2626 let SATSCurrentCap = getIntegerValue(this, "SATSCurrentCap")
2727 let NewSATSToUser = fraction(100000, pmt.amount, PricePerSATS)
2828 let PreviousIssuedSATS = getIntegerValue(this, "Total_Issued_SATS:")
2929 let TotalIssuedSATS = (PreviousIssuedSATS + NewSATSToUser)
3030 let PendingMinting = (SATSCurrentCap - TotalIssuedSATS)
3131 let PreviousSATSReserveValue = getIntegerValue(this, "Total_SATS_Reserve_In_BTC:")
3232 let fee = match getInteger(this, "Total_Fee_Collected") {
3333 case a: Int =>
3434 a
3535 case _ =>
3636 0
3737 }
3838 let FeesCharged = 1
3939 let SATSReserveValue = (PreviousSATSReserveValue + pmt.amount)
4040 let PreviousSATSBackupPrice = getIntegerValue(this, "SATS_Backup_Value_In_BTC:")
4141 let SATSBackupPrice = fraction(100000, SATSReserveValue, TotalIssuedSATS)
4242 if ((pmt.assetId != BTCAssetID))
4343 then throw((("Incorrect asset attached, please attach [BTC] - " + toBase58String(BTCAssetID)) + " only."))
4444 else if ((5000 > pmt.amount))
4545 then throw("Please Attach minimum 5000 Satoshi's To Issue SATS Asset.")
4646 else if ((TotalIssuedSATS > SATSCurrentCap))
4747 then throw((((((("SATS Minting is about to reach the Cap of " + toString(SATSCurrentCap)) + "/10^6 SATS. Please Reduce your Minting Order by ") + toString(PendingMinting)) + " or put ") + toString((SATSCurrentCap - PreviousIssuedSATS))) + "/10^6"))
4848 else [IntegerEntry("Total_Issued_SATS:", TotalIssuedSATS), IntegerEntry("Balance_Minting_SATS:", PendingMinting), IntegerEntry("Total_SATS_Reserve_In_BTC:", SATSReserveValue), IntegerEntry("SATS_Backup_Value_In_BTC:", SATSBackupPrice), IntegerEntry("Total_Fee_Collected", FeesCharged), IntegerEntry("Totaltxns", totaltxns), StringEntry("message", "<h1>SATS Issued Successfully!</h1><br>"), Reissue(SATSAssetID, NewSATSToUser, true), ScriptTransfer(i.caller, (NewSATSToUser - FeesCharged), SATSAssetID), ScriptTransfer(IssuefsTNFeeAddress, FeesCharged, SATSAssetID)]
4949 }
5050
5151
5252
5353 @Callable(i)
5454 func Liquidate () = {
5555 let currentKey = toBase58String(i.callerPublicKey)
5656 let pmt = value(i.payments[0])
5757 let PreviousIssuedSATS = getIntegerValue(this, "Total_Issued_SATS:")
5858 let PreviousBurnedSATS = getIntegerValue(this, "Total_Burned_SATS:")
5959 let SATSCurrentCap = getIntegerValue(this, "SATSCurrentCap")
6060 let TotalIssuedSATS = (PreviousIssuedSATS - pmt.amount)
6161 let TotalBurnedSATS = (PreviousBurnedSATS + pmt.amount)
6262 let PendingMinting = (SATSCurrentCap - TotalIssuedSATS)
6363 let PreviousSATSReserveValue = getIntegerValue(this, "Total_SATS_Reserve_In_BTC:")
6464 let PreviousSATSBackupPrice = getIntegerValue(this, "SATS_Backup_Value_In_BTC:")
6565 let calculateburnvalue = fraction(PreviousSATSBackupPrice, pmt.amount, 100000)
6666 let SATSReserveValue = (PreviousSATSReserveValue - calculateburnvalue)
6767 let SATSBackupPrice = fraction(100000, SATSReserveValue, TotalIssuedSATS)
6868 if ((pmt.assetId != SATSAssetID))
6969 then throw((("Kindly Deposit Only " + toBase58String(SATSAssetID)) + " [SATS]."))
7070 else if ((5000 > pmt.amount))
7171 then throw("Attach Amount must be greater than 5000 SATS.")
7272 else [Burn(SATSAssetID, pmt.amount), IntegerEntry("Totaltxns", totaltxns), IntegerEntry("Total_Issued_SATS:", TotalIssuedSATS), IntegerEntry("Total_Burned_SATS:", TotalBurnedSATS), IntegerEntry("Balance_Minting_SATS:", PendingMinting), IntegerEntry("Total_SATS_Reserve_In_BTC:", SATSReserveValue), IntegerEntry("SATS_Backup_Value_In_BTC:", SATSBackupPrice), StringEntry("message", "<h1>SATS Liquidated Successfully!</h1><br>"), ScriptTransfer(i.caller, calculateburnvalue, BTCAssetID)]
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 
126.12 ms