tx · 7Lf2QHwsdUzxUnm7t95k85jnQ4mK1bCG2LJGXmWDCqBf 3Mp4QVcFQTst1LQknzmHbTRGPxtdFurqN9u: -0.00100000 Waves 2024.11.12 20:16 [3368503] smart account 3Mp4QVcFQTst1LQknzmHbTRGPxtdFurqN9u > SELF 0.00000000 Waves
{ "type": 13, "id": "7Lf2QHwsdUzxUnm7t95k85jnQ4mK1bCG2LJGXmWDCqBf", "fee": 100000, "feeAssetId": null, "timestamp": 1731431824586, "version": 2, "chainId": 84, "sender": "3Mp4QVcFQTst1LQknzmHbTRGPxtdFurqN9u", "senderPublicKey": "E7dZyomJa9gkLg3uDyfg98ZTqPsVm1JKmq3NMRRDNy6z", "proofs": [ "3wXkXKEc9reLsEnWjWpXY1d1p1hPe3Ymzag8od64JjLU16hiCM2tmqf5E1LjkpbRqV2Uo3svNqbpdHaFLayj6fLv" ], "script": "base64:AAIEAAAAAAAAAAQIAhIAAAAAAAAAAAEAAAABaQEAAAAKaGVsbG9Xb3JsZAAAAAAEAAAAB21lc3NhZ2UCAAAADUhlbGxvLCBXb3JsZCEJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgIAAAAHbWVzc2FnZQUAAAAHbWVzc2FnZQUAAAADbmlsAAAAAM4twQQ=", "height": 3368503, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7bgDHKA3s1H7ZfkdPr2dGQh5BhhHhBSDURtrFHLEjoNX Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let answersCount = 20 | |
5 | - | ||
6 | - | 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."] | |
7 | - | ||
8 | - | func getAnswer (question,previousAnswer) = { | |
9 | - | let hash = sha256(toBytes((question + previousAnswer))) | |
10 | - | let index = toInt(hash) | |
11 | - | answers[(index % answersCount)] | |
12 | - | } | |
13 | - | ||
14 | - | ||
15 | - | func getPreviousAnswer (address) = match getString(this, (address + "_a")) { | |
16 | - | case a: String => | |
17 | - | a | |
18 | - | case _ => | |
19 | - | address | |
20 | - | } | |
21 | 4 | ||
22 | 5 | ||
23 | 6 | @Callable(i) | |
24 | - | func tellme (question) = { | |
25 | - | let callerAddress = toBase58String(i.caller.bytes) | |
26 | - | let answer = getAnswer(question, getPreviousAnswer(callerAddress)) | |
27 | - | [StringEntry((callerAddress + "_q"), question), StringEntry((callerAddress + "_a"), answer)] | |
7 | + | func helloWorld () = { | |
8 | + | let message = "Hello, World!" | |
9 | + | [StringEntry("message", message)] | |
28 | 10 | } | |
29 | 11 | ||
30 | 12 |
github/deemru/w8io/026f985 29.26 ms ◑