tx · CjNQTyWANXVGaMb2utJFUyGscZdRAYbai5G3BeATmM8q

3NCy4rT9no9CGLr89UrnyH8s75P8JjkSap8:  -0.01400000 Waves

2020.12.08 20:02 [1299958] smart account 3NCy4rT9no9CGLr89UrnyH8s75P8JjkSap8 > SELF 0.00000000 Waves

{ "type": 13, "id": "CjNQTyWANXVGaMb2utJFUyGscZdRAYbai5G3BeATmM8q", "fee": 1400000, "feeAssetId": null, "timestamp": 1607446940141, "version": 2, "chainId": 84, "sender": "3NCy4rT9no9CGLr89UrnyH8s75P8JjkSap8", "senderPublicKey": "62prNgRbWHRQAXh3a5sG95EtrJoYEsuUAgwkg3F4Kt6k", "proofs": [ "3WLCjEN2ne2qc8JPvZ4J2syXaSu97qMYKTLGWzupb7JGm2QucRx5h1knT3rEMo3TtwsVPvyDt7GGoQeAx1FcPMQb" ], "script": "base64:AAIDAAAAAAAAAAcIARIDCgEIAAAABAAAAAAHYW5zd2VycwkABEwAAAACAgAAAAlUbyBwZXduZS4JAARMAAAAAgIAAAARWmRlY3lkb3dhbmllIHRhay4JAARMAAAAAgIAAAAPQmV6IHfEhXRwaWVuaWEuCQAETAAAAAICAAAAE1RhayAtIHpkZWN5ZG93YW5pZS4JAARMAAAAAgIAAAAYTW/FvGVzeiBuYSB0eW0gcG9sZWdhxIcuCQAETAAAAAICAAAAFlRhaywgamFrIGphIHRvIHdpZHrEmS4JAARMAAAAAgIAAAATTmFqcHJhd2RvcG9kb2JuaWVqLgkABEwAAAACAgAAABJEb2JyZSBwZXJzcGVrdHl3eS4JAARMAAAAAgIAAAAEVGFrLgkABEwAAAACAgAAABlabmFraSB3c2thenVqxIVjZSBuYSB0YWsuCQAETAAAAAICAAAAJk9kcG93aWVkeiBuaWVqYXNubywgc3Byw7NidWogcG9ub3duaWUuCQAETAAAAAICAAAAEVphcHl0YWogcMOzem5pZWouCQAETAAAAAICAAAAHExlcGllaiBjaSB0ZXJheiBuaWUgbcOzd2nEhy4JAARMAAAAAgIAAAAeTmllI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Fuc3dlcgAAAAEFAAAADWNhbGxlckFkZHJlc3MJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgUAAAANY2FsbGVyQWRkcmVzcwIAAAACX3EFAAAACHF1ZXN0aW9uCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIFAAAADWNhbGxlckFkZHJlc3MCAAAAAl9hBQAAAAZhbnN3ZXIFAAAAA25pbAAAAADyVexm", "height": 1299958, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Gb8ZmUcyCLR8EZJtesGyqWMTb6kG4VSazixu4xhE33JV Next: 9K3aLgezDfNcFfdV2PHNBbmqU2bFaBCuzG1fhMN6WzWz Diff:
OldNewDifferences
2121
2222
2323 @Callable(i)
24-func Dajodpowiedz (question) = {
24+func Zadajpytanie (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)])
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let answers = ["To pewne.", "Zdecydowanie tak.", "Bez wątpienia.", "Tak - zdecydowanie.", "Możesz na tym polegać.", "Tak, jak ja to widzę.", "Najprawdopodobniej.", "Dobre perspektywy.", "Tak.", "Znaki wskazujące na tak.", "Odpowiedz niejasno, spróbuj ponownie.", "Zapytaj pózniej.", "Lepiej ci teraz nie mówić.", "Nie można teraz przewidzieć.", "Skoncentruj się i zapytaj ponownie.", "Nie licz na to.", "Moja odpowiedź brzmi: nie", "Moje źródła mówią nie.", "Perspektywa niezbyt dobra.", "Bardzo wątpliwe."]
55
66 let answersCount = size(answers)
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)
24-func Dajodpowiedz (question) = {
24+func Zadajpytanie (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 
50.42 ms