tx · EsReM4XWYiefaggUJevHyUvvpKGRBhqnpWutAe9U8Fw4 3MyYckPLvxVKaoywB9DyoUQpy4rPbG44W2G: -0.04200000 Waves 2022.06.21 14:06 [2106072] smart account 3MyYckPLvxVKaoywB9DyoUQpy4rPbG44W2G > SELF 0.00000000 Waves
{ "type": 13, "id": "EsReM4XWYiefaggUJevHyUvvpKGRBhqnpWutAe9U8Fw4", "fee": 4200000, "feeAssetId": null, "timestamp": 1655809657037, "version": 2, "chainId": 84, "sender": "3MyYckPLvxVKaoywB9DyoUQpy4rPbG44W2G", "senderPublicKey": "GSE3xef7yPJM86RK98TTRpNp7C67yeMHAkciapPuU56K", "proofs": [ "26TAVKRjPxdq2qdaR9ky7G7MQa845D5Fg2eUCxJ6fDjad4dKq27ftqDMbTX8ZJjMzUfVeyRmTnv8rpLABJxECRoQ" ], "script": "base64:AAIFAAAAAAAAAAYIAhIAEgAAAAAEAAAAAAJ0dwEAAAAaAVQ+7YEH8mRvE3c0tbqpeHlZj6y6IMZvhw8AAAAAAkJBAQAAACCMCWI0B6uy2aH1YA8IDoXmh9Ymmpl0HityIO+TCT8VJQAAAAADVENJAQAAACC+QxgAujAmMp9Bgik1StjQaVZeQEXcnOB8P3E0N8Qy/AAAAAAJaXNTdG9wcGVkBwAAAAIAAAABaQEAAAAFc3Rha2UAAAAABAAAAANwbXQJAQAAAAV2YWx1ZQAAAAEJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAEAAAACXBtdEFtb3VudAgFAAAAA3BtdAAAAAZhbW91bnQDCQEAAAACIT0AAAACCAUAAAADcG10AAAAB2Fzc2V0SWQFAAAAAkJBCQAAAgAAAAECAAAAGFlvdSBjYW4gc3Rha2Ugc05TQlQgb25seQMFAAAACWlzU3RvcHBlZAkAAAIAAAABAgAAABlzbWFydCBjb250cmFjdCBpcyBvbiBsb2NrBAAAAAppblRyZWFzdXJ5CQAD8AAAAAIFAAAABHRoaXMFAAAAAkJBBAAAAAt0b3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AABnAAAAAgAAAAAAAAAAAAUAAAAHYmFsYW5jZQkAAAIAAAABAgAAABtVbnN1ZmljaWVudCBhY2NvdW50IGJhbGFuY2UEAAAACVRDSUFtb3VudAQAAAAHJG1hdGNoMAkAA+wAAAABBQAAAANUQ0kDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABUFzc2V0BAAAAAFxBQAAAAckbWF0Y2gwCAUAAAABcQAAAAhxdWFudGl0eQAAAAAAAAAAAAQAAAACdnAJAABrAAAAAwkAA/AAAAACBQAAAAR0aGlzBQAAAAJCQQAAAAAABfXhAAUAAAAJVENJQW1vdW50BAAAAAV0b1JlcAkAAGsAAAADBQAAAAJ2cAUAAAAGYW1vdW50AAAAAAAF9eEABAAAAAJ0YwkAAGsAAAADBQAAAAV0b1JlcAAAAAAABfXhAAAAAAACVAvkAAQAAAADYnJuCQEAAAAEQnVybgAAAAIFAAAAA1RDSQUAAAAGYW1vdW50BAAAAAN0cmIJAABlAAAAAgUAAAAFdG9SZXAFAAAAAnRjBAAAAAR0cnNmCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAAA3RyYgUAAAACQkEEAAAAA3R0cgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAB0FkZHJlc3MAAAABBQAAAAJ0dwUAAAACdGMFAAAAAkJBCQAETAAAAAIFAAAAA2JybgkABEwAAAACBQAAAAR0cnNmCQAETAAAAAIFAAAAA3R0cgUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXlw7SdL", "height": 2106072, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BG4k9JGedSbTfMmd43MsDer4cnGBHv54hoAksapcjqaw Next: none Diff:
Old | New | Differences | |
---|---|---|---|
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = base58'3MuepBtBCjoxHzt6z8cSKhcg7hps7AR9DoL' | |
5 | 5 | ||
6 | - | let b = base58' | |
6 | + | let b = base58'AReNqsLEzTufx73ftawaLcsDVAnvFjD2iVzzAE2CPXsS' | |
7 | 7 | ||
8 | 8 | let c = base58'DohoSLuGMXvefNR5eZmQbmas5amzdCkNY6DmfqgjfZ7q' | |
9 | 9 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = base58'3MuepBtBCjoxHzt6z8cSKhcg7hps7AR9DoL' | |
5 | 5 | ||
6 | - | let b = base58' | |
6 | + | let b = base58'AReNqsLEzTufx73ftawaLcsDVAnvFjD2iVzzAE2CPXsS' | |
7 | 7 | ||
8 | 8 | let c = base58'DohoSLuGMXvefNR5eZmQbmas5amzdCkNY6DmfqgjfZ7q' | |
9 | 9 | ||
10 | 10 | let d = false | |
11 | 11 | ||
12 | 12 | @Callable(e) | |
13 | 13 | func stake () = { | |
14 | 14 | let f = value(e.payments[0]) | |
15 | 15 | let g = f.amount | |
16 | 16 | if ((f.assetId != b)) | |
17 | 17 | then throw("You can stake sNSBT only") | |
18 | 18 | else if (d) | |
19 | 19 | then throw("smart contract is on lock") | |
20 | 20 | else { | |
21 | 21 | let h = assetBalance(this, b) | |
22 | 22 | let i = { | |
23 | 23 | let j = assetInfo(c) | |
24 | 24 | if ($isInstanceOf(j, "Asset")) | |
25 | 25 | then { | |
26 | 26 | let k = j | |
27 | 27 | k.quantity | |
28 | 28 | } | |
29 | 29 | else throw("Can't find asset") | |
30 | 30 | } | |
31 | 31 | let l = (h - g) | |
32 | 32 | let m = fraction(i, 100000000, l) | |
33 | 33 | let n = fraction(g, m, 100000000) | |
34 | 34 | let o = Reissue(c, n, true) | |
35 | 35 | let p = ScriptTransfer(e.caller, n, c) | |
36 | 36 | [o, p] | |
37 | 37 | } | |
38 | 38 | } | |
39 | 39 | ||
40 | 40 | ||
41 | 41 | ||
42 | 42 | @Callable(e) | |
43 | 43 | func withdraw () = { | |
44 | 44 | let q = value(e.payments[0]) | |
45 | 45 | let r = q.amount | |
46 | 46 | let s = assetBalance(e.caller, c) | |
47 | 47 | if ((q.assetId != c)) | |
48 | 48 | then throw("sdasda") | |
49 | 49 | else if ((0 >= r)) | |
50 | 50 | then throw("Can't withdraw 0 or negative ammount") | |
51 | 51 | else if ((0 >= s)) | |
52 | 52 | then throw("Unsuficient account balance") | |
53 | 53 | else { | |
54 | 54 | let t = { | |
55 | 55 | let j = assetInfo(c) | |
56 | 56 | if ($isInstanceOf(j, "Asset")) | |
57 | 57 | then { | |
58 | 58 | let u = j | |
59 | 59 | u.quantity | |
60 | 60 | } | |
61 | 61 | else 0 | |
62 | 62 | } | |
63 | 63 | let v = fraction(assetBalance(this, b), 100000000, t) | |
64 | 64 | let w = fraction(v, r, 100000000) | |
65 | 65 | let x = fraction(w, 100000000, 10000000000) | |
66 | 66 | let y = Burn(c, r) | |
67 | 67 | let z = (w - x) | |
68 | 68 | let A = ScriptTransfer(e.caller, z, b) | |
69 | 69 | let B = ScriptTransfer(Address(a), x, b) | |
70 | 70 | [y, A, B] | |
71 | 71 | } | |
72 | 72 | } | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | @Verifier(C) | |
76 | 76 | func D () = sigVerify(C.bodyBytes, C.proofs[0], C.senderPublicKey) | |
77 | 77 |
github/deemru/w8io/026f985 54.33 ms ◑