tx · ATjm3Cd5aApncRZK2ByaPJJnmvG7V6tUiyWcDoMXQ1Yc
3NCAHkQMZsVNJh9u15MjBDHjY8efFKNArX8: -0.00500000 Waves
2022.10.04 07:46 [2257130] smart account 3NCAHkQMZsVNJh9u15MjBDHjY8efFKNArX8 > SELF 0.00000000 Waves
{
"type": 13,
"id": "ATjm3Cd5aApncRZK2ByaPJJnmvG7V6tUiyWcDoMXQ1Yc",
"fee": 500000,
"feeAssetId": null,
"timestamp": 1664858834879,
"version": 2,
"chainId": 84,
"sender": "3NCAHkQMZsVNJh9u15MjBDHjY8efFKNArX8",
"senderPublicKey": "83Eyw5Bn6vkLTM9RkbXMAx8DtYNoLRqmeba4WAMvYhzK",
"proofs": [
"2mNY6LGfMT83wnMsFf2C16aiN7YnWaQiF8BkaFQNRGHbVuqjZjXGVBvgQozkDQGDmpUvoQXm64KLBCwWnJeWHUzW"
],
"script": "base64:AAIFAAAAAAAAAAgIAhIECgIICAAAAAMAAAAACVJTQVBVQkxJQwIAAAGPYmFzZTY0Ok1JSUJJakFOQmdrcWhraUc5dzBCQVFFRkFBT0NBUThBTUlJQkNnS0NBUUVBbGVtcjk1SjFqWlVzN2NKbXJtbWxONHpvN1lWc0JKekllSmRrOExERkdoVUtTSTZ5ZnMyMFp5SmUyMSs2R0p3Tm5LVVUxVXlvYzE3d1NXTUtrclowTU12WUUrWjVBaWlqdkJLNHNTSjNJZ0dqZFU4L05oSThDQkR1MEYreFJNOXEzVEIzTExiRHk1c0JkdWRZZkhmc1VPYytNVHZBRDY5bjI3ZGIyUmg4K3laUU10dWJrdVRRTnA4OXNwaEhRYUxHeVFGYU5sSy9OYTNsRng2b21xemFhMWdqb3BsVXI2cnZZS2dmQUlDVUIzelZtSlNoaUVpN3c3UjBoV2xOUkQzcWNaakNVT05TcEZvNFdiemtuR09henc4NEIrSU1JRm5JcFhXelFMOFJYMHZOY2ZzQnZMRGZNNmsyWmFjcXd5TUthTExxaWdkQmlHZEo3VyswbE9TdE9RSURBUUFCAAAAAAJycAkAAlsAAAABBQAAAAlSU0FQVUJMSUMBAAAAAXIAAAACAAAABHJzYmIAAAAGZ2FtZUlkBAAAAARiZ2lkCQABmwAAAAEFAAAABmdhbWVJZAQAAAADcnN2CQAKKAAAAAQFAAAABlNIQTI1NgUAAAAEYmdpZAUAAAAEcnNiYgUAAAACcnADCQEAAAABIQAAAAEFAAAAA3JzdgkAAAIAAAABAgAAABVJbnZhbGlkIFJTQSBzaWduYXR1cmUEAAAABHJhbmQJAABqAAAAAgkABLEAAAABCQAB9wAAAAEFAAAABHJzYmIAAAAAAAAAAAYJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgIAAAADcnN2CQABpQAAAAEFAAAAA3JzdgkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAAEcmFuZAUAAAAEcmFuZAUAAAADbmlsAAAAAQAAAAFpAQAAAARjYWxsAAAAAgAAAAJycwAAAAZnYW1lSWQEAAAAA3JzYgkAAlsAAAABBQAAAAJycwkBAAAAAXIAAAACBQAAAANyc2IFAAAABmdhbWVJZAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5SIC6Mw==",
"height": 2257130,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: FcthmoZJZrqq7ndP1ppeSX3kwJfEfLWjGmSfuxB4FVAn
Next: EcsnAj1TsrQm5wXivg71rTxMSXtjUKJYo63fNBExwZiN
Diff:
Old | New | | Differences |
---|
7 | 7 | | |
---|
8 | 8 | | func r (rsbb,gameId) = { |
---|
9 | 9 | | let bgid = toBytes(gameId) |
---|
10 | | - | [BinaryEntry("bgid", bgid)] |
---|
| 10 | + | let rsv = rsaVerify_16Kb(SHA256, bgid, rsbb, rp) |
---|
| 11 | + | if (!(rsv)) |
---|
| 12 | + | then throw("Invalid RSA signature") |
---|
| 13 | + | else { |
---|
| 14 | + | let rand = (toInt(sha256(rsbb)) % 6) |
---|
| 15 | + | [StringEntry("rsv", toString(rsv)), IntegerEntry("rand", rand)] |
---|
| 16 | + | } |
---|
11 | 17 | | } |
---|
12 | 18 | | |
---|
13 | 19 | | |
---|
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 | 6 | | let rp = fromBase64String(RSAPUBLIC) |
---|
7 | 7 | | |
---|
8 | 8 | | func r (rsbb,gameId) = { |
---|
9 | 9 | | let bgid = toBytes(gameId) |
---|
10 | | - | [BinaryEntry("bgid", bgid)] |
---|
| 10 | + | let rsv = rsaVerify_16Kb(SHA256, bgid, rsbb, rp) |
---|
| 11 | + | if (!(rsv)) |
---|
| 12 | + | then throw("Invalid RSA signature") |
---|
| 13 | + | else { |
---|
| 14 | + | let rand = (toInt(sha256(rsbb)) % 6) |
---|
| 15 | + | [StringEntry("rsv", toString(rsv)), IntegerEntry("rand", rand)] |
---|
| 16 | + | } |
---|
11 | 17 | | } |
---|
12 | 18 | | |
---|
13 | 19 | | |
---|
14 | 20 | | @Callable(i) |
---|
15 | 21 | | func call (rs,gameId) = { |
---|
16 | 22 | | let rsb = fromBase64String(rs) |
---|
17 | 23 | | r(rsb, gameId) |
---|
18 | 24 | | } |
---|
19 | 25 | | |
---|
20 | 26 | | |
---|
21 | 27 | | @Verifier(tx) |
---|
22 | 28 | | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) |
---|
23 | 29 | | |
---|