tx · 6nebACUQPjdpdZApBTNJ69UYjTU3wYxUUAbg9dtWS91y 3N4w7wVkViML11XdFL5xNkPofVVg1nLWEmX: -0.01400000 Waves 2019.06.28 14:36 [561920] smart account 3N4w7wVkViML11XdFL5xNkPofVVg1nLWEmX > SELF 0.00000000 Waves
{ "type": 13, "id": "6nebACUQPjdpdZApBTNJ69UYjTU3wYxUUAbg9dtWS91y", "fee": 1400000, "feeAssetId": null, "timestamp": 1561721812318, "version": 1, "sender": "3N4w7wVkViML11XdFL5xNkPofVVg1nLWEmX", "senderPublicKey": "EKGwbPjcrwuWgDm8Ed9HAGmxMviCRgqTkQDVt4rYbyre", "proofs": [ "22okfgW53FdcGAzpRfbNSgm93GdkhZpVduJs2AZTvbBA3fS7bQiDBxi62Z3YundgBxGucLQ3GfZ6qggEVsrk513j" ], "script": "base64:AAIDAAAAAAAAAAAAAAAAAAAAAQAAAApjb250ZXh0T2JqAQAAAAd1bmlzd2FwAAAAAAQAAAANTGlxdWlkQXNzZXRJZAEAAAAg6Sj/x9+sQXsLyMd4sb3avDnHYqUuSNW1qsm9UzCcO+sEAAAAC3dhdmVzQW1vdW50CQEAAAARQGV4dHJOYXRpdmUoMTA1MCkAAAACBQAAAAR0aGlzAgAAAAt3YXZlc0Ftb3VudAQAAAAMbGlxdWlkQW1vdW50CQEAAAARQGV4dHJOYXRpdmUoMTA1MCkAAAACBQAAAAR0aGlzAgAAAAxsaXF1aWRBbW91bnQEAAAAB3BheW1lbnQEAAAAByRtYXRjaDAIBQAAAApjb250ZXh0T2JqAAAAB3BheW1lbnQDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAD0F0dGFjaGVkUGF5bWVudAQAAAABcAUAAAAHJG1hdGNoMAUAAAABcAkAAAIAAAABAgAAABRQYXltZW50IG5vdCBhdHRhY2hlZAQAAAAPYXNzZXRJZFJlY2VpdmVkCAUAAAAHcGF5bWVudAAAAAdhc3NldElkBAAAABJ0b2tlblJlY2VpdmVBbW91bnQIBQAAAAdwY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AAApsaXF1aSBvdW50CQAAZAAAAAIFAAAADGxpcXVpZEFtb3VudAUAAAASdG9rZW5SZWNlaXZlQW1vdW50CQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACAgAAAAt3YXZlc0Ftb3VudAkAAGUAAAACBQAAAAt3YXZlc0Ftb3VudAUAAAAPdG9rZW5TZW5kQW1vdW50BQAAAANuaWwJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAACmNvbnRleHRPYmoAAAAGY2FsbGVyBQAAAA90b2tlblNlbmRBbW91bnQFAAAAC2Fzc2V0SWRTZW50BQAAAANuaWwJAAACAAAAAQIAAAAUQXNzZXQgaXMgbm90IGFsbG93ZWQAAAAALfiKMw==", "chainId": 84, "height": 561920, "spentComplexity": 0 } View: original | compacted Prev: DhxgdUkSUyxG6kHySsPRWyNHkDvkpzvCkEtUVLwWThtp Next: 8JRpR7WaVdsK45YPQpW9bicQfXL27GcTg6r63Z8WWcCz Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | ||
5 | 5 | ||
6 | 6 | @Callable(a) | |
7 | 7 | func uniswap () = { | |
8 | 8 | let b = base58'GhAFhXzwCYfvcXQ3GHFaQFnCzAuYCT156qFqiYyzfkzv' | |
9 | 9 | let c = getIntegerValue(this, "wavesAmount") | |
10 | 10 | let d = getIntegerValue(this, "liquidAmount") | |
11 | 11 | let e = { | |
12 | 12 | let f = a.payment | |
13 | 13 | if ($isInstanceOf(f, "AttachedPayment")) | |
14 | 14 | then { | |
15 | 15 | let g = f | |
16 | 16 | g | |
17 | 17 | } | |
18 | 18 | else throw("Payment not attached") | |
19 | 19 | } | |
20 | 20 | let h = e.assetId | |
21 | 21 | let i = e.amount | |
22 | 22 | if ((h == unit)) | |
23 | 23 | then { | |
24 | 24 | let j = fraction(d, i, (i + c)) | |
25 | 25 | let k = b | |
26 | 26 | ScriptResult(WriteSet([DataEntry("liquidAmount", (d - j)), DataEntry("wavesAmount", (c + i))]), TransferSet([ScriptTransfer(a.caller, j, k)])) | |
27 | 27 | } | |
28 | 28 | else if ((h == b)) | |
29 | 29 | then { | |
30 | 30 | let j = fraction(c, i, (i + d)) | |
31 | 31 | let k = b | |
32 | 32 | ScriptResult(WriteSet([DataEntry("liqui ount", (d + i)), DataEntry("wavesAmount", (c - j))]), TransferSet([ScriptTransfer(a.caller, j, k)])) | |
33 | 33 | } | |
34 | 34 | else throw("Asset is not allowed") | |
35 | 35 | } | |
36 | 36 | ||
37 | 37 |
github/deemru/w8io/169f3d6 23.24 ms ◑