tx · GDacafw1jT8v461WPFqHuqXsqLLYGjxswE3NuhpYjFT4

3N8iygiXd1v34PPaMSQb34SSrBwGxT2DpGK:  -0.01400000 Waves

2022.08.14 21:12 [2184484] smart account 3N8iygiXd1v34PPaMSQb34SSrBwGxT2DpGK > SELF 0.00000000 Waves

{ "type": 13, "id": "GDacafw1jT8v461WPFqHuqXsqLLYGjxswE3NuhpYjFT4", "fee": 1400000, "feeAssetId": null, "timestamp": 1660500804128, "version": 2, "chainId": 84, "sender": "3N8iygiXd1v34PPaMSQb34SSrBwGxT2DpGK", "senderPublicKey": "FshLkkgzcLs6iQJ1Z8Nnfhm494tC8xZQczf9iXpZep3Y", "proofs": [ "3Lzm7xxSE6EQG2jvBw75v41SmFhnup78v4TnmUToyZgX8SvNTKgcuZExS8vv4bc2XRzvRWTBAxjayRP2s6K1qged" ], "script": "base64:AAIFAAAAAAAAAAYIAhIAEgAAAAAFAAAAAApCVENBc3NldElEAQAAACD0NPJEoKaVcLA62QAal819hhYdQl83FUDxF7HRh6LUlwAAAAALU0FUU0Fzc2V0SUQBAAAAIIQVHLyAa6peOQxN4R+aXTT73bjvUy7OZLsC9igQULD7AAAAABNJc3N1ZWZzVE5GZWVBZGRyZXNzCQEAAAAUYWRkcmVzc0Zyb21QdWJsaWNLZXkAAAABAQAAACBSg9mgi9eQkjsz5eBARHIbc7Hg/F4fmB0sxZ6ySMfiIAAAAAAEdHhucwQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzAgAAAAlUb3RhbHR4bnMDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAAAAAAJdG90YWx0eG5zCQAAZAAAAAIFAAAABHR4bnMAAAAAAAAAAAEAAAACAAAAAWkBAAAACUlzc3VlU0FUUwAAAAAEAAAAA3BtdAMJAAAAAAAAAgkAAZAAAAABCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAQkAAZEAAAACC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AAADEludGVnZXJFbnRyeQAAAAICAAAAFUJhbGFuY2VfTWludGluZ19TQVRTOgUAAAAOUGVuZGluZ01pbnRpbmcJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAICAAAAGlRvdGFsX1NBVFNfUmVzZXJ2ZV9Jbl9CVEM6BQAAABBTQVRTUmVzZXJ2ZVZhbHVlCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACAgAAABlTQVRTX0JhY2t1cF9WYWx1ZV9Jbl9CVEM6BQAAAA9TQVRTQmFja3VwUHJpY2UJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgIAAAAHbWVzc2FnZQIAAAAqPGgxPlNBVFMgTGlxdWlkYXRlZCBTdWNjZXNzZnVsbHkhPC9oMT48YnI+CQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAASY2FsY3VsYXRlYnVybnZhbHVlBQAAAApCVENBc3NldElEBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAABAAAAAckbWF0Y2gwBQAAAAJ0eAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXnS/61D", "height": 2184484, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EfgMatcnFzGMj47jtPVjXpEEfpb4a7HktmKR3u83MPkc Next: AZhmoNxE9TMdLnQfrqgiGfBc73Rn29KeiX8Lx3ZVCvwJ Diff:
OldNewDifferences
1818
1919 @Callable(i)
2020 func IssueSATS () = {
21- let pmt = value(i.payments[0])
21+ let pmt = if ((size(i.payments) == 1))
22+ then i.payments[0]
23+ else throw((("No Payments Attached Please Attach " + toBase58String(BTCAssetID)) + " Asset Only."))
2224 let currentKey = toBase58String(i.caller.bytes)
2325 let PricePerSATS = getIntegerValue(this, "SATS/BTC")
2426 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 () = {
21- let pmt = value(i.payments[0])
21+ let pmt = if ((size(i.payments) == 1))
22+ then i.payments[0]
23+ else throw((("No Payments Attached Please Attach " + toBase58String(BTCAssetID)) + " Asset Only."))
2224 let currentKey = toBase58String(i.caller.bytes)
2325 let PricePerSATS = getIntegerValue(this, "SATS/BTC")
2426 let SATSCurrentCap = getIntegerValue(this, "SATSCurrentCap")
2527 let NewSATSToUser = fraction(100000, pmt.amount, PricePerSATS)
2628 let PreviousIssuedSATS = getIntegerValue(this, "Total_Issued_SATS:")
2729 let TotalIssuedSATS = (PreviousIssuedSATS + NewSATSToUser)
2830 let PendingMinting = (SATSCurrentCap - TotalIssuedSATS)
2931 let PreviousSATSReserveValue = getIntegerValue(this, "Total_SATS_Reserve_In_BTC:")
3032 let fee = match getInteger(this, "Total_Fee_Collected") {
3133 case a: Int =>
3234 a
3335 case _ =>
3436 0
3537 }
3638 let FeesCharged = 1
3739 let SATSReserveValue = (PreviousSATSReserveValue + pmt.amount)
3840 let PreviousSATSBackupPrice = getIntegerValue(this, "SATS_Backup_Value_In_BTC:")
3941 let SATSBackupPrice = fraction(100000, SATSReserveValue, TotalIssuedSATS)
4042 if ((pmt.assetId != BTCAssetID))
4143 then throw((("Incorrect asset attached, please attach [BTC] - " + toBase58String(BTCAssetID)) + " only."))
4244 else if ((5000 > pmt.amount))
4345 then throw("Please Attach minimum 5000 Satoshi's To Issue SATS Asset.")
4446 else if ((TotalIssuedSATS > SATSCurrentCap))
4547 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"))
4648 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)]
4749 }
4850
4951
5052
5153 @Callable(i)
5254 func Liquidate () = {
5355 let currentKey = toBase58String(i.callerPublicKey)
5456 let pmt = value(i.payments[0])
5557 let PreviousIssuedSATS = getIntegerValue(this, "Total_Issued_SATS:")
5658 let PreviousBurnedSATS = getIntegerValue(this, "Total_Burned_SATS:")
5759 let SATSCurrentCap = getIntegerValue(this, "SATSCurrentCap")
5860 let TotalIssuedSATS = (PreviousIssuedSATS - pmt.amount)
5961 let TotalBurnedSATS = (PreviousBurnedSATS + pmt.amount)
6062 let PendingMinting = (SATSCurrentCap - TotalIssuedSATS)
6163 let PreviousSATSReserveValue = getIntegerValue(this, "Total_SATS_Reserve_In_BTC:")
6264 let PreviousSATSBackupPrice = getIntegerValue(this, "SATS_Backup_Value_In_BTC:")
6365 let calculateburnvalue = fraction(PreviousSATSBackupPrice, pmt.amount, 100000)
6466 let SATSReserveValue = (PreviousSATSReserveValue - calculateburnvalue)
6567 let SATSBackupPrice = fraction(100000, SATSReserveValue, TotalIssuedSATS)
6668 if ((pmt.assetId != SATSAssetID))
6769 then throw((("Kindly Deposit Only " + toBase58String(SATSAssetID)) + " [SATS]."))
6870 else if ((5000 > pmt.amount))
6971 then throw("Attach Amount must be greater than 5000 SATS.")
7072 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)]
7173 }
7274
7375
7476 @Verifier(tx)
7577 func verify () = match tx {
7678 case _ =>
7779 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
7880 }
7981

github/deemru/w8io/169f3d6 
29.04 ms