tx · CMBEqtG374rPsE7jJhjsXjQLKcq5tjgJXsRFxGCoAGXA

3Mvqg45GNNEhYssByz8tT6BECpZd8wKyuki:  -0.00100000 Waves

2024.07.05 19:48 [3180959] smart account 3Mvqg45GNNEhYssByz8tT6BECpZd8wKyuki > SELF 0.00000000 Waves

{ "type": 13, "id": "CMBEqtG374rPsE7jJhjsXjQLKcq5tjgJXsRFxGCoAGXA", "fee": 100000, "feeAssetId": null, "timestamp": 1720198149378, "version": 2, "chainId": 84, "sender": "3Mvqg45GNNEhYssByz8tT6BECpZd8wKyuki", "senderPublicKey": "Em3xR3qCDVUJh4RYP61j2iaMKdEHYvyYEA4kmBMKQHLd", "proofs": [ "5hDTCZPVQWk6hXLp9o9zUw6P6iTh3M2moWJCmh2kUzWCA1cyGdw25zDGs3QUmiT4rV3ZG8srgXRMdXqPPQnvh5qb" ], "script": "base64:BgIHCAISAwoBCAABAWkBCmhlbGxvV29ybGQBBG5hbWUJAMwIAgkBC1N0cmluZ0VudHJ5AgIGYW5zd2VyCQCsAgICFEhlbGxvIFdvcmxkISBIZWxsbywgBQRuYW1lBQNuaWwAI7p6zA==", "height": 3180959, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2jV2dYmoJ4PDpasS82R7Td6TJNtLVeTMPLZ6tP7nx6T8 Next: 6Pxj4RNycfnfknmUtGfDT5pCbYakMbYPaDckqcmEDQiT Full:
OldNewDifferences
1-{-# STDLIB_VERSION 5 #-}
1+{-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# 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-}
214
225
236 @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)]
28- }
7+func helloWorld (name) = [StringEntry("answer", ("Hello World! Hello, " + name))]
298
309

github/deemru/w8io/169f3d6 
31.79 ms