tx · CGyoQ44a7XNUWpmY4Q2SshgpmDpTGsK4KpFkww1ZST2Q 3NCy4rT9no9CGLr89UrnyH8s75P8JjkSap8: -0.01400000 Waves 2021.01.11 06:57 [1348270] smart account 3NCy4rT9no9CGLr89UrnyH8s75P8JjkSap8 > SELF 0.00000000 Waves
{ "type": 13, "id": "CGyoQ44a7XNUWpmY4Q2SshgpmDpTGsK4KpFkww1ZST2Q", "fee": 1400000, "feeAssetId": null, "timestamp": 1610337508719, "version": 2, "chainId": 84, "sender": "3NCy4rT9no9CGLr89UrnyH8s75P8JjkSap8", "senderPublicKey": "62prNgRbWHRQAXh3a5sG95EtrJoYEsuUAgwkg3F4Kt6k", "proofs": [ "5DYvkVzFovQUmkGedphFBLX64pWexMagfhaqxZ2oBgnn7N9M7mzY1xP8vfuBfmAghpAJwgVPqyNMXS9B922CCZFF" ], "script": "base64:AAIEAAAAAAAAAAYIAhIAEgAAAAACAAAAAAhzemN6ZXBhbgkAAlkAAAABAgAAACxHb0o3eDRib1lyRk1jbmZmWjJraXA0bWdHc0Z5NEt5WnJ5Rzlqb29MdEdYbwAAAAAJc3pjemVwYW4yCQACWQAAAAECAAAALDl5NG40bnFjUlVRVkxpYVBHVmV6eEI2Q1diUEhCNjI3TDlwWjdHU2FhWnp1AAAAAgAAAAFpAQAAAAtacm9icHJ6ZWxldwAAAAAEAAAABWtvbnRvCAUAAAABaQAAAAZjYWxsZXIEAAAABUlsb3NjCAkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAAAAAZhbW91bnQEAAAABndhbHV0YQgJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAAAAAHYXNzZXRJZAQAAAAQZGVub21pbm93YW5pbG9zYwkAAGsAAAADBQAAAAVJbG9zYwAAAAAAAAAAAQAAAAAAAA9CQAQAAAAPcG9vZGplY2l1b3BsYXR5CQAAawAAAAMFAAAAEGRlbm9taW5vd2FuaWxvc2MAAAAAAAAAAGEAAAA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AAAAgkBAAAABEJ1cm4AAAACBQAAAAhzemN6ZXBhbgUAAAAFSWxvc2MFAAAAA25pbAMJAAAAAAAAAgUAAAAGd2FsdXRhBQAAAAlzemN6ZXBhbjIJAARMAAAAAgkBAAAAB1JlaXNzdWUAAAADBQAAAAhzemN6ZXBhbgUAAAAFSWxvc2MGCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMFAAAABWtvbnRvBQAAAA9wb29kamVjaXVvcGxhdHkFAAAACHN6Y3plcGFuCQAETAAAAAIJAQAAAARCdXJuAAAAAgUAAAAJc3pjemVwYW4yBQAAAAVJbG9zYwUAAAADbmlsCQAAAgAAAAECAAAAH1RlaiB3YWx1dHkgbmllIG1vemVzeiB3eW1pZW5pxIcAAAAAMzCkIw==", "height": 1348270, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4uLPkEcfKPe3SbkXmpLdYvJ37qCBebc1LiBkSzQKCtk3 Next: 5Yig5VXrpuaK8d1KVusLmPidTxhLpkvoXvdNeL6gwovL Diff:
Old | New | Differences | |
---|---|---|---|
30 | 30 | let waluta = i.payments[0].assetId | |
31 | 31 | let poodjeciuoplaty = fraction(Ilosc, 97, 100) | |
32 | 32 | if ((waluta == szczepan)) | |
33 | - | then [Reissue(szczepan2, Ilosc, true), ScriptTransfer(konto, | |
33 | + | then [Reissue(szczepan2, Ilosc, true), ScriptTransfer(konto, poodjeciuoplaty, szczepan2), Burn(szczepan, Ilosc)] | |
34 | 34 | else if ((waluta == szczepan2)) | |
35 | - | then [Reissue(szczepan, Ilosc, true), ScriptTransfer(konto, | |
35 | + | then [Reissue(szczepan, Ilosc, true), ScriptTransfer(konto, poodjeciuoplaty, szczepan), Burn(szczepan2, Ilosc)] | |
36 | 36 | else throw("Tej waluty nie mozesz wymienić") | |
37 | 37 | } | |
38 | 38 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let szczepan = fromBase58String("GoJ7x4boYrFMcnffZ2kip4mgGsFy4KyZryG9jooLtGXo") | |
5 | 5 | ||
6 | 6 | let szczepan2 = fromBase58String("9y4n4nqcRUQVLiaPGVezxB6CWbPHB627L9pZ7GSaaZzu") | |
7 | 7 | ||
8 | 8 | @Callable(i) | |
9 | 9 | func Zrobprzelew () = { | |
10 | 10 | let konto = i.caller | |
11 | 11 | let Ilosc = i.payments[0].amount | |
12 | 12 | let waluta = i.payments[0].assetId | |
13 | 13 | let denominowanilosc = fraction(Ilosc, 1, 1000000) | |
14 | 14 | let poodjeciuoplaty = fraction(denominowanilosc, 97, 100) | |
15 | 15 | let denominowaniloscodwrotna = fraction(Ilosc, 1000000, 1) | |
16 | 16 | let poodjeciuoplaty2 = fraction(denominowaniloscodwrotna, 97, 100) | |
17 | 17 | if ((waluta == unit)) | |
18 | 18 | then [ScriptTransfer(konto, poodjeciuoplaty, szczepan)] | |
19 | 19 | else if ((waluta == szczepan)) | |
20 | 20 | then [ScriptTransfer(konto, poodjeciuoplaty2, unit)] | |
21 | 21 | else throw("Tej waluty nie możesz wymienić") | |
22 | 22 | } | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | ||
26 | 26 | @Callable(i) | |
27 | 27 | func SzczepanNAszczepan () = { | |
28 | 28 | let konto = i.caller | |
29 | 29 | let Ilosc = i.payments[0].amount | |
30 | 30 | let waluta = i.payments[0].assetId | |
31 | 31 | let poodjeciuoplaty = fraction(Ilosc, 97, 100) | |
32 | 32 | if ((waluta == szczepan)) | |
33 | - | then [Reissue(szczepan2, Ilosc, true), ScriptTransfer(konto, | |
33 | + | then [Reissue(szczepan2, Ilosc, true), ScriptTransfer(konto, poodjeciuoplaty, szczepan2), Burn(szczepan, Ilosc)] | |
34 | 34 | else if ((waluta == szczepan2)) | |
35 | - | then [Reissue(szczepan, Ilosc, true), ScriptTransfer(konto, | |
35 | + | then [Reissue(szczepan, Ilosc, true), ScriptTransfer(konto, poodjeciuoplaty, szczepan), Burn(szczepan2, Ilosc)] | |
36 | 36 | else throw("Tej waluty nie mozesz wymienić") | |
37 | 37 | } | |
38 | 38 | ||
39 | 39 |
github/deemru/w8io/169f3d6 25.58 ms ◑