tx · JDjNtrjUUgZyGd86rqVjxRA1mRfshQ71bSgYF9NXi81

3MzBuApuRBa4JuWUpB2bLdJ6CxhCXzX1yDV:  -0.01000000 Waves

2023.01.02 20:49 [2387673] smart account 3MzBuApuRBa4JuWUpB2bLdJ6CxhCXzX1yDV > SELF 0.00000000 Waves

{ "type": 13, "id": "JDjNtrjUUgZyGd86rqVjxRA1mRfshQ71bSgYF9NXi81", "fee": 1000000, "feeAssetId": null, "timestamp": 1672681831036, "version": 2, "chainId": 84, "sender": "3MzBuApuRBa4JuWUpB2bLdJ6CxhCXzX1yDV", "senderPublicKey": "2YWSmoYRSAcdKyakgiW5e1FrnkQHaxZyXqduxgLhHo82", "proofs": [ "F94niDbGVZ6kQZiBsVswtRTtctjKy1K5N37VSs18hzzBpYP1eyEuBLrKKnMRXeM7MpGzALbV5WemyKfb5V3CBDG" ], "script": "base64:AAIDAAAAAAAAAAwIARIDCgEIEgMKAQgAAAAGAAAAAARzZWVkAgAAAGNtYW5hZ2UgbWFudWFsIHJlY2FsbCBoYXJ2ZXN0IHNlcmllcyBkZXNlcnQgbWVsdCBwb2xpY2Ugcm9zZSBob2xsb3cgbW9yYWwgcGxlZGdlIGtpdHRlbiBwb3NpdGlvbiBhZGQAAAAADXNlZWRXaXRoTm9uY2UCAAAAizExMTF4cnY3ZmZydjJBOWc1cEtTeHQ3Z0hHclBZSmdSbnNFTUR5YzRHN3NyYmlhNlBoWFlMREtWc0R4bnFzRXFoQVZiYmtvN04xdER5YVNyV0NaQm9NeXZkd2FGTmpXTlBqS2Rjb1pUS2JLcjJWdzl2dTUzVWY0ZFlweVdDeXZmUGJSc2tIZmd0OXEAAAAADGFuc3dlcnNDb3VudAAAAAAAAAAAFAAAAAAHYW5zd2VycwkABEwAAAACAgAAAA5JdCBpcyBjZXJ0YWluLgkABEwAAAACAgAAABNJdCBpcyBkZWNpZGVkbHkgc28uCQAETAAAAAICAAAAEFdpdGhvdXQgYSBkb3VidC4JAARMAAAAAgIAAAARWWV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AAAlEYXRhRW50cnkAAAACCQABLAAAAAIFAAAADWNhbGxlckFkZHJlc3MCAAAACl90ZXN0Ymxha2UFAAAAA3RyeQUAAAADbmlsAAAAANNtgdc=", "height": 2387673, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FuRy6jmyqEB5xbXUrDLbmrbFVfddik93SY8mq8ho92AR Next: CQJ3taGuB9Qec78MRTAaBkRSpQth9Tfrcg2dCGquxRQb Diff:
OldNewDifferences
3838 let callerAddress = toBase58String(i.caller.bytes)
3939 let testbase58 = toBytes(seed)
4040 let newseed = toUtf8String(testbase58)
41- let try = toBase58String(toBytes(seedWithNonce))
41+ let try = seedWithNonce
4242 let testblake = blake2b256(toBytes(seed))
4343 WriteSet([DataEntry((callerAddress + "_testbase58"), testbase58), DataEntry((callerAddress + "_testseed"), newseed), DataEntry((callerAddress + "_testblake"), try)])
4444 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let seed = "manage manual recall harvest series desert melt police rose hollow moral pledge kitten position add"
55
66 let seedWithNonce = "1111xrv7ffrv2A9g5pKSxt7gHGrPYJgRnsEMDyc4G7srbia6PhXYLDKVsDxnqsEqhAVbbko7N1tDyaSrWCZBoMyvdwaFNjWNPjKdcoZTKbKr2Vw9vu53Uf4dYpyWCyvfPbRskHfgt9q"
77
88 let answersCount = 20
99
1010 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."]
1111
1212 func getAnswer (question,previousAnswer) = {
1313 let hash = sha256(toBytes((question + previousAnswer)))
1414 let index = toInt(hash)
1515 answers[(index % answersCount)]
1616 }
1717
1818
1919 func getPreviousAnswer (address) = match getString(this, (address + "_a")) {
2020 case a: String =>
2121 a
2222 case _ =>
2323 address
2424 }
2525
2626
2727 @Callable(i)
2828 func tellme (question) = {
2929 let callerAddress = toBase58String(i.caller.bytes)
3030 let answer = getAnswer(question, getPreviousAnswer(callerAddress))
3131 WriteSet([DataEntry((callerAddress + "_q"), question), DataEntry((callerAddress + "_a"), answer)])
3232 }
3333
3434
3535
3636 @Callable(i)
3737 func calculatePK (address) = {
3838 let callerAddress = toBase58String(i.caller.bytes)
3939 let testbase58 = toBytes(seed)
4040 let newseed = toUtf8String(testbase58)
41- let try = toBase58String(toBytes(seedWithNonce))
41+ let try = seedWithNonce
4242 let testblake = blake2b256(toBytes(seed))
4343 WriteSet([DataEntry((callerAddress + "_testbase58"), testbase58), DataEntry((callerAddress + "_testseed"), newseed), DataEntry((callerAddress + "_testblake"), try)])
4444 }
4545
4646

github/deemru/w8io/026f985 
26.51 ms