tx · 29zsCWRgRdbFsiGkan944vy1JHEz2bp89zXwiGYG4k5G
3NB9QGKiAF3B8wiJZbRd2PfWJAX3rasvCAX: -0.00700000 Waves
2022.07.16 22:17 [2142714] smart account 3NB9QGKiAF3B8wiJZbRd2PfWJAX3rasvCAX > SELF 0.00000000 Waves
{
"type": 13,
"id": "29zsCWRgRdbFsiGkan944vy1JHEz2bp89zXwiGYG4k5G",
"fee": 700000,
"feeAssetId": null,
"timestamp": 1657999040167,
"version": 2,
"chainId": 84,
"sender": "3NB9QGKiAF3B8wiJZbRd2PfWJAX3rasvCAX",
"senderPublicKey": "25HKr2HEfEF45LGmh3fFPR4WDxgLz6p97kmgYdD4nGtX",
"proofs": [
"WsMhbfec5T8yKtD1aitdDXVLnNGRDbxB1vzPXUQJiSXMU9KCtYPoVpooggg9NF8CwK1Qz8q44kiCxRtUoWJEbEM"
],
"script": "base64:AAIFAAAAAAAAAAYIAhIAEgAAAAALAAAAAAtiYXNlQXNzZXRJZAkAAlkAAAABAgAAACxINVVVdVBKN1dCWHpqZzZaMWFoQlV4ajdWV29WRkZmRzNCTXp5QUFuUld0NgAAAAAKbWluVG9IYXRjaAAAAAAAAA9CQAAAAAAJbWluVG9CdXJuAAAAAAAAAABkAAAAAA5wb3dlckFzc2V0TmFtZQIAAAAFQm9tYmEAAAAAC2Rlc2NyaXB0aW9uAgAAAAxCbGFtYmEgVG9rZW4AAAAABmtQb3dlcgIAAAAMcG93ZXJBc3NldElkAAAAAAhiYXNlRGVjaQAAAAAAAA9CQAAAAAAFcmF0aW8AAAAAAAAAAGQBAAAACWdldEFtb3VudAAAAAEAAAAIYW1vdW50SW4JAABrAAAAAwUAAAAIYW1vdW50SW4FAAAABXJhdGlvBQAAAAhiYXNlRGVjaQEAAAAMZ2V0T3V0QW1vdW50AAAAAQAAAAhhbW91bnRJbgkAAGgAAAACCQAAaQAAAAIJAABrAAAAAwUAAAAIYW1vdW50SW4AAAAAAAAAAFAAAAAAAAAAAGQFAAAABXJhd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AAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXmNa9iA",
"height": 2142714,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 3EDYFQ5Vaem2Fh6DcwcybfMjKtX9vT2ULTSwkfRgfGi7
Next: 5NtNUCbK3A5P3HF6PdotyQJm6a3cHT6x1fBLCaMDZivs
Diff:
Old | New | | Differences |
---|
36 | 36 | | |
---|
37 | 37 | | @Callable(o) |
---|
38 | 38 | | func hatchDucks () = if ((o.payments[0].assetId != a)) |
---|
39 | | - | then throw("Only Bull EGG accepted!") |
---|
| 39 | + | then throw("Only BUGGS accepted!") |
---|
40 | 40 | | else if ((b > o.payments[0].amount)) |
---|
41 | | - | then throw("Min amount to invest is 100 Bull EGG") |
---|
| 41 | + | then throw("Min amount to invest is 100 BUGGS") |
---|
42 | 42 | | else if ((l() == "Start")) |
---|
43 | 43 | | then { |
---|
44 | 44 | | let p = Issue(d, e, i(o.payments[0].amount), 0, true) |
---|
45 | | - | [p, StringEntry(f, toBase58String(calculateAssetId(p)))] |
---|
| 45 | + | [p, StringEntry(f, toBase58String(calculateAssetId(p))), ScriptTransfer(o.caller, i(o.payments[0].amount), calculateAssetId(p))] |
---|
46 | 46 | | } |
---|
47 | 47 | | else { |
---|
48 | 48 | | let q = fromBase58String(l()) |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let a = fromBase58String("H5UUuPJ7WBXzjg6Z1ahBUxj7VWoVFFfG3BMzyAAnRWt6") |
---|
5 | 5 | | |
---|
6 | 6 | | let b = 1000000 |
---|
7 | 7 | | |
---|
8 | 8 | | let c = 100 |
---|
9 | 9 | | |
---|
10 | 10 | | let d = "Bomba" |
---|
11 | 11 | | |
---|
12 | 12 | | let e = "Blamba Token" |
---|
13 | 13 | | |
---|
14 | 14 | | let f = "powerAssetId" |
---|
15 | 15 | | |
---|
16 | 16 | | let g = 1000000 |
---|
17 | 17 | | |
---|
18 | 18 | | let h = 100 |
---|
19 | 19 | | |
---|
20 | 20 | | func i (j) = fraction(j, h, g) |
---|
21 | 21 | | |
---|
22 | 22 | | |
---|
23 | 23 | | func k (j) = ((fraction(j, 80, 100) / h) * g) |
---|
24 | 24 | | |
---|
25 | 25 | | |
---|
26 | 26 | | func l () = { |
---|
27 | 27 | | let m = getString(f) |
---|
28 | 28 | | if ($isInstanceOf(m, "String")) |
---|
29 | 29 | | then { |
---|
30 | 30 | | let n = m |
---|
31 | 31 | | n |
---|
32 | 32 | | } |
---|
33 | 33 | | else "Start" |
---|
34 | 34 | | } |
---|
35 | 35 | | |
---|
36 | 36 | | |
---|
37 | 37 | | @Callable(o) |
---|
38 | 38 | | func hatchDucks () = if ((o.payments[0].assetId != a)) |
---|
39 | | - | then throw("Only Bull EGG accepted!") |
---|
| 39 | + | then throw("Only BUGGS accepted!") |
---|
40 | 40 | | else if ((b > o.payments[0].amount)) |
---|
41 | | - | then throw("Min amount to invest is 100 Bull EGG") |
---|
| 41 | + | then throw("Min amount to invest is 100 BUGGS") |
---|
42 | 42 | | else if ((l() == "Start")) |
---|
43 | 43 | | then { |
---|
44 | 44 | | let p = Issue(d, e, i(o.payments[0].amount), 0, true) |
---|
45 | | - | [p, StringEntry(f, toBase58String(calculateAssetId(p)))] |
---|
| 45 | + | [p, StringEntry(f, toBase58String(calculateAssetId(p))), ScriptTransfer(o.caller, i(o.payments[0].amount), calculateAssetId(p))] |
---|
46 | 46 | | } |
---|
47 | 47 | | else { |
---|
48 | 48 | | let q = fromBase58String(l()) |
---|
49 | 49 | | [Reissue(q, i(o.payments[0].amount), true), ScriptTransfer(o.caller, i(o.payments[0].amount), q)] |
---|
50 | 50 | | } |
---|
51 | 51 | | |
---|
52 | 52 | | |
---|
53 | 53 | | |
---|
54 | 54 | | @Callable(o) |
---|
55 | 55 | | func burnDucks () = { |
---|
56 | 56 | | let q = fromBase58String(l()) |
---|
57 | 57 | | if ((o.payments[0].assetId != q)) |
---|
58 | 58 | | then throw("Only Bomba accepted!") |
---|
59 | 59 | | else if ((c > o.payments[0].amount)) |
---|
60 | 60 | | then throw("Min amount to burn is 100 Bomba") |
---|
61 | 61 | | else [Burn(q, o.payments[0].amount), ScriptTransfer(o.caller, k(o.payments[0].amount), a)] |
---|
62 | 62 | | } |
---|
63 | 63 | | |
---|
64 | 64 | | |
---|
65 | 65 | | @Verifier(r) |
---|
66 | 66 | | func s () = sigVerify(r.bodyBytes, r.proofs[0], r.senderPublicKey) |
---|
67 | 67 | | |
---|