tx · 5zgVnWnhiP9tXfrb8UhgbeCBXJvCCMuYegYJxkiAPV5m 3MuvvkBGK5JGJLAZRy9oSxbYu8QLXC3LwJy: -0.01000000 Waves 2023.12.14 06:09 [2885829] smart account 3MuvvkBGK5JGJLAZRy9oSxbYu8QLXC3LwJy > SELF 0.00000000 Waves
{ "type": 13, "id": "5zgVnWnhiP9tXfrb8UhgbeCBXJvCCMuYegYJxkiAPV5m", "fee": 1000000, "feeAssetId": null, "timestamp": 1702523357059, "version": 2, "chainId": 84, "sender": "3MuvvkBGK5JGJLAZRy9oSxbYu8QLXC3LwJy", "senderPublicKey": "CcvY8rT7TDVC9wF59sHFdEjHTzq8dDTkung8TazwC9zB", "proofs": [ "4iaWN6yoz3FBqsebyLLoDQQ7xp4ZeHZuRf2rvUb2UWQSW3C6BJ9rXiny2heH5Xgxg8o2nRSyLFCAayzPQgshTmX2" ], "script": "base64:BgIHCAISAwoBCAMACWFyYl9hc3NldAEgu4kpUFYEor0eYBTJ0JnRzosJOBXxisrcQGKgbzmVTTcABGJvc3MJARFAZXh0ck5hdGl2ZSgxMDYyKQECIzNOQlU4VFRoSEg1WVVTazI2aUdFR1UxakhNN3ZTUjNaVFB4AQpnZXRCYWxhbmNlAgdhc3NldElkBGFkZHIEByRtYXRjaDAFB2Fzc2V0SWQDCQABAgUHJG1hdGNoMAIKQnl0ZVZlY3RvcgQBYgUHJG1hdGNoMAkBC3ZhbHVlT3JFbHNlAgkA8AcCBQRhZGRyBQFiAAAICQDvBwEFBGFkZHIJYXZhaWxhYmxlAQFpAQF5AQRkYXRhBAVvd25pdAkBCmdldEJhbGFuY2UCBQlhcmJfYXNzZXQIBQFpBmNhbGxlcgMDAwkBAiE9AggFAWkGY2FsbGVyBQR0aGlzCQECIT0CCAUBaQZjYWxsZXIFBGJvc3MHBgkAAAIFBW93bml0AAAJAAIBAht5b3UgYXJlIG5vdCBhbGxvd2VkIHRvIGFyYiEEC2NhbGxlcl9hZGRyCQDYBAEICAUBaQZjYWxsZXIFYnl0ZXMEB2NhbGxfaWQJANgEAQgFAWkNdHJhbnNhY3Rpb25JZAkAzAgCCQEMSW50ZWdlckVudHJ5AgkArAICCQCsAgIJAKwCAgULY2FsbGVyX2FkZHICAV8FB2NhbGxfaWQCB2JhbGFuY2UFBW93bml0BQNuaWwAFgU9eQ==", "height": 2885829, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: 9DcfFWSQyViAzkAAiUUFU9YvXYGYLaPktVAsk6i5bFWT Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 6 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let arb_asset = base58'Dd4YekCgh1aPsAAqkZLGTMNkQcmvix1SQd8W6UNZqKft' | |
5 | + | ||
6 | + | let boss = addressFromStringValue("3NBU8TThHH5YUSk26iGEGU1jHM7vSR3ZTPx") | |
7 | + | ||
8 | + | func getBalance (assetId,addr) = match assetId { | |
9 | + | case b: ByteVector => | |
10 | + | valueOrElse(assetBalance(addr, b), 0) | |
11 | + | case _ => | |
12 | + | wavesBalance(addr).available | |
13 | + | } | |
14 | + | ||
15 | + | ||
16 | + | @Callable(i) | |
17 | + | func y (data) = { | |
18 | + | let ownit = getBalance(arb_asset, i.caller) | |
19 | + | if (if (if ((i.caller != this)) | |
20 | + | then (i.caller != boss) | |
21 | + | else false) | |
22 | + | then true | |
23 | + | else (ownit == 0)) | |
24 | + | then throw("you are not allowed to arb!") | |
25 | + | else { | |
26 | + | let caller_addr = toBase58String(i.caller.bytes) | |
27 | + | let call_id = toBase58String(i.transactionId) | |
28 | + | [IntegerEntry((((caller_addr + "_") + call_id) + "balance"), ownit)] | |
29 | + | } | |
30 | + | } | |
31 | + | ||
32 | + |
github/deemru/w8io/169f3d6 15.36 ms ◑