Web3.swift icon indicating copy to clipboard operation
Web3.swift copied to clipboard

Adding a way of calling contract methods using an Array of ABIParameters

Open Nixsm opened this issue 6 years ago • 5 comments

This PR adds a new invokeMethod to the contract object allowing the usage of [ABIParameter] instead of the variadic parameters

I also added a simple test for the method to ensure it's functionality.

Oh, this fixes #52

Nixsm avatar Aug 07 '18 13:08 Nixsm

Codecov Report

Merging #58 into master will decrease coverage by 0.07%. The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #58      +/-   ##
==========================================
- Coverage   75.14%   75.07%   -0.08%     
==========================================
  Files          64       64              
  Lines        4152     4164      +12     
==========================================
+ Hits         3120     3126       +6     
- Misses       1032     1038       +6
Impacted Files Coverage Δ
...lasses/ContractABI/Contract/EthereumContract.swift 85.05% <100%> (+0.53%) :arrow_up:
...lasses/ContractABI/Contract/SolidityFunction.swift 78.16% <33.33%> (-5.18%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 229c67c...36ca6c7. Read the comment docs.

codecov[bot] avatar Aug 07 '18 14:08 codecov[bot]

@pixelmatrix Could you review this please?

koraykoska avatar Aug 13 '18 16:08 koraykoska

I left a couple of thoughts. Looks good in general, just a couple of things to consider for future compatibility.

pixelmatrix avatar Aug 13 '18 18:08 pixelmatrix

Hey @pixelmatrix I've kept the variadic method as it is and updated the new one to have a signature without an underscore

Nixsm avatar Aug 21 '18 19:08 Nixsm

@Nixsm looks good aside from the test issue I mentioned. If you can update that and if we can get the tests passing I think it's good to go!

pixelmatrix avatar Aug 22 '18 18:08 pixelmatrix