- Copy proto files from cosmos sdk into
/proto
- run
buf export buf.build/cosmos/cosmos-sdk:$(curl -sS https://api.github.com/repos/cosmos/cosmos-sdk/commits/v0.46.1 | jq -r .sha) --output ./proto
from the root directory (replacing with whatever branch of cosmos is used) yarn codegen
- note: you might have to fix some errors in the proto files for this to run (typically issues with;;
semicolons)
These aren't ideal, and might point to an issue with type generation (or possibly something on the SDK side), but for the short term it's easiest just to run a manual search and replace on .ts files:
- Make all
pagination
types optional (replacepagination:
withpagination?:
in.ts
files) - Change passed parameters in
src/codegen/cosmos/group/v1/query.lcd.ts
tosnake_case
(should be fixed with this issue) - Change
GroupPolicyInfo
response type:decision_policy: Any;
->decision_policy: ThresholdDecisionPolicy | PercentageDecisionPolicy;
Pagination
doesn't seem to be working- Amino signing doesn't seem to be working correctly
- Types aren't perfect.
tsc
won't run, and the project is forced to use babel to compile despite errors