tx · sTitWt5kNRaDnwFi3qy3s8kPS42noi5e9YjDWHPLyLZ 3N8iygiXd1v34PPaMSQb34SSrBwGxT2DpGK: -0.01400000 Waves 2022.08.14 23:16 [2184614] smart account 3N8iygiXd1v34PPaMSQb34SSrBwGxT2DpGK > SELF 0.00000000 Waves
{ "type": 13, "id": "sTitWt5kNRaDnwFi3qy3s8kPS42noi5e9YjDWHPLyLZ", "fee": 1400000, "feeAssetId": null, "timestamp": 1660508209218, "version": 2, "chainId": 84, "sender": "3N8iygiXd1v34PPaMSQb34SSrBwGxT2DpGK", "senderPublicKey": "FshLkkgzcLs6iQJ1Z8Nnfhm494tC8xZQczf9iXpZep3Y", "proofs": [ "oNzdqcyWC8jm38BoFzGsUDavPrhxLEDJyE1dYnfeVf23fJt5zVzJmTYqTMghjPRRHAbgUostkPKLjJ66x9SHwvX" ], "script": "base64:AAIFAAAAAAAAAAYIAhIAEgAAAAAFAAAAAApCVENBc3NldElEAQAAACD0NPJEoKaVcLA62QAal819hhYdQl83FUDxF7HRh6LUlwAAAAALU0FUU0Fzc2V0SUQBAAAAIIQVHLyAa6peOQxN4R+aXTT73bjvUy7OZLsC9igQULD7AAAAABNJc3N1ZWZzVE5GZWVBZGRyZXNzCQEAAAAUYWRkcmVzc0Zyb21QdWJsaWNLZXkAAAABAQAAACBSg9mgi9eQkjsz5eBARHIbc7Hg/F4fmB0sxZ6ySMfiIAAAAAAEdHhucwQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzAgAAAAlUb3RhbHR4bnMDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAAAAAAJdG90YWx0eG5zCQAAZAAAAAIFAAAABHR4bnMAAAAAAAAAAAEAAAACAAAAAWkBAAAACUlzc3VlU0FUUwAAAAAEAAAAA3BtdAMJAAAAAAAAAgkAAZAAAAABCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAQkAAZEA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VnZXJFbnRyeQAAAAICAAAAElRvdGFsX0J1cm5lZF9TQVRTOgUAAAAPVG90YWxCdXJuZWRTQVRTCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACAgAAABVCYWxhbmNlX01pbnRpbmdfU0FUUzoFAAAADlBlbmRpbmdNaW50aW5nCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACAgAAABpUb3RhbF9TQVRTX1Jlc2VydmVfSW5fQlRDOgUAAAAQU0FUU1Jlc2VydmVWYWx1ZQkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAAZU0FUU19CYWNrdXBfVmFsdWVfSW5fQlRDOgUAAAAPU0FUU0JhY2t1cFByaWNlCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAICAAAAB21lc3NhZ2UCAAAAKjxoMT5TQVRTIExpcXVpZGF0ZWQgU3VjY2Vzc2Z1bGx5ITwvaDE+PGJyPgkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAAEmNhbGN1bGF0ZWJ1cm52YWx1ZQUAAAAKQlRDQXNzZXRJRAUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAHJG1hdGNoMAUAAAACdHgJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V53P2r/w==", "height": 2184614, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FwQkJA3mGQmBSEpizsUdA9vAPgK98DgbNL9ZoUqGdvv3 Next: Dx5rsDxLWbCuWNuYw7euEAYDhjx5Pgm7gCAmV5n4WGBw Diff:
Old | New | Differences | |
---|---|---|---|
27 | 27 | let NewSATSToUser = fraction(100000000, pmt.amount, PricePerSATS) | |
28 | 28 | let PreviousIssuedSATS = getIntegerValue(this, "Total_Issued_SATS:") | |
29 | 29 | let TotalIssuedSATS = (PreviousIssuedSATS + NewSATSToUser) | |
30 | - | let PendingMinting = (SATSCurrentCap - | |
30 | + | let PendingMinting = (SATSCurrentCap - pmt.amount) | |
31 | 31 | let PreviousSATSReserveValue = getIntegerValue(this, "Total_SATS_Reserve_In_BTC:") | |
32 | 32 | let fee = match getInteger(this, "Total_Fee_Collected") { | |
33 | 33 | case a: Int => | |
39 | 39 | let totalfeecollected = (fee + FeesCharged) | |
40 | 40 | let SATSReserveValue = (PreviousSATSReserveValue + pmt.amount) | |
41 | 41 | let PreviousSATSBackupPrice = getIntegerValue(this, "SATS_Backup_Value_In_BTC:") | |
42 | - | let SATSBackupPrice = fraction( | |
42 | + | let SATSBackupPrice = fraction(100000000, SATSReserveValue, TotalIssuedSATS) | |
43 | 43 | if ((pmt.assetId != BTCAssetID)) | |
44 | 44 | then throw((("Incorrect asset attached, please attach [BTC] - " + toBase58String(BTCAssetID)) + " only.")) | |
45 | 45 | else if ((5000 > pmt.amount)) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let BTCAssetID = base58'HSHJecCLGF7DEPA23dJe6WwroaLeDnik5eptjxEJYvwY' | |
5 | 5 | ||
6 | 6 | let SATSAssetID = base58'9tbVJFXNxWGtZefTnuH9yojcYEPHwXGxhDvY4UK4qf2z' | |
7 | 7 | ||
8 | 8 | let IssuefsTNFeeAddress = addressFromPublicKey(base58'6Z73KxcX3sugpiStpSRXxKxTmWqCaLVwFeM6kwyiKVDR') | |
9 | 9 | ||
10 | 10 | let txns = match getInteger(this, "Totaltxns") { | |
11 | 11 | case a: Int => | |
12 | 12 | a | |
13 | 13 | case _ => | |
14 | 14 | 0 | |
15 | 15 | } | |
16 | 16 | ||
17 | 17 | let totaltxns = (txns + 1) | |
18 | 18 | ||
19 | 19 | @Callable(i) | |
20 | 20 | func IssueSATS () = { | |
21 | 21 | let pmt = if ((size(i.payments) == 1)) | |
22 | 22 | then i.payments[0] | |
23 | 23 | else throw((("No Payments attached please attach [BTC] - " + toBase58String(BTCAssetID)) + " Asset Only.")) | |
24 | 24 | let currentKey = toBase58String(i.caller.bytes) | |
25 | 25 | let PricePerSATS = getIntegerValue(this, "SATS/BTC") | |
26 | 26 | let SATSCurrentCap = getIntegerValue(this, "SATSCurrentCap") | |
27 | 27 | let NewSATSToUser = fraction(100000000, pmt.amount, PricePerSATS) | |
28 | 28 | let PreviousIssuedSATS = getIntegerValue(this, "Total_Issued_SATS:") | |
29 | 29 | let TotalIssuedSATS = (PreviousIssuedSATS + NewSATSToUser) | |
30 | - | let PendingMinting = (SATSCurrentCap - | |
30 | + | let PendingMinting = (SATSCurrentCap - pmt.amount) | |
31 | 31 | let PreviousSATSReserveValue = getIntegerValue(this, "Total_SATS_Reserve_In_BTC:") | |
32 | 32 | let fee = match getInteger(this, "Total_Fee_Collected") { | |
33 | 33 | case a: Int => | |
34 | 34 | a | |
35 | 35 | case _ => | |
36 | 36 | 0 | |
37 | 37 | } | |
38 | 38 | let FeesCharged = 1000000 | |
39 | 39 | let totalfeecollected = (fee + FeesCharged) | |
40 | 40 | let SATSReserveValue = (PreviousSATSReserveValue + pmt.amount) | |
41 | 41 | let PreviousSATSBackupPrice = getIntegerValue(this, "SATS_Backup_Value_In_BTC:") | |
42 | - | let SATSBackupPrice = fraction( | |
42 | + | let SATSBackupPrice = fraction(100000000, SATSReserveValue, TotalIssuedSATS) | |
43 | 43 | if ((pmt.assetId != BTCAssetID)) | |
44 | 44 | then throw((("Incorrect asset attached, please attach [BTC] - " + toBase58String(BTCAssetID)) + " only.")) | |
45 | 45 | else if ((5000 > pmt.amount)) | |
46 | 46 | then throw("Please Attach minimum 5000 Satoshi's To Issue SATS Asset.") | |
47 | 47 | else if ((TotalIssuedSATS > SATSCurrentCap)) | |
48 | 48 | 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")) | |
49 | 49 | 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", totalfeecollected), 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)] | |
50 | 50 | } | |
51 | 51 | ||
52 | 52 | ||
53 | 53 | ||
54 | 54 | @Callable(i) | |
55 | 55 | func Liquidate () = { | |
56 | 56 | let currentKey = toBase58String(i.callerPublicKey) | |
57 | 57 | let pmt = value(i.payments[0]) | |
58 | 58 | let PreviousIssuedSATS = getIntegerValue(this, "Total_Issued_SATS:") | |
59 | 59 | let PreviousBurnedSATS = getIntegerValue(this, "Total_Burned_SATS:") | |
60 | 60 | let SATSCurrentCap = getIntegerValue(this, "SATSCurrentCap") | |
61 | 61 | let TotalIssuedSATS = (PreviousIssuedSATS - pmt.amount) | |
62 | 62 | let TotalBurnedSATS = (PreviousBurnedSATS + pmt.amount) | |
63 | 63 | let PendingMinting = (SATSCurrentCap - TotalIssuedSATS) | |
64 | 64 | let PreviousSATSReserveValue = getIntegerValue(this, "Total_SATS_Reserve_In_BTC:") | |
65 | 65 | let PreviousSATSBackupPrice = getIntegerValue(this, "SATS_Backup_Value_In_BTC:") | |
66 | 66 | let calculateburnvalue = fraction(PreviousSATSBackupPrice, pmt.amount, 100000) | |
67 | 67 | let SATSReserveValue = (PreviousSATSReserveValue - calculateburnvalue) | |
68 | 68 | let SATSBackupPrice = fraction(100000, SATSReserveValue, TotalIssuedSATS) | |
69 | 69 | if ((pmt.assetId != SATSAssetID)) | |
70 | 70 | then throw((("Kindly Deposit Only " + toBase58String(SATSAssetID)) + " [SATS].")) | |
71 | 71 | else if ((5000 > pmt.amount)) | |
72 | 72 | then throw("Attach Amount must be greater than 5000 SATS.") | |
73 | 73 | 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)] | |
74 | 74 | } | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | @Verifier(tx) | |
78 | 78 | func verify () = match tx { | |
79 | 79 | case _ => | |
80 | 80 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
81 | 81 | } | |
82 | 82 |
github/deemru/w8io/169f3d6 26.20 ms ◑