tx · 7Fwhch92Hj3AF6htUooFvf1EkPkA8xjA4W1jAfR8dBAR

3MtDKRU4SfRgq7iGHxEBgXixQdh3qRz2LZo:  -0.00200000 Waves

2022.09.29 21:13 [2250744] smart account 3MtDKRU4SfRgq7iGHxEBgXixQdh3qRz2LZo > SELF 0.00000000 Waves

{ "type": 13, "id": "7Fwhch92Hj3AF6htUooFvf1EkPkA8xjA4W1jAfR8dBAR", "fee": 200000, "feeAssetId": null, "timestamp": 1664475205881, "version": 2, "chainId": 84, "sender": "3MtDKRU4SfRgq7iGHxEBgXixQdh3qRz2LZo", "senderPublicKey": "7kPrbTLQzALZFZhZCkjxnsdGsJxUNd6ojWUjn11doVse", "proofs": [ "2nR4YyzngiT2Dh1ihW7NHT8NrX5W6quBHngtxkGHLtJ48unbk4wuMP3TKSUi7ykSm2U9kicj2N7b2ZiDYW99QoFF" ], "script": "base64:AAIDAAAAAAAAAAcIARIDCgEIAAAABAAAAAAMYW5zd2Vyc0NvdW50AAAAAAAAAAAUAAAAAAdhbnN3ZXJzCQAETAAAAAICAAAADkl0IGlzIGNlcnRhaW4uCQAETAAAAAICAAAAE0l0IGlzIGRlY2lkZWRseSBzby4JAARMAAAAAgIAAAAQV2l0aG91dCBhIGRvdWJ0LgkABEwAAAACAgAAABFZZXMgLSBkZWZpbml0ZWx5LgkABEwAAAACAgAAABNZb3UgbWF5IHJlbHkgb24gaXQuCQAETAAAAAICAAAAEUFzIEkgc2VlIGl0LCB5ZXMuCQAETAAAAAICAAAADE1vc3QgbGlrZWx5LgkABEwAAAACAgAAAA1PdXRsb29rIGdvb2QuCQAETAAAAAICAAAABFllcy4JAARMAAAAAgIAAAATU2lnbnMgcG9pbnQgdG8geWVzLgkABEwAAAACAgAAABZSZXBseSBoYXp5LCB0cnkgYWdhaW4uCQAETAAAAAICAAAAEEFzayBhZ2FpbiBsYXRlci4JAARMAAAAAgIAAAAYQmV0dGVyIG5vdCB0ZWxsIHlvdSBub3cuCQAETAAAAAICAAAAE0N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FAAAADWNhbGxlckFkZHJlc3MCAAAAAl9xBQAAAAhxdWVzdGlvbgkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACBQAAAA1jYWxsZXJBZGRyZXNzAgAAAAJfYQUAAAAGYW5zd2VyBQAAAANuaWwAAAAAOvBJMA==", "height": 2250744, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: KjY6ArNYDuWmt9AU3utDnj1qkvjo39xetgCMnvkFHtg Next: 5HBQy1jTfbMo14RaZySgKDzjUA6ecAGHVkLYwJqVXq4T Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let answersCount = 20
55
66 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."]
77
88 func getAnswer (question,previousAnswer) = {
99 let hash = sha256(toBytes((question + previousAnswer)))
1010 let index = toInt(hash)
1111 answers[(index % answersCount)]
1212 }
1313
1414
1515 func getPreviousAnswer (address) = match getString(this, (address + "_a")) {
1616 case a: String =>
1717 a
1818 case _ =>
1919 address
2020 }
2121
2222
2323 @Callable(i)
2424 func tellme (question) = {
2525 let callerAddress = toBase58String(i.caller.bytes)
2626 let answer = getAnswer(question, getPreviousAnswer(callerAddress))
2727 WriteSet([DataEntry((callerAddress + "_q"), question), DataEntry((callerAddress + "_a"), answer)])
2828 }
2929
3030

github/deemru/w8io/026f985 
26.91 ms