web3swift-team / web3swift

Elegant Web3js functionality in Swift. Native ABI parsing and smart contract interactions.
Apache License 2.0
816 stars 438 forks source link

feat: sign without hash #824

Closed JuyeonYu closed 1 year ago

JuyeonYu commented 1 year ago

Summary of Changes

For signing, add bool value using hash or not . There is the same bool argument for Web3j for Java. This PR will help collaborate with Java developers.

yaroslavyaroslav commented 1 year ago

@JuyeonYu thank for your participation, there's just a few requests about that:

  1. Could you please to not recreate PRs, but update the excited ones if it's required.
  2. I speculate that you're confused with the failing ci/cd. It has failed on code styling checked with a swiftlint. Please check the swiftlint config, and try to run it locally to figure what exactly its rule violated within tour pr.
  3. The last but the most important, please elaborate the reasoning of this PR, it's really opaque for me so far.
JuyeonYu commented 1 year ago

@yaroslavyaroslav Hello. sorry for my insufficient reason and the others. and for the failing ci/cd, I added default value for the new argument.

nowadays I collaborate with Java developers for making DAPP. and of course, the differences between web3j for Java and web3swift are being discovered day by day.

In this PR, I added 'useHash' argument in making signature function. the reason is why in the web3j for Java, there is the argument. So when they make a signature without hash, we can't verify signature each other.

yaroslavyaroslav commented 1 year ago

I'm fine with that. What about you folks? @janndriessen @JeneaVranceanu

JeneaVranceanu commented 1 year ago

I'll add documentation to functions in Web3Signer and then we are ready to merge.