tx · 8H1EEfuNBjMxXF7GdoWQ8CpWhzk7FMsTBArzvzCd54o2
3N69YR9dGN9tJnhxGrURt5cQycjAN1zbQ9t: -0.05000000 Waves
2021.01.25 13:52 [1368932] smart account 3N69YR9dGN9tJnhxGrURt5cQycjAN1zbQ9t > SELF 0.00000000 Waves
{
"type": 13,
"id": "8H1EEfuNBjMxXF7GdoWQ8CpWhzk7FMsTBArzvzCd54o2",
"fee": 5000000,
"feeAssetId": null,
"timestamp": 1611571926518,
"version": 2,
"chainId": 84,
"sender": "3N69YR9dGN9tJnhxGrURt5cQycjAN1zbQ9t",
"senderPublicKey": "Bo16mjUNTGCeZDYvQc6gHh46P21B3DqYCHoDt9CyzxHf",
"proofs": [
"45rfy8fHF1kmHcLHF1TYA6pWixtcKtJDhHVyMRRvfQWZjwKXut5t4Hbm96Kvirxe5L5dGZ46d2rnMx7hbhvWSZUM"
],
"script": "base64:AAIEAAAAAAAAAAQIAhIAAAAACgAAAAABZQAAAAAAEDPE1gAAAAAOa3dvdGFyb3dub3dhZ2kAAAAAAAAAA+gAAAAABGJhemEJAABpAAAAAgUAAAAOa3dvdGFyb3dub3dhZ2kAAAAAAAAAAAIAAAAABnBvemlvbQAAAAAN+EdYAAAAAAAKYmFsYW5zVVNETgAAAAAAAAAD6AAAAAAKYmFsYW5zVVNEVAAAAAAAAAAD6AEAAAACbG4AAAABAAAAAXgJAABtAAAABgUAAAABeAAAAAAAAAAACAUAAAABZQAAAAAAAAAACAAAAAAAAAAACAUAAAAERE9XTgEAAAADZXhwAAAAAQAAAAF4CQAAbAAAAAYFAAAAAWUAAAAAAAAAAAgFAAAAAXgAAAAAAAAAAAgAAAAAAAAAAAgFAAAABERPV04BAAAACG1ub3plbmllAAAAAgAAAAF4AAAAAXkJAABrAAAAAwUAAAABeAUAAAABeQAAAAAABfXhAAEAAAAJZHppZWxlbmllAAAAAgAAAAF4AAAAAXkJAABrAAAAAwUAAAABeAAAAAAABfXhAAUAAAABeQAAAAEAAAABaQEAAAAHd3ltaWFuYQAAAAAEAAAACm5vd3lwb3ppb20JAABkAAAAAgUAAAAGcG96aW9tCQAAawAAAAMAAAAAAAX14QAAAAAAAAAAAGQAAAAAAAAAAAEEAAAADGt3b3Rhd3ltaWFueQAAAAAAdzWUAAQAAAABYQkBAAAAA2V4cAAAAAEJAQAAAAJsbgAAAAEAAAAAAACYloADBwQAAAAHd3lwbGF0YQkAAGsAAAADCQAAaAAAAAIFAAAABGJhemEJAABlAAAAAgkBAAAAAmxuAAAAAQUAAAAKbm93eXBvemlvbQkBAAAAAmxuAAAAAQUAAAAGcG96aW9tAAAAAAAAAAABAAAAAAAAAABkCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAAHd3lwbGF0YQEAAAAACQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACAgAAAAZQb3ppb20FAAAACm5vd3lwb3ppb20JAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAICAAAAA2ludAUAAAAHd3lwbGF0YQUAAAADbmlsBAAAAAd3eXBsYXRhCQAAZQAAAAIFAAAABnBvemlvbQkBAAAACWR6aWVsZW5pZQAAAAIFAAAABnBvemlvbQkBAAAAA2V4cAAAAAEJAABpAAAAAgUAAAAMa3dvdGF3eW1pYW55BQAAAARiYXphCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACAgAAAANpbnQFAAAAB3d5cGxhdGEFAAAAA25pbAAAAAACWzFm",
"height": 1368932,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 3KP4m4bQ2gTStnR74GPPNN4E3Nv3Gr4SJwwtsTgoJmdp
Next: 89q6Ydr7DwQXxrD718oP7J1MR3oZoDhSoDQzZAstm9ut
Diff:
Old | New | | Differences |
---|
19 | 19 | | func exp (x) = pow(e, 8, x, 8, 8, DOWN) |
---|
20 | 20 | | |
---|
21 | 21 | | |
---|
22 | | - | func mnozenie (x,y) = fraction(x, y, 100000000000) |
---|
| 22 | + | func mnozenie (x,y) = fraction(x, y, 100000000) |
---|
23 | 23 | | |
---|
24 | 24 | | |
---|
25 | | - | func dzielenie (x,y) = fraction(x, 100000000000, y) |
---|
| 25 | + | func dzielenie (x,y) = fraction(x, 100000000, y) |
---|
26 | 26 | | |
---|
27 | 27 | | |
---|
28 | 28 | | @Callable(i) |
---|
|
36 | 36 | | [ScriptTransfer(i.caller, wyplata, base58''), IntegerEntry("Poziom", nowypoziom), IntegerEntry("int", wyplata)] |
---|
37 | 37 | | } |
---|
38 | 38 | | else { |
---|
39 | | - | let wyplata = exp((kwotawymiany / baza)) |
---|
| 39 | + | let wyplata = (poziom - dzielenie(poziom, exp((kwotawymiany / baza)))) |
---|
40 | 40 | | [IntegerEntry("int", wyplata)] |
---|
41 | 41 | | } |
---|
42 | 42 | | } |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 4 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let e = 271828182 |
---|
5 | 5 | | |
---|
6 | 6 | | let kwotarownowagi = 1000 |
---|
7 | 7 | | |
---|
8 | 8 | | let baza = (kwotarownowagi / 2) |
---|
9 | 9 | | |
---|
10 | 10 | | let poziom = 60000000000 |
---|
11 | 11 | | |
---|
12 | 12 | | let balansUSDN = 1000 |
---|
13 | 13 | | |
---|
14 | 14 | | let balansUSDT = 1000 |
---|
15 | 15 | | |
---|
16 | 16 | | func ln (x) = log(x, 8, e, 8, 8, DOWN) |
---|
17 | 17 | | |
---|
18 | 18 | | |
---|
19 | 19 | | func exp (x) = pow(e, 8, x, 8, 8, DOWN) |
---|
20 | 20 | | |
---|
21 | 21 | | |
---|
22 | | - | func mnozenie (x,y) = fraction(x, y, 100000000000) |
---|
| 22 | + | func mnozenie (x,y) = fraction(x, y, 100000000) |
---|
23 | 23 | | |
---|
24 | 24 | | |
---|
25 | | - | func dzielenie (x,y) = fraction(x, 100000000000, y) |
---|
| 25 | + | func dzielenie (x,y) = fraction(x, 100000000, y) |
---|
26 | 26 | | |
---|
27 | 27 | | |
---|
28 | 28 | | @Callable(i) |
---|
29 | 29 | | func wymiana () = { |
---|
30 | 30 | | let nowypoziom = (poziom + fraction(100000000, 100, 1)) |
---|
31 | 31 | | let kwotawymiany = 2000000000 |
---|
32 | 32 | | let a = exp(ln(10000000)) |
---|
33 | 33 | | if (false) |
---|
34 | 34 | | then { |
---|
35 | 35 | | let wyplata = fraction((baza * (ln(nowypoziom) - ln(poziom))), 1, 100) |
---|
36 | 36 | | [ScriptTransfer(i.caller, wyplata, base58''), IntegerEntry("Poziom", nowypoziom), IntegerEntry("int", wyplata)] |
---|
37 | 37 | | } |
---|
38 | 38 | | else { |
---|
39 | | - | let wyplata = exp((kwotawymiany / baza)) |
---|
| 39 | + | let wyplata = (poziom - dzielenie(poziom, exp((kwotawymiany / baza)))) |
---|
40 | 40 | | [IntegerEntry("int", wyplata)] |
---|
41 | 41 | | } |
---|
42 | 42 | | } |
---|
43 | 43 | | |
---|
44 | 44 | | |
---|