tx · DGtPiH3PhZWDo8jRynKxr5gaowtvhNRxQL6qhiSdpVYu 3NCy4rT9no9CGLr89UrnyH8s75P8JjkSap8: -0.01400000 Waves 2020.12.10 03:07 [1301824] smart account 3NCy4rT9no9CGLr89UrnyH8s75P8JjkSap8 > SELF 0.00000000 Waves
{ "type": 13, "id": "DGtPiH3PhZWDo8jRynKxr5gaowtvhNRxQL6qhiSdpVYu", "fee": 1400000, "feeAssetId": null, "timestamp": 1607558890304, "version": 2, "chainId": 84, "sender": "3NCy4rT9no9CGLr89UrnyH8s75P8JjkSap8", "senderPublicKey": "62prNgRbWHRQAXh3a5sG95EtrJoYEsuUAgwkg3F4Kt6k", "proofs": [ "35diZa24a3on8ttUHSmo9MawmBeJns3bxTLSFuhoWQc3AX5daYmrkqFnJw4xx1bP41BCaUkFcZftNSj9sUWJPpmL" ], "script": "base64:AAIEAAAAAAAAAAgIAhIECgIIAQAAAAAAAAABAAAAAWkBAAAAC1pyb2JwcnplbGV3AAAAAgAAAAVHZHppZQAAAANJbGUEAAAAC2dkemllcHJ6ZWxjCQEAAAARQGV4dHJOYXRpdmUoMTA2MikAAAABBQAAAAVHZHppZQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAAAtnZHppZXByemVsYwUAAAADSWxlBQAAAAR1bml0BQAAAANuaWwAAAAAPcOdBw==", "height": 1301824, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9K3aLgezDfNcFfdV2PHNBbmqU2bFaBCuzG1fhMN6WzWz Next: AF4v56Qsuji8mwXWkTuaKBUbuLWYEhiYSAc3bEnHh1Mc Full:
Old | New | Differences | |
---|---|---|---|
1 | - | {-# STDLIB_VERSION | |
1 | + | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
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 | - | ||
6 | - | let answersCount = size(answers) | |
7 | - | ||
8 | - | let say = "Hello world!" | |
9 | - | ||
10 | - | func getAnswer (question,previousAnswer) = { | |
11 | - | let hash = sha256(toBytes((question + previousAnswer))) | |
12 | - | let index = toInt(hash) | |
13 | - | answers[(index % answersCount)] | |
14 | - | } | |
15 | - | ||
16 | - | ||
17 | - | func getPreviousAnswer (address) = match getString(this, (address + "_a")) { | |
18 | - | case a: String => | |
19 | - | a | |
20 | - | case _ => | |
21 | - | address | |
22 | - | } | |
23 | 4 | ||
24 | 5 | ||
25 | 6 | @Callable(i) | |
26 | - | func Zadajpytanie (Pytanie) = { | |
27 | - | let callerAddress = toBase58String(i.caller.bytes) | |
28 | - | let answer = getAnswer(Pytanie, getPreviousAnswer(callerAddress)) | |
29 | - | WriteSet([DataEntry((callerAddress + "_q"), Pytanie), DataEntry((callerAddress + "_a"), answer)]) | |
7 | + | func Zrobprzelew (Gdzie,Ile) = { | |
8 | + | let gdzieprzelc = addressFromStringValue(Gdzie) | |
9 | + | [ScriptTransfer(gdzieprzelc, Ile, unit)] | |
30 | 10 | } | |
31 | 11 | ||
32 | 12 |
github/deemru/w8io/026f985 35.29 ms ◑