tx · 8JRpR7WaVdsK45YPQpW9bicQfXL27GcTg6r63Z8WWcCz

3N4w7wVkViML11XdFL5xNkPofVVg1nLWEmX:  -0.01400000 Waves

2019.06.28 14:42 [561926] smart account 3N4w7wVkViML11XdFL5xNkPofVVg1nLWEmX > SELF 0.00000000 Waves

{ "type": 13, "id": "8JRpR7WaVdsK45YPQpW9bicQfXL27GcTg6r63Z8WWcCz", "fee": 1400000, "feeAssetId": null, "timestamp": 1561722145199, "version": 1, "sender": "3N4w7wVkViML11XdFL5xNkPofVVg1nLWEmX", "senderPublicKey": "EKGwbPjcrwuWgDm8Ed9HAGmxMviCRgqTkQDVt4rYbyre", "proofs": [ "BVR8X9kt7RyeCx79aag3ySJxmzEz8EyeSVbiBowkhMzgArHPCzw3LxDVUbWdJF6JdR2JR1EmVGpFUKSkARf6vjb" ], "script": "base64:AAIDAAAAAAAAAAAAAAAAAAAAAQAAAApjb250ZXh0T2JqAQAAAAd1bmlzd2FwAAAAAAQAAAANTGlxdWlkQXNzZXRJZAEAAAAg6Sj/x9+sQXsLyMd4sb3avDnHYqUuSNW1qsm9UzCcO+sEAAAAC3dhdmVzQW1vdW50CQEAAAARQGV4dHJOYXRpdmUoMTA1MCkAAAACBQAAAAR0aGlzAgAAAAt3YXZlc0Ftb3VudAQAAAAMbGlxdWlkQW1vdW50CQEAAAARQGV4dHJOYXRpdmUoMTA1MCkAAAACBQAAAAR0aGlzAgAAAAxsaXF1aWRBbW91bnQEAAAAB3BheW1lbnQEAAAAByRtYXRjaDAIBQAAAApjb250ZXh0T2JqAAAAB3BheW1lbnQDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAD0F0dGFjaGVkUGF5bWVudAQAAAABcAUAAAAHJG1hdGNoMAUAAAABcAkAAAIAAAABAgAAABRQYXltZW50IG5vdCBhdHRhY2hlZAQAAAAPYXNzZXRJZFJlY2VpdmVkCAUAAAAHcGF5bWVudAAAAAdhc3NldElkBAAAABJ0b2tlblJlY2VpdmVBbW91bnQIBQA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AAACAgAAAApsaXF1aSBvdW50CQAAZAAAAAIFAAAADGxpcXVpZEFtb3VudAUAAAASdG9rZW5SZWNlaXZlQW1vdW50CQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACAgAAAAt3YXZlc0Ftb3VudAkAAGUAAAACBQAAAAt3YXZlc0Ftb3VudAUAAAAPdG9rZW5TZW5kQW1vdW50BQAAAANuaWwJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAACmNvbnRleHRPYmoAAAAGY2FsbGVyBQAAAA90b2tlblNlbmRBbW91bnQFAAAAC2Fzc2V0SWRTZW50BQAAAANuaWwJAAACAAAAAQIAAAAUQXNzZXQgaXMgbm90IGFsbG93ZWQAAAAALfiKMw==", "chainId": 84, "height": 561926, "spentComplexity": 0 } View: original | compacted Prev: 6nebACUQPjdpdZApBTNJ69UYjTU3wYxUUAbg9dtWS91y Next: D3kvAU2yc7xAoovQEq4iZd6FMgHBRMWjsPDbzo6REskx Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(contextObj)
77 func uniswap () = {
88 let LiquidAssetId = base58'GhAFhXzwCYfvcXQ3GHFaQFnCzAuYCT156qFqiYyzfkzv'
99 let wavesAmount = getIntegerValue(this, "wavesAmount")
1010 let liquidAmount = getIntegerValue(this, "liquidAmount")
1111 let payment = match contextObj.payment {
1212 case p: AttachedPayment =>
1313 p
1414 case _ =>
1515 throw("Payment not attached")
1616 }
1717 let assetIdReceived = payment.assetId
1818 let tokenReceiveAmount = payment.amount
1919 if ((assetIdReceived == unit))
2020 then {
2121 let tokenSendAmount = fraction(liquidAmount, tokenReceiveAmount, (tokenReceiveAmount + wavesAmount))
2222 let assetIdSent = LiquidAssetId
2323 ScriptResult(WriteSet([DataEntry("liquidAmount", (liquidAmount - tokenSendAmount)), DataEntry("wavesAmount", (wavesAmount + tokenReceiveAmount))]), TransferSet([ScriptTransfer(contextObj.caller, tokenSendAmount, assetIdSent)]))
2424 }
2525 else if ((assetIdReceived == LiquidAssetId))
2626 then {
2727 let tokenSendAmount = fraction(wavesAmount, tokenReceiveAmount, (tokenReceiveAmount + liquidAmount))
2828 let assetIdSent = LiquidAssetId
2929 ScriptResult(WriteSet([DataEntry("liqui ount", (liquidAmount + tokenReceiveAmount)), DataEntry("wavesAmount", (wavesAmount - tokenSendAmount))]), TransferSet([ScriptTransfer(contextObj.caller, tokenSendAmount, assetIdSent)]))
3030 }
3131 else throw("Asset is not allowed")
3232 }
3333
3434

github/deemru/w8io/026f985 
20.04 ms