tx · NufugYfuSSq6cuLN7gdRYKLnzTL695yGGFdoiqGfLYE 3MpTrfRhg53gCpMfQYE5Tc8DH8jynkPX7Mw: -0.00200000 Waves 2022.06.17 10:18 [2100063] smart account 3MpTrfRhg53gCpMfQYE5Tc8DH8jynkPX7Mw > SELF 0.00000000 Waves
{ "type": 13, "id": "NufugYfuSSq6cuLN7gdRYKLnzTL695yGGFdoiqGfLYE", "fee": 200000, "feeAssetId": null, "timestamp": 1655450336283, "version": 2, "chainId": 84, "sender": "3MpTrfRhg53gCpMfQYE5Tc8DH8jynkPX7Mw", "senderPublicKey": "AZagFBYfQhNpk6VXgrAn9xKm9zkAcZGyhzbvSYJSMMHM", "proofs": [ "quqTgBhkv4mJvVQGnmZBQo2y7TaK3wTETZPZvrbsLLnL9eQABUpn9S4iRYb65Y5yJvLQuXGSVbTPoJVJXpb1Sm8" ], "script": "base64:AAIFAAAAAAAAAAkIAhIFCgMBBAEAAAAEAAAAAAVhZG1pbgkBAAAAEUBleHRyTmF0aXZlKDEwNjIpAAAAAQIAAAAjM1AyRVRUVEZicXVLNVNTaVJQVVp3anNYM0p4Yk1LbnJCeDEAAAAABG1haW4JAQAAABFAZXh0ck5hdGl2ZSgxMDYyKQAAAAECAAAAIzNQQVp2OXRnSzFQWDdkS1I3YjRrY2hxNXFkcFVTM0c1c1lUAAAAAAxhc3NldFN0cmluZ3MJAARMAAAAAgIAAAAsNlh0SGpwWGJzOVJSSlAyU3I5R1V5VnF6QUNjYnk5VGtUaEhYbmpWQzVDREoJAARMAAAAAgIAAAAsMzROOVljRUVUTFduOTNxWVE2NEVzUDF4ODl0U3J1SlU0NFJyRU1TWFhFUEoJAARMAAAAAgIAAAAsREcyeEZrUGREd0tVb0JrekdBaFF0THBTR3pmWExpQ1lQRXplS0gyQWQyNHAFAAAAA25pbAAAAAAIcmVzZXJ2ZXMJAARMAAAAAgkBAAAAEUBleHRyTmF0aXZlKDEwNjIpAAAAAQIAAAAjM1BHQ2tySEJ4Rk1pN3R6MXhxbnhnQnBlTnZuNUU0TTRnOFMJAARMAAAAAgkBAAAAEUBleHRyTmF0aXZlKDEwNjIpAAAAAQIAAAAjM1BFaUQxekpXVE1aTldTQ3l6aHZCdzlweHhBV2VFd2FnaFIJAARMAAAAAgkBAAAAEUBleHRyTmF0aXZlKDEwNjIpAAAAAQIAAAAjM1BDd0ZYU3E4dmo4aUtpdEE1enJyTFJidXFlaGZtaW1wY2UFAAAAA25pbAAAAAEAAAABaQEAAAABdwAAAAMAAAACYmIAAAABcAAAAAhtYXhMaW1pdAMJAQAAAAIhPQAAAAIIBQAAAAFpAAAABmNhbGxlcgUAAAAFYWRtaW4JAAACAAAAAQIAAAABIQQAAAANYXNzZXRJZFN0cmluZwkAAZEAAAACBQAAAAxhc3NldFN0cmluZ3MFAAAAAmJiBAAAAAdhc3NldElkCQACWQAAAAEFAAAADWFzc2V0SWRTdHJpbmcEAAAAB3Jlc2VydmUJAAGRAAAAAgUAAAAIcmVzZXJ2ZXMFAAAAAmJiBAAAAAlhdmFpbGFibGUJAAPwAAAAAgUAAAAHcmVzZXJ2ZQUAAAAHYXNzZXRJZAQAAAABdgMJAABmAAAAAgUAAAAJYXZhaWxhYmxlBQAAAAhtYXhMaW1pdAUAAAAIbWF4TGltaXQFAAAACWF2YWlsYWJsZQQAAAADcmV0CQAD/AAAAAQFAAAABG1haW4CAAAACHdpdGhkcmF3CQAETAAAAAIFAAAADWFzc2V0SWRTdHJpbmcJAARMAAAAAgUAAAABdgUAAAADbmlsBQAAAANuaWwFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAnIAAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5gpcqnA==", "height": 2100063, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: 5R2VgWJ9WCL8oFFYhVnwCAdmhMaAUKzDUXzgkAudCMcT Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 5 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let admin = addressFromStringValue("3P2ETTTFbquK5SSiRPUZwjsX3JxbMKnrBx1") | |
5 | + | ||
6 | + | let main = addressFromStringValue("3PAZv9tgK1PX7dKR7b4kchq5qdpUS3G5sYT") | |
7 | + | ||
8 | + | let assetStrings = ["6XtHjpXbs9RRJP2Sr9GUyVqzACcby9TkThHXnjVC5CDJ", "34N9YcEETLWn93qYQ64EsP1x89tSruJU44RrEMSXXEPJ", "DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p"] | |
9 | + | ||
10 | + | let reserves = [addressFromStringValue("3PGCkrHBxFMi7tz1xqnxgBpeNvn5E4M4g8S"), addressFromStringValue("3PEiD1zJWTMZNWSCyzhvBw9pxxAWeEwaghR"), addressFromStringValue("3PCwFXSq8vj8iKitA5zrrLRbuqehfmimpce")] | |
11 | + | ||
12 | + | @Callable(i) | |
13 | + | func w (bb,p,maxLimit) = if ((i.caller != admin)) | |
14 | + | then throw("!") | |
15 | + | else { | |
16 | + | let assetIdString = assetStrings[bb] | |
17 | + | let assetId = fromBase58String(assetIdString) | |
18 | + | let reserve = reserves[bb] | |
19 | + | let available = assetBalance(reserve, assetId) | |
20 | + | let v = if ((available > maxLimit)) | |
21 | + | then maxLimit | |
22 | + | else available | |
23 | + | let ret = invoke(main, "withdraw", [assetIdString, v], nil) | |
24 | + | nil | |
25 | + | } | |
26 | + | ||
27 | + | ||
28 | + | @Verifier(tx) | |
29 | + | func verify () = sigVerify_128Kb(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
30 | + |
github/deemru/w8io/169f3d6 22.66 ms ◑