tx · 7iU9gBEsWhUE1KukstT8UbW1HAXUivVtsjqYMAK9Uhn4

3PG7CHvBatHpChwm8reH74wfEwk1PHc8Rqy:  -0.01000000 Waves

2023.01.08 21:00 [3461813] smart account 3PG7CHvBatHpChwm8reH74wfEwk1PHc8Rqy > SELF 0.00000000 Waves

{ "type": 13, "id": "7iU9gBEsWhUE1KukstT8UbW1HAXUivVtsjqYMAK9Uhn4", "fee": 1000000, "feeAssetId": null, "timestamp": 1673200923143, "version": 2, "chainId": 87, "sender": "3PG7CHvBatHpChwm8reH74wfEwk1PHc8Rqy", "senderPublicKey": "9KXfR1iJDN9MLTf7rgrygpRA3HG53KCgWyxzqk4m25Qd", "proofs": [ "3EuZgjUGhqaBxUeZ2KKQytLyZCTLWTbwYv4oKHvMbrzo4xd7SEyEHrfRBn6SA5X2q2QN12DcCwnrcBTtnGE3cx6n" ], "script": "base64:BgIGCAISABIACAAZV1hfTFBfV0FWRVNfVVNETl9BU1NFVF9JRAEgXedtbkamxzmxtK4hQ1NqaJeqmQ+fWxX6vGpRDRxJGSAAF1dYX1BPT0xfV0FWRVNfVVNETl9EQVBQCQEHQWRkcmVzcwEBGgFX7UefzUI8k75LIc37An4fyC37loB6w699ABtORVVUUklOT19SRVNUX1JFQURPTkxZX0RBUFAJAQdBZGRyZXNzAQEaAVc2mMwFV8eubgPH9X8mVUOITa4f15p3UlEAFU5FVVRSSU5PX01FVFJJQ1NfREFQUAkBB0FkZHJlc3MBARoBVzjkpo76YXsJPSIs33Rbs+CIsp0VDzoUtgANVVNETl9BU1NFVF9JRAEgtiYpwwT1zlORpA5LdSQvZIxRsfrfr1QpvUjSHSqyqtEBCWFzQW55TGlzdAEBdgQHJG1hdGNoMAUBdgMJAAECBQckbWF0Y2gwAglMaXN0W0FueV0EAWwFByRtYXRjaDAFAWwJAAIBAgQjZXJyAQVhc0ludAEBdgQHJG1hdGNoMAUBdgMJAAECBQckbWF0Y2gwAgNJbnQEAXgFByRtYXRjaDAFAXgEAXQFByR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VTRE5fQVNTRVRfSUQEBWNhbGwyCQD8BwQFF1dYX1BPT0xfV0FWRVNfVVNETl9EQVBQAglnZXRPbmVUa24JAMwIAgUNVVNETl9BU1NFVF9JRAkAzAgCAAEFA25pbAkAzAgCCQEPQXR0YWNoZWRQYXltZW50AgUZV1hfTFBfV0FWRVNfVVNETl9BU1NFVF9JRAUObHBUb2tlbkJhbGFuY2UFA25pbAMJAAACBQVjYWxsMgUFY2FsbDIFA25pbAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgECdHgBBnZlcmlmeQAJAMgTAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXnKADnB", "height": 3461813, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BKdZsqYvp6rWgQSiXTNupguA9QAyWb35o1ug4mRCaayM Next: 6cJhGsmuuJKze3eHbnNPPfbnYqEN2XzWe4fzadxjNCJU Diff:
OldNewDifferences
5454 if ((call == call))
5555 then {
5656 let neutrino_data_arr = split(call, "__")
57- let alreadySwappedUnderLimit = asInt(neutrino_data_arr[11])
58- let maxAvailableToSwapNow = asInt(neutrino_data_arr[10])
59- if ((alreadySwappedUnderLimit != 0))
60- then throw("Can't swap yet")
57+ if (true)
58+ then throw("toto")
6159 else {
62- let amounOfUsdnToSwap = if ((amount > maxAvailableToSwapNow))
63- then maxAvailableToSwapNow
64- else amount
65- if (true)
66- then throw("toto")
60+ let alreadySwappedUnderLimit = asInt(neutrino_data_arr[11])
61+ let maxAvailableToSwapNow = asInt(neutrino_data_arr[10])
62+ if ((alreadySwappedUnderLimit != 0))
63+ then throw("Can't swap yet")
6764 else {
65+ let amounOfUsdnToSwap = if ((amount > maxAvailableToSwapNow))
66+ then maxAvailableToSwapNow
67+ else amount
6868 let swapUsdnToWaves_SC = invoke(Address(base58'3P4v7QaMk6us7PdxSuoR5LmZmemv5ruD6oj'), "swapNeutrinoToWaves", nil, [AttachedPayment(USDN_ASSET_ID, amounOfUsdnToSwap)])
6969 if ((swapUsdnToWaves_SC == swapUsdnToWaves_SC))
7070 then nil
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let WX_LP_WAVES_USDN_ASSET_ID = base58'7KZbJrVopwJhkdwbe1eFDBbex4dkY63MxjTNjqXtrzj1'
55
66 let WX_POOL_WAVES_USDN_DAPP = Address(base58'3PPZWgFNRKHLvM51pwS934C8VZ7d2F4Z58g')
77
88 let NEUTRINO_REST_READONLY_DAPP = Address(base58'3P6uaG88jjcLYZQrvJHLWPbFFRnChnAzmcU')
99
1010 let NEUTRINO_METRICS_DAPP = Address(base58'3P77iUusNwMMzWFdC8f7bftwpHyG1PBs1gq')
1111
1212 let USDN_ASSET_ID = base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p'
1313
1414 func asAnyList (v) = match v {
1515 case l: List[Any] =>
1616 l
1717 case _ =>
1818 throw("#err")
1919 }
2020
2121
2222 func asInt (v) = match v {
2323 case x: Int =>
2424 x
2525 case t =>
2626 throw("#err")
2727 }
2828
2929
3030 func asStr (v) = match v {
3131 case x: String =>
3232 x
3333 case t =>
3434 throw("#err")
3535 }
3636
3737
3838 @Callable(i)
3939 func default () = if ((i.caller != this))
4040 then throw("Not allowed")
4141 else if (if (!(isDefined(i.payments[0].assetId)))
4242 then true
4343 else (i.payments[0].assetId != USDN_ASSET_ID))
4444 then throw("USDN Only")
4545 else {
4646 let amount = i.payments[0].amount
4747 let neutrinoMetrics = asAnyList(invoke(NEUTRINO_METRICS_DAPP, "calcNeutinoMetricsREADONLY", nil, nil))
4848 if ((neutrinoMetrics == neutrinoMetrics))
4949 then {
5050 let BR = asInt(neutrinoMetrics[8])
5151 if ((BR > 100500))
5252 then {
5353 let call = asStr(invoke(NEUTRINO_REST_READONLY_DAPP, "swapInfoREADONLY", ["3PG7CHvBatHpChwm8reH74wfEwk1PHc8Rqy"], nil))
5454 if ((call == call))
5555 then {
5656 let neutrino_data_arr = split(call, "__")
57- let alreadySwappedUnderLimit = asInt(neutrino_data_arr[11])
58- let maxAvailableToSwapNow = asInt(neutrino_data_arr[10])
59- if ((alreadySwappedUnderLimit != 0))
60- then throw("Can't swap yet")
57+ if (true)
58+ then throw("toto")
6159 else {
62- let amounOfUsdnToSwap = if ((amount > maxAvailableToSwapNow))
63- then maxAvailableToSwapNow
64- else amount
65- if (true)
66- then throw("toto")
60+ let alreadySwappedUnderLimit = asInt(neutrino_data_arr[11])
61+ let maxAvailableToSwapNow = asInt(neutrino_data_arr[10])
62+ if ((alreadySwappedUnderLimit != 0))
63+ then throw("Can't swap yet")
6764 else {
65+ let amounOfUsdnToSwap = if ((amount > maxAvailableToSwapNow))
66+ then maxAvailableToSwapNow
67+ else amount
6868 let swapUsdnToWaves_SC = invoke(Address(base58'3P4v7QaMk6us7PdxSuoR5LmZmemv5ruD6oj'), "swapNeutrinoToWaves", nil, [AttachedPayment(USDN_ASSET_ID, amounOfUsdnToSwap)])
6969 if ((swapUsdnToWaves_SC == swapUsdnToWaves_SC))
7070 then nil
7171 else throw("Strict value is not equal to itself.")
7272 }
7373 }
7474 }
7575 else throw("Strict value is not equal to itself.")
7676 }
7777 else throw("Br under 10")
7878 }
7979 else throw("Strict value is not equal to itself.")
8080 }
8181
8282
8383
8484 @Callable(i)
8585 func wavesToUdn () = if ((i.caller != this))
8686 then throw("Not allowed")
8787 else if (isDefined(i.payments[0].assetId))
8888 then throw("WAVES Only")
8989 else {
9090 let amount = i.payments[0].amount
9191 let call1 = invoke(WX_POOL_WAVES_USDN_DAPP, "putOneTkn", [1, false], [AttachedPayment(unit, amount)])
9292 if ((call1 == call1))
9393 then {
9494 let lpTokenBalance = assetBalance(this, WX_LP_WAVES_USDN_ASSET_ID)
9595 let call2 = invoke(WX_POOL_WAVES_USDN_DAPP, "getOneTkn", [USDN_ASSET_ID, 1], [AttachedPayment(WX_LP_WAVES_USDN_ASSET_ID, lpTokenBalance)])
9696 if ((call2 == call2))
9797 then nil
9898 else throw("Strict value is not equal to itself.")
9999 }
100100 else throw("Strict value is not equal to itself.")
101101 }
102102
103103
104104 @Verifier(tx)
105105 func verify () = sigVerify_128Kb(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
106106

github/deemru/w8io/026f985 
43.22 ms