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
88 let c = b
99 c
1010 }
11- else 2
11+ else 200
1212 }
1313
1414
5252 }
5353 }
5454 }
55-[ScriptTransfer(Address(h.caller.bytes), (e * a()), Unit())]
55+[ScriptTransfer(Address(h.caller.bytes), ((e * a()) / 100), Unit())]
5656 }
5757
5858
8080 }
8181 }
8282 }
83-[ScriptTransfer(Address(h.caller.bytes), (e / a()), base58'2RJawE14PWhu2XYg1zsmDM46K595DdA2QQHXg9avsrTU')]
83+[ScriptTransfer(Address(h.caller.bytes), ((e * 100) / a()), base58'2RJawE14PWhu2XYg1zsmDM46K595DdA2QQHXg9avsrTU')]
8484 }
8585
8686
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func a () = {
55 let b = getInteger(this, "WavesPerBtfc")
66 if ($isInstanceOf(b, "Int"))
77 then {
88 let c = b
99 c
1010 }
11- else 2
11+ else 200
1212 }
1313
1414
1515 func d (e,f) = if ((f.assetId != base58'2RJawE14PWhu2XYg1zsmDM46K595DdA2QQHXg9avsrTU'))
1616 then throw("WAVES<->BTFC Swap accepts only WAVES")
1717 else (e + f.amount)
1818
1919
2020 func g (e,f) = if (isDefined(f.assetId))
2121 then throw("BTFC<->WAVES Swap accepts only BTFC")
2222 else (e + f.amount)
2323
2424
2525 @Callable(h)
2626 func setPrice (i) = if ((Address(h.caller.bytes) != this))
2727 then throw("Non-administrators cannot set price")
2828 else [IntegerEntry("WavesPerBtfc", i)]
2929
3030
3131
3232 @Callable(h)
3333 func FromBtfcToWaves () = {
3434 let e = {
3535 let j = h.payments
3636 let k = size(j)
3737 let l = 0
3838 if ((k == 0))
3939 then l
4040 else {
4141 let m = d(l, j[0])
4242 if ((k == 1))
4343 then m
4444 else {
4545 let n = d(m, j[1])
4646 if ((k == 2))
4747 then n
4848 else {
4949 let o = d(n, j[2])
5050 throw("List size exceed 2")
5151 }
5252 }
5353 }
5454 }
55-[ScriptTransfer(Address(h.caller.bytes), (e * a()), Unit())]
55+[ScriptTransfer(Address(h.caller.bytes), ((e * a()) / 100), Unit())]
5656 }
5757
5858
5959
6060 @Callable(h)
6161 func FromWavesToBtfc () = {
6262 let e = {
6363 let p = h.payments
6464 let q = size(p)
6565 let r = 0
6666 if ((q == 0))
6767 then r
6868 else {
6969 let s = g(r, p[0])
7070 if ((q == 1))
7171 then s
7272 else {
7373 let t = g(s, p[1])
7474 if ((q == 2))
7575 then t
7676 else {
7777 let u = g(t, p[2])
7878 throw("List size exceed 2")
7979 }
8080 }
8181 }
8282 }
83-[ScriptTransfer(Address(h.caller.bytes), (e / a()), base58'2RJawE14PWhu2XYg1zsmDM46K595DdA2QQHXg9avsrTU')]
83+[ScriptTransfer(Address(h.caller.bytes), ((e * 100) / a()), base58'2RJawE14PWhu2XYg1zsmDM46K595DdA2QQHXg9avsrTU')]
8484 }
8585
8686

github/deemru/w8io/169f3d6 
35.17 ms