tx · AJtyQqfcBfweA2uoLAqTnXu8ZjtgDZothrZugZtC61Bi 3N61Cvq5XcnPk9rxpy2Rnp3bSr4syNGUJph: -0.01400000 Waves 2021.11.05 17:20 [1777798] smart account 3N61Cvq5XcnPk9rxpy2Rnp3bSr4syNGUJph > SELF 0.00000000 Waves
{ "type": 13, "id": "AJtyQqfcBfweA2uoLAqTnXu8ZjtgDZothrZugZtC61Bi", "fee": 1400000, "feeAssetId": null, "timestamp": 1636122105058, "version": 2, "chainId": 84, "sender": "3N61Cvq5XcnPk9rxpy2Rnp3bSr4syNGUJph", "senderPublicKey": "G7cNXePvAHUHmZfXa1eHnvFeH6DuykPC5wm9v9djTKgD", "proofs": [ "2yHrzsWTrjQy4xCvzq7jv2wSTg1vNQjGEC7ETqyeTfNZuyiMdBgLc3RswgmWrqXPfdybjr7mxCENnn1eVyMHkCpd" ], "script": "base64:AAIFAAAAAAAAABkIAhIAEgYKBBgYGBESABIDCgEIEgQKAggBAAAAAwAAAAAKZGVwb3NpdEZlZQAAAAAAAAAD6AAAAAANY29udHJvbGxlckZlZQAAAAAAAAAnEAAAAAALcGxhdGZvcm1GZWUAAAAAAAAAJxAAAAAFAAAAAmE4AQAAAARpbml0AAAAAAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAAxM1BQSDd4N2lxb2JXNXppeWlSQ2ljMTlyUXFLcjZuUFlhSzFfYXNzZXRfYmFsYW5jZQAAAAAAAG3UrQUAAAADbmlsAAAAAWkBAAAACGFkZFBvb2xzAAAABAAAAAVwb29scwAAAA9saXF1aWRpdHlUb2tlbnMAAAANc2VydmljZVRva2VucwAAABZsaXF1aWRpdHlUb2tlbkRlY2ltYWxzCgEAAAAQZ2VuZXJhdGVQb29sS2V5cwAAAAIAAAALYWNjdW11bGF0ZWQAAAAEcG9vbAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACBQAAAARwb29sAgAAAA5fYXNzZXRfYmFsYW5jZQAAAAA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AAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgUAAAARdXNlclBvb2xBbW91bnRLZXkFAAAAEW5ld1VzZXJQb29sQW1vdW50CQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACBQAAABF1c2VyUG9vbEVhcm5lZEtleQUAAAAPdXNlckVhcm5lZFRvdGFsBQAAAANuaWwJAAACAAAAAQIAAAAmWW91IGhhdmUgbm90IHN1Y2ggYmFsYW5jZSBmb3Igd2l0aGRyYXcAAAABAAAAAmI2AQAAAAJiNwAAAAAJAAH0AAAAAwgFAAAAAmI2AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACYjYAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACYjYAAAAPc2VuZGVyUHVibGljS2V57wdJ/w==", "height": 1777798, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2GAjtyLj88beJnhyWe4iLjFazENSowTdnEqBa9s5eHJ7 Next: DPGyJwiTZotnCSNMm9YXD9JRSrJxWtSBHymJ2qqBoRiF Diff:
Old | New | Differences | |
---|---|---|---|
22 | 22 | StringEntry((pool + "_liquidity_token"), liquidityToken) | |
23 | 23 | } | |
24 | 24 | ||
25 | - | func generatePoolServiceTokenKeys (accumulated,pool) = throw("DApp is inactive at this moment") | |
25 | + | func generatePoolServiceTokenKeys (accumulated,pool) = { | |
26 | + | let poolIndex = value(indexOf(pools, pool)) | |
27 | + | let liquidityToken = serviceTokens[poolIndex] | |
28 | + | StringEntry((pool + "_service_token"), liquidityToken) | |
29 | + | } | |
26 | 30 | ||
27 | 31 | func generatePoolLiquidityTokenDecimalKeys (accumulated,pool) = { | |
28 | 32 | let poolIndex = value(indexOf(pools, pool)) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let depositFee = 1000 | |
5 | 5 | ||
6 | 6 | let controllerFee = 10000 | |
7 | 7 | ||
8 | 8 | let platformFee = 10000 | |
9 | 9 | ||
10 | 10 | @Callable(a8) | |
11 | 11 | func init () = [IntegerEntry("3PPH7x7iqobW5ziyiRCic19rQqKr6nPYaK1_asset_balance", 7197869)] | |
12 | 12 | ||
13 | 13 | ||
14 | 14 | ||
15 | 15 | @Callable(i) | |
16 | 16 | func addPools (pools,liquidityTokens,serviceTokens,liquidityTokenDecimals) = { | |
17 | 17 | func generatePoolKeys (accumulated,pool) = IntegerEntry((pool + "_asset_balance"), 0) :: accumulated | |
18 | 18 | ||
19 | 19 | func generatePoolLiquidityTokenKeys (accumulated,pool) = { | |
20 | 20 | let poolIndex = value(indexOf(pools, pool)) | |
21 | 21 | let liquidityToken = liquidityTokens[poolIndex] | |
22 | 22 | StringEntry((pool + "_liquidity_token"), liquidityToken) | |
23 | 23 | } | |
24 | 24 | ||
25 | - | func generatePoolServiceTokenKeys (accumulated,pool) = throw("DApp is inactive at this moment") | |
25 | + | func generatePoolServiceTokenKeys (accumulated,pool) = { | |
26 | + | let poolIndex = value(indexOf(pools, pool)) | |
27 | + | let liquidityToken = serviceTokens[poolIndex] | |
28 | + | StringEntry((pool + "_service_token"), liquidityToken) | |
29 | + | } | |
26 | 30 | ||
27 | 31 | func generatePoolLiquidityTokenDecimalKeys (accumulated,pool) = { | |
28 | 32 | let poolIndex = value(indexOf(pools, pool)) | |
29 | 33 | let liquidityToken = liquidityTokenDecimals[poolIndex] | |
30 | 34 | IntegerEntry((pool + "_service_token"), liquidityToken) | |
31 | 35 | } | |
32 | 36 | ||
33 | 37 | func generatePoolActiveKeys (accumulated,pool) = BooleanEntry((pool + "_active"), true) | |
34 | 38 | ||
35 | 39 | let poolLiquidityTokenKeys = { | |
36 | 40 | let $l = pools | |
37 | 41 | let $s = size($l) | |
38 | 42 | let $acc0 = nil | |
39 | 43 | func 1 ($a,$i) = if (($i >= $s)) | |
40 | 44 | then $a | |
41 | 45 | else generatePoolLiquidityTokenKeys($a, $l[$i]) | |
42 | 46 | ||
43 | 47 | func 2 ($a,$i) = if (($i >= $s)) | |
44 | 48 | then $a | |
45 | 49 | else throw("List size exceeds 20") | |
46 | 50 | ||
47 | 51 | 2(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
48 | 52 | } | |
49 | 53 | let poolServiceTokenKeys = { | |
50 | 54 | let $l = pools | |
51 | 55 | let $s = size($l) | |
52 | 56 | let $acc0 = nil | |
53 | 57 | func 1 ($a,$i) = if (($i >= $s)) | |
54 | 58 | then $a | |
55 | 59 | else generatePoolServiceTokenKeys($a, $l[$i]) | |
56 | 60 | ||
57 | 61 | func 2 ($a,$i) = if (($i >= $s)) | |
58 | 62 | then $a | |
59 | 63 | else throw("List size exceeds 20") | |
60 | 64 | ||
61 | 65 | 2(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
62 | 66 | } | |
63 | 67 | let poolLiquidityTokenDecimalKeys = { | |
64 | 68 | let $l = pools | |
65 | 69 | let $s = size($l) | |
66 | 70 | let $acc0 = nil | |
67 | 71 | func 1 ($a,$i) = if (($i >= $s)) | |
68 | 72 | then $a | |
69 | 73 | else generatePoolLiquidityTokenDecimalKeys($a, $l[$i]) | |
70 | 74 | ||
71 | 75 | func 2 ($a,$i) = if (($i >= $s)) | |
72 | 76 | then $a | |
73 | 77 | else throw("List size exceeds 20") | |
74 | 78 | ||
75 | 79 | 2(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
76 | 80 | } | |
77 | 81 | let poolActiveKeys = { | |
78 | 82 | let $l = pools | |
79 | 83 | let $s = size($l) | |
80 | 84 | let $acc0 = nil | |
81 | 85 | func 1 ($a,$i) = if (($i >= $s)) | |
82 | 86 | then $a | |
83 | 87 | else generatePoolActiveKeys($a, $l[$i]) | |
84 | 88 | ||
85 | 89 | func 2 ($a,$i) = if (($i >= $s)) | |
86 | 90 | then $a | |
87 | 91 | else throw("List size exceeds 20") | |
88 | 92 | ||
89 | 93 | 2(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
90 | 94 | } | |
91 | 95 | poolServiceTokenKeys | |
92 | 96 | } | |
93 | 97 | ||
94 | 98 | ||
95 | 99 | ||
96 | 100 | @Callable(a8) | |
97 | 101 | func call () = { | |
98 | 102 | let a9 = Issue("Asset1", "Asset from dApp", 100000, 2, true, unit, 0) | |
99 | 103 | let b1 = calculateAssetId(a9) | |
100 | 104 | [BinaryEntry("bin", base58''), BooleanEntry("bool", true), IntegerEntry("int", 1), StringEntry("str", ""), DeleteEntry("str"), a9] | |
101 | 105 | } | |
102 | 106 | ||
103 | 107 | ||
104 | 108 | ||
105 | 109 | @Callable(i) | |
106 | 110 | func deposit (pool) = { | |
107 | 111 | let amount = i.payments[0].amount | |
108 | 112 | let assetId = i.payments[0].assetId | |
109 | 113 | let poolAmountKey = (pool + "_asset_balance") | |
110 | 114 | let userAddress = toString(i.caller) | |
111 | 115 | let userPoolAmountKey = (((pool + "_") + userAddress) + "_asset_balance") | |
112 | 116 | let dAppAssetAddress = getStringValue(this, (pool + "_service_token")) | |
113 | 117 | let poolAmount = getIntegerValue(this, poolAmountKey) | |
114 | 118 | let userAmount = match getInteger(userPoolAmountKey) { | |
115 | 119 | case int: Int => | |
116 | 120 | int | |
117 | 121 | case nothing => | |
118 | 122 | 0 | |
119 | 123 | } | |
120 | 124 | let newPoolAmount = (poolAmount + amount) | |
121 | 125 | let userAmountWithoutFee = ((amount - fraction(amount, 1, depositFee, HALFUP)) - fraction(amount, 1, controllerFee, HALFUP)) | |
122 | 126 | let newUserPoolAmount = (userAmount + userAmountWithoutFee) | |
123 | 127 | [Reissue(fromBase58String(dAppAssetAddress), userAmountWithoutFee, true), ScriptTransfer(i.caller, userAmountWithoutFee, fromBase58String(dAppAssetAddress)), IntegerEntry(poolAmountKey, newPoolAmount), IntegerEntry(userPoolAmountKey, newUserPoolAmount)] | |
124 | 128 | } | |
125 | 129 | ||
126 | 130 | ||
127 | 131 | ||
128 | 132 | @Callable(i) | |
129 | 133 | func withdraw (pool,userEarned) = { | |
130 | 134 | let amount = i.payments[0].amount | |
131 | 135 | let assetId = i.payments[0].assetId | |
132 | 136 | let poolAmountKey = (pool + "_asset_balance") | |
133 | 137 | let userAddress = toString(i.caller) | |
134 | 138 | let userPoolAmountKey = (((pool + "_") + userAddress) + "_asset_balance") | |
135 | 139 | let userPoolEarnedKey = (((pool + "_") + userAddress) + "_earned") | |
136 | 140 | let poolAmount = getIntegerValue(this, poolAmountKey) | |
137 | 141 | let userAmount = match getInteger(userPoolAmountKey) { | |
138 | 142 | case int: Int => | |
139 | 143 | int | |
140 | 144 | case nothing => | |
141 | 145 | 0 | |
142 | 146 | } | |
143 | 147 | let userEarnedBefore = match getInteger(userPoolEarnedKey) { | |
144 | 148 | case int: Int => | |
145 | 149 | int | |
146 | 150 | case nothing => | |
147 | 151 | 0 | |
148 | 152 | } | |
149 | 153 | let liquidutyAssetAddress = getStringValue(this, (pool + "_liquidity_token")) | |
150 | 154 | let liquidityTokenDecimal = match assetInfo(fromBase58String(liquidutyAssetAddress)) { | |
151 | 155 | case asset: Asset => | |
152 | 156 | asset.decimals | |
153 | 157 | case _ => | |
154 | 158 | throw("Can't find asset") | |
155 | 159 | } | |
156 | 160 | let dAppAssetAddress = getStringValue(this, (pool + "_service_token")) | |
157 | 161 | let userEarnedTotal = (userEarned + userEarnedBefore) | |
158 | 162 | let amountWithoutFee = ((amount - fraction(amount, 1, platformFee, HALFUP)) - fraction(amount, 1, controllerFee, HALFUP)) | |
159 | 163 | let newPoolAmount = (poolAmount - amountWithoutFee) | |
160 | 164 | if ((userAmount >= amount)) | |
161 | 165 | then { | |
162 | 166 | let newUserPoolAmount = (userAmount - amountWithoutFee) | |
163 | 167 | [Burn(fromBase58String(dAppAssetAddress), amountWithoutFee), ScriptTransfer(i.caller, amountWithoutFee, fromBase58String(liquidutyAssetAddress)), IntegerEntry(poolAmountKey, newPoolAmount), IntegerEntry(userPoolAmountKey, newUserPoolAmount), IntegerEntry(userPoolEarnedKey, userEarnedTotal)] | |
164 | 168 | } | |
165 | 169 | else throw("You have not such balance for withdraw") | |
166 | 170 | } | |
167 | 171 | ||
168 | 172 | ||
169 | 173 | @Verifier(b6) | |
170 | 174 | func b7 () = sigVerify(b6.bodyBytes, b6.proofs[0], b6.senderPublicKey) | |
171 | 175 |
github/deemru/w8io/026f985 35.05 ms ◑