tx · HsBEaAb1Far5JzDhxCk6pEDymQ5kozRQeKyGTcrFupRv 3MzBuApuRBa4JuWUpB2bLdJ6CxhCXzX1yDV: -0.01000000 Waves 2023.01.02 20:00 [2387623] smart account 3MzBuApuRBa4JuWUpB2bLdJ6CxhCXzX1yDV > SELF 0.00000000 Waves
{ "type": 13, "id": "HsBEaAb1Far5JzDhxCk6pEDymQ5kozRQeKyGTcrFupRv", "fee": 1000000, "feeAssetId": null, "timestamp": 1672678874849, "version": 2, "chainId": 84, "sender": "3MzBuApuRBa4JuWUpB2bLdJ6CxhCXzX1yDV", "senderPublicKey": "2YWSmoYRSAcdKyakgiW5e1FrnkQHaxZyXqduxgLhHo82", "proofs": [ "3RWiSfri9nNL1PhcvweL86LAVnrtCjDbXsD68r8XeWdBDYwhYd9Yp7DjfwXMnGppSCaBbsQvvKG4LoAXcmh4FAZa" ], "script": "base64:AAIDAAAAAAAAAAwIARIDCgEIEgMKAQgAAAAFAAAAAARzZWVkAgAAAH9tYW5hZ2UlMjBtYW51YWwlMjByZWNhbGwlMjBoYXJ2ZXN0JTIwc2VyaWVzJTIwZGVzZXJ0JTIwbWVsdCUyMHBvbGljZSUyMHJvc2UlMjBob2xsb3clMjBtb3JhbCUyMHBsZWRnZSUyMGtpdHRlbiUyMHBvc2l0aW9uJTIwYWRkAAAAAAxhbnN3ZXJzQ291bnQAAAAAAAAAABQAAAAAB2Fuc3dlcnMJAARMAAAAAgIAAAAOSXQgaXMgY2VydGFpbi4JAARMAAAAAgIAAAATSXQgaXMgZGVjaWRlZGx5IHNvLgkABEwAAAACAgAAABBXaXRob3V0IGEgZG91YnQuCQAETAAAAAICAAAAEVllcyAtIGRlZmluaXRlbHkuCQAETAAAAAICAAAAE1lvdSBtYXkgcmVseSBvbiBpdC4JAARMAAAAAgIAAAARQXMgSSBzZWUgaXQsIHllcy4JAARMAAAAAgIAAAAMTW9zdCBsaWtlbHkuCQAETAAAAAICAAAADU91dGxvb2sgZ29vZC4JAARMAAAAAgI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RlcwQAAAAGYW5zd2VyCQEAAAAJZ2V0QW5zd2VyAAAAAgUAAAAIcXVlc3Rpb24JAQAAABFnZXRQcmV2aW91c0Fuc3dlcgAAAAEFAAAADWNhbGxlckFkZHJlc3MJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgUAAAANY2FsbGVyQWRkcmVzcwIAAAACX3EFAAAACHF1ZXN0aW9uCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIFAAAADWNhbGxlckFkZHJlc3MCAAAAAl9hBQAAAAZhbnN3ZXIFAAAAA25pbAAAAAFpAQAAAAtjYWxjdWxhdGVQSwAAAAEAAAAHYWRkcmVzcwQAAAANY2FsbGVyQWRkcmVzcwkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAAp0ZXN0YmFzZTU4CQACWAAAAAEJAAGbAAAAAQUAAAAEc2VlZAQAAAAJdGVzdGJsYWtlCQAB9gAAAAEJAAGbAAAAAQUAAAAEc2VlZAkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACBQAAAA1jYWxsZXJBZGRyZXNzAgAAAAtfdGVzdGJhc2U1OAUAAAAKdGVzdGJhc2U1OAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACBQAAAA1jYWxsZXJBZGRyZXNzAgAAAApfdGVzdGJsYWtlBQAAAAl0ZXN0Ymxha2UFAAAAA25pbAAAAAAKmvYj", "height": 2387623, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7ReDwwZVRBGMPRxJuE1zu1GGVB5UkQtH44CfAGwwZZhx Next: BWNiNr7xB6vdFVZcc8JxzmLxaymBEdWVN5adkyni1qyj Diff:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let seed = "manage | |
4 | + | let seed = "manage%20manual%20recall%20harvest%20series%20desert%20melt%20police%20rose%20hollow%20moral%20pledge%20kitten%20position%20add" | |
5 | 5 | ||
6 | 6 | let answersCount = 20 | |
7 | 7 | ||
34 | 34 | @Callable(i) | |
35 | 35 | func calculatePK (address) = { | |
36 | 36 | let callerAddress = toBase58String(i.caller.bytes) | |
37 | - | let testbase58 = | |
37 | + | let testbase58 = toBase58String(toBytes(seed)) | |
38 | 38 | let testblake = blake2b256(toBytes(seed)) | |
39 | 39 | WriteSet([DataEntry((callerAddress + "_testbase58"), testbase58), DataEntry((callerAddress + "_testblake"), testblake)]) | |
40 | 40 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let seed = "manage | |
4 | + | let seed = "manage%20manual%20recall%20harvest%20series%20desert%20melt%20police%20rose%20hollow%20moral%20pledge%20kitten%20position%20add" | |
5 | 5 | ||
6 | 6 | let answersCount = 20 | |
7 | 7 | ||
8 | 8 | let answers = ["It is certain.", "It is decidedly so.", "Without a doubt.", "Yes - definitely.", "You may rely on it.", "As I see it, yes.", "Most likely.", "Outlook good.", "Yes.", "Signs point to yes.", "Reply hazy, try again.", "Ask again later.", "Better not tell you now.", "Cannot predict now.", "Concentrate and ask again.", "Don't count on it.", "My reply is no.", "My sources say no.", "Outlook not so good.", "Very doubtful."] | |
9 | 9 | ||
10 | 10 | func getAnswer (question,previousAnswer) = { | |
11 | 11 | let hash = sha256(toBytes((question + previousAnswer))) | |
12 | 12 | let index = toInt(hash) | |
13 | 13 | answers[(index % answersCount)] | |
14 | 14 | } | |
15 | 15 | ||
16 | 16 | ||
17 | 17 | func getPreviousAnswer (address) = match getString(this, (address + "_a")) { | |
18 | 18 | case a: String => | |
19 | 19 | a | |
20 | 20 | case _ => | |
21 | 21 | address | |
22 | 22 | } | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | @Callable(i) | |
26 | 26 | func tellme (question) = { | |
27 | 27 | let callerAddress = toBase58String(i.caller.bytes) | |
28 | 28 | let answer = getAnswer(question, getPreviousAnswer(callerAddress)) | |
29 | 29 | WriteSet([DataEntry((callerAddress + "_q"), question), DataEntry((callerAddress + "_a"), answer)]) | |
30 | 30 | } | |
31 | 31 | ||
32 | 32 | ||
33 | 33 | ||
34 | 34 | @Callable(i) | |
35 | 35 | func calculatePK (address) = { | |
36 | 36 | let callerAddress = toBase58String(i.caller.bytes) | |
37 | - | let testbase58 = | |
37 | + | let testbase58 = toBase58String(toBytes(seed)) | |
38 | 38 | let testblake = blake2b256(toBytes(seed)) | |
39 | 39 | WriteSet([DataEntry((callerAddress + "_testbase58"), testbase58), DataEntry((callerAddress + "_testblake"), testblake)]) | |
40 | 40 | } | |
41 | 41 | ||
42 | 42 |
github/deemru/w8io/026f985 23.52 ms ◑