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/FvGVzeiBuYSB0eW0gcG9sZWdhxIcuCQAETAAAAAICAAAAFlRhaywgamFrIGphIHRvIHdpZHrEmS4JAARMAAAAAgIAAAATTmFqcHJhd2RvcG9kb2JuaWVqLgkABEwAAAACAgAAABJEb2JyZSBwZXJzcGVrdHl3eS4JAARMAAAAAgIAAAAEVGFrLgkABEwAAAACAgAAABlabmFraSB3c2thenVqxIVjZSBuYSB0YWsuCQAETAAAAAICAAAAJk9kcG93aWVkeiBuaWVqYXNubywgc3Byw7NidWogcG9ub3duaWUuCQAETAAAAAICAAAAEVphcHl0YWogcMOzem5pZWouCQAETAAAAAICAAAAHExlcGllaiBjaSB0ZXJheiBuaWUgbcOzd2nEhy4JAARMAAAAAgIAAAAeTmllIG1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lcgAAAAEFAAAADWNhbGxlckFkZHJlc3MJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgUAAAANY2FsbGVyQWRkcmVzcwIAAAACX3EFAAAACHF1ZXN0aW9uCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIFAAAADWNhbGxlckFkZHJlc3MCAAAAAl9hBQAAAAZhbnN3ZXIFAAAAA25pbAAAAACp9R2N", "height": 1299955, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5VuuFsdqbcQuEKHUNB1Wx7pyGxGR5sS3hocoDjoipkEK Next: CjNQTyWANXVGaMb2utJFUyGscZdRAYbai5G3BeATmM8q Diff:
Old | New | Differences | |
---|---|---|---|
21 | 21 | ||
22 | 22 | ||
23 | 23 | @Callable(i) | |
24 | - | func | |
24 | + | func Dajodpowiedz (question) = { | |
25 | 25 | let callerAddress = toBase58String(i.caller.bytes) | |
26 | 26 | let answer = getAnswer(question, getPreviousAnswer(callerAddress)) | |
27 | 27 | WriteSet([DataEntry((callerAddress + "_q"), question), DataEntry((callerAddress + "_a"), answer)]) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | 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."] | |
5 | 5 | ||
6 | 6 | let answersCount = size(answers) | |
7 | 7 | ||
8 | 8 | func getAnswer (question,previousAnswer) = { | |
9 | 9 | let hash = sha256(toBytes((question + previousAnswer))) | |
10 | 10 | let index = toInt(hash) | |
11 | 11 | answers[(index % answersCount)] | |
12 | 12 | } | |
13 | 13 | ||
14 | 14 | ||
15 | 15 | func getPreviousAnswer (address) = match getString(this, (address + "_a")) { | |
16 | 16 | case a: String => | |
17 | 17 | a | |
18 | 18 | case _ => | |
19 | 19 | address | |
20 | 20 | } | |
21 | 21 | ||
22 | 22 | ||
23 | 23 | @Callable(i) | |
24 | - | func | |
24 | + | func Dajodpowiedz (question) = { | |
25 | 25 | let callerAddress = toBase58String(i.caller.bytes) | |
26 | 26 | let answer = getAnswer(question, getPreviousAnswer(callerAddress)) | |
27 | 27 | WriteSet([DataEntry((callerAddress + "_q"), question), DataEntry((callerAddress + "_a"), answer)]) | |
28 | 28 | } | |
29 | 29 | ||
30 | 30 |
github/deemru/w8io/026f985 32.51 ms ◑