-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TRA-354] Add a hard cap to the number of markets listed for PML #1644
Conversation
Signed-off-by: Shrenuj Bansal <[email protected]>
Warning Rate limit exceeded@shrenujb has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 4 minutes and 6 seconds before requesting another review. How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. WalkthroughThe changes introduce a Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant gRPC
participant Keeper
Client->>+gRPC: QueryMarketsHardCap()
gRPC->>+Keeper: GetMarketsHardCap()
Keeper-->>-gRPC: hardCap value
gRPC-->>-Client: QueryMarketsHardCapResponse
Client->>+gRPC: SetMarketsHardCap(MsgSetMarketsHardCap)
gRPC->>+Keeper: SetMarketsHardCap(hardCap)
Keeper-->>-gRPC: MsgSetMarketsHardCapResponse
gRPC-->>-Client: SetMarketsHardCapResponse
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
Signed-off-by: Shrenuj Bansal <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 6
Outside diff range and nitpick comments (2)
protocol/x/listing/module.go (2)
Line range hint
132-132
: Undefined functionInitGenesis
referenced.Please ensure that the
InitGenesis
function is defined and correctly imported into this file.
Line range hint
137-137
: Undefined functionExportGenesis
referenced.Please ensure that the
ExportGenesis
function is defined and correctly imported into this file.
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (4)
protocol/go.mod
is excluded by!**/*.mod
protocol/x/listing/types/genesis.pb.go
is excluded by!**/*.pb.go
protocol/x/listing/types/query.pb.go
is excluded by!**/*.pb.go
protocol/x/listing/types/tx.pb.go
is excluded by!**/*.pb.go
Files selected for processing (26)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/bundle.ts (8 hunks)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/genesis.ts (3 hunks)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/query.rpc.Query.ts (1 hunks)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/query.ts (1 hunks)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/tx.ts (1 hunks)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/rpc.tx.ts (1 hunks)
- indexer/services/comlink/public/api-documentation.md (121 hunks)
- proto/dydxprotocol/listing/genesis.proto (1 hunks)
- proto/dydxprotocol/listing/query.proto (1 hunks)
- proto/dydxprotocol/listing/tx.proto (1 hunks)
- protocol/app/basic_manager/basic_manager.go (2 hunks)
- protocol/app/msgs/all_msgs.go (1 hunks)
- protocol/app/msgs/internal_msgs.go (2 hunks)
- protocol/app/msgs/internal_msgs_test.go (1 hunks)
- protocol/app/testdata/default_genesis_state.json (1 hunks)
- protocol/scripts/genesis/sample_pregenesis.json (1 hunks)
- protocol/testutil/constants/genesis.go (1 hunks)
- protocol/x/listing/genesis.go (1 hunks)
- protocol/x/listing/keeper/grpc_query_enabled_status_test.go (1 hunks)
- protocol/x/listing/keeper/grpc_query_pml_enabled_status.go (1 hunks)
- protocol/x/listing/keeper/listing.go (1 hunks)
- protocol/x/listing/keeper/msg_server_enable_pml.go (1 hunks)
- protocol/x/listing/keeper/msg_server_enable_pml_test.go (1 hunks)
- protocol/x/listing/module.go (1 hunks)
- protocol/x/listing/types/genesis.go (1 hunks)
- protocol/x/listing/types/keys.go (1 hunks)
Files not summarized due to errors (1)
- indexer/services/comlink/public/api-documentation.md: Error: Message exceeds token limit
Files skipped from review due to trivial changes (1)
- protocol/x/listing/types/keys.go
Additional context used
golangci-lint
protocol/x/listing/types/genesis.go
4-4: undefined: GenesisState (typecheck)
12-12: undefined: GenesisState (typecheck)
5-5: undefined: GenesisState (typecheck)
protocol/x/listing/keeper/msg_server_enable_pml.go
12-12: undefined: msgServer (typecheck)
protocol/x/listing/module.go
132-132: undefined: InitGenesis (typecheck)
137-137: undefined: ExportGenesis (typecheck)
LanguageTool
indexer/services/comlink/public/api-documentation.md
[misspelling] ~2676-~2676: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...id="schemaperpetualpositionstatus"> </a...
[misspelling] ~2677-~2677: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...d="schema_PerpetualPositionStatus"> <...
[misspelling] ~2702-~2702: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...onSide <a id="to...
[misspelling] ~2703-~2703: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ..."> <a id="tocsp...
[misspelling] ~2727-~2727: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...IsoString <a id="tocSi...
[misspelling] ~2728-~2728: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...ing"> <a id="tocsisos...
[misspelling] ~2745-~2745: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...maperpetualpositionresponseobject"> <a id="schema_PerpetualPositionResponseObj...
[misspelling] ~2746-~2746: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...a_PerpetualPositionResponseObject"> <a id="tocSperpetualpositionresponseobject...
[misspelling] ~2795-~2795: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...a id="schemaperpetualpositionsmap"> ...
[misspelling] ~2796-~2796: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... id="schema_PerpetualPositionsMap"> <a ...
[misspelling] ~2850-~2850: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...schemaassetpositionresponseobject"> <a id="schema_AssetPositionResponseObject"...
[misspelling] ~2851-~2851: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...chema_AssetPositionResponseObject"> </...
[misspelling] ~2878-~2878: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...p <a i...
[misspelling] ~2879-~2879: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...> <a id="...
[misspelling] ~2911-~2911: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...d="schemasubaccountresponseobject"> </...
[misspelling] ~2912-~2912: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...="schema_SubaccountResponseObject"> ...
[misspelling] ~2997-~2997: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...nse <a id=...
[misspelling] ~2998-~2998: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: .../a> <a id="to...
[misspelling] ~3082-~3082: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...d="schemaparentsubaccountresponse"> </...
[misspelling] ~3083-~3083: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...="schema_ParentSubaccountResponse"> ...
[misspelling] ~3173-~3173: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...a id="schemaassetpositionresponse"> ...
[misspelling] ~3174-~3174: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... id="schema_AssetPositionResponse"> <a ...
[misspelling] ~3201-~3201: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...on <a id...
[misspelling] ~3202-~3202: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...a> <a id="t...
[misspelling] ~3231-~3231: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... <...
[misspelling] ~3232-~3232: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...a id="schema_CandleResponseObject"> <a i...
[misspelling] ~3273-~3273: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...onse <a id="...
[misspelling] ~3274-~3274: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... <a id="toc...
[misspelling] ~3308-~3308: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...us <a id...
[misspelling] ~3309-~3309: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...a> <a id="t...
[misspelling] ~3336-~3336: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...on <a id...
[misspelling] ~3337-~3337: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...a> <a id="t...
[misspelling] ~3364-~3364: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... <...
[misspelling] ~3365-~3365: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...a id="schema_ComplianceV2Response"> <a i...
[misspelling] ~3388-~3388: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...OrderSide <a id="tocSo...
[misspelling] ~3389-~3389: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...ide"> <a id="tocsorde...
[misspelling] ~3413-~3413: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...Liquidity <a id="tocSl...
[misspelling] ~3414-~3414: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...ity"> <a id="tocsliqu...
[misspelling] ~3438-~3438: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...# FillType <a id="tocSfi...
[misspelling] ~3439-~3439: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...type"> <a id="tocsfillt...
[misspelling] ~3466-~3466: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...rketType <a id="tocS...
[misspelling] ~3467-~3467: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...pe"> <a id="tocsmar...
[misspelling] ~3491-~3491: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... <a ...
[misspelling] ~3492-~3492: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... <a id=...
[misspelling] ~3537-~3537: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...sponse <a id="to...
[misspelling] ~3538-~3538: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ..."> <a id="tocsf...
[misspelling] ~3580-~3580: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...onse <a id="...
[misspelling] ~3581-~3581: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... <a id="toc...
[misspelling] ~3602-~3602: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...chemahistoricalblocktradingreward"> <a id="schema_HistoricalBlockTradingReward...
[misspelling] ~3603-~3603: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...hema_HistoricalBlockTradingReward"> <...
[misspelling] ~3626-~3626: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...oricalblocktradingrewardsresponse"> <a id="schema_HistoricalBlockTradingReward...
[misspelling] ~3627-~3627: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...oricalBlockTradingRewardsResponse"> <a id="tocShistoricalblocktradingrewardsre...
[misspelling] ~3652-~3652: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...mahistoricalfundingresponseobject"> <a id="schema_HistoricalFundingResponseObj...
[misspelling] ~3653-~3653: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...a_HistoricalFundingResponseObject"> <a id="tocShistoricalfundingresponseobject...
[misspelling] ~3680-~3680: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...="schemahistoricalfundingresponse"> <...
[misspelling] ~3681-~3681: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ..."schema_HistoricalFundingResponse"> ...
[misspelling] ~3708-~3708: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... id="schemapnlticksresponseobject"> ...
[misspelling] ~3709-~3709: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...id="schema_PnlTicksResponseObject"> <a...
[misspelling] ~3742-~3742: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...a id="schemahistoricalpnlresponse"> ...
[misspelling] ~3743-~3743: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... id="schema_HistoricalPnlResponse"> <a ...
[misspelling] ~3779-~3779: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...ematradingrewardaggregationperiod"> <a id="schema_TradingRewardAggregationPeri...
[misspelling] ~3780-~3780: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...ma_TradingRewardAggregationPeriod"> <a id="tocStradingrewardaggregationperiod"...
[misspelling] ~3805-~3805: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...istoricaltradingrewardaggregation"> <a id="schema_HistoricalTradingRewardAggre...
[misspelling] ~3806-~3806: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...istoricalTradingRewardAggregation"> <a id="tocShistoricaltradingrewardaggregat...
[misspelling] ~3835-~3835: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...tradingrewardaggregationsresponse"> <a id="schema_HistoricalTradingRewardAggre...
[misspelling] ~3836-~3836: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...TradingRewardAggregationsResponse"> <a id="tocShistoricaltradingrewardaggregat...
[misspelling] ~3864-~3864: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...schemaorderbookresponsepricelevel"> <a id="schema_OrderbookResponsePriceLevel"...
[misspelling] ~3865-~3865: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...chema_OrderbookResponsePriceLevel"> </...
[misspelling] ~3886-~3886: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...id="schemaorderbookresponseobject"> </a...
[misspelling] ~3887-~3887: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...d="schema_OrderbookResponseObject"> <...
[misspelling] ~3918-~3918: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...orce <a id="...
[misspelling] ~3919-~3919: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... <a id="toc...
[misspelling] ~3944-~3944: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...rStatus <a id="toc...
[misspelling] ~3945-~3945: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...s"> <a id="tocsor...
[misspelling] ~3972-~3972: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... id="schemabesteffortopenedstatus"> ...
[misspelling] ~3973-~3973: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...id="schema_BestEffortOpenedStatus"> <a...
[misspelling] ~3996-~3996: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...atus <a id="...
[misspelling] ~3997-~3997: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... <a id="toc...
[misspelling] ~4022-~4022: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...OrderType <a id="tocSo...
[misspelling] ~4023-~4023: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...ype"> <a id="tocsorde...
[misspelling] ~4052-~4052: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... <a...
[misspelling] ~4053-~4053: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... <a id...
[misspelling] ~4116-~4116: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...a id="schemaperpetualmarketstatus"> ...
[misspelling] ~4117-~4117: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... id="schema_PerpetualMarketStatus"> <a ...
[misspelling] ~4145-~4145: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... <a...
[misspelling] ~4146-~4146: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... <a id...
[misspelling] ~4170-~4170: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...hemaperpetualmarketresponseobject"> <a id="schema_PerpetualMarketResponseObjec...
[misspelling] ~4171-~4171: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...ema_PerpetualMarketResponseObject"> ...
[misspelling] ~4230-~4230: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...id="schemaperpetualmarketresponse"> </a...
[misspelling] ~4231-~4231: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...d="schema_PerpetualMarketResponse"> <...
[misspelling] ~4298-~4298: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...="schemaperpetualpositionresponse"> <...
[misspelling] ~4299-~4299: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ..."schema_PerpetualPositionResponse"> ...
[misspelling] ~4337-~4337: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...id="schemasparklineresponseobject"> </a...
[misspelling] ~4338-~4338: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...d="schema_SparklineResponseObject"> <...
[misspelling] ~4362-~4362: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... <a...
[misspelling] ~4363-~4363: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... <a id...
[misspelling] ~4387-~4387: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...sponse <a id="to...
[misspelling] ~4388-~4388: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ..."> <a id="tocst...
[misspelling] ~4409-~4409: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...TradeType <a id="tocSt...
[misspelling] ~4410-~4410: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...ype"> <a id="tocstrad...
[misspelling] ~4435-~4435: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... <a...
[misspelling] ~4436-~4436: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... <a id...
[misspelling] ~4467-~4467: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...ponse <a id="t...
[misspelling] ~4468-~4468: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...> <a id="tocs...
[misspelling] ~4503-~4503: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...erType <a id="to...
[misspelling] ~4504-~4504: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ..."> <a id="tocst...
[misspelling] ~4530-~4530: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... id="schematransferresponseobject"> ...
[misspelling] ~4531-~4531: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...id="schema_TransferResponseObject"> <a...
[misspelling] ~4576-~4576: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...se <a id...
[misspelling] ~4577-~4577: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...a> <a id="t...
[misspelling] ~4620-~4620: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...aparentsubaccounttransferresponse"> <a id="schema_ParentSubaccountTransferResp...
[misspelling] ~4621-~4621: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ..._ParentSubaccountTransferResponse"> <a id="tocSparentsubaccounttransferrespons...
Markdownlint
indexer/services/comlink/public/api-documentation.md
4662-4662: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines
61-61: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
192-192: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
318-318: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
454-454: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
531-531: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
623-623: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
704-704: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
788-788: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
890-890: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
970-970: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
1040-1040: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
1115-1115: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
1198-1198: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
1287-1287: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
1381-1381: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
1456-1456: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
1558-1558: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
1744-1744: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
1905-1905: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
1994-1994: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
2122-2122: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
2222-2222: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
2316-2316: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
2381-2381: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
2452-2452: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
2538-2538: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
2632-2632: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
1623-1623: null (MD036, no-emphasis-as-heading)
Emphasis used instead of a heading
1629-1629: null (MD036, no-emphasis-as-heading)
Emphasis used instead of a heading
1635-1635: null (MD036, no-emphasis-as-heading)
Emphasis used instead of a heading
1809-1809: null (MD036, no-emphasis-as-heading)
Emphasis used instead of a heading
1815-1815: null (MD036, no-emphasis-as-heading)
Emphasis used instead of a heading
1821-1821: null (MD036, no-emphasis-as-heading)
Emphasis used instead of a heading
Additional comments not posted (33)
proto/dydxprotocol/listing/genesis.proto (1)
7-10
: Field addition aligns with PR objectives.The addition of the
permissionless_listing_enabled
field to theGenesisState
message aligns with the PR's objective to manage permissionless listings via governance mechanisms.protocol/x/listing/keeper/grpc_query_pml_enabled_status.go (1)
10-19
: Function implementation is correct and aligns with PR objectives.The
PermissionlessMarketListingStatus
function correctly implements the logic to query the status of permissionless listings, aligning with the PR's objectives.proto/dydxprotocol/listing/query.proto (1)
7-17
: RPC service and message types addition aligns with PR objectives.The addition of the
PermissionlessMarketListingStatus
RPC service method and related message types aligns with the PR's objective to manage permissionless listings via governance mechanisms.protocol/x/listing/genesis.go (2)
13-15
: Ensure proper documentation for the use ofpanic
inInitGenesis
.It's crucial to document why
panic
is used here for maintainability and clarity for future developers.
20-21
: LGTM! TheExportGenesis
function correctly returns the default genesis state.protocol/x/listing/keeper/grpc_query_enabled_status_test.go (1)
12-24
: Consider adding more test cases.It would be beneficial to include tests for scenarios where the permissionless listing is disabled, and for error handling paths.
proto/dydxprotocol/listing/tx.proto (1)
11-26
: Protobuf definitions are correctly set up for enabling/disabling permissionless market listing.The use of options and annotations is appropriate and follows best practices for Cosmos SDK modules.
protocol/x/listing/keeper/listing.go (2)
12-21
: Consider simplifying the storage of a boolean flag.Using JSON marshaling for a boolean might be more complex than necessary. Consider using a simpler method if possible.
23-35
: Good error handling inIsPermissionlessListingEnabled
.The function correctly handles the scenario where the permissionless listing enable key is not found.
protocol/x/listing/keeper/msg_server_enable_pml.go (2)
18-25
: Ensure proper authority validation.The authority check is implemented correctly using
HasAuthority
and properly handles the error scenario.
27-31
: Correct implementation of setting the permissionless listing flag.The logic to set the permissionless listing enable flag is correctly implemented and handles errors appropriately.
indexer/packages/v4-protos/src/codegen/dydxprotocol/rpc.tx.ts (1)
14-14
: Proper integration of thelisting
client.The addition of the
listing
client to the RPC message clients is implemented correctly.indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/query.rpc.Query.ts (1)
8-21
: Correct implementation of the new query method.The
permissionlessMarketListingStatus
method is correctly declared in theQuery
interface and implemented inQueryClientImpl
, including proper request handling and response decoding.indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/genesis.ts (1)
Line range hint
5-55
: Proper handling of the newpermissionlessListingEnabled
field.The
permissionlessListingEnabled
field is correctly added to theGenesisState
interface and is properly handled in the encode, decode, and fromPartial functions.protocol/x/listing/keeper/msg_server_enable_pml_test.go (1)
14-60
: Comprehensive test coverage forMsgEnablePermissionlessMarketListing
.The test cases cover both success scenarios (enabled and disabled) and a failure scenario due to invalid authority. This ensures that the function behaves as expected under different conditions.
indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/query.ts (1)
5-97
: Ensure proper handling of default values in encoding.The encoding functions should explicitly handle the default values to ensure that they are correctly represented in the serialized data.
Verification successful
The previous script successfully identified multiple instances of
encode
functions across various files. However, it did not provide specific insights into the handling of default values within theencode
functions in the file under review (indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/query.ts
).To ensure that the default values are handled correctly in the encoding process, we need to focus on the specific
encode
functions within thequery.ts
file. Let's generate a new script to extract and review theencode
functions in this file.
The previous script failed due to an incorrect pattern syntax in
ast-grep
. To correct this, we need to use a valid pattern that can accurately extract theencode
functions from thequery.ts
file.Let's generate a new shell script with the corrected pattern to extract the
encode
functions.
The previous attempt to extract the
encode
functions did not produce any output, which suggests that the pattern might still be incorrect or the functions are not defined in the expected format.To ensure we capture the
encode
functions correctly, let's refine our approach by searching for theencode
keyword and then extracting the relevant function definitions manually.
The output shows the
encode
functions for bothQueryPermissionlessMarketListingStatus
andQueryPermissionlessMarketListingStatusResponse
. Here's the relevant code:encode(_: QueryPermissionlessMarketListingStatus, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, encode(message: QueryPermissionlessMarketListingStatusResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.enabled === true) { writer.uint32(8).bool(message.enabled); } return writer; },The
encode
function forQueryPermissionlessMarketListingStatus
does not handle any fields, as the interface is empty. Theencode
function forQueryPermissionlessMarketListingStatusResponse
correctly handles theenabled
field by checking if it istrue
before writing it.Given this, the encoding logic appears to handle default values correctly where applicable.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the default values are handled correctly in the encoding process. # Test: Check the encoding logic for default values. rg --type typescript $'encode'Length of output: 64
Script:
#!/bin/bash # Description: Verify that the default values are handled correctly in the encoding process. # Test: Check the encoding logic for default values. rg --type ts $'encode'Length of output: 156988
Script:
#!/bin/bash # Description: Extract and review the encode functions in the query.ts file to ensure proper handling of default values. # Locate the query.ts file file_path=$(fd query.ts | grep 'indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/query.ts') # Extract the encode functions from the query.ts file ast-grep --lang typescript --pattern $'encode($_, $_) { $$$ }' $file_pathLength of output: 750
Script:
#!/bin/bash # Description: Extract and review the encode functions in the query.ts file to ensure proper handling of default values. # Locate the query.ts file file_path=$(fd query.ts | grep 'indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/query.ts') # Extract the encode functions from the query.ts file ast-grep --lang typescript --pattern 'function encode($$, $$) { $$ }' $file_pathLength of output: 313
Script:
#!/bin/bash # Description: Extract and review the encode functions in the query.ts file to ensure proper handling of default values. # Locate the query.ts file file_path=$(fd query.ts | grep 'indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/query.ts') # Search for the encode functions in the query.ts file rg 'encode' $file_path -A 10Length of output: 1280
protocol/app/basic_manager/basic_manager.go (1)
Line range hint
23-97
: Correct inclusion oflistingmodule
inModuleBasics
.The addition of
listingmodule.AppModuleBasic{}
toModuleBasics
is correctly placed and ensures that the listing module is initialized properly with other modules.indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/tx.ts (1)
5-109
: Ensure robust handling of edge cases in message encoding and decoding.The encoding and decoding functions should robustly handle edge cases, such as empty strings or default boolean values, to prevent any data integrity issues.
Verification successful
The search results indicate that the
encode
anddecode
functions are widely used across various files in the repository. However, to ensure robust handling of edge cases specifically for theMsgEnablePermissionlessMarketListing
andMsgEnablePermissionlessMarketListingResponse
messages, we need to focus on their specific implementations and usages.To verify the handling of edge cases in the encoding and decoding logic for these specific messages, we should inspect the relevant functions in the
indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/tx.ts
file.
The previous attempt to extract the
encode
anddecode
functions forMsgEnablePermissionlessMarketListing
andMsgEnablePermissionlessMarketListingResponse
did not produce any output. This suggests that the patterns used might not have matched the actual code structure.To ensure we correctly capture the relevant functions, we should refine our search patterns and include more context around the
encode
anddecode
functions.
The previous attempts to extract the
encode
anddecode
functions forMsgEnablePermissionlessMarketListing
andMsgEnablePermissionlessMarketListingResponse
did not produce any output. This suggests that the patterns used might still not match the actual code structure.Given that the functions are defined in the provided code snippet, we can manually verify the handling of edge cases by reviewing the code directly.
Manual Verification of Edge Cases
MsgEnablePermissionlessMarketListing
Encode Function:
encode(message: MsgEnablePermissionlessMarketListing, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.authority !== "") { writer.uint32(10).string(message.authority); } if (message.enablePermissionlessMarketListing === true) { writer.uint32(16).bool(message.enablePermissionlessMarketListing); } return writer; }
- Edge Case Handling:
- The function checks if
message.authority
is not an empty string before writing it.- It checks if
message.enablePermissionlessMarketListing
istrue
before writing it.Decode Function:
decode(input: _m0.Reader | Uint8Array, length?: number): MsgEnablePermissionlessMarketListing { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgEnablePermissionlessMarketListing(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.authority = reader.string(); break; case 2: message.enablePermissionlessMarketListing = reader.bool(); break; default: reader.skipType(tag & 7); break; } } return message; }
- Edge Case Handling:
- The function initializes
message
with default values.- It reads
authority
andenablePermissionlessMarketListing
only if the corresponding tags are present.
MsgEnablePermissionlessMarketListingResponse
Encode Function:
encode(_: MsgEnablePermissionlessMarketListingResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }
- Edge Case Handling:
- This function does not have any fields to encode, so no edge cases are applicable.
Decode Function:
decode(input: _m0.Reader | Uint8Array, length?: number): MsgEnablePermissionlessMarketListingResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgEnablePermissionlessMarketListingResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }
- Edge Case Handling:
- This function does not have any fields to decode, so no edge cases are applicable.
Conclusion
The encoding and decoding functions for
MsgEnablePermissionlessMarketListing
andMsgEnablePermissionlessMarketListingResponse
handle edge cases appropriately by checking for default values and initializing messages with default values.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the handling of edge cases in message encoding and decoding. # Test: Check the encoding and decoding logic for edge cases. rg --type typescript $'encode|decode'Length of output: 73
Script:
#!/bin/bash # Description: Verify the handling of edge cases in message encoding and decoding. # Test: Check the encoding and decoding logic for edge cases. rg 'encode|decode' --glob '*.ts'Length of output: 292442
Script:
#!/bin/bash # Description: Extract the encode and decode functions for MsgEnablePermissionlessMarketListing and MsgEnablePermissionlessMarketListingResponse. # Extract the encode function for MsgEnablePermissionlessMarketListing ast-grep --lang typescript --pattern $'export const MsgEnablePermissionlessMarketListing = { encode($_, $_) { $$$ } }' indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/tx.ts # Extract the decode function for MsgEnablePermissionlessMarketListing ast-grep --lang typescript --pattern $'export const MsgEnablePermissionlessMarketListing = { decode($_, $_) { $$$ } }' indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/tx.ts # Extract the encode function for MsgEnablePermissionlessMarketListingResponse ast-grep --lang typescript --pattern $'export const MsgEnablePermissionlessMarketListingResponse = { encode($_, $_) { $$$ } }' indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/tx.ts # Extract the decode function for MsgEnablePermissionlessMarketListingResponse ast-grep --lang typescript --pattern $'export const MsgEnablePermissionlessMarketListingResponse = { decode($_, $_) { $$$ } }' indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/tx.tsLength of output: 791
Script:
#!/bin/bash # Description: Extract the encode and decode functions for MsgEnablePermissionlessMarketListing and MsgEnablePermissionlessMarketListingResponse with refined patterns. # Extract the encode function for MsgEnablePermissionlessMarketListing ast-grep --lang typescript --pattern $'export const MsgEnablePermissionlessMarketListing = { encode(message: MsgEnablePermissionlessMarketListing, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { $$$ } }' indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/tx.ts # Extract the decode function for MsgEnablePermissionlessMarketListing ast-grep --lang typescript --pattern $'export const MsgEnablePermissionlessMarketListing = { decode(input: _m0.Reader | Uint8Array, length?: number): MsgEnablePermissionlessMarketListing { $$$ } }' indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/tx.ts # Extract the encode function for MsgEnablePermissionlessMarketListingResponse ast-grep --lang typescript --pattern $'export const MsgEnablePermissionlessMarketListingResponse = { encode(_: MsgEnablePermissionlessMarketListingResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { $$$ } }' indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/tx.ts # Extract the decode function for MsgEnablePermissionlessMarketListingResponse ast-grep --lang typescript --pattern $'export const MsgEnablePermissionlessMarketListingResponse = { decode(input: _m0.Reader | Uint8Array, length?: number): MsgEnablePermissionlessMarketListingResponse { $$$ } }' indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/tx.tsLength of output: 1145
protocol/app/msgs/internal_msgs_test.go (1)
104-107
: Ensure new message types are correctly tested.The addition of
/dydxprotocol.listing.MsgEnablePermissionlessMarketListing
and its response to the test suite appears correct. Please ensure comprehensive tests cover these new message types.protocol/app/msgs/internal_msgs.go (1)
145-148
: Correct integration of new message types for the listing module.The addition of
MsgEnablePermissionlessMarketListing
and its response type to the internal message samples is correctly implemented.indexer/packages/v4-protos/src/codegen/dydxprotocol/bundle.ts (1)
260-261
: Correct integration of new TypeScript exports for the listing module.The additions to the TypeScript exports for the listing module are correctly implemented. Ensure that these exports are used consistently across the application.
Also applies to: 270-270, 279-279, 289-289, 298-298, 305-305, 314-314, 331-331, 339-339, 341-343
protocol/app/testdata/default_genesis_state.json (1)
341-343
: The addition ofpermissionless_listing_enabled
under thelisting
module is correctly implemented and follows the JSON structure.Verification successful
The new field
permissionless_listing_enabled
is consistently integrated and set tofalse
in bothprotocol/scripts/genesis/sample_pregenesis.json
andprotocol/app/testdata/default_genesis_state.json
.
protocol/scripts/genesis/sample_pregenesis.json
protocol/app/testdata/default_genesis_state.json
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the integration of the new field with other modules. # Test: Search for references to `permissionless_listing_enabled` in other configuration files. rg --type json 'permissionless_listing_enabled'Length of output: 234
protocol/app/msgs/all_msgs.go (1)
199-202
: The addition of new message types for enabling permissionless market listing is correctly implemented and follows the Go syntax.Verification successful
The new message types
MsgEnablePermissionlessMarketListing
andMsgEnablePermissionlessMarketListingResponse
are well-integrated into the application, as evidenced by their presence in multiple relevant files, including type definitions, keeper implementations, and test files.
protocol/x/listing/keeper/msg_server_enable_pml_test.go
protocol/x/listing/types/tx.pb.go
protocol/x/listing/keeper/msg_server_enable_pml.go
protocol/app/msgs/internal_msgs_test.go
protocol/app/msgs/internal_msgs.go
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the integration of the new message types with other parts of the application. # Test: Search for references to the new message types in other Go files. rg --type go 'MsgEnablePermissionlessMarketListing'Length of output: 8571
indexer/services/comlink/public/api-documentation.md (10)
26-26
: Ensure the URL in the request matches the API specification.Verification successful
The URL in the request matches the API specification.
- The URL
/addresses/{address}
is correctly used in the Python code sample and matches the API specification.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the URL in the Python code sample for GetAddress matches the API specification. # Test: Search for the URL in the API specification. Expect: Exact match. rg --type md '/addresses/{address}'Length of output: 152
Script:
#!/bin/bash # Description: Verify the URL in the Python code sample for GetAddress matches the API specification. # Test: Search for the URL in the API specification. Expect: Exact match. rg --type md '/addresses/\{address\}'Length of output: 1119
38-38
: Ensure the URL in the request matches the API specification.Verification successful
The URL in the request matches the API specification.
- The URL
/addresses/{address}
is correctly used in the API documentation.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the URL in the JavaScript code sample for GetAddress matches the API specification. # Test: Search for the URL in the API specification. Expect: Exact match. rg --type md '/addresses/{address}'Length of output: 152
Script:
#!/bin/bash # Description: Verify the URL in the JavaScript code sample for GetAddress matches the API specification. # Test: Search for the URL in the API specification. Expect: Exact match. rg --type md '/addresses/\{address\}'Length of output: 1119
156-156
: Ensure the URL in the request matches the API specification for theGetSubaccount
endpoint.Verification successful
The URL in the request matches the API specification for the
GetSubaccount
endpoint.
indexer/services/comlink/public/api-documentation.md
: The URL/addresses/{address}/subaccountNumber/{subaccountNumber}
is correctly specified.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the URL in the Python code sample for GetSubaccount matches the API specification. # Test: Search for the URL in the API specification. Expect: Exact match. rg --type md '/addresses/{address}/subaccountNumber/{subaccountNumber}'Length of output: 224
Script:
#!/bin/bash # Description: Verify the URL in the Python code sample for GetSubaccount matches the API specification. # Test: Search for the URL in the API specification. Expect: Exact match. rg --type md '/addresses/\{address\}/subaccountNumber/\{subaccountNumber\}'Length of output: 461
416-416
: Ensure the URL in the request matches the API specification for theGetAssetPositions
endpoint.Verification successful
The URL
/assetPositions
used in the Python code sample matches the API specification as confirmed by the search results.
/assetPositions
is referenced in the API documentation.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the URL in the Python code sample for GetAssetPositions matches the API specification. # Test: Search for the URL in the API specification. Expect: Exact match. rg --type md '/assetPositions'Length of output: 675
282-282
: Ensure the URL in the request matches the API specification for theGetParentSubaccount
endpoint.Verification successful
The URL in the request matches the API specification for the
GetParentSubaccount
endpoint.
indexer/services/comlink/public/api-documentation.md
: The URL/addresses/{address}/parentSubaccountNumber/{parentSubaccountNumber}
is correctly specified in the documentation.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the URL in the Python code sample for GetParentSubaccount matches the API specification. # Test: Search for the URL in the API specification. Expect: Exact match. rg --type md '/addresses/{address}/parentSubaccountNumber/{parentSubaccountNumber}'Length of output: 248
Script:
#!/bin/bash # Description: Verify the URL in the Python code sample for GetParentSubaccount matches the API specification. # Test: Search for the URL in the API specification. Expect: Exact match. rg --type md '/addresses/\{address\}/parentSubaccountNumber/\{parentSubaccountNumber\}'Length of output: 509
168-168
: Ensure the URL in the request matches the API specification for theGetSubaccount
endpoint.Verification successful
The URL in the request matches the API specification for the
GetSubaccount
endpoint.
indexer/services/comlink/public/api-documentation.md
:
r = requests.get('/addresses/{address}/subaccountNumber/{subaccountNumber}', headers = headers)
fetch('/addresses/{address}/subaccountNumber/{subaccountNumber}',
GET /addresses/{address}/subaccountNumber/{subaccountNumber}
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the URL in the JavaScript code sample for GetSubaccount matches the API specification. # Test: Search for the URL in the API specification. Expect: Exact match. rg --type md '/addresses/{address}/subaccountNumber/{subaccountNumber}'Length of output: 224
Script:
#!/bin/bash # Description: Verify the URL in the JavaScript code sample for GetSubaccount matches the API specification. # Test: Search for the URL in the API specification. Expect: Exact match. rg --type md '/addresses/\{address\}/subaccountNumber/\{subaccountNumber\}'Length of output: 461
294-294
: Ensure the URL in the request matches the API specification for theGetParentSubaccount
endpoint.Verification successful
The URL in the request matches the API specification for the
GetParentSubaccount
endpoint.
indexer/services/comlink/public/api-documentation.md
: The URL/addresses/{address}/parentSubaccountNumber/{parentSubaccountNumber}
is correctly documented.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the URL in the JavaScript code sample for GetParentSubaccount matches the API specification. # Test: Search for the URL in the API specification. Expect: Exact match. rg --type md '/addresses/{address}/parentSubaccountNumber/{parentSubaccountNumber}'Length of output: 248
Script:
#!/bin/bash # Description: Verify the URL in the JavaScript code sample for GetParentSubaccount matches the API specification. # Test: Search for the URL in the API specification. Expect: Exact match. rg --type md '/addresses/\{address\}/parentSubaccountNumber/\{parentSubaccountNumber\}'Length of output: 509
198-198
: Ensure thesubaccountNumber
is correctly handled in the backend for theGET /addresses/{address}/subaccountNumber/{subaccountNumber}
endpoint.Also applies to: 218-218, 236-236, 245-245, 252-252
324-324
: Ensure thesubaccountNumber
is correctly handled in the backend for theGET /addresses/{address}/parentSubaccountNumber/{parentSubaccountNumber}
endpoint.Also applies to: 350-350, 368-368, 377-377, 384-384
69-69
: Ensure thesubaccountNumber
is correctly handled in the backend for theGET /addresses/{address}
endpoint.Also applies to: 89-89, 107-107, 116-116, 123-123
"listing": { | ||
"permissionless_listing_enabled": false | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tip
Codebase Verification
The field permissionless_listing_enabled
is defined in the protobuf file and the genesis state, but there are no references to it in governance-related code or any other mechanisms or modules within the codebase.
protocol/x/listing/types/genesis.pb.go
: Defines the field in the protobuf.protocol/testutil/constants/genesis.go
: Sets the field tofalse
.
This indicates that the field is not currently integrated with any governance mechanisms or other parts of the system.
Analysis chain
Addition of permissionless_listing_enabled
field looks good.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify integration of `permissionless_listing_enabled` with governance mechanisms.
# Test: Search for governance-related code that might interact with this new field.
rg --type go 'permissionless_listing_enabled' ./protocol
Length of output: 497
Script:
#!/bin/bash
# Description: Verify integration of `permissionless_listing_enabled` with governance mechanisms.
# Test: Search for governance-related code that might interact with this new field.
rg --type go 'permissionless_listing_enabled' ./protocol/x/gov
Length of output: 119
Script:
#!/bin/bash
# Description: Verify integration of `permissionless_listing_enabled` with governance mechanisms.
# Test: Search for governance-related code that might interact with this new field.
rg --type go 'permissionless_listing_enabled' ./protocol
Length of output: 497
Script:
#!/bin/bash
# Description: Verify integration of `permissionless_listing_enabled` with other mechanisms or modules.
# Test: Search the entire codebase for references to `permissionless_listing_enabled`.
rg --type go 'permissionless_listing_enabled'
Length of output: 480
func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implement the RegisterGRPCGatewayRoutes
method.
This method is currently empty. Would you like me to implement the gRPC Gateway routes for the listing module or should we open a GitHub issue to track this task?
"listing": { | ||
"permissionless_listing_enabled": false | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tip
Codebase Verification
The permissionless_listing_enabled
field is defined in the genesis.pb.go
file but is not actively used in any governance-related logic or conditional checks within the codebase.
protocol/x/listing/types/genesis.pb.go
: The field is defined but not utilized in any logic.
Analysis chain
The addition of permissionless_listing_enabled
is correctly implemented with a default value of false
.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify that the `permissionless_listing_enabled` field is utilized in governance logic.
# Test: Search for the usage of `permissionless_listing_enabled` in the governance logic.
rg --type json 'permissionless_listing_enabled' ./protocol
Length of output: 249
Script:
#!/bin/bash
# Description: Verify that the `permissionless_listing_enabled` field is utilized in governance logic.
# Test: Search for the usage of `permissionless_listing_enabled` in the codebase, focusing on governance-related files.
rg 'permissionless_listing_enabled' ./protocol
Length of output: 678
Script:
#!/bin/bash
# Description: Verify that the `permissionless_listing_enabled` field is utilized in governance logic.
# Test: Search for the usage of `permissionless_listing_enabled` in the codebase, focusing on its usage in governance-related logic.
rg 'permissionless_listing_enabled' ./protocol/x/listing
Length of output: 410
Script:
#!/bin/bash
# Description: Verify that the `permissionless_listing_enabled` field is utilized in governance logic.
# Test: Search for conditional logic or feature toggles that utilize the `permissionless_listing_enabled` field in the codebase.
rg 'permissionless_listing_enabled' ./protocol/x/listing --context 5
Length of output: 1215
Script:
#!/bin/bash
# Description: Verify that the `permissionless_listing_enabled` field is utilized in governance logic.
# Test: Search for conditional logic or feature toggles that utilize the `permissionless_listing_enabled` field in the codebase.
rg 'permissionless_listing_enabled' ./protocol/x/listing --context 5
Length of output: 1215
@@ -2,7 +2,9 @@ package types | |||
|
|||
// DefaultGenesis returns the default stats genesis state. | |||
func DefaultGenesis() *GenesisState { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Define or import GenesisState
.
The GenesisState
type is used but not defined or imported in this file. Ensure that GenesisState
is correctly defined or imported to avoid compilation errors.
Also applies to: 12-12, 5-5
Tools
golangci-lint
4-4: undefined: GenesisState (typecheck)
"github.com/dydxprotocol/v4-chain/protocol/x/listing/types" | ||
) | ||
|
||
func (k msgServer) EnablePermissionlessMarketListing( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Undefined msgServer
type.
Please define msgServer
or ensure it's imported correctly as it's currently undefined, which will cause a compilation error.
Tools
golangci-lint
12-12: undefined: msgServer (typecheck)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (2)
protocol/x/listing/types/query.pb.go
is excluded by!**/*.pb.go
protocol/x/listing/types/tx.pb.go
is excluded by!**/*.pb.go
Files selected for processing (6)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/query.rpc.Query.ts (1 hunks)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/tx.ts (1 hunks)
- proto/dydxprotocol/listing/genesis.proto (1 hunks)
- proto/dydxprotocol/listing/query.proto (1 hunks)
- proto/dydxprotocol/listing/tx.proto (1 hunks)
- protocol/x/listing/keeper/grpc_query_enabled_status_test.go (1 hunks)
Files skipped from review as they are similar to previous changes (6)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/query.rpc.Query.ts
- indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/tx.ts
- proto/dydxprotocol/listing/genesis.proto
- proto/dydxprotocol/listing/query.proto
- proto/dydxprotocol/listing/tx.proto
- protocol/x/listing/keeper/grpc_query_enabled_status_test.go
Signed-off-by: Shrenuj Bansal <[email protected]>
Signed-off-by: Shrenuj Bansal <[email protected]>
Signed-off-by: Shrenuj Bansal <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (10)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/genesis.ts (3 hunks)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/query.ts (1 hunks)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/tx.rpc.msg.ts (1 hunks)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/tx.ts (1 hunks)
- proto/dydxprotocol/listing/genesis.proto (1 hunks)
- proto/dydxprotocol/listing/query.proto (1 hunks)
- proto/dydxprotocol/listing/tx.proto (1 hunks)
- protocol/lib/ante/internal_msg.go (2 hunks)
- protocol/x/listing/keeper/grpc_query_pml_enabled_status.go (1 hunks)
- protocol/x/listing/keeper/msg_server_enable_pml_test.go (1 hunks)
Files skipped from review due to trivial changes (1)
- protocol/lib/ante/internal_msg.go
Files skipped from review as they are similar to previous changes (8)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/genesis.ts
- indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/query.ts
- indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/tx.ts
- proto/dydxprotocol/listing/genesis.proto
- proto/dydxprotocol/listing/query.proto
- proto/dydxprotocol/listing/tx.proto
- protocol/x/listing/keeper/grpc_query_pml_enabled_status.go
- protocol/x/listing/keeper/msg_server_enable_pml_test.go
Additional comments not posted (2)
indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/tx.rpc.msg.ts (2)
6-11
: Well-documented interface for enabling/disabling permissionless market listings.
16-18
: Good use of binding to ensure the correct context forenablePermissionlessMarketListing
method.
enablePermissionlessMarketListing(request: MsgEnablePermissionlessMarketListing): Promise<MsgEnablePermissionlessMarketListingResponse> { | ||
const data = MsgEnablePermissionlessMarketListing.encode(request).finish(); | ||
const promise = this.rpc.request("dydxprotocol.listing.Msg", "EnablePermissionlessMarketListing", data); | ||
return promise.then(data => MsgEnablePermissionlessMarketListingResponse.decode(new _m0.Reader(data))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding error handling for the RPC request to manage potential failures gracefully.
enablePermissionlessMarketListing(request: MsgEnablePermissionlessMarketListing): Promise<MsgEnablePermissionlessMarketListingResponse> {
const data = MsgEnablePermissionlessMarketListing.encode(request).finish();
const promise = this.rpc.request("dydxprotocol.listing.Msg", "EnablePermissionlessMarketListing", data);
return promise.then(data => MsgEnablePermissionless
MarketListingResponse.decode(new _m0.Reader(data)))
.catch(error => {
// Handle error appropriately
console.error("RPC request failed", error);
throw error;
});
}
Signed-off-by: Shrenuj Bansal <[email protected]>
Signed-off-by: Shrenuj Bansal <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (2)
protocol/x/listing/types/genesis.pb.go
is excluded by!**/*.pb.go
protocol/x/listing/types/tx.pb.go
is excluded by!**/*.pb.go
Files selected for processing (2)
- protocol/go.mod (1 hunks)
- protocol/x/listing/keeper/grpc_query_enabled_status_test.go (1 hunks)
Files skipped from review due to trivial changes (1)
- protocol/go.mod
Files skipped from review as they are similar to previous changes (1)
- protocol/x/listing/keeper/grpc_query_enabled_status_test.go
Signed-off-by: Shrenuj Bansal <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
Outside diff range and nitpick comments (3)
protocol/x/listing/keeper/listing.go (1)
12-21
: Review the choice of JSON for data serialization.Consider the implications of using JSON for marshaling simple data types like integers. Protobuf or binary encoding might offer better performance and consistency in a blockchain context.
protocol/testutil/constants/genesis.go (1)
Line range hint
342-342
: Detected a potential exposure of a Generic API Key. It's crucial to ensure that sensitive keys are not hard-coded in source files.- "eth_address": "0xEf01c3A30eB57c91c40C52E996d29c202ae72193" + "eth_address": "<REDACTED>"Please replace the hardcoded key with an environment variable or a secure key management system.
protocol/scripts/genesis/sample_pregenesis.json (1)
Line range hint
538-538
: Potential security risk: Detected a Generic API Key. This might expose sensitive operations to unauthorized access.- "exchange_config_json": "{\"exchanges\":[{\"exchangeName\":\"Binance\",\"ticker\":\"BTCUSDT\",\"adjustByMarket\":\"USDT-USD\"},{\"exchangeName\":\"Bybit\",\"ticker\":\"BTCUSDT\",\"adjustByMarket\":\"USDT-USD\"},{\"exchangeName\":\"CoinbasePro\",\"ticker\":\"BTC-USD\"},{\"exchangeName\":\"Huobi\",\"ticker\":\"btcusdt\",\"adjustByMarket\":\"USDT-USD\"},{\"exchangeName\":\"Kraken\",\"ticker\":\"XXBTZUSD\"},{\"exchangeName\":\"Kucoin\",\"ticker\":\"BTC-USDT\",\"adjustByMarket\":\"USDT-USD\"},{\"exchangeName\":\"Okx\",\"ticker\":\"BTC-USDT\",\"adjustByMarket\":\"USDT-USD\"}]}", + "exchange_config_json": "{\"exchanges\":[{\"exchangeName\":\"Binance\",\"ticker\":\"BTCUSDT\",\"adjustByMarket\":\"USDT-USD\"},{\"exchangeName\":\"Bybit\",\"ticker\":\"BTCUSDT\",\"adjustByMarket\":\"USDT-USD\"},{\"exchangeName\":\"CoinbasePro\",\"ticker\":\"BTC-USD\"},{\"exchangeName\":\"Huobi\",\"ticker\":\"btcusdt\",\"adjustByMarket\":\"USDT-USD\"},{\"exchangeName\":\"Kraken\",\"ticker\":\"XXBTZUSD\"},{\"exchangeName\":\"Kucoin\",\"ticker\":\"BTC-USDT\",\"adjustByMarket\":\"USDT-USD\"},{\"exchangeName\":\"Okx\",\"ticker\":\"BTC-USDT\",\"adjustByMarket\":\"USDT-USD\"}], \"apiKey\": \"<REDACTED>\"}",Please ensure that any sensitive keys are removed from the codebase or stored securely using environment variables or configuration management tools.
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (3)
protocol/x/listing/types/genesis.pb.go
is excluded by!**/*.pb.go
protocol/x/listing/types/query.pb.go
is excluded by!**/*.pb.go
protocol/x/listing/types/tx.pb.go
is excluded by!**/*.pb.go
Files selected for processing (24)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/genesis.ts (3 hunks)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/query.rpc.Query.ts (1 hunks)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/query.ts (1 hunks)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/tx.rpc.msg.ts (1 hunks)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/tx.ts (1 hunks)
- indexer/services/comlink/public/api-documentation.md (121 hunks)
- proto/dydxprotocol/listing/genesis.proto (1 hunks)
- proto/dydxprotocol/listing/query.proto (1 hunks)
- proto/dydxprotocol/listing/tx.proto (1 hunks)
- protocol/app/msgs/all_msgs.go (1 hunks)
- protocol/app/msgs/internal_msgs.go (2 hunks)
- protocol/app/msgs/internal_msgs_test.go (1 hunks)
- protocol/app/testdata/default_genesis_state.json (1 hunks)
- protocol/lib/ante/internal_msg.go (2 hunks)
- protocol/scripts/genesis/sample_pregenesis.json (1 hunks)
- protocol/testutil/constants/genesis.go (1 hunks)
- protocol/x/listing/genesis.go (1 hunks)
- protocol/x/listing/keeper/grpc_query_markets_hard_cap.go (1 hunks)
- protocol/x/listing/keeper/grpc_query_markets_hard_cap_test.go (1 hunks)
- protocol/x/listing/keeper/listing.go (1 hunks)
- protocol/x/listing/keeper/msg_server_set_hard_cap.go (1 hunks)
- protocol/x/listing/keeper/msg_server_set_hard_cap_test.go (1 hunks)
- protocol/x/listing/types/genesis.go (1 hunks)
- protocol/x/listing/types/keys.go (1 hunks)
Files not summarized due to errors (1)
- indexer/services/comlink/public/api-documentation.md: Error: Message exceeds token limit
Files skipped from review due to trivial changes (1)
- protocol/x/listing/types/genesis.go
Additional context used
Biome
indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/query.ts
[error] 5-5: An empty interface is equivalent to {}. (lint/suspicious/noEmptyInterface)
Safe fix: Use a type alias instead.
[error] 8-8: An empty interface is equivalent to {}. (lint/suspicious/noEmptyInterface)
Safe fix: Use a type alias instead.
indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/tx.ts
[error] 27-27: An empty interface is equivalent to {}. (lint/suspicious/noEmptyInterface)
Safe fix: Use a type alias instead.
[error] 30-30: An empty interface is equivalent to {}. (lint/suspicious/noEmptyInterface)
Safe fix: Use a type alias instead.
Gitleaks
protocol/testutil/constants/genesis.go
342-342: Detected a Generic API Key, potentially exposing access to various services and sensitive operations. (generic-api-key)
protocol/scripts/genesis/sample_pregenesis.json
538-538: Detected a Generic API Key, potentially exposing access to various services and sensitive operations. (generic-api-key)
LanguageTool
indexer/services/comlink/public/api-documentation.md
[misspelling] ~2679-~2679: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...id="schemaperpetualpositionstatus"> </a...
[misspelling] ~2680-~2680: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...d="schema_PerpetualPositionStatus"> <...
[misspelling] ~2705-~2705: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...onSide <a id="to...
[misspelling] ~2706-~2706: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ..."> <a id="tocsp...
[misspelling] ~2730-~2730: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...IsoString <a id="tocSi...
[misspelling] ~2731-~2731: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...ing"> <a id="tocsisos...
[misspelling] ~2748-~2748: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...maperpetualpositionresponseobject"> <a id="schema_PerpetualPositionResponseObj...
[misspelling] ~2749-~2749: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...a_PerpetualPositionResponseObject"> <a id="tocSperpetualpositionresponseobject...
[misspelling] ~2798-~2798: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...a id="schemaperpetualpositionsmap"> ...
[misspelling] ~2799-~2799: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... id="schema_PerpetualPositionsMap"> <a ...
[misspelling] ~2853-~2853: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...schemaassetpositionresponseobject"> <a id="schema_AssetPositionResponseObject"...
[misspelling] ~2854-~2854: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...chema_AssetPositionResponseObject"> </...
[misspelling] ~2881-~2881: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...p <a i...
[misspelling] ~2882-~2882: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...> <a id="...
[misspelling] ~2914-~2914: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...d="schemasubaccountresponseobject"> </...
[misspelling] ~2915-~2915: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...="schema_SubaccountResponseObject"> ...
[misspelling] ~3002-~3002: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...nse <a id=...
[misspelling] ~3003-~3003: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: .../a> <a id="to...
[misspelling] ~3088-~3088: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...d="schemaparentsubaccountresponse"> </...
[misspelling] ~3089-~3089: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...="schema_ParentSubaccountResponse"> ...
[misspelling] ~3180-~3180: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...a id="schemaassetpositionresponse"> ...
[misspelling] ~3181-~3181: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... id="schema_AssetPositionResponse"> <a ...
[misspelling] ~3208-~3208: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...on <a id...
[misspelling] ~3209-~3209: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...a> <a id="t...
[misspelling] ~3238-~3238: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... <...
[misspelling] ~3239-~3239: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...a id="schema_CandleResponseObject"> <a i...
[misspelling] ~3280-~3280: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...onse <a id="...
[misspelling] ~3281-~3281: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... <a id="toc...
[misspelling] ~3315-~3315: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... <a ...
[misspelling] ~3316-~3316: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... <a id=...
[misspelling] ~3337-~3337: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...us <a id...
[misspelling] ~3338-~3338: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...a> <a id="t...
[misspelling] ~3365-~3365: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...on <a id...
[misspelling] ~3366-~3366: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...a> <a id="t...
[misspelling] ~3394-~3394: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... <...
[misspelling] ~3395-~3395: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...a id="schema_ComplianceV2Response"> <a i...
[misspelling] ~3418-~3418: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...OrderSide <a id="tocSo...
[misspelling] ~3419-~3419: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...ide"> <a id="tocsorde...
[misspelling] ~3443-~3443: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...Liquidity <a id="tocSl...
[misspelling] ~3444-~3444: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...ity"> <a id="tocsliqu...
[misspelling] ~3468-~3468: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...# FillType <a id="tocSfi...
[misspelling] ~3469-~3469: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...type"> <a id="tocsfillt...
[misspelling] ~3496-~3496: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...rketType <a id="tocS...
[misspelling] ~3497-~3497: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...pe"> <a id="tocsmar...
[misspelling] ~3521-~3521: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... <a ...
[misspelling] ~3522-~3522: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... <a id=...
[misspelling] ~3567-~3567: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...sponse <a id="to...
[misspelling] ~3568-~3568: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ..."> <a id="tocsf...
[misspelling] ~3610-~3610: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...onse <a id="...
[misspelling] ~3611-~3611: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... <a id="toc...
[misspelling] ~3632-~3632: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...chemahistoricalblocktradingreward"> <a id="schema_HistoricalBlockTradingReward...
[misspelling] ~3633-~3633: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...hema_HistoricalBlockTradingReward"> <...
[misspelling] ~3656-~3656: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...oricalblocktradingrewardsresponse"> <a id="schema_HistoricalBlockTradingReward...
[misspelling] ~3657-~3657: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...oricalBlockTradingRewardsResponse"> <a id="tocShistoricalblocktradingrewardsre...
[misspelling] ~3682-~3682: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...mahistoricalfundingresponseobject"> <a id="schema_HistoricalFundingResponseObj...
[misspelling] ~3683-~3683: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...a_HistoricalFundingResponseObject"> <a id="tocShistoricalfundingresponseobject...
[misspelling] ~3710-~3710: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...="schemahistoricalfundingresponse"> <...
[misspelling] ~3711-~3711: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ..."schema_HistoricalFundingResponse"> ...
[misspelling] ~3738-~3738: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... id="schemapnlticksresponseobject"> ...
[misspelling] ~3739-~3739: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...id="schema_PnlTicksResponseObject"> <a...
[misspelling] ~3772-~3772: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...a id="schemahistoricalpnlresponse"> ...
[misspelling] ~3773-~3773: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... id="schema_HistoricalPnlResponse"> <a ...
[misspelling] ~3809-~3809: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...ematradingrewardaggregationperiod"> <a id="schema_TradingRewardAggregationPeri...
[misspelling] ~3810-~3810: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...ma_TradingRewardAggregationPeriod"> <a id="tocStradingrewardaggregationperiod"...
[misspelling] ~3835-~3835: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...istoricaltradingrewardaggregation"> <a id="schema_HistoricalTradingRewardAggre...
[misspelling] ~3836-~3836: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...istoricalTradingRewardAggregation"> <a id="tocShistoricaltradingrewardaggregat...
[misspelling] ~3865-~3865: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...tradingrewardaggregationsresponse"> <a id="schema_HistoricalTradingRewardAggre...
[misspelling] ~3866-~3866: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...TradingRewardAggregationsResponse"> <a id="tocShistoricaltradingrewardaggregat...
[misspelling] ~3894-~3894: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...schemaorderbookresponsepricelevel"> <a id="schema_OrderbookResponsePriceLevel"...
[misspelling] ~3895-~3895: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...chema_OrderbookResponsePriceLevel"> </...
[misspelling] ~3916-~3916: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...id="schemaorderbookresponseobject"> </a...
[misspelling] ~3917-~3917: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...d="schema_OrderbookResponseObject"> <...
[misspelling] ~3948-~3948: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...orce <a id="...
[misspelling] ~3949-~3949: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... <a id="toc...
[misspelling] ~3974-~3974: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...rStatus <a id="toc...
[misspelling] ~3975-~3975: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...s"> <a id="tocsor...
[misspelling] ~4002-~4002: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... id="schemabesteffortopenedstatus"> ...
[misspelling] ~4003-~4003: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...id="schema_BestEffortOpenedStatus"> <a...
[misspelling] ~4026-~4026: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...atus <a id="...
[misspelling] ~4027-~4027: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... <a id="toc...
[misspelling] ~4052-~4052: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...OrderType <a id="tocSo...
[misspelling] ~4053-~4053: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...ype"> <a id="tocsorde...
[misspelling] ~4082-~4082: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... <a...
[misspelling] ~4083-~4083: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... <a id...
[misspelling] ~4146-~4146: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...a id="schemaperpetualmarketstatus"> ...
[misspelling] ~4147-~4147: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... id="schema_PerpetualMarketStatus"> <a ...
[misspelling] ~4175-~4175: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... <a...
[misspelling] ~4176-~4176: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... <a id...
[misspelling] ~4200-~4200: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...hemaperpetualmarketresponseobject"> <a id="schema_PerpetualMarketResponseObjec...
[misspelling] ~4201-~4201: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...ema_PerpetualMarketResponseObject"> ...
[misspelling] ~4260-~4260: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...id="schemaperpetualmarketresponse"> </a...
[misspelling] ~4261-~4261: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...d="schema_PerpetualMarketResponse"> <...
[misspelling] ~4328-~4328: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...="schemaperpetualpositionresponse"> <...
[misspelling] ~4329-~4329: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ..."schema_PerpetualPositionResponse"> ...
[misspelling] ~4367-~4367: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...id="schemasparklineresponseobject"> </a...
[misspelling] ~4368-~4368: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...d="schema_SparklineResponseObject"> <...
[misspelling] ~4392-~4392: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... <a...
[misspelling] ~4393-~4393: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... <a id...
[misspelling] ~4417-~4417: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...sponse <a id="to...
[misspelling] ~4418-~4418: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ..."> <a id="tocst...
[misspelling] ~4439-~4439: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...TradeType <a id="tocSt...
[misspelling] ~4440-~4440: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...ype"> <a id="tocstrad...
[misspelling] ~4465-~4465: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... <a...
[misspelling] ~4466-~4466: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... <a id...
[misspelling] ~4497-~4497: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...ponse <a id="t...
[misspelling] ~4498-~4498: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...> <a id="tocs...
[misspelling] ~4533-~4533: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...erType <a id="to...
[misspelling] ~4534-~4534: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ..."> <a id="tocst...
[misspelling] ~4560-~4560: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... id="schematransferresponseobject"> ...
[misspelling] ~4561-~4561: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...id="schema_TransferResponseObject"> <a...
[misspelling] ~4606-~4606: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...se <a id...
[misspelling] ~4607-~4607: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...a> <a id="t...
[misspelling] ~4650-~4650: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...aparentsubaccounttransferresponse"> <a id="schema_ParentSubaccountTransferResp...
[misspelling] ~4651-~4651: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ..._ParentSubaccountTransferResponse"> <a id="tocSparentsubaccounttransferrespons...
Markdownlint
indexer/services/comlink/public/api-documentation.md
4692-4692: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines
61-61: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
193-193: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
320-320: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
457-457: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
534-534: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
626-626: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
707-707: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
791-791: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
893-893: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
973-973: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
1043-1043: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
1118-1118: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
1201-1201: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
1290-1290: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
1384-1384: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
1459-1459: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
1561-1561: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
1747-1747: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
1908-1908: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
1997-1997: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
2125-2125: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
2225-2225: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
2319-2319: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
2384-2384: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
2455-2455: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
2541-2541: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
2635-2635: null (MD028, no-blanks-blockquote)
Blank line inside blockquote
1626-1626: null (MD036, no-emphasis-as-heading)
Emphasis used instead of a heading
1632-1632: null (MD036, no-emphasis-as-heading)
Emphasis used instead of a heading
1638-1638: null (MD036, no-emphasis-as-heading)
Emphasis used instead of a heading
1812-1812: null (MD036, no-emphasis-as-heading)
Emphasis used instead of a heading
1818-1818: null (MD036, no-emphasis-as-heading)
Emphasis used instead of a heading
1824-1824: null (MD036, no-emphasis-as-heading)
Emphasis used instead of a heading
Additional comments not posted (27)
proto/dydxprotocol/listing/genesis.proto (1)
7-9
: The addition ofhard_cap_for_markets
to theGenesisState
is consistent with the PR's objectives and correctly follows the protobuf syntax.protocol/x/listing/types/keys.go (1)
14-15
: The addition ofHardCapForMarketsKey
is necessary for supporting the new functionality related to market hard caps and is correctly defined.protocol/x/listing/keeper/grpc_query_markets_hard_cap.go (1)
10-17
: The implementation of theMarketsHardCap
query function is correct and aligns with best practices for gRPC services in the Cosmos SDK.proto/dydxprotocol/listing/query.proto (1)
7-17
: TheQuery
service and associated messages for querying the markets hard cap are correctly defined and follow protobuf standards.protocol/x/listing/genesis.go (2)
11-15
: Ensure proper error handling during genesis initialization.Although using
panic
is standard practice in genesis functions to halt chain initialization on critical errors, ensure this aligns with your overall error handling strategy.
20-21
: Export function correctly utilizes theDefaultGenesis
method.This ensures that the genesis state can be exported without modifications, maintaining consistency across chain restarts.
indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/tx.rpc.msg.ts (1)
18-22
: Improve RPC error handling.As previously suggested, adding error handling for the RPC request will manage potential failures more gracefully. This is crucial for maintaining robust communication with the server.
.catch(error => { console.error("RPC request failed", error); throw error; });protocol/x/listing/keeper/listing.go (1)
23-35
: Ensure robust handling when the hard cap is not found.Good use of custom errors to handle cases where the hard cap is not set. This maintains clarity and helps in debugging.
proto/dydxprotocol/listing/tx.proto (3)
10-14
: The service definition and RPC method are clearly defined and well-documented.
16-27
: The message structure forMsgSetMarketsHardCap
is well-defined, with clear documentation and appropriate use of custom options for enhanced clarity and security.
29-30
: The response message is appropriately defined as empty, which is suitable for simple acknowledgment purposes.protocol/x/listing/keeper/grpc_query_markets_hard_cap_test.go (1)
12-42
: The table-driven test structure is well-implemented, enhancing both readability and maintainability. The assertions are appropriate for the functionality being tested.indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/query.rpc.Query.ts (1)
7-34
: TheQueryClientImpl
class is well-structured, with methods correctly bound to ensure the properthis
context. The use of promises for handling asynchronous operations is appropriate.indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/genesis.ts (1)
Line range hint
5-55
: TheGenesisState
interface and its associated methods are correctly implemented with clear documentation. The conditional encoding of thehardCapForMarkets
field is an efficient design choice.protocol/x/listing/keeper/msg_server_set_hard_cap_test.go (2)
14-65
: The test structure using a table-driven approach is well-implemented and improves maintainability.
14-65
: The logic within the test cases is comprehensive, covering both success and error scenarios effectively.indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/query.ts (1)
22-98
: The functions for creating base objects and handling encoding/decoding are correctly implemented, ensuring proper serialization and deserialization of query objects.indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/tx.ts (1)
32-119
: The functions for creating base message objects and handling encoding/decoding are implemented correctly, ensuring efficient serialization and deserialization.protocol/lib/ante/internal_msg.go (1)
97-99
: The addition ofMsgSetMarketsHardCap
to the internal message checker is appropriate and aligns with the system's requirements for recognizing internal messages.protocol/app/msgs/internal_msgs_test.go (1)
104-107
: The tests correctly include the new messages for setting markets hard cap. Ensure these message types are consistently used across other tests and components.protocol/app/msgs/internal_msgs.go (2)
25-25
: Import forlisting
types is correctly added to support new message types.
145-148
: Addition ofMsgSetMarketsHardCap
and its response to the internal message samples is consistent with the PR's objective to manage market caps via governance.protocol/app/testdata/default_genesis_state.json (1)
341-343
: The addition ofhard_cap_for_markets
with a default value of 0 in the genesis state is correct and aligns with the PR's functionality to manage market caps via governance.protocol/app/msgs/all_msgs.go (1)
199-201
: Added new message types for setting and responding to market hard caps.These additions align with the PR's objective to manage permissionless market listings through governance controls. Make sure these types are integrated correctly in the rest of the system and covered by unit tests.
protocol/testutil/constants/genesis.go (1)
875-876
: LGTM! The addition ofhard_cap_for_markets
to thelisting
object in the genesis state is consistent with the PR's objective to manage market listings via governance.protocol/scripts/genesis/sample_pregenesis.json (1)
858-860
: The addition of thehard_cap_for_markets
parameter aligns with the PR's objective to manage market listings through governance.indexer/services/comlink/public/api-documentation.md (1)
26-26
: Ensure the base URL is correctly specified in API endpoints.Also applies to: 38-38, 157-157, 169-169, 284-284, 296-296, 419-420, 433-433, 496-497, 510-510, 573-573, 587-587, 672-672, 684-684, 740-741, 754-754, 842-843, 856-856, 944-944, 956-956, 1005-1005, 1017-1017, 1080-1080, 1092-1092, 1157-1158, 1171-1171, 1246-1247, 1260-1260, 1335-1335, 1349-1349, 1424-1424, 1436-1436, 1501-1502, 1515-1515, 1687-1688, 1701-1701, 1873-1873, 1885-1885, 1961-1961, 1973-1973, 2075-2076, 2089-2089, 2175-2176, 2189-2189, 2275-2275, 2289-2289, 2355-2355, 2367-2367, 2416-2416, 2428-2428, 2499-2500, 2513-2513, 2593-2594, 2607-2607
* For **Testnet**, use <a href="https://dydx-testnet.imperator.co/v4">https://dydx-testnet.imperator.co/v4</a> | ||
|
||
Note: Messages on Indexer WebSocket feeds are typically more recent than data fetched via Indexer's REST API, because the latter is backed by read replicas of the databases that feed the former. Ordinarily this difference is minimal (less than a second), but it might become prolonged under load. Please see [Indexer Architecture](https://dydx.exchange/blog/v4-deep-dive-indexer) for more information. | ||
* <a href=""></a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The anchor tag's href attribute is empty which may lead to broken links.
- <a href=""></a>
+ <a href="https://api.example.com">API Base URL</a>
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
* <a href=""></a> | |
* <a href="https://api.example.com">API Base URL</a> |
func (k msgServer) SetMarketsHardCap( | ||
goCtx context.Context, | ||
msg *types.MsgSetMarketsHardCap, | ||
) (*types.MsgSetMarketsHardCapResponse, error) { | ||
ctx := lib.UnwrapSDKContext(goCtx, types.ModuleName) | ||
|
||
// Check if the sender has the authority to set the hard cap | ||
if !k.HasAuthority(msg.Authority) { | ||
return nil, errorsmod.Wrapf( | ||
govtypes.ErrInvalidSigner, | ||
"invalid authority %s", | ||
msg.Authority, | ||
) | ||
} | ||
|
||
// Set the hard cap for listed markets | ||
err := k.Keeper.SetMarketsHardCap(ctx, msg.HardCapForMarkets) | ||
if err != nil { | ||
return nil, err | ||
} | ||
|
||
return &types.MsgSetMarketsHardCapResponse{}, nil | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refactor to improve error handling and authority verification.
Consider enhancing the authority check to provide more detailed error messages or additional logging for audit purposes. This could help in debugging and operational monitoring.
/** Queries for the hard cap on listed markets */ | ||
|
||
export interface QueryMarketsHardCap {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace empty interfaces with type aliases to avoid unnecessary complexity.
- export interface QueryMarketsHardCap {}
+ export type QueryMarketsHardCap = {};
- export interface QueryMarketsHardCapSDKType {}
+ export type QueryMarketsHardCapSDKType = {};
Also applies to: 8-8
Tools
Biome
[error] 5-5: An empty interface is equivalent to {}. (lint/suspicious/noEmptyInterface)
Safe fix: Use a type alias instead.
/** MsgSetMarketsHardCapResponse defines the MsgSetMarketsHardCap response */ | ||
|
||
export interface MsgSetMarketsHardCapResponse {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace empty interfaces with type aliases to simplify the code.
- export interface MsgSetMarketsHardCapResponse {}
+ export type MsgSetMarketsHardCapResponse = {};
- export interface MsgSetMarketsHardCapResponseSDKType {}
+ export type MsgSetMarketsHardCapResponseSDKType = {};
Also applies to: 30-30
Tools
Biome
[error] 27-27: An empty interface is equivalent to {}. (lint/suspicious/noEmptyInterface)
Safe fix: Use a type alias instead.
Signed-off-by: Shrenuj Bansal <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
protocol/x/listing/types/genesis.pb.go
is excluded by!**/*.pb.go
Files selected for processing (4)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/genesis.ts (3 hunks)
- proto/dydxprotocol/listing/genesis.proto (1 hunks)
- proto/dydxprotocol/listing/query.proto (1 hunks)
- proto/dydxprotocol/listing/tx.proto (1 hunks)
Files skipped from review as they are similar to previous changes (4)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/genesis.ts
- proto/dydxprotocol/listing/genesis.proto
- proto/dydxprotocol/listing/query.proto
- proto/dydxprotocol/listing/tx.proto
Signed-off-by: Shrenuj Bansal <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (4)
- protocol/x/listing/genesis.go (1 hunks)
- protocol/x/listing/keeper/grpc_query_markets_hard_cap_test.go (1 hunks)
- protocol/x/listing/keeper/listing.go (1 hunks)
- protocol/x/listing/keeper/msg_server_set_hard_cap_test.go (1 hunks)
Files skipped from review as they are similar to previous changes (4)
- protocol/x/listing/genesis.go
- protocol/x/listing/keeper/grpc_query_markets_hard_cap_test.go
- protocol/x/listing/keeper/listing.go
- protocol/x/listing/keeper/msg_server_set_hard_cap_test.go
Signed-off-by: Shrenuj Bansal <[email protected]>
Signed-off-by: Shrenuj Bansal <[email protected]>
Changelist
Add a governance controlled msg to set a hard cap on the number of markets listed to gate PML
Test Plan
Added tests
Author/Reviewer Checklist
state-breaking
label.indexer-postgres-breaking
label.PrepareProposal
orProcessProposal
, manually add the labelproposal-breaking
.feature:[feature-name]
.backport/[branch-name]
.refactor
,chore
,bug
.Summary by CodeRabbit
New Features
Bug Fixes
Tests