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

Support custom MessageHandler in wasm #327

Closed
alpe opened this issue Nov 30, 2020 · 3 comments · Fixed by #402
Closed

Support custom MessageHandler in wasm #327

alpe opened this issue Nov 30, 2020 · 3 comments · Fixed by #402
Labels
enhancement New feature or request extension point Makes the system easier to extend or test
Milestone

Comments

@alpe
Copy link
Member

alpe commented Nov 30, 2020

An interface would be a great extension point to the system.

We provide a default implementation but people may want to use a different implementation in their system or for testing.
This is only a small change in keeper

@alpe alpe added the extension point Makes the system easier to extend or test label Nov 30, 2020
@alpe alpe added the enhancement New feature or request label Dec 14, 2020
@alpe
Copy link
Member Author

alpe commented Jan 20, 2021

As an implementation detail:
We could have the following type definition

// Option is an extension point to instantiate keeper with non default values
type Option interface {
	apply(*Keeper)
}

With implementations that can set new values on private attributes. The constructor would be easily extendable:

func NewKeeper(
	cdc codec.Marshaler,
	[...]
	opts ...Option,
) Keeper {
// and apply them all
	for _, o := range opts {
		o.apply(&keeper)
	}

@ethanfrey
Copy link
Member

I think this was closed in the IBC mega-merge. @alpe can you verify and close if true?

@alpe
Copy link
Member Author

alpe commented Jan 29, 2021

Hot done for MessageHandler, yet

@alpe alpe added this to the v0.16.0 milestone Jan 29, 2021
@alpe alpe closed this as completed in #402 Feb 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request extension point Makes the system easier to extend or test
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants