tx · 4WwtiPZxCfMdN9jmMZWWeAPwrRL6THgRTa5Hg83v7uyE

3N181WizgkxpWSFQoCnSbhRu2j1cwBadDYY:  -0.01400000 Waves

2023.02.21 16:31 [2459476] smart account 3N181WizgkxpWSFQoCnSbhRu2j1cwBadDYY > SELF 0.00000000 Waves

{ "type": 13, "id": "4WwtiPZxCfMdN9jmMZWWeAPwrRL6THgRTa5Hg83v7uyE", "fee": 1400000, "feeAssetId": null, "timestamp": 1676986250267, "version": 2, "chainId": 84, "sender": "3N181WizgkxpWSFQoCnSbhRu2j1cwBadDYY", "senderPublicKey": "9Hom3CnVGCVZiB6V5j3mEeAuquZytXpj99sSEdnAFy52", "proofs": [ "RA6wy5MGsArQ5dbnLHXdLRamo5gh3JyHHrifFbyCipWg7GhcsWvYyKhDQTK5NQu6fjU1XbeTcMfXWsTTqyRiJ8i" ], "script": "base64:BgInCAISBAoCCAESBQoDAQgIEgMKAQgSAwoBCBIAEgASAwoBCBIDCgEIJwAJU0VQQVJBVE9SAgJfXwAIS0VZX0lOSVQCBElOSVQADEtFWV9NVUxUSVNJRwIITVVMVElTSUcACktFWV9TVEFUVVMCBlNUQVRVUwAKS0VZX1BBVVNFRAIGUEFVU0VEAApLRVlfUEFVU0VSAgZQQVVTRVIADUtFWV9BTExPV0FOQ0UCCUFMTE9XQU5DRQARS0VZX0NBTExfQ0hBSU5fSUQCDUNBTExfQ0hBSU5fSUQADktFWV9FVkVOVF9TSVpFAgpFVkVOVF9TSVpFAAlLRVlfRVZFTlQCBUVWRU5UAAlLRVlfTk9OQ0UCBU5PTkNFAAdNQVhfSU5UAP//////////fwEQX3ZhbGlkYXRlQWRkcmVzcwIIYWRkcmVzc18EZXJyXwQHJG1hdGNoMAkApggBBQhhZGRyZXNzXwMJAAECBQckbWF0Y2gwAgdBZGRyZXNzBAFhBQckbWF0Y2gwBgkAAgEFBGVycl8BDF92YWxpZGF0ZUludAQEdmFsXw5sb3dlckJvdW5kYXJ5Xw51cHBlckJvdW5kY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5kZXJQdWJsaWNLZXnamkHH", "height": 2459476, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: pXfvdhSPXXDRHNgbyJxh51hmSqcNBPAq1VJjRnvz9t5 Next: Bf6AMLaxuPxK9NjoHingLV5nroWfKMspYPeV32Edt9JF Diff:
OldNewDifferences
1717
1818 let KEY_CALL_CHAIN_ID = "CALL_CHAIN_ID"
1919
20-let KEY_EVENT_LAST_IDX = "EVENT_LAST_IDX"
20+let KEY_EVENT_SIZE = "EVENT_SIZE"
2121
2222 let KEY_EVENT = "EVENT"
2323
106106 func _saveCallChainId (callChainId_) = [IntegerEntry(KEY_CALL_CHAIN_ID, callChainId_)]
107107
108108
109-func _loadEventLastIndex () = match getInteger(KEY_EVENT_LAST_IDX) {
109+func _loadEventSize () = match getInteger(KEY_EVENT_SIZE) {
110110 case a: Int =>
111111 a
112112 case _ =>
114114 }
115115
116116
117-func _saveEventLastIndex (index_) = [IntegerEntry(KEY_EVENT_LAST_IDX, index_)]
117+func _saveEventSize (index_) = [IntegerEntry(KEY_EVENT_SIZE, index_)]
118118
119119
120120 func _saveEvent (index_,event_) = [StringEntry(makeString([KEY_EVENT, toString(index_)], SEPARATOR), makeString([toString(event_._1), toString(event_._2), toString(event_._3), event_._4, event_._5, toString(event_._6)], SEPARATOR))]
199199 if ((err == err))
200200 then {
201201 let nonce = _loadNonce()
202- let eventLastIndex = _loadEventLastIndex()
202+ let eventSize = _loadEventSize()
203203 let event = $Tuple6(_loadCallChainId(), executionChainId_, i.caller, executionContract_, calldata_, nonce)
204- $Tuple2(((_saveEventLastIndex((eventLastIndex + 1)) ++ _saveEvent(eventLastIndex, event)) ++ _saveNonce((nonce + 1))), unit)
204+ $Tuple2(((_saveEventSize((eventSize + 1)) ++ _saveEvent(eventSize, event)) ++ _saveNonce((nonce + 1))), unit)
205205 }
206206 else throw("Strict value is not equal to itself.")
207207 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SEPARATOR = "__"
55
66 let KEY_INIT = "INIT"
77
88 let KEY_MULTISIG = "MULTISIG"
99
1010 let KEY_STATUS = "STATUS"
1111
1212 let KEY_PAUSED = "PAUSED"
1313
1414 let KEY_PAUSER = "PAUSER"
1515
1616 let KEY_ALLOWANCE = "ALLOWANCE"
1717
1818 let KEY_CALL_CHAIN_ID = "CALL_CHAIN_ID"
1919
20-let KEY_EVENT_LAST_IDX = "EVENT_LAST_IDX"
20+let KEY_EVENT_SIZE = "EVENT_SIZE"
2121
2222 let KEY_EVENT = "EVENT"
2323
2424 let KEY_NONCE = "NONCE"
2525
2626 let MAX_INT = 9223372036854775807
2727
2828 func _validateAddress (address_,err_) = match addressFromString(address_) {
2929 case a: Address =>
3030 true
3131 case _ =>
3232 throw(err_)
3333 }
3434
3535
3636 func _validateInt (val_,lowerBoundary_,upperBoundary_,err_) = if (if ((lowerBoundary_ > val_))
3737 then true
3838 else (val_ > upperBoundary_))
3939 then throw(err_)
4040 else true
4141
4242
4343 func _loadInit () = match getBoolean(KEY_INIT) {
4444 case a: Boolean =>
4545 a
4646 case _ =>
4747 false
4848 }
4949
5050
5151 func _saveInit (isInit_) = [BooleanEntry(KEY_INIT, isInit_)]
5252
5353
5454 func _loadPause () = match getBoolean(KEY_PAUSED) {
5555 case a: Boolean =>
5656 a
5757 case _ =>
5858 false
5959 }
6060
6161
6262 func _savePause (isPaused_) = [BooleanEntry(KEY_PAUSED, isPaused_)]
6363
6464
6565 func _loadPauser () = match getString(KEY_PAUSER) {
6666 case a: String =>
6767 addressFromStringValue(a)
6868 case _ =>
6969 Address(base58'')
7070 }
7171
7272
7373 func _savePauser (pauser_) = [StringEntry(KEY_PAUSER, toString(pauser_))]
7474
7575
7676 func _loadAllowance (caller_) = match getBoolean(makeString([KEY_ALLOWANCE, toString(caller_)], SEPARATOR)) {
7777 case a: Boolean =>
7878 a
7979 case _ =>
8080 false
8181 }
8282
8383
8484 func _saveAllowance (caller_,val_) = [BooleanEntry(makeString([KEY_ALLOWANCE, toString(caller_)], SEPARATOR), val_)]
8585
8686
8787 func _loadMultisig () = match getString(KEY_MULTISIG) {
8888 case a: String =>
8989 addressFromStringValue(a)
9090 case _ =>
9191 Address(base58'')
9292 }
9393
9494
9595 func _saveMultisig (multisig_) = [StringEntry(KEY_MULTISIG, toString(multisig_))]
9696
9797
9898 func _loadCallChainId () = match getInteger(KEY_CALL_CHAIN_ID) {
9999 case a: Int =>
100100 a
101101 case _ =>
102102 0
103103 }
104104
105105
106106 func _saveCallChainId (callChainId_) = [IntegerEntry(KEY_CALL_CHAIN_ID, callChainId_)]
107107
108108
109-func _loadEventLastIndex () = match getInteger(KEY_EVENT_LAST_IDX) {
109+func _loadEventSize () = match getInteger(KEY_EVENT_SIZE) {
110110 case a: Int =>
111111 a
112112 case _ =>
113113 0
114114 }
115115
116116
117-func _saveEventLastIndex (index_) = [IntegerEntry(KEY_EVENT_LAST_IDX, index_)]
117+func _saveEventSize (index_) = [IntegerEntry(KEY_EVENT_SIZE, index_)]
118118
119119
120120 func _saveEvent (index_,event_) = [StringEntry(makeString([KEY_EVENT, toString(index_)], SEPARATOR), makeString([toString(event_._1), toString(event_._2), toString(event_._3), event_._4, event_._5, toString(event_._6)], SEPARATOR))]
121121
122122
123123 func _loadNonce () = match getInteger(KEY_NONCE) {
124124 case a: Int =>
125125 a
126126 case _ =>
127127 0
128128 }
129129
130130
131131 func _saveNonce (val_) = [IntegerEntry(KEY_NONCE, val_)]
132132
133133
134134 func _onlyThisContract (caller_) = if ((caller_ != this))
135135 then throw("_onlyThisContract: revert")
136136 else true
137137
138138
139139 func _whenMultisigSet () = if ((_loadMultisig() == Address(base58'')))
140140 then throw("_whenMultisigSet: revert")
141141 else true
142142
143143
144144 func _whenNotInitialized () = if (_loadInit())
145145 then throw("_whenNotInitialized: revert")
146146 else true
147147
148148
149149 func _whenInitialized () = if (!(_loadInit()))
150150 then throw("_whenInitialized: revert")
151151 else true
152152
153153
154154 func _whenNotPaused () = if (_loadPause())
155155 then throw("_whenNotPaused: revert")
156156 else true
157157
158158
159159 func _whenPaused () = if (!(_loadPause()))
160160 then throw("_whenPaused: revert")
161161 else true
162162
163163
164164 func _onlyPauser (caller_) = if ((caller_ != _loadPauser()))
165165 then throw("_onlyPauser: revert")
166166 else true
167167
168168
169169 func _whenAllowed (caller_) = if (!(_loadAllowance(caller_)))
170170 then throw("_whenAllowed: revert")
171171 else true
172172
173173
174174 @Callable(i)
175175 func init (pauser_,callChainId_) = {
176176 let err = if (if (if (if (_onlyThisContract(i.caller))
177177 then _whenNotInitialized()
178178 else false)
179179 then _whenMultisigSet()
180180 else false)
181181 then _validateAddress(pauser_, "init: invalid pauser")
182182 else false)
183183 then _validateInt(callChainId_, 0, MAX_INT, "init: invalid call chain id")
184184 else false
185185 if ((err == err))
186186 then $Tuple2(((_saveInit(true) ++ _savePauser(addressFromStringValue(pauser_))) ++ _saveCallChainId(callChainId_)), unit)
187187 else throw("Strict value is not equal to itself.")
188188 }
189189
190190
191191
192192 @Callable(i)
193193 func call (executionChainId_,executionContract_,calldata_) = {
194194 let err = if (if (_whenInitialized())
195195 then _whenAllowed(i.caller)
196196 else false)
197197 then _whenNotPaused()
198198 else false
199199 if ((err == err))
200200 then {
201201 let nonce = _loadNonce()
202- let eventLastIndex = _loadEventLastIndex()
202+ let eventSize = _loadEventSize()
203203 let event = $Tuple6(_loadCallChainId(), executionChainId_, i.caller, executionContract_, calldata_, nonce)
204- $Tuple2(((_saveEventLastIndex((eventLastIndex + 1)) ++ _saveEvent(eventLastIndex, event)) ++ _saveNonce((nonce + 1))), unit)
204+ $Tuple2(((_saveEventSize((eventSize + 1)) ++ _saveEvent(eventSize, event)) ++ _saveNonce((nonce + 1))), unit)
205205 }
206206 else throw("Strict value is not equal to itself.")
207207 }
208208
209209
210210
211211 @Callable(i)
212212 func allow (caller_) = {
213213 let err = if (if (_onlyThisContract(i.caller))
214214 then _whenInitialized()
215215 else false)
216216 then _validateAddress(caller_, "allow: invalid caller arg")
217217 else false
218218 if ((err == err))
219219 then $Tuple2(_saveAllowance(addressFromStringValue(caller_), true), unit)
220220 else throw("Strict value is not equal to itself.")
221221 }
222222
223223
224224
225225 @Callable(i)
226226 func disallow (caller_) = {
227227 let err = if (if (_onlyThisContract(i.caller))
228228 then _whenInitialized()
229229 else false)
230230 then _validateAddress(caller_, "disallow: invalid caller arg")
231231 else false
232232 if ((err == err))
233233 then $Tuple2(_saveAllowance(addressFromStringValue(caller_), false), unit)
234234 else throw("Strict value is not equal to itself.")
235235 }
236236
237237
238238
239239 @Callable(i)
240240 func pause () = {
241241 let err = if (if (_onlyPauser(i.caller))
242242 then _whenInitialized()
243243 else false)
244244 then _whenNotPaused()
245245 else false
246246 if ((err == err))
247247 then $Tuple2(_savePause(true), unit)
248248 else throw("Strict value is not equal to itself.")
249249 }
250250
251251
252252
253253 @Callable(i)
254254 func unpause () = {
255255 let err = if (if (_onlyPauser(i.caller))
256256 then _whenInitialized()
257257 else false)
258258 then _whenPaused()
259259 else false
260260 if ((err == err))
261261 then $Tuple2(_savePause(false), unit)
262262 else throw("Strict value is not equal to itself.")
263263 }
264264
265265
266266
267267 @Callable(i)
268268 func updatePauser (pauser_) = {
269269 let err = if (if (_onlyThisContract(i.caller))
270270 then _whenInitialized()
271271 else false)
272272 then _validateAddress(pauser_, "init: invalid pauser")
273273 else false
274274 if ((err == err))
275275 then $Tuple2(_savePauser(addressFromStringValue(pauser_)), unit)
276276 else throw("Strict value is not equal to itself.")
277277 }
278278
279279
280280
281281 @Callable(i)
282282 func setMultisig (multisig_) = {
283283 let err = if (_onlyThisContract(i.caller))
284284 then _validateAddress(multisig_, "setMultisig: invalid multisig address")
285285 else false
286286 if ((err == err))
287287 then $Tuple2(_saveMultisig(addressFromStringValue(multisig_)), unit)
288288 else throw("Strict value is not equal to itself.")
289289 }
290290
291291
292292 @Verifier(tx)
293293 func verify () = match getString(KEY_MULTISIG) {
294294 case multisig: String =>
295295 valueOrElse(getBoolean(addressFromStringValue(multisig), makeString([KEY_STATUS, toString(this), toBase58String(tx.id)], SEPARATOR)), false)
296296 case _ =>
297297 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
298298 }
299299

github/deemru/w8io/169f3d6 
45.12 ms