tx · 2ak7eeZJ7yw8zhbdahZvnDDofp1J2XedYRb43bVi8Ti3
3MsYB1YL7gzygFM5vZJLNoSwxiVARw3i4dS: -0.01400000 Waves
2019.11.08 12:32 [755804] smart account 3MsYB1YL7gzygFM5vZJLNoSwxiVARw3i4dS > SELF 0.00000000 Waves
{
"type": 13,
"id": "2ak7eeZJ7yw8zhbdahZvnDDofp1J2XedYRb43bVi8Ti3",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1573205515744,
"version": 1,
"sender": "3MsYB1YL7gzygFM5vZJLNoSwxiVARw3i4dS",
"senderPublicKey": "6G5NGhnfJz9aCpHo6LFhebGvnbhYgG31LQbjmMnkzqSe",
"proofs": [
"3iGsLYNan7CATunQHhGwnoVGeU271mmnHNqZzqEghtoyy4uGJ3GJZicA98aiQdg7LGajbc1zqbyVogX1bMuSGTLk"
],
"script": "base64:AAIDAAAAAAAAAAcIARIDCgEIAAAAAgEAAAAMdG9CeXRlVmVjdG9yAAAAAQAAAAJidgQAAAAHJG1hdGNoMAUAAAACYnYDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAACkJ5dGVWZWN0b3IEAAAAA2J2MAUAAAAHJG1hdGNoMAUAAAADYnYwCQAAAgAAAAECAAAAE0J5dGVWZWN0b3IgZXhwZWN0ZWQBAAAACGFzU3RyaW5nAAAAAQAAAAJidgQAAAAHJG1hdGNoMAUAAAACYnYDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAADYnYwBQAAAAckbWF0Y2gwBQAAAANidjAJAAACAAAAAQIAAAATQnl0ZVZlY3RvciBleHBlY3RlZAAAAAEAAAABaQEAAAAHcmVnVXNlcgAAAAEAAAAKdXNlclB1YktleQkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgIAAAAKdXNlclB1YktleQUAAAAKdXNlclB1YktleQUAAAADbmlsAAAAAQAAAAJ0eAEAAAAIdmVyaWZpZXIAAAAABAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAXSW52b2tlU2NyaXB0VHJhbnNhY3Rpb24EAAAAA2ludgUAAAAHJG1hdGNoMAMJAAAAAAAAAggFAAAAA2ludgAAAAhmdW5jdGlvbgIAAAAHcmVnVXNlcgkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAJAAJZAAAAAQkBAAAACGFzU3RyaW5nAAAAAQkAAZEAAAACCAUAAAADaW52AAAABGFyZ3MAAAAAAAAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5CQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleYyD8HI=",
"chainId": 84,
"height": 755804,
"spentComplexity": 0
}
View: original | compacted
Prev: 2YgEgnjeNpoZfkgrcZLaKscwr8DXErDqLHJ75DLMjebz
Next: none
Diff:
Old | New | | Differences |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | func toByteVector (bv) = match bv { |
---|
5 | 5 | | case bv0: ByteVector => |
---|
| 6 | + | bv0 |
---|
| 7 | + | case _ => |
---|
| 8 | + | throw("ByteVector expected") |
---|
| 9 | + | } |
---|
| 10 | + | |
---|
| 11 | + | |
---|
| 12 | + | func asString (bv) = match bv { |
---|
| 13 | + | case bv0: String => |
---|
6 | 14 | | bv0 |
---|
7 | 15 | | case _ => |
---|
8 | 16 | | throw("ByteVector expected") |
---|
|
17 | 25 | | func verifier () = match tx { |
---|
18 | 26 | | case inv: InvokeScriptTransaction => |
---|
19 | 27 | | if ((inv.function == "regUser")) |
---|
20 | | - | then sigVerify(tx.bodyBytes, tx.proofs[0], toByteVector(inv.args[0])) |
---|
| 28 | + | then sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(asString(inv.args[0]))) |
---|
21 | 29 | | else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) |
---|
22 | 30 | | case _ => |
---|
23 | 31 | | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 3 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | func toByteVector (bv) = match bv { |
---|
5 | 5 | | case bv0: ByteVector => |
---|
| 6 | + | bv0 |
---|
| 7 | + | case _ => |
---|
| 8 | + | throw("ByteVector expected") |
---|
| 9 | + | } |
---|
| 10 | + | |
---|
| 11 | + | |
---|
| 12 | + | func asString (bv) = match bv { |
---|
| 13 | + | case bv0: String => |
---|
6 | 14 | | bv0 |
---|
7 | 15 | | case _ => |
---|
8 | 16 | | throw("ByteVector expected") |
---|
9 | 17 | | } |
---|
10 | 18 | | |
---|
11 | 19 | | |
---|
12 | 20 | | @Callable(i) |
---|
13 | 21 | | func regUser (userPubKey) = WriteSet([DataEntry("userPubKey", userPubKey)]) |
---|
14 | 22 | | |
---|
15 | 23 | | |
---|
16 | 24 | | @Verifier(tx) |
---|
17 | 25 | | func verifier () = match tx { |
---|
18 | 26 | | case inv: InvokeScriptTransaction => |
---|
19 | 27 | | if ((inv.function == "regUser")) |
---|
20 | | - | then sigVerify(tx.bodyBytes, tx.proofs[0], toByteVector(inv.args[0])) |
---|
| 28 | + | then sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(asString(inv.args[0]))) |
---|
21 | 29 | | else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) |
---|
22 | 30 | | case _ => |
---|
23 | 31 | | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) |
---|
24 | 32 | | } |
---|
25 | 33 | | |
---|