Skip to content

Commit

Permalink
fix codec (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
SegueII authored Sep 28, 2020
1 parent 2c0b5f1 commit eb7d598
Show file tree
Hide file tree
Showing 11 changed files with 95 additions and 95 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# irismod

IRISnet Modules

**Note**: This repository is meant to house modules that are created outside of the [IRIS Hub](https://github.com/irisnet/irishub) repository.

**Note**: Requires [Go 1.14+](https://golang.org/dl/)

12 changes: 6 additions & 6 deletions modules/oracle/types/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ func init() {
// RegisterLegacyAminoCodec registers the necessary x/bank interfaces and concrete types
// on the provided Amino codec. These types are used for Amino JSON serialization.
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
cdc.RegisterConcrete(&MsgCreateFeed{}, "irishub/oracle/MsgCreateFeed", nil)
cdc.RegisterConcrete(&MsgStartFeed{}, "irishub/oracle/MsgStartFeed", nil)
cdc.RegisterConcrete(&MsgPauseFeed{}, "irishub/oracle/MsgPauseFeed", nil)
cdc.RegisterConcrete(&MsgEditFeed{}, "irishub/oracle/MsgEditFeed", nil)
cdc.RegisterConcrete(&MsgCreateFeed{}, "irismod/oracle/MsgCreateFeed", nil)
cdc.RegisterConcrete(&MsgStartFeed{}, "irismod/oracle/MsgStartFeed", nil)
cdc.RegisterConcrete(&MsgPauseFeed{}, "irismod/oracle/MsgPauseFeed", nil)
cdc.RegisterConcrete(&MsgEditFeed{}, "irismod/oracle/MsgEditFeed", nil)

cdc.RegisterConcrete(&Feed{}, "irishub/oracle/Feed", nil)
cdc.RegisterConcrete(&FeedContext{}, "irishub/oracle/FeedContext", nil)
cdc.RegisterConcrete(&Feed{}, "irismod/oracle/Feed", nil)
cdc.RegisterConcrete(&FeedContext{}, "irismod/oracle/FeedContext", nil)
}

func RegisterInterfaces(registry types.InterfaceRegistry) {
Expand Down
98 changes: 49 additions & 49 deletions modules/oracle/types/query.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions modules/oracle/types/query.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion modules/random/types/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func init() {

// RegisterLegacyAminoCodec registers concrete types on the codec.
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
cdc.RegisterConcrete(&MsgRequestRandom{}, "irishub/random/MsgRequestRandom", nil)
cdc.RegisterConcrete(&MsgRequestRandom{}, "irismod/random/MsgRequestRandom", nil)
}

func RegisterInterfaces(registry types.InterfaceRegistry) {
Expand Down
2 changes: 1 addition & 1 deletion modules/random/types/msgs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func TestMsgRequestRandomGetSignBytes(t *testing.T) {
var msg = NewMsgRequestRandom(testAddr, blockInterval, true, serviceFeeCap)
res := msg.GetSignBytes()

expected := fmt.Sprintf("{\"type\":\"irishub/random/MsgRequestRandom\",\"value\":{\"block_interval\":\"10\",\"consumer\":\"cosmos1w3jhxazpv3j8y5jww2c\",\"oracle\":true,\"service_fee_cap\":[{\"amount\":\"1000000000000000000\",\"denom\":\"%s\"}]}}", sdk.DefaultBondDenom)
expected := fmt.Sprintf("{\"type\":\"irismod/random/MsgRequestRandom\",\"value\":{\"block_interval\":\"10\",\"consumer\":\"cosmos1w3jhxazpv3j8y5jww2c\",\"oracle\":true,\"service_fee_cap\":[{\"amount\":\"1000000000000000000\",\"denom\":\"%s\"}]}}", sdk.DefaultBondDenom)
require.Equal(t, expected, string(res))
}

Expand Down
50 changes: 25 additions & 25 deletions modules/random/types/query.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions modules/random/types/query.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions modules/random/types/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ const (
{
"input": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "irishub-random-seed-input-body",
"title": "random-seed-input-body",
"description": "IRIS Hub Random Seed Input Body Schema",
"type": "object",
"additionalProperties": false
},
"output": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "irishub-random-seed-output-body",
"title": "random-seed-output-body",
"description": "IRIS Hub Random Seed Output Body Schema",
"type": "object",
"properties": {
Expand Down
Loading

0 comments on commit eb7d598

Please sign in to comment.