tx · 7JnAePqosyBdavJ3nRzTex86ioSRxQcDzJ5QrhEvkoFq

3NBfxBLtbc3Mid6i4UThXm9botCHzhRgeoj:  -0.01400000 Waves

2022.07.15 01:58 [2140033] smart account 3NBfxBLtbc3Mid6i4UThXm9botCHzhRgeoj > SELF 0.00000000 Waves

{ "type": 13, "id": "7JnAePqosyBdavJ3nRzTex86ioSRxQcDzJ5QrhEvkoFq", "fee": 1400000, "feeAssetId": null, "timestamp": 1657839504501, "version": 1, "sender": "3NBfxBLtbc3Mid6i4UThXm9botCHzhRgeoj", "senderPublicKey": "CH1mtqhtgETnmks43cvbHyEbTGCV7fifpkdhFD6dDRCU", "proofs": [ "4tcXNBmXduUF6itc7GU2xTuq4xCLBx5gMN7xjbUuqVzprr7qfzgFCA5oN95JpsitB97fKEht6AcKLZcY6m5HQPuL" ], "script": "base64:AAIFAAAAAAAAAA0IAhIAEgASABIDCgEBAAAACQAAAAAGbnNidElkAQAAACBV7sO+qgvwUOhxyBuqbnCepLHI/kouucHxzMVrD3iXSwAAAAAHc25zYnRJZAEAAAAgdfaQ6PokFDUvtacC3xkI3XyRnV2+gxjMFR5nLUSnXq0AAAAABnVzZG5JZAEAAAAgtiYpwwT1zlORpA5LdSQvZIxRsfrfr1QpvUjSHSqyqtEAAAAACWlzU3RvcHBlZAcAAAAAB1N3YXBGZWUAAAAAAAAAADIBAAAADWdldEFzc2V0Qnl0ZXMAAAABAAAACmFzc2V0SWRTdHIDCQAAAAAAAAIFAAAACmFzc2V0SWRTdHICAAAABVdBVkVTBQAAAAR1bml0CQACWQAAAAEFAAAACmFzc2V0SWRTdHIBAAAADXRyeUdldEludGVnZXIAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYgUAAAAHJG1hdGNoMAUAAAABYgAAAAAAAAAAAAEAAAAMdHJ5R2V0U3RyaW5nAAAAAQAAAANrZXk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8JAAQlAAAAAQgFAAAAAWkAAAAGY2FsbGVyCQAAZAAAAAIJAQAAAA10cnlHZXRJbnRlZ2VyAAAAAQkAASwAAAACAgAAAAtzd2FwMF91c2VyXwkABCUAAAABCAUAAAABaQAAAAZjYWxsZXIFAAAACXBtdEFtb3VudAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAATc3dhcDBfdXNkbkNvbGxlY3RlZAkAAGQAAAACBQAAAA11c2RuQ29sbGVjdGVkBQAAAAlwbXRBbW91bnQFAAAAA25pbAAAAAFpAQAAAApyZWRlZW1Vc2RuAAAAAAUAAAADbmlsAAAAAWkBAAAAE3NldEFyYml0cmFnZVByb2ZpdHMAAAABAAAAA3ZhbAMJAQAAAAIhPQAAAAIIBQAAAAFpAAAABmNhbGxlcgUAAAAEdGhpcwkAAAIAAAABAgAAAAphZG1pbiBvbmx5BAAAAAxwcmV2SW50ZXJlc3QEAAAAByRtYXRjaDAJAAQfAAAAAQIAAAAOc3dhcHNfaW50ZXJlc3QDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABdAUAAAAHJG1hdGNoMAUAAAABdAAAAAAAAAAnEAQAAAALbmV3SW50ZXJlc3QJAABrAAAAAwUAAAAMcHJldkludGVyZXN0CQAAZAAAAAIAAAAAAAAAJxAFAAAAA3ZhbAAAAAAAAAAnEAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAAMc3dhcHNfcHJvZml0BQAAAAN2YWwFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V58ALWQA==", "chainId": 84, "height": 2140033, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 5 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let a = base58'6nSpVyNH7yM69eg446wrQR94ipbbcmZMU1ENPwanC97g'
5+
6+let b = base58'8wUmN9Y15f3JR4KZfE81XLXpkdgwnqoBNG6NmocZpKQx'
7+
8+let c = base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p'
9+
10+let d = false
11+
12+let e = 50
13+
14+func f (g) = if ((g == "WAVES"))
15+ then unit
16+ else fromBase58String(g)
17+
18+
19+func h (i) = {
20+ let j = getInteger(this, i)
21+ if ($isInstanceOf(j, "Int"))
22+ then {
23+ let k = j
24+ k
25+ }
26+ else 0
27+ }
28+
29+
30+func l (i) = {
31+ let j = getString(this, i)
32+ if ($isInstanceOf(j, "String"))
33+ then {
34+ let k = j
35+ k
36+ }
37+ else ""
38+ }
39+
40+
41+func m (n) = {
42+ let j = n
43+ if ($isInstanceOf(j, "(Int, Int, Int, Int, Int)"))
44+ then {
45+ let o = j
46+ o
47+ }
48+ else throw("fail to cast into Int")
49+ }
50+
51+
52+@Callable(p)
53+func stakeNSBT () = {
54+ let q = value(p.payments[0])
55+ let r = q.amount
56+ if ((q.assetId != a))
57+ then throw("attach NSBT token only")
58+ else if (d)
59+ then throw("smart contract is on lock")
60+ else {
61+ let s = invoke(Address(base58'3P8w8NXZUtYdCA13tHbDY5sW4mC27ZFJgG3'), "stake", nil, [q])
62+ if ((s == s))
63+ then {
64+ let t = Reissue(b, r, true)
65+[t, ScriptTransfer(p.caller, r, b)]
66+ }
67+ else throw("Strict value is not equal to itself.")
68+ }
69+ }
70+
71+
72+
73+@Callable(p)
74+func addUsdnForArbitrage () = if ((p.payments[0].assetId != c))
75+ then throw("you need to attach usdn payment")
76+ else {
77+ let u = m(invoke(Address(base58'3PC9BfRwJWWiw9AREE2B3eWzCks3CYtg4yo'), "swapParamsByUserSYSREADONLY", [toString(this), 0], nil))
78+ let v = u._1
79+ let w = u._2
80+ let x = p.payments[0].amount
81+ let y = h("swap0_usdnCollected")
82+ let z = (337000000000 - y)
83+ if ((500000000 > x))
84+ then throw("min amount to be added is 500 USDN")
85+ else [IntegerEntry(("swap0_user_" + toString(p.caller)), (h(("swap0_user_" + toString(p.caller))) + x)), IntegerEntry("swap0_usdnCollected", (y + x))]
86+ }
87+
88+
89+
90+@Callable(p)
91+func redeemUsdn () = nil
92+
93+
94+
95+@Callable(p)
96+func setArbitrageProfits (n) = if ((p.caller != this))
97+ then throw("admin only")
98+ else {
99+ let A = {
100+ let j = getInteger("swaps_interest")
101+ if ($isInstanceOf(j, "Int"))
102+ then {
103+ let B = j
104+ B
105+ }
106+ else 10000
107+ }
108+ let C = fraction(A, (10000 + n), 10000)
109+[IntegerEntry("swaps_profit", n)]
110+ }
111+
112+
113+@Verifier(D)
114+func E () = sigVerify(D.bodyBytes, D.proofs[0], D.senderPublicKey)
115+

github/deemru/w8io/026f985 
18.32 ms