Skip to content

Commit 0b46a15

Browse files
committed
Clarify parse helpers in docs
1 parent fa31bf2 commit 0b46a15

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/security/security-best-practices.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public class RoleBasedContract : SmartContract
111111
```
112112

113113
> **Note**
114-
> When a script hash originates from runtime data, convert the value with `UInt160.Parse` (or cast from a validated byte array) before you return it. This keeps return statements strongly typed and prevents the NC4032 ReturnValueTypeAnalyzer from flagging implicit string conversions.
114+
> When a script hash or key originates from runtime data, convert the value with `UInt160.Parse`, `UInt256.Parse`, or `ECPoint.Parse` (or cast from a validated byte array) before you return it. This keeps return statements strongly typed and prevents the NC4032 ReturnValueTypeAnalyzer from flagging implicit string conversions.
115115
116116
### Multi-Signature Security
117117

docs/security/security-testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public class SecurityTestAccounts
117117
```
118118

119119
> **Note**
120-
> The same `UInt160.Parse` helper is available inside contracts, so your tests can mimic the strongly typed returns enforced by analyzer NC4032.
120+
> The same `UInt160/UInt256/ECPoint.Parse` helpers are available inside contracts, so your tests can mimic the strongly typed returns enforced by analyzer NC4032.
121121
122122
## Unit Testing for Security
123123

0 commit comments

Comments
 (0)