tx · GZKWsj8YqZEwYJSfY9vkrAmf8P5tbX3PxocP6FL8hXaj 3N6LXAerq2VVAPds14fKmB72f1Whmem7pxY: -0.00600000 Waves 2022.06.15 04:33 [2096838] smart account 3N6LXAerq2VVAPds14fKmB72f1Whmem7pxY > SELF 0.00000000 Waves
{ "type": 13, "id": "GZKWsj8YqZEwYJSfY9vkrAmf8P5tbX3PxocP6FL8hXaj", "fee": 600000, "feeAssetId": null, "timestamp": 1655256844776, "version": 2, "chainId": 84, "sender": "3N6LXAerq2VVAPds14fKmB72f1Whmem7pxY", "senderPublicKey": "fFTt4dRQEMWmxs9cA5He1tph3gmQLAM4cnpj6eqkWPR", "proofs": [ "4sZ9BbFxYsn2z6sdQFTjkXox19cjpeUpsaLxDxtZ2yN17xDmjTTCor9aS35eX3dkjo9hpU4gXq69pCwjUWyUNhHP" ], "script": "base64:AAIFAAAAAAAAACoIAhIJCgcICAgICAQBEgMKAQQSBQoDBAQEEgMKAQESAwoBBBIAEgMKAQEAAAAeAAAAAARtYWluAgAAAAptYWluX2Fzc2V0AAAAAAFsAgAAAAlscF9hc3NldF8AAAAAAmExAgAAAAxzd2FwX2Fzc2V0MV8AAAAAAnN0AgAAAA9hZGRyZXNzX3N0YWtlcl8AAAAAA3NzdAIAAAANYWRkcmVzc19wb29sXwAAAAADc3dwAgAAAA1hZGRyZXNzX3N3YXBfAAAAAAJhMgIAAAAMc3dhcF9hc3NldDJfAAAAAANhYTECAAAAB3Bvb2xfMV8AAAAAA2FhMgIAAAAHcG9vbF8yXwAAAAADc3QxAgAAAA5zdGFrZXJfYWRkcmVzcwAAAAAEdHlwZQIAAAAFdHlwZV8AAAAAAnNhAgAAAA9TVEFLSU5HX0FNT1VOVF8AAAAAAmxhAgAAAA1MRUFTRV9BTU9VTlRfAAAAAAJpeAIAAAADSURfAAAAAAdyYXRlRmVlAgAAABNwZXJjZW50YWdlX3JhdGVfZmVlAAAAAAJEOAAAAAAABfXhAAAAAAACRDYAAAAAAAAPQkAAA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EtleQUAAAAJbmV3QW1vdW50CQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACAgAAABRUb3RhbF9Ub2tlbnNfTG9ja2VkOgUAAAAKdG90YWx0b2tlbgkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIJAABoAAAAAgUAAAAGYW1vdW50BQAAAAJEOAUAAAAJTWFpbkFzc2V0CQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgkAAGkAAAACCQAAaAAAAAIJAABoAAAAAgUAAAAEZGlmZgUAAAAGYW1vdW50AAAAAAAAAAAEAAAAAAAAAAWgBQAAAAlNYWluQXNzZXQFAAAAA25pbAkAAAIAAAABAgAAAClsaXF1aWRpdHkgaXMgY3VycmVudGx5IHVuZGVyIG1haW50ZW5hbmNlLgkAAAIAAAABAgAAACRkQXBwIGlzIGN1cnJlbnRseSB1bmRlciBtYWludGVuYW5jZS4AAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAABAAAAAckbWF0Y2gwBQAAAAJ0eAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXlBxLpC", "height": 2096838, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: 2fJgQi3tSRUvkKCu86am6U7Vc3DWauzroPQJ4EB9PtLH Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 5 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let a = "main_asset" | |
5 | + | ||
6 | + | let b = "lp_asset_" | |
7 | + | ||
8 | + | let c = "swap_asset1_" | |
9 | + | ||
10 | + | let d = "address_staker_" | |
11 | + | ||
12 | + | let e = "address_pool_" | |
13 | + | ||
14 | + | let f = "address_swap_" | |
15 | + | ||
16 | + | let g = "swap_asset2_" | |
17 | + | ||
18 | + | let h = "pool_1_" | |
19 | + | ||
20 | + | let i = "pool_2_" | |
21 | + | ||
22 | + | let j = "staker_address" | |
23 | + | ||
24 | + | let k = "type_" | |
25 | + | ||
26 | + | let l = "STAKING_AMOUNT_" | |
27 | + | ||
28 | + | let m = "LEASE_AMOUNT_" | |
29 | + | ||
30 | + | let n = "ID_" | |
31 | + | ||
32 | + | let o = "percentage_rate_fee" | |
33 | + | ||
34 | + | let p = 100000000 | |
35 | + | ||
36 | + | let q = 1000000 | |
37 | + | ||
38 | + | let r = Address(this.bytes) | |
39 | + | ||
40 | + | let s = 5 | |
41 | + | ||
42 | + | func t (u) = toString(valueOrErrorMessage(addressFromString(u), (("Can't parse " + u) + " as address"))) | |
43 | + | ||
44 | + | ||
45 | + | func v (w) = toBase58String(valueOrErrorMessage(value(assetInfo(fromBase58String(w))).id, (("Asset Id: " + w) + " is invalid."))) | |
46 | + | ||
47 | + | ||
48 | + | let x = "activate" | |
49 | + | ||
50 | + | let y = "activate_pools" | |
51 | + | ||
52 | + | let z = "activate_swap" | |
53 | + | ||
54 | + | let A = "activate_liquidity" | |
55 | + | ||
56 | + | let B = "usdn_asset" | |
57 | + | ||
58 | + | let C = "usdt_asset" | |
59 | + | ||
60 | + | let D = "usdc_asset" | |
61 | + | ||
62 | + | let E = "ngnn_asset" | |
63 | + | ||
64 | + | let F = "accept_waves" | |
65 | + | ||
66 | + | @Callable(G) | |
67 | + | func constructor (H,I,J,K,L,M,N) = if ((G.caller == this)) | |
68 | + | then [StringEntry(a, H), StringEntry(B, I), StringEntry(D, K), StringEntry(C, J), StringEntry(E, L), BooleanEntry(F, M), IntegerEntry(o, N), BooleanEntry(x, true), BooleanEntry(z, false), BooleanEntry(y, false), BooleanEntry(A, false)] | |
69 | + | else throw("Only the Admin itself can invoke this function") | |
70 | + | ||
71 | + | ||
72 | + | ||
73 | + | @Callable(G) | |
74 | + | func activate (O) = if ((G.caller == this)) | |
75 | + | then [BooleanEntry(x, O)] | |
76 | + | else throw("Only the Admin itself can invoke this function") | |
77 | + | ||
78 | + | ||
79 | + | ||
80 | + | @Callable(G) | |
81 | + | func maintenance (P,Q,R) = if ((G.caller == this)) | |
82 | + | then [BooleanEntry(y, P), BooleanEntry(z, Q), BooleanEntry(A, R)] | |
83 | + | else throw("Only the Admin itself can invoke this function") | |
84 | + | ||
85 | + | ||
86 | + | ||
87 | + | @Callable(G) | |
88 | + | func percentualRateFeeEdit (S) = if ((G.caller == this)) | |
89 | + | then [IntegerEntry(o, S)] | |
90 | + | else throw("Only the Admin itself can invoke this function") | |
91 | + | ||
92 | + | ||
93 | + | ||
94 | + | @Callable(G) | |
95 | + | func acceptWaves (T) = if ((G.caller == this)) | |
96 | + | then [BooleanEntry(F, T)] | |
97 | + | else throw("Only the Admin itself can invoke this function") | |
98 | + | ||
99 | + | ||
100 | + | ||
101 | + | @Callable(G) | |
102 | + | func deposit () = { | |
103 | + | let U = getBooleanValue(this, x) | |
104 | + | let V = getBooleanValue(this, A) | |
105 | + | let W = getBooleanValue(this, F) | |
106 | + | let X = G.payments[0] | |
107 | + | let Y = toBytes(getStringValue(this, a)) | |
108 | + | if (U) | |
109 | + | then if (V) | |
110 | + | then if ((X.assetId != Y)) | |
111 | + | then throw("Invalid Asset! Kindly Deposit Only A4tvKLB66QMmSJPXJgiajNnrtSjvqAapxTqhLzJbBNFX (AxAi).") | |
112 | + | else { | |
113 | + | let Z = toBase58String(G.caller.bytes) | |
114 | + | let aa = { | |
115 | + | let ab = getInteger(this, Z) | |
116 | + | if ($isInstanceOf(ab, "Int")) | |
117 | + | then { | |
118 | + | let ac = ab | |
119 | + | ac | |
120 | + | } | |
121 | + | else 0 | |
122 | + | } | |
123 | + | let ad = (aa + X.amount) | |
124 | + | let ae = IntegerEntry(Z, ad) | |
125 | + | let af = IntegerEntry(("Deposit_Height_Of_" + Z), height) | |
126 | + | let ag = getIntegerValue(this, "Total_Tokens_Locked:") | |
127 | + | let ah = (ag + X.amount) | |
128 | + | let ai = IntegerEntry("Total_Tokens_Locked:", ah) | |
129 | + | [ae, af, ai] | |
130 | + | } | |
131 | + | else throw("liquidity is currently under maintenance.") | |
132 | + | else throw("dApp is currently under maintenance.") | |
133 | + | } | |
134 | + | ||
135 | + | ||
136 | + | ||
137 | + | @Callable(G) | |
138 | + | func remove (aj) = { | |
139 | + | let U = getBooleanValue(this, x) | |
140 | + | let V = getBooleanValue(this, A) | |
141 | + | let W = getBooleanValue(this, F) | |
142 | + | let X = G.payments[0] | |
143 | + | let Y = toBytes(getStringValue(this, a)) | |
144 | + | if (U) | |
145 | + | then if (V) | |
146 | + | then if ((X.assetId != Y)) | |
147 | + | then throw(("Invalid Asset! Kindly Deposit Only " + toBase58String(Y))) | |
148 | + | else { | |
149 | + | let Z = toBase58String(G.caller.bytes) | |
150 | + | let aa = { | |
151 | + | let ab = getInteger(this, Z) | |
152 | + | if ($isInstanceOf(ab, "Int")) | |
153 | + | then { | |
154 | + | let ac = ab | |
155 | + | ac | |
156 | + | } | |
157 | + | else 0 | |
158 | + | } | |
159 | + | let ad = (aa - (aj * p)) | |
160 | + | let ak = ("Deposit_Height_Of_" + Z) | |
161 | + | let ag = getIntegerValue(this, "Total_Tokens_Locked:") | |
162 | + | let ah = (ag - (aj * p)) | |
163 | + | let al = (height - getIntegerValue(this, ak)) | |
164 | + | if ((0 > aj)) | |
165 | + | then throw("Can't withdraw negative AxAi amount") | |
166 | + | else if ((0 > ad)) | |
167 | + | then throw("Not enough AxAi balance") | |
168 | + | else [IntegerEntry(Z, ad), IntegerEntry("Total_Tokens_Locked:", ah), ScriptTransfer(G.caller, (aj * p), Y), ScriptTransfer(G.caller, (((al * aj) * 4) / 1440), Y)] | |
169 | + | } | |
170 | + | else throw("liquidity is currently under maintenance.") | |
171 | + | else throw("dApp is currently under maintenance.") | |
172 | + | } | |
173 | + | ||
174 | + | ||
175 | + | @Verifier(am) | |
176 | + | func an () = { | |
177 | + | let ab = am | |
178 | + | sigVerify(am.bodyBytes, am.proofs[0], am.senderPublicKey) | |
179 | + | } | |
180 | + |
github/deemru/w8io/169f3d6 29.30 ms ◑