tx · 7N6UjyYgYduXAZPbwdpWyTVCbza3P5h5dehGghEWBccL

3MuVEuhXaTvF3ELakZksUP77a4bT8gPJtm6:  -0.01000000 Waves

2021.12.06 13:19 [1822273] smart account 3MuVEuhXaTvF3ELakZksUP77a4bT8gPJtm6 > SELF 0.00000000 Waves

{ "type": 13, "id": "7N6UjyYgYduXAZPbwdpWyTVCbza3P5h5dehGghEWBccL", "fee": 1000000, "feeAssetId": null, "timestamp": 1638785998354, "version": 2, "chainId": 84, "sender": "3MuVEuhXaTvF3ELakZksUP77a4bT8gPJtm6", "senderPublicKey": "2LizaCNygFYwGFKe34vvFHgJc4ckK7MpzRzziRNn56Cu", "proofs": [ "3Ro87GgM5p5sQzm5Ay5cdd7oEZnhyL6zgvcdWV4H1FpbD9jvkXG3GWynLtRQLKL4yJgQC3YjdHDLuRWKsxe9VFkN" ], "script": "base64:AAIDAAAAAAAAAAcIARIDCgEIAAAABAAAAAAMYW5zd2Vyc0NvdW50AAAAAAAAAAADAAAAAAdhbnN3ZXJzCQAETAAAAAICAAAADkl0IGlzIGNlcnRhaW4uCQAETAAAAAICAAAAE0l0IGlzIGRlY2lkZWRseSBzby4JAARMAAAAAgIAAAAOVmVyeSBkb3VidGZ1bC4FAAAAA25pbAEAAAAJZ2V0QW5zd2VyAAAAAgAAAAhxdWVzdGlvbgAAAA5wcmV2aW91c0Fuc3dlcgQAAAAEaGFzaAkAAfcAAAABCQABmwAAAAEJAAEsAAAAAgUAAAAIcXVlc3Rpb24FAAAADnByZXZpb3VzQW5zd2VyBAAAAAVpbmRleAkABLEAAAABBQAAAARoYXNoCQABkQAAAAIFAAAAB2Fuc3dlcnMJAABqAAAAAgUAAAAFaW5kZXgFAAAADGFuc3dlcnNDb3VudAEAAAARZ2V0UHJldmlvdXNBbnN3ZXIAAAABAAAAB2FkZHJlc3MEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwkAASwAAAACBQAAAAdhZGRyZXNzAgAAAAJfYQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhBQAAAAdhZGRyZXNzAAAAAQAAAAFpAQAAAAVwYWludAAAAAEAAAAIcXVlc3Rpb24EAAAADWNhbGxlckFkZHJlc3MJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAAGYW5zd2VyCQEAAAAJZ2V0QW5zd2VyAAAAAgUAAAAIcXVlc3Rpb24JAQAAABFnZXRQcmV2aW91c0Fuc3dlcgAAAAEFAAAADWNhbGxlckFkZHJlc3MJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgUAAAANY2FsbGVyQWRkcmVzcwIAAAACX3EFAAAACHF1ZXN0aW9uCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIFAAAADWNhbGxlckFkZHJlc3MCAAAAAl9hBQAAAAZhbnN3ZXIFAAAAA25pbAAAAABSsyzh", "height": 1822273, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DNhqtpMLqzvLAn4aX3se1YdqLfEFyTtNgDTtRreouQpb Next: BcKiYReoVTqZxGWeQ2CAGdB2MajoH4m4jyoTNT3Jy2tn Diff:
OldNewDifferences
2121
2222
2323 @Callable(i)
24-func tellme (question) = {
24+func paint (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 answersCount = 3
55
66 let answers = ["It is certain.", "It is decidedly so.", "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)
24-func tellme (question) = {
24+func paint (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 
34.17 ms