tx · 2E4hKUXiLkfp9BTaEWkovZAfwxsDm4ri41iBhMcpetHq
3P9jouNm1E3bxabva95Jxhucc3ddoWcbSXt: -0.05000000 Waves
2022.05.22 10:18 [3128047] smart account 3P9jouNm1E3bxabva95Jxhucc3ddoWcbSXt > SELF 0.00000000 Waves
{
"type": 13,
"id": "2E4hKUXiLkfp9BTaEWkovZAfwxsDm4ri41iBhMcpetHq",
"fee": 5000000,
"feeAssetId": null,
"timestamp": 1653203908660,
"version": 2,
"chainId": 87,
"sender": "3P9jouNm1E3bxabva95Jxhucc3ddoWcbSXt",
"senderPublicKey": "5MNMvyFVWBG1v57A4pvhGb5Kp8AtMZZVz1v2ajapqq7e",
"proofs": [
"65v1xWR9apoQuDFzMUQuD43p4CfaF1GwuzK3BxjresNnESe4r8gwrLB1xPBcjQG9ekvY2Km82NQ1Bw6WLhMrTija"
],
"script": "base64:AAIFAAAAAAAAAAYIAhIAEgAAAAADAAAAAARVU0ROAQAAACC2JinDBPXOU5GkDkt1JC9kjFGx+t+vVCm9SNIdKrKq0QAAAAAGZXRVU0ROAQAAACDQz7LBGSxYOzD6WF1diPCXWEhpArLlzkgyOXfI1eamcgAAAAAIaXNTdG9wZWQHAAAAAgAAAAFpAQAAAAVzdGFrZQAAAAAEAAAAA3BtdAkBAAAABXZhbHVlAAAAAQkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAQAAAACYW0IBQAAAANwbXQAAAAGYW1vdW50AwkBAAAAAiE9AAAAAggFAAAAA3BtdAAAAAdhc3NldElkBQAAAARVU0ROCQAAAgAAAAECAAAADUludmFsaWQgdG9rZW4DBQAAAAhpc1N0b3BlZAkAAAIAAAABAgAAAA9kQXBwIGlzIHN0b3BwZWQEAAAABXRvSXNzCQAAaAAAAAIFAAAAAmFtAAAAAAAAAABkBAAAAAFyCQEAAAAHUmVpc3N1ZQAAAAMFAAAABmV0VVNETgUAAAAFdG9Jc3MGBAAAAAN0cngJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAAFdG9Jc3MFAAAABmV0VVNETgkABEwAAAACBQAAAAFyCQAETAAAAAIFAAAAA3RyeAUAAAADbmlsAAAAAWkBAAAAB3Vuc3Rha2UAAAAABAAAAANwbXQJAQAAAAV2YWx1ZQAAAAEJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAEAAAAA2FtdAgFAAAAA3BtdAAAAAZhbW91bnQDCQEAAAACIT0AAAACCAUAAAADcG10AAAAB2Fzc2V0SWQFAAAABmV0VVNETgkAAAIAAAABAgAAABhJbnZhbGlkIHBheW1lbnQgYXR0YWNoZWQDCQAAZwAAAAIAAAAAAAAAAAAFAAAAA2FtdAkAAAIAAAABAgAAAA5JbnZhbGlkIGFtb3VudAQAAAAEdG9QQgkAAGkAAAACBQAAAANhbXQAAAAAAAAAAGQEAAAAA2JybgkBAAAABEJ1cm4AAAACBQAAAAZldFVTRE4FAAAAA2FtdAQAAAACcGIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAAEdG9QQgUAAAAEVVNETgkABEwAAAACBQAAAANicm4JAARMAAAAAgUAAAACcGIFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5sFOYnQ==",
"height": 3128047,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 9ZfEVWmLwA96gEn4dPJw1sDGko577WtGL2KYGfo2sbnR
Next: 5ZARSKstubsn2Y2W9GDf7fyG3rvXw3ZfWFYvrJF96mgs
Diff:
Old | New | | Differences |
---|
24 | 24 | | } |
---|
25 | 25 | | |
---|
26 | 26 | | |
---|
27 | | - | @Verifier(j) |
---|
28 | | - | func k () = sigVerify(j.bodyBytes, j.proofs[0], j.senderPublicKey) |
---|
| 27 | + | |
---|
| 28 | + | @Callable(d) |
---|
| 29 | + | func unstake () = { |
---|
| 30 | + | let e = value(d.payments[0]) |
---|
| 31 | + | let j = e.amount |
---|
| 32 | + | if ((e.assetId != b)) |
---|
| 33 | + | then throw("Invalid payment attached") |
---|
| 34 | + | else if ((0 >= j)) |
---|
| 35 | + | then throw("Invalid amount") |
---|
| 36 | + | else { |
---|
| 37 | + | let k = (j / 100) |
---|
| 38 | + | let l = Burn(b, j) |
---|
| 39 | + | let m = ScriptTransfer(d.caller, k, a) |
---|
| 40 | + | [l, m] |
---|
| 41 | + | } |
---|
| 42 | + | } |
---|
| 43 | + | |
---|
| 44 | + | |
---|
| 45 | + | @Verifier(n) |
---|
| 46 | + | func o () = sigVerify(n.bodyBytes, n.proofs[0], n.senderPublicKey) |
---|
29 | 47 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let a = base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p' |
---|
5 | 5 | | |
---|
6 | 6 | | let b = base58'F47VT8nxzUzUM8ZCyTouK8mjtVuLkAj914NRdXoCnYcq' |
---|
7 | 7 | | |
---|
8 | 8 | | let c = false |
---|
9 | 9 | | |
---|
10 | 10 | | @Callable(d) |
---|
11 | 11 | | func stake () = { |
---|
12 | 12 | | let e = value(d.payments[0]) |
---|
13 | 13 | | let f = e.amount |
---|
14 | 14 | | if ((e.assetId != a)) |
---|
15 | 15 | | then throw("Invalid token") |
---|
16 | 16 | | else if (c) |
---|
17 | 17 | | then throw("dApp is stopped") |
---|
18 | 18 | | else { |
---|
19 | 19 | | let g = (f * 100) |
---|
20 | 20 | | let h = Reissue(b, g, true) |
---|
21 | 21 | | let i = ScriptTransfer(d.caller, g, b) |
---|
22 | 22 | | [h, i] |
---|
23 | 23 | | } |
---|
24 | 24 | | } |
---|
25 | 25 | | |
---|
26 | 26 | | |
---|
27 | | - | @Verifier(j) |
---|
28 | | - | func k () = sigVerify(j.bodyBytes, j.proofs[0], j.senderPublicKey) |
---|
| 27 | + | |
---|
| 28 | + | @Callable(d) |
---|
| 29 | + | func unstake () = { |
---|
| 30 | + | let e = value(d.payments[0]) |
---|
| 31 | + | let j = e.amount |
---|
| 32 | + | if ((e.assetId != b)) |
---|
| 33 | + | then throw("Invalid payment attached") |
---|
| 34 | + | else if ((0 >= j)) |
---|
| 35 | + | then throw("Invalid amount") |
---|
| 36 | + | else { |
---|
| 37 | + | let k = (j / 100) |
---|
| 38 | + | let l = Burn(b, j) |
---|
| 39 | + | let m = ScriptTransfer(d.caller, k, a) |
---|
| 40 | + | [l, m] |
---|
| 41 | + | } |
---|
| 42 | + | } |
---|
| 43 | + | |
---|
| 44 | + | |
---|
| 45 | + | @Verifier(n) |
---|
| 46 | + | func o () = sigVerify(n.bodyBytes, n.proofs[0], n.senderPublicKey) |
---|
29 | 47 | | |
---|