CosmWasm / ts-codegen

Convert your CosmWasm smart contracts into dev-friendly TypeScript classes so you can focus on shipping code.
https://cosmology.zone/products/ts-codegen
Apache License 2.0
116 stars 28 forks source link

[react] context generation for contract client instances #77

Open pyramation opened 2 years ago

pyramation commented 2 years ago

We need some helpers to create contexts/providers for the client instances.

A good example of the client here: https://github.com/EquilibriumEtf/frontend/blob/53e24aa7992bdaad85ec2a7c02a2e604a2d40897/client/core/index.ts#L27 https://gist.github.com/pyramation/05cebb95208accbcc76fbbe273211167

example of provider here: https://github.com/EquilibriumEtf/frontend/blob/53e24aa7992bdaad85ec2a7c02a2e604a2d40897/client/react/client/EquilibriumProvider.tsx#L8 https://gist.github.com/pyramation/9db71d59e66694160d1194d291355c04

With a few changes: