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: improve how ENS information is provided #175

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [3.9.0] - 2024-12-20

- Improve how the ENS address information is provided if available through the UI. The new approach considerably improves efficiency in terms of on-chain reads.

## [3.8.6] - 2024-12-05

- Fix a UI bug in the block's page search box. The text is now more visible when using light mode.
Expand Down Expand Up @@ -392,7 +396,8 @@ Staking Pools

- First release

[unreleased]: https://github.com/cartesi/explorer/compare/v3.8.6...HEAD
[unreleased]: https://github.com/cartesi/explorer/compare/v3.9.0...HEAD
[3.9.0]: https://github.com/cartesi/explorer/compare/v3.9.0...v3.8.6
[3.8.6]: https://github.com/cartesi/explorer/compare/v3.8.6...v3.8.5
[3.8.5]: https://github.com/cartesi/explorer/compare/v3.8.5...v3.8.4
[3.8.4]: https://github.com/cartesi/explorer/compare/v3.8.4...v3.8.3
Expand Down
11 changes: 10 additions & 1 deletion apps/staking/.env.development
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,13 @@ NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=YOUR_WALLETCONNECT_PROJECT_ID
NEXT_PUBLIC_MAINNET_GRAPHQL_URL=YOUR_MAINNET_SUBGRAPH_GRAPHQL_ENDPOINT
NEXT_PUBLIC_SEPOLIA_GRAPHQL_URL=YOUR_SEPOLIA_SUBGRAPH_GRAPHQL_ENDPOINT
# SERVER SIDE
ENS_GRAPHQL_URL=YOUR_SUBGRAPH_ENS_GRAPHQL_ENDPOINT
ENS_GRAPHQL_URL=YOUR_SUBGRAPH_ENS_GRAPHQL_ENDPOINT
# A ethereum mainnet RPC-NODE. Below is a free endpoint (rate-limiting may cause troubles)
HTTP_MAINNET_NODE_RPC=https://cloudflare-eth.com
# Time in seconds to define when a ENS entry is stale.
ENS_ENTRY_TTL=86400
# The Auth token is only necessary in case you're using a paid service e.g Turso
# TURSO_AUTH_TOKEN=YOUR_TOKEN_HERE_IF_NECESSARY
TURSO_DATABASE_URL="file:local.db"
# For calling the /api/cron/ens-update-ens endpoint
CRON_SECRET="dummy-secret"
5 changes: 5 additions & 0 deletions apps/staking/.env.production
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,8 @@ NEXT_PUBLIC_MAINNET_GRAPHQL_URL=YOUR_MAINNET_SUBGRAPH_GRAPHQL_ENDPOINT
NEXT_PUBLIC_SEPOLIA_GRAPHQL_URL=YOUR_SEPOLIA_SUBGRAPH_GRAPHQL_ENDPOINT
# SERVER SIDE
ENS_GRAPHQL_URL=YOUR_SUBGRAPH_ENS_GRAPHQL_ENDPOINT
HTTP_MAINNET_NODE_RPC=YOUR_PAID_MAINNET_RPC_NODE
ENS_ENTRY_TTL=DEFINE_TIME_IN_SECONDS
TURSO_DATABASE_URL=YOUR_TURSO_OR_OTHER_LIBSQL_ENDPOINT_SERVICE
TURSO_AUTH_TOKEN=YOUR_LIBSQL_SERVICE_AUTH_TOKEN
CRON_SECRET=A_STRONG_SECRET_FOR_CALLING_PROTECTED_CRON_APIS
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
// PARTICULAR PURPOSE. See the GNU General Public License for more details.

import { ENSEntry, useENS } from '@explorer/services';
import { UseWallet } from '@explorer/wallet/src/useWallet';
import {
act,
findByText,
fireEvent,
getByRole,
Expand All @@ -24,10 +24,10 @@ import {
} from '@testing-library/react';
import { useFlag } from '@unleash/proxy-client-react';
import { NextRouter } from 'next/router';
import { act } from 'react';
import { NodeRunnersContainer } from '../../../src/containers/node-runners/NodeRunnerContainer';
import { useUserNodes } from '../../../src/graphql/hooks/useNodes';
import useStakingPools from '../../../src/graphql/hooks/useStakingPools';
import { ENSEntry, useENS } from '../../../src/services/ens';
import { useCartesiToken } from '../../../src/services/token';
import { useMessages } from '../../../src/utils/messages';
import { withChakraTheme } from '../../test-utilities';
Expand All @@ -40,7 +40,7 @@ import {
} from '../mocks';

const useNodesMod = '../../../src/graphql/hooks/useNodes';
const useENSMod = '../../../src/services/ens';
const useENSMod = '@explorer/services';

jest.mock('../../../src/services/token', () => {
return {
Expand Down
146 changes: 0 additions & 146 deletions apps/staking/__tests__/services/ens.test.ts

This file was deleted.

Loading
Loading