Skip to content
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

Feat: update naming convention from lcd to rest #1251

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

Poafs1
Copy link
Collaborator

@Poafs1 Poafs1 commented Feb 26, 2025

Summary by CodeRabbit

  • Refactor
    • Transitioned from legacy LCD endpoints to a RESTful API approach across the platform, standardizing network data retrieval for blockchain, transactions, proposals, accounts, validators, and NFTs.
    • Updated user-facing notifications and configuration details to reflect the new REST terminology for enhanced clarity and consistency.

Copy link

vercel bot commented Feb 26, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
celatone-frontend-staging ❌ Failed (Inspect) Feb 26, 2025 10:33am
initia-celatone-rehearsal ❌ Failed (Inspect) Feb 26, 2025 10:33am
6 Skipped Deployments
Name Status Preview Comments Updated (UTC)
celatone-frontend-main ⬜️ Ignored (Inspect) Visit Preview Feb 26, 2025 10:33am
initia-celatone-frontend ⬜️ Ignored (Inspect) Visit Preview Feb 26, 2025 10:33am
neutron-celatone-frontend ⬜️ Ignored (Inspect) Visit Preview Feb 26, 2025 10:33am
osmosis-celatone-frontend ⬜️ Ignored (Inspect) Visit Preview Feb 26, 2025 10:33am
sei-celatone-frontend ⬜️ Ignored (Inspect) Visit Preview Feb 26, 2025 10:33am
terra-celatone-frontend ⬜️ Ignored (Inspect) Visit Preview Feb 26, 2025 10:33am

Copy link

coderabbitai bot commented Feb 26, 2025

Warning

Rate limit exceeded

@Poafs1 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 13 minutes and 43 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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.

📥 Commits

Reviewing files that changed from the base of the PR and between efe5d49 and eecaf84.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (46)
  • CHANGELOG.md (1 hunks)
  • README.md (1 hunks)
  • package.json (1 hunks)
  • src/config/chain/devChainConfigs.ts (1 hunks)
  • src/lib/app-provider/contexts/default.ts (1 hunks)
  • src/lib/app-provider/env.ts (6 hunks)
  • src/lib/components/AlertPaginationRest.tsx (1 hunks)
  • src/lib/components/modal/MoveCodeSnippet.tsx (4 hunks)
  • src/lib/components/modal/WasmCodeSnippet.tsx (3 hunks)
  • src/lib/components/modal/code/SaveNewCode.tsx (2 hunks)
  • src/lib/components/select-code/CodeSelect.tsx (2 hunks)
  • src/lib/components/wallet-section/index.tsx (2 hunks)
  • src/lib/hooks/useOpenTab.ts (2 hunks)
  • src/lib/layout/InformationFooter.tsx (2 hunks)
  • src/lib/model/account/index.ts (1 hunks)
  • src/lib/model/account/rest.ts (3 hunks)
  • src/lib/model/contract.ts (2 hunks)
  • src/lib/pages/account-details/components/tables/instantiated-contracts/Lite.tsx (2 hunks)
  • src/lib/pages/account-details/components/tables/txs/lite.tsx (4 hunks)
  • src/lib/pages/account-details/components/tables/txs/sequencer.tsx (1 hunks)
  • src/lib/pages/account-details/data.ts (2 hunks)
  • src/lib/pages/account-details/index.tsx (2 hunks)
  • src/lib/pages/block-details/components/BlockDetailsTop.tsx (2 hunks)
  • src/lib/pages/block-details/components/BlockTxsTableLite.tsx (1 hunks)
  • src/lib/pages/block-details/data.ts (1 hunks)
  • src/lib/pages/block-details/lite.tsx (1 hunks)
  • src/lib/pages/code-details/components/code-info/table/CodeContractsTableLite.tsx (3 hunks)
  • src/lib/pages/code-details/data.ts (2 hunks)
  • src/lib/pages/code-details/index.tsx (2 hunks)
  • src/lib/pages/codes/components/RecentCodesTableLite.tsx (3 hunks)
  • src/lib/pages/codes/data.ts (2 hunks)
  • src/lib/pages/contract-details/components/InstantiateInfo.tsx (2 hunks)
  • src/lib/pages/contract-details/components/command-section/index.tsx (2 hunks)
  • src/lib/pages/contract-details/components/contract-states/index.tsx (3 hunks)
  • src/lib/pages/contract-details/components/tables/TxsTable.tsx (3 hunks)
  • src/lib/pages/contract-details/components/tables/migration/MigrationTableLite.tsx (2 hunks)
  • src/lib/pages/contract-details/data.ts (3 hunks)
  • src/lib/pages/custom-network/edit/index.tsx (1 hunks)
  • src/lib/pages/custom-network/manual/components/NetworkDetails.tsx (1 hunks)
  • src/lib/pages/custom-network/manual/components/WalletRegistry.tsx (3 hunks)
  • src/lib/pages/custom-network/manual/index.tsx (3 hunks)
  • src/lib/pages/custom-network/types.ts (8 hunks)
  • src/lib/pages/deploy/index.tsx (2 hunks)
  • src/lib/pages/home/lite.tsx (2 hunks)
  • src/lib/pages/home/sequencer.tsx (2 hunks)
  • src/lib/pages/instantiate/InstantiateFormPage.tsx (2 hunks)

Walkthrough

This pull request refactors the codebase by replacing references to “lcd” with “rest” across configuration files, components, hooks, services, and types. The changes involve renaming variables, function names, query keys, and error messages to align with a new REST API approach. In addition, a dependency in package.json was updated to reference a local file instead of a versioned remote package. The overall functionality remains unchanged, while the conventions and naming now reflect the REST endpoint as the preferred method.

Changes

Files Change Summary
README.md, devChainConfigs.ts, src/lib/app-provider/contexts/default.ts, src/lib/pages/custom-network/edit/index.ts, src/lib/pages/custom-network/manual/components/NetworkDetails.tsx, src/lib/pages/custom-network/manual/index.ts, src/lib/pages/custom-network/types.ts Renamed the property lcd to rest in configuration objects and JSON structures to update the API endpoint terminology.
package.json Updated @alleslabs/shared dependency from "1.0.0-dev6" to "file:../celatone-core/shared", changing its resolution from a version string to a local file reference.
src/lib/app-provider/env.ts, src/lib/hooks/useOpenTab.ts Modified constants and hooks by replacing _LCD suffixes with _REST and updating endpoint references accordingly.
src/lib/components/*, src/lib/pages/** Renamed various components, hooks, and user messages that referenced LCD (e.g., AlertPaginationLcd, useCodeLcd, openLcdPage) to use REST terminology instead, ensuring consistent API interaction messaging.
src/lib/model/account/, src/lib/services/, src/lib/services/types/* Renamed functions, hooks, and types across services (account, bank, block, distribution, EVM, move/module, resource, name, NFT, proposal, staking, tx, etc.) to replace LCD-specific implementations and response types with their REST counterparts.

Sequence Diagram(s)

(No sequence diagram for these changes.)

Possibly related PRs

Suggested reviewers

  • evilpeach

Poem

I'm a little rabbit, hopping so free,
Changing lcd to rest in code, you see.
Endpoints now chat in a RESTful tone,
In every file, the new style is shown.
With hops and bytes, I cheer with glee—
Code so fresh, as happy as can be!
🥕💻


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?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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 using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a 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

🧹 Nitpick comments (5)
src/lib/components/modal/WasmCodeSnippet.tsx (2)

96-96: Variable name inconsistency in Python snippet

While the endpoint source has been updated to restEndpoint, the variable name LCD_URL still references LCD instead of REST.

Consider updating the variable name to match the new REST naming convention:

-LCD_URL = "${restEndpoint}"
+REST_URL = "${restEndpoint}"

And update its usage in line 100 as well.


126-126: Variable name inconsistency in Axios snippet

While the endpoint source has been updated to restEndpoint, the variable name lcdURL still uses the old naming convention.

Consider updating the variable name to match the REST naming convention:

-const lcdURL = '${restEndpoint}';
+const restURL = '${restEndpoint}';

And update its usage in line 132 as well.

src/lib/services/bank/rest.ts (1)

3-3: Naming update correctly implemented with a small typo

The renaming from LCD to REST is consistent, but there's a typo in the import name: zBalancesReponseRest is missing an 's' in "Response".

-import { zBalancesReponseRest } from "../types";
+import { zBalancesResponseRest } from "../types";

Also on line 21:

-.then(({ data }) => parseWithError(zBalancesReponseRest, data));
+.then(({ data }) => parseWithError(zBalancesResponseRest, data));

Also applies to: 7-7, 21-21

src/lib/services/tx/rest.ts (1)

21-51: getTxsByContractAddressRest: using Promise.allSettled.

This approach tries both queries in parallel, returning the first successful result. That matches the previous LCD logic, ensuring backward-compatible behavior.
Consider clarifying or documenting the fallback behavior if both requests succeed, or explicitly merging results if that scenario is applicable.

src/lib/services/account/index.ts (1)

84-85: Clear error message.

The updated message explicitly indicates this is the REST flow. Good clarity for debugging.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 138ff1d and efe5d49.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (107)
  • README.md (1 hunks)
  • package.json (1 hunks)
  • src/config/chain/devChainConfigs.ts (1 hunks)
  • src/lib/app-provider/contexts/default.ts (1 hunks)
  • src/lib/app-provider/env.ts (6 hunks)
  • src/lib/components/AlertPaginationRest.tsx (1 hunks)
  • src/lib/components/modal/MoveCodeSnippet.tsx (4 hunks)
  • src/lib/components/modal/WasmCodeSnippet.tsx (3 hunks)
  • src/lib/components/modal/code/SaveNewCode.tsx (2 hunks)
  • src/lib/components/select-code/CodeSelect.tsx (2 hunks)
  • src/lib/components/wallet-section/index.tsx (2 hunks)
  • src/lib/hooks/useOpenTab.ts (2 hunks)
  • src/lib/layout/InformationFooter.tsx (2 hunks)
  • src/lib/model/account/index.ts (1 hunks)
  • src/lib/model/account/rest.ts (3 hunks)
  • src/lib/model/contract.ts (2 hunks)
  • src/lib/pages/account-details/components/tables/instantiated-contracts/Lite.tsx (2 hunks)
  • src/lib/pages/account-details/components/tables/txs/lite.tsx (4 hunks)
  • src/lib/pages/account-details/components/tables/txs/sequencer.tsx (1 hunks)
  • src/lib/pages/account-details/data.ts (2 hunks)
  • src/lib/pages/account-details/index.tsx (2 hunks)
  • src/lib/pages/block-details/components/BlockDetailsTop.tsx (2 hunks)
  • src/lib/pages/block-details/components/BlockTxsTableLite.tsx (1 hunks)
  • src/lib/pages/block-details/data.ts (1 hunks)
  • src/lib/pages/block-details/lite.tsx (1 hunks)
  • src/lib/pages/code-details/components/code-info/table/CodeContractsTableLite.tsx (3 hunks)
  • src/lib/pages/code-details/data.ts (2 hunks)
  • src/lib/pages/code-details/index.tsx (2 hunks)
  • src/lib/pages/codes/components/RecentCodesTableLite.tsx (3 hunks)
  • src/lib/pages/codes/data.ts (2 hunks)
  • src/lib/pages/contract-details/components/InstantiateInfo.tsx (2 hunks)
  • src/lib/pages/contract-details/components/command-section/index.tsx (2 hunks)
  • src/lib/pages/contract-details/components/contract-states/index.tsx (3 hunks)
  • src/lib/pages/contract-details/components/tables/TxsTable.tsx (3 hunks)
  • src/lib/pages/contract-details/components/tables/migration/MigrationTableLite.tsx (2 hunks)
  • src/lib/pages/contract-details/data.ts (3 hunks)
  • src/lib/pages/custom-network/edit/index.tsx (1 hunks)
  • src/lib/pages/custom-network/manual/components/NetworkDetails.tsx (1 hunks)
  • src/lib/pages/custom-network/manual/components/WalletRegistry.tsx (3 hunks)
  • src/lib/pages/custom-network/manual/index.tsx (3 hunks)
  • src/lib/pages/custom-network/types.ts (8 hunks)
  • src/lib/pages/deploy/index.tsx (2 hunks)
  • src/lib/pages/home/lite.tsx (2 hunks)
  • src/lib/pages/home/sequencer.tsx (2 hunks)
  • src/lib/pages/instantiate/InstantiateFormPage.tsx (2 hunks)
  • src/lib/pages/interact-contract/components/query-area/JsonQuery.tsx (3 hunks)
  • src/lib/pages/interact-contract/components/query-area/schema-query/SchemaQueryComponent.tsx (2 hunks)
  • src/lib/pages/interact/data.ts (2 hunks)
  • src/lib/pages/interact/index.tsx (2 hunks)
  • src/lib/pages/migrate/components/MigrateContract.tsx (2 hunks)
  • src/lib/pages/migrate/index.tsx (2 hunks)
  • src/lib/pages/module-details/index.tsx (2 hunks)
  • src/lib/pages/nft-collection-details/data.ts (2 hunks)
  • src/lib/pages/past-txs/lite.tsx (2 hunks)
  • src/lib/pages/pools/components/pool-details/header/index.tsx (2 hunks)
  • src/lib/pages/pools/components/pool-details/tables/pool-txs/messages/superfluid/MsgLockAndSuperfluidDelegateDetail.tsx (2 hunks)
  • src/lib/pages/proposal-details/components/proposal-top/ViewProposalJson.tsx (2 hunks)
  • src/lib/pages/proposal-details/components/vote-details/deposit-period/depositors-table/index.tsx (1 hunks)
  • src/lib/pages/proposal-details/data.ts (2 hunks)
  • src/lib/pages/proposal/store-code/index.tsx (2 hunks)
  • src/lib/pages/proposal/whitelist/index.tsx (2 hunks)
  • src/lib/pages/proposals/components/ProposalsTableLite.tsx (2 hunks)
  • src/lib/pages/stored-codes/index.tsx (2 hunks)
  • src/lib/pages/tx-details/components/TxHeader.tsx (2 hunks)
  • src/lib/pages/upload/upload.tsx (2 hunks)
  • src/lib/pages/validator-details/components/validator-details-body/ValidatorDetailsBodyFull.tsx (2 hunks)
  • src/lib/pages/validator-details/components/validator-details-body/ValidatorDetailsBodyLite.tsx (2 hunks)
  • src/lib/pages/validators/components/ValidatorsBodyLite.tsx (2 hunks)
  • src/lib/pages/validators/components/validators-table/index.tsx (2 hunks)
  • src/lib/pages/validators/utils.ts (1 hunks)
  • src/lib/providers/cosmos-kit/index.tsx (1 hunks)
  • src/lib/providers/initia-widget.tsx (1 hunks)
  • src/lib/services/account/index.ts (4 hunks)
  • src/lib/services/account/rest.ts (2 hunks)
  • src/lib/services/bank/index.ts (1 hunks)
  • src/lib/services/bank/rest.ts (2 hunks)
  • src/lib/services/block/index.ts (7 hunks)
  • src/lib/services/block/lcd.ts (0 hunks)
  • src/lib/services/block/rest.ts (1 hunks)
  • src/lib/services/distribution/index.ts (1 hunks)
  • src/lib/services/distribution/rest.ts (2 hunks)
  • src/lib/services/evm/index.ts (3 hunks)
  • src/lib/services/evm/rest.ts (2 hunks)
  • src/lib/services/move/module/index.ts (9 hunks)
  • src/lib/services/move/module/rest.ts (5 hunks)
  • src/lib/services/move/resource/index.ts (2 hunks)
  • src/lib/services/move/resource/rest.ts (2 hunks)
  • src/lib/services/name/index.ts (5 hunks)
  • src/lib/services/name/rest.ts (2 hunks)
  • src/lib/services/nft-collection/index.ts (7 hunks)
  • src/lib/services/nft-collection/rest.ts (1 hunks)
  • src/lib/services/nft-collection/sequencer.ts (2 hunks)
  • src/lib/services/nft/index.ts (11 hunks)
  • src/lib/services/nft/rest.ts (2 hunks)
  • src/lib/services/proposal/index.ts (6 hunks)
  • src/lib/services/proposal/rest.ts (6 hunks)
  • src/lib/services/searchService.ts (8 hunks)
  • src/lib/services/staking/index.ts (1 hunks)
  • src/lib/services/staking/rest.ts (5 hunks)
  • src/lib/services/tx/api.ts (2 hunks)
  • src/lib/services/tx/index.ts (14 hunks)
  • src/lib/services/tx/rest.ts (3 hunks)
  • src/lib/services/types/account.ts (3 hunks)
  • src/lib/services/types/bank.ts (1 hunks)
  • src/lib/services/types/block.ts (2 hunks)
  • src/lib/services/types/distribution.ts (2 hunks)
  • src/lib/services/types/evm/codes.ts (1 hunks)
⛔ Files not processed due to max files limit (22)
  • src/lib/services/types/move/module.ts
  • src/lib/services/types/move/resource.ts
  • src/lib/services/types/nft.ts
  • src/lib/services/types/proposal.ts
  • src/lib/services/types/staking.ts
  • src/lib/services/types/tx.ts
  • src/lib/services/types/validator.ts
  • src/lib/services/types/wasm/code.ts
  • src/lib/services/types/wasm/contract.ts
  • src/lib/services/username/index.ts
  • src/lib/services/username/rest.ts
  • src/lib/services/validator/index.ts
  • src/lib/services/validator/rest.ts
  • src/lib/services/wasm/code/index.ts
  • src/lib/services/wasm/code/rest.ts
  • src/lib/services/wasm/contract/index.ts
  • src/lib/services/wasm/contract/rest.ts
  • src/lib/services/wasm/contractState/index.ts
  • src/lib/services/wasm/contractState/rest.ts
  • src/lib/stores/chain-config.test.ts
  • src/lib/types/account.ts
  • src/lib/types/chainConfig.ts
💤 Files with no reviewable changes (1)
  • src/lib/services/block/lcd.ts
✅ Files skipped from review due to trivial changes (8)
  • src/lib/pages/proposal-details/components/vote-details/deposit-period/depositors-table/index.tsx
  • src/lib/services/types/bank.ts
  • src/lib/pages/account-details/components/tables/txs/sequencer.tsx
  • src/lib/services/name/rest.ts
  • src/lib/services/types/evm/codes.ts
  • src/lib/components/AlertPaginationRest.tsx
  • src/lib/services/types/distribution.ts
  • src/lib/pages/validators/utils.ts
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (277)
src/lib/app-provider/contexts/default.ts (1)

9-9: Property renamed from lcd to rest, which aligns with the PR objective.

The change from lcd to rest in the DEFAULT_CHAIN_CONFIG object is consistent with the naming convention update mentioned in the PR objectives.

README.md (1)

72-72: Documentation updated to reflect the new REST API naming convention.

The change maintains the same URL value while updating the property name from lcd to rest in the example chain configuration. This ensures the documentation accurately reflects the code.

src/lib/pages/custom-network/edit/index.tsx (1)

69-69: JSON export updated to use the new rest property name.

The JSON stringification process now correctly references chainConfig.rest instead of the previous chainConfig.lcd, ensuring consistency in the exported configuration files.

src/lib/providers/initia-widget.tsx (1)

17-17: Widget configuration updated to use the rest property.

The WalletWidgetProvider configuration has been updated to use chainConfig.rest instead of chainConfig.lcd, maintaining functionality while following the new naming convention.

src/config/chain/devChainConfigs.ts (1)

12-12:

❓ Verification inconclusive

Property renamed from lcd to rest as part of naming convention update.

The property name was changed but the URL value remains the same. This is consistent with the PR objective to update the naming convention from "lcd" to "rest" across the codebase.

Let's check if there are any remaining references to the old lcd property in the codebase:


🏁 Script executed:

#!/bin/bash
# Search for any remaining references to the lcd property in chain configs
echo "Searching for remaining references to 'lcd' property in TypeScript files..."
rg --type ts "lcd: " -C 2

Length of output: 194


Below is an updated review comment. I've added a note urging an additional manual check using a whole‐word search for lcd to ensure no stray references remain in the repository:


Renaming to rest Verified – Please Manually Reconfirm

The property in src/config/chain/devChainConfigs.ts (line 12) has been renamed from lcd to rest as intended. An initial search using a pattern matching "lcd: " returned no results, which strongly suggests that all instances of the old property have been updated. However, since the output was minimal, please run a more comprehensive (whole-word) search for lcd in the TypeScript files to double-check that no references remain.

  • File to verify: src/config/chain/devChainConfigs.ts (line 12).
  • Action: Confirm by running a whole‐word search (e.g., using rg --type ts '\blcd\b' -C 2) to ensure there are absolutely no residual references to lcd.
src/lib/services/evm/rest.ts (2)

4-4: Updated import to use the REST response schema instead of LCD.

The import has been updated from zEvmCodesByAddressResponseLcd to zEvmCodesByAddressResponseRest to align with the new naming convention.


20-20: Updated schema reference from LCD to REST.

The code now uses zEvmCodesByAddressResponseRest for parsing the response data, consistent with the import change above.

src/lib/pages/contract-details/components/tables/migration/MigrationTableLite.tsx (2)

5-5: Updated import from LCD to REST hook.

The import has been changed from useMigrationHistoriesLcd to useMigrationHistoriesRest as part of the naming convention update.


21-21: Updated hook usage from LCD to REST.

The component now uses useMigrationHistoriesRest instead of useMigrationHistoriesLcd, consistent with the import change above.

src/lib/pages/home/sequencer.tsx (2)

10-10: Updated import from LCD to REST

The import is correctly updated from useLatestBlockLcd to useLatestBlockRest which aligns with the PR's objective to update naming convention from LCD to REST.


23-23: Updated function call from LCD to REST

The function call is properly updated to match the import change, maintaining consistency with the new naming convention.

src/lib/providers/cosmos-kit/index.tsx (1)

27-27: Updated configuration property from LCD to REST

The property assignment is correctly updated to use config.rest instead of config.lcd, maintaining consistency with the PR's objective to update naming conventions.

src/lib/pages/nft-collection-details/data.ts (2)

2-2: Updated import from LCD to REST

The import is correctly updated from useResourcesByAddressLcd to useResourcesByAddressRest which aligns with the PR's objective to update naming convention.


27-28: Updated function call from LCD to REST

The function call is properly updated to use the new REST-based function, maintaining consistency with the naming convention changes.

src/lib/pages/custom-network/manual/index.tsx (3)

51-51: Updated form default value property from LCD to REST

The property name in the form's default values is correctly changed from lcd to rest to align with the new naming convention.


70-70: Updated destructured variable from LCD to REST

The destructured property from the watch function is properly renamed from lcd to rest to match the changes in the default values.


114-114: Updated validation property from LCD to REST

The property name in the validation logic is correctly updated to rest, ensuring consistent naming throughout the form validation process.

src/lib/pages/code-details/index.tsx (2)

33-33: LGTM - Import statement correctly updated.

The import has been properly updated from useCodeDataLcd to useCodeDataRest as part of the broader LCD to REST naming convention update.


54-55: LGTM - Variable references consistently updated.

The code correctly updates both the declaration and usage of the data fetching hook from LCD to REST while maintaining the same functionality.

src/lib/services/tx/api.ts (2)

6-6: LGTM - Type import correctly updated.

Type import successfully changed from zTxByHashResponseLcd to zTxByHashResponseRest as part of the naming convention update.


18-18: LGTM - Type usage correctly updated.

The function correctly uses the updated type zTxByHashResponseRest when parsing the API response data.

src/lib/components/wallet-section/index.tsx (2)

6-6: LGTM - Import statement correctly updated.

The import has been properly updated from useIcnsNamesByAddressLcd to useIcnsNamesByAddressRest.


23-23: LGTM - Function call correctly updated.

The hook usage has been successfully updated to use useIcnsNamesByAddressRest while maintaining the same parameters and functionality.

src/lib/pages/home/lite.tsx (2)

6-6: LGTM - Import statement correctly updated.

The import has been properly updated from useLatestBlockLcd to useLatestBlockRest.


17-17: LGTM - Hook usage correctly updated.

The hook usage has been successfully updated to use useLatestBlockRest while maintaining the same destructuring pattern.

src/lib/components/modal/MoveCodeSnippet.tsx (4)

68-68: Property renaming aligns with REST convention.

The change from lcd: lcdEndpoint to rest: restEndpoint in the destructured chainConfig follows the updated naming convention while maintaining functionality.


129-130: URL endpoint updated to use REST terminology.

The curl command now correctly references restEndpoint instead of the previous lcdEndpoint while maintaining the same API structure.


152-154: InitiaJS client instantiation updated to use REST terminology.

The variable name and endpoint reference have been updated while preserving the client initialization functionality.


181-185: Execute function client initialization updated to REST terminology.

The InitiaJS client for the execute function now correctly uses the restEndpoint while maintaining the same client configuration.

src/lib/pages/tx-details/components/TxHeader.tsx (2)

23-23: Hook usage updated to use REST terminology.

The useOpenTxTab hook now uses "rest" instead of "lcd" as the parameter, maintaining consistency with the updated naming convention.


72-72: Function call updated to use the renamed REST handler.

The click handler now correctly uses openRestTab instead of openLcdTab, consistent with the hook usage change above.

src/lib/services/bank/index.ts (4)

24-24: Import statement updated to use REST terminology.

The import has been changed from getBalancesLcd to getBalancesRest to align with the updated naming convention.


31-32: Destructured property renamed to use REST terminology.

The chainConfig property has been updated from lcd to rest while maintaining the same functionality.


35-36: Endpoint variable assignment updated to use REST endpoint.

The endpoint variable now correctly uses restEndpoint instead of lcdEndpoint for non-Sei chains.


43-43: Function call updated to use REST implementation.

The function call has been updated from getBalancesLcd to getBalancesRest to match the imported function.

src/lib/pages/proposal/whitelist/index.tsx (2)

47-47: Import statement updated to use REST terminology.

The import has been changed from useUploadAccessParamsLcd to useUploadAccessParamsRest to align with the updated naming convention.


77-77: Hook usage updated to use REST implementation.

The hook call has been updated from useUploadAccessParamsLcd to useUploadAccessParamsRest to match the imported hook.

src/lib/pages/account-details/components/tables/txs/lite.tsx (4)

14-14: Consistent renaming from LCD to REST

Import correctly updated from useTxsByAddressLcd to useTxsByAddressRest as part of the convention change.


43-43: Hook usage properly updated

Function call correctly updated from useTxsByAddressLcd to useTxsByAddressRest.


79-80: User-facing message updated

Alert message appropriately updated to reference REST instead of LCD for user clarity.


94-94: Empty state message updated

Empty state message correctly updated to reference REST instead of LCD to maintain consistency.

src/lib/layout/InformationFooter.tsx (2)

9-9: Import statement updated

Successfully updated import from useLatestBlockLcd to useLatestBlockRest to match the new naming convention.


26-26: Hook implementation updated

Function call correctly updated from useLatestBlockLcd to useLatestBlockRest consistent with the import change.

src/lib/components/modal/WasmCodeSnippet.tsx (1)

62-62: Updated property name in destructured object

Successfully updated the property name from lcd to rest in the destructured chainConfig object.

src/lib/pages/pools/components/pool-details/tables/pool-txs/messages/superfluid/MsgLockAndSuperfluidDelegateDetail.tsx (2)

13-13: Updated import statement

Import correctly updated from useValidatorDataLcd to useValidatorDataRest as part of the naming convention change.


55-55: Updated hook implementation

Function call correctly updated from useValidatorDataLcd to useValidatorDataRest consistent with the import change.

src/lib/model/contract.ts (3)

6-6: Import updated correctly for REST endpoint usage.

The import has been appropriately updated from LCD to REST endpoint, maintaining consistency with the PR objectives.


22-23: Variable names updated correctly to reflect REST usage.

The variable names have been properly renamed from dataLcd/isLcdLoading to dataRest/isRestLoading to maintain a consistent naming convention across the codebase.


27-27: Data source reference updated correctly.

The destructuring statement has been updated to reference the REST data source, ensuring proper functionality after the convention change.

src/lib/pages/contract-details/components/command-section/index.tsx (2)

4-4: Import statement correctly updated to use REST service.

The import has been properly updated from LCD to REST, maintaining consistency with the PR objectives.


22-22: Function call updated to use REST endpoint.

The component now correctly uses the REST implementation of the contract query messages hook, maintaining functional equivalence while following the new naming convention.

src/lib/pages/migrate/components/MigrateContract.tsx (2)

29-29: Import statement correctly updated to use REST service.

The import has been properly updated from LCD to REST, maintaining consistency with the PR objectives.


131-131: Function call updated to use REST endpoint.

The component now correctly uses the REST implementation of the code hook, maintaining functional equivalence while following the new naming convention.

src/lib/pages/block-details/data.ts (3)

3-4: Import statements correctly updated to use REST services.

The imports have been properly updated from LCD to REST for both block data and validator services, maintaining consistency with the PR objectives.


7-7: Function name updated to reflect REST implementation.

The exported function name has been correctly updated from useBlockDataWithValidatorLcd to useBlockDataWithValidatorRest to maintain naming convention consistency.


14-16: Function calls updated to use REST endpoints.

Both function calls within the implementation have been properly updated to use the REST versions, maintaining functional equivalence while following the new naming convention.

src/lib/model/account/index.ts (2)

10-10: Import statement correctly updated following naming convention change

The import statement has been properly updated from useAccountDelegationInfosLcd to useAccountDelegationInfosRest as part of the broader update from LCD to REST naming convention.


18-18: Function call and variable naming consistently updated

The function call has been correctly updated to use useAccountDelegationInfosRest and the variable name has been changed from resLcd to resRest. The return statement has also been properly updated to reflect this change.

Also applies to: 21-21

src/lib/services/nft-collection/index.ts (4)

64-64: Chain config property and endpoint references properly updated

Destructuring property has been correctly renamed from lcd: lcdEndpoint to rest: restEndpoint and all references to this endpoint in the function parameters have been updated accordingly.

Also applies to: 71-71, 83-83


100-100: Endpoint references consistently updated in useNftCollectionCreator function

All occurrences of lcdEndpoint have been properly changed to restEndpoint in the query keys and function parameters for consistency with the new naming convention.

Also applies to: 107-107, 123-123


173-174: REST endpoint correctly referenced in sequencer function

The destructuring property and all references to the endpoint in the query keys and function parameters have been updated to use rest and restEndpoint consistently.

Also applies to: 177-177, 180-180


233-234: Final endpoint references properly updated

All remaining occurrences of lcd and lcdEndpoint have been consistently changed to rest and restEndpoint in the useNftCollectionsByAccountAddress function.

Also applies to: 241-241, 253-253

src/lib/pages/stored-codes/index.tsx (1)

22-22: Hook import and usage correctly updated

Both the import statement and the hook usage have been properly updated from useUploadAccessParamsLcd to useUploadAccessParamsRest as part of the naming convention update. This maintains consistency across the codebase.

Also applies to: 53-53

src/lib/pages/block-details/components/BlockDetailsTop.tsx (2)

34-34: REST endpoint and function name properly updated

The changes correctly update the destructuring property from lcd: lcdEndpoint to rest: restEndpoint and rename the openLcdPage function to openRestPage. The URL construction now properly uses the restEndpoint variable.

Also applies to: 37-37, 40-40


92-92: Function call updated to match new function name

The onClick handler has been updated to call the renamed openRestPage function, maintaining consistency with the naming changes.

src/lib/services/nft-collection/sequencer.ts (2)

16-16: Import updated from LCD to REST.

The import has been updated to use the REST implementation instead of LCD, aligning with the new REST API approach.


31-31: Updated fallback function to use REST implementation.

The fallback mechanism has been updated to use the REST implementation, maintaining the same functionality while adhering to the new naming convention.

src/lib/pages/codes/data.ts (2)

3-3: Updated imports from LCD to REST.

Import statement has been updated to use REST implementation instead of LCD, consistent with the PR objective.


40-42: Renamed function from useRecentCodesLcd to useRecentCodesRest.

Function has been renamed and updated to use the REST implementation while maintaining the same functionality.

src/lib/pages/past-txs/lite.tsx (2)

15-15: Updated import from LCD to REST.

Import statement has been updated to use the REST implementation for transaction fetching.


68-68: Updated function call from LCD to REST.

Function call has been updated to use the REST implementation while maintaining the same parameters and functionality.

src/lib/pages/instantiate/InstantiateFormPage.tsx (2)

54-54: Updated import from LCD to REST.

Import statement has been updated to use the REST implementation for code retrieval.


200-200: Updated function call from LCD to REST.

Function call has been updated to use the REST implementation while preserving all parameters and functionality.

src/lib/components/modal/code/SaveNewCode.tsx (2)

13-13: Import updated to reflect REST API usage

The import has been changed from useCodeLcd to useCodeRest as part of the naming convention update from LCD to REST.


62-85: Function call updated to use REST API

The function call has been properly changed from useCodeLcd to useCodeRest while maintaining the same parameter structure and callback handling.

src/lib/pages/contract-details/components/InstantiateInfo.tsx (2)

14-14: Type import updated to follow REST API naming convention

The import type has been changed from ContractRest to ContractRestApi as part of the LCD to REST renaming effort.


28-28: Type annotation updated in interface

The type annotation in the interface has been properly updated from Nullable<ContractRest> to Nullable<ContractRestApi>.

src/lib/pages/block-details/components/BlockTxsTableLite.tsx (2)

3-3: Import updated to use REST API

The import has been changed from useBlockDataLcd to useBlockDataRest as part of the naming convention update.


10-10: Function call updated to use REST API

The function call has been properly changed from useBlockDataLcd to useBlockDataRest while maintaining the same usage pattern.

src/lib/pages/proposal/store-code/index.tsx (2)

60-60: Import updated to follow REST API naming convention

The import has been changed from useUploadAccessParamsLcd to useUploadAccessParamsRest as part of the codebase-wide renaming effort.


102-102: Function call updated to use REST API

The function call has been properly changed from useUploadAccessParamsLcd to useUploadAccessParamsRest while preserving the same destructuring pattern and data handling.

src/lib/pages/migrate/index.tsx (2)

24-24: Import renamed from LCD to REST.

The import has been correctly updated from useUploadAccessParamsLcd to useUploadAccessParamsRest, aligning with the new REST API naming convention.


52-52: Hook usage updated from LCD to REST.

The hook has been properly changed from useUploadAccessParamsLcd() to useUploadAccessParamsRest() to match the new REST-based implementation.

src/lib/services/types/block.ts (2)

85-86: Section title and constant renamed from LCD to REST.

The section title and zBlockLcd constant have been appropriately renamed to reflect the REST API approach.


103-103: Export constant renamed from LCD to REST.

The zBlockDataResponseLcd constant has been correctly renamed to zBlockDataResponseRest while maintaining its functionality.

src/lib/pages/contract-details/components/tables/TxsTable.tsx (4)

7-7: Import updated from LCD to REST.

The import has been correctly updated to use useTxsByContractAddressRest instead of the LCD version.


51-59: Hook usage and variable name updated from LCD to REST.

Both the variable name and hook call have been properly renamed from LCD to REST versions while preserving all parameters and functionality.


61-61: Variable reference updated in conditional.

The conditional statement has been correctly updated to reference resRest instead of resLcd.


78-78: Error message updated to reference REST instead of LCD.

The error message has been appropriately modified to reference REST API rather than LCD, maintaining consistent terminology throughout the component.

src/lib/services/nft-collection/rest.ts (3)

4-4: Import updated from LCD to REST.

The import has been correctly updated to use getMoveViewJsonRest instead of the LCD version.


10-10: Function renamed from LCD to REST.

The function has been appropriately renamed from getCollectionByCollectionAddressLcd to getCollectionByCollectionAddressRest while maintaining its functionality.


15-15: Function calls updated from LCD to REST.

All four function calls to getMoveViewJsonLcd have been correctly updated to getMoveViewJsonRest to align with the new naming convention.

Also applies to: 23-23, 31-31, 39-39

src/lib/pages/account-details/components/tables/instantiated-contracts/Lite.tsx (2)

8-8: Update to REST API references looks good.

The import has been correctly updated from useAccountContractsLcd to useAccountContractsRest, aligning with the project's transition from LCD to REST naming convention.


24-24: Function call updated correctly.

The function call has been properly updated to use useAccountContractsRest instead of useAccountContractsLcd, maintaining consistent naming convention throughout the file.

src/lib/components/select-code/CodeSelect.tsx (2)

12-12: Import path updated correctly.

The import has been properly changed from useCodeLcd to useCodeRest, consistent with the project's naming convention update.


34-34: Function call updated correctly.

The function call has been properly changed to use useCodeRest instead of useCodeLcd, maintaining consistent naming throughout the component.

src/lib/pages/interact/index.tsx (2)

20-20: Import statement updated correctly.

The import has been properly updated from useModuleByAddressLcd to useModuleByAddressRest, consistent with the project's naming convention update.


193-193: Function call updated consistently.

The hook usage has been correctly updated to useModuleByAddressRest, matching the import statement change and maintaining consistency throughout the file.

src/lib/pages/interact/data.ts (2)

4-4: Import updated correctly.

The import has been properly changed from useModuleByAddressLcd to useModuleByAddressRest, consistent with the project's naming convention update.


23-23: Function call updated consistently.

The hook usage has been correctly updated to useModuleByAddressRest, matching the import statement change and maintaining consistency throughout the file.

src/lib/pages/interact-contract/components/query-area/schema-query/SchemaQueryComponent.tsx (2)

28-28: Updated import to align with new REST naming convention.

The import has been updated from useContractQueryLcd to useContractQueryRest to align with the new naming convention that uses "rest" instead of "lcd" across the codebase.


82-82: Updated hook usage to useContractQueryRest.

The hook usage has been updated from useContractQueryLcd to useContractQueryRest, maintaining the same parameters and functionality while aligning with the new REST naming convention.

src/lib/pages/interact-contract/components/query-area/JsonQuery.tsx (3)

25-27: Updated imports to use REST-based hooks.

The imports have been updated from LCD-based hooks to REST-based hooks:

  • useContractQueryMsgsLcduseContractQueryMsgsRest
  • useContractQueryLcduseContractQueryRest

This change is part of the broader naming convention update from "lcd" to "rest" across the codebase.


52-52: Updated hook usage to useContractQueryMsgsRest.

The hook usage has been updated to match the new import, changing from useContractQueryMsgsLcd to useContractQueryMsgsRest while maintaining the same functionality.


64-64: Updated hook usage to useContractQueryRest.

The hook usage has been updated from useContractQueryLcd to useContractQueryRest, maintaining the same parameters and functionality while following the new naming convention.

src/lib/pages/validator-details/components/validator-details-body/ValidatorDetailsBodyFull.tsx (2)

22-22: Updated staking params import to use REST-based hook.

The import has been updated from useStakingParamsLcd to useStakingParamsRest to align with the new naming convention.


40-40: Updated hook usage to useStakingParamsRest.

The hook usage has been updated from useStakingParamsLcd to useStakingParamsRest, maintaining the same conditional parameter and functionality.

src/lib/pages/validators/components/validators-table/index.tsx (2)

11-11: Updated staking params import to use REST-based hook.

The import has been updated from useStakingParamsLcd to useStakingParamsRest to align with the new naming convention.


51-51: Updated hook usage to useStakingParamsRest.

The hook usage has been updated from useStakingParamsLcd to useStakingParamsRest, maintaining the same conditional parameter and functionality.

src/lib/services/move/resource/index.ts (4)

13-13: Clean import path update.

The import has been updated correctly from LCD to REST, aligning with the new REST-based approach.


21-26: Function renamed properly and configuration updated.

The function name has been updated from useResourcesByAddressLcd to useResourcesByAddressRest, and the configuration property access has been updated from lcd to rest as well. This ensures consistent naming across the codebase.


30-30: Function call updated correctly.

The function call has been updated to use the new REST-based function and endpoint.


86-86: Query key updated correctly.

The query key now refers to the REST endpoint instead of the LCD endpoint, maintaining cache consistency.

src/lib/pages/deploy/index.tsx (2)

21-21: Import statement updated correctly.

The import has been updated to use the REST version of the hook instead of the LCD version.


58-58: Hook usage updated appropriately.

The hook call has been updated to use the REST version, maintaining the same functionality while aligning with the new naming convention.

src/lib/services/block/rest.ts (1)

1-17: Good implementation of REST-based endpoints.

The new REST-based functions follow the same patterns as the previous LCD implementations. The endpoints are correctly configured to use the standard Cosmos REST API paths, and proper error handling is maintained through the parseWithError function.

These functions should be drop-in replacements for the previous LCD functions while following the REST naming convention.

src/lib/pages/account-details/index.tsx (2)

33-33: Import updated to use REST version.

The import has been updated to use the REST version of the hook instead of the LCD version.


122-122: Hook usage updated to use REST version.

The hook call has been updated consistently to use useResourcesByAddressRest, maintaining the same functionality.

src/lib/pages/upload/upload.tsx (1)

17-17: Naming update correctly implemented

The change from useUploadAccessParamsLcd to useUploadAccessParamsRest is consistent with the PR objective of updating the naming convention from LCD to REST.

Also applies to: 27-27

src/lib/pages/custom-network/manual/components/NetworkDetails.tsx (1)

111-114: Form field successfully renamed from LCD to REST

The form field has been correctly updated from "lcd" to "rest", including the name, label, and error reference, which is consistent with the PR objectives.

Also applies to: 120-120

src/lib/pages/proposals/components/ProposalsTableLite.tsx (1)

10-10: Hook references successfully updated

The hooks have been correctly renamed from LCD to REST variants, maintaining consistent parameters and usage patterns.

Also applies to: 29-35

src/lib/pages/custom-network/manual/components/WalletRegistry.tsx (4)

132-135: Consistent renaming from lcd to rest.

The variable and parameter names have been correctly updated from "lcd" to "rest" in the useWatch hook.


137-138: Hook parameter updated consistently.

The parameter passed to useAccountBech32 has been properly updated from "lcd" to "rest".


170-170: Updated UI text reference.

The subtitle text now correctly refers to "REST URL" instead of "LCD URL".


205-206: Updated error message reference.

The error message now correctly refers to "REST" instead of "LCD" as the data source.

src/lib/services/move/resource/rest.ts (3)

3-3: Updated import to use REST naming.

The import has been properly updated from zResourcesResponseLcd to zResourcesResponseRest.


11-14: Renamed function for consistency.

The function name has been updated from getAccountResourcesLcd to getAccountResourcesRest while maintaining the same parameters and return type.


27-27: Updated schema reference.

The parsing schema reference has been updated to zResourcesResponseRest.

src/lib/pages/account-details/data.ts (2)

6-10: Updated import for REST naming convention.

The import has been correctly changed from useInstantiatedContractsByAddressLcd to useInstantiatedContractsByAddressRest.


113-119: Renamed function and updated internal call.

Function has been renamed from useAccountContractsLcd to useAccountContractsRest, and its internal call updated to useInstantiatedContractsByAddressRest while maintaining the same functionality.

src/lib/pages/pools/components/pool-details/header/index.tsx (2)

22-26: Updated endpoint variable and function names.

The variable has been changed from lcdEndpoint to restEndpoint, and the function has been renamed from openPoolLcd to openPoolRest. The tracking event has also been updated to reflect this change.


52-53: Updated onClick handler reference.

The onClick handler now correctly references openPoolRest instead of openPoolLcd.

src/lib/pages/module-details/index.tsx (2)

23-23: Properly updated import to the REST API version.

The import has been successfully updated from useModuleByAddressLcd to useModuleByAddressRest, maintaining the naming convention change from LCD to REST.


66-66: Function call properly updated to use REST API.

The implementation correctly uses the new useModuleByAddressRest hook, maintaining the same interface and destructuring pattern.

src/lib/pages/validators/components/ValidatorsBodyLite.tsx (2)

4-4: Imports successfully updated to use REST API versions.

Both utility function indexValidatorsRest and hook useValidatorsRest imports have been properly updated to match the new REST naming convention.

Also applies to: 6-6


32-33: Function calls correctly updated to use REST API.

Both the validator data fetching hook and the indexing function have been properly updated to their REST versions. The structure and behavior of the component remain unchanged.

src/lib/pages/codes/components/RecentCodesTableLite.tsx (3)

3-3: Imports successfully updated to use REST API versions.

Both the useRecentCodesRest hook and AlertPaginationRest component imports have been properly updated to match the new REST naming convention.

Also applies to: 5-5


19-19: Data fetching hook properly updated to use REST API.

The hook implementation correctly uses the new useRecentCodesRest function while maintaining the same destructuring pattern.


29-29: Alert component correctly updated to use REST version.

The component reference has been properly updated from AlertPaginationLcd to AlertPaginationRest.

src/lib/pages/block-details/lite.tsx (3)

5-5: Imports successfully updated to use REST API versions.

Both the useLatestBlockRest and useBlockDataWithValidatorRest imports have been properly updated to match the new REST naming convention.

Also applies to: 9-9


12-14: Data fetching hooks properly updated to use REST API.

Both hook implementations correctly use the new REST versions while maintaining the same parameters and destructuring patterns.


20-21: Error messages appropriately updated to reference REST instead of LCD.

The error messaging has been properly updated to reference REST pruning instead of LCD pruning, maintaining consistency with the API approach change.

src/lib/pages/proposal-details/components/proposal-top/ViewProposalJson.tsx (4)

17-17: LGTM! Correctly updated endpoint property from lcd to rest.

The variable name change from lcdEndpoint to restEndpoint properly aligns with the new REST API naming convention.


24-24: Function renaming looks good.

Consistent renaming from openLcdPage to openRestPage to match the REST API conventions.


27-27: LGTM! Endpoint usage is correct.

Using restEndpoint in the URL construction is consistent with the new naming convention.


45-45: onClick handler properly updated.

Now correctly uses the renamed openRestPage function.

src/lib/pages/proposal-details/data.ts (5)

6-7: Imports correctly updated to use REST hooks.

The imports now properly reference the new REST-based hooks instead of LCD hooks.


35-38: LGTM! Variable names and hook updated.

The variable destructuring now correctly references dataRest and isRestLoading from the updated REST hook.


39-40: Deposits hook and variables properly updated.

Now correctly uses useProposalDepositsRest with corresponding variable names.


45-50: Data references properly updated in conditional logic.

All references to LCD data variables have been correctly updated to their REST counterparts.


53-54: Loading state variables properly updated.

The loading state variable names now correctly reference the REST loading states.

src/lib/pages/code-details/components/code-info/table/CodeContractsTableLite.tsx (4)

4-4: Alert component import correctly updated.

Now importing AlertPaginationRest instead of the LCD variant.


7-7: Hook import properly updated for REST.

Now correctly imports useCodeContractsRest instead of the LCD variant.


26-26: Hook usage updated to REST variant.

The hook call has been properly updated to use the REST version.


36-36: Alert component properly updated.

Now correctly using AlertPaginationRest component.

src/lib/pages/contract-details/components/contract-states/index.tsx (3)

14-14: Import correctly updated to use REST API hook.

Now properly imports useContractStatesRest instead of the LCD variant.


42-42: Hook usage updated to REST variant.

The function call has been properly updated to use the REST version.


123-123: Error message properly updated to reference REST.

The error message now correctly mentions "REST" instead of "LCD" to match the new API approach.

src/lib/hooks/useOpenTab.ts (5)

11-11: Naming convention updated from "lcd" to "rest"

The type parameter has been updated from "lcd" to "rest", aligning with the new REST API approach.


14-14: Condition updated to check for "rest" type

Conditional logic has been properly updated to maintain functionality with the new naming convention.


28-29: Destructured property renamed from "lcd" to "rest"

The destructured property from chainConfig has been correctly updated.


36-36: URL construction updated to use restEndpoint

The URL construction now correctly uses restEndpoint instead of lcdEndpoint.


39-39: useCallback dependency updated

The dependency array for useCallback has been properly updated to include restEndpoint.

src/lib/pages/contract-details/data.ts (9)

6-7: Import updated to use REST-based hook

Import statement has been properly updated to use the REST version of the hook.


8-12: Additional imports updated to REST versions

All imports in this block have been correctly updated to use their REST counterparts.


16-16: Function renamed from useContractDataLcd to useContractDataRest

The function has been properly renamed to align with the REST naming convention.


22-27: Function call updated to use REST version

The useCodeRest function is now being called instead of useCodeLcd with the same parameters.


28-31: useContractCw2InfoRest function call updated

The call to useContractCw2InfoRest is correctly implemented with the same parameters.


32-33: Migration histories function updated to REST version

The useMigrationHistoriesByContractAddressRest function is now being called with the same parameters.


62-62: Function call in useContractDataWithLocalInfos updated

Updated to call useContractDataRest instead of useContractDataLcd.


101-101: Function renamed from useMigrationHistoriesLcd to useMigrationHistoriesRest

Function properly renamed to align with the REST naming convention.


102-103: Internal function call updated to REST version

The call to useMigrationHistoriesByContractAddressRest is now being made correctly.

src/lib/services/account/rest.ts (8)

4-5: Import statements updated to REST versions

Import statements now correctly reference REST versions of the functions and types.


11-14: Function renamed from getAccountDataLcd to getAccountDataRest

The function has been properly renamed to align with the REST naming convention.


15-15: Internal function call updated to use REST version

The call to getIcnsNamesByAddressRest is now being made correctly.


25-28: Function renamed from getAccountTypeLcd to getAccountTypeRest

The function has been properly renamed to align with the REST naming convention.


29-33: Variable renamed and schema validation updated

The variable has been renamed from accountTypeLcd to accountTypeRest, and the schema validation now uses zAccountTypeRest.


39-39: Return statement updated to use new variable name

The return statement now correctly returns accountTypeRest instead of accountTypeLcd.


42-42: Function renamed from getAccountBech32Lcd to getAccountBech32Rest

The function has been properly renamed to align with the REST naming convention.


45-45: Schema validation updated

The schema validation now uses zAccountBech32RestResponse instead of zAccountBech32LcdResponse.

src/lib/services/nft/rest.ts (7)

1-3: Import statements updated to REST versions

Import statements now correctly reference REST versions of the functions and types.


8-11: Function renamed from getNftHolderLcd to getNftHolderRest

The function has been properly renamed to align with the REST naming convention.


12-19: Internal function call updated to use REST version

The call to getMoveViewJsonRest is now being made correctly with the same parameters.


21-21: Function renamed from getNftInfoLcd to getNftInfoRest

The function has been properly renamed to align with the REST naming convention.


22-29: Internal function call updated and schema validation updated

The call to getMoveViewJsonRest is correctly implemented, and the schema validation now uses zNftInfoRest.


31-34: Function renamed from getNftByNftAddressLcd to getNftByNftAddressRest

The function has been properly renamed to align with the REST naming convention.


36-37: Internal function calls updated to use REST versions

The calls to getNftHolderRest and getNftInfoRest are now being made correctly.

src/lib/services/nft/index.ts (1)

32-32: Naming convention updated from 'lcd' to 'rest' consistently

The renaming follows the PR objective to transition from "lcd" to "rest" terminology throughout the codebase. All references have been consistently updated in imports, variables, function names, query keys, and API calls.

Also applies to: 50-50, 62-62, 107-107, 117-117, 125-125, 140-140, 143-145, 159-159, 166-166, 177-177, 222-222, 226-228, 321-321, 327-327, 333-337

src/lib/services/distribution/rest.ts (1)

4-5: API response types and function names properly updated to follow 'rest' convention

The changes consistently rename functions and response types from "Lcd" to "Rest" terminology while maintaining the same functionality.

Also applies to: 10-10, 18-18, 20-20, 29-29

src/lib/pages/code-details/data.ts (1)

5-5: Code query functions updated to use REST endpoints

The hooks for fetching code data and contracts have been systematically updated from "Lcd" to "Rest" naming convention, reflecting the shift to using REST endpoints instead of LCD endpoints.

Also applies to: 8-8, 12-13, 59-59, 61-61

src/lib/model/account/rest.ts (1)

6-7: Account delegation hooks updated to use REST endpoints

All delegation-related hooks and functions have been consistently updated to use REST counterparts instead of LCD versions, maintaining the same functionality while aligning with the new naming standard.

Also applies to: 11-14, 16-16, 36-36, 55-69

src/lib/pages/custom-network/types.ts (6)

6-6: LGTM! Proper import update.

The import statement for getAccountBech32Rest is correctly updated to use the new REST-based function from lib/services/account/rest.


71-71: LGTM! Consistent property rename.

The property name in the zNetworkDetails schema has been properly updated from lcd to rest.


357-358: LGTM! Transform parameters and output updated.

The parameters in the transformation function and the corresponding output structure have been consistently updated from lcd to rest.

Also applies to: 379-380


445-446: LGTM! Schema field updated.

The field in the zAddNetworkJsonChainConfigJson schema has been properly updated from lcd to rest.


479-480: LGTM! Schema field updated.

The field in the zAddNetworkLinkChainConfigJson schema has been properly updated from lcd to rest.


496-498: LGTM! Function call and output structure updated.

The function call has been updated from getAccountBech32Lcd to getAccountBech32Rest and the corresponding field in the returned object is also updated.

Also applies to: 505-506

src/lib/services/types/account.ts (3)

5-6: LGTM! Import renamed.

The import has been correctly updated from AccountTypeLcd to AccountTypeRest to align with the new naming convention.


38-44: LGTM! Constant and type reference updated.

The exported constant zAccountTypeLcd has been properly renamed to zAccountTypeRest, and the corresponding type reference inside has been updated as well.


52-60: LGTM! Schema and type name updated.

The exported constant zAccountBech32LcdResponse and its corresponding type have been properly updated to use the "rest" naming convention.

src/lib/services/move/module/rest.ts (4)

5-8: LGTM! Schema imports updated.

The schema imports have been properly updated from LCD to REST variations.


12-22: LGTM! Function name and schema usage updated.

The function getModuleByAddressLcd has been properly renamed to getModuleByAddressRest and the schema usage within has been updated accordingly.


23-50: LGTM! Function and schema usage updated.

The function getModulesByAddressLcd has been properly renamed to getModulesByAddressRest and the schema usage within has been updated accordingly.


52-69: LGTM! Function and schema usage updated.

The function getMoveViewJsonLcd has been properly renamed to getMoveViewJsonRest and the schema usage within has been updated accordingly.

src/lib/pages/validator-details/components/validator-details-body/ValidatorDetailsBodyLite.tsx (4)

13-13: LGTM! Utility import updated.

The import of the utility function has been properly updated from indexValidatorsLcd to indexValidatorsRest.


16-19: LGTM! Hook imports updated.

The imports of the hooks have been properly updated to use the REST-based versions.


27-28: LGTM! Hook usage updated.

The usage of useValidatorsLcd has been properly updated to useValidatorsRest and the corresponding utility function call has been updated as well.


52-54: LGTM! Hook usages updated.

The usages of useStakingParamsLcd and useDelegationsByAddressLcd have been properly updated to their REST-based counterparts.

src/lib/services/distribution/index.ts (1)

11-14: Properly implemented REST endpoint refactoring.

All LCD-related references have been consistently updated to use REST endpoints. The refactoring includes import statements, function names, query keys, and endpoint references.

Also applies to: 16-37, 39-63

src/lib/services/evm/index.ts (1)

14-18: Clean refactoring from LCD to REST endpoints.

The implementation consistently updates all references from LCD to REST endpoints across imports, endpoint variables, query keys, and function calls while maintaining the same functionality.

Also applies to: 22-35, 46-60, 62-83

src/lib/services/move/module/index.ts (1)

50-50:

❓ Verification inconclusive

REST endpoint implementation is complete with minor inconsistencies.

While most of the refactoring from LCD to REST is properly implemented, there are a couple of query keys that don't follow the new naming convention:

  1. Line 95: CELATONE_QUERY_KEYS.MODULES_BY_ADDRESS doesn't include a _REST suffix
  2. Line 216: CELATONE_QUERY_KEYS.SCRIPT_DECODE doesn't include a _REST suffix

These might be intentional if these query keys were already neutral (not specifically LCD), but it's worth checking for consistency.

Also applies to: 52-77, 79-109, 111-149, 151-188, 190-220


🏁 Script executed:

#!/bin/bash
# Check if these are actually different from other keys in the codebase
rg --type=typescript "CELATONE_QUERY_KEYS\.\w+_REST" -l | head -5
rg --type=typescript "CELATONE_QUERY_KEYS\.MODULES_BY_ADDRESS" -A 2 -B 2
rg --type=typescript "CELATONE_QUERY_KEYS\.SCRIPT_DECODE" -A 2 -B 2

Length of output: 317


Naming Verification: Please review REST query key conventions

The REST endpoint implementation appears complete, but there are minor inconsistencies that warrant a closer look:

  • Line 95: CELATONE_QUERY_KEYS.MODULES_BY_ADDRESS is missing the _REST suffix.
  • Line 216: CELATONE_QUERY_KEYS.SCRIPT_DECODE is also missing the _REST suffix.

If these keys were intentionally defined as neutral (i.e., not specifically tied to LCD), please ensure that this design decision is consistently applied across similar parts of the codebase (e.g., lines 52–77, 79–109, 111–149, 151–188, 190–220). Otherwise, consider renaming these keys to include _REST for full consistency with the new naming convention.

src/lib/services/name/index.ts (1)

1-86: Successfully updated ICNS name service to use REST endpoints.

All references to LCD have been properly changed to REST throughout the file, including import statements, function names, endpoint references, query keys, and function calls.

src/lib/services/block/index.ts (14)

20-20: Consistent import of REST-based methods.

The new import for getBlockDataRest and getLatestBlockRest aligns with the REST transition and appears correct.


54-54: New hook for REST-based block queries.

This hook follows established query patterns and properly enables/disables fetching. Great job ensuring consistent naming with the existing codebase.


56-56: Naming alignment confirmed.

Renaming from lcdEndpoint to restEndpoint is clear and consistent across the file.


65-65: Query key updated for REST.

This query key name is in line with the rest-based approach. No issues here.


68-68: Asynchronous call uses REST endpoint.

Ensure you’re appropriately handling potential exceptions within getBlockDataRest (e.g., network failures).


92-92: Introduction of useLatestBlockRest.

Naming is clear and consistent with the newly adopted REST paradigm.


94-94: Chain config destructuring for REST.

Well done switching from lcdEndpoint to restEndpoint in line with the rename initiative.


98-99: Latest block query key and fetch function updated.

This properly references the new REST query key and getLatestBlockRest.


110-110: REST endpoint usage in useBlocksSequencer.

Renaming suggests a seamless transition from LCD to REST. No concerns found.


114-115: Infinite query for blocks with REST.

Implementation looks consistent with other infinite queries in the file. No issues spotted.


130-130: useBlockTimeAverageSequencer config updated.

The rest endpoint references are properly updated here. No further feedback.


134-135: REST-based block time average query.

Query key and fetch method are correctly switched to REST nomenclature.


145-145: Renamed chain config for sequencer.

No functional issues; consistent usage of restEndpoint.


149-150: Block data sequencer with REST.

Properly updated query key and fetch call. Implementation is coherent with the rest of the changes.

src/lib/services/tx/rest.ts (4)

4-6: Zod schemas updated for REST responses.

Renaming the response schemas to REST clarifies their new purpose. No issues here.


11-14: getTxDataRest: Properly returning parsed data.

This function closely mirrors the old LCD-based approach but uses zTxByHashResponseRest. Ensuring robust error handling inside parseWithError is good practice.


16-19: getTxsByHashRest with REST API fetch.

Implementation is aligned with axios usage for other calls. Parsing with a REST-specific schema is correct.


54-85: getTxsByAccountAddressRest: REST-based fallback logic.

Mirrors the same strategy used for contract addresses. The code is consistent with the naming changes and has clear error messages if neither call succeeds.

src/lib/services/tx/index.ts (13)

60-63: Importing newly introduced REST functions.

These imports properly phase out the old LCD references. No issues found.


79-80: Destructuring restEndpoint for useTxData.

Switching to restEndpoint ensures consistent usage of REST-based data fetching when isFullTier is false.


84-84: Fallback to REST endpoint.

This fallback, deciding between apiEndpoint and restEndpoint, matches the logic used throughout the codebase.


92-92: getTxDataRest usage within the query function.

Correctly references the newly imported function and passes in endpoint, hash. Ensure retry or error capturing if the REST call fails.


324-349: useTxsByContractAddressRest Hook.

  1. The naming and returned shape match the REST approach.
  2. The callback transforms transaction sender addresses, preserving existing logic.
  3. Query keys are updated to their REST-based equivalents.
    Looks good overall.

355-355: Query key for contract address REST.

This further cements the naming convention from LCD to REST. No concerns.


365-415: useTxsByAddressRest Hook.

This hook:

  • Differentiates between searching by tx hash vs. regular address queries.
  • Throws explicit errors if the search or address does not match.
  • Correctly calls getTxsByHashRest or getTxsByAccountAddressRest as needed.
    All logic is consistent with the old LCD approach.

419-420: REST query key for address-based transactions.

Proper usage of CELATONE_QUERY_KEYS.TXS_BY_ADDRESS_REST and the new restEndpoint.


433-445: useTxsSequencer with REST.

Successfully updated endpoint references and query key. No issues spotted.


472-478: useTxsCountSequencer: adopting REST references.

Implementation stays consistent with other fetch patterns (no window focus refetch, single retry). Looks good.


507-545: useTxsByAddressSequencer: fallback to REST endpoint.

This leverages the new getTxsByHashSequencer and getTxsByAccountAddressSequencer with REST-based configuration. The approach is consistent with the code’s logic for searching by hash vs. address.


587-608: useTxsByAddressPaginationSequencer: adjusting to restEndpoint.

Pagination logic remains identical; you just replaced LCD references with REST references.


621-635: useTxsByBlockHeightSequencer: referencing REST.

Switching calls to getTxsByBlockHeightSequencer(restEndpoint, height) is aligned with the transition. No new concerns.

src/lib/services/account/index.ts (9)

6-6: Replacing LCD-specific response type with REST.

This rename improves clarity and matches the new endpoint strategy.


22-25: Importing REST-based account utilities.

These function imports fully replace the old LCD references, aligning with the naming convention changes throughout the codebase.


33-34: Chain config referencing restEndpoint.

Maintains consistent naming across the application. No issues.


35-36: Determining the endpoint for useAccountData.

Switching to restEndpoint if isFullTier is false ensures backward compatibility for full-tier usage.


42-42: Falling back to getAccountDataRest.

Explicitly calling the REST version is correct when isFullTier is not enabled.


78-79: Using restEndpoint in useAccountType.

Correctly references the REST-based endpoint while preserving logic for full-tier calls.


89-90: Calling getAccountTypeRest for non-full-tier flows.

Maintains consistent usage of the newly imported function. Nicely done.


93-94: Query key updated for account type with REST.

Use of [CELATONE_QUERY_KEYS.ACCOUNT_TYPE, apiEndpoint, restEndpoint, address] is consistent with the codebase’s renamed keys.


103-114: useAccountBech32 with REST.

Drawing on the new getAccountBech32Rest aligns with the refactor. The error handling and query config mirror the typical React Query pattern.

src/lib/services/proposal/index.ts (1)

7-9: Consistent renaming from "lcd" to "rest"

The changes correctly implement the transition from LCD (Light Client Daemon) to REST naming conventions while maintaining the same functionality.

Also applies to: 47-52, 58-59, 63-63, 117-126, 198-206, 214-222, 234-239

src/lib/services/searchService.ts (2)

26-40: Properly updated import statements from LCD to REST

All import statements have been correctly updated to use the new REST-based function names.


134-144: Correctly refactored function calls to use REST variants

All function calls and variable names have been properly updated to maintain consistency with the new REST naming convention.

Also applies to: 156-157, 185-193, 201-206, 246-252, 263-277, 287-293

src/lib/services/staking/index.ts (1)

13-17: Successfully migrated staking service to use REST endpoints

All imports, function names, query keys, and endpoint variables have been consistently renamed from LCD to REST while preserving functionality.

Also applies to: 19-33, 35-52, 54-71, 73-90

src/lib/services/staking/rest.ts (1)

4-11: Complete transition of schema names and function signatures to REST convention

All schema validators and function implementations have been correctly renamed from LCD to REST while maintaining the same behavior and endpoint access patterns.

Also applies to: 17-22, 24-34, 36-54, 56-74, 76-79, 81-90, 92-97, 99-107

src/lib/services/proposal/rest.ts (7)

4-6: Type imports correctly updated to reflect the REST API naming convention.

The types have been consistently renamed from *ResponseLcd to *ResponseRest, maintaining the same structure while adapting to the new naming convention.


8-13: Schema imports properly updated to REST nomenclature.

All Zod schema imports have been consistently updated from z*ResponseLcd to z*ResponseRest, ensuring type validation remains intact while following the new naming convention.


24-29: Function renamed correctly with consistent implementation.

The function has been renamed from getProposalParamsLcd to getProposalParamsRest while maintaining the same functionality. The response parsing has been updated to use the renamed schema.


31-47: Function and return type properly updated to REST naming convention.

The function has been renamed from getProposalsLcd to getProposalsRest with its return type updated to ProposalsResponseRest. The implementation remains consistent with the original functionality.


49-57: Proposal data function and return type correctly renamed.

The function signature, return type, and schema usage have all been properly updated to use the new REST naming convention while preserving functionality.


59-81: Deposit function updated with consistent naming.

The function getProposalDepositsRest (formerly getProposalDepositsLcd) has been appropriately renamed, and the schema usage within has been updated to zProposalDepositsResponseRest.


83-97: Votes info function and schema usage properly renamed.

The function and schema parsing have been consistently updated to use the REST naming pattern, maintaining the same behavior as before.

src/lib/app-provider/env.ts (13)

17-17: Query key renamed from LCD to REST.

The constant has been appropriately renamed from ACCOUNT_BECH_32_LCD to ACCOUNT_BECH_32_REST as part of the broader naming convention change.


23-23: Block data query key renamed to follow REST convention.

Constant has been updated from BLOCK_DATA_LCD to BLOCK_DATA_REST.


26-26: Block height query key renamed to REST.

The block height query key has been properly updated to use the REST naming pattern.


31-31: Code-related query keys updated to REST convention.

Both CODES_REST and CODE_DATA_REST have been consistently renamed from their LCD counterparts.

Also applies to: 36-36


41-42: Contract-related query keys updated to REST convention.

All contract-related query keys have been consistently renamed to use REST nomenclature. Additionally, line 53 includes a new constant CONTRACT_CW2_INFO_REST that follows the new naming pattern.

Also applies to: 44-44, 47-47, 52-53


55-60: Staking-related query keys updated to follow REST naming.

All staking-related query keys have been properly renamed to use the REST suffix, maintaining consistency across the codebase.


64-66: Validator query keys renamed to REST convention.

Validator-related query keys have been consistently updated to follow the REST naming pattern.


80-82: Governance-related query keys updated to REST convention.

All proposal and governance-related query keys have been properly renamed to follow the REST naming pattern.

Also applies to: 89-89, 92-92


106-106: Transaction query keys updated to REST convention.

Transaction-related query keys have been consistently renamed to follow the REST naming pattern.

Also applies to: 109-109


115-116: ICNS-related query keys renamed to follow REST convention.

ICNS name and address query keys have been properly updated to use the REST suffix.


131-131: Module query key updated to REST convention.

The module-related query key has been consistently renamed to follow the REST naming pattern.


141-142: EVM-related query keys updated to REST convention.

EVM parameters and code-related query keys have been consistently renamed to follow the REST naming pattern.


161-161: NFT query key renamed to follow REST convention.

The NFT-related query key has been properly updated to use the REST suffix.

@Poafs1 Poafs1 force-pushed the feature/lcd-to-rest branch from efe5d49 to e1035f2 Compare February 26, 2025 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant