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:
OldNewDifferences
33 {-# CONTENT_TYPE DAPP #-}
44 func toByteVector (bv) = match bv {
55 case bv0: ByteVector =>
6+ bv0
7+ case _ =>
8+ throw("ByteVector expected")
9+}
10+
11+
12+func asString (bv) = match bv {
13+ case bv0: String =>
614 bv0
715 case _ =>
816 throw("ByteVector expected")
1725 func verifier () = match tx {
1826 case inv: InvokeScriptTransaction =>
1927 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])))
2129 else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
2230 case _ =>
2331 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func toByteVector (bv) = match bv {
55 case bv0: ByteVector =>
6+ bv0
7+ case _ =>
8+ throw("ByteVector expected")
9+}
10+
11+
12+func asString (bv) = match bv {
13+ case bv0: String =>
614 bv0
715 case _ =>
816 throw("ByteVector expected")
917 }
1018
1119
1220 @Callable(i)
1321 func regUser (userPubKey) = WriteSet([DataEntry("userPubKey", userPubKey)])
1422
1523
1624 @Verifier(tx)
1725 func verifier () = match tx {
1826 case inv: InvokeScriptTransaction =>
1927 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])))
2129 else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
2230 case _ =>
2331 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
2432 }
2533

github/deemru/w8io/169f3d6 
31.03 ms