tx · 9ABMTRP1HPMDzPZ3Cwpkvv2osy3AqKV6ZAMqcVp3jipL

3NCdyrMGZ5jfKPu79jjNiUejWRdQtEwKduD:  -0.10000000 Waves

2021.02.01 15:25 [1379096] smart account 3NCdyrMGZ5jfKPu79jjNiUejWRdQtEwKduD > SELF 0.00000000 Waves

{ "type": 13, "id": "9ABMTRP1HPMDzPZ3Cwpkvv2osy3AqKV6ZAMqcVp3jipL", "fee": 10000000, "feeAssetId": null, "timestamp": 1612182377300, "version": 2, "chainId": 84, "sender": "3NCdyrMGZ5jfKPu79jjNiUejWRdQtEwKduD", "senderPublicKey": "GHCcpQWhq3KPA8MHcLKffvcHoJFXk6bdo67cHXjbpKy1", "proofs": [ "xwAPRpgcvgJDFZ6WkEeGUc12YSuz24fM2qZ9Lb6aWgP6dWGbRqn6kqaFq13bP1GHhhrVVT6YpJs7jKBTnm39naU" ], "script": "base64:AAIEAAAAAAAAAAYIAhIAEgAAAAADAQAAAAphY2NlcHRCdGZjAAAAAgAAAANzdW0AAAABZQMJAQAAAAIhPQAAAAIIBQAAAAFlAAAAB2Fzc2V0SWQBAAAAIBUVgoZaLToHoF7JWTbYfTPPIZn5jsOYG4nZknFTL9EjCQAAAgAAAAECAAAAJFdBVkVTPC0+QlRGQyBTd2FwIGFjY2VwdHMgb25seSBXQVZFUwkAAGQAAAACBQAAAANzdW0IBQAAAAFlAAAABmFtb3VudAEAAAALYWNjZXB0V2F2ZXMAAAACAAAAA3N1bQAAAAFlAwkBAAAACWlzRGVmaW5lZAAAAAEIBQAAAAFlAAAAB2Fzc2V0SWQJAAACAAAAAQIAAAAjQlRGQzwtPldBVkVTIFN3YXAgYWNjZXB0cyBvbmx5IEJURkMJAABkAAAAAgUAAAADc3VtCAUAAAABZQAAAAZhbW91bnQAAAAADFdhdmVzUGVyQnRmYwAAAAAAAAAAAgAAAAIAAAABaQEAAAAPRnJvbUJ0ZmNUb1dhdmVzAAAAAAQAAAADc3VtBAAAAAskbGlzdDUwNTUzOQg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QAAAAskc2l6ZTY3NDcwOQAAAAAAAAAAAAUAAAALJGFjYzA2NzQ3MDkEAAAACyRhY2MxNjc0NzA5CQEAAAALYWNjZXB0V2F2ZXMAAAACBQAAAAskYWNjMDY3NDcwOQkAAZEAAAACBQAAAAskbGlzdDY3NDcwOQAAAAAAAAAAAAMJAAAAAAAAAgUAAAALJHNpemU2NzQ3MDkAAAAAAAAAAAEFAAAACyRhY2MxNjc0NzA5BAAAAAskYWNjMjY3NDcwOQkBAAAAC2FjY2VwdFdhdmVzAAAAAgUAAAALJGFjYzE2NzQ3MDkJAAGRAAAAAgUAAAALJGxpc3Q2NzQ3MDkAAAAAAAAAAAEDCQAAAAAAAAIFAAAACyRzaXplNjc0NzA5AAAAAAAAAAACBQAAAAskYWNjMjY3NDcwOQQAAAALJGFjYzM2NzQ3MDkJAQAAAAthY2NlcHRXYXZlcwAAAAIFAAAACyRhY2MyNjc0NzA5CQABkQAAAAIFAAAACyRsaXN0Njc0NzA5AAAAAAAAAAACCQAAAgAAAAECAAAAEkxpc3Qgc2l6ZSBleGNlZWQgMgkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCQEAAAAHQWRkcmVzcwAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMJAABpAAAAAgUAAAADc3VtBQAAAAxXYXZlc1BlckJ0ZmMJAQAAAARVbml0AAAAAAUAAAADbmlsAAAAADLI4Jc=", "height": 1379096, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9yqZD7WnMwD5vhdrApMGf9YejRs7L5CHnLs9RJVPArAM Next: Co2fRZ6kWXBRQ3LLkf1M6JwCjj2Cv9QVKSjzqN2E5dbt Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-func a (b,c) = if (isDefined(c.assetId))
5- then throw("BTFC<->WAVES Swap accepts only BTFC")
4+func a (b,c) = if ((c.assetId != base58'2RJawE14PWhu2XYg1zsmDM46K595DdA2QQHXg9avsrTU'))
5+ then throw("WAVES<->BTFC Swap accepts only WAVES")
66 else (b + c.amount)
77
88
9-func d (b,c) = if ((c.assetId != base58'2RJawE14PWhu2XYg1zsmDM46K595DdA2QQHXg9avsrTU'))
10- then throw("WAVES<->BTFC Swap accepts only WAVES")
9+func d (b,c) = if (isDefined(c.assetId))
10+ then throw("BTFC<->WAVES Swap accepts only BTFC")
1111 else (b + c.amount)
1212
1313
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-func a (b,c) = if (isDefined(c.assetId))
5- then throw("BTFC<->WAVES Swap accepts only BTFC")
4+func a (b,c) = if ((c.assetId != base58'2RJawE14PWhu2XYg1zsmDM46K595DdA2QQHXg9avsrTU'))
5+ then throw("WAVES<->BTFC Swap accepts only WAVES")
66 else (b + c.amount)
77
88
9-func d (b,c) = if ((c.assetId != base58'2RJawE14PWhu2XYg1zsmDM46K595DdA2QQHXg9avsrTU'))
10- then throw("WAVES<->BTFC Swap accepts only WAVES")
9+func d (b,c) = if (isDefined(c.assetId))
10+ then throw("BTFC<->WAVES Swap accepts only BTFC")
1111 else (b + c.amount)
1212
1313
1414 let e = 2
1515
1616 @Callable(f)
1717 func FromBtfcToWaves () = {
1818 let b = {
1919 let g = f.payments
2020 let h = size(g)
2121 let i = 0
2222 if ((h == 0))
2323 then i
2424 else {
2525 let j = a(i, g[0])
2626 if ((h == 1))
2727 then j
2828 else {
2929 let k = a(j, g[1])
3030 if ((h == 2))
3131 then k
3232 else {
3333 let l = a(k, g[2])
3434 throw("List size exceed 2")
3535 }
3636 }
3737 }
3838 }
3939 [ScriptTransfer(Address(f.caller.bytes), (b * e), Unit())]
4040 }
4141
4242
4343
4444 @Callable(f)
4545 func FromWavesToBtfc () = {
4646 let b = {
4747 let m = f.payments
4848 let n = size(m)
4949 let o = 0
5050 if ((n == 0))
5151 then o
5252 else {
5353 let p = d(o, m[0])
5454 if ((n == 1))
5555 then p
5656 else {
5757 let q = d(p, m[1])
5858 if ((n == 2))
5959 then q
6060 else {
6161 let r = d(q, m[2])
6262 throw("List size exceed 2")
6363 }
6464 }
6565 }
6666 }
6767 [ScriptTransfer(Address(f.caller.bytes), (b / e), Unit())]
6868 }
6969
7070

github/deemru/w8io/169f3d6 
37.59 ms