terra-cosmwasm icon indicating copy to clipboard operation
terra-cosmwasm copied to clipboard

add MsgInstantiateContractResponse to library

Open pronvis opened this issue 3 years ago • 2 comments

For submessages terra-node use

	return &types.MsgInstantiateContractResponse{
		ContractAddress: contractAddr.String(),
		Data:            data,
	}, nil

And each smart contract adds proto file and generated rust file for that structure. Maybe we can add it to terra-cosmwasm library?

For example in terraswap_factory contract: proto and rust file. Same in terraswap_pair contract: proto and rust file

I am working on my own smart contracts and to figure out where that structure comes from I should take a look into terra-core code. Not very userfriendly :) Also, copypasting this proto file to each smart contract is not the best idea too. So, I think we can add it to terra-cosmwasm library.

What do you think guys?

pronvis avatar Jun 02 '21 07:06 pronvis

@csanti @YunSuk-Yeo How do you think? I agree with the idea since refactoring is always good. Is terra-cosmwasm the best place to put?

hanjukim avatar Jul 20 '21 13:07 hanjukim

I also think it's a good idea.

However, the current code seems to have only modules related to Terra. response.proto has a depends on cosmwasm, but if there is no place to manage it, it would be great to collect it here. If you guys decide to include this, it would be nice to add a cosmos module such as Bank. I'm ready to contribute at any time if there is a decision made in that area.

JoowonYun avatar Dec 07 '21 07:12 JoowonYun