tx · CmTbK2oR3DypgSV5uR6vxtRycVHWMVVCJADSoCs6q4Ds

3MzZK7iK67RMg9yMELVeS8GECKjQdTvXVF8:  -0.01000000 Waves

2021.12.06 21:30 [1822760] smart account 3MzZK7iK67RMg9yMELVeS8GECKjQdTvXVF8 > SELF 0.00000000 Waves

{ "type": 13, "id": "CmTbK2oR3DypgSV5uR6vxtRycVHWMVVCJADSoCs6q4Ds", "fee": 1000000, "feeAssetId": null, "timestamp": 1638815496091, "version": 2, "chainId": 84, "sender": "3MzZK7iK67RMg9yMELVeS8GECKjQdTvXVF8", "senderPublicKey": "ELxDqYuRKzUQCGXCMn8uoRQbZiY2Df4S9fnVUU3uDoJu", "proofs": [ "5Q6GnDY33RTUwUXtZ3oGPyJJBpHgEcDU9yPdzkTys6w4vDWm6GazqyM8AhayXuYc77eMeacgqVZGXiyxUdQrZq4e" ], "script": "base64:AgQAAAALYWxpY2VQdWJLZXkBAAAAID3+K0HJI42oXrHhtHFpHijU5PC4nn1fIFVsJp5UWrYABAAAAAlib2JQdWJLZXkBAAAAIBO1uieokBahePoeVqt4/usbhaXRq+i5EvtfsdBILNtuBAAAAAxjb29wZXJQdWJLZXkBAAAAIOfM/qkwkfi4pdngdn18n5yxNwCrBOBC3ihWaFg4gV4yBAAAAAthbGljZVNpZ25lZAMJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAAthbGljZVB1YktleQAAAAAAAAAAAQAAAAAAAAAAAAQAAAAJYm9iU2lnbmVkAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAEFAAAACWJvYlB1YktleQAAAAAAAAAAAQAAAAAAAAAAAAQAAAAMY29vcGVyU2lnbmVkAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAIFAAAADGNvb3BlclB1YktleQAAAAAAAAAAAQAAAAAAAAAAAAkAAGcAAAACCQAAZAAAAAIJAABkAAAAAgUAAAALYWxpY2VTaWduZWQFAAAACWJvYlNpZ25lZAUAAAAMY29vcGVyU2lnbmVkAAAAAAAAAAACqFBMLg==", "height": 1822760, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7TfktpfSXuMBjnC3iGNDspCVsG7yMJLqKGwvyHukbxg3 Next: none Full:
OldNewDifferences
1-{-# STDLIB_VERSION 3 #-}
2-{-# SCRIPT_TYPE ACCOUNT #-}
3-{-# CONTENT_TYPE DAPP #-}
4-let answersCount = 20
5-
6-let answers = ["It is certain.", "It is decidedly so.", "Without a doubt.", "Yes - definitely.", "You may rely on it.", "As I see it, yes.", "Most likely.", "Outlook good.", "Yes.", "Signs point to yes.", "Reply hazy, try again.", "Ask again later.", "Better not tell you now.", "Cannot predict now.", "Concentrate and ask again.", "Don't count on it.", "My reply is no.", "My sources say no.", "Outlook not so good.", "Very doubtful."]
7-
8-func getAnswer (question,previousAnswer) = {
9- let hash = sha256(toBytes((question + previousAnswer)))
10- let index = toInt(hash)
11-answers[(index % answersCount)]
12- }
13-
14-
15-func getPreviousAnswer (address) = match getString(this, (address + "_a")) {
16- case a: String =>
17- a
18- case _ =>
19- address
20-}
21-
22-
23-@Callable(i)
24-func tellme (question) = {
25- let callerAddress = toBase58String(i.caller.bytes)
26- let answer = getAnswer(question, getPreviousAnswer(callerAddress))
27- WriteSet([DataEntry((callerAddress + "_q"), question), DataEntry((callerAddress + "_a"), answer)])
28- }
29-
30-
1+{-# STDLIB_VERSION 2 #-}
2+{-# CONTENT_TYPE EXPRESSION #-}
3+let alicePubKey = base58'5AzfA9UfpWVYiwFwvdr77k6LWupSTGLb14b24oVdEpMM'
4+let bobPubKey = base58'2KwU4vzdgPmKyf7q354H9kSyX9NZjNiq4qbnH2wi2VDF'
5+let cooperPubKey = base58'GbrUeGaBfmyFJjSQb9Z8uTCej5GzjXfRDVGJGrmgt5cD'
6+let aliceSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], alicePubKey))
7+ then 1
8+ else 0
9+let bobSigned = if (sigVerify(tx.bodyBytes, tx.proofs[1], bobPubKey))
10+ then 1
11+ else 0
12+let cooperSigned = if (sigVerify(tx.bodyBytes, tx.proofs[2], cooperPubKey))
13+ then 1
14+ else 0
15+(((aliceSigned + bobSigned) + cooperSigned) >= 2)

github/deemru/w8io/169f3d6 
25.87 ms