tx · DTuE8qFTa4S12zaMdkw3uvG61z74N2FA4Sa398P5EU3b

3N8iygiXd1v34PPaMSQb34SSrBwGxT2DpGK:  -0.01400000 Waves

2022.08.15 01:10 [2184724] smart account 3N8iygiXd1v34PPaMSQb34SSrBwGxT2DpGK > SELF 0.00000000 Waves

{ "type": 13, "id": "DTuE8qFTa4S12zaMdkw3uvG61z74N2FA4Sa398P5EU3b", "fee": 1400000, "feeAssetId": null, "timestamp": 1660515040690, "version": 2, "chainId": 84, "sender": "3N8iygiXd1v34PPaMSQb34SSrBwGxT2DpGK", "senderPublicKey": "FshLkkgzcLs6iQJ1Z8Nnfhm494tC8xZQczf9iXpZep3Y", "proofs": [ "2rNm7SyLp84TXwwZzCM3f2koir49wDGJmgVAC4yTQDEYgzRqEH4bjdT1VaVDdF36ossJHvErjAeL4tcuAyigSvAE" ], "script": "base64:AAIFAAAAAAAAAAYIAhIAEgAAAAAFAAAAAApCVENBc3NldElEAQAAACD0NPJEoKaVcLA62QAal819hhYdQl83FUDxF7HRh6LUlwAAAAALU0FUU0Fzc2V0SUQBAAAAIIQVHLyAa6peOQxN4R+aXTT73bjvUy7OZLsC9igQULD7AAAAAAhUcmVhc3VyeQkBAAAAFGFkZHJlc3NGcm9tUHVibGljS2V5AAAAAQEAAAAgUoPZoIvXkJI7M+XgQERyG3Ox4PxeH5gdLMWeskjH4iAAAAAABHR4bnMEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwIAAAAJVG90YWx0eG5zAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAAAAAACXRvdGFsdHhucwkAAGQAAAACBQAAAAR0eG5zAAAAAAAAAAABAAAAAgAAAAFpAQAAAAlJc3N1ZVNBVFMAAAAABAAAAANwbXQDCQAAAAAAAAIJAAGQAAAAAQgFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAEJAAGRAAAAAggFAAAAAWkAA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BPbmx5IAkAAlgAAAABBQAAAAtTQVRTQXNzZXRJRAIAAAAIIFtTQVRTXS4DCQAAZgAAAAIAAAAAAAAAE4gIBQAAAANwbXQAAAAGYW1vdW50CQAAAgAAAAECAAAALUF0dGFjaCBBbW91bnQgbXVzdCBiZSBncmVhdGVyIHRoYW4gNTAwMCBTQVRTLgkABEwAAAACCQEAAAAEQnVybgAAAAIFAAAAC1NBVFNBc3NldElECAUAAAADcG10AAAABmFtb3VudAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAAJVG90YWx0eG5zBQAAAAl0b3RhbHR4bnMJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAICAAAAElRvdGFsX0lzc3VlZF9TQVRTOgUAAAAPVG90YWxJc3N1ZWRTQVRTCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAICAAAAB21lc3NhZ2UCAAAAKjxoMT5TQVRTIExpcXVpZGF0ZWQgU3VjY2Vzc2Z1bGx5ITwvaDE+PGJyPgkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAAEmNhbGN1bGF0ZWJ1cm52YWx1ZQUAAAAKQlRDQXNzZXRJRAUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAHJG1hdGNoMAUAAAACdHgJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5PT23YQ==", "height": 2184724, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9jr8QPwJ3orWdvsudhczG1Q1oUBFPJrcaQg5ZyerP6jq Next: ygk7jEhcbGU8N97MWcf3TaxAS4QqWgQhoFqi4UgGr2g Diff:
OldNewDifferences
55
66 let SATSAssetID = base58'9tbVJFXNxWGtZefTnuH9yojcYEPHwXGxhDvY4UK4qf2z'
77
8-let IssuefsTNFeeAddress = addressFromPublicKey(base58'6Z73KxcX3sugpiStpSRXxKxTmWqCaLVwFeM6kwyiKVDR')
8+let Treasury = addressFromPublicKey(base58'6Z73KxcX3sugpiStpSRXxKxTmWqCaLVwFeM6kwyiKVDR')
99
1010 let txns = match getInteger(this, "Totaltxns") {
1111 case a: Int =>
3030 then throw((("Incorrect asset attached, please attach [BTC] - " + toBase58String(BTCAssetID)) + " only."))
3131 else if ((5000 > pmt.amount))
3232 then throw("Please Attach minimum 5000 Satoshi's To Issue SATS Asset.")
33- else [IntegerEntry("Total_Issued_SATS:", TotalIssuedSATS), 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)]
33+ else [IntegerEntry("Total_Issued_SATS:", TotalIssuedSATS), IntegerEntry("Totaltxns", totaltxns), StringEntry("message", "<h1>SATS Issued Successfully!</h1><br>"), Reissue(SATSAssetID, NewSATSToUser, true), ScriptTransfer(i.caller, (NewSATSToUser - FeesCharged), SATSAssetID), ScriptTransfer(Treasury, FeesCharged, SATSAssetID)]
3434 }
3535
3636
4040 let currentKey = toBase58String(i.callerPublicKey)
4141 let pmt = value(i.payments[0])
4242 let PreviousIssuedSATS = getIntegerValue(this, "Total_Issued_SATS:")
43- let PreviousBurnedSATS = getIntegerValue(this, "Total_Burned_SATS:")
44- let SATSCurrentCap = getIntegerValue(this, "SATSCurrentCap")
4543 let TotalIssuedSATS = (PreviousIssuedSATS - pmt.amount)
46- let TotalBurnedSATS = (PreviousBurnedSATS + pmt.amount)
47- let PendingMinting = (SATSCurrentCap - TotalIssuedSATS)
48- let PreviousSATSReserveValue = getIntegerValue(this, "Total_SATS_Reserve_In_BTC:")
49- let PreviousSATSBackupPrice = getIntegerValue(this, "SATS_Backup_Value_In_BTC:")
50- let calculateburnvalue = fraction(PreviousSATSBackupPrice, pmt.amount, 100000)
51- let SATSReserveValue = (PreviousSATSReserveValue - calculateburnvalue)
52- let SATSBackupPrice = fraction(100000000, SATSReserveValue, TotalIssuedSATS)
44+ let calculateburnvalue = fraction(pmt.amount, 1, 1000000)
5345 if ((pmt.assetId != SATSAssetID))
5446 then throw((("Kindly Deposit Only " + toBase58String(SATSAssetID)) + " [SATS]."))
5547 else if ((5000 > pmt.amount))
5648 then throw("Attach Amount must be greater than 5000 SATS.")
57- 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)]
49+ else [Burn(SATSAssetID, pmt.amount), IntegerEntry("Totaltxns", totaltxns), IntegerEntry("Total_Issued_SATS:", TotalIssuedSATS), StringEntry("message", "<h1>SATS Liquidated Successfully!</h1><br>"), ScriptTransfer(i.caller, calculateburnvalue, BTCAssetID)]
5850 }
5951
6052
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
8-let IssuefsTNFeeAddress = addressFromPublicKey(base58'6Z73KxcX3sugpiStpSRXxKxTmWqCaLVwFeM6kwyiKVDR')
8+let Treasury = 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]
2323 else throw((("No Payments attached please attach [BTC] - " + toBase58String(BTCAssetID)) + " Asset Only."))
2424 let currentKey = toBase58String(i.caller.bytes)
2525 let NewSATSToUser = fraction(1000000, pmt.amount, 1)
2626 let PreviousIssuedSATS = getIntegerValue(this, "Total_Issued_SATS:")
2727 let TotalIssuedSATS = (PreviousIssuedSATS + NewSATSToUser)
2828 let FeesCharged = 1000000
2929 if ((pmt.assetId != BTCAssetID))
3030 then throw((("Incorrect asset attached, please attach [BTC] - " + toBase58String(BTCAssetID)) + " only."))
3131 else if ((5000 > pmt.amount))
3232 then throw("Please Attach minimum 5000 Satoshi's To Issue SATS Asset.")
33- else [IntegerEntry("Total_Issued_SATS:", TotalIssuedSATS), 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)]
33+ else [IntegerEntry("Total_Issued_SATS:", TotalIssuedSATS), IntegerEntry("Totaltxns", totaltxns), StringEntry("message", "<h1>SATS Issued Successfully!</h1><br>"), Reissue(SATSAssetID, NewSATSToUser, true), ScriptTransfer(i.caller, (NewSATSToUser - FeesCharged), SATSAssetID), ScriptTransfer(Treasury, FeesCharged, SATSAssetID)]
3434 }
3535
3636
3737
3838 @Callable(i)
3939 func Liquidate () = {
4040 let currentKey = toBase58String(i.callerPublicKey)
4141 let pmt = value(i.payments[0])
4242 let PreviousIssuedSATS = getIntegerValue(this, "Total_Issued_SATS:")
43- let PreviousBurnedSATS = getIntegerValue(this, "Total_Burned_SATS:")
44- let SATSCurrentCap = getIntegerValue(this, "SATSCurrentCap")
4543 let TotalIssuedSATS = (PreviousIssuedSATS - pmt.amount)
46- let TotalBurnedSATS = (PreviousBurnedSATS + pmt.amount)
47- let PendingMinting = (SATSCurrentCap - TotalIssuedSATS)
48- let PreviousSATSReserveValue = getIntegerValue(this, "Total_SATS_Reserve_In_BTC:")
49- let PreviousSATSBackupPrice = getIntegerValue(this, "SATS_Backup_Value_In_BTC:")
50- let calculateburnvalue = fraction(PreviousSATSBackupPrice, pmt.amount, 100000)
51- let SATSReserveValue = (PreviousSATSReserveValue - calculateburnvalue)
52- let SATSBackupPrice = fraction(100000000, SATSReserveValue, TotalIssuedSATS)
44+ let calculateburnvalue = fraction(pmt.amount, 1, 1000000)
5345 if ((pmt.assetId != SATSAssetID))
5446 then throw((("Kindly Deposit Only " + toBase58String(SATSAssetID)) + " [SATS]."))
5547 else if ((5000 > pmt.amount))
5648 then throw("Attach Amount must be greater than 5000 SATS.")
57- 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)]
49+ else [Burn(SATSAssetID, pmt.amount), IntegerEntry("Totaltxns", totaltxns), IntegerEntry("Total_Issued_SATS:", TotalIssuedSATS), StringEntry("message", "<h1>SATS Liquidated Successfully!</h1><br>"), ScriptTransfer(i.caller, calculateburnvalue, BTCAssetID)]
5850 }
5951
6052
6153 @Verifier(tx)
6254 func verify () = match tx {
6355 case _ =>
6456 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
6557 }
6658

github/deemru/w8io/169f3d6 
32.26 ms