tx · 5pdCPCDyatDLkfxt8mLnER4YMzvntECsNYP3WBDqMhRD
3N61RYWc9QuqKUwLvowpZZLpgUnqpQSFwLq: -0.01000000 Waves
2024.03.04 11:19 [3003008] smart account 3N61RYWc9QuqKUwLvowpZZLpgUnqpQSFwLq > SELF 0.00000000 Waves
{
"type": 13,
"id": "5pdCPCDyatDLkfxt8mLnER4YMzvntECsNYP3WBDqMhRD",
"fee": 1000000,
"feeAssetId": null,
"timestamp": 1709540421340,
"version": 2,
"chainId": 84,
"sender": "3N61RYWc9QuqKUwLvowpZZLpgUnqpQSFwLq",
"senderPublicKey": "HdwFH8HPYu3HG27yK6bszu1CdR4uik4HgzyTimeSfcYf",
"proofs": [
"5Cm6Yqe1MoFBNzXWX9Rg9enUTnjGzmyRv2YzYd7mF4YK7hgDEa3jqpYhC3XHuQQBNqV6uP4cEauFtj2vcjAWmFMr"
],
"script": "base64:BgIECAISAA8AEGFtb3VudEFzc2V0SWRLZXkCDWFtb3VudEFzc2V0SWQAD3ByaWNlQXNzZXRJZEtleQIMcHJpY2VBc3NldElkAApmZWVSYXRlS2V5AgdmZWVSYXRlAQpnZXRBc3NldElkAQ1hc3NldElkU3RyaW5nAwkAAAIFDWFzc2V0SWRTdHJpbmcCBVdBVkVTBQR1bml0CQDZBAEFDWFzc2V0SWRTdHJpbmcBD2dldEFzc2V0QmFsYW5jZQEHYXNzZXRJZAQHJG1hdGNoMAUHYXNzZXRJZAMJAAECBQckbWF0Y2gwAgpCeXRlVmVjdG9yBAJpZAUHJG1hdGNoMAkA8AcCBQR0aGlzBQJpZAgJAO8HAQUEdGhpcwlhdmFpbGFibGUAE2Ftb3VudEFzc2V0SWRTdHJpbmcJARFAZXh0ck5hdGl2ZSgxMDUzKQIFBHRoaXMFEGFtb3VudEFzc2V0SWRLZXkADWFtb3VudEFzc2V0SWQJAQpnZXRBc3NldElkAQUTYW1vdW50QXNzZXRJZFN0cmluZwASYW1vdW50QXNzZXRCYWxhbmNlCQEPZ2V0QXN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BQZjaGVja3MEDXBheW1lbnRBbW91bnQICQCRAwIIBQFpCHBheW1lbnRzAAAGYW1vdW50BAlpbml0QW1CYWwFEmFtb3VudEFzc2V0QmFsYW5jZQQJaW5pdFByQmFsCQBlAgURcHJpY2VBc3NldEJhbGFuY2UFDXBheW1lbnRBbW91bnQAAAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgEBaQEDZm9vAAkAlAoCBQNuaWwAAADr6MqF",
"height": 3003008,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 9UhDN4m4W8Z4nMWTsQpUhBmiY4Bm5yhsPjNrL8RjgCku
Next: D19hCqgMgnsU22KXdQST57REuJFQmDbxebpQpXzo8E7n
Diff:
Old | New | | Differences |
---|
40 | 40 | | let q = valueOrElse(getInteger(this, c), 1000000) |
---|
41 | 41 | | |
---|
42 | 42 | | func r (s,t,u) = { |
---|
43 | | - | let v = (s - fraction((s * t), p, (t * p))) |
---|
| 43 | + | let v = (s - fraction(s, t, t)) |
---|
44 | 44 | | let w = (s - v) |
---|
45 | 45 | | let x = (t + u) |
---|
46 | 46 | | let y = (s * t) |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 6 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let a = "amountAssetId" |
---|
5 | 5 | | |
---|
6 | 6 | | let b = "priceAssetId" |
---|
7 | 7 | | |
---|
8 | 8 | | let c = "feeRate" |
---|
9 | 9 | | |
---|
10 | 10 | | func d (e) = if ((e == "WAVES")) |
---|
11 | 11 | | then unit |
---|
12 | 12 | | else fromBase58String(e) |
---|
13 | 13 | | |
---|
14 | 14 | | |
---|
15 | 15 | | func f (g) = { |
---|
16 | 16 | | let h = g |
---|
17 | 17 | | if ($isInstanceOf(h, "ByteVector")) |
---|
18 | 18 | | then { |
---|
19 | 19 | | let i = h |
---|
20 | 20 | | assetBalance(this, i) |
---|
21 | 21 | | } |
---|
22 | 22 | | else wavesBalance(this).available |
---|
23 | 23 | | } |
---|
24 | 24 | | |
---|
25 | 25 | | |
---|
26 | 26 | | let j = getStringValue(this, a) |
---|
27 | 27 | | |
---|
28 | 28 | | let k = d(j) |
---|
29 | 29 | | |
---|
30 | 30 | | let l = f(k) |
---|
31 | 31 | | |
---|
32 | 32 | | let m = getStringValue(this, b) |
---|
33 | 33 | | |
---|
34 | 34 | | let n = d(m) |
---|
35 | 35 | | |
---|
36 | 36 | | let o = f(n) |
---|
37 | 37 | | |
---|
38 | 38 | | let p = 100000000 |
---|
39 | 39 | | |
---|
40 | 40 | | let q = valueOrElse(getInteger(this, c), 1000000) |
---|
41 | 41 | | |
---|
42 | 42 | | func r (s,t,u) = { |
---|
43 | | - | let v = (s - fraction((s * t), p, (t * p))) |
---|
| 43 | + | let v = (s - fraction(s, t, t)) |
---|
44 | 44 | | let w = (s - v) |
---|
45 | 45 | | let x = (t + u) |
---|
46 | 46 | | let y = (s * t) |
---|
47 | 47 | | let z = (w * x) |
---|
48 | 48 | | $Tuple7(v, s, t, y, w, x, z) |
---|
49 | 49 | | } |
---|
50 | 50 | | |
---|
51 | 51 | | |
---|
52 | 52 | | func A (B) = { |
---|
53 | 53 | | let C = [if ((size(B.payments) > 0)) |
---|
54 | 54 | | then true |
---|
55 | 55 | | else throw("should be with 1 payment"), if ((B.payments[0].assetId == n)) |
---|
56 | 56 | | then true |
---|
57 | 57 | | else throw(makeString(["payment assetId should be: ", m], " "))] |
---|
58 | 58 | | if ((C == C)) |
---|
59 | 59 | | then { |
---|
60 | 60 | | let u = B.payments[0].amount |
---|
61 | 61 | | let s = l |
---|
62 | 62 | | let t = (o - u) |
---|
63 | 63 | | 0 |
---|
64 | 64 | | } |
---|
65 | 65 | | else throw("Strict value is not equal to itself.") |
---|
66 | 66 | | } |
---|
67 | 67 | | |
---|
68 | 68 | | |
---|
69 | 69 | | @Callable(B) |
---|
70 | 70 | | func foo () = $Tuple2(nil, 0) |
---|
71 | 71 | | |
---|
72 | 72 | | |
---|