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