tx · 7NNrhbzqJK4BM1L9CXkiBoqKa5kAwVrAx2K2ek7fepB1 3Mxcem7TxoX4WGHwv5K6Z591KVE1YoG42p4: -0.01000000 Waves 2022.05.19 16:21 [2058599] smart account 3Mxcem7TxoX4WGHwv5K6Z591KVE1YoG42p4 > SELF 0.00000000 Waves
{ "type": 13, "id": "7NNrhbzqJK4BM1L9CXkiBoqKa5kAwVrAx2K2ek7fepB1", "fee": 1000000, "feeAssetId": null, "timestamp": 1652966510505, "version": 2, "chainId": 84, "sender": "3Mxcem7TxoX4WGHwv5K6Z591KVE1YoG42p4", "senderPublicKey": "HLzuME8S4hFVvLRdFU4YZgrDuhQu9hzRZBxFu3ZtpoGn", "proofs": [ "5GPL4YHjk4igWGcLMh92rARdWQNsrWHDmXiKNc1M3CZS4hGNAueraco23zVi4JwxeYPgjaBhk2THAvKcUNKdwV9J" ], "script": "base64:AAIFAAAAAAAAABMIAhIECgIIGBIAEgASBQoDBAEIAAAAIgAAAAAHa0FjdGl2ZQIAAAAGYWN0aXZlAAAAAAZrQ2F1c2UCAAAADnNodXRkb3duX2NhdXNlAAAAAAxrVVNETkFkZHJlc3MCAAAAGHN0YWtpbmdfdXNkbm5zYnRfYWRkcmVzcwAAAAAMa0VVUk5BZGRyZXNzAgAAABRzdGFraW5nX2V1cm5fYWRkcmVzcwAAAAAMa0xlYXNpbmdQb29sAgAAAA9sZWFzaW5nX2FkZHJlc3MAAAAADmtMZWFzaW5nQW1vdW50AgAAAA5sZWFzaW5nX2Ftb3VudAAAAAAKa0xlYXNpbmdJZAIAAAAKbGVhc2luZ19pZAAAAAANa0FkbWluUHViS2V5MQIAAAALYWRtaW5fcHViXzEAAAAADWtBZG1pblB1YktleTICAAAAC2FkbWluX3B1Yl8yAAAAAA1rQWRtaW5QdWJLZXkzAgAAAAthZG1pbl9wdWJfMwAAAAASa0FkbWluSW52b2tlUHViS2V5AgAAABBhZG1pbl9pbnZva2VfcHViAAAAAA1rQ3BtbUNvbnRyYWN0AgAA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5QdWJLZXkxU2lnbmVkBQAAABJhZG1pblB1YktleTJTaWduZWQFAAAAEmFkbWluUHViS2V5M1NpZ25lZAAAAAAAAAAAAgUAAAATbXVsdGlTaWduZWRCeUFkbWluc/Xxpy0=", "height": 2058599, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: 5w9o2taNoxGrBAosmGYvi9Jhs6QqcBCSTMiMfLcyJJNb Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 5 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let kActive = "active" | |
5 | + | ||
6 | + | let kCause = "shutdown_cause" | |
7 | + | ||
8 | + | let kUSDNAddress = "staking_usdnnsbt_address" | |
9 | + | ||
10 | + | let kEURNAddress = "staking_eurn_address" | |
11 | + | ||
12 | + | let kLeasingPool = "leasing_address" | |
13 | + | ||
14 | + | let kLeasingAmount = "leasing_amount" | |
15 | + | ||
16 | + | let kLeasingId = "leasing_id" | |
17 | + | ||
18 | + | let kAdminPubKey1 = "admin_pub_1" | |
19 | + | ||
20 | + | let kAdminPubKey2 = "admin_pub_2" | |
21 | + | ||
22 | + | let kAdminPubKey3 = "admin_pub_3" | |
23 | + | ||
24 | + | let kAdminInvokePubKey = "admin_invoke_pub" | |
25 | + | ||
26 | + | let kCpmmContract = "cpmm_contract" | |
27 | + | ||
28 | + | let kUSDNAssetId = "usdn_asset_id" | |
29 | + | ||
30 | + | let kEURNAssetId = "eurn_asset_id" | |
31 | + | ||
32 | + | let kStakingAssets = "staking_assets" | |
33 | + | ||
34 | + | let oracle = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9') | |
35 | + | ||
36 | + | func getBase58FromOracle (key) = match getString(oracle, key) { | |
37 | + | case string: String => | |
38 | + | fromBase58String(string) | |
39 | + | case nothing => | |
40 | + | throw((key + "is empty")) | |
41 | + | } | |
42 | + | ||
43 | + | ||
44 | + | let adminPubKey1 = getBase58FromOracle(kAdminPubKey1) | |
45 | + | ||
46 | + | let adminPubKey2 = getBase58FromOracle(kAdminPubKey2) | |
47 | + | ||
48 | + | let adminPubKey3 = getBase58FromOracle(kAdminPubKey3) | |
49 | + | ||
50 | + | let adminPubKeyInvoke = getBase58FromOracle(kAdminInvokePubKey) | |
51 | + | ||
52 | + | let stakingUSDNAddress = Address(getBase58FromOracle(kUSDNAddress)) | |
53 | + | ||
54 | + | let stakingEURNAddress = Address(getBase58FromOracle(kEURNAddress)) | |
55 | + | ||
56 | + | let cpmmContract = Address(getBase58FromOracle(kCpmmContract)) | |
57 | + | ||
58 | + | let USDN = getBase58FromOracle(kUSDNAssetId) | |
59 | + | ||
60 | + | let EURN = getBase58FromOracle(kEURNAssetId) | |
61 | + | ||
62 | + | let stakingAssets = getStringValue(oracle, kStakingAssets) | |
63 | + | ||
64 | + | let active = valueOrElse(getBoolean(this, kActive), true) | |
65 | + | ||
66 | + | func isActive () = if (active) | |
67 | + | then unit | |
68 | + | else throw("DApp is inactive at this moment") | |
69 | + | ||
70 | + | ||
71 | + | func suspend (cause) = [BooleanEntry(kActive, false), StringEntry(kCause, cause)] | |
72 | + | ||
73 | + | ||
74 | + | func calcStakingFuncAndAddres (stake,assetId) = if (stake) | |
75 | + | then if ((assetId == USDN)) | |
76 | + | then $Tuple2("lockNeutrino", stakingUSDNAddress) | |
77 | + | else $Tuple2("startStaking", stakingEURNAddress) | |
78 | + | else if ((assetId == USDN)) | |
79 | + | then $Tuple2("unlockNeutrino", stakingUSDNAddress) | |
80 | + | else $Tuple2("stopStaking", stakingEURNAddress) | |
81 | + | ||
82 | + | ||
83 | + | func calcStakingParams (stake,amount,assetId) = if (stake) | |
84 | + | then { | |
85 | + | let $t021132179 = calcStakingFuncAndAddres(stake, assetId) | |
86 | + | let call = $t021132179._1 | |
87 | + | let stakingAddr = $t021132179._2 | |
88 | + | $Tuple4(call, stakingAddr, nil, [AttachedPayment(assetId, amount)]) | |
89 | + | } | |
90 | + | else { | |
91 | + | let $t022652331 = calcStakingFuncAndAddres(stake, assetId) | |
92 | + | let call = $t022652331._1 | |
93 | + | let stakingAddr = $t022652331._2 | |
94 | + | $Tuple4(call, stakingAddr, [amount, toBase58String(assetId)], nil) | |
95 | + | } | |
96 | + | ||
97 | + | ||
98 | + | func collectPayments (acc,payment) = { | |
99 | + | let $t024932536 = acc | |
100 | + | let paymentAmounts = $t024932536._1 | |
101 | + | let paymentAssetIds = $t024932536._2 | |
102 | + | $Tuple2((paymentAmounts :+ payment.amount), (paymentAssetIds :+ payment.assetId)) | |
103 | + | } | |
104 | + | ||
105 | + | ||
106 | + | func collectState (result,source) = match source { | |
107 | + | case e: Issue|Burn|Reissue|ScriptTransfer|BinaryEntry|BooleanEntry|StringEntry|IntegerEntry => | |
108 | + | (result :+ e) | |
109 | + | case _ => | |
110 | + | result | |
111 | + | } | |
112 | + | ||
113 | + | ||
114 | + | @Callable(i) | |
115 | + | func callFunction (funcName,args) = valueOrElse(isActive(), { | |
116 | + | let $t030463132 = { | |
117 | + | let $l = i.payments | |
118 | + | let $s = size($l) | |
119 | + | let $acc0 = $Tuple2(nil, nil) | |
120 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
121 | + | then $a | |
122 | + | else collectPayments($a, $l[$i]) | |
123 | + | ||
124 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
125 | + | then $a | |
126 | + | else throw("List size exceeds 10") | |
127 | + | ||
128 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
129 | + | } | |
130 | + | let paymentAmounts = $t030463132._1 | |
131 | + | let paymentAssetIds = $t030463132._2 | |
132 | + | let r = { | |
133 | + | let @ = reentrantInvoke(cpmmContract, funcName, [i.caller.bytes, args, paymentAmounts, paymentAssetIds], nil) | |
134 | + | if ($isInstanceOf(@, "List[Any]")) | |
135 | + | then @ | |
136 | + | else throw("Couldn't cast Any to List[Any]") | |
137 | + | } | |
138 | + | if ((r == r)) | |
139 | + | then { | |
140 | + | let $l = r | |
141 | + | let $s = size($l) | |
142 | + | let $acc0 = nil | |
143 | + | func $f1_1 ($a,$i) = if (($i >= $s)) | |
144 | + | then $a | |
145 | + | else collectState($a, $l[$i]) | |
146 | + | ||
147 | + | func $f1_2 ($a,$i) = if (($i >= $s)) | |
148 | + | then $a | |
149 | + | else throw("List size exceeds 15") | |
150 | + | ||
151 | + | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
152 | + | } | |
153 | + | else throw("Strict value is not equal to itself.") | |
154 | + | }) | |
155 | + | ||
156 | + | ||
157 | + | ||
158 | + | @Callable(i) | |
159 | + | func shutdown () = if (!(active)) | |
160 | + | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, kCause), "the cause wasn't specified"))) | |
161 | + | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey))) | |
162 | + | then throw("Only admin can call this function") | |
163 | + | else suspend("Paused by admin") | |
164 | + | ||
165 | + | ||
166 | + | ||
167 | + | @Callable(i) | |
168 | + | func activate () = if (active) | |
169 | + | then throw("DApp is already active") | |
170 | + | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey))) | |
171 | + | then throw("Only admin can call this function") | |
172 | + | else [BooleanEntry(kActive, true), DeleteEntry(kCause)] | |
173 | + | ||
174 | + | ||
175 | + | ||
176 | + | @Callable(i) | |
177 | + | func stakeUnstake (stake,amount,assetIdString) = valueOrElse(isActive(), if ((i.caller != cpmmContract)) | |
178 | + | then throw("Only global Contract can invoke this function") | |
179 | + | else if ((assetIdString == "WAVES")) | |
180 | + | then { | |
181 | + | let pool = addressFromStringValue(valueOrErrorMessage(getString(oracle, kLeasingPool), "No leasing pool in oracle")) | |
182 | + | let leasingId = getBinary(this, kLeasingId) | |
183 | + | let leasingAmount = valueOrElse(getInteger(this, kLeasingAmount), 0) | |
184 | + | let newLeaseAmount = if (stake) | |
185 | + | then (leasingAmount + amount) | |
186 | + | else (leasingAmount - amount) | |
187 | + | let newLease = Lease(pool, newLeaseAmount) | |
188 | + | let newLeaseId = calculateLeaseId(newLease) | |
189 | + | let baseEtry = [newLease, BinaryEntry(kLeasingId, newLeaseId), IntegerEntry(kLeasingAmount, newLeaseAmount)] | |
190 | + | match leasingId { | |
191 | + | case lId: ByteVector => | |
192 | + | ([LeaseCancel(lId)] ++ baseEtry) | |
193 | + | case _ => | |
194 | + | baseEtry | |
195 | + | } | |
196 | + | } | |
197 | + | else { | |
198 | + | let $t050745177 = calcStakingParams(stake, amount, fromBase58String(assetIdString)) | |
199 | + | let call = $t050745177._1 | |
200 | + | let addr = $t050745177._2 | |
201 | + | let params = $t050745177._3 | |
202 | + | let payments = $t050745177._4 | |
203 | + | let inv = invoke(addr, call, params, payments) | |
204 | + | if ((inv == inv)) | |
205 | + | then nil | |
206 | + | else throw("Strict value is not equal to itself.") | |
207 | + | }) | |
208 | + | ||
209 | + | ||
210 | + | @Verifier(tx) | |
211 | + | func verify () = { | |
212 | + | let multiSignedByAdmins = { | |
213 | + | let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
214 | + | then 1 | |
215 | + | else 0 | |
216 | + | let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2)) | |
217 | + | then 1 | |
218 | + | else 0 | |
219 | + | let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3)) | |
220 | + | then 1 | |
221 | + | else 0 | |
222 | + | (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2) | |
223 | + | } | |
224 | + | multiSignedByAdmins | |
225 | + | } | |
226 | + |
github/deemru/w8io/169f3d6 23.97 ms ◑