Skip to content

Commit a73132d

Browse files
committed
Doc Comment updates:
Updated to include `UInt` Corrected the return type to be `T` instead if `BigUInt`
1 parent 6c05421 commit a73132d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Sources/web3swift/Convenience/Decodable+Extensions.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,11 @@ extension KeyedDecodingContainer {
101101

102102
/// Decodes a value of the given key from Hex to `DecodableFromHex`
103103
///
104-
/// Currently this method supports only `Data.Type`, `BigUInt.Type`, `Date.Type`
104+
/// Currently this method supports only `Data.Type`, `BigUInt.Type`, `Date.Type`, `UInt.Type`
105105
///
106106
/// - Parameter type: Generic type `T` wich conforms to `DecodableFromHex` protocol
107107
/// - Parameter key: The key that the decoded value is associated with.
108-
/// - Returns: A decoded value of type `BigUInt`
108+
/// - Returns: A decoded value of type `T`
109109
/// - throws: `Web3Error.dataError` if value associated with key are unable to be initialized as `DecodableFromHex`.
110110
public func decodeHex<T: DecodableFromHex>(_ type: T.Type, forKey: KeyedDecodingContainer<K>.Key) throws -> T {
111111
let hexString = try self.decode(String.self, forKey: forKey)
@@ -115,11 +115,11 @@ extension KeyedDecodingContainer {
115115

116116
/// Decodes a value of the given key from Hex to `[DecodableFromHex]`
117117
///
118-
/// Currently this method supports only `Data.Type`, `BigUInt.Type`, `Date.Type`
118+
/// Currently this method supports only `Data.Type`, `BigUInt.Type`, `Date.Type`, `UInt.Type`
119119
///
120120
/// - Parameter type: Array of a generic type `T` wich conforms to `DecodableFromHex` protocol
121121
/// - Parameter key: The key that the decoded value is associated with.
122-
/// - Returns: A decoded value of type `BigUInt`
122+
/// - Returns: A decoded value of type `T`
123123
/// - throws: `Web3Error.dataError` if value associated with key are unable to be initialized as `[[DecodableFromHex]]`.
124124
public func decodeHex<T: DecodableFromHex>(_ type: [T].Type, forKey: KeyedDecodingContainer<K>.Key) throws -> [T] {
125125
var container = try nestedUnkeyedContainer(forKey: forKey)
@@ -129,11 +129,11 @@ extension KeyedDecodingContainer {
129129

130130
/// Decodes a value of the given key from Hex to `[DecodableFromHex]`
131131
///
132-
/// Currently this method supports only `Data.Type`, `BigUInt.Type`, `Date.Type`, `EthereumAddress`
132+
/// Currently this method supports only `Data.Type`, `BigUInt.Type`, `Date.Type`, `EthereumAddress`, `UInt.Type`
133133
///
134134
/// - Parameter type: Array of a generic type `T` wich conforms to `DecodableFromHex` protocol
135135
/// - Parameter key: The key that the decoded value is associated with.
136-
/// - Returns: A decoded value of type `BigUInt`
136+
/// - Returns: A decoded value of type `T`
137137
/// - throws: `Web3Error.dataError` if value associated with key are unable to be initialized as `[[DecodableFromHex]]`.
138138
public func decodeHex<T: DecodableFromHex>(_ type: [[T]].Type, forKey: KeyedDecodingContainer<K>.Key) throws -> [[T]] {
139139
var container = try nestedUnkeyedContainer(forKey: forKey)

0 commit comments

Comments
 (0)