tx · 2UcBXMT46wmcqK3X5VDzvfEDApV4G1eB3Vb4LKzNDURh 3N1DKtRdvNzipWeZiDbEFCRYxGZ76iqrhS1: -0.01000000 Waves 2022.05.19 15:06 [2058529] smart account 3N1DKtRdvNzipWeZiDbEFCRYxGZ76iqrhS1 > SELF 0.00000000 Waves
{ "type": 13, "id": "2UcBXMT46wmcqK3X5VDzvfEDApV4G1eB3Vb4LKzNDURh", "fee": 1000000, "feeAssetId": null, "timestamp": 1652962035302, "version": 2, "chainId": 84, "sender": "3N1DKtRdvNzipWeZiDbEFCRYxGZ76iqrhS1", "senderPublicKey": "H6xi3hzbfgsNKAndcJRBjBFE7rgp25iHTGrzb1aWSjkj", "proofs": [ "2HQSubQS9PsvvEftFgvGjxiWqCQ3UijSykMRvu3o58GpHeCWfJ4PUXz4CzYsDyvDy8gcYgNUgtdQPPiCLznDP5gG" ], "script": "base64:AAIFAAAAAAAAAAYIAhIAEgAAAAAFAAAAAAV0b2tlbgEAAAAg202DNWRHG5bvnwwvoM991XmdkujhmzUPwT/MewJwKQsAAAAABWxwVENJAQAAACC3I9Min9ZEc0LtD36dTSYiI+4w5QbrFjr+TbENSNggWwAAAAAJaXNTdG9wcGVkBwAAAAAJa2V5U3Rha2VkAgAAAAlTVEFLRURfTFAAAAAAC2tleUNvbXBvdW5kAgAAAA1Gcm9tX0NvbXBvdW5kAAAAAgAAAAFpAQAAAAVzdGFrZQAAAAAEAAAAA3BtdAkBAAAABXZhbHVlAAAAAQkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAQAAAAJcG10QW1vdW50CAUAAAADcG10AAAABmFtb3VudAMJAQAAAAIhPQAAAAIIBQAAAANwbXQAAAAHYXNzZXRJZAUAAAAFdG9rZW4JAAACAAAAAQIAAAAdYXR0YWNoIFVTRFRVU0ROTFAgdG9rZW5zIG9ubHkDBQAAAAlpc1N0b3BwZWQJAAACAAAAAQIAAAAZc21hcnQgY29udHJhY3QgaXMgb24gbG9jawQAA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FsU3Rha2VkBQAAAAJjYQQAAAACdGMJAQAAAAxJbnRlZ2VyRW50cnkAAAACBQAAAAtrZXlDb21wb3VuZAkAAGQAAAACBQAAAAxmcm9tQ29tcG91bmQFAAAAAmNhCQAETAAAAAIFAAAAC3VwZGF0ZVN0YXRlCQAETAAAAAIFAAAAAnRjBQAAAANuaWwJAAACAAAAAQIAAAAkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAAAAAKDpFf4=", "height": 2058529, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 66Dn6ymqeNrfYCi27Y4JNUSQJzNcbqtpA7KVPwYbCpmU Next: 6iTSLZFJMBvWFWoMb7D2pqHHUG65wE7uu9vDzJYEQHsN Diff:
Old | New | Differences | |
---|---|---|---|
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = base58'Fm4qczu6Pepz8KUhh3Heb6LeTVfpSMX5vvNgw3x764CS' | |
5 | 5 | ||
6 | - | let b = base58' | |
6 | + | let b = base58'DKuHxDzSRjVW5MUhnHqPZDeztYcXvEzpAYNNLDWtb39c' | |
7 | 7 | ||
8 | 8 | let c = false | |
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'Fm4qczu6Pepz8KUhh3Heb6LeTVfpSMX5vvNgw3x764CS' | |
5 | 5 | ||
6 | - | let b = base58' | |
6 | + | let b = base58'DKuHxDzSRjVW5MUhnHqPZDeztYcXvEzpAYNNLDWtb39c' | |
7 | 7 | ||
8 | 8 | let c = false | |
9 | 9 | ||
10 | 10 | let d = "STAKED_LP" | |
11 | 11 | ||
12 | 12 | let e = "From_Compound" | |
13 | 13 | ||
14 | 14 | @Callable(f) | |
15 | 15 | func stake () = { | |
16 | 16 | let g = value(f.payments[0]) | |
17 | 17 | let h = g.amount | |
18 | 18 | if ((g.assetId != a)) | |
19 | 19 | then throw("attach USDTUSDNLP tokens only") | |
20 | 20 | else if (c) | |
21 | 21 | then throw("smart contract is on lock") | |
22 | 22 | else { | |
23 | 23 | let i = valueOrElse(getInteger(this, d), 100000000) | |
24 | 24 | let j = valueOrElse(getInteger(this, e), 0) | |
25 | 25 | let k = IntegerEntry(d, (i + f.payments[0].amount)) | |
26 | 26 | if ((k == k)) | |
27 | 27 | then { | |
28 | 28 | let l = { | |
29 | 29 | let m = assetInfo(b) | |
30 | 30 | if ($isInstanceOf(m, "Asset")) | |
31 | 31 | then { | |
32 | 32 | let n = m | |
33 | 33 | n.quantity | |
34 | 34 | } | |
35 | 35 | else throw("Can't find asset") | |
36 | 36 | } | |
37 | 37 | let o = fraction(l, 100000000, i) | |
38 | 38 | let p = fraction(h, o, 100000000) | |
39 | 39 | let q = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [g]) | |
40 | 40 | if ((q == q)) | |
41 | 41 | then { | |
42 | 42 | let r = Reissue(b, p, true) | |
43 | 43 | let s = ScriptTransfer(f.caller, p, b) | |
44 | 44 | [r, s, k] | |
45 | 45 | } | |
46 | 46 | else throw("Strict value is not equal to itself.") | |
47 | 47 | } | |
48 | 48 | else throw("Strict value is not equal to itself.") | |
49 | 49 | } | |
50 | 50 | } | |
51 | 51 | ||
52 | 52 | ||
53 | 53 | ||
54 | 54 | @Callable(f) | |
55 | 55 | func compound () = { | |
56 | 56 | let t = value(f.payments[0]) | |
57 | 57 | let u = t.amount | |
58 | 58 | if ((t.assetId != a)) | |
59 | 59 | then throw("attach USDTUSDNLP tokens only") | |
60 | 60 | else { | |
61 | 61 | let j = valueOrElse(getInteger(this, e), 0) | |
62 | 62 | let v = valueOrElse(getInteger(this, d), 0) | |
63 | 63 | let w = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [t]) | |
64 | 64 | if ((w == w)) | |
65 | 65 | then { | |
66 | 66 | let k = IntegerEntry(d, (v + u)) | |
67 | 67 | let x = IntegerEntry(e, (j + u)) | |
68 | 68 | [k, x] | |
69 | 69 | } | |
70 | 70 | else throw("Strict value is not equal to itself.") | |
71 | 71 | } | |
72 | 72 | } | |
73 | 73 | ||
74 | 74 |
github/deemru/w8io/169f3d6 26.26 ms ◑