tx · 8uyPT7s4kuon3CLduEBBzpLXB9X6G1GyWGN9Fq94bVjd

3N61RYWc9QuqKUwLvowpZZLpgUnqpQSFwLq:  -0.01000000 Waves

2024.03.04 14:34 [3003213] smart account 3N61RYWc9QuqKUwLvowpZZLpgUnqpQSFwLq > SELF 0.00000000 Waves

{ "type": 13, "id": "8uyPT7s4kuon3CLduEBBzpLXB9X6G1GyWGN9Fq94bVjd", "fee": 1000000, "feeAssetId": null, "timestamp": 1709552044193, "version": 2, "chainId": 84, "sender": "3N61RYWc9QuqKUwLvowpZZLpgUnqpQSFwLq", "senderPublicKey": "HdwFH8HPYu3HG27yK6bszu1CdR4uik4HgzyTimeSfcYf", "proofs": [ "4gpGZovouTggmtVs25NGd6TxJvPTp9PwvgvLfH8rynrU2jTuYpBRkJXQSHVHvJgQyf9NC5Vb2jVg2zfe1ptBA4Xi" ], "script": "base64:BgIJCAISABIDCgEIDgAQYW1vdW50QXNzZXRJZEtleQINYW1vdW50QXNzZXRJZAAPcHJpY2VBc3NldElkS2V5AgxwcmljZUFzc2V0SWQACmZlZVJhdGVLZXkCB2ZlZVJhdGUBCmdldEFzc2V0SWQBDWFzc2V0SWRTdHJpbmcDCQAAAgUNYXNzZXRJZFN0cmluZwIFV0FWRVMFBHVuaXQJANkEAQUNYXNzZXRJZFN0cmluZwEPZ2V0QXNzZXRCYWxhbmNlAQdhc3NldElkBAckbWF0Y2gwBQdhc3NldElkAwkAAQIFByRtYXRjaDACCkJ5dGVWZWN0b3IEAmlkBQckbWF0Y2gwCQDwBwIFBHRoaXMFAmlkCAkA7wcBBQR0aGlzCWF2YWlsYWJsZQATYW1vdW50QXNzZXRJZFN0cmluZwkBEUBleHRyTmF0aXZlKDEwNTMpAgUEdGhpcwUQYW1vdW50QXNzZXRJZEtleQANYW1vdW50QXNzZXRJZAkBCmdldEFzc2V0SWQBBRNhbW91bnRBc3NldElkU3RyaW5nABJwcmljZUFzc2V0SWRTdHJpbmcJARFAZXh0ck5hdGl2ZSgx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BDlNjcmlwdFRyYW5zZmVyAwUHYWRkcmVzcwUKc2VuZEFtb3VudAULc2VuZEFzc2V0SWQFA25pbAkAAgECEWFtb3VudCBpcyB0b28gbG93CQCUCgIFC3NlbmRBY3Rpb25zCQCWCgQFCnNlbmRBbW91bnQFCWZlZUFtb3VudAULc2VuZEFzc2V0SWQFDXVzZXJSZWFsUHJpY2UJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4CAWkBBHN3YXAACQEMc3dhcEludGVybmFsAggFAWkGY2FsbGVyBQFpAWkBB3N3YXBGb3IBB2FkZHJlc3MJAQxzd2FwSW50ZXJuYWwCCQERQGV4dHJOYXRpdmUoMTA2MikBBQdhZGRyZXNzBQFpACq2obU=", "height": 3003213, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 33HXGRTLEydx9ES2EZ4HPKc3u7QdfMKTFKGnGxDSqMfc Next: EuyqCcEoAAFYgX74pS5AhjzCd3TKhprbrZ2irLWfNr8z Diff:
OldNewDifferences
6666 then true
6767 else throw("should be with 1 payment"), if (containsElement([k, m], G.payments[0].assetId))
6868 then true
69- else throw(makeString(["payment assetId should be (", j, ") or (", l, ")"], " "))]
69+ else throw(makeString(["payment assetId should be", j, "or", l], " "))]
7070 if ((H == H))
7171 then {
7272 let x = G.payments[0].assetId
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "amountAssetId"
55
66 let b = "priceAssetId"
77
88 let c = "feeRate"
99
1010 func d (e) = if ((e == "WAVES"))
1111 then unit
1212 else fromBase58String(e)
1313
1414
1515 func f (g) = {
1616 let h = g
1717 if ($isInstanceOf(h, "ByteVector"))
1818 then {
1919 let i = h
2020 assetBalance(this, i)
2121 }
2222 else wavesBalance(this).available
2323 }
2424
2525
2626 let j = getStringValue(this, a)
2727
2828 let k = d(j)
2929
3030 let l = getStringValue(this, b)
3131
3232 let m = d(l)
3333
3434 let n = 100000000
3535
3636 let o = valueOrElse(getInteger(this, c), 200000)
3737
3838 func p (q,r,s) = {
3939 let t = (r + s)
4040 let u = fraction(q, r, t)
4141 let v = (q - u)
4242 v
4343 }
4444
4545
4646 func w (x,s) = {
4747 let y = if ((x == k))
4848 then $Tuple2(m, k)
4949 else $Tuple2(k, m)
5050 let z = y._1
5151 let A = y._2
5252 let q = f(z)
5353 let r = (f(A) - s)
5454 let B = p(q, r, s)
5555 let C = fraction(B, o, n)
5656 let v = (B - C)
5757 let D = if ((x == k))
5858 then fraction(v, n, s)
5959 else fraction(s, n, v)
6060 $Tuple4(v, C, z, D)
6161 }
6262
6363
6464 func E (F,G) = {
6565 let H = [if ((size(G.payments) > 0))
6666 then true
6767 else throw("should be with 1 payment"), if (containsElement([k, m], G.payments[0].assetId))
6868 then true
69- else throw(makeString(["payment assetId should be (", j, ") or (", l, ")"], " "))]
69+ else throw(makeString(["payment assetId should be", j, "or", l], " "))]
7070 if ((H == H))
7171 then {
7272 let x = G.payments[0].assetId
7373 let s = G.payments[0].amount
7474 let I = w(x, s)
7575 let v = I._1
7676 let C = I._2
7777 let J = I._3
7878 let D = I._4
7979 let K = if ((0 >= C))
8080 then [ScriptTransfer(F, v, J)]
8181 else throw("amount is too low")
8282 $Tuple2(K, $Tuple4(v, C, J, D))
8383 }
8484 else throw("Strict value is not equal to itself.")
8585 }
8686
8787
8888 @Callable(G)
8989 func swap () = E(G.caller, G)
9090
9191
9292
9393 @Callable(G)
9494 func swapFor (F) = E(addressFromStringValue(F), G)
9595
9696

github/deemru/w8io/169f3d6 
25.68 ms