Skip to content
This repository has been archived by the owner on Sep 13, 2024. It is now read-only.

Add support for macOS #10

Merged
merged 10 commits into from Feb 26, 2018
Merged

Add support for macOS #10

merged 10 commits into from Feb 26, 2018

Conversation

dsemenovsky
Copy link
Contributor

Added multiple targets support to use on both iOS and macOS platforms

@shamatar
Copy link
Contributor

Hello @dsemenovsky

I'll add this pull request before the 0.3 refactoring, although ABIElement fix may require an extra code change.

Sincerely, Alex

@shamatar shamatar merged commit 526faa6 into BANKEX:master Feb 26, 2018
@dsemenovsky
Copy link
Contributor Author

Hi @shamatar

After I uncommented your line for tailsPointer in ABIElement, I was still having issues when sending multiple params.

I came up with this solution: https://github.com/Vaultie/web3swift/commit/e6d15e74237e50100a847d866147b80478db6f25

It worked for me on the contract methods with params count: 0, 1, 2, 3.
I compared input data generated by web3swift and Truffle console and everything seems to be fine.

Could you give me some comments on this? If it works as supposed to, then maybe you'd like to merge that commit?

Best,
Dmitry

@shamatar
Copy link
Contributor

Hello @dsemenovsky

I'll have an ABI encoder reworked anyway, to support fixed size arrays of dynamic types and implement experimental ABI version 2 that will come with Solidity 0.5. Although for now all tests have passed and I'll use it as a base.

Sincerely, Alex

@dsemenovsky
Copy link
Contributor Author

@shamatar I mean, this PR doesn't work for me on test environment and I'd like to propose further enhancement, so the library would work with multiple function parameters.

There was a difference between input data
web3swift:

0x3ffbd47f000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000**a0**000000000000000000000000000000000000000000000000000000000000000a7465737420323334323300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d7465733233343233343233347400000000000000000000000000000000000000

method call from Truffle:

0x3ffbd47f000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000**80**000000000000000000000000000000000000000000000000000000000000000a7465737420323334323300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d7465733233343233343233347400000000000000000000000000000000000000

I tested and found extra increment for tailsPointer. Without the line in my latest commit it works as expected with different number of parameters.

So I'm proposing a PR and waiting for 0.3.0 :)

@dsemenovsky
Copy link
Contributor Author

@shamatar I'd like to switch back to your repo so waiting for PR approval (#18)

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

Successfully merging this pull request may close these issues.

2 participants