Skip to content
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

add MsgInstantiateContractResponse to library #1

Open
pronvis opened this issue Jun 2, 2021 · 2 comments
Open

add MsgInstantiateContractResponse to library #1

pronvis opened this issue Jun 2, 2021 · 2 comments
Assignees

Comments

@pronvis
Copy link

pronvis commented Jun 2, 2021

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 pronvis changed the title MsgInstantiateContractResponse add MsgInstantiateContractResponse to library Jun 2, 2021
@hanjukim
Copy link

hanjukim commented Jul 20, 2021

@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?

@JoowonYun
Copy link

JoowonYun commented Dec 7, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants