tx · 4WeAzy9U2RjZdiYDXMbaPoViHsBBaNdyQmNNYAzaS3sm
3N62UHvyvvdresjwfsmW4UX2ffDjcDPAkbn: -0.01500000 Waves
2022.07.27 15:50 [2158244] smart account 3N62UHvyvvdresjwfsmW4UX2ffDjcDPAkbn > SELF 0.00000000 Waves
{
"type": 13,
"id": "4WeAzy9U2RjZdiYDXMbaPoViHsBBaNdyQmNNYAzaS3sm",
"fee": 1500000,
"feeAssetId": null,
"timestamp": 1658926237131,
"version": 2,
"chainId": 84,
"sender": "3N62UHvyvvdresjwfsmW4UX2ffDjcDPAkbn",
"senderPublicKey": "5XyQhNxDw1J4WdCZJr14webbFVzP2oXx9Z2BxoYpATJa",
"proofs": [
"5rTekcazNHxJ1taqeJdVDRxVfQJgHUwuPvZTssZoy7aanBcumBxCdQNSVtkyEQnSejeD1MuaPeRW3JZPxssCnDNa"
],
"script": "base64:AAIFAAAAAAAAAAkIAhIAEgMKAQEAAAACAAAAAAlscFRva2VuSWQBAAAAIPTtyRjILTF+mu8G6nCn78mULavRR+D9ymHCCDXe2ZtOAAAAAA1yZXdhcmRUb2tlbklkAQAAACCqT/PwWY2xlHOeKCUkm14lKMYYhy6I96TnTvbJ9ReluAAAAAIAAAABaQEAAAAGcmV3YXJkAAAAAAQAAAABcAkBAAAABXZhbHVlAAAAAQkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAMJAQAAAAIhPQAAAAIIBQAAAAFwAAAAB2Fzc2V0SWQFAAAACWxwVG9rZW5JZAkAAAIAAAABAgAAABFJbmNvcnJlY3QgcGF5bWVudAQAAAAFbHBRdHkICQEAAAAFdmFsdWUAAAABCQAD7AAAAAEFAAAACWxwVG9rZW5JZAAAAAhxdWFudGl0eQQAAAAJcmV3YXJkUXR5CAkBAAAABXZhbHVlAAAAAQkAA+wAAAABBQAAAA1yZXdhcmRUb2tlbklkAAAACHF1YW50aXR5BAAAAAVzaGFyZQkAAGsAAAADCAUAAAABcAAAAAZhbW91bnQFAAAACXJld2FyZFF0eQUAAAAFbHBRdHkEAAAAAXIJAAP8AAAABAUAAAAEdGhpcwIAAAAEYnVybgkABEwAAAACCAUAAAABcAAAAAZhbW91bnQFAAAAA25pbAUAAAADbmlsAwkAAAAAAAACBQAAAAFyBQAAAAFyCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAAFc2hhcmUFAAAADXJld2FyZFRva2VuSWQFAAAAA25pbAkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4AAAABaQEAAAAEYnVybgAAAAEAAAAGYW1vdW50CQAETAAAAAIJAQAAAARCdXJuAAAAAgUAAAAJbHBUb2tlbklkBQAAAAZhbW91bnQFAAAAA25pbAAAAABQjmMb",
"height": 2158244,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 8cFyMEoz4s7FQ2TKvSqfwyQBQGoWC4pXhtJuLfeEx1mH
Next: 4jBKF6N8YpnumZs3u89hdtyKKCT7qxYymwv8whjbVgNW
Diff:
Old | New | | Differences |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let a = base58'HV6n4nFYYYJCYq8n6jLDm8rG1qUps1JeYQgsNPkgJwbB' |
---|
5 | 5 | | |
---|
6 | | - | let b = 1000 |
---|
| 6 | + | let b = base58'CTq287qYTyvgyDzaaVYuwWeceZUuTsHSKLEfg9YZQFKu' |
---|
7 | 7 | | |
---|
8 | 8 | | @Callable(c) |
---|
9 | | - | func burnAndReward () = { |
---|
| 9 | + | func reward () = { |
---|
10 | 10 | | let d = value(c.payments[0]) |
---|
11 | 11 | | if ((d.assetId != a)) |
---|
12 | 12 | | then throw("Incorrect payment") |
---|
13 | 13 | | else { |
---|
14 | | - | let e = fraction(d.amount, b, value(assetInfo(a)).quantity) |
---|
15 | | - | [Burn(a, d.amount), IntegerEntry(toBase58String(c.caller.bytes), e)] |
---|
| 14 | + | let e = value(assetInfo(a)).quantity |
---|
| 15 | + | let f = value(assetInfo(b)).quantity |
---|
| 16 | + | let g = fraction(d.amount, f, e) |
---|
| 17 | + | let h = invoke(this, "burn", [d.amount], nil) |
---|
| 18 | + | if ((h == h)) |
---|
| 19 | + | then [ScriptTransfer(c.caller, g, b)] |
---|
| 20 | + | else throw("Strict value is not equal to itself.") |
---|
16 | 21 | | } |
---|
17 | 22 | | } |
---|
| 23 | + | |
---|
| 24 | + | |
---|
| 25 | + | |
---|
| 26 | + | @Callable(c) |
---|
| 27 | + | func burn (i) = [Burn(a, i)] |
---|
18 | 28 | | |
---|
19 | 29 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let a = base58'HV6n4nFYYYJCYq8n6jLDm8rG1qUps1JeYQgsNPkgJwbB' |
---|
5 | 5 | | |
---|
6 | | - | let b = 1000 |
---|
| 6 | + | let b = base58'CTq287qYTyvgyDzaaVYuwWeceZUuTsHSKLEfg9YZQFKu' |
---|
7 | 7 | | |
---|
8 | 8 | | @Callable(c) |
---|
9 | | - | func burnAndReward () = { |
---|
| 9 | + | func reward () = { |
---|
10 | 10 | | let d = value(c.payments[0]) |
---|
11 | 11 | | if ((d.assetId != a)) |
---|
12 | 12 | | then throw("Incorrect payment") |
---|
13 | 13 | | else { |
---|
14 | | - | let e = fraction(d.amount, b, value(assetInfo(a)).quantity) |
---|
15 | | - | [Burn(a, d.amount), IntegerEntry(toBase58String(c.caller.bytes), e)] |
---|
| 14 | + | let e = value(assetInfo(a)).quantity |
---|
| 15 | + | let f = value(assetInfo(b)).quantity |
---|
| 16 | + | let g = fraction(d.amount, f, e) |
---|
| 17 | + | let h = invoke(this, "burn", [d.amount], nil) |
---|
| 18 | + | if ((h == h)) |
---|
| 19 | + | then [ScriptTransfer(c.caller, g, b)] |
---|
| 20 | + | else throw("Strict value is not equal to itself.") |
---|
16 | 21 | | } |
---|
17 | 22 | | } |
---|
| 23 | + | |
---|
| 24 | + | |
---|
| 25 | + | |
---|
| 26 | + | @Callable(c) |
---|
| 27 | + | func burn (i) = [Burn(a, i)] |
---|
18 | 28 | | |
---|
19 | 29 | | |
---|