tx · DZir4QPMzTsnknedvq6VHKfKfcYFBim7Uzx5ruV5WyqZ 3N3LWiYdT9n8o6ecwFZGy6MCehhq6sLUFFL: -0.01400000 Waves 2019.07.16 15:49 [588401] smart account 3N3LWiYdT9n8o6ecwFZGy6MCehhq6sLUFFL > SELF 0.00000000 Waves
{ "type": 13, "id": "DZir4QPMzTsnknedvq6VHKfKfcYFBim7Uzx5ruV5WyqZ", "fee": 1400000, "feeAssetId": null, "timestamp": 1563281395226, "version": 1, "sender": "3N3LWiYdT9n8o6ecwFZGy6MCehhq6sLUFFL", "senderPublicKey": "3RTmBp69DqXiohzMXcmVU1pMFssmztWoibFARiKrgTr7", "proofs": [ "58hy3VDzYy7wV7BDD3WVyQtXd3NMgAMPac1QYk6qucHuSqE41zrGgd2MfBzjDZuCaRVWNhPdkq3tMAsgWuV7fzvo" ], "script": "base64:AAIDAAAAAAAAAAAAAAACAAAAAAhJZFRva2VuQQEAAAAgnRVvdKvGL2hq2sNhnu09hyaOGV75Lrx4DW47syLUT28AAAAACElkVG9rZW5CBQAAAAR1bml0AAAAAQAAAApjb250ZXh0T2JqAQAAAAhleGNoYW5nZQAAAAAEAAAAB2Ftb3VudEEJAQAAABFAZXh0ck5hdGl2ZSgxMDUwKQAAAAIFAAAABHRoaXMCAAAAB2Ftb3VudEEEAAAAB2Ftb3VudEIJAQAAABFAZXh0ck5hdGl2ZSgxMDUwKQAAAAIFAAAABHRoaXMCAAAAB2Ftb3VudEIEAAAAB3BheW1lbnQEAAAAByRtYXRjaDAIBQAAAApjb250ZXh0T2JqAAAAB3BheW1lbnQDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAD0F0dGFjaGVkUGF5bWVudAQAAAABcAUAAAAHJG1hdGNoMAUAAAABcAkAAAIAAAABAgAAABRQYXltZW50IG5vdCBhdHRhY2hlZAQAAAAPYXNzZXRJZFJlY2VpdmVkCAUAAAAHcGF5bWVudAAAAAdhc3NldElkBAAAABJ0b2tlblJlY2VpdmVBbW91bnQIB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VuU2VuZEFtb3VudAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgIAAAAHYW1vdW50QQkAAGQAAAACBQAAAAdhbW91bnRBBQAAABJ0b2tlblJlY2VpdmVBbW91bnQFAAAAA25pbAkBAAAAC1RyYW5zZmVyU2V0AAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAAKY29udGV4dE9iagAAAAZjYWxsZXIFAAAAD3Rva2VuU2VuZEFtb3VudAUAAAALYXNzZXRJZFNlbnQFAAAAA25pbAkAAAIAAAABAgAAABRBc3NldCBpcyBub3QgYWxsb3dlZAAAAABBFPfg", "chainId": 84, "height": 588401, "spentComplexity": 0 } View: original | compacted Prev: HdfL7MTVpRJvRmQycAYyfmAKefZbQev4hPGvX4SvRMVM Next: 2Zi8bASgFzqwvmfNYcaxN51B1JhskY1PwBKiAwAZX2D2 Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = base58'BaBy2y5tGsuQZPMM7JHU89zmahR7yybXaVMXpnZ589An' | |
5 | 5 | ||
6 | 6 | let b = unit | |
7 | 7 | ||
8 | 8 | @Callable(c) | |
9 | 9 | func exchange () = { | |
10 | 10 | let d = getIntegerValue(this, "amountA") | |
11 | 11 | let e = getIntegerValue(this, "amountB") | |
12 | 12 | let f = { | |
13 | 13 | let g = c.payment | |
14 | 14 | if ($isInstanceOf(g, "AttachedPayment")) | |
15 | 15 | then { | |
16 | 16 | let h = g | |
17 | 17 | h | |
18 | 18 | } | |
19 | 19 | else throw("Payment not attached") | |
20 | 20 | } | |
21 | 21 | let i = f.assetId | |
22 | 22 | let j = f.amount | |
23 | 23 | if ((i == a)) | |
24 | 24 | then { | |
25 | 25 | let k = fraction(d, j, (j + e)) | |
26 | 26 | let l = unit | |
27 | 27 | ScriptResult(WriteSet([DataEntry("amountB", (e + j)), DataEntry("amountA", (d - k))]), TransferSet([ScriptTransfer(c.caller, k, l)])) | |
28 | 28 | } | |
29 | 29 | else if ((i == b)) | |
30 | 30 | then { | |
31 | 31 | let k = fraction(e, j, (j + d)) | |
32 | 32 | let l = a | |
33 | 33 | ScriptResult(WriteSet([DataEntry("amountB", (e - k)), DataEntry("amountA", (d + j))]), TransferSet([ScriptTransfer(c.caller, k, l)])) | |
34 | 34 | } | |
35 | 35 | else throw("Asset is not allowed") | |
36 | 36 | } | |
37 | 37 | ||
38 | 38 |
github/deemru/w8io/026f985 22.45 ms ◑