Skip to content

Commit

Permalink
Merge pull request #14 from SunriseLayer/blob_encoding_config_fix
Browse files Browse the repository at this point in the history
Update makeBlobEncodingConfig to include authEncoder
  • Loading branch information
Senna46 committed Apr 23, 2024
2 parents e07bdf6 + 5f2a472 commit ee27bb3
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion x/blob/types/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,25 @@ func (localEncoder) RegisterInterfaces(r codectypes.InterfaceRegistry) {
RegisterInterfaces(r)
}

type authEncoder struct{}

// RegisterLegacyAminoCodec registers the auth module's types for the given codec.
func (authEncoder) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
authtypes.RegisterLegacyAminoCodec(cdc)
}

// RegisterInterfaces registers interfaces and implementations of the auth module.
func (authEncoder) RegisterInterfaces(registry codectypes.InterfaceRegistry) {
authtypes.RegisterInterfaces(registry)
}

// makeBlobEncodingConfig uses the blob modules RegisterInterfaces
// function to create an encoding config for the blob module. This is useful
// so that we don't have to import the app package.
func makeBlobEncodingConfig() encoding.Config {
e := localEncoder{}
return encoding.MakeConfig(e)
a := authEncoder{}
return encoding.MakeConfig(a, e)
}

// KeyringSigner uses a keyring to sign and build celestia-app transactions
Expand Down

0 comments on commit ee27bb3

Please sign in to comment.