EtherKit
EtherKit copied to clipboard
Naming Issue
OK, I have a bit of problem with one change in this commit: https://github.com/Vaultio/EtherKit/commit/fc8cc589a0bf92c819f86778cf3955fbbc588156
If you look at Function.swift
(https://github.com/Vaultio/EtherKit/blob/fc8cc589a0bf92c819f86778cf3955fbbc588156/EtherKit/Models/Function.swift),
then you can notice there are two public init
which are exactly the same, but one expects an array of ABIType
and one an array of ABIValueType
.
And since the name of the parameters are the same, you have to explicitly type the init like this:
let testViewFuncFunctionCall = Function(name: "testViewFunc", parameters: [] as [ABIType])
instead of this:
let testViewFuncFunctionCall = Function(name: "testViewFunc", parameters: [])
Do you think that it maybe would be easier to change the parameters in one init to something like "valueTypeParameters"?
Let me know what you think 🙂
Marek from Ackee.
Now that I think about it, it's maybe better to explicitly define empty arrays with as [ABIType]
since non-empty arrays compile just fine, but it's still something to consider ...