New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updating Auction Dapp to Web3 1.2.9 (added Bee with Webpack4 and Babel7) #1123
Comments
To enable chatroom need to run local Geth node. Whisper was removed from Go-Ethereum in v1.9.21 so had to use v1.9.20 Followed instructions at https://goethereumbook.org/en/whisper/ to generate key for config.js |
Thanks! Works much better :) Tested on node 16.14.2 and ganache-cli but without whisper. I'm facing one issue on finalizing auction. Cannot process transaction due to below issue. Maybe you have any idea?
|
Sorry don’t really know. One thing I forgot to put in the issue summary was that I also had to remove all the .toNumber() calls as it seems with Web@1.2.9 they aren’t needed. (bd6129d) |
Returning to this i've added support for Bee using Bee-js. Needed to move the build to Webpack4 and Babel7 to use Bee-js. Instead of using FormData (See ethersphere/bee#2864) i translated the auction object (minus the image file) into JSON and uploaded that file along with the image file as an array using Bee-js .uploadFiles. The auction file is not actually used in the remainder of the application but can be reconstructed by parsing the JSON.
Also src/config.js needs to be updated with:
In Auction.vue and Home.vue i have substituted:
I'm sure there is a better and more robust way (please suggest) but this seemed to work. Need to specify cors option when launching bee (only in development!):
Geth command line for a local node to support Whisper for chat:
See PR: #1132 |
I had to make a few changes to Auction Dapp to run with current Web3:
Web3 1.2.9
Node 16.14.0
NPM 8.5.2
Update .fromWei() to utils.fromWei()
If using Ropsten config.js should be of format:
JSONRPC_ENDPOINT: 'https://ropsten.infura.io/v3/_your_id',
JSONRPC_WS_ENDPOINT: 'wss://ropsten.infura.io/ws/v3/_your_id',
Note Ganache-ui doesn't support websockets so cant be used for testing. Ganache-cli does.
Make sure DEEDREPOSITORY_ADDRESS and AUCTIONREPOSITORY_ADDRESS are the addresses of your contracts after deployment and that JSON files from backend/build/contracts match.
Swarm bee needs to be updated so have commented these lines out for now, leaving
Happy to submit pull request
The text was updated successfully, but these errors were encountered: