tx · JjJ2gsEq3TGnMDy5G9vSpyKrHc43JPzes8CCUEq3y9D 3N3LYhWVMMwUSDzVmNKQK3dDKFvG1sT6PX8: -0.01200000 Waves 2024.03.22 15:11 [3029223] smart account 3N3LYhWVMMwUSDzVmNKQK3dDKFvG1sT6PX8 > SELF 0.00000000 Waves
{ "type": 13, "id": "JjJ2gsEq3TGnMDy5G9vSpyKrHc43JPzes8CCUEq3y9D", "fee": 1200000, "feeAssetId": null, "timestamp": 1711109388541, "version": 2, "chainId": 84, "sender": "3N3LYhWVMMwUSDzVmNKQK3dDKFvG1sT6PX8", "senderPublicKey": "EFS9Kr4PQgyRsCT4tt2skry6S4ofTwzRJKormQc5F5aC", "proofs": [ "YJTEKJsg6A15p5ooH6ombCAhUV5KX6eqRxLCLnnBuosDQrdhWHBGYkrTQfaZ5FHCukk61mvUNWSqpRRaCw26hJs" ], "script": "base64:BwIlCAISBgoEAQgICBIAEgMKAQgSABIAEgASABIAEgMKAQgSAwoBCCwACVNFUEFSQVRPUgICX18ADEtFWV9NVUxUSVNJRwIITVVMVElTSUcACktFWV9TVEFUVVMCBlNUQVRVUwAIS0VZX0lOSVQCBElOSVQACktFWV9QQVVTRUQCBlBBVVNFRAAKS0VZX1BBVVNFUgIGUEFVU0VSAAlLRVlfQ0hBSU4CBUNIQUlOABRLRVlfR0FURVdBWV9DT05UUkFDVAIQR0FURVdBWV9DT05UUkFDVAATS0VZX1NXQVZFU19DT05UUkFDVAIPU1dBVkVTX0NPTlRSQUNUAAxLRVlfUkVTRVJWRVMCCFJFU0VSVkVTAAxGVU5DX0RFUE9TSVQCB2RlcG9zaXQABVdBVkVTAgVXQVZFUwAOV0FWRVNfREVDSU1BTFMACAAMREVYX0RFQ0lNQUxTAAgAB01BWF9JTlQA//////////9/ARBfdmFsaWRhdGVBZGRyZXNzAghhZGRyZXNzXwRlcnJfBAckbWF0Y2gwCQCmCAEFCGFkZHJlc3NfAwkAAQIFByRtYXRjaDACB0FkZHJlc3MEAWEFByR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Db250cmFjdAEIBQFpBmNhbGxlcgkBEF93aGVuSW5pdGlhbGl6ZWQABwkBEF92YWxpZGF0ZUFkZHJlc3MCBQdwYXVzZXJfAhx1cGRhdGVQYXVzZXI6IGludmFsaWQgcGF1c2VyBwMJAAACBQNlcnIFA2VycgkAlAoCCQELX3NhdmVQYXVzZXIBCQERQGV4dHJOYXRpdmUoMTA2MikBBQdwYXVzZXJfBQR1bml0CQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAWkBC3NldE11bHRpc2lnAQltdWx0aXNpZ18EA2VycgMJARFfb25seVRoaXNDb250cmFjdAEIBQFpBmNhbGxlcgkBEF92YWxpZGF0ZUFkZHJlc3MCBQltdWx0aXNpZ18CHXNldE11bHRpc2lnOiBpbnZhbGlkIG11bHRpc2lnBwMJAAACBQNlcnIFA2VycgkAlAoCCQENX3NhdmVNdWx0aXNpZwEJARFAZXh0ck5hdGl2ZSgxMDYyKQEFCW11bHRpc2lnXwUEdW5pdAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgECdHgBBnZlcmlmeQAEByRtYXRjaDAJAKIIAQUMS0VZX01VTFRJU0lHAwkAAQIFByRtYXRjaDACBlN0cmluZwQIbXVsdGlzaWcFByRtYXRjaDAJAQt2YWx1ZU9yRWxzZQIJAJsIAgkBEUBleHRyTmF0aXZlKDEwNjIpAQUIbXVsdGlzaWcJALkJAgkAzAgCBQpLRVlfU1RBVFVTCQDMCAIJAKUIAQUEdGhpcwkAzAgCCQDYBAEIBQJ0eAJpZAUDbmlsBQlTRVBBUkFUT1IHCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V52hcYGQ==", "height": 3029223, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CGFztBDyWMPF6huiE4JpS2WeLofSYCFkc97TVjboWiQs Next: none Diff:
Old | New | Differences | |
---|---|---|---|
243 | 243 | let err1 = _validateInt(amount, 1, MAX_INT, "deposit: invalid payment amount") | |
244 | 244 | if ((err1 == err1)) | |
245 | 245 | then { | |
246 | - | let invocation = invoke(_loadGatewayContract(), FUNC_DEPOSIT, [toString(this), caller, caller, _loadChainId(), asset, amount], nil) | |
246 | + | let invocation = invoke(_loadGatewayContract(), FUNC_DEPOSIT, [toString(this), caller, caller, toString(_loadChainId()), asset, toString(amount)], nil) | |
247 | 247 | if ((invocation == invocation)) | |
248 | 248 | then { | |
249 | 249 | let staking = if ((asset == WAVES)) | |
289 | 289 | let err1 = _validateInt(amount, 1, MAX_INT, "depositTo: invalid payment amount") | |
290 | 290 | if ((err1 == err1)) | |
291 | 291 | then { | |
292 | - | let invocation = invoke(_loadGatewayContract(), FUNC_DEPOSIT, [toString(this), caller, to_, _loadChainId(), asset, amount], nil) | |
292 | + | let invocation = invoke(_loadGatewayContract(), FUNC_DEPOSIT, [toString(this), caller, to_, toString(_loadChainId()), asset, toString(amount)], nil) | |
293 | 293 | if ((invocation == invocation)) | |
294 | 294 | then { | |
295 | 295 | let staking = if ((asset == WAVES)) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 7 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SEPARATOR = "__" | |
5 | 5 | ||
6 | 6 | let KEY_MULTISIG = "MULTISIG" | |
7 | 7 | ||
8 | 8 | let KEY_STATUS = "STATUS" | |
9 | 9 | ||
10 | 10 | let KEY_INIT = "INIT" | |
11 | 11 | ||
12 | 12 | let KEY_PAUSED = "PAUSED" | |
13 | 13 | ||
14 | 14 | let KEY_PAUSER = "PAUSER" | |
15 | 15 | ||
16 | 16 | let KEY_CHAIN = "CHAIN" | |
17 | 17 | ||
18 | 18 | let KEY_GATEWAY_CONTRACT = "GATEWAY_CONTRACT" | |
19 | 19 | ||
20 | 20 | let KEY_SWAVES_CONTRACT = "SWAVES_CONTRACT" | |
21 | 21 | ||
22 | 22 | let KEY_RESERVES = "RESERVES" | |
23 | 23 | ||
24 | 24 | let FUNC_DEPOSIT = "deposit" | |
25 | 25 | ||
26 | 26 | let WAVES = "WAVES" | |
27 | 27 | ||
28 | 28 | let WAVES_DECIMALS = 8 | |
29 | 29 | ||
30 | 30 | let DEX_DECIMALS = 8 | |
31 | 31 | ||
32 | 32 | let MAX_INT = 9223372036854775807 | |
33 | 33 | ||
34 | 34 | func _validateAddress (address_,err_) = match addressFromString(address_) { | |
35 | 35 | case a: Address => | |
36 | 36 | true | |
37 | 37 | case _ => | |
38 | 38 | throw(err_) | |
39 | 39 | } | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | func _validateInt (val_,lowerBoundary_,upperBoundary_,err_) = if (if ((lowerBoundary_ > val_)) | |
43 | 43 | then true | |
44 | 44 | else (val_ > upperBoundary_)) | |
45 | 45 | then throw(err_) | |
46 | 46 | else true | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func _validateString (val_,err_) = if (if ((0 >= size(val_))) | |
50 | 50 | then true | |
51 | 51 | else contains(val_, SEPARATOR)) | |
52 | 52 | then throw(err_) | |
53 | 53 | else true | |
54 | 54 | ||
55 | 55 | ||
56 | 56 | func _validatePaymentsSize (payments_,target_,err_) = if ((size(payments_) != target_)) | |
57 | 57 | then throw(err_) | |
58 | 58 | else true | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func _getDecimals (assetId_) = if ((assetId_ == WAVES)) | |
62 | 62 | then WAVES_DECIMALS | |
63 | 63 | else match assetInfo(fromBase58String(assetId_)) { | |
64 | 64 | case a: Asset => | |
65 | 65 | a.decimals | |
66 | 66 | case _ => | |
67 | 67 | throw(("_getDecimals: no asset=" + assetId_)) | |
68 | 68 | } | |
69 | 69 | ||
70 | 70 | ||
71 | 71 | func _normalizeDecimals (amount_,sourceDecimals_,targetDecimals_) = if ((sourceDecimals_ >= targetDecimals_)) | |
72 | 72 | then (amount_ / pow(10, 0, (sourceDecimals_ - targetDecimals_), 0, 0, DOWN)) | |
73 | 73 | else (amount_ * pow(10, 0, (targetDecimals_ - sourceDecimals_), 0, 0, DOWN)) | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | func _loadInit () = match getBoolean(KEY_INIT) { | |
77 | 77 | case a: Boolean => | |
78 | 78 | a | |
79 | 79 | case _ => | |
80 | 80 | false | |
81 | 81 | } | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func _saveInit (isInit_) = [BooleanEntry(KEY_INIT, isInit_)] | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func _loadPause () = match getBoolean(KEY_PAUSED) { | |
88 | 88 | case a: Boolean => | |
89 | 89 | a | |
90 | 90 | case _ => | |
91 | 91 | false | |
92 | 92 | } | |
93 | 93 | ||
94 | 94 | ||
95 | 95 | func _savePause (isPaused_) = [BooleanEntry(KEY_PAUSED, isPaused_)] | |
96 | 96 | ||
97 | 97 | ||
98 | 98 | func _loadPauser () = match getString(KEY_PAUSER) { | |
99 | 99 | case a: String => | |
100 | 100 | addressFromStringValue(a) | |
101 | 101 | case _ => | |
102 | 102 | Address(base58'') | |
103 | 103 | } | |
104 | 104 | ||
105 | 105 | ||
106 | 106 | func _savePauser (pauser_) = [StringEntry(KEY_PAUSER, toString(pauser_))] | |
107 | 107 | ||
108 | 108 | ||
109 | 109 | func _loadMultisig () = match getString(KEY_MULTISIG) { | |
110 | 110 | case a: String => | |
111 | 111 | addressFromStringValue(a) | |
112 | 112 | case _ => | |
113 | 113 | Address(base58'') | |
114 | 114 | } | |
115 | 115 | ||
116 | 116 | ||
117 | 117 | func _saveMultisig (multisig_) = [StringEntry(KEY_MULTISIG, toString(multisig_))] | |
118 | 118 | ||
119 | 119 | ||
120 | 120 | func _loadChainId () = match getInteger(KEY_CHAIN) { | |
121 | 121 | case a: Int => | |
122 | 122 | a | |
123 | 123 | case _ => | |
124 | 124 | 0 | |
125 | 125 | } | |
126 | 126 | ||
127 | 127 | ||
128 | 128 | func _saveChainId (chainId_) = [IntegerEntry(KEY_CHAIN, chainId_)] | |
129 | 129 | ||
130 | 130 | ||
131 | 131 | func _loadGatewayContract () = match getString(KEY_GATEWAY_CONTRACT) { | |
132 | 132 | case a: String => | |
133 | 133 | addressFromStringValue(a) | |
134 | 134 | case _ => | |
135 | 135 | Address(base58'') | |
136 | 136 | } | |
137 | 137 | ||
138 | 138 | ||
139 | 139 | func _saveGatewayContract (gatewayContract_) = [StringEntry(KEY_GATEWAY_CONTRACT, toString(gatewayContract_))] | |
140 | 140 | ||
141 | 141 | ||
142 | 142 | func _loadSWavesContract () = match getString(KEY_SWAVES_CONTRACT) { | |
143 | 143 | case a: String => | |
144 | 144 | addressFromStringValue(a) | |
145 | 145 | case _ => | |
146 | 146 | Address(base58'') | |
147 | 147 | } | |
148 | 148 | ||
149 | 149 | ||
150 | 150 | func _saveSWavesContract (sWavesContract_) = [StringEntry(KEY_SWAVES_CONTRACT, toString(sWavesContract_))] | |
151 | 151 | ||
152 | 152 | ||
153 | 153 | func _loadReserves (asset_) = match getInteger(makeString([KEY_RESERVES, asset_], SEPARATOR)) { | |
154 | 154 | case a: Int => | |
155 | 155 | a | |
156 | 156 | case _ => | |
157 | 157 | 0 | |
158 | 158 | } | |
159 | 159 | ||
160 | 160 | ||
161 | 161 | func _saveReserves (asset_,reserves_) = [IntegerEntry(makeString([KEY_RESERVES, asset_], SEPARATOR), reserves_)] | |
162 | 162 | ||
163 | 163 | ||
164 | 164 | func _onlyThisContract (caller_) = if ((caller_ != this)) | |
165 | 165 | then throw("_onlyThisContract: revert") | |
166 | 166 | else true | |
167 | 167 | ||
168 | 168 | ||
169 | 169 | func _whenMultisigSet () = if ((_loadMultisig() == Address(base58''))) | |
170 | 170 | then throw("_whenMultisigSet: revert") | |
171 | 171 | else true | |
172 | 172 | ||
173 | 173 | ||
174 | 174 | func _whenNotInitialized () = if (_loadInit()) | |
175 | 175 | then throw("_whenNotInitialized: revert") | |
176 | 176 | else true | |
177 | 177 | ||
178 | 178 | ||
179 | 179 | func _whenInitialized () = if (!(_loadInit())) | |
180 | 180 | then throw("_whenInitialized: revert") | |
181 | 181 | else true | |
182 | 182 | ||
183 | 183 | ||
184 | 184 | func _whenNotPaused () = if (_loadPause()) | |
185 | 185 | then throw("_whenNotPaused: revert") | |
186 | 186 | else true | |
187 | 187 | ||
188 | 188 | ||
189 | 189 | func _whenPaused () = if (!(_loadPause())) | |
190 | 190 | then throw("_whenPaused: revert") | |
191 | 191 | else true | |
192 | 192 | ||
193 | 193 | ||
194 | 194 | func _onlyPauser (caller_) = if ((caller_ != _loadPauser())) | |
195 | 195 | then throw("_onlyPauser: revert") | |
196 | 196 | else true | |
197 | 197 | ||
198 | 198 | ||
199 | 199 | @Callable(i) | |
200 | 200 | func init (chainId_,pauser_,gatewayContract_,sWavesContract_) = { | |
201 | 201 | let err = if (if (if (if (if (if (_onlyThisContract(i.caller)) | |
202 | 202 | then _whenNotInitialized() | |
203 | 203 | else false) | |
204 | 204 | then _whenMultisigSet() | |
205 | 205 | else false) | |
206 | 206 | then _validateInt(chainId_, 0, MAX_INT, "init: invalid chainId") | |
207 | 207 | else false) | |
208 | 208 | then _validateAddress(pauser_, "init: invalid pauser") | |
209 | 209 | else false) | |
210 | 210 | then _validateAddress(gatewayContract_, "init: invalid gatewayContract") | |
211 | 211 | else false) | |
212 | 212 | then _validateAddress(sWavesContract_, "init: invalid sWavesContract") | |
213 | 213 | else false | |
214 | 214 | if ((err == err)) | |
215 | 215 | then $Tuple2(((((_saveInit(true) ++ _saveChainId(chainId_)) ++ _savePauser(addressFromStringValue(pauser_))) ++ _saveGatewayContract(addressFromStringValue(gatewayContract_))) ++ _saveSWavesContract(addressFromStringValue(sWavesContract_))), unit) | |
216 | 216 | else throw("Strict value is not equal to itself.") | |
217 | 217 | } | |
218 | 218 | ||
219 | 219 | ||
220 | 220 | ||
221 | 221 | @Callable(i) | |
222 | 222 | func deposit () = { | |
223 | 223 | let err = if (if (if (_whenInitialized()) | |
224 | 224 | then _whenNotPaused() | |
225 | 225 | else false) | |
226 | 226 | then _validatePaymentsSize(i.payments, 1, "deposit: no payment") | |
227 | 227 | else false) | |
228 | 228 | then _validateInt(i.payments[0].amount, 0, MAX_INT, "deposit: negative payment") | |
229 | 229 | else false | |
230 | 230 | if ((err == err)) | |
231 | 231 | then { | |
232 | 232 | let caller = toString(i.caller) | |
233 | 233 | let asset = match i.payments[0].assetId { | |
234 | 234 | case a: ByteVector => | |
235 | 235 | toBase58String(a) | |
236 | 236 | case _: Unit => | |
237 | 237 | WAVES | |
238 | 238 | case _ => | |
239 | 239 | throw("Match error") | |
240 | 240 | } | |
241 | 241 | let assetDecimals = _getDecimals(asset) | |
242 | 242 | let amount = _normalizeDecimals(i.payments[0].amount, assetDecimals, DEX_DECIMALS) | |
243 | 243 | let err1 = _validateInt(amount, 1, MAX_INT, "deposit: invalid payment amount") | |
244 | 244 | if ((err1 == err1)) | |
245 | 245 | then { | |
246 | - | let invocation = invoke(_loadGatewayContract(), FUNC_DEPOSIT, [toString(this), caller, caller, _loadChainId(), asset, amount], nil) | |
246 | + | let invocation = invoke(_loadGatewayContract(), FUNC_DEPOSIT, [toString(this), caller, caller, toString(_loadChainId()), asset, toString(amount)], nil) | |
247 | 247 | if ((invocation == invocation)) | |
248 | 248 | then { | |
249 | 249 | let staking = if ((asset == WAVES)) | |
250 | 250 | then invoke(_loadSWavesContract(), FUNC_DEPOSIT, nil, [AttachedPayment(unit, i.payments[0].amount)]) | |
251 | 251 | else unit | |
252 | 252 | if ((staking == staking)) | |
253 | 253 | then $Tuple2(_saveReserves(asset, (_loadReserves(asset) + amount)), unit) | |
254 | 254 | else throw("Strict value is not equal to itself.") | |
255 | 255 | } | |
256 | 256 | else throw("Strict value is not equal to itself.") | |
257 | 257 | } | |
258 | 258 | else throw("Strict value is not equal to itself.") | |
259 | 259 | } | |
260 | 260 | else throw("Strict value is not equal to itself.") | |
261 | 261 | } | |
262 | 262 | ||
263 | 263 | ||
264 | 264 | ||
265 | 265 | @Callable(i) | |
266 | 266 | func depositTo (to_) = { | |
267 | 267 | let err = if (if (if (if (_whenInitialized()) | |
268 | 268 | then _whenNotPaused() | |
269 | 269 | else false) | |
270 | 270 | then _validatePaymentsSize(i.payments, 1, "depositTo: no payment") | |
271 | 271 | else false) | |
272 | 272 | then _validateInt(i.payments[0].amount, 0, MAX_INT, "depositTo: negative payment") | |
273 | 273 | else false) | |
274 | 274 | then _validateString(to_, "depositTo: invalid to") | |
275 | 275 | else false | |
276 | 276 | if ((err == err)) | |
277 | 277 | then { | |
278 | 278 | let caller = toString(i.caller) | |
279 | 279 | let asset = match i.payments[0].assetId { | |
280 | 280 | case a: ByteVector => | |
281 | 281 | toBase58String(a) | |
282 | 282 | case _: Unit => | |
283 | 283 | WAVES | |
284 | 284 | case _ => | |
285 | 285 | throw("Match error") | |
286 | 286 | } | |
287 | 287 | let assetDecimals = _getDecimals(asset) | |
288 | 288 | let amount = _normalizeDecimals(i.payments[0].amount, assetDecimals, DEX_DECIMALS) | |
289 | 289 | let err1 = _validateInt(amount, 1, MAX_INT, "depositTo: invalid payment amount") | |
290 | 290 | if ((err1 == err1)) | |
291 | 291 | then { | |
292 | - | let invocation = invoke(_loadGatewayContract(), FUNC_DEPOSIT, [toString(this), caller, to_, _loadChainId(), asset, amount], nil) | |
292 | + | let invocation = invoke(_loadGatewayContract(), FUNC_DEPOSIT, [toString(this), caller, to_, toString(_loadChainId()), asset, toString(amount)], nil) | |
293 | 293 | if ((invocation == invocation)) | |
294 | 294 | then { | |
295 | 295 | let staking = if ((asset == WAVES)) | |
296 | 296 | then invoke(_loadSWavesContract(), FUNC_DEPOSIT, nil, [AttachedPayment(unit, i.payments[0].amount)]) | |
297 | 297 | else unit | |
298 | 298 | if ((staking == staking)) | |
299 | 299 | then $Tuple2(_saveReserves(asset, (_loadReserves(asset) + amount)), unit) | |
300 | 300 | else throw("Strict value is not equal to itself.") | |
301 | 301 | } | |
302 | 302 | else throw("Strict value is not equal to itself.") | |
303 | 303 | } | |
304 | 304 | else throw("Strict value is not equal to itself.") | |
305 | 305 | } | |
306 | 306 | else throw("Strict value is not equal to itself.") | |
307 | 307 | } | |
308 | 308 | ||
309 | 309 | ||
310 | 310 | ||
311 | 311 | @Callable(i) | |
312 | 312 | func withdraw () = $Tuple2(nil, unit) | |
313 | 313 | ||
314 | 314 | ||
315 | 315 | ||
316 | 316 | @Callable(i) | |
317 | 317 | func requestWithdrawal () = $Tuple2(nil, unit) | |
318 | 318 | ||
319 | 319 | ||
320 | 320 | ||
321 | 321 | @Callable(i) | |
322 | 322 | func executeWithdrawal () = $Tuple2(nil, unit) | |
323 | 323 | ||
324 | 324 | ||
325 | 325 | ||
326 | 326 | @Callable(i) | |
327 | 327 | func pause () = { | |
328 | 328 | let err = if (if (_onlyPauser(i.caller)) | |
329 | 329 | then _whenInitialized() | |
330 | 330 | else false) | |
331 | 331 | then _whenNotPaused() | |
332 | 332 | else false | |
333 | 333 | if ((err == err)) | |
334 | 334 | then $Tuple2(_savePause(true), unit) | |
335 | 335 | else throw("Strict value is not equal to itself.") | |
336 | 336 | } | |
337 | 337 | ||
338 | 338 | ||
339 | 339 | ||
340 | 340 | @Callable(i) | |
341 | 341 | func unpause () = { | |
342 | 342 | let err = if (if (_onlyPauser(i.caller)) | |
343 | 343 | then _whenInitialized() | |
344 | 344 | else false) | |
345 | 345 | then _whenPaused() | |
346 | 346 | else false | |
347 | 347 | if ((err == err)) | |
348 | 348 | then $Tuple2(_savePause(false), unit) | |
349 | 349 | else throw("Strict value is not equal to itself.") | |
350 | 350 | } | |
351 | 351 | ||
352 | 352 | ||
353 | 353 | ||
354 | 354 | @Callable(i) | |
355 | 355 | func updatePauser (pauser_) = { | |
356 | 356 | let err = if (if (_onlyThisContract(i.caller)) | |
357 | 357 | then _whenInitialized() | |
358 | 358 | else false) | |
359 | 359 | then _validateAddress(pauser_, "updatePauser: invalid pauser") | |
360 | 360 | else false | |
361 | 361 | if ((err == err)) | |
362 | 362 | then $Tuple2(_savePauser(addressFromStringValue(pauser_)), unit) | |
363 | 363 | else throw("Strict value is not equal to itself.") | |
364 | 364 | } | |
365 | 365 | ||
366 | 366 | ||
367 | 367 | ||
368 | 368 | @Callable(i) | |
369 | 369 | func setMultisig (multisig_) = { | |
370 | 370 | let err = if (_onlyThisContract(i.caller)) | |
371 | 371 | then _validateAddress(multisig_, "setMultisig: invalid multisig") | |
372 | 372 | else false | |
373 | 373 | if ((err == err)) | |
374 | 374 | then $Tuple2(_saveMultisig(addressFromStringValue(multisig_)), unit) | |
375 | 375 | else throw("Strict value is not equal to itself.") | |
376 | 376 | } | |
377 | 377 | ||
378 | 378 | ||
379 | 379 | @Verifier(tx) | |
380 | 380 | func verify () = match getString(KEY_MULTISIG) { | |
381 | 381 | case multisig: String => | |
382 | 382 | valueOrElse(getBoolean(addressFromStringValue(multisig), makeString([KEY_STATUS, toString(this), toBase58String(tx.id)], SEPARATOR)), false) | |
383 | 383 | case _ => | |
384 | 384 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
385 | 385 | } | |
386 | 386 |
github/deemru/w8io/169f3d6 38.00 ms ◑