tx · 3DJvWrMNbercNB5Rq4ckCuxUaq7bmqK5vgZoWP5QqxDU 3N5bfRJRGX6vqJPKVaubUTWkgQRPTeAFMEa: -0.01400000 Waves 2022.05.28 17:18 [2071631] smart account 3N5bfRJRGX6vqJPKVaubUTWkgQRPTeAFMEa > SELF 0.00000000 Waves
{ "type": 13, "id": "3DJvWrMNbercNB5Rq4ckCuxUaq7bmqK5vgZoWP5QqxDU", "fee": 1400000, "feeAssetId": null, "timestamp": 1653747522205, "version": 2, "chainId": 84, "sender": "3N5bfRJRGX6vqJPKVaubUTWkgQRPTeAFMEa", "senderPublicKey": "CYf1Tg7CgpZxaix8DPBSZAzFs5io8qAPuhbe3sproNmY", "proofs": [ "5QDxPYvcGNzMAq2UEuhiN7RJLSu75jcycZbVwgbqFoTaUF79yTdy6WB2hn5W98eWNTnTSTR6KbaBA8nHviYE7WRj" ], "script": "base64:AAIFAAAAAAAAAAYIAhIAEgAAAAAFAAAAAAtVU1ROQXNzZXRJRAEAAAAgZT73g67dG4ChZhQ2CUXjfEpRH5dYyBAJkYT+Tc8rMrYAAAAAC1VTRFRBc3NldElEAQAAACD0NPJEoKaVcLA62QAal819hhYdQl83FUDxF7HRh6LUlwAAAAATSXNzdWVVU1RORmVlQWRkcmVzcwkBAAAAFGFkZHJlc3NGcm9tUHVibGljS2V5AAAAAQEAAAAgUoPZoIvXkJI7M+XgQERyG3Ox4PxeH5gdLMWeskjH4iAAAAAABHR4bnMEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwIAAAAJVG90YWx0eG5zAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAAAAAACXRvdGFsdHhucwkAAGQAAAACBQAAAAR0eG5zAAAAAAAAAAABAAAAAgAAAAFpAQAAAAlJc3N1ZVVTVE4AAAAABAAAAANwbXQDCQAAAAAAAAIJAAGQAAAAAQgFAAAAAWkAAAAIcGF5bWVudHM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CQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACAgAAABpVU1ROX0JhY2t1cF9WYWx1ZV9Jbl9VU0RUOgUAAAAPVVNUTkJhY2t1cFByaWNlCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAICAAAAB21lc3NhZ2UCAAAAKjxoMT5VU1ROIExpcXVpZGF0ZWQgU3VjY2Vzc2Z1bGx5ITwvaDE+PGJyPgkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIJAABlAAAAAgUAAAASY2FsY3VsYXRlYnVybnZhbHVlBQAAAAtGZWVzQ2hhcmdlZAUAAAAEdW5pdAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAABNJc3N1ZVVTVE5GZWVBZGRyZXNzBQAAAAtGZWVzQ2hhcmdlZAUAAAALVVNUTkFzc2V0SUQFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAByRtYXRjaDAFAAAAAnR4CQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tlecPmS4E=", "height": 2071631, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: vHtQaXJYMbudfbjxaCxQk3QAGCWsZMZ5omvSZNvJREN Next: FdLHaeRqRh15YivVxV729uznRmwiSCFiuUUeH6bBxFLw Diff:
Old | New | Differences | |
---|---|---|---|
46 | 46 | let u = fraction(100000, s, o) | |
47 | 47 | if ((i.assetId != b)) | |
48 | 48 | then throw("Incorrect asset attached, please attach USDT.") | |
49 | - | else if (( | |
49 | + | else if ((1000000 > i.amount)) | |
50 | 50 | then throw("Please Attach minimum 0.01 USDT To Issue USTN Asset.") | |
51 | 51 | else if ((o > l)) | |
52 | 52 | then throw((((((("USTN Minting is about to reach the Cap of " + toString(l)) + "/10^8 USTN. Please Reduce your Minting Order by ") + toString(p)) + " or put ") + toString((l - n))) + "/10^8")) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = base58'7pDsD9A2rm9SvENMqNq5vwGmJn9nQJxbe492Pok1SHPs' | |
5 | 5 | ||
6 | 6 | let b = base58'HSHJecCLGF7DEPA23dJe6WwroaLeDnik5eptjxEJYvwY' | |
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 IssueUSTN () = { | |
24 | 24 | let i = if ((size(h.payments) == 1)) | |
25 | 25 | then h.payments[0] | |
26 | 26 | else throw((("No Payments Attached Please Attach " + toBase58String(b)) + " Asset Only.")) | |
27 | 27 | let j = toBase58String(h.caller.bytes) | |
28 | 28 | let k = getIntegerValue(this, "USTN/USDT") | |
29 | 29 | let l = getIntegerValue(this, "USTNCurrentCap") | |
30 | 30 | let m = fraction(100000, i.amount, k) | |
31 | 31 | let n = getIntegerValue(this, "Total_Issued_USTN:") | |
32 | 32 | let o = (n + m) | |
33 | 33 | let p = (l - o) | |
34 | 34 | let q = getIntegerValue(this, "Total_USTN_Reserve_In_USDT:") | |
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 = (q + i.amount) | |
45 | 45 | let t = getIntegerValue(this, "USTN_Backup_Value_In_USDT:") | |
46 | 46 | let u = fraction(100000, s, o) | |
47 | 47 | if ((i.assetId != b)) | |
48 | 48 | then throw("Incorrect asset attached, please attach USDT.") | |
49 | - | else if (( | |
49 | + | else if ((1000000 > i.amount)) | |
50 | 50 | then throw("Please Attach minimum 0.01 USDT To Issue USTN Asset.") | |
51 | 51 | else if ((o > l)) | |
52 | 52 | then throw((((((("USTN Minting is about to reach the Cap of " + toString(l)) + "/10^8 USTN. Please Reduce your Minting Order by ") + toString(p)) + " or put ") + toString((l - n))) + "/10^8")) | |
53 | 53 | else [IntegerEntry("Total_Issued_USTN:", o), IntegerEntry("Balance_Minting_USTN:", p), IntegerEntry("Total_USTN_Reserve_In_USDT:", s), IntegerEntry("USTN_Backup_Value_In_USDT:", u), IntegerEntry("Totaltxns", g), StringEntry("message", "<h1>USTN Issued Successfully!</h1><br>"), Reissue(a, m, true), ScriptTransfer(h.caller, m, a)] | |
54 | 54 | } | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | ||
58 | 58 | @Callable(h) | |
59 | 59 | func Liquidate () = { | |
60 | 60 | let j = toBase58String(h.callerPublicKey) | |
61 | 61 | let i = value(h.payments[0]) | |
62 | 62 | let n = getIntegerValue(this, "Total_Issued_USTN:") | |
63 | 63 | let v = getIntegerValue(this, "Total_Burned_USTN:") | |
64 | 64 | let l = getIntegerValue(this, "USTNCurrentCap") | |
65 | 65 | let o = (n - i.amount) | |
66 | 66 | let w = (v + i.amount) | |
67 | 67 | let p = (l - o) | |
68 | 68 | let q = getIntegerValue(this, "Total_USTN_Reserve_In_USDT:") | |
69 | 69 | let t = getIntegerValue(this, "USTN_Backup_Value_In_USDT:") | |
70 | 70 | let x = fraction(t, i.amount, 100000) | |
71 | 71 | let s = (q - x) | |
72 | 72 | let u = fraction(100000, s, o) | |
73 | 73 | let y = 25000000 | |
74 | 74 | if ((i.assetId != a)) | |
75 | 75 | then throw((("Kindly Deposit Only " + toBase58String(a)) + " (USTN).")) | |
76 | 76 | else if ((100000000 >= i.amount)) | |
77 | 77 | then throw("Attach Amount must be greater than or equal to 1 USTN.") | |
78 | 78 | else [Burn(a, i.amount), IntegerEntry("Totaltxns", g), IntegerEntry("Total_Issued_USTN:", o), IntegerEntry("Total_Fee_Collected", y), IntegerEntry("Total_Burned_USTN:", w), IntegerEntry("Balance_Minting_USTN:", p), IntegerEntry("Total_USTN_Reserve_In_USDT:", s), IntegerEntry("USTN_Backup_Value_In_USDT:", u), StringEntry("message", "<h1>USTN Liquidated Successfully!</h1><br>"), ScriptTransfer(h.caller, (x - y), unit), ScriptTransfer(c, y, a)] | |
79 | 79 | } | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | @Verifier(z) | |
83 | 83 | func A () = { | |
84 | 84 | let e = z | |
85 | 85 | sigVerify(z.bodyBytes, z.proofs[0], z.senderPublicKey) | |
86 | 86 | } | |
87 | 87 |
github/deemru/w8io/169f3d6 31.58 ms ◑