tx · 8AbjGkMT3aGBy3fykVjNmDr2uceHNgPxcw718pSpSUMw

3MuLm2aryXqGdLMfJ8EaiJm4fJKE9cPNo9j:  -0.01400000 Waves

2021.02.01 15:49 [1379122] smart account 3MuLm2aryXqGdLMfJ8EaiJm4fJKE9cPNo9j > SELF 0.00000000 Waves

{ "type": 13, "id": "8AbjGkMT3aGBy3fykVjNmDr2uceHNgPxcw718pSpSUMw", "fee": 1400000, "feeAssetId": null, "timestamp": 1612183793431, "version": 2, "chainId": 84, "sender": "3MuLm2aryXqGdLMfJ8EaiJm4fJKE9cPNo9j", "senderPublicKey": "6dYGFWDpwyYTmng6PpHaJacEwPbHGUgJYqKfFLajJmYu", "proofs": [ "3JH1A2DydUhbnckLijAepg5U9Mka9cTLNt36UK8A4y1hRJKcJ5SubbfEvaj8zwBqHTEcPXH5gjh3XFdNfyC5smZi" ], "script": "base64:AAIEAAAAAAAAAAsIAhIDCgEBEgASAAAAAAMBAAAACGdldFByaWNlAAAAAAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzAgAAAAxXYXZlc1BlckJ0ZmMDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAgEAAAAKYWNjZXB0QnRmYwAAAAIAAAADc3VtAAAAAWUDCQEAAAACIT0AAAACCAUAAAABZQAAAAdhc3NldElkAQAAACAVFYKGWi06B6BeyVk22H0zzyGZ+Y7DmBuJ2ZJxUy/RIwkAAAIAAAABAgAAACRXQVZFUzwtPkJURkMgU3dhcCBhY2NlcHRzIG9ubHkgV0FWRVMJAABkAAAAAgUAAAADc3VtCAUAAAABZQAAAAZhbW91bnQBAAAAC2FjY2VwdFdhdmVzAAAAAgAAAANzdW0AAAABZQMJAQAAAAlpc0RlZmluZWQAAAABCAUAAAABZQAAAAdhc3NldElkCQAAAgAAAAECAAAAI0JURkM8LT5XQVZFUyBTd2FwIGFjY2VwdHMgb25seSBCVEZDCQ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AAAAZjYWxsZXIAAAAFYnl0ZXMJAABpAAAAAgUAAAADc3VtCQEAAAAIZ2V0UHJpY2UAAAAAAQAAACAVFYKGWi06B6BeyVk22H0zzyGZ+Y7DmBuJ2ZJxUy/RIwUAAAADbmlsAAAAAIB+XbI=", "height": 1379122, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: JC5CEMjSoU6QAsNtixzvuPZEuA6nDciduHV3x5TGHpVZ Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 4 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+func a () = {
5+ let b = getInteger(this, "WavesPerBtfc")
6+ if ($isInstanceOf(b, "Int"))
7+ then {
8+ let c = b
9+ c
10+ }
11+ else 2
12+ }
13+
14+
15+func d (e,f) = if ((f.assetId != base58'2RJawE14PWhu2XYg1zsmDM46K595DdA2QQHXg9avsrTU'))
16+ then throw("WAVES<->BTFC Swap accepts only WAVES")
17+ else (e + f.amount)
18+
19+
20+func g (e,f) = if (isDefined(f.assetId))
21+ then throw("BTFC<->WAVES Swap accepts only BTFC")
22+ else (e + f.amount)
23+
24+
25+@Callable(h)
26+func setPrice (i) = if ((Address(h.caller.bytes) != this))
27+ then throw("Non-administrators cannot set price")
28+ else [IntegerEntry("WavesPerBtfc", i)]
29+
30+
31+
32+@Callable(h)
33+func FromBtfcToWaves () = {
34+ let e = {
35+ let j = h.payments
36+ let k = size(j)
37+ let l = 0
38+ if ((k == 0))
39+ then l
40+ else {
41+ let m = d(l, j[0])
42+ if ((k == 1))
43+ then m
44+ else {
45+ let n = d(m, j[1])
46+ if ((k == 2))
47+ then n
48+ else {
49+ let o = d(n, j[2])
50+ throw("List size exceed 2")
51+ }
52+ }
53+ }
54+ }
55+[ScriptTransfer(Address(h.caller.bytes), (e * a()), Unit())]
56+ }
57+
58+
59+
60+@Callable(h)
61+func FromWavesToBtfc () = {
62+ let e = {
63+ let p = h.payments
64+ let q = size(p)
65+ let r = 0
66+ if ((q == 0))
67+ then r
68+ else {
69+ let s = g(r, p[0])
70+ if ((q == 1))
71+ then s
72+ else {
73+ let t = g(s, p[1])
74+ if ((q == 2))
75+ then t
76+ else {
77+ let u = g(t, p[2])
78+ throw("List size exceed 2")
79+ }
80+ }
81+ }
82+ }
83+[ScriptTransfer(Address(h.caller.bytes), (e / a()), base58'2RJawE14PWhu2XYg1zsmDM46K595DdA2QQHXg9avsrTU')]
84+ }
85+
86+

github/deemru/w8io/169f3d6 
59.28 ms