tx · EHC3VSYvGRSYeXGNHp2d46FYsRSLozvb4U4SAfQ2dz6i

3N7hBLNCFEhtWwSWkk7Pbd5qoCdYhABdAPg:  -0.01000000 Waves

2021.07.19 21:45 [1620874] smart account 3N7hBLNCFEhtWwSWkk7Pbd5qoCdYhABdAPg > SELF 0.00000000 Waves

{ "type": 13, "id": "EHC3VSYvGRSYeXGNHp2d46FYsRSLozvb4U4SAfQ2dz6i", "fee": 1000000, "feeAssetId": null, "timestamp": 1626720373167, "version": 2, "chainId": 84, "sender": "3N7hBLNCFEhtWwSWkk7Pbd5qoCdYhABdAPg", "senderPublicKey": "3dgMH7dCr1W2HyMSf2t3ZvDFstt6YnTvHtvZKUt6Cwgx", "proofs": [ "3JJYiDSviySe71zq4sN3TVHG8SysAJ9xehCSNmAi1S5RWaw3RLf7Qfrp8okje7Bc5zw9WMg9ERVs746S2skJXeCs" ], "script": "base64:AAIDAAAAAAAAAAYIARIAEgAAAAAAAAAAAgAAAAFpAQAAAA5XYXZlc1N3YXBUb2tlbgAAAAAEAAAACmN1cnJlbnRLZXkJAAEsAAAAAgIAAAANdG90YWxEZXBvc2l0XwkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAAlzd2FwVG9rZW4BAAAAIOcOzrhZ7nmACRz71uIBzDdZQS4CHzCdrSwGyoWA1CnEBAAAAANwbXQJAQAAAAdleHRyYWN0AAAAAQgFAAAAAWkAAAAHcGF5bWVudAQAAAAGYW1vdW50CAUAAAADcG10AAAABmFtb3VudAQAAAANY3VycmVudEFtb3VudAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAApjdXJyZW50S2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAEAAAACW5ld0Ftb3VudAkAAGQAAAACBQAAAA1jdXJyZW50QW1vdW50CAUAAAADcG10AAAABmFtb3VudAMJAQAAAAlpc0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ABQAAAAZhbW91bnQJAAACAAAAAQIAAAAeQ2FuJ3Qgd2l0aGRyYXcgbmVnYXRpdmUgYW1vdW50AwkAAGYAAAACAAAAAAAAAAAABQAAABZuZXdBbW91bnRUb3RhbFdpdGhkcmF3CQAAAgAAAAECAAAAEk5vdCBlbm91Z2ggYmFsYW5jZQkBAAAADFNjcmlwdFJlc3VsdAAAAAIJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAACmN1cnJlbnRLZXkFAAAAFm5ld0Ftb3VudFRvdGFsV2l0aGRyYXcFAAAAA25pbAkBAAAAC1RyYW5zZmVyU2V0AAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAADGNhbGNXaXRoZHJhdwUAAAAEdW5pdAUAAAADbmlsAAAAAC3nK6E=", "height": 1620874, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: F4KA1rXXMcPG3Mq5pjjEomKawQdEBjg7o5z9DXhFtHmX Next: 9xEw1hJ9MYLessbuxNCJbYFaE9LdXm1SLnB9i6wUVXDS Diff:
OldNewDifferences
7272 if ((d.assetId != c))
7373 then throw("can hodl Swap Token only.")
7474 else if ((t > r))
75- then throw((((("O valor solicitado ultrapassa o valor autorizado de:" + toString(s)) + "tokens por ") + toString(r)) + "waves"))
75+ then throw((((("O valor solicitado ultrapassa o valor da troca autorizada de:" + toString(s)) + " tokens por ") + toString(r)) + " waves"))
7676 else if ((0 > e))
7777 then throw("Can't withdraw negative amount")
7878 else if ((0 > u))
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(a)
77 func WavesSwapToken () = {
88 let b = ("totalDeposit_" + toBase58String(a.caller.bytes))
99 let c = base58'GYxGtmuBa72BShwGRLyf8wNDEzJt7zngMLCRTnuSuhMm'
1010 let d = extract(a.payment)
1111 let e = d.amount
1212 let f = {
1313 let g = getInteger(this, b)
1414 if ($isInstanceOf(g, "Int"))
1515 then {
1616 let h = g
1717 h
1818 }
1919 else 0
2020 }
2121 let i = (f + d.amount)
2222 if (isDefined(d.assetId))
2323 then throw("can hodl waves only at the moment")
2424 else ScriptResult(WriteSet([DataEntry(b, i)]), TransferSet([ScriptTransfer(a.caller, e, c)]))
2525 }
2626
2727
2828
2929 @Callable(a)
3030 func TokenSwapWaves () = {
3131 let c = base58'GYxGtmuBa72BShwGRLyf8wNDEzJt7zngMLCRTnuSuhMm'
3232 let b = ("totalWithdrawInWaves_" + toBase58String(a.caller.bytes))
3333 let j = ("totalDeposit_" + toBase58String(a.caller.bytes))
3434 let k = 10000000000
3535 let d = extract(a.payment)
3636 let e = d.amount
3737 let l = {
3838 let g = getInteger(this, j)
3939 if ($isInstanceOf(g, "Int"))
4040 then {
4141 let h = g
4242 h
4343 }
4444 else 0
4545 }
4646 let m = 100
4747 let n = ((l * m) / (k / m))
4848 let o = {
4949 let g = getInteger(this, b)
5050 if ($isInstanceOf(g, "Int"))
5151 then {
5252 let h = g
5353 h
5454 }
5555 else 0
5656 }
5757 let p = {
5858 let g = getInteger(this, "currentProfit")
5959 if ($isInstanceOf(g, "Int"))
6060 then {
6161 let h = g
6262 h
6363 }
6464 else 0
6565 }
6666 let q = ((p / n) * m)
6767 let r = (q - o)
6868 let s = ((r / 200) * 100)
6969 let t = ((e * 200) / 100)
7070 let u = (o + t)
7171 let v = ((((((((((("currentAmountDeposits:" + toString(l)) + "/percentualParticipacao:") + toString(n)) + "/walletProfit:") + toString(q)) + "totalAuthorizedWithdrawal:") + toString(r)) + "newAmountTotalWithdraw:") + toString(u)) + "totalTokensForProfit:") + toString(s))
7272 if ((d.assetId != c))
7373 then throw("can hodl Swap Token only.")
7474 else if ((t > r))
75- then throw((((("O valor solicitado ultrapassa o valor autorizado de:" + toString(s)) + "tokens por ") + toString(r)) + "waves"))
75+ then throw((((("O valor solicitado ultrapassa o valor da troca autorizada de:" + toString(s)) + " tokens por ") + toString(r)) + " waves"))
7676 else if ((0 > e))
7777 then throw("Can't withdraw negative amount")
7878 else if ((0 > u))
7979 then throw("Not enough balance")
8080 else ScriptResult(WriteSet([DataEntry(b, u)]), TransferSet([ScriptTransfer(a.caller, t, unit)]))
8181 }
8282
8383

github/deemru/w8io/169f3d6 
29.82 ms