tx · AdKRbCeA1fL8ZuCYC1FR66o1c6YHRcAt1hodzf1yqjCh 3N8iygiXd1v34PPaMSQb34SSrBwGxT2DpGK: -0.01400000 Waves 2022.08.15 00:26 [2184678] smart account 3N8iygiXd1v34PPaMSQb34SSrBwGxT2DpGK > SELF 0.00000000 Waves
{ "type": 13, "id": "AdKRbCeA1fL8ZuCYC1FR66o1c6YHRcAt1hodzf1yqjCh", "fee": 1400000, "feeAssetId": null, "timestamp": 1660512438486, "version": 2, "chainId": 84, "sender": "3N8iygiXd1v34PPaMSQb34SSrBwGxT2DpGK", "senderPublicKey": "FshLkkgzcLs6iQJ1Z8Nnfhm494tC8xZQczf9iXpZep3Y", "proofs": [ "3nrLECKF8cN7Z7YWFS52EdoNSVEin7Rcja6LSYoAzLt2TK7WiVurBa5rLwunsua2GyAxcUmSfjZ4Dc9Bn4Zma3Gs" ], "script": "base64:AAIFAAAAAAAAAAYIAhIAEgAAAAAFAAAAAApCVENBc3NldElEAQAAACD0NPJEoKaVcLA62QAal819hhYdQl83FUDxF7HRh6LUlwAAAAALU0FUU0Fzc2V0SUQBAAAAIIQVHLyAa6peOQxN4R+aXTT73bjvUy7OZLsC9igQULD7AAAAABNJc3N1ZWZzVE5GZWVBZGRyZXNzCQEAAAAUYWRkcmVzc0Zyb21QdWJsaWNLZXkAAAABAQAAACBSg9mgi9eQkjsz5eBARHIbc7Hg/F4fmB0sxZ6ySMfiIAAAAAAEdHhucwQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzAgAAAAlUb3RhbHR4bnMDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAAAAAAJdG90YWx0eG5zCQAAZAAAAAIFAAAABHR4bnMAAAAAAAAAAAEAAAACAAAAAWkBAAAACUlzc3VlU0FUUwAAAAAEAAAAA3BtdAMJAAAAAAAAAgkAAZAAAAABCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAA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nRlZ2VyRW50cnkAAAACAgAAABJUb3RhbF9CdXJuZWRfU0FUUzoFAAAAD1RvdGFsQnVybmVkU0FUUwkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAAVQmFsYW5jZV9NaW50aW5nX1NBVFM6BQAAAA5QZW5kaW5nTWludGluZwkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAAaVG90YWxfU0FUU19SZXNlcnZlX0luX0JUQzoFAAAAEFNBVFNSZXNlcnZlVmFsdWUJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAICAAAAGVNBVFNfQmFja3VwX1ZhbHVlX0luX0JUQzoFAAAAD1NBVFNCYWNrdXBQcmljZQkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACAgAAAAdtZXNzYWdlAgAAACo8aDE+U0FUUyBMaXF1aWRhdGVkIFN1Y2Nlc3NmdWxseSE8L2gxPjxicj4JAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAABJjYWxjdWxhdGVidXJudmFsdWUFAAAACkJUQ0Fzc2V0SUQFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAByRtYXRjaDAFAAAAAnR4CQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tlefLmE5o=", "height": 2184678, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4MwgbocS1pTKr7gYFnGYr4RCsZB1dt7bCYEqVBL65Bzm Next: BgAPofpMR1kAysy8GAUEM31ENGiRPZNzJ5XNqNqW6Nat Diff:
Old | New | Differences | |
---|---|---|---|
69 | 69 | let p = (l - o) | |
70 | 70 | let q = getIntegerValue(this, "Total_SATS_Reserve_In_BTC:") | |
71 | 71 | let v = getIntegerValue(this, "SATS_Backup_Value_In_BTC:") | |
72 | - | let z = fraction(v, i.amount, | |
72 | + | let z = fraction(v, i.amount, 1000) | |
73 | 73 | let u = (q - z) | |
74 | - | let w = fraction( | |
74 | + | let w = fraction(1000, u, o) | |
75 | 75 | if ((i.assetId != b)) | |
76 | 76 | then throw((("Kindly Deposit Only " + toBase58String(b)) + " [SATS].")) | |
77 | 77 | else if ((5000 > i.amount)) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = base58'HSHJecCLGF7DEPA23dJe6WwroaLeDnik5eptjxEJYvwY' | |
5 | 5 | ||
6 | 6 | let b = base58'9tbVJFXNxWGtZefTnuH9yojcYEPHwXGxhDvY4UK4qf2z' | |
7 | 7 | ||
8 | 8 | let c = addressFromPublicKey(base58'6Z73KxcX3sugpiStpSRXxKxTmWqCaLVwFeM6kwyiKVDR') | |
9 | 9 | ||
10 | 10 | let d = { | |
11 | 11 | let e = getInteger(this, "Totaltxns") | |
12 | 12 | if ($isInstanceOf(e, "Int")) | |
13 | 13 | then { | |
14 | 14 | let f = e | |
15 | 15 | f | |
16 | 16 | } | |
17 | 17 | else 0 | |
18 | 18 | } | |
19 | 19 | ||
20 | 20 | let g = (d + 1) | |
21 | 21 | ||
22 | 22 | @Callable(h) | |
23 | 23 | func IssueSATS () = { | |
24 | 24 | let i = if ((size(h.payments) == 1)) | |
25 | 25 | then h.payments[0] | |
26 | 26 | else throw((("No Payments attached please attach [BTC] - " + toBase58String(a)) + " Asset Only.")) | |
27 | 27 | let j = toBase58String(h.caller.bytes) | |
28 | 28 | let k = getIntegerValue(this, "SATS/BTC") | |
29 | 29 | let l = getIntegerValue(this, "SATSCurrentCap") | |
30 | 30 | let m = fraction(100000000, i.amount, k) | |
31 | 31 | let n = getIntegerValue(this, "Total_Issued_SATS:") | |
32 | 32 | let o = (n + m) | |
33 | 33 | let p = (l - o) | |
34 | 34 | let q = getIntegerValue(this, "Total_SATS_Reserve_In_BTC:") | |
35 | 35 | let r = { | |
36 | 36 | let e = getInteger(this, "Total_Fee_Collected") | |
37 | 37 | if ($isInstanceOf(e, "Int")) | |
38 | 38 | then { | |
39 | 39 | let f = e | |
40 | 40 | f | |
41 | 41 | } | |
42 | 42 | else 0 | |
43 | 43 | } | |
44 | 44 | let s = 1000000 | |
45 | 45 | let t = (r + s) | |
46 | 46 | let u = (q + i.amount) | |
47 | 47 | let v = getIntegerValue(this, "SATS_Backup_Value_In_BTC:") | |
48 | 48 | let w = fraction(100000000, u, o) | |
49 | 49 | if ((i.assetId != a)) | |
50 | 50 | then throw((("Incorrect asset attached, please attach [BTC] - " + toBase58String(a)) + " only.")) | |
51 | 51 | else if ((5000 > i.amount)) | |
52 | 52 | then throw("Please Attach minimum 5000 Satoshi's To Issue SATS Asset.") | |
53 | 53 | else if ((o > l)) | |
54 | 54 | then throw((((((("SATS Minting is about to reach the Cap of " + toString(l)) + "/10^6 SATS. Please Reduce your Minting Order by ") + toString(p)) + " or put ") + toString((l - n))) + "/10^6")) | |
55 | 55 | else [IntegerEntry("Total_Issued_SATS:", o), IntegerEntry("Balance_Minting_SATS:", p), IntegerEntry("Total_SATS_Reserve_In_BTC:", u), IntegerEntry("SATS_Backup_Value_In_BTC:", w), IntegerEntry("Total_Fee_Collected", t), IntegerEntry("Totaltxns", g), StringEntry("message", "<h1>SATS Issued Successfully!</h1><br>"), Reissue(b, m, true), ScriptTransfer(h.caller, (m - s), b), ScriptTransfer(c, s, b)] | |
56 | 56 | } | |
57 | 57 | ||
58 | 58 | ||
59 | 59 | ||
60 | 60 | @Callable(h) | |
61 | 61 | func Liquidate () = { | |
62 | 62 | let j = toBase58String(h.callerPublicKey) | |
63 | 63 | let i = value(h.payments[0]) | |
64 | 64 | let n = getIntegerValue(this, "Total_Issued_SATS:") | |
65 | 65 | let x = getIntegerValue(this, "Total_Burned_SATS:") | |
66 | 66 | let l = getIntegerValue(this, "SATSCurrentCap") | |
67 | 67 | let o = (n - i.amount) | |
68 | 68 | let y = (x + i.amount) | |
69 | 69 | let p = (l - o) | |
70 | 70 | let q = getIntegerValue(this, "Total_SATS_Reserve_In_BTC:") | |
71 | 71 | let v = getIntegerValue(this, "SATS_Backup_Value_In_BTC:") | |
72 | - | let z = fraction(v, i.amount, | |
72 | + | let z = fraction(v, i.amount, 1000) | |
73 | 73 | let u = (q - z) | |
74 | - | let w = fraction( | |
74 | + | let w = fraction(1000, u, o) | |
75 | 75 | if ((i.assetId != b)) | |
76 | 76 | then throw((("Kindly Deposit Only " + toBase58String(b)) + " [SATS].")) | |
77 | 77 | else if ((5000 > i.amount)) | |
78 | 78 | then throw("Attach Amount must be greater than 5000 SATS.") | |
79 | 79 | else [Burn(b, i.amount), IntegerEntry("Totaltxns", g), IntegerEntry("Total_Issued_SATS:", o), IntegerEntry("Total_Burned_SATS:", y), IntegerEntry("Balance_Minting_SATS:", p), IntegerEntry("Total_SATS_Reserve_In_BTC:", u), IntegerEntry("SATS_Backup_Value_In_BTC:", w), StringEntry("message", "<h1>SATS Liquidated Successfully!</h1><br>"), ScriptTransfer(h.caller, z, a)] | |
80 | 80 | } | |
81 | 81 | ||
82 | 82 | ||
83 | 83 | @Verifier(A) | |
84 | 84 | func B () = { | |
85 | 85 | let e = A | |
86 | 86 | sigVerify(A.bodyBytes, A.proofs[0], A.senderPublicKey) | |
87 | 87 | } | |
88 | 88 |
github/deemru/w8io/169f3d6 33.71 ms ◑