tx · 6kZggMLFAMiNvGabhwDfwzZ3qcqPSAaBD9UQShgiM5Jf

3MzBuApuRBa4JuWUpB2bLdJ6CxhCXzX1yDV:  -0.01000000 Waves

2023.01.02 17:52 [2387499] smart account 3MzBuApuRBa4JuWUpB2bLdJ6CxhCXzX1yDV > SELF 0.00000000 Waves

{ "type": 13, "id": "6kZggMLFAMiNvGabhwDfwzZ3qcqPSAaBD9UQShgiM5Jf", "fee": 1000000, "feeAssetId": null, "timestamp": 1672671228623, "version": 2, "chainId": 84, "sender": "3MzBuApuRBa4JuWUpB2bLdJ6CxhCXzX1yDV", "senderPublicKey": "2YWSmoYRSAcdKyakgiW5e1FrnkQHaxZyXqduxgLhHo82", "proofs": [ "4VLKu8L4JkTxystzx4WKY2QpLb6UmEPgLMnXDNgjmgW7PKjekkYrpbvdrHkXC3S8Xo4ZhJih2EzkD6WFTH6CQJ8k" ], "script": "base64:AAIDAAAAAAAAAAwIARIDCgEIEgMKAQgAAAAFAAAAAARzZWVkAgAAAGNtYW5hZ2UgbWFudWFsIHJlY2FsbCBoYXJ2ZXN0IHNlcmllcyBkZXNlcnQgbWVsdCBwb2xpY2Ugcm9zZSBob2xsb3cgbW9yYWwgcGxlZGdlIGtpdHRlbiBwb3NpdGlvbiBhZGQAAAAADGFuc3dlcnNDb3VudAAAAAAAAAAAFAAAAAAHYW5zd2VycwkABEwAAAACAgAAAA5JdCBpcyBjZXJ0YWluLgkABEwAAAACAgAAABNJdCBpcyBkZWNpZGVkbHkgc28uCQAETAAAAAICAAAAEFdpdGhvdXQgYSBkb3VidC4JAARMAAAAAgIAAAARWWVzIC0gZGVmaW5pdGVseS4JAARMAAAAAgIAAAATWW91IG1heSByZWx5IG9uIGl0LgkABEwAAAACAgAAABFBcyBJIHNlZSBpdCwgeWVzLgkABEwAAAACAgAAAAxNb3N0IGxpa2VseS4JAARMAAAAAgIAAAANT3V0bG9vayBnb29kLgkABEwAAAACAgAAAARZZXMuCQAETAAAAAICAAAAE1NpZ25zIH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XIAAAACBQAAAAhxdWVzdGlvbgkBAAAAEWdldFByZXZpb3VzQW5zd2VyAAAAAQUAAAANY2FsbGVyQWRkcmVzcwkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACBQAAAA1jYWxsZXJBZGRyZXNzAgAAAAJfcQUAAAAIcXVlc3Rpb24JAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgUAAAANY2FsbGVyQWRkcmVzcwIAAAACX2EFAAAABmFuc3dlcgUAAAADbmlsAAAAAWkBAAAAC2NhbGN1bGF0ZVBLAAAAAQAAAAdhZGRyZXNzBAAAAA1jYWxsZXJBZGRyZXNzCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMEAAAACnRlc3RiYXNlNTgJAAJYAAAAAQkAAZsAAAABBQAAAARzZWVkBAAAABN0ZXN0YmFzZTU4d2l0aG5vbmNlCQACWAAAAAEJAAGbAAAAAQkAASwAAAACAgAAAAQwMDAwBQAAAARzZWVkBAAAAAl0ZXN0Ymxha2UJAAH2AAAAAQkAAZsAAAABBQAAAARzZWVkCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIFAAAADWNhbGxlckFkZHJlc3MCAAAAC190ZXN0YmFzZTU4BQAAAAp0ZXN0YmFzZTU4CQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIFAAAADWNhbGxlckFkZHJlc3MCAAAAFF90ZXN0YmFzZTU4d2l0aG5vbmNlBQAAABN0ZXN0YmFzZTU4d2l0aG5vbmNlCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIFAAAADWNhbGxlckFkZHJlc3MCAAAACl90ZXN0Ymxha2UFAAAACXRlc3RibGFrZQUAAAADbmlsAAAAAOD+uFo=", "height": 2387499, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3oZMbU9DextFcb9wdgAyCXZiqT4jXefza7MwiywiBQkB Next: 8DXuFmfWwbeKaSxvncB6xMkP6yvrEWTrHXHPBQFBBXjE Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4+let seed = "manage manual recall harvest series desert melt police rose hollow moral pledge kitten position add"
5+
46 let answersCount = 20
57
68 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."]
2830 }
2931
3032
33+
34+@Callable(i)
35+func calculatePK (address) = {
36+ let callerAddress = toBase58String(i.caller.bytes)
37+ let testbase58 = toBase58String(toBytes(seed))
38+ let testbase58withnonce = toBase58String(toBytes(("0000" + seed)))
39+ let testblake = blake2b256(toBytes(seed))
40+ WriteSet([DataEntry((callerAddress + "_testbase58"), testbase58), DataEntry((callerAddress + "_testbase58withnonce"), testbase58withnonce), DataEntry((callerAddress + "_testblake"), testblake)])
41+ }
42+
43+
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4+let seed = "manage manual recall harvest series desert melt police rose hollow moral pledge kitten position add"
5+
46 let answersCount = 20
57
68 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."]
79
810 func getAnswer (question,previousAnswer) = {
911 let hash = sha256(toBytes((question + previousAnswer)))
1012 let index = toInt(hash)
1113 answers[(index % answersCount)]
1214 }
1315
1416
1517 func getPreviousAnswer (address) = match getString(this, (address + "_a")) {
1618 case a: String =>
1719 a
1820 case _ =>
1921 address
2022 }
2123
2224
2325 @Callable(i)
2426 func tellme (question) = {
2527 let callerAddress = toBase58String(i.caller.bytes)
2628 let answer = getAnswer(question, getPreviousAnswer(callerAddress))
2729 WriteSet([DataEntry((callerAddress + "_q"), question), DataEntry((callerAddress + "_a"), answer)])
2830 }
2931
3032
33+
34+@Callable(i)
35+func calculatePK (address) = {
36+ let callerAddress = toBase58String(i.caller.bytes)
37+ let testbase58 = toBase58String(toBytes(seed))
38+ let testbase58withnonce = toBase58String(toBytes(("0000" + seed)))
39+ let testblake = blake2b256(toBytes(seed))
40+ WriteSet([DataEntry((callerAddress + "_testbase58"), testbase58), DataEntry((callerAddress + "_testbase58withnonce"), testbase58withnonce), DataEntry((callerAddress + "_testblake"), testblake)])
41+ }
42+
43+

github/deemru/w8io/169f3d6 
38.04 ms