tx · 6Gv8G5ZeVt4oCtr73CMW686siYUuSuJm6Pr1hYipbEHo

3Myb6G8DkdBb8YcZzhrky65HrmiNuac3kvS:  -0.00200000 Waves

2023.05.17 17:38 [2582089] smart account 3Myb6G8DkdBb8YcZzhrky65HrmiNuac3kvS > SELF 0.00000000 Waves

{ "type": 13, "id": "6Gv8G5ZeVt4oCtr73CMW686siYUuSuJm6Pr1hYipbEHo", "fee": 200000, "feeAssetId": null, "timestamp": 1684334378823, "version": 2, "chainId": 84, "sender": "3Myb6G8DkdBb8YcZzhrky65HrmiNuac3kvS", "senderPublicKey": "Ab4L9nu8oFkaz3goia9d2YmgZZCZciUsmuKTWq8rMYN4", "proofs": [ "4urXgXDDd8GgPWgHkFweQqk53nPja7929w2gS4RaWTnhPwpYLz9QXcpow3YmhuaQityfnfNw31YBRF56CGNJ6JVD" ], "script": "base64:BgIECAISAAoAA1NFUAICX18ABU1VTFQ2AMCEPQAFTVVMVDgAgMLXLwAKV0FWRVNJRFNUUgIFV0FWRVMAB1dBVkVTSUQJANkEAQUKV0FWRVNJRFNUUgAIWFROSURTVFICLDI1RkVxRWpSa3FLNnlDa2lUN0x6NlNBWXo3Z1VGQ3R4ZkNDaG5yVkZENUFUAAhORVVUUklOTwIjM016YngzNEV4NXJSYm4zOXZVSHg5a2l3aDNubmVGOFM1d2UAE1dYX1NXQVBfQUREUkVTU19TVFICIzNONkxIamZHYjZGZ2N5N1lzVmNOeEd5UFRqNDlYYlFBaWpxAA9XWF9TV0FQX0FERFJFU1MJARFAZXh0ck5hdGl2ZSgxMDYyKQEFE1dYX1NXQVBfQUREUkVTU19TVFIBFmtleU1pbkRpc3RyaWJ1dGVBbW91bnQAAh4lcyVzX19jZmdfX21pbkRpc3RyaWJ1dGVBbW91bnQBAWkBB2RlZmF1bHQABApidXlCYWNrQW10CQELdmFsdWVPckVsc2UCCQCaCAIFBHRoaXMJARZrZXlNaW5EaXN0cmlidXRlQW1vdW50AAkAaAIADQUFTVVMVDgDCQECIT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CBlcXVhbCB0byBpdHNlbGYuANvkUi8=", "height": 2582089, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EBuUVGfgwytQdJ4X5KnaAodkQ94fU1q4J554Fr5XrSGg Next: FE8nknrpwXchLx2oD7BQJdmzEsvpmnXe2X4pMLvfiU4H Diff:
OldNewDifferences
2323
2424
2525 @Callable(i)
26-func buyBackXtn () = {
26+func default () = {
2727 let buyBackAmt = valueOrElse(getInteger(this, keyMinDistributeAmount()), (13 * MULT8))
2828 if ((size(i.payments) != 0))
29- then throw("exact 1 payment must be attached")
29+ then throw("no payments are expected")
3030 else if ((i.caller != i.originCaller))
3131 then throw("dapp to dapp calls are not allowed")
3232 else {
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SEP = "__"
55
66 let MULT6 = 1000000
77
88 let MULT8 = 100000000
99
1010 let WAVESIDSTR = "WAVES"
1111
1212 let WAVESID = fromBase58String(WAVESIDSTR)
1313
1414 let XTNIDSTR = "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT"
1515
1616 let NEUTRINO = "3Mzbx34Ex5rRbn39vUHx9kiwh3nneF8S5we"
1717
1818 let WX_SWAP_ADDRESS_STR = "3N6LHjfGb6Fgcy7YsVcNxGyPTj49XbQAijq"
1919
2020 let WX_SWAP_ADDRESS = addressFromStringValue(WX_SWAP_ADDRESS_STR)
2121
2222 func keyMinDistributeAmount () = "%s%s__cfg__minDistributeAmount"
2323
2424
2525 @Callable(i)
26-func buyBackXtn () = {
26+func default () = {
2727 let buyBackAmt = valueOrElse(getInteger(this, keyMinDistributeAmount()), (13 * MULT8))
2828 if ((size(i.payments) != 0))
29- then throw("exact 1 payment must be attached")
29+ then throw("no payments are expected")
3030 else if ((i.caller != i.originCaller))
3131 then throw("dapp to dapp calls are not allowed")
3232 else {
3333 let feeAmt = i.fee
3434 let feeAssetId = valueOrElse(i.feeAssetId, WAVESID)
3535 let allowedFee = ((5 * MULT8) / 1000)
3636 let callerReward = (2 * allowedFee)
3737 let minRequiredWavesBalance = (buyBackAmt + callerReward)
3838 if ((feeAssetId != WAVESID))
3939 then throw("only Waves can be used in fees")
4040 else if ((feeAmt != allowedFee))
4141 then throw("fee amount couldn't exceed 0.005")
4242 else if ((minRequiredWavesBalance > wavesBalance(this).available))
4343 then throw(("wavelets balance is less then " + toString(minRequiredWavesBalance)))
4444 else {
4545 let swapResult = invoke(WX_SWAP_ADDRESS, "swap", [1, XTNIDSTR, NEUTRINO], [AttachedPayment(unit, buyBackAmt)])
4646 if ((swapResult == swapResult))
4747 then [ScriptTransfer(i.caller, callerReward, unit)]
4848 else throw("Strict value is not equal to itself.")
4949 }
5050 }
5151 }
5252
5353

github/deemru/w8io/169f3d6 
27.14 ms