tx · 71cmmXN1pefbkDisjhADGg3w3LGFBRv3PkyFPaGBZL5q
3NCAHkQMZsVNJh9u15MjBDHjY8efFKNArX8: -0.00500000 Waves
2022.10.04 06:22 [2257048] smart account 3NCAHkQMZsVNJh9u15MjBDHjY8efFKNArX8 > SELF 0.00000000 Waves
{
"type": 13,
"id": "71cmmXN1pefbkDisjhADGg3w3LGFBRv3PkyFPaGBZL5q",
"fee": 500000,
"feeAssetId": null,
"timestamp": 1664853692318,
"version": 2,
"chainId": 84,
"sender": "3NCAHkQMZsVNJh9u15MjBDHjY8efFKNArX8",
"senderPublicKey": "83Eyw5Bn6vkLTM9RkbXMAx8DtYNoLRqmeba4WAMvYhzK",
"proofs": [
"VCrXY4nNcKr3i5FFs1pLdFFKkVD1cdiSN4mjvEkmhKDRxXP25YneD9Qxm1aUN4yG2Eg3AgyUqWYsbEMqJt1gZ2P"
],
"script": "base64:AAIFAAAAAAAAAAgIAhIECgICCAAAAAMAAAAACVJTQVBVQkxJQwIAAAGPYmFzZTY0Ok1JSUJJakFOQmdrcWhraUc5dzBCQVFFRkFBT0NBUThBTUlJQkNnS0NBUUVBbGVtcjk1SjFqWlVzN2NKbXJtbWxONHpvN1lWc0JKekllSmRrOExERkdoVUtTSTZ5ZnMyMFp5SmUyMSs2R0p3Tm5LVVUxVXlvYzE3d1NXTUtrclowTU12WUUrWjVBaWlqdkJLNHNTSjNJZ0dqZFU4L05oSThDQkR1MEYreFJNOXEzVEIzTExiRHk1c0JkdWRZZkhmc1VPYytNVHZBRDY5bjI3ZGIyUmg4K3laUU10dWJrdVRRTnA4OXNwaEhRYUxHeVFGYU5sSy9OYTNsRng2b21xemFhMWdqb3BsVXI2cnZZS2dmQUlDVUIzelZtSlNoaUVpN3c3UjBoV2xOUkQzcWNaakNVT05TcEZvNFdiemtuR09henc4NEIrSU1JRm5JcFhXelFMOFJYMHZOY2ZzQnZMRGZNNmsyWmFjcXd5TUthTExxaWdkQmlHZEo3VyswbE9TdE9RSURBUUFCAAAAAAJycAkAAlsAAAABBQAAAAlSU0FQVUJMSUMBAAAAAXIAAAACAAAAAnJzAAAABmdhbWVJZAQAAAADcnN2CQAKKQAAAAQFAAAABlNIQTI1NgkAAZsAAAABBQAAAAZnYW1lSWQFAAAAAnJzBQAAAAJycAMJAQAAAAEhAAAAAQUAAAADcnN2CQAAAgAAAAECAAAAFUludmFsaWQgUlNBIHNpZ25hdHVyZQQAAAAEcmFuZAkAAGoAAAACCQAEsQAAAAEJAAH3AAAAAQUAAAACcnMAAAAAAAAAAAYJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgIAAAADcnN2CQABpQAAAAEFAAAAA3JzdgkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAAEcmFuZAUAAAAEcmFuZAUAAAADbmlsAAAAAQAAAAFpAQAAAARjYWxsAAAAAgAAAAJycwAAAAZnYW1lSWQJAQAAAAFyAAAAAgUAAAACcnMFAAAABmdhbWVJZAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5mQm02g==",
"height": 2257048,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 7hzu5kJJWzWp58N8fnPwWgNpdN5JezS7XtBwuwaGsvs4
Next: CniRTs3SvuqDFC2RQqJebmA8h8DfvfHyzSSw8qcC8pdZ
Diff:
Old | New | | Differences |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let RSAPUBLIC = "base64:MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlemr95J1jZUs7cJmrmmlN4zo7YVsBJzIeJdk8LDFGhUKSI6yfs20ZyJe21+6GJwNnKUU1Uyoc17wSWMKkrZ0MMvYE+Z5AiijvBK4sSJ3IgGjdU8/NhI8CBDu0F+xRM9q3TB3LLbDy5sBdudYfHfsUOc+MTvAD69n27db2Rh8+yZQMtubkuTQNp89sphHQaLGyQFaNlK/Na3lFx6omqzaa1gjoplUr6rvYKgfAICUB3zVmJShiEi7w7R0hWlNRD3qcZjCUONSpFo4WbzknGOazw84B+IMIFnIpXWzQL8RX0vNcfsBvLDfM6k2ZacqwyMKaLLqigdBiGdJ7W+0lOStOQIDAQAB" |
---|
5 | 5 | | |
---|
6 | | - | func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), (key + " key is not specified in this.state")) |
---|
7 | | - | |
---|
8 | | - | |
---|
9 | | - | let rp = fromBase64String(getStringOrFail(RSAPUBLIC)) |
---|
| 6 | + | let rp = fromBase64String(RSAPUBLIC) |
---|
10 | 7 | | |
---|
11 | 8 | | func r (rs,gameId) = { |
---|
12 | 9 | | let rsv = rsaVerify_32Kb(SHA256, toBytes(gameId), rs, rp) |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let RSAPUBLIC = "base64:MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlemr95J1jZUs7cJmrmmlN4zo7YVsBJzIeJdk8LDFGhUKSI6yfs20ZyJe21+6GJwNnKUU1Uyoc17wSWMKkrZ0MMvYE+Z5AiijvBK4sSJ3IgGjdU8/NhI8CBDu0F+xRM9q3TB3LLbDy5sBdudYfHfsUOc+MTvAD69n27db2Rh8+yZQMtubkuTQNp89sphHQaLGyQFaNlK/Na3lFx6omqzaa1gjoplUr6rvYKgfAICUB3zVmJShiEi7w7R0hWlNRD3qcZjCUONSpFo4WbzknGOazw84B+IMIFnIpXWzQL8RX0vNcfsBvLDfM6k2ZacqwyMKaLLqigdBiGdJ7W+0lOStOQIDAQAB" |
---|
5 | 5 | | |
---|
6 | | - | func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), (key + " key is not specified in this.state")) |
---|
7 | | - | |
---|
8 | | - | |
---|
9 | | - | let rp = fromBase64String(getStringOrFail(RSAPUBLIC)) |
---|
| 6 | + | let rp = fromBase64String(RSAPUBLIC) |
---|
10 | 7 | | |
---|
11 | 8 | | func r (rs,gameId) = { |
---|
12 | 9 | | let rsv = rsaVerify_32Kb(SHA256, toBytes(gameId), rs, rp) |
---|
13 | 10 | | if (!(rsv)) |
---|
14 | 11 | | then throw("Invalid RSA signature") |
---|
15 | 12 | | else { |
---|
16 | 13 | | let rand = (toInt(sha256(rs)) % 6) |
---|
17 | 14 | | [StringEntry("rsv", toString(rsv)), IntegerEntry("rand", rand)] |
---|
18 | 15 | | } |
---|
19 | 16 | | } |
---|
20 | 17 | | |
---|
21 | 18 | | |
---|
22 | 19 | | @Callable(i) |
---|
23 | 20 | | func call (rs,gameId) = r(rs, gameId) |
---|
24 | 21 | | |
---|
25 | 22 | | |
---|
26 | 23 | | @Verifier(tx) |
---|
27 | 24 | | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) |
---|
28 | 25 | | |
---|