tx · 5JPNiNcWvjbu7SjkQQChvybdCNNkyAGzFjWpKZbdTEF9

3MuFuqJDozRMpYjGP1M1mAC8QcVqS7UJTt5:  -0.00100000 Waves

2022.07.16 07:37 [2141816] smart account 3MuFuqJDozRMpYjGP1M1mAC8QcVqS7UJTt5 > SELF 0.00000000 Waves

{ "type": 13, "id": "5JPNiNcWvjbu7SjkQQChvybdCNNkyAGzFjWpKZbdTEF9", "fee": 100000, "feeAssetId": null, "timestamp": 1657946174980, "version": 2, "chainId": 84, "sender": "3MuFuqJDozRMpYjGP1M1mAC8QcVqS7UJTt5", "senderPublicKey": "72iNJNbWjoa3jpF5T1rWbX58n6HQQxKHr3Ggb33WeDTX", "proofs": [ "3N8T7Tjk285t2CTEsn4TcPWJKATGQrC8oUve9e9VPtrhcpwzjP9BHVAM8tCmSqcKDfkEKZzttdLJtWXLqpkHKLXR" ], "script": "base64:BQQAAAALYWxpY2VQdWJLZXkBAAAAIM+GvE55j9wLfHsVHaoUT58I55jywUJjYsKxNA6xUlIxBAAAAAlib2JQdWJLZXkBAAAAIEFOQG6CJ+NqrSTqJ8f/+D8mX/bmOwnUMJVE5P61PYoUBAAAAAthbGljZVNpZ25lZAMJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAAthbGljZVB1YktleQAAAAAAAAAAAQAAAAAAAAAAAAQAAAAJYm9iU2lnbmVkAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAEFAAAACWJvYlB1YktleQAAAAAAAAAAAQAAAAAAAAAAAAkAAAAAAAACCQAAZAAAAAIFAAAAC2FsaWNlU2lnbmVkBQAAAAlib2JTaWduZWQAAAAAAAAAAAJFdd8x", "height": 2141816, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Eqb3etfZSfsgCL71Hvozxrk8ac562ZLVvRCPgATifMhB 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 5 #-}
2+{-# CONTENT_TYPE EXPRESSION #-}
3+let alicePubKey = base58'Ey6Z9XkWsvG8JZwyxhkTjydRcGp1wg6rbC3AYcxq7Efr'
4+let bobPubKey = base58'5PvhyouzHn2Pcev56oBvwpnsGK5fEu1dA8fM2nJQM4HR'
5+let aliceSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], alicePubKey))
6+ then 1
7+ else 0
8+let bobSigned = if (sigVerify(tx.bodyBytes, tx.proofs[1], bobPubKey))
9+ then 1
10+ else 0
11+((aliceSigned + bobSigned) == 2)

github/deemru/w8io/169f3d6 
28.08 ms