tx · nyCXdJe5uWsQ39Kwqdry5Uqc1jLVhqKRGEnFtx19rtm

3N4ngEpA29qJdUKnRto5zUzXvJJLwUuNs5J:  -0.01400000 Waves

2021.10.25 00:10 [1760918] smart account 3N4ngEpA29qJdUKnRto5zUzXvJJLwUuNs5J > SELF 0.00000000 Waves

{ "type": 13, "id": "nyCXdJe5uWsQ39Kwqdry5Uqc1jLVhqKRGEnFtx19rtm", "fee": 1400000, "feeAssetId": null, "timestamp": 1635109805868, "version": 1, "sender": "3N4ngEpA29qJdUKnRto5zUzXvJJLwUuNs5J", "senderPublicKey": "B7ayemTreAJnAMuzH9P3MnVXhpL6PTtRBrV29h7EUS1H", "proofs": [ "2TETyQxZLpK6Y2tzNa1tJQ99tyDv4d6eh3srNQfStsMV3FTbnm3nZfYmcXn6kyvmbxx7NqR1HQRotNopN67grxtZ" ], "script": "base64:AAIFAAAAAAAAAB0IAhIFCgMICAESBAoCCAQSAwoBARIDCgEBEgASAAAAAAoAAAAADlNXT1Bnb3Zlcm5hbmNlCQAEJgAAAAEJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQdAAAAAgUAAAAEdGhpcwIAAAAPU1dPUF9nb3Zlcm5hbmNlAgAAACFFbXB0eSBrZXkgU1dPUF9nb3Zlcm5hbmNlX2FkZHJlc3MAAAAADVdhdmVzVXNkblBvb2wJAAQmAAAAAQkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABB0AAAACBQAAAAR0aGlzAgAAAA9XQVZFU19VU0ROX1Bvb2wCAAAAIUVtcHR5IGtleSBTV09QX2dvdmVybmFuY2VfYWRkcmVzcwAAAAAXZGVmaWhlbHBlck1hbmFnZXJQdWJLZXkJAAJZAAAAAQkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABB0AAAACBQAAAAR0aGlzAgAAABlkZWZpaGVscGVyX21hbmFnZXJfUHViS2V5AgAAACNFbXB0eSBrZXkgZGVmaWhlbHBlcl9tYW5hZ2VyX1B1YktleQAAAAAMYWRtaW5Q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ADGFkbWluUHViS2V5MgkABEwAAAACBQAAAAxhZG1pblB1YktleTMJAARMAAAAAgUAAAAXZGVmaWhlbHBlck1hbmFnZXJQdWJLZXkFAAAAA25pbAgFAAAAAWkAAAAPY2FsbGVyUHVibGljS2V5CQAAAgAAAAECAAAAIU9ubHkgYWRtaW4gY2FuIGNhbGwgdGhpcyBmdW5jdGlvbgkABEwAAAACCQEAAAAMQm9vbGVhbkVudHJ5AAAAAgIAAAAQaXNQcm90b2NvbEFjdGl2ZQcFAAAAA25pbAAAAAD/zCLL", "chainId": 84, "height": 1760918, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HRqTUWjfodSomdSZri9TyUbBLaeHKub3TKdGGxBNdAiv Next: FybcMDhK3CAF2ufBimTQuFdVvjTce5RypKofSsc6xDkU Diff:
OldNewDifferences
9393 else {
9494 let k = toString(p.caller)
9595 let l = j(k)
96-[IntegerEntry(k, (l + y))]
96+[IntegerEntry((k + g), (l + y))]
9797 }
9898 }
9999
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = addressFromString(valueOrElse(getString(this, "SWOP_governance"), "Empty key SWOP_governance_address"))
55
66 let b = addressFromString(valueOrElse(getString(this, "WAVES_USDN_Pool"), "Empty key SWOP_governance_address"))
77
88 let c = fromBase58String(valueOrElse(getString(this, "defihelper_manager_PubKey"), "Empty key defihelper_manager_PubKey"))
99
1010 let d = base58'Aqj7onZFvn779uRCiW2zCmXG1RKsGeA6k3SWXmH7s5Lv'
1111
1212 let e = base58'Aqj7onZFvn779uRCiW2zCmXG1RKsGeA6k3SWXmH7s5Lv'
1313
1414 let f = base58'Aqj7onZFvn779uRCiW2zCmXG1RKsGeA6k3SWXmH7s5Lv'
1515
1616 let g = "_balance"
1717
1818 let h = "fee_in_usdn"
1919
2020 let i = valueOrErrorMessage(getBoolean(this, "isProtocolActive"), "Empty key isProtocolActive")
2121
2222 func j (k) = {
2323 let l = {
2424 let m = getInteger(this, (k + g))
2525 if ($isInstanceOf(m, "Int"))
2626 then {
2727 let n = m
2828 n
2929 }
3030 else if ($isInstanceOf(m, "Unit"))
3131 then {
3232 let o = m
3333 0
3434 }
3535 else throw("Match error")
3636 }
3737 l
3838 }
3939
4040
4141 @Callable(p)
4242 func init (c,b,q) = if (if (isDefined(getString(this, "WAVES_USDN_Pool")))
4343 then true
4444 else isDefined(getString(this, "defihelper_manager_PubKey")))
4545 then throw("Already initialized")
4646 else [StringEntry("defihelper_manager_PubKey", c), StringEntry("WAVES_USDN_Pool", b), IntegerEntry("fee_in_usdn", q), BooleanEntry("isProtocolActive", true)]
4747
4848
4949
5050 @Callable(p)
5151 func updateAutomateStatus (r,s) = if (!(i))
5252 then throw("Protol stopped by admin")
5353 else if (!(containsElement([c], p.callerPublicKey)))
5454 then throw("Only admin can call this function")
5555 else [BooleanEntry(r, s)]
5656
5757
5858
5959 @Callable(p)
6060 func updateProtocolFee (q) = if (!(i))
6161 then throw("Protol stopped by admin")
6262 else if (!(containsElement([c], p.callerPublicKey)))
6363 then throw("Only admin can call this function")
6464 else [IntegerEntry("protocol_fee_in_usdn", q)]
6565
6666
6767
6868 @Callable(p)
6969 func updateBalance (t) = if (!(i))
7070 then throw("Protol stopped by admin")
7171 else {
7272 let u = toString(p.caller)
7373 let v = valueOrErrorMessage(getBoolean(this, u), ("Empty key newUser: " + u))
7474 if (!(v))
7575 then throw("This automate is inactive")
7676 else {
7777 let w = valueOrErrorMessage(getInteger(this, (u + g)), (("Empty key automateAddrStr + keyBalance: " + u) + g))
7878 [IntegerEntry(u, (w - t))]
7979 }
8080 }
8181
8282
8383
8484 @Callable(p)
8585 func replanishBalance () = if (!(i))
8686 then throw("Protol stopped by admin")
8787 else {
8888 let x = $Tuple2(p.payments[0].amount, p.payments[0].assetId)
8989 let y = x._1
9090 let z = x._2
9191 if ((z != unit))
9292 then throw("Only WAVES available for replanishment")
9393 else {
9494 let k = toString(p.caller)
9595 let l = j(k)
96-[IntegerEntry(k, (l + y))]
96+[IntegerEntry((k + g), (l + y))]
9797 }
9898 }
9999
100100
101101
102102 @Callable(p)
103103 func shutdown () = if (!(i))
104104 then throw("Protol stopped by admin")
105105 else if (!(containsElement([d, e, f, c], p.callerPublicKey)))
106106 then throw("Only admin can call this function")
107107 else [BooleanEntry("isProtocolActive", false)]
108108
109109

github/deemru/w8io/169f3d6 
30.44 ms