babylonlabs-io / bindings

Apache License 2.0
0 stars 0 forks source link

Thoughts on using stargate msg with proto generated types instead of binding #1

Open maurolacy opened 1 month ago

maurolacy commented 1 month ago

@llllllluc cloned issue babylonchain/bindings#8 on 2024-02-12:

@maurolacy @SebastianElvis

Wonder if you guys have seen this discussion on deprecating osmosis binding. Recently when I'm building something that interact with contracts like cw20 or cw721, response of execution is pure CosmosMsg. I also use Neutron SDK to use token factory and response of execution is CosmosMsg<NeutronMsg>. It caused some headache to define a response that can handle both. This makes me think it's probably a good idea to not have binding (e.g. NeutronMsg or BablyonMsg) in the first place, and just use proto generated type as stargate msg which is pure CosmosMsg, similar to the osmosis-std.

So in conclusion I guess the benefit of not having binding are:

  1. More streamlined devX, you can still implement helper functions if you want.

  2. Less maintenance required, generating proto types can be automated.

maurolacy commented 1 month ago

@maurolacy commented on 2024-02-12:

Hi, thanks for the reference. We'll take this into account.

maurolacy commented 1 month ago

@llllllluc commented on 2024-02-12:

Hi, thanks for the reference. We'll take this into account.

Awesome, recently I'm thinking about creating a generalized version of osmosis-std, so it can be used for all cosmos sdk chains to generate rust proto and have out of box support in cw with stargate msg, maybe I can experiment that with babylon.