tx · FFkBB8fzbWFKeZ3JuK6mtpuFyn1vNZgxGPqojr5cpD2o 3MuS6qVvhBR6wSynFRdcE3fVqmGBjoc7Hhx: -0.00900000 Waves 2023.06.09 17:58 [2615277] smart account 3MuS6qVvhBR6wSynFRdcE3fVqmGBjoc7Hhx > SELF 0.00000000 Waves
{ "type": 13, "id": "FFkBB8fzbWFKeZ3JuK6mtpuFyn1vNZgxGPqojr5cpD2o", "fee": 900000, "feeAssetId": null, "timestamp": 1686322783154, "version": 2, "chainId": 84, "sender": "3MuS6qVvhBR6wSynFRdcE3fVqmGBjoc7Hhx", "senderPublicKey": "62CHk4MqTdq3LqeUycy7TPnpvwrjgerSa2FqAY2EafXn", "proofs": [ "2c4yaTkRWrYBdknRXvfCqFyFvfqHUwwiLXcgBBcDgA57Kh15MP3bYCoHrUeu8X4oUN5D7q5KCfhdGzyqbLZi7uGL" ], "script": "base64:BwJKCAISBAoCCAgSBAoCCAESBAoCCAQSBAoCCAISAwoBCBIDCgEBEgMKAQESBQoDAgECEgQKAgIBEgASABIDCgEIEgASABIDCgEIEgAcAANTRVACAl9fABBjb250cmFjdEZpbGVuYW1lAgxmYWN0b3J5LnJpZGUBB3dyYXBFcnIBAXMJAKwCAgkArAICBRBjb250cmFjdEZpbGVuYW1lAgI6IAUBcwEIdGhyb3dFcnIBAXMJAAIBCQEHd3JhcEVycgEFAXMBFGtleUNhbGN1bGF0b3JBZGRyZXNzAAIOJXNfX2NhbGN1bGF0b3IBEmtleVRyZWFzdXJ5QWRkcmVzcwACDCVzX190cmVhc3VyeQEPa2V5Q2hpbGRBZGRyZXNzAAIJJXNfX2NoaWxkARhrZXlCbG9ja1Byb2Nlc3NpbmdSZXdhcmQAAhklc19fYmxvY2tQcm9jZXNzaW5nUmV3YXJkARVrZXlOZXh0QmxvY2tUb1Byb2Nlc3MAAhYlc19fbmV4dEJsb2NrVG9Qcm9jZXNzAQxrZXlMcEFzc2V0SWQAAg0lc19fbHBBc3NldElkABdjYWxjdWxhd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qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5AwkBAiE9AgUZdm90aW5nUmVzdWx0QWRkcmVzc09wdGlvbgUEdW5pdAUKYnlQcm9wb3NhbAUHYnlPd25lctvcxdQ=", "height": 2615277, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: ELMqEzSHmqrnBk1AhLsm5bsNR45yBZCXxNK3DFakMPes Next: 85cJLXGv9LjPoE9dFmACeAzx3ZVuryNKaDg5zQqTC8T4 Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 7 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SEP = "__" | |
5 | 5 | ||
6 | 6 | let contractFilename = "factory.ride" | |
7 | 7 | ||
8 | 8 | func wrapErr (s) = ((contractFilename + ": ") + s) | |
9 | 9 | ||
10 | 10 | ||
11 | 11 | func throwErr (s) = throw(wrapErr(s)) | |
12 | 12 | ||
13 | 13 | ||
14 | 14 | func keyCalculatorAddress () = "%s__calculator" | |
15 | 15 | ||
16 | 16 | ||
17 | 17 | func keyTreasuryAddress () = "%s__treasury" | |
18 | 18 | ||
19 | 19 | ||
20 | 20 | func keyChildAddress () = "%s__child" | |
21 | 21 | ||
22 | 22 | ||
23 | 23 | func keyBlockProcessingReward () = "%s__blockProcessingReward" | |
24 | 24 | ||
25 | 25 | ||
26 | 26 | func keyNextBlockToProcess () = "%s__nextBlockToProcess" | |
27 | 27 | ||
28 | 28 | ||
29 | 29 | func keyLpAssetId () = "%s__lpAssetId" | |
30 | 30 | ||
31 | 31 | ||
32 | 32 | let calculatorAddressOption = match getString(this, keyCalculatorAddress()) { | |
33 | 33 | case s: String => | |
34 | 34 | addressFromString(s) | |
35 | 35 | case _: Unit => | |
36 | 36 | unit | |
37 | 37 | case _ => | |
38 | 38 | throw("Match error") | |
39 | 39 | } | |
40 | 40 | ||
41 | 41 | let calculatorAddressOrFail = valueOrErrorMessage(calculatorAddressOption, wrapErr("invalid calculator address")) | |
42 | 42 | ||
43 | 43 | func keyConfigAddress () = "%s__config" | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | func keyChildrenAddress () = "contract_children" | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func keyVotingResultAddress () = "contract_voting_result" | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func keyProposalAllowBroadcast (address,txId) = ((("proposal_allow_broadcast_" + toString(address)) + "_") + toBase58String(txId)) | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | func keyInvestedByUser (childAddress,userAddress) = makeString(["investor", toString(childAddress), toString(userAddress)], "_") | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | let configAddressOption = match getString(this, keyConfigAddress()) { | |
59 | 59 | case s: String => | |
60 | 60 | addressFromString(s) | |
61 | 61 | case _: Unit => | |
62 | 62 | unit | |
63 | 63 | case _ => | |
64 | 64 | throw("Match error") | |
65 | 65 | } | |
66 | 66 | ||
67 | 67 | let configAddressOrFail = valueOrErrorMessage(configAddressOption, wrapErr("invalid config address")) | |
68 | 68 | ||
69 | 69 | let votingResultAddressOption = match configAddressOption { | |
70 | 70 | case a: Address => | |
71 | 71 | match getString(a, keyVotingResultAddress()) { | |
72 | 72 | case s: String => | |
73 | 73 | addressFromString(s) | |
74 | 74 | case _: Unit => | |
75 | 75 | unit | |
76 | 76 | case _ => | |
77 | 77 | throw("Match error") | |
78 | 78 | } | |
79 | 79 | case _: Unit => | |
80 | 80 | unit | |
81 | 81 | case _ => | |
82 | 82 | throw("Match error") | |
83 | 83 | } | |
84 | 84 | ||
85 | 85 | let votingResultAddressOrFail = valueOrErrorMessage(votingResultAddressOption, wrapErr("invalid voting result address")) | |
86 | 86 | ||
87 | 87 | let childrenAddressOption = match configAddressOption { | |
88 | 88 | case a: Address => | |
89 | 89 | match getString(a, keyChildrenAddress()) { | |
90 | 90 | case s: String => | |
91 | 91 | addressFromString(s) | |
92 | 92 | case _: Unit => | |
93 | 93 | unit | |
94 | 94 | case _ => | |
95 | 95 | throw("Match error") | |
96 | 96 | } | |
97 | 97 | case _: Unit => | |
98 | 98 | unit | |
99 | 99 | case _ => | |
100 | 100 | throw("Match error") | |
101 | 101 | } | |
102 | 102 | ||
103 | 103 | let childrenAddressOrFail = valueOrErrorMessage(childrenAddressOption, wrapErr("invalid children address")) | |
104 | 104 | ||
105 | 105 | let lpAssetIdOption = match getString(this, keyLpAssetId()) { | |
106 | 106 | case s: String => | |
107 | 107 | fromBase58String(s) | |
108 | 108 | case _: Unit => | |
109 | 109 | unit | |
110 | 110 | case _ => | |
111 | 111 | throw("Match error") | |
112 | 112 | } | |
113 | 113 | ||
114 | 114 | let lpAssetIdOrFail = valueOrErrorMessage(lpAssetIdOption, wrapErr("invalid lpAssetId")) | |
115 | 115 | ||
116 | 116 | func onlyAddress (i,address) = if ((i.caller == address)) | |
117 | 117 | then true | |
118 | 118 | else throwErr("permission denied") | |
119 | 119 | ||
120 | 120 | ||
121 | 121 | func onlyThis (i) = onlyAddress(i, this) | |
122 | 122 | ||
123 | 123 | ||
124 | 124 | func onlyCalculator (i) = onlyAddress(i, calculatorAddressOrFail) | |
125 | 125 | ||
126 | 126 | ||
127 | 127 | @Callable(i) | |
128 | 128 | func stringEntry (key,val) = if (onlyCalculator(i)) | |
129 | 129 | then $Tuple2([StringEntry(key, val)], key) | |
130 | 130 | else $Tuple2(nil, unit) | |
131 | 131 | ||
132 | 132 | ||
133 | 133 | ||
134 | 134 | @Callable(i) | |
135 | 135 | func integerEntry (key,val) = if (onlyCalculator(i)) | |
136 | 136 | then $Tuple2([IntegerEntry(key, val)], key) | |
137 | 137 | else $Tuple2(nil, unit) | |
138 | 138 | ||
139 | 139 | ||
140 | 140 | ||
141 | 141 | @Callable(i) | |
142 | 142 | func booleanEntry (key,val) = if (onlyCalculator(i)) | |
143 | 143 | then $Tuple2([BooleanEntry(key, val)], key) | |
144 | 144 | else $Tuple2(nil, unit) | |
145 | 145 | ||
146 | 146 | ||
147 | 147 | ||
148 | 148 | @Callable(i) | |
149 | 149 | func binaryEntry (key,val) = if (onlyCalculator(i)) | |
150 | 150 | then $Tuple2([BinaryEntry(key, val)], key) | |
151 | 151 | else $Tuple2(nil, unit) | |
152 | 152 | ||
153 | 153 | ||
154 | 154 | ||
155 | 155 | @Callable(i) | |
156 | 156 | func deleteEntry (key) = if (onlyCalculator(i)) | |
157 | 157 | then $Tuple2([DeleteEntry(key)], key) | |
158 | 158 | else $Tuple2(nil, unit) | |
159 | 159 | ||
160 | 160 | ||
161 | 161 | ||
162 | 162 | @Callable(i) | |
163 | 163 | func reissue (amount) = if (onlyCalculator(i)) | |
164 | 164 | then $Tuple2([Reissue(lpAssetIdOrFail, amount, true)], amount) | |
165 | 165 | else $Tuple2(nil, unit) | |
166 | 166 | ||
167 | 167 | ||
168 | 168 | ||
169 | 169 | @Callable(i) | |
170 | 170 | func burn (amount) = if (onlyCalculator(i)) | |
171 | 171 | then $Tuple2([Burn(lpAssetIdOrFail, amount)], amount) | |
172 | 172 | else $Tuple2(nil, unit) | |
173 | 173 | ||
174 | 174 | ||
175 | 175 | ||
176 | 176 | @Callable(i) | |
177 | 177 | func transferAsset (recepientBytes,amount,assetId) = if (onlyCalculator(i)) | |
178 | 178 | then $Tuple2([ScriptTransfer(Address(recepientBytes), amount, assetId)], amount) | |
179 | 179 | else $Tuple2(nil, unit) | |
180 | 180 | ||
181 | 181 | ||
182 | 182 | ||
183 | 183 | @Callable(i) | |
184 | 184 | func transferWaves (recepientBytes,amount) = if (onlyCalculator(i)) | |
185 | 185 | then $Tuple2([ScriptTransfer(Address(recepientBytes), amount, unit)], amount) | |
186 | 186 | else $Tuple2(nil, unit) | |
187 | 187 | ||
188 | 188 | ||
189 | 189 | ||
190 | 190 | @Callable(i) | |
191 | 191 | func finalize () = throwErr("not implemented yet") | |
192 | 192 | ||
193 | 193 | ||
194 | 194 | ||
195 | 195 | @Callable(i) | |
196 | 196 | func claimLP () = $Tuple2(nil, reentrantInvoke(calculatorAddressOrFail, "claimLP", [i.caller.bytes], i.payments)) | |
197 | 197 | ||
198 | 198 | ||
199 | 199 | ||
200 | 200 | @Callable(i) | |
201 | 201 | func claimWaves (txIdStr) = $Tuple2(nil, reentrantInvoke(calculatorAddressOrFail, "claimWaves", [i.caller.bytes, fromBase58String(txIdStr)], i.payments)) | |
202 | 202 | ||
203 | 203 | ||
204 | 204 | ||
205 | 205 | @Callable(i) | |
206 | 206 | func invest () = $Tuple2(nil, reentrantInvoke(calculatorAddressOrFail, "invest", [i.caller.bytes], i.payments)) | |
207 | 207 | ||
208 | 208 | ||
209 | 209 | ||
210 | 210 | @Callable(i) | |
211 | 211 | func withdraw () = $Tuple2(nil, reentrantInvoke(calculatorAddressOrFail, "withdraw", [i.caller.bytes], i.payments)) | |
212 | 212 | ||
213 | 213 | ||
214 | 214 | ||
215 | 215 | @Callable(i) | |
216 | 216 | func cancelWithdraw (txIdStr) = $Tuple2(nil, reentrantInvoke(calculatorAddressOrFail, "cancelWithdraw", [i.caller.bytes, fromBase58String(txIdStr)], i.payments)) | |
217 | 217 | ||
218 | 218 | ||
219 | 219 | ||
220 | 220 | @Callable(i) | |
221 | 221 | func processBlocks () = $Tuple2(nil, reentrantInvoke(calculatorAddressOrFail, "processBlocks", [i.caller.bytes], i.payments)) | |
222 | 222 | ||
223 | 223 | ||
224 | 224 | @Verifier(tx) | |
225 | 225 | func verify () = { | |
226 | 226 | let byProposal = valueOrElse(getBoolean(votingResultAddressOrFail, keyProposalAllowBroadcast(this, tx.id)), false) | |
227 | 227 | let byOwner = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
228 | 228 | if ((votingResultAddressOption != unit)) | |
229 | 229 | then byProposal | |
230 | 230 | else byOwner | |
231 | 231 | } | |
232 | 232 |
github/deemru/w8io/026f985 53.29 ms ◑