Boilertalk / Web3.swift

A pure swift Ethereum Web3 library
MIT License
636 stars 187 forks source link

Documentation on how to us this in Linux (Vapor) #121

Closed maximedegreve closed 2 years ago

maximedegreve commented 2 years ago

There you would use more a async try await or EventLoop system and it's very unclear how this works with your frameworks and PromiseKit and there are no examples of how to implement your own.

A simple example of how to interact with a contract in that env would be great to get people up and running like me.

koraykoska commented 2 years ago

PromiseKit is not directly compatible with the EventLoop / async / await system. You will have to build your own abstraction layer around that. The library is fully thread-safe, so you don't have to worry about deadlocks or memory access issues. Just wrap the Promises and you are good to go.

If you build a generic solution, I am happy to accept the PR.