Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ica)!: support json tx encoding for interchain accounts (cosmos#…
…3796) * feat(ica): added EncodingJson to supported encodings * imp(ica): changed the type of cdc to Codec in ica/host * imp(ica): changed the type of cdc to Codec in ica/controller * imp(ica.test): added a test cases for EncodingJSON * imp(ica): created invalid encoding err * feat(ica)!: first prototype of json supporting DeserializeCosmosTx * docs(ica): updated godoc of DeserializeCosmosTx * docs(ica): added comments to DeserializeCosmosTx * fix(ica.test): fixed tests for DeserializeCosmosTx * fix(ica): fixed 'OnRecvPacket' in relay.go * fix(ica): fixed unhandled error * style(ica): made DeserializeCosmosTx more compact * fix(ica/host.cli.test): fixed a cli test * style(ica): ran gofumpt * style(ica): changed err message * feat(ica): first prototype of SerializeCosmosTx is implemented * fix(ica): fixed codec tests * fix(ica/host.test): fix test * fix(ica/host.test): fix test * fix(ica/host.cli): cli always uses protobuf * nil(ica/host.test): removed unneeded comment * fix(ica/controller.test): fix test * fix(ica/controller.test): fix test * fix(ica/controller.test): fix test * fix(fee.test): fix test * nit: temporary save commit * fix(ica): fixed json serde tests not passing * fix(ica): fix panic if message does not implement sdk.Msg * imp(ica): improved json serde functions * style(ica): pleased the linter * style(ica): ran gofumpt * fix(e2e): fix compilation errors by adding icatypes.EncodingProtobuf arg to serde functions * feat(ica.test): added important wip test for deserializing directly from cosmwasm * imp(ica.test): added a new test case to cw codec unit test * imp(ica): added another test case * imp(ica.test): added another test case * imp(ica.test): added another test case * style(ica.test): improved test style * style(ica.test): improved test style * style(ica.test): ran gofumpt * imp(ica.test): added json encoding version string for testing * imp(ica.test): added new 'NewJSONICAPath' function * imp(ica.test): added encoding field to ica test setup functions * fix(ica.test): fixed test setups using the new encoding field * feat(ica.test): added json test case * style(ica.test): ran gofumpt * feat(ica.test): got two cases of cosmwasm tests working in relay * style(ica.test): ran gofumpt * feat(ica): started progress on recursive handling of Anys * imp(ica.test): added a new test case for ica json encoding, this fails * feat(ica): achieved total json serialization (excluding any lists) * refactor(ica): made function shorter and removed duplicated code * style(ica): ran gofumpt * imp(ica): added more err handling code * refactor(ica): made deserialize code shorter * style(ica): made linter a bit more happy * fix(ica.test): fixed one codec test case * feat(ica): added []Any handling code * fix(ica): added more safety * nit: deleted testing codec.go * feat(ica): all works * style(ica): ran gofumpt * style(ica): made linter happy * refactor(ica): reduced code duplication * nit(ica): uncommented some test cases * imp(ica.test): added more test cases * feat(ica.test): finished test cases * style(ica.test): reorganized test cases * refactor(ica.test): combined the two test cases into one * style(ica.test): ran gofumpt * style(ica.test): renamed wallet address * fix(ica.test): fixed test case names * imp(ica.test): added more test cases * style(ica.test): ran gofumpt * test(ica): added more codec test cases * style(ica.test): ran gofumpt * feat(ica): removed JSONAny and JSONCosmosTx types * feat(ica): implemented json encoding using module codec * fix(ica.test): tests now match the new codec implementation * fix(ica.test): fixed the tests to the new implementation * style(ica.test): reorgenized the order of tests so that git diff makes sense * imp(ica/controller): controller codec need not be codec.Codec * imp(ica): replaced BinaryCodec with Codec * test(ica): fixed codec test * docs(ica.test): codec comment updated * docs(ica.test): updated comments * style(ica.test): removed 'from cosmwasm' from test case name as it is aparent from test name * style(ica.test): ran gofumpt * fix: fix merge error * deps(ica): replaced sdk.NewInt with sdkmath.NewInt * style(ica): ran 'gofumpt' * imp(ica): removed redundant cosmwasm tests * revert: "imp(ica): removed redundant cosmwasm tests" This reverts commit 5123fba. * imp(ica.test): made codec_test human readable * imp(ica.test): made relay_test human readable * style(ica.test): ran 'golanci-lint run --fix' * imp(ica/host): created 'GetAppMetadata' function * refactor(ica/host): used GetAppMetadata function * imp(ica.test): removed unneeded encoding argument * imp(ica): removed ErrUnsupportedEncoding * imp(ica.test): used suite chainB height instead of clienttypes.NewHeight(1, 100) * imp(ica.test): add nil check for unsupported encoding * imp(ica.test): added a empty/nil checks * style(ica.test): renamed version variable to TestVersionWithJSONEncoding * imp(ica): wrapped some errors * style(ica): ran 'golanci-lint run --fix' * style(ica)!: renamed EncodingJSON to EncodingProto3JSON * docs(ica): improved godocs * imp(ica): passing codec instead of binary codec * style(ica): improved error messages and godocs * docs(ica.test): improved godocs for tests * imp(ica.test): improved unsupported encoding test case slightly * style(ica.test): test style improvements * imp(ica.test): added expError to some codec tests * imp(ica.test): added more error type checks to codec tests * style(ica.test): ran 'golangci-lint run --fix' * imp(ica/host.test): added 'TestMetadataNotFound' * imp(ica/host.test): reduce test size * docs(ica/host.test): updated godocs for test * docs(ica/host): improved godoc * imp(ica/host): made GetAppMetadata private --------- Co-authored-by: Carlos Rodriguez <carlos@interchain.io>
- Loading branch information