Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Naming Issue #37

Open
fortmarek opened this issue Sep 17, 2018 · 1 comment
Open

Naming Issue #37

fortmarek opened this issue Sep 17, 2018 · 1 comment

Comments

@fortmarek
Copy link
Contributor

OK, I have a bit of problem with one change in this commit: fc8cc58

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.

@fortmarek
Copy link
Contributor Author

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 ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant