Skip to content

Commit ae022a7

Browse files
Fixes due to PR review.
1 parent b0425af commit ae022a7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Sources/Web3Core/EthereumABI/ABIElements.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ extension ABI.Element {
262262

263263
extension ABI.Element.Function {
264264
public func decodeInputData(_ rawData: Data) -> [String: Any]? {
265-
return ABI.Element.decodeInputData(rawData, methodEncoding: methodEncoding, inputs: inputs)
265+
return ABIDecoder.decodeInputData(rawData, methodEncoding: methodEncoding, inputs: inputs)
266266
}
267267

268268
/// Decodes data returned by a function call. Able to decode `revert(string)`, `revert CustomError(...)` and `require(expression, string)` calls.
@@ -432,19 +432,19 @@ extension ABI.Element.Function {
432432

433433
extension ABI.Element.Constructor {
434434
public func decodeInputData(_ rawData: Data) -> [String: Any]? {
435-
return ABI.Element.decodeInputData(rawData, inputs: inputs)
435+
return ABIDecoder.decodeInputData(rawData, inputs: inputs)
436436
}
437437
}
438438

439-
extension ABI.Element {
439+
extension ABIDecoder {
440440
/// Generic input decoding function.
441441
/// - Parameters:
442442
/// - rawData: data to decode. Must match the following criteria: `data.count == 0 || data.count % 32 == 4`.
443443
/// - methodEncoding: 4 bytes representing method signature like `0xFFffFFff`. Can be omitted to avoid checking method encoding.
444444
/// - inputs: expected input types. Order must be the same as in function declaration.
445445
/// - Returns: decoded dictionary of input arguments mapped to their indices and arguments' names if these are not empty.
446446
/// If decoding of at least one argument fails, `rawData` size is invalid or `methodEncoding` doesn't match - `nil` is returned.
447-
static private func decodeInputData(_ rawData: Data,
447+
static func decodeInputData(_ rawData: Data,
448448
methodEncoding: Data? = nil,
449449
inputs: [ABI.Element.InOut]) -> [String: Any]? {
450450
let data: Data

0 commit comments

Comments
 (0)