tx · 4dApoDbCd5w35jBWoMz1GnakH7iLHP24CkAomndkYNeS

3Myb6G8DkdBb8YcZzhrky65HrmiNuac3kvS:  -0.00200000 Waves

2023.05.17 12:24 [2581766] smart account 3Myb6G8DkdBb8YcZzhrky65HrmiNuac3kvS > SELF 0.00000000 Waves

{ "type": 13, "id": "4dApoDbCd5w35jBWoMz1GnakH7iLHP24CkAomndkYNeS", "fee": 200000, "feeAssetId": null, "timestamp": 1684315454044, "version": 2, "chainId": 84, "sender": "3Myb6G8DkdBb8YcZzhrky65HrmiNuac3kvS", "senderPublicKey": "Ab4L9nu8oFkaz3goia9d2YmgZZCZciUsmuKTWq8rMYN4", "proofs": [ "376CiZjdrG5jGy5iVja6P4xb59cq8VmeHxgf2nAU4wTYmPeCbJCfQ2Dj71eLobuKCRHFnTT2hhnjmmg3K6JPidrs" ], "script": "base64:BgIECAISAAoAA1NFUAICX18ABU1VTFQ2AMCEPQAFTVVMVDgAgMLXLwAKV0FWRVNJRFNUUgIFV0FWRVMAB1dBVkVTSUQJANkEAQUKV0FWRVNJRFNUUgAIWFROSURTVFICLDI1RkVxRWpSa3FLNnlDa2lUN0x6NlNBWXo3Z1VGQ3R4ZkNDaG5yVkZENUFUAAhORVVUUklOTwIjM016YngzNEV4NXJSYm4zOXZVSHg5a2l3aDNubmVGOFM1d2UAE1dYX1NXQVBfQUREUkVTU19TVFICIzNONkxIamZHYjZGZ2N5N1lzVmNOeEd5UFRqNDlYYlFBaWpxAA9XWF9TV0FQX0FERFJFU1MJARFAZXh0ck5hdGl2ZSgxMDYyKQEFE1dYX1NXQVBfQUREUkVTU19TVFIBFmtleU1pbkRpc3RyaWJ1dGVBbW91bnQAAh4lcyVzX19jZmdfX21pbkRpc3RyaWJ1dGVBbW91bnQBAWkBCmJ1eUJhY2tYdG4ABBNtaW5EaXN0cmlidXRlQW1vdW50CQELdmFsdWVPckVsc2UCCQCaCAIFBHRoaXMJARZrZXlNaW5EaXN0cmlidXRlQW1vdW50AAkAaAIAD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gUITkVVVFJJTk8FA25pbAkAzAgCCQEPQXR0YWNoZWRQYXltZW50AgUEdW5pdAUKYnV5QmFja0FtdAUDbmlsAwkAAAIFCnN3YXBSZXN1bHQFCnN3YXBSZXN1bHQJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwgFAWkGY2FsbGVyBQxjYWxsZXJSZXdhcmQFBHVuaXQFA25pbAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgBTToDy", "height": 2581766, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8KDNV9brkkg7pURvLcQbxMfHG2dgA8XfRSYHTGEpfGM Next: EBuUVGfgwytQdJ4X5KnaAodkQ94fU1q4J554Fr5XrSGg Diff:
OldNewDifferences
3636 let feeAmt = i.fee
3737 let feeAssetId = valueOrElse(i.feeAssetId, WAVESID)
3838 let allowedFee = ((5 * MULT8) / 1000)
39- let callerReward = (3 * allowedFee)
39+ let callerReward = (2 * allowedFee)
4040 if ((pmtAmt != minDistributeAmount))
4141 then throw((("attached payment must be exact " + toString(minDistributeAmount)) + " Wavelets"))
4242 else if ((pmtAssetId != WAVESID))
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)
2626 func buyBackXtn () = {
2727 let minDistributeAmount = valueOrElse(getInteger(this, keyMinDistributeAmount()), (13 * MULT8))
2828 if ((size(i.payments) != 1))
2929 then throw("exact 1 payment must be attached")
3030 else if ((i.caller != i.originCaller))
3131 then throw("dapp to dapp calls are not allowed")
3232 else {
3333 let pmt = i.payments[0]
3434 let pmtAmt = pmt.amount
3535 let pmtAssetId = valueOrElse(pmt.assetId, WAVESID)
3636 let feeAmt = i.fee
3737 let feeAssetId = valueOrElse(i.feeAssetId, WAVESID)
3838 let allowedFee = ((5 * MULT8) / 1000)
39- let callerReward = (3 * allowedFee)
39+ let callerReward = (2 * allowedFee)
4040 if ((pmtAmt != minDistributeAmount))
4141 then throw((("attached payment must be exact " + toString(minDistributeAmount)) + " Wavelets"))
4242 else if ((pmtAssetId != WAVESID))
4343 then throw("only Waves can be used in payment")
4444 else if ((feeAssetId != WAVESID))
4545 then throw("only Waves can be used in fees")
4646 else if ((feeAmt != allowedFee))
4747 then throw("fee amount couldn't exceed 0.005")
4848 else {
4949 let buyBackAmt = (pmtAmt - callerReward)
5050 let swapResult = invoke(WX_SWAP_ADDRESS, "swap", [1, XTNIDSTR, NEUTRINO], [AttachedPayment(unit, buyBackAmt)])
5151 if ((swapResult == swapResult))
5252 then [ScriptTransfer(i.caller, callerReward, unit)]
5353 else throw("Strict value is not equal to itself.")
5454 }
5555 }
5656 }
5757
5858

github/deemru/w8io/026f985 
31.06 ms