tx · Gb8ZmUcyCLR8EZJtesGyqWMTb6kG4VSazixu4xhE33JV

3NCy4rT9no9CGLr89UrnyH8s75P8JjkSap8:  -0.01400000 Waves

2020.12.08 19:59 [1299955] smart account 3NCy4rT9no9CGLr89UrnyH8s75P8JjkSap8 > SELF 0.00000000 Waves

{ "type": 13, "id": "Gb8ZmUcyCLR8EZJtesGyqWMTb6kG4VSazixu4xhE33JV", "fee": 1400000, "feeAssetId": null, "timestamp": 1607446785047, "version": 2, "chainId": 84, "sender": "3NCy4rT9no9CGLr89UrnyH8s75P8JjkSap8", "senderPublicKey": "62prNgRbWHRQAXh3a5sG95EtrJoYEsuUAgwkg3F4Kt6k", "proofs": [ "dPtbvt1XB912rgTHWzas1awScj1tNdBa9LXLJuX19ikkzjQrrX9wkmkVX1V76Ms5353TerFGuYcWcnyzJksLXKC" ], "script": "base64:AAIDAAAAAAAAAAcIARIDCgEIAAAABAAAAAAHYW5zd2VycwkABEwAAAACAgAAAAlUbyBwZXduZS4JAARMAAAAAgIAAAARWmRlY3lkb3dhbmllIHRhay4JAARMAAAAAgIAAAAPQmV6IHfEhXRwaWVuaWEuCQAETAAAAAICAAAAE1RhayAtIHpkZWN5ZG93YW5pZS4JAARMAAAAAgIAAAAYTW/FvGVzeiBuYSB0eW0gcG9sZWdhxIcuCQAETAAAAAICAAAAFlRhaywgamFrIGphIHRvIHdpZHrEmS4JAARMAAAAAgIAAAATTmFqcHJhd2RvcG9kb2JuaWVqLgkABEwAAAACAgAAABJEb2JyZSBwZXJzcGVrdHl3eS4JAARMAAAAAgIAAAAEVGFrLgkABEwAAAACAgAAABlabmFraSB3c2thenVqxIVjZSBuYSB0YWsuCQAETAAAAAICAAAAJk9kcG93aWVkeiBuaWVqYXNubywgc3Byw7NidWogcG9ub3duaWUuCQAETAAAAAICAAAAEVphcHl0YWogcMOzem5pZWouCQAETAAAAAICAAAAHExlcGllaiBjaSB0ZXJheiBuaWUgbcOzd2nEhy4JAARMAAAAAgIAAAAeTmllIG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dlcgAAAAEFAAAADWNhbGxlckFkZHJlc3MJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgUAAAANY2FsbGVyQWRkcmVzcwIAAAACX3EFAAAACHF1ZXN0aW9uCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIFAAAADWNhbGxlckFkZHJlc3MCAAAAAl9hBQAAAAZhbnN3ZXIFAAAAA25pbAAAAACp9R2N", "height": 1299955, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5VuuFsdqbcQuEKHUNB1Wx7pyGxGR5sS3hocoDjoipkEK Next: CjNQTyWANXVGaMb2utJFUyGscZdRAYbai5G3BeATmM8q Diff:
OldNewDifferences
2121
2222
2323 @Callable(i)
24-func tellme (question) = {
24+func Dajodpowiedz (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 tellme (question) = {
24+func Dajodpowiedz (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 
32.51 ms