tx · JC5CEMjSoU6QAsNtixzvuPZEuA6nDciduHV3x5TGHpVZ

3MuLm2aryXqGdLMfJ8EaiJm4fJKE9cPNo9j:  -0.01400000 Waves

2021.02.01 17:55 [1379254] smart account 3MuLm2aryXqGdLMfJ8EaiJm4fJKE9cPNo9j > SELF 0.00000000 Waves

{ "type": 13, "id": "JC5CEMjSoU6QAsNtixzvuPZEuA6nDciduHV3x5TGHpVZ", "fee": 1400000, "feeAssetId": null, "timestamp": 1612191387503, "version": 2, "chainId": 84, "sender": "3MuLm2aryXqGdLMfJ8EaiJm4fJKE9cPNo9j", "senderPublicKey": "6dYGFWDpwyYTmng6PpHaJacEwPbHGUgJYqKfFLajJmYu", "proofs": [ "5CYcsDmGaxkJEY4LdHYDxigc9KERkbUJNX2fqKxCUwUh5o5JhrHnJ8mzwtBZzj1h2hte7gNB3YtnaTSi2rZfamJz" ], "script": "base64:AAIEAAAAAAAAAAsIAhIDCgEBEgASAAAAAAMBAAAACGdldFByaWNlAAAAAAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzAgAAAAxXYXZlc1BlckJ0ZmMDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAyAEAAAAKYWNjZXB0QnRmYwAAAAIAAAADc3VtAAAAAWUDCQEAAAACIT0AAAACCAUAAAABZQAAAAdhc3NldElkAQAAACAVFYKGWi06B6BeyVk22H0zzyGZ+Y7DmBuJ2ZJxUy/RIwkAAAIAAAABAgAAACRXQVZFUzwtPkJURkMgU3dhcCBhY2NlcHRzIG9ubHkgV0FWRVMJAABkAAAAAgUAAAADc3VtCAUAAAABZQAAAAZhbW91bnQBAAAAC2FjY2VwdFdhdmVzAAAAAgAAAANzdW0AAAABZQMJAQAAAAlpc0RlZmluZWQAAAABCAUAAAABZQAAAAdhc3NldElkCQAAAgAAAAECAAAAI0JURkM8LT5XQVZFUyBTd2FwIGFjY2VwdHMgb25seSBC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gIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwkAAGkAAAACCQAAaAAAAAIFAAAAA3N1bQAAAAAAAAAAZAkBAAAACGdldFByaWNlAAAAAAEAAAAgFRWChlotOgegXslZNth9M88hmfmOw5gbidmScVMv0SMFAAAAA25pbAAAAACQCJ4/", "height": 1379254, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8AbjGkMT3aGBy3fykVjNmDr2uceHNgPxcw718pSpSUMw Next: none Diff:
OldNewDifferences
55 case a: Int =>
66 a
77 case _ =>
8- 2
8+ 200
99 }
1010
1111
2929 @Callable(i)
3030 func FromBtfcToWaves () = {
3131 let sum = {
32- let $list765799 = i.payments
33- let $size765799 = size($list765799)
34- let $acc0765799 = 0
35- if (($size765799 == 0))
36- then $acc0765799
32+ let $list767801 = i.payments
33+ let $size767801 = size($list767801)
34+ let $acc0767801 = 0
35+ if (($size767801 == 0))
36+ then $acc0767801
3737 else {
38- let $acc1765799 = acceptBtfc($acc0765799, $list765799[0])
39- if (($size765799 == 1))
40- then $acc1765799
38+ let $acc1767801 = acceptBtfc($acc0767801, $list767801[0])
39+ if (($size767801 == 1))
40+ then $acc1767801
4141 else {
42- let $acc2765799 = acceptBtfc($acc1765799, $list765799[1])
43- if (($size765799 == 2))
44- then $acc2765799
42+ let $acc2767801 = acceptBtfc($acc1767801, $list767801[1])
43+ if (($size767801 == 2))
44+ then $acc2767801
4545 else {
46- let $acc3765799 = acceptBtfc($acc2765799, $list765799[2])
46+ let $acc3767801 = acceptBtfc($acc2767801, $list767801[2])
4747 throw("List size exceed 2")
4848 }
4949 }
5050 }
5151 }
52-[ScriptTransfer(Address(i.caller.bytes), (sum * getPrice()), Unit())]
52+[ScriptTransfer(Address(i.caller.bytes), ((sum * getPrice()) / 100), Unit())]
5353 }
5454
5555
5757 @Callable(i)
5858 func FromWavesToBtfc () = {
5959 let sum = {
60- let $list924959 = i.payments
61- let $size924959 = size($list924959)
62- let $acc0924959 = 0
63- if (($size924959 == 0))
64- then $acc0924959
60+ let $list932967 = i.payments
61+ let $size932967 = size($list932967)
62+ let $acc0932967 = 0
63+ if (($size932967 == 0))
64+ then $acc0932967
6565 else {
66- let $acc1924959 = acceptWaves($acc0924959, $list924959[0])
67- if (($size924959 == 1))
68- then $acc1924959
66+ let $acc1932967 = acceptWaves($acc0932967, $list932967[0])
67+ if (($size932967 == 1))
68+ then $acc1932967
6969 else {
70- let $acc2924959 = acceptWaves($acc1924959, $list924959[1])
71- if (($size924959 == 2))
72- then $acc2924959
70+ let $acc2932967 = acceptWaves($acc1932967, $list932967[1])
71+ if (($size932967 == 2))
72+ then $acc2932967
7373 else {
74- let $acc3924959 = acceptWaves($acc2924959, $list924959[2])
74+ let $acc3932967 = acceptWaves($acc2932967, $list932967[2])
7575 throw("List size exceed 2")
7676 }
7777 }
7878 }
7979 }
80-[ScriptTransfer(Address(i.caller.bytes), (sum / getPrice()), base58'2RJawE14PWhu2XYg1zsmDM46K595DdA2QQHXg9avsrTU')]
80+[ScriptTransfer(Address(i.caller.bytes), ((sum * 100) / getPrice()), base58'2RJawE14PWhu2XYg1zsmDM46K595DdA2QQHXg9avsrTU')]
8181 }
8282
8383
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func getPrice () = match getInteger(this, "WavesPerBtfc") {
55 case a: Int =>
66 a
77 case _ =>
8- 2
8+ 200
99 }
1010
1111
1212 func acceptBtfc (sum,e) = if ((e.assetId != base58'2RJawE14PWhu2XYg1zsmDM46K595DdA2QQHXg9avsrTU'))
1313 then throw("WAVES<->BTFC Swap accepts only WAVES")
1414 else (sum + e.amount)
1515
1616
1717 func acceptWaves (sum,e) = if (isDefined(e.assetId))
1818 then throw("BTFC<->WAVES Swap accepts only BTFC")
1919 else (sum + e.amount)
2020
2121
2222 @Callable(i)
2323 func setPrice (price) = if ((Address(i.caller.bytes) != this))
2424 then throw("Non-administrators cannot set price")
2525 else [IntegerEntry("WavesPerBtfc", price)]
2626
2727
2828
2929 @Callable(i)
3030 func FromBtfcToWaves () = {
3131 let sum = {
32- let $list765799 = i.payments
33- let $size765799 = size($list765799)
34- let $acc0765799 = 0
35- if (($size765799 == 0))
36- then $acc0765799
32+ let $list767801 = i.payments
33+ let $size767801 = size($list767801)
34+ let $acc0767801 = 0
35+ if (($size767801 == 0))
36+ then $acc0767801
3737 else {
38- let $acc1765799 = acceptBtfc($acc0765799, $list765799[0])
39- if (($size765799 == 1))
40- then $acc1765799
38+ let $acc1767801 = acceptBtfc($acc0767801, $list767801[0])
39+ if (($size767801 == 1))
40+ then $acc1767801
4141 else {
42- let $acc2765799 = acceptBtfc($acc1765799, $list765799[1])
43- if (($size765799 == 2))
44- then $acc2765799
42+ let $acc2767801 = acceptBtfc($acc1767801, $list767801[1])
43+ if (($size767801 == 2))
44+ then $acc2767801
4545 else {
46- let $acc3765799 = acceptBtfc($acc2765799, $list765799[2])
46+ let $acc3767801 = acceptBtfc($acc2767801, $list767801[2])
4747 throw("List size exceed 2")
4848 }
4949 }
5050 }
5151 }
52-[ScriptTransfer(Address(i.caller.bytes), (sum * getPrice()), Unit())]
52+[ScriptTransfer(Address(i.caller.bytes), ((sum * getPrice()) / 100), Unit())]
5353 }
5454
5555
5656
5757 @Callable(i)
5858 func FromWavesToBtfc () = {
5959 let sum = {
60- let $list924959 = i.payments
61- let $size924959 = size($list924959)
62- let $acc0924959 = 0
63- if (($size924959 == 0))
64- then $acc0924959
60+ let $list932967 = i.payments
61+ let $size932967 = size($list932967)
62+ let $acc0932967 = 0
63+ if (($size932967 == 0))
64+ then $acc0932967
6565 else {
66- let $acc1924959 = acceptWaves($acc0924959, $list924959[0])
67- if (($size924959 == 1))
68- then $acc1924959
66+ let $acc1932967 = acceptWaves($acc0932967, $list932967[0])
67+ if (($size932967 == 1))
68+ then $acc1932967
6969 else {
70- let $acc2924959 = acceptWaves($acc1924959, $list924959[1])
71- if (($size924959 == 2))
72- then $acc2924959
70+ let $acc2932967 = acceptWaves($acc1932967, $list932967[1])
71+ if (($size932967 == 2))
72+ then $acc2932967
7373 else {
74- let $acc3924959 = acceptWaves($acc2924959, $list924959[2])
74+ let $acc3932967 = acceptWaves($acc2932967, $list932967[2])
7575 throw("List size exceed 2")
7676 }
7777 }
7878 }
7979 }
80-[ScriptTransfer(Address(i.caller.bytes), (sum / getPrice()), base58'2RJawE14PWhu2XYg1zsmDM46K595DdA2QQHXg9avsrTU')]
80+[ScriptTransfer(Address(i.caller.bytes), ((sum * 100) / getPrice()), base58'2RJawE14PWhu2XYg1zsmDM46K595DdA2QQHXg9avsrTU')]
8181 }
8282
8383

github/deemru/w8io/169f3d6 
40.48 ms