tx · 9No4isiFHBq9C5GCxft23EJkfxNb4e1rDjuCJKtSF1S6

3MsRQhp2cbXJQxHETzdZQdj2QfP4b3Mp6UL:  -0.01000000 Waves

2022.04.21 10:57 [2018017] smart account 3MsRQhp2cbXJQxHETzdZQdj2QfP4b3Mp6UL > SELF 0.00000000 Waves

{ "type": 13, "id": "9No4isiFHBq9C5GCxft23EJkfxNb4e1rDjuCJKtSF1S6", "fee": 1000000, "feeAssetId": null, "timestamp": 1650527907397, "version": 2, "chainId": 84, "sender": "3MsRQhp2cbXJQxHETzdZQdj2QfP4b3Mp6UL", "senderPublicKey": "FuM9F3sAdx6ZQfJfJMCdjC9w4wzTDx6F1KgWCbAM1KRy", "proofs": [ "5XNhxFF2f5yahLyvtkS66BeqVtgVVVFVDkVd4VSwA69S3FuM1kgu5B1pimkSVB9oFycB796KX1FaC1cxF8bFqgp6" ], "script": "base64:AAIFAAAAAAAAAAsIAhIAEgASAwoBAQAAAAYBAAAABWFzSW50AAAAAQAAAAV2YWx1ZQQAAAAHJG1hdGNoMAUAAAAFdmFsdWUDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAADaW50BQAAAAckbWF0Y2gwBQAAAANpbnQJAAACAAAAAQIAAAANZXhwZWN0ZWQ6IEludAEAAAARYXNVc2VyQmFsYW5jZURhdGEAAAABAAAABXZhbHVlBAAAAAckbWF0Y2gwBQAAAAV2YWx1ZQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAiKEludCwgSW50LCBJbnQsIEludCwgSW50LCBCb29sZWFuKQQAAAABeAUAAAAHJG1hdGNoMAgFAAAAAXgAAAACXzMEAAAAAXQFAAAAByRtYXRjaDAJAAACAAAAAQIAAAAid3JvbmcgdHlwZSwgZXhwZWN0ZWQ6IEludDUmQm9vbGVhbgAAAAAEbWFpbgkBAAAAEUBleHRyTmF0aXZlKDEwNjIpAAAAAQIAAAAjM1BBWnY5dGdLMVBYN2RLUjdiNGtjaHE1cWRwVVMzRzVzWVQAAAAAD2Fzc2V0U3RyaW5nVXNkYwIAAAAsNlh0SGpwWGJzOVJSSlAyU3I5R1V5VnF6QUNjYnk5VGtUaEhYbmpWQzVDREoAAAAAC3Jlc2VydmVVc2RjCQEAAAARQGV4dHJOYXRpdmUoMTA2MikAAAABAgAAACMzTXNSUWhwMmNiWEpReEhFVHpkWlFkajJRZlA0YjNNcDZVTAAAAAAHYXNzZXRJZAkAAlkAAAABBQAAAA9hc3NldFN0cmluZ1VzZGMAAAADAAAAAWkBAAAAC3VzZXJCYWxhbmNlAAAAAAkABRQAAAACBQAAAANuaWwAAAAAADWk6QAAAAABaQEAAAAEZ2V0QgAAAAAEAAAAAWEJAQAAAAVhc0ludAAAAAEJAAP8AAAABAUAAAALcmVzZXJ2ZVVzZGMCAAAAC3VzZXJCYWxhbmNlBQAAAANuaWwFAAAAA25pbAkABRQAAAACBQAAAANuaWwJAAGkAAAAAQUAAAABYQAAAAFpAQAAAAZieWVieWUAAAABAAAABG1pbm0EAAAACWF2YWlsYWJsZQkAA/AAAAACBQAAAAtyZXNlcnZlVXNkYwUAAAAHYXNzZXRJZAMJAABmAAAAAgUAAAAEbWlubQUAAAAJYXZhaWxhYmxlCQAFFAAAAAIFAAAAA25pbAkAAaQAAAABBQAAAARtaW5tBAAAAApkZXBvc2l0VXNkCQEAAAAFYXNJbnQAAAABCQAD/AAAAAQFAAAAC3Jlc2VydmVVc2RjAgAAAAt1c2VyQmFsYW5jZQUAAAADbmlsBQAAAANuaWwEAAAAAXYDCQAAZgAAAAIFAAAACmRlcG9zaXRVc2QFAAAACWF2YWlsYWJsZQUAAAAKZGVwb3NpdFVzZAUAAAAJYXZhaWxhYmxlCQAAAgAAAAECAAAAATEAAAAA1Yx5Vw==", "height": 2018017, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BJBZCH4r2qXtFc5cYv9f3tN17qFhnavg94G67o8Vx2Hb Next: 6nXsW58RUU4qcP1shqtoGucQf8Aq7mk7TyoPs1gQDeme Diff:
OldNewDifferences
4848 let v = if ((depositUsd > available))
4949 then depositUsd
5050 else available
51- $Tuple2(nil, toString(v))
51+ throw("1")
5252 }
5353 }
5454
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func asInt (value) = match value {
55 case int: Int =>
66 int
77 case _ =>
88 throw("expected: Int")
99 }
1010
1111
1212 func asUserBalanceData (value) = match value {
1313 case x: (Int, Int, Int, Int, Int, Boolean) =>
1414 x._3
1515 case t =>
1616 throw("wrong type, expected: Int5&Boolean")
1717 }
1818
1919
2020 let main = addressFromStringValue("3PAZv9tgK1PX7dKR7b4kchq5qdpUS3G5sYT")
2121
2222 let assetStringUsdc = "6XtHjpXbs9RRJP2Sr9GUyVqzACcby9TkThHXnjVC5CDJ"
2323
2424 let reserveUsdc = addressFromStringValue("3MsRQhp2cbXJQxHETzdZQdj2QfP4b3Mp6UL")
2525
2626 let assetId = fromBase58String(assetStringUsdc)
2727
2828 @Callable(i)
2929 func userBalance () = $Tuple2(nil, 900000000)
3030
3131
3232
3333 @Callable(i)
3434 func getB () = {
3535 let a = asInt(invoke(reserveUsdc, "userBalance", nil, nil))
3636 $Tuple2(nil, toString(a))
3737 }
3838
3939
4040
4141 @Callable(i)
4242 func byebye (minm) = {
4343 let available = assetBalance(reserveUsdc, assetId)
4444 if ((minm > available))
4545 then $Tuple2(nil, toString(minm))
4646 else {
4747 let depositUsd = asInt(invoke(reserveUsdc, "userBalance", nil, nil))
4848 let v = if ((depositUsd > available))
4949 then depositUsd
5050 else available
51- $Tuple2(nil, toString(v))
51+ throw("1")
5252 }
5353 }
5454
5555

github/deemru/w8io/026f985 
39.57 ms