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

Update for web3 1.0 #789

Merged
merged 10 commits into from
May 14, 2018
Merged

Update for web3 1.0 #789

merged 10 commits into from
May 14, 2018

Conversation

cgewecke
Copy link
Contributor

@cgewecke cgewecke commented Feb 2, 2018

  • Modifies tests so they pull a web3 1.0 compatible version of the MetaCoin project and translate uint values to number with parseInt instead of .toNumber.

  • Makes Web3 1.0 web-packable - it has a dependency which conditionally requires electron without using it and webpack complains about not being able to find it.

    • Upstream issue suggesting the workaround in this PR
    • The error in CI

(Code has been added to pull in a branch of truffle-init-default so that everything runs clean in CI. Will need to be removed after that branch is merged, before this branch is merged)

@cgewecke cgewecke self-assigned this Feb 2, 2018
@cgewecke cgewecke changed the title Make web3 1.0 webpack-able [WIP] Update for web3 1.0 Feb 12, 2018
@Asone
Copy link

Asone commented Feb 12, 2018

Those lasts fixes are really great news !

I've been digging through the web3-one branches of the multiples tools you had to update in order to be able to have web3 1.0.x run. That's some complex work !

With the arrival of web3 1.0.x i have a small question though as i'm questionning myself about it. Will we be able to load some wallets outside the ganache-cli | geth node and use them in the truffle-contract library ?

I've been trying with the current version ( using the 0.20.0 package ) but the lib has been spitting some exceptions. I was wondering that if loading a provider with some web3.eth.wallet.add() instructions we would be able to use such loaded wallets in order to sign the transactions ?

That would be a great improvement as it would really ease the use of the contracts with addresses that are not coming directly from the node and would allow using the wallets outside of plugins like metamask.

Anyway, great work ! Thanks for the effort !

@cgewecke
Copy link
Contributor Author

@Asone Yes, definitely agree we should try to make truffle-contract compatible with the new web3 wallet. Earlier this year wallet accounts only worked with sendTransaction and method calls needed to be encoded as data / transmitted that way. Will look into this more today and see if that's still the case.

Also if you're testing web3-one and see other things that aren't working or could be improved, please feel free to note them on the truffle-contract PR. Thanks so much for your encouragement and help :)

@cgewecke cgewecke changed the base branch from develop to next April 18, 2018 22:12
@cgewecke cgewecke changed the title [WIP] Update for web3 1.0 Update for web3 1.0 May 7, 2018
@cgewecke cgewecke requested a review from gnidan May 7, 2018 22:29
@cgewecke cgewecke merged commit a5fd29c into next May 14, 2018
@cgewecke cgewecke deleted the web3-one branch May 14, 2018 19:13
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.

3 participants