tx · 2oMuWvUFBSiHHm5622KH8zKq5TvvAoxMpQiMGgV1SvCJ

3Ms7em8i7DYWb6by9VnDECFTejGwZ8guo6P:  -0.01400000 Waves

2023.03.01 01:22 [2470157] smart account 3Ms7em8i7DYWb6by9VnDECFTejGwZ8guo6P > SELF 0.00000000 Waves

{ "type": 13, "id": "2oMuWvUFBSiHHm5622KH8zKq5TvvAoxMpQiMGgV1SvCJ", "fee": 1400000, "feeAssetId": null, "timestamp": 1677622741848, "version": 2, "chainId": 84, "sender": "3Ms7em8i7DYWb6by9VnDECFTejGwZ8guo6P", "senderPublicKey": "4cpUhMagzC8h4aLvvWwCdpcwfhVNRFmpeoG9zBhJZEeJ", "proofs": [ "2mMxJ7pJuoL1JDFgW1cFCtmaCtdCqJYjhzEF1CKgF65eSfaRnoshi3HhiHpXg7SfehxNfMUz8QE3gWRrFGajfgjJ" ], "script": "base64:BgIqCAISBQoDCAgIEgcKBQEIAQgBEgMKAQgSAwoBCBIAEgASAwoBCBIDCgEIKgAJU0VQQVJBVE9SAgJfXwAIS0VZX0lOSVQCBElOSVQADEtFWV9NVUxUSVNJRwIITVVMVElTSUcACktFWV9TVEFUVVMCBlNUQVRVUwAKS0VZX1BBVVNFRAIGUEFVU0VEAApLRVlfUEFVU0VSAgZQQVVTRVIAEEtFWV9ST09UX0FEQVBURVICDFJPT1RfQURBUFRFUgATS0VZX1BST1RPQ09MX0NBTExFUgIPUFJPVE9DT0xfQ0FMTEVSACBLRVlfTkFUSVZFX1RPS0VOX0JSSURHRV9DT05UUkFDVAIcTkFUSVZFX1RPS0VOX0JSSURHRV9DT05UUkFDVAAfS0VZX0VSQzIwX1RPS0VOX0JSSURHRV9DT05UUkFDVAIbRVJDMjBfVE9LRU5fQlJJREdFX0NPTlRSQUNUAAlGVU5DX0NBTEwCBGNhbGwAB01BWF9JTlQA//////////9/AAlTTE9UX1NJWkUAIAAJWkVST19TTE9UASAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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qJ2d394w4M2Xej6RYkWEhyteuYbRjF Next: none Diff:
OldNewDifferences
207207 let amountBytes = _alignRight(toBytes(amount_))
208208 let gaslessRewardBytes = _alignRight(toBytes(gaslessReward_))
209209 let callArgs = if ((executionAsset_ == ZERO_ADDRESS))
210- then $Tuple2(_loadNativeTokenBridgeContract(), ("0x" + toBase16String(((((base58'2SGoDjnzW' + ZERO_SLOT) + recipientBytes) + amountBytes) + gaslessRewardBytes))))
211- else $Tuple2(_loadERC20TokenBridgeContract(), ("0x" + toBase16String((((((base58'n2cEoAN6' + ZERO_SLOT) + executionAssetBytes) + recipientBytes) + amountBytes) + gaslessRewardBytes))))
210+ then $Tuple2(_loadNativeTokenBridgeContract(), ("0x" + toBase16String(((((base58'5egLX4' + ZERO_SLOT) + recipientBytes) + amountBytes) + gaslessRewardBytes))))
211+ else $Tuple2(_loadERC20TokenBridgeContract(), ("0x" + toBase16String((((((base58'4pGsYE' + ZERO_SLOT) + executionAssetBytes) + recipientBytes) + amountBytes) + gaslessRewardBytes))))
212212 let invocation = invoke(_loadProtocolCaller(), FUNC_CALL, [executionChainId_, callArgs._1, callArgs._2], nil)
213213 if ((invocation == invocation))
214214 then $Tuple2(nil, unit)
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_ROOT_ADAPTER = "ROOT_ADAPTER"
1717
1818 let KEY_PROTOCOL_CALLER = "PROTOCOL_CALLER"
1919
2020 let KEY_NATIVE_TOKEN_BRIDGE_CONTRACT = "NATIVE_TOKEN_BRIDGE_CONTRACT"
2121
2222 let KEY_ERC20_TOKEN_BRIDGE_CONTRACT = "ERC20_TOKEN_BRIDGE_CONTRACT"
2323
2424 let FUNC_CALL = "call"
2525
2626 let MAX_INT = 9223372036854775807
2727
2828 let SLOT_SIZE = 32
2929
3030 let ZERO_SLOT = base58'11111111111111111111111111111111'
3131
3232 let ZERO_ADDRESS = "0x0000000000000000000000000000000000000000"
3333
3434 func _validateAddress (address_,err_) = match addressFromString(address_) {
3535 case a: Address =>
3636 true
3737 case _ =>
3838 throw(err_)
3939 }
4040
4141
4242 func _loadInit () = match getBoolean(KEY_INIT) {
4343 case a: Boolean =>
4444 a
4545 case _ =>
4646 false
4747 }
4848
4949
5050 func _saveInit (isInit_) = [BooleanEntry(KEY_INIT, isInit_)]
5151
5252
5353 func _loadPause () = match getBoolean(KEY_PAUSED) {
5454 case a: Boolean =>
5555 a
5656 case _ =>
5757 false
5858 }
5959
6060
6161 func _savePause (isPaused_) = [BooleanEntry(KEY_PAUSED, isPaused_)]
6262
6363
6464 func _loadPauser () = match getString(KEY_PAUSER) {
6565 case a: String =>
6666 addressFromStringValue(a)
6767 case _ =>
6868 Address(base58'')
6969 }
7070
7171
7272 func _savePauser (pauser_) = [StringEntry(KEY_PAUSER, toString(pauser_))]
7373
7474
7575 func _loadMultisig () = match getString(KEY_MULTISIG) {
7676 case a: String =>
7777 addressFromStringValue(a)
7878 case _ =>
7979 Address(base58'')
8080 }
8181
8282
8383 func _saveMultisig (multisig_) = [StringEntry(KEY_MULTISIG, toString(multisig_))]
8484
8585
8686 func _loadRootAdapter () = match getString(KEY_ROOT_ADAPTER) {
8787 case a: String =>
8888 addressFromStringValue(a)
8989 case _ =>
9090 Address(base58'')
9191 }
9292
9393
9494 func _saveRootAdapter (adapter_) = [StringEntry(KEY_ROOT_ADAPTER, toString(adapter_))]
9595
9696
9797 func _loadProtocolCaller () = match getString(KEY_PROTOCOL_CALLER) {
9898 case a: String =>
9999 addressFromStringValue(a)
100100 case _ =>
101101 Address(base58'')
102102 }
103103
104104
105105 func _saveProtocolCaller (caller_) = [StringEntry(KEY_PROTOCOL_CALLER, toString(caller_))]
106106
107107
108108 func _loadNativeTokenBridgeContract () = match getString(KEY_NATIVE_TOKEN_BRIDGE_CONTRACT) {
109109 case a: String =>
110110 a
111111 case _ =>
112112 ""
113113 }
114114
115115
116116 func _saveNativeTokenBridgeContract (contract_) = [StringEntry(KEY_NATIVE_TOKEN_BRIDGE_CONTRACT, contract_)]
117117
118118
119119 func _loadERC20TokenBridgeContract () = match getString(KEY_ERC20_TOKEN_BRIDGE_CONTRACT) {
120120 case a: String =>
121121 a
122122 case _ =>
123123 ""
124124 }
125125
126126
127127 func _saveERC20TokenBridgeContract (contract_) = [StringEntry(KEY_ERC20_TOKEN_BRIDGE_CONTRACT, contract_)]
128128
129129
130130 func _onlyThisContract (caller_) = if ((caller_ != this))
131131 then throw("_onlyThisContract: revert")
132132 else true
133133
134134
135135 func _whenMultisigSet () = if ((_loadMultisig() == Address(base58'')))
136136 then throw("_whenMultisigSet: revert")
137137 else true
138138
139139
140140 func _whenNotInitialized () = if (_loadInit())
141141 then throw("_whenNotInitialized: revert")
142142 else true
143143
144144
145145 func _whenInitialized () = if (!(_loadInit()))
146146 then throw("_whenInitialized: revert")
147147 else true
148148
149149
150150 func _whenNotPaused () = if (_loadPause())
151151 then throw("_whenNotPaused: revert")
152152 else true
153153
154154
155155 func _whenPaused () = if (!(_loadPause()))
156156 then throw("_whenPaused: revert")
157157 else true
158158
159159
160160 func _onlyPauser (caller_) = if ((caller_ != _loadPauser()))
161161 then throw("_onlyPauser: revert")
162162 else true
163163
164164
165165 func _isRootAdapter (caller_) = if ((_loadRootAdapter() != caller_))
166166 then throw("_isRootAdapter: revert")
167167 else true
168168
169169
170170 func _alignLeft (val_) = (val_ + take(ZERO_SLOT, (SLOT_SIZE - size(val_))))
171171
172172
173173 func _alignRight (val_) = (take(ZERO_SLOT, (SLOT_SIZE - size(val_))) + val_)
174174
175175
176176 @Callable(i)
177177 func init (protocolCaller_,rootAdapter_,pauser_) = {
178178 let err = if (if (if (if (if (_onlyThisContract(i.caller))
179179 then _whenNotInitialized()
180180 else false)
181181 then _whenMultisigSet()
182182 else false)
183183 then _validateAddress(protocolCaller_, "init: invalid protocolCaller")
184184 else false)
185185 then _validateAddress(rootAdapter_, "init: invalid rootAdapter")
186186 else false)
187187 then _validateAddress(pauser_, "init: invalid pauser")
188188 else false
189189 if ((err == err))
190190 then $Tuple2((((_saveInit(true) ++ _saveProtocolCaller(addressFromStringValue(protocolCaller_))) ++ _saveRootAdapter(addressFromStringValue(rootAdapter_))) ++ _savePauser(addressFromStringValue(pauser_))), unit)
191191 else throw("Strict value is not equal to itself.")
192192 }
193193
194194
195195
196196 @Callable(i)
197197 func releaseTokens (executionChainId_,executionAsset_,amount_,recipient_,gaslessReward_) = {
198198 let err = if (if (_whenInitialized())
199199 then _whenNotPaused()
200200 else false)
201201 then _isRootAdapter(i.caller)
202202 else false
203203 if ((err == err))
204204 then {
205205 let executionAssetBytes = _alignRight(fromBase16String(drop(executionAsset_, 2)))
206206 let recipientBytes = _alignRight(fromBase16String(drop(recipient_, 2)))
207207 let amountBytes = _alignRight(toBytes(amount_))
208208 let gaslessRewardBytes = _alignRight(toBytes(gaslessReward_))
209209 let callArgs = if ((executionAsset_ == ZERO_ADDRESS))
210- then $Tuple2(_loadNativeTokenBridgeContract(), ("0x" + toBase16String(((((base58'2SGoDjnzW' + ZERO_SLOT) + recipientBytes) + amountBytes) + gaslessRewardBytes))))
211- else $Tuple2(_loadERC20TokenBridgeContract(), ("0x" + toBase16String((((((base58'n2cEoAN6' + ZERO_SLOT) + executionAssetBytes) + recipientBytes) + amountBytes) + gaslessRewardBytes))))
210+ then $Tuple2(_loadNativeTokenBridgeContract(), ("0x" + toBase16String(((((base58'5egLX4' + ZERO_SLOT) + recipientBytes) + amountBytes) + gaslessRewardBytes))))
211+ else $Tuple2(_loadERC20TokenBridgeContract(), ("0x" + toBase16String((((((base58'4pGsYE' + ZERO_SLOT) + executionAssetBytes) + recipientBytes) + amountBytes) + gaslessRewardBytes))))
212212 let invocation = invoke(_loadProtocolCaller(), FUNC_CALL, [executionChainId_, callArgs._1, callArgs._2], nil)
213213 if ((invocation == invocation))
214214 then $Tuple2(nil, unit)
215215 else throw("Strict value is not equal to itself.")
216216 }
217217 else throw("Strict value is not equal to itself.")
218218 }
219219
220220
221221
222222 @Callable(i)
223223 func setNativeTokenBridgeContract (contract_) = {
224224 let err = if (_onlyThisContract(i.caller))
225225 then _whenInitialized()
226226 else false
227227 if ((err == err))
228228 then $Tuple2(_saveNativeTokenBridgeContract(contract_), unit)
229229 else throw("Strict value is not equal to itself.")
230230 }
231231
232232
233233
234234 @Callable(i)
235235 func setERC20TokenBridgeContract (contract_) = {
236236 let err = if (_onlyThisContract(i.caller))
237237 then _whenInitialized()
238238 else false
239239 if ((err == err))
240240 then $Tuple2(_saveERC20TokenBridgeContract(contract_), unit)
241241 else throw("Strict value is not equal to itself.")
242242 }
243243
244244
245245
246246 @Callable(i)
247247 func pause () = {
248248 let err = if (if (_onlyPauser(i.caller))
249249 then _whenInitialized()
250250 else false)
251251 then _whenNotPaused()
252252 else false
253253 if ((err == err))
254254 then $Tuple2(_savePause(true), unit)
255255 else throw("Strict value is not equal to itself.")
256256 }
257257
258258
259259
260260 @Callable(i)
261261 func unpause () = {
262262 let err = if (if (_onlyPauser(i.caller))
263263 then _whenInitialized()
264264 else false)
265265 then _whenPaused()
266266 else false
267267 if ((err == err))
268268 then $Tuple2(_savePause(false), unit)
269269 else throw("Strict value is not equal to itself.")
270270 }
271271
272272
273273
274274 @Callable(i)
275275 func updatePauser (pauser_) = {
276276 let err = if (if (_onlyThisContract(i.caller))
277277 then _whenInitialized()
278278 else false)
279279 then _validateAddress(pauser_, "init: invalid pauser")
280280 else false
281281 if ((err == err))
282282 then $Tuple2(_savePauser(addressFromStringValue(pauser_)), unit)
283283 else throw("Strict value is not equal to itself.")
284284 }
285285
286286
287287
288288 @Callable(i)
289289 func setMultisig (multisig_) = {
290290 let err = if (_onlyThisContract(i.caller))
291291 then _validateAddress(multisig_, "setMultisig: invalid multisig")
292292 else false
293293 if ((err == err))
294294 then $Tuple2(_saveMultisig(addressFromStringValue(multisig_)), unit)
295295 else throw("Strict value is not equal to itself.")
296296 }
297297
298298
299299 @Verifier(tx)
300300 func verify () = match getString(KEY_MULTISIG) {
301301 case multisig: String =>
302302 valueOrElse(getBoolean(addressFromStringValue(multisig), makeString([KEY_STATUS, toString(this), toBase58String(tx.id)], SEPARATOR)), false)
303303 case _ =>
304304 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
305305 }
306306

github/deemru/w8io/169f3d6 
55.42 ms