tx · 8po6AV1JjYfPx8dQvUyfngpxxLdjaUkecPFBhDgVXsvF

3MuS6qVvhBR6wSynFRdcE3fVqmGBjoc7Hhx:  -0.01000000 Waves

2023.07.03 16:58 [2649821] smart account 3MuS6qVvhBR6wSynFRdcE3fVqmGBjoc7Hhx > SELF 0.00000000 Waves

{ "type": 13, "id": "8po6AV1JjYfPx8dQvUyfngpxxLdjaUkecPFBhDgVXsvF", "fee": 1000000, "feeAssetId": null, "timestamp": 1688392747130, "version": 1, "sender": "3MuS6qVvhBR6wSynFRdcE3fVqmGBjoc7Hhx", "senderPublicKey": "62CHk4MqTdq3LqeUycy7TPnpvwrjgerSa2FqAY2EafXn", "proofs": [ "5zwWyi9Ts7zPEBNKWhSxeKoYHtckGqpRUEo3Kczs2wru9FfdcNawiHMir7qVfotPVJ2BxJ14uztdEZN32qhxkg52" ], "script": "base64:BwJVCAISBAoCCAgSBAoCCAESBAoCCAQSBAoCCAISAwoBCBIDCgEBEgMKAQESBQoDAgECEgQKAgIBEgQKAgIBEgUKAwEBARIAEgMKAQgSABIAEgMKAQgSAB4AA1NFUAICX18AEGNvbnRyYWN0RmlsZW5hbWUCDGZhY3RvcnkucmlkZQEHd3JhcEVycgEBcwkArAICCQCsAgIFEGNvbnRyYWN0RmlsZW5hbWUCAjogBQFzAQh0aHJvd0VycgEBcwkAAgEJAQd3cmFwRXJyAQUBcwEUa2V5Q2FsY3VsYXRvckFkZHJlc3MAAg4lc19fY2FsY3VsYXRvcgESa2V5VHJlYXN1cnlBZGRyZXNzAAIMJXNfX3RyZWFzdXJ5AQ9rZXlDaGlsZEFkZHJlc3MAAgklc19fY2hpbGQBGGtleUJsb2NrUHJvY2Vzc2luZ1Jld2FyZAACGSVzX19ibG9ja1Byb2Nlc3NpbmdSZXdhcmQBFWtleU5leHRCbG9ja1RvUHJvY2VzcwACFiVzX19uZXh0QmxvY2tUb1Byb2Nlc3MBDGtleUxwQXNzZXRJZAACDSVzX19scEFzc2V0SWQAF2NhbGN1b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FCmJ5UHJvcG9zYWwGBQdieU93bmVyBQdieU93bmVyCqggLA==", "chainId": 84, "height": 2649821, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 85cJLXGv9LjPoE9dFmACeAzx3ZVuryNKaDg5zQqTC8T4 Next: 6UzAfASQVx6Ecb3dsUB23K3RdxiobYfiwWjAXX1MSv9x Diff:
OldNewDifferences
3939 }
4040
4141 let calculatorAddressOrFail = valueOrErrorMessage(calculatorAddressOption, wrapErr("invalid calculator address"))
42+
43+let treasuryAddressOption = match getString(this, keyTreasuryAddress()) {
44+ case s: String =>
45+ addressFromString(s)
46+ case _: Unit =>
47+ unit
48+ case _ =>
49+ throw("Match error")
50+}
51+
52+let treasuryAddressOrFail = valueOrErrorMessage(treasuryAddressOption, wrapErr("invalid proxy treasury address"))
4253
4354 func keyConfigAddress () = "%s__config"
4455
188199
189200
190201 @Callable(i)
191-func finalize (newTreasuryVolumeInWaves,xtnPrice,pwrManagersBonus,treasuryVolumeDiffAllocationCoef) = $Tuple2(nil, reentrantInvoke(calculatorAddressOrFail, "finalize", [i.caller.bytes, newTreasuryVolumeInWaves, xtnPrice, pwrManagersBonus, treasuryVolumeDiffAllocationCoef], i.payments))
202+func transferFromProxyTreasury (recipientBytes,rewardsAmount) = if (onlyCalculator(i))
203+ then $Tuple2(nil, invoke(treasuryAddressOrFail, "transferWaves", [recipientBytes, rewardsAmount], nil))
204+ else $Tuple2(nil, unit)
205+
206+
207+
208+@Callable(i)
209+func finalize (newTreasuryVolumeInWaves,pwrManagersBonusInWaves,treasuryVolumeDiffAllocationCoef) = $Tuple2(nil, reentrantInvoke(calculatorAddressOrFail, "finalize", [i.caller.bytes, newTreasuryVolumeInWaves, pwrManagersBonusInWaves, treasuryVolumeDiffAllocationCoef], i.payments))
192210
193211
194212
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 7 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SEP = "__"
55
66 let contractFilename = "factory.ride"
77
88 func wrapErr (s) = ((contractFilename + ": ") + s)
99
1010
1111 func throwErr (s) = throw(wrapErr(s))
1212
1313
1414 func keyCalculatorAddress () = "%s__calculator"
1515
1616
1717 func keyTreasuryAddress () = "%s__treasury"
1818
1919
2020 func keyChildAddress () = "%s__child"
2121
2222
2323 func keyBlockProcessingReward () = "%s__blockProcessingReward"
2424
2525
2626 func keyNextBlockToProcess () = "%s__nextBlockToProcess"
2727
2828
2929 func keyLpAssetId () = "%s__lpAssetId"
3030
3131
3232 let calculatorAddressOption = match getString(this, keyCalculatorAddress()) {
3333 case s: String =>
3434 addressFromString(s)
3535 case _: Unit =>
3636 unit
3737 case _ =>
3838 throw("Match error")
3939 }
4040
4141 let calculatorAddressOrFail = valueOrErrorMessage(calculatorAddressOption, wrapErr("invalid calculator address"))
42+
43+let treasuryAddressOption = match getString(this, keyTreasuryAddress()) {
44+ case s: String =>
45+ addressFromString(s)
46+ case _: Unit =>
47+ unit
48+ case _ =>
49+ throw("Match error")
50+}
51+
52+let treasuryAddressOrFail = valueOrErrorMessage(treasuryAddressOption, wrapErr("invalid proxy treasury address"))
4253
4354 func keyConfigAddress () = "%s__config"
4455
4556
4657 func keyChildrenAddress () = "contract_children"
4758
4859
4960 func keyVotingResultAddress () = "contract_voting_result"
5061
5162
5263 func keyProposalAllowBroadcast (address,txId) = ((("proposal_allow_broadcast_" + toString(address)) + "_") + toBase58String(txId))
5364
5465
5566 func keyInvestedByUser (childAddress,userAddress) = makeString(["investor", toString(childAddress), toString(userAddress)], "_")
5667
5768
5869 let configAddressOption = match getString(this, keyConfigAddress()) {
5970 case s: String =>
6071 addressFromString(s)
6172 case _: Unit =>
6273 unit
6374 case _ =>
6475 throw("Match error")
6576 }
6677
6778 let configAddressOrFail = valueOrErrorMessage(configAddressOption, wrapErr("invalid config address"))
6879
6980 let votingResultAddressOption = match configAddressOption {
7081 case a: Address =>
7182 match getString(a, keyVotingResultAddress()) {
7283 case s: String =>
7384 addressFromString(s)
7485 case _: Unit =>
7586 unit
7687 case _ =>
7788 throw("Match error")
7889 }
7990 case _: Unit =>
8091 unit
8192 case _ =>
8293 throw("Match error")
8394 }
8495
8596 let votingResultAddressOrFail = valueOrErrorMessage(votingResultAddressOption, wrapErr("invalid voting result address"))
8697
8798 let childrenAddressOption = match configAddressOption {
8899 case a: Address =>
89100 match getString(a, keyChildrenAddress()) {
90101 case s: String =>
91102 addressFromString(s)
92103 case _: Unit =>
93104 unit
94105 case _ =>
95106 throw("Match error")
96107 }
97108 case _: Unit =>
98109 unit
99110 case _ =>
100111 throw("Match error")
101112 }
102113
103114 let childrenAddressOrFail = valueOrErrorMessage(childrenAddressOption, wrapErr("invalid children address"))
104115
105116 let lpAssetIdOption = match getString(this, keyLpAssetId()) {
106117 case s: String =>
107118 fromBase58String(s)
108119 case _: Unit =>
109120 unit
110121 case _ =>
111122 throw("Match error")
112123 }
113124
114125 let lpAssetIdOrFail = valueOrErrorMessage(lpAssetIdOption, wrapErr("invalid lpAssetId"))
115126
116127 func onlyAddress (i,address) = if ((i.caller == address))
117128 then true
118129 else throwErr("permission denied")
119130
120131
121132 func onlyThis (i) = onlyAddress(i, this)
122133
123134
124135 func onlyCalculator (i) = onlyAddress(i, calculatorAddressOrFail)
125136
126137
127138 @Callable(i)
128139 func stringEntry (key,val) = if (onlyCalculator(i))
129140 then $Tuple2([StringEntry(key, val)], key)
130141 else $Tuple2(nil, unit)
131142
132143
133144
134145 @Callable(i)
135146 func integerEntry (key,val) = if (onlyCalculator(i))
136147 then $Tuple2([IntegerEntry(key, val)], key)
137148 else $Tuple2(nil, unit)
138149
139150
140151
141152 @Callable(i)
142153 func booleanEntry (key,val) = if (onlyCalculator(i))
143154 then $Tuple2([BooleanEntry(key, val)], key)
144155 else $Tuple2(nil, unit)
145156
146157
147158
148159 @Callable(i)
149160 func binaryEntry (key,val) = if (onlyCalculator(i))
150161 then $Tuple2([BinaryEntry(key, val)], key)
151162 else $Tuple2(nil, unit)
152163
153164
154165
155166 @Callable(i)
156167 func deleteEntry (key) = if (onlyCalculator(i))
157168 then $Tuple2([DeleteEntry(key)], key)
158169 else $Tuple2(nil, unit)
159170
160171
161172
162173 @Callable(i)
163174 func reissue (amount) = if (onlyCalculator(i))
164175 then $Tuple2([Reissue(lpAssetIdOrFail, amount, true)], amount)
165176 else $Tuple2(nil, unit)
166177
167178
168179
169180 @Callable(i)
170181 func burn (amount) = if (onlyCalculator(i))
171182 then $Tuple2([Burn(lpAssetIdOrFail, amount)], amount)
172183 else $Tuple2(nil, unit)
173184
174185
175186
176187 @Callable(i)
177188 func transferAsset (recepientBytes,amount,assetId) = if (onlyCalculator(i))
178189 then $Tuple2([ScriptTransfer(Address(recepientBytes), amount, assetId)], amount)
179190 else $Tuple2(nil, unit)
180191
181192
182193
183194 @Callable(i)
184195 func transferWaves (recepientBytes,amount) = if (onlyCalculator(i))
185196 then $Tuple2([ScriptTransfer(Address(recepientBytes), amount, unit)], amount)
186197 else $Tuple2(nil, unit)
187198
188199
189200
190201 @Callable(i)
191-func finalize (newTreasuryVolumeInWaves,xtnPrice,pwrManagersBonus,treasuryVolumeDiffAllocationCoef) = $Tuple2(nil, reentrantInvoke(calculatorAddressOrFail, "finalize", [i.caller.bytes, newTreasuryVolumeInWaves, xtnPrice, pwrManagersBonus, treasuryVolumeDiffAllocationCoef], i.payments))
202+func transferFromProxyTreasury (recipientBytes,rewardsAmount) = if (onlyCalculator(i))
203+ then $Tuple2(nil, invoke(treasuryAddressOrFail, "transferWaves", [recipientBytes, rewardsAmount], nil))
204+ else $Tuple2(nil, unit)
205+
206+
207+
208+@Callable(i)
209+func finalize (newTreasuryVolumeInWaves,pwrManagersBonusInWaves,treasuryVolumeDiffAllocationCoef) = $Tuple2(nil, reentrantInvoke(calculatorAddressOrFail, "finalize", [i.caller.bytes, newTreasuryVolumeInWaves, pwrManagersBonusInWaves, treasuryVolumeDiffAllocationCoef], i.payments))
192210
193211
194212
195213 @Callable(i)
196214 func claimLP () = $Tuple2(nil, reentrantInvoke(calculatorAddressOrFail, "claimLP", [i.caller.bytes], i.payments))
197215
198216
199217
200218 @Callable(i)
201219 func claimWaves (txIdStr) = $Tuple2(nil, reentrantInvoke(calculatorAddressOrFail, "claimWaves", [i.caller.bytes, fromBase58String(txIdStr)], i.payments))
202220
203221
204222
205223 @Callable(i)
206224 func invest () = $Tuple2(nil, reentrantInvoke(calculatorAddressOrFail, "invest", [i.caller.bytes], i.payments))
207225
208226
209227
210228 @Callable(i)
211229 func withdraw () = $Tuple2(nil, reentrantInvoke(calculatorAddressOrFail, "withdraw", [i.caller.bytes], i.payments))
212230
213231
214232
215233 @Callable(i)
216234 func cancelWithdraw (txIdStr) = $Tuple2(nil, reentrantInvoke(calculatorAddressOrFail, "cancelWithdraw", [i.caller.bytes, fromBase58String(txIdStr)], i.payments))
217235
218236
219237
220238 @Callable(i)
221239 func processBlocks () = $Tuple2(nil, reentrantInvoke(calculatorAddressOrFail, "processBlocks", [i.caller.bytes], i.payments))
222240
223241
224242 @Verifier(tx)
225243 func verify () = {
226244 let byProposal = valueOrElse(getBoolean(votingResultAddressOrFail, keyProposalAllowBroadcast(this, tx.id)), false)
227245 let byOwner = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
228246 if ((votingResultAddressOption != unit))
229247 then if (byProposal)
230248 then true
231249 else byOwner
232250 else byOwner
233251 }
234252

github/deemru/w8io/026f985 
44.40 ms