Boilertalk / Web3.swift

A pure swift Ethereum Web3 library
MIT License
643 stars 189 forks source link

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

Closed Nixsm closed 1 year ago

Nixsm commented 6 years ago

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

codecov[bot] commented 6 years ago

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.

koraykoska commented 6 years ago

@pixelmatrix Could you review this please?

pixelmatrix commented 6 years ago

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

Nixsm commented 6 years ago

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

pixelmatrix commented 6 years ago

@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!