tx · 57WYMgRTAR22yPfJf8zFBwKriokC3gggXz3xQYsahChZ
3N62UHvyvvdresjwfsmW4UX2ffDjcDPAkbn: -0.01500000 Waves
2022.07.27 14:48 [2158183] smart account 3N62UHvyvvdresjwfsmW4UX2ffDjcDPAkbn > SELF 0.00000000 Waves
{
"type": 13,
"id": "57WYMgRTAR22yPfJf8zFBwKriokC3gggXz3xQYsahChZ",
"fee": 1500000,
"feeAssetId": null,
"timestamp": 1658922475354,
"version": 2,
"chainId": 84,
"sender": "3N62UHvyvvdresjwfsmW4UX2ffDjcDPAkbn",
"senderPublicKey": "5XyQhNxDw1J4WdCZJr14webbFVzP2oXx9Z2BxoYpATJa",
"proofs": [
"5VTjzE2f7XQxSfFLxZUQi5suaViCYUzPDei4Pb73ovHz1H5AtQpBUcAW61kUwwzAhxzUPRNNe3qSjfvwLLDxe2LU"
],
"script": "base64:AAIFAAAAAAAAAAQIAhIAAAAAAgAAAAAJbHBUb2tlbklkAQAAACD07ckYyC0xfprvBupwp+/JlC2r0Ufg/cphwgg13tmbTgAAAAANcmV3YXJkVG9rZW5JZAEAAAAgqk/z8FmNsZRzniglJJteJSjGGIcuiPek5072yfUXpbgAAAABAAAAAWkBAAAADWJ1cm5BbmRSZXdhcmQAAAAABAAAAAFwCQEAAAAFdmFsdWUAAAABCQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAAAwkBAAAAAiE9AAAAAggFAAAAAXAAAAAHYXNzZXRJZAUAAAAJbHBUb2tlbklkCQAAAgAAAAECAAAAEUluY29ycmVjdCBwYXltZW50BAAAAAVzaGFyZQkAAGsAAAADCAUAAAABcAAAAAZhbW91bnQICQEAAAAFdmFsdWUAAAABCQAD7AAAAAEFAAAADXJld2FyZFRva2VuSWQAAAAIcXVhbnRpdHkICQEAAAAFdmFsdWUAAAABCQAD7AAAAAEFAAAACWxwVG9rZW5JZAAAAAhxdWFudGl0eQkABEwAAAACCQEAAAAEQnVybgAAAAIFAAAACWxwVG9rZW5JZAgFAAAAAXAAAAAGYW1vdW50CQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAAFc2hhcmUFAAAADXJld2FyZFRva2VuSWQFAAAAA25pbAAAAADJubt9",
"height": 2158183,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 1799F3NsZXGfodBwm4oqEz5PHKt581eprZmu9CHc1sn
Next: 8cFyMEoz4s7FQ2TKvSqfwyQBQGoWC4pXhtJuLfeEx1mH
Diff:
Old | New | | Differences |
---|
11 | 11 | | if ((p.assetId != lpTokenId)) |
---|
12 | 12 | | then throw("Incorrect payment") |
---|
13 | 13 | | else { |
---|
14 | | - | let share = fraction(p.amount, value(assetInfo(lpTokenId)).quantity, value(assetInfo(rewardTokenId)).quantity) |
---|
| 14 | + | let share = fraction(p.amount, value(assetInfo(rewardTokenId)).quantity, value(assetInfo(lpTokenId)).quantity) |
---|
15 | 15 | | [Burn(lpTokenId, p.amount), ScriptTransfer(i.caller, share, rewardTokenId)] |
---|
16 | 16 | | } |
---|
17 | 17 | | } |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let lpTokenId = base58'HV6n4nFYYYJCYq8n6jLDm8rG1qUps1JeYQgsNPkgJwbB' |
---|
5 | 5 | | |
---|
6 | 6 | | let rewardTokenId = base58'CTq287qYTyvgyDzaaVYuwWeceZUuTsHSKLEfg9YZQFKu' |
---|
7 | 7 | | |
---|
8 | 8 | | @Callable(i) |
---|
9 | 9 | | func burnAndReward () = { |
---|
10 | 10 | | let p = value(i.payments[0]) |
---|
11 | 11 | | if ((p.assetId != lpTokenId)) |
---|
12 | 12 | | then throw("Incorrect payment") |
---|
13 | 13 | | else { |
---|
14 | | - | let share = fraction(p.amount, value(assetInfo(lpTokenId)).quantity, value(assetInfo(rewardTokenId)).quantity) |
---|
| 14 | + | let share = fraction(p.amount, value(assetInfo(rewardTokenId)).quantity, value(assetInfo(lpTokenId)).quantity) |
---|
15 | 15 | | [Burn(lpTokenId, p.amount), ScriptTransfer(i.caller, share, rewardTokenId)] |
---|
16 | 16 | | } |
---|
17 | 17 | | } |
---|
18 | 18 | | |
---|
19 | 19 | | |
---|