tx · AZDJLz7wxKtzg7pwcsaDYxk2hyRjJQZgZiKeFSHtGfpk

3N22NBbCmfZkmxFSMqb9kP61WHg1xGPndQR:  -0.01400000 Waves

2023.07.11 17:04 [2661343] smart account 3N22NBbCmfZkmxFSMqb9kP61WHg1xGPndQR > SELF 0.00000000 Waves

{ "type": 13, "id": "AZDJLz7wxKtzg7pwcsaDYxk2hyRjJQZgZiKeFSHtGfpk", "fee": 1400000, "feeAssetId": null, "timestamp": 1689084216294, "version": 2, "chainId": 84, "sender": "3N22NBbCmfZkmxFSMqb9kP61WHg1xGPndQR", "senderPublicKey": "EW9SXsydFphpvtoJTkGkVrHVjPwv58ToopA94BnLibNG", "proofs": [ "66X53ng2iThWLWZSqcz7jrKZs7NuX5wQ15F4mVBPVHCsdShPoaN6gLEojwTwQue8rnCgRJBy1AUtQVaT4VVUALbL" ], "script": "base64:BgI3CAISAwoBCBIECgIBCBIHCgUBCAEIARIHCgUBCAEIARIDCgEIEgMKAQgSABIAEgMKAQgSAwoBCCEACVNFUEFSQVRPUgICX18ACEtFWV9JTklUAgRJTklUAAxLRVlfTVVMVElTSUcCCE1VTFRJU0lHAApLRVlfU1RBVFVTAgZTVEFUVVMACktFWV9QQVVTRUQCBlBBVVNFRAAKS0VZX1BBVVNFUgIGUEFVU0VSAA1LRVlfQUxMT1dBTkNFAglBTExPV0FOQ0UAC0tFWV9BREFQVEVSAgdBREFQVEVSABNGVU5DX1JFTEVBU0VfVE9LRU5TAg1yZWxlYXNlVG9rZW5zABBGVU5DX01JTlRfVE9LRU5TAgptaW50VG9rZW5zAAdNQVhfSU5UAP//////////fwEQX3ZhbGlkYXRlQWRkcmVzcwIIYWRkcmVzc18EZXJyXwQHJG1hdGNoMAkApggBBQhhZGRyZXNzXwMJAAECBQckbWF0Y2gwAgdBZGRyZXNzBAFhBQckbWF0Y2gwBgkAAgEFBGVycl8BDF92YWxpZGF0ZUludAQEdmFsXw5sb3dlckJvdW5kYXJ5Xw51cHBlckJvdW5kYXJ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52YWxpZCBtdWx0aXNpZwcDCQAAAgUDZXJyBQNlcnIJAJQKAgkBDV9zYXZlTXVsdGlzaWcBCQERQGV4dHJOYXRpdmUoMTA2MikBBQltdWx0aXNpZ18FBHVuaXQJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4BAnR4AQZ2ZXJpZnkABAckbWF0Y2gwCQCiCAEFDEtFWV9NVUxUSVNJRwMJAAECBQckbWF0Y2gwAgZTdHJpbmcECG11bHRpc2lnBQckbWF0Y2gwCQELdmFsdWVPckVsc2UCCQCbCAIJARFAZXh0ck5hdGl2ZSgxMDYyKQEFCG11bHRpc2lnCQC5CQIJAMwIAgUKS0VZX1NUQVRVUwkAzAgCCQClCAEFBHRoaXMJAMwIAgkA2AQBCAUCdHgCaWQFA25pbAUJU0VQQVJBVE9SBwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleQJa/bs=", "height": 2661343, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CAU9R8xHR7gcnyCdaNY9fzdJDrfnQRfSo44FBqi6tkd1 Next: none Diff:
OldNewDifferences
1818 let KEY_ADAPTER = "ADAPTER"
1919
2020 let FUNC_RELEASE_TOKENS = "releaseTokens"
21+
22+let FUNC_MINT_TOKENS = "mintTokens"
2123
2224 let MAX_INT = 9223372036854775807
2325
194196
195197
196198 @Callable(i)
199+func mintTokens (executionChainId_,executionAsset_,amount_,recipient_,gaslessReward_) = {
200+ let err = if (if (_whenInitialized())
201+ then _whenNotPaused()
202+ else false)
203+ then _whenAllowed(i.caller)
204+ else false
205+ if ((err == err))
206+ then {
207+ let invocation = invoke(_loadAdapter(executionChainId_), FUNC_MINT_TOKENS, [executionChainId_, executionAsset_, amount_, recipient_, gaslessReward_], nil)
208+ if ((invocation == invocation))
209+ then $Tuple2(nil, unit)
210+ else throw("Strict value is not equal to itself.")
211+ }
212+ else throw("Strict value is not equal to itself.")
213+ }
214+
215+
216+
217+@Callable(i)
197218 func allow (caller_) = {
198219 let err = if (if (_onlyThisContract(i.caller))
199220 then _whenInitialized()
254275 let err = if (if (_onlyThisContract(i.caller))
255276 then _whenInitialized()
256277 else false)
257- then _validateAddress(pauser_, "init: invalid pauser")
278+ then _validateAddress(pauser_, "updatePauser: invalid pauser")
258279 else false
259280 if ((err == err))
260281 then $Tuple2(_savePauser(addressFromStringValue(pauser_)), 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_ALLOWANCE = "ALLOWANCE"
1717
1818 let KEY_ADAPTER = "ADAPTER"
1919
2020 let FUNC_RELEASE_TOKENS = "releaseTokens"
21+
22+let FUNC_MINT_TOKENS = "mintTokens"
2123
2224 let MAX_INT = 9223372036854775807
2325
2426 func _validateAddress (address_,err_) = match addressFromString(address_) {
2527 case a: Address =>
2628 true
2729 case _ =>
2830 throw(err_)
2931 }
3032
3133
3234 func _validateInt (val_,lowerBoundary_,upperBoundary_,err_) = if (if ((lowerBoundary_ > val_))
3335 then true
3436 else (val_ > upperBoundary_))
3537 then throw(err_)
3638 else true
3739
3840
3941 func _loadInit () = match getBoolean(KEY_INIT) {
4042 case a: Boolean =>
4143 a
4244 case _ =>
4345 false
4446 }
4547
4648
4749 func _saveInit (isInit_) = [BooleanEntry(KEY_INIT, isInit_)]
4850
4951
5052 func _loadPause () = match getBoolean(KEY_PAUSED) {
5153 case a: Boolean =>
5254 a
5355 case _ =>
5456 false
5557 }
5658
5759
5860 func _savePause (isPaused_) = [BooleanEntry(KEY_PAUSED, isPaused_)]
5961
6062
6163 func _loadPauser () = match getString(KEY_PAUSER) {
6264 case a: String =>
6365 addressFromStringValue(a)
6466 case _ =>
6567 Address(base58'')
6668 }
6769
6870
6971 func _savePauser (pauser_) = [StringEntry(KEY_PAUSER, toString(pauser_))]
7072
7173
7274 func _loadMultisig () = match getString(KEY_MULTISIG) {
7375 case a: String =>
7476 addressFromStringValue(a)
7577 case _ =>
7678 Address(base58'')
7779 }
7880
7981
8082 func _saveMultisig (multisig_) = [StringEntry(KEY_MULTISIG, toString(multisig_))]
8183
8284
8385 func _loadAllowance (caller_) = match getBoolean(makeString([KEY_ALLOWANCE, toString(caller_)], SEPARATOR)) {
8486 case a: Boolean =>
8587 a
8688 case _ =>
8789 false
8890 }
8991
9092
9193 func _saveAllowance (caller_,val_) = [BooleanEntry(makeString([KEY_ALLOWANCE, toString(caller_)], SEPARATOR), val_)]
9294
9395
9496 func _loadAdapter (executionChainId_) = match getString(makeString([KEY_ADAPTER, toString(executionChainId_)], SEPARATOR)) {
9597 case a: String =>
9698 addressFromStringValue(a)
9799 case _ =>
98100 Address(base58'')
99101 }
100102
101103
102104 func _saveAdapter (executionChainId_,adapter_) = [StringEntry(makeString([KEY_ADAPTER, toString(executionChainId_)], SEPARATOR), toString(adapter_))]
103105
104106
105107 func _onlyThisContract (caller_) = if ((caller_ != this))
106108 then throw("_onlyThisContract: revert")
107109 else true
108110
109111
110112 func _whenMultisigSet () = if ((_loadMultisig() == Address(base58'')))
111113 then throw("_whenMultisigSet: revert")
112114 else true
113115
114116
115117 func _whenNotInitialized () = if (_loadInit())
116118 then throw("_whenNotInitialized: revert")
117119 else true
118120
119121
120122 func _whenInitialized () = if (!(_loadInit()))
121123 then throw("_whenInitialized: revert")
122124 else true
123125
124126
125127 func _whenNotPaused () = if (_loadPause())
126128 then throw("_whenNotPaused: revert")
127129 else true
128130
129131
130132 func _whenPaused () = if (!(_loadPause()))
131133 then throw("_whenPaused: revert")
132134 else true
133135
134136
135137 func _onlyPauser (caller_) = if ((caller_ != _loadPauser()))
136138 then throw("_onlyPauser: revert")
137139 else true
138140
139141
140142 func _whenAllowed (caller_) = if (!(_loadAllowance(caller_)))
141143 then throw("_whenAllowed: revert")
142144 else true
143145
144146
145147 @Callable(i)
146148 func init (pauser_) = {
147149 let err = if (if (if (_onlyThisContract(i.caller))
148150 then _whenNotInitialized()
149151 else false)
150152 then _whenMultisigSet()
151153 else false)
152154 then _validateAddress(pauser_, "init: invalid pauser")
153155 else false
154156 if ((err == err))
155157 then $Tuple2((_saveInit(true) ++ _savePauser(addressFromStringValue(pauser_))), unit)
156158 else throw("Strict value is not equal to itself.")
157159 }
158160
159161
160162
161163 @Callable(i)
162164 func setAdapter (executionChainId_,adapter_) = {
163165 let err = if (if (if (_onlyThisContract(i.caller))
164166 then _whenInitialized()
165167 else false)
166168 then _validateInt(executionChainId_, 0, MAX_INT, "setAdapter: invalid executionChainId")
167169 else false)
168170 then _validateAddress(adapter_, "setAdapter: invalid adapter")
169171 else false
170172 if ((err == err))
171173 then $Tuple2(_saveAdapter(executionChainId_, addressFromStringValue(adapter_)), unit)
172174 else throw("Strict value is not equal to itself.")
173175 }
174176
175177
176178
177179 @Callable(i)
178180 func releaseTokens (executionChainId_,executionAsset_,amount_,recipient_,gaslessReward_) = {
179181 let err = if (if (_whenInitialized())
180182 then _whenNotPaused()
181183 else false)
182184 then _whenAllowed(i.caller)
183185 else false
184186 if ((err == err))
185187 then {
186188 let invocation = invoke(_loadAdapter(executionChainId_), FUNC_RELEASE_TOKENS, [executionChainId_, executionAsset_, amount_, recipient_, gaslessReward_], nil)
187189 if ((invocation == invocation))
188190 then $Tuple2(nil, unit)
189191 else throw("Strict value is not equal to itself.")
190192 }
191193 else throw("Strict value is not equal to itself.")
192194 }
193195
194196
195197
196198 @Callable(i)
199+func mintTokens (executionChainId_,executionAsset_,amount_,recipient_,gaslessReward_) = {
200+ let err = if (if (_whenInitialized())
201+ then _whenNotPaused()
202+ else false)
203+ then _whenAllowed(i.caller)
204+ else false
205+ if ((err == err))
206+ then {
207+ let invocation = invoke(_loadAdapter(executionChainId_), FUNC_MINT_TOKENS, [executionChainId_, executionAsset_, amount_, recipient_, gaslessReward_], nil)
208+ if ((invocation == invocation))
209+ then $Tuple2(nil, unit)
210+ else throw("Strict value is not equal to itself.")
211+ }
212+ else throw("Strict value is not equal to itself.")
213+ }
214+
215+
216+
217+@Callable(i)
197218 func allow (caller_) = {
198219 let err = if (if (_onlyThisContract(i.caller))
199220 then _whenInitialized()
200221 else false)
201222 then _validateAddress(caller_, "allow: invalid caller")
202223 else false
203224 if ((err == err))
204225 then $Tuple2(_saveAllowance(addressFromStringValue(caller_), true), unit)
205226 else throw("Strict value is not equal to itself.")
206227 }
207228
208229
209230
210231 @Callable(i)
211232 func disallow (caller_) = {
212233 let err = if (if (_onlyThisContract(i.caller))
213234 then _whenInitialized()
214235 else false)
215236 then _validateAddress(caller_, "disallow: invalid caller")
216237 else false
217238 if ((err == err))
218239 then $Tuple2(_saveAllowance(addressFromStringValue(caller_), false), unit)
219240 else throw("Strict value is not equal to itself.")
220241 }
221242
222243
223244
224245 @Callable(i)
225246 func pause () = {
226247 let err = if (if (_onlyPauser(i.caller))
227248 then _whenInitialized()
228249 else false)
229250 then _whenNotPaused()
230251 else false
231252 if ((err == err))
232253 then $Tuple2(_savePause(true), unit)
233254 else throw("Strict value is not equal to itself.")
234255 }
235256
236257
237258
238259 @Callable(i)
239260 func unpause () = {
240261 let err = if (if (_onlyPauser(i.caller))
241262 then _whenInitialized()
242263 else false)
243264 then _whenPaused()
244265 else false
245266 if ((err == err))
246267 then $Tuple2(_savePause(false), unit)
247268 else throw("Strict value is not equal to itself.")
248269 }
249270
250271
251272
252273 @Callable(i)
253274 func updatePauser (pauser_) = {
254275 let err = if (if (_onlyThisContract(i.caller))
255276 then _whenInitialized()
256277 else false)
257- then _validateAddress(pauser_, "init: invalid pauser")
278+ then _validateAddress(pauser_, "updatePauser: invalid pauser")
258279 else false
259280 if ((err == err))
260281 then $Tuple2(_savePauser(addressFromStringValue(pauser_)), unit)
261282 else throw("Strict value is not equal to itself.")
262283 }
263284
264285
265286
266287 @Callable(i)
267288 func setMultisig (multisig_) = {
268289 let err = if (_onlyThisContract(i.caller))
269290 then _validateAddress(multisig_, "setMultisig: invalid multisig")
270291 else false
271292 if ((err == err))
272293 then $Tuple2(_saveMultisig(addressFromStringValue(multisig_)), unit)
273294 else throw("Strict value is not equal to itself.")
274295 }
275296
276297
277298 @Verifier(tx)
278299 func verify () = match getString(KEY_MULTISIG) {
279300 case multisig: String =>
280301 valueOrElse(getBoolean(addressFromStringValue(multisig), makeString([KEY_STATUS, toString(this), toBase58String(tx.id)], SEPARATOR)), false)
281302 case _ =>
282303 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
283304 }
284305

github/deemru/w8io/026f985 
48.21 ms