-
Notifications
You must be signed in to change notification settings - Fork 1
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
Make this a slick re-usable crate? #1
Comments
Thanks men. I did this as a poc to also use in a project later. I dont have plans to make this reusable but who knows. There is a big limitation in the code though. I was not able to make the web3 struct( |
Very interesting! I went ahead and forked it and have just begun prodding but I can use it as a regular old cate and insert the bundle without errors/works! let web3 = web3::Web3::new(transport); I'll stubbornly get ta working on that! |
Can you give me any helpful "post mortem" or dead ends you encountered or tips or...? I'm new to rust but the cogs are catching. It sounds like there might be a call for I'm excited to try and crack this obviously-valuable nut! |
So Im pretty new to rust too but yea the problem is the https://docs.rs/bevy/latest/bevy/ecs/system/trait.Resource.html |
I cannot yet fully grok that trait and what it does as from my experience a "resource" (edit) is just a regular type that you define, e.g. a
That said, I barely understand what's going on around here!! ;-) I currently am poking at the problem via this toy package. I get the following compiler error:
After digging, I find that async-std skips these types for I'm taking a very different zagg from you thought I think. I'm using websocket, just trying to get anything to work. I picked a verbatim example using That's not called for in our case, so I've "wasted" a bunch of time. Learned a lot! 😩 I'll try with the eip1193 transport and see what happens. |
All the examples in the web3 repo are for desktop targets. For wasm you must use the eip1193 transport to have a web browser blockchain client. |
I have "read" the async book (gasp...wheeze). I've read and mostly comprehended ei_1193.rs. Here's some thoughts/observations:
Did I just muddy the waters? |
Oh... It just occured to me, EIP 1193 is an "Ethereum Provider JavaScript API". So I'm stuck inside of wasm or I find something outside of wasm I can use for testing or I create some stub code to do that myself. |
maybe https://docs.rs/bevy/0.7.0/bevy/tasks/struct.IoTaskPool.html ? EIP 1193 is IO intensive but more importantly the pool could have a singleton task in which lives all of the 1193 stuff should do the trick. I think. some |
The requests are working fine. The limitation is that the web3 transport instance dont live enough to listen for events reponses. So its always necessary create a new instance before do any request. |
That seems promisse, I never used before but make sense. |
Hi there. This project overlaps with stuff I'm interested to a large degree. I'd be happy to contribute/collaborate in any way you'd find helpful...if that would be helpful.
For me, it would be great to be able to just add this as a crate to my "project". Maybe there's already such stuff? Maybe some generalization is in order?
I donno. Just another RFC I guess. (Request For Collaboration)
Whatever the case, thanks! This is a super enlightening repo from my point of view. 👏 Much understanding blossoms.
The text was updated successfully, but these errors were encountered: