Commit e5b057d
feat(ica)!: support json tx encoding for interchain accounts (#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>1 parent 1f4550f commit e5b057d
File tree
15 files changed
+954
-134
lines changed- modules/apps/27-interchain-accounts
- controller/keeper
- host
- client/cli
- keeper
- types
15 files changed
+954
-134
lines changedLines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
| 174 | + | |
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| 128 | + | |
128 | 129 | | |
129 | 130 | | |
130 | 131 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
446 | 446 | | |
447 | 447 | | |
448 | 448 | | |
449 | | - | |
| 449 | + | |
450 | 450 | | |
451 | 451 | | |
452 | 452 | | |
| |||
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
| 112 | + | |
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
279 | | - | |
| 279 | + | |
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
| |||
356 | 356 | | |
357 | 357 | | |
358 | 358 | | |
359 | | - | |
| 359 | + | |
360 | 360 | | |
361 | 361 | | |
362 | 362 | | |
| |||
399 | 399 | | |
400 | 400 | | |
401 | 401 | | |
402 | | - | |
| 402 | + | |
403 | 403 | | |
404 | 404 | | |
405 | 405 | | |
| |||
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
| |||
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
| 23 | + | |
21 | 24 | | |
22 | 25 | | |
23 | 26 | | |
| |||
106 | 109 | | |
107 | 110 | | |
108 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
109 | 128 | | |
110 | 129 | | |
111 | 130 | | |
| |||
Lines changed: 41 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| |||
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
30 | 41 | | |
31 | 42 | | |
32 | 43 | | |
| |||
47 | 58 | | |
48 | 59 | | |
49 | 60 | | |
50 | | - | |
| 61 | + | |
51 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
52 | 74 | | |
53 | 75 | | |
54 | 76 | | |
55 | 77 | | |
56 | | - | |
57 | | - | |
| 78 | + | |
| 79 | + | |
58 | 80 | | |
59 | 81 | | |
60 | 82 | | |
| |||
85 | 107 | | |
86 | 108 | | |
87 | 109 | | |
88 | | - | |
| 110 | + | |
89 | 111 | | |
90 | 112 | | |
91 | 113 | | |
| |||
106 | 128 | | |
107 | 129 | | |
108 | 130 | | |
109 | | - | |
| 131 | + | |
110 | 132 | | |
111 | 133 | | |
112 | 134 | | |
| |||
131 | 153 | | |
132 | 154 | | |
133 | 155 | | |
134 | | - | |
| 156 | + | |
135 | 157 | | |
136 | 158 | | |
137 | 159 | | |
| |||
165 | 187 | | |
166 | 188 | | |
167 | 189 | | |
168 | | - | |
| 190 | + | |
169 | 191 | | |
170 | 192 | | |
171 | 193 | | |
| |||
197 | 219 | | |
198 | 220 | | |
199 | 221 | | |
200 | | - | |
| 222 | + | |
201 | 223 | | |
202 | 224 | | |
203 | 225 | | |
| |||
220 | 242 | | |
221 | 243 | | |
222 | 244 | | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
223 | 256 | | |
224 | 257 | | |
225 | 258 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
27 | 32 | | |
28 | 33 | | |
29 | | - | |
| 34 | + | |
30 | 35 | | |
31 | 36 | | |
32 | 37 | | |
| |||
0 commit comments