Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
493d0a0
chore: Bump lodash and drizzle-orm to patched versions.
brunomenezes Sep 22, 2026
8caa264
chore: Remove obsolete dependencies and replace npm-run-all.
brunomenezes Sep 22, 2026
9046eb6
chore: Bump dependencies to latest patch and minor versions.
brunomenezes Sep 22, 2026
69bc9cd
chore: Bump Apollo, recharts, react-hook-form and libsql.
brunomenezes Sep 22, 2026
8546631
chore: Bump Chakra UI to 3.37.
brunomenezes Sep 22, 2026
409f41e
chore: Bump prettier to v3.
brunomenezes Sep 22, 2026
620702c
style: Reformat codebase with prettier 3.
brunomenezes Sep 22, 2026
303a8dd
chore: Bump ESLint to v10.
brunomenezes Sep 22, 2026
a7fcaaa
refactor: Replace the eslintrc compatibility layer with native flat c…
brunomenezes Sep 22, 2026
e38bd9a
chore: Bump TypeScript to v6.
brunomenezes Sep 22, 2026
e2a7bcf
chore: Bump Storybook to v10, Vite to v8 and the Chromatic toolchain.
brunomenezes Sep 22, 2026
ae671a6
refactor: Migrate story imports to the framework package and lint sto…
brunomenezes Sep 22, 2026
7f3b519
chore: Bump jotai to v3.
brunomenezes Sep 22, 2026
6f78e32
chore: Bump framer-motion to v13.
brunomenezes Sep 22, 2026
603f6b8
chore: Bump @testing-library/jest-dom and dotenv-cli to their new maj…
brunomenezes Sep 22, 2026
a5ea16f
chore: Bump graphql to v17.
brunomenezes Sep 23, 2026
ea86891
chore: Bump Babel to v8.
brunomenezes Sep 23, 2026
58cc1e3
chore: Bump react-ga4 to v3.
brunomenezes Sep 23, 2026
a517d28
doc(explorer): Add changelog entry.
brunomenezes Sep 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/2-feature.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ If there are multiple, what are the benefits and drawbacks of each one?

## 📈 Subtasks

- [ ] If there is a solution, what are the subtasks for completing this issue?
- [ ] If there is a solution, what are the subtasks for completing this issue?

## 🎯 Definition of Done

- [ ] If there is a solution, what are the final deliverables?
- [ ] If there is a solution, what are the final deliverables?
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/3-technical-debt.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ If there are multiple, what are the benefits and drawbacks of each one?

## 📈 Subtasks

- [ ] What are the subtasks for completing this issue?
- [ ] What are the subtasks for completing this issue?

## 🎯 Definition of Done

- [ ] What are the final deliverables?
- [ ] What are the final deliverables?
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/4-update-dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Why is that update relevant?

## 📈 Subtasks

- [ ] Update the package.json to the new fixed version ( i.e. no ^ or ~ )
- [ ] If an update requires major work, create the corresponding issue.
- [ ] Make sure dependencies are updated in the lock file (yarn.lock).
- [ ] Verify whether everything is working as expected.
- [ ] Update the package.json to the new fixed version ( i.e. no ^ or ~ )
- [ ] If an update requires major work, create the corresponding issue.
- [ ] Make sure dependencies are updated in the lock file (yarn.lock).
- [ ] Verify whether everything is working as expected.
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/5-documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ labels: 'type:docs'

<!-- (Update "[ ]" to "[x]" to check a box) -->

- [ ] Reporting a typo
- [ ] Reporting a documentation bug
- [ ] Documentation improvement
- [ ] Documentation feedback
- [ ] Reporting a typo
- [ ] Reporting a documentation bug
- [ ] Documentation improvement
- [ ] Documentation feedback

<!--
If your issue is not regarding the documentation, please choose an issue type:
Expand Down
6 changes: 1 addition & 5 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@ import type { StorybookConfig } from '@storybook/nextjs-vite';

const config: StorybookConfig = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-onboarding',
'@chromatic-com/storybook',
],
addons: ['@storybook/addon-links', '@chromatic-com/storybook'],
framework: {
name: '@storybook/nextjs-vite',
options: {},
Expand Down
4 changes: 2 additions & 2 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { MockedProvider } from '@apollo/client/testing/react';
import { ChakraProvider } from '@chakra-ui/react';
import type { Preview, StoryFn } from '@storybook/react';
import { StoryContext } from '@storybook/react';
import type { Preview, StoryFn } from '@storybook/nextjs-vite';
import { StoryContext } from '@storybook/nextjs-vite';
import { RouterContext } from 'next/dist/shared/lib/router-context.shared-runtime';
import { FC } from 'react';
import { Fonts } from '../src/components/Fonts';
Expand Down
425 changes: 216 additions & 209 deletions CHANGELOG.md

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,22 @@ appearance, race, religion, or sexual identity and orientation.
Examples of behavior that contributes to creating a positive environment
include:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting
- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ We use the same guidelines for contributing code to any of our repositories, any

Please note the below! We appreciate everyone following the guidelines.

- No --force pushes or modifying the Git history in any way;
- Use non-main branches, using a short meaningful description, with words separated by a dash (e.g. 'fix/this-bug');
- Abide by the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/);
- All modifications must be made in a pull-request to solicit feedback from other contributors.
- No --force pushes or modifying the Git history in any way;
- Use non-main branches, using a short meaningful description, with words separated by a dash (e.g. 'fix/this-bug');
- Abide by the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/);
- All modifications must be made in a pull-request to solicit feedback from other contributors.

## Get in Touch

Expand Down
60 changes: 30 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@

This web application shows several informations about Cartesi Proof of Stake:

- node public address
- node balance
- current node owner
- action to claim a node through metamask
- action to release a node from the current owner
- node public address
- node balance
- current node owner
- action to claim a node through metamask
- action to release a node from the current owner

## Toolchain

This project pins its toolchain, and CI uses the same versions:

- **Node.js 24.21.0** (Active LTS)
- **pnpm 11.27.1**, declared in `packageManager`
- **Node.js 24.21.0** (Active LTS)
- **pnpm 11.27.1**, declared in `packageManager`

pnpm is activated through Corepack, which ships with Node.js 24:

Expand All @@ -36,17 +36,17 @@ $ pnpm install --frozen-lockfile

The following supply-chain protections are enabled:

- `allowBuilds` — dependency install scripts are **denied unless explicitly
listed**. When a new dependency needs to run a build script, pnpm reports it
and the package has to be added here deliberately.
- `strictDepBuilds: true` — the install fails rather than silently skipping a
dependency whose build script has not been reviewed.
- `blockExoticSubdeps: true` — transitive dependencies may not be pulled from
git repositories or tarball URLs, only from the registry.
- `minimumReleaseAge: 10080` — a newly published version must be at least
7 days old before it can be resolved, which blunts hijacked-release attacks.
- `trustPolicy: no-downgrade` — a package whose trust level drops relative to
its previous releases fails the install.
- `allowBuilds` — dependency install scripts are **denied unless explicitly
listed**. When a new dependency needs to run a build script, pnpm reports it
and the package has to be added here deliberately.
- `strictDepBuilds: true` — the install fails rather than silently skipping a
dependency whose build script has not been reviewed.
- `blockExoticSubdeps: true` — transitive dependencies may not be pulled from
git repositories or tarball URLs, only from the registry.
- `minimumReleaseAge: 10080` — a newly published version must be at least
7 days old before it can be resolved, which blunts hijacked-release attacks.
- `trustPolicy: no-downgrade` — a package whose trust level drops relative to
its previous releases fails the install.

`overrides` is used to pin transitive dependencies away from vulnerable or
non-registry sources.
Expand All @@ -73,21 +73,21 @@ $ yarn start --export ../explorer/src/services/contracts/localhost.json
This will run a local hardhat node running at http://127.0.0.1:8545/ and deploy all smart contracts.
Among the contracts are:

- CartesiToken: the CTSI token contract. Minter is the first account, and holds 1B tokens initially.
- StakingImpl: the staking contract.
- WorkerManagerAuthManagerImpl: used to hire worker nodes.
- PoS: proof of stake smart contract, holds the chains. Starts with no chain created.
- StakingPoolFactoryImpl: factory of new staking pools.
- CartesiToken: the CTSI token contract. Minter is the first account, and holds 1B tokens initially.
- StakingImpl: the staking contract.
- WorkerManagerAuthManagerImpl: used to hire worker nodes.
- PoS: proof of stake smart contract, holds the chains. Starts with no chain created.
- StakingPoolFactoryImpl: factory of new staking pools.

### Running a local graph node

The application uses a subgraph powered by thegraph to consolidate blockchain information and serve using a GraphQL endpoint.

- Clone the graph node from [GitHub](git@github.com:graphprotocol/graph-node.git).
- Copy the file `docker/docker-compose.yml` to `docker/docker-compose-localhost.yml`
- Modify line [20](https://github.com/graphprotocol/graph-node/blob/9e2e5e6a15406c312b686cb1d00b198ac7e45445/docker/docker-compose.yml#L20) to `ethereum: 'localhost:http://host.docker.internal:8545/'`
- Modify line [27](https://github.com/graphprotocol/graph-node/blob/9e2e5e6a15406c312b686cb1d00b198ac7e45445/docker/docker-compose.yml#L27) to `./data_localhost/ipfs:/data/ipfs`
- Modify line [38](https://github.com/graphprotocol/graph-node/blob/9e2e5e6a15406c312b686cb1d00b198ac7e45445/docker/docker-compose.yml#L38) to `./data_localhost/postgres:/var/lib/postgresql/data`
- Clone the graph node from [GitHub](git@github.com:graphprotocol/graph-node.git).
- Copy the file `docker/docker-compose.yml` to `docker/docker-compose-localhost.yml`
- Modify line [20](https://github.com/graphprotocol/graph-node/blob/9e2e5e6a15406c312b686cb1d00b198ac7e45445/docker/docker-compose.yml#L20) to `ethereum: 'localhost:http://host.docker.internal:8545/'`
- Modify line [27](https://github.com/graphprotocol/graph-node/blob/9e2e5e6a15406c312b686cb1d00b198ac7e45445/docker/docker-compose.yml#L27) to `./data_localhost/ipfs:/data/ipfs`
- Modify line [38](https://github.com/graphprotocol/graph-node/blob/9e2e5e6a15406c312b686cb1d00b198ac7e45445/docker/docker-compose.yml#L38) to `./data_localhost/postgres:/var/lib/postgresql/data`

Then run:

Expand Down Expand Up @@ -118,7 +118,7 @@ The next step is to create an account on [Infura](https://infura.io/) or any oth

On your `.env.development.local` set the following var:

- NEXT_PUBLIC_RPC_URL_1=your_mainnet_node_rpc_endpoint_goes_here
- NEXT_PUBLIC_RPC_URL_1=your_mainnet_node_rpc_endpoint_goes_here

> We support ethereum Mainnet(1), Sepolia(11155111) and Devnet (31337),

Expand Down Expand Up @@ -151,4 +151,4 @@ The project use **tags** that represent releases, including a branch to signal c

That is as follows:

- Combined tag name `v` + SemVer format **tag** (e.g. v3.4.0) to pinpoint repository state on a given production release.
- Combined tag name `v` + SemVer format **tag** (e.g. v3.4.0) to pinpoint repository state on a given production release.
4 changes: 2 additions & 2 deletions __tests__/components/AddressText.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ describe('AddressText component', () => {
});

expect(() => screen.getByTestId('address')).toThrow(
'Unable to find an element'
'Unable to find an element',
);
});

Expand All @@ -94,7 +94,7 @@ describe('AddressText component', () => {
renderComponent();

expect(() => screen.getByTestId('address-text-icon')).toThrow(
'Unable to find an element'
'Unable to find an element',
);
});
});
4 changes: 2 additions & 2 deletions __tests__/components/Banner.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('Banner component', () => {
render(
<Component {...defaultProps} {...props}>
Content
</Component>
</Component>,
);

it('should display icon', () => {
Expand All @@ -38,7 +38,7 @@ describe('Banner component', () => {
renderComponent();

expect(() => screen.getByTestId('banner-icon')).toThrow(
'Unable to find an element'
'Unable to find an element',
);
});
});
8 changes: 4 additions & 4 deletions __tests__/components/BigNumberText.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe('BigNumberText component', () => {
});

expect(
screen.getByTestId('big-number-text-unit-label')
screen.getByTestId('big-number-text-unit-label'),
).toBeInTheDocument();
});

Expand All @@ -41,7 +41,7 @@ describe('BigNumberText component', () => {
});

expect(() => screen.getByTestId('big-number-text-unit-label')).toThrow(
'Unable to find an element by: [data-testid="big-number-text-unit-label"]'
'Unable to find an element by: [data-testid="big-number-text-unit-label"]',
);
});

Expand All @@ -56,7 +56,7 @@ describe('BigNumberText component', () => {
});

expect(
screen.getByText(`${timeLabel} ${timeLeft}`)
screen.getByText(`${timeLabel} ${timeLeft}`),
).toBeInTheDocument();
});

Expand All @@ -66,7 +66,7 @@ describe('BigNumberText component', () => {
renderComponent();

expect(() => screen.getByText(`${timeLabel} ${timeLeft}`)).toThrow(
'Unable to find an element'
'Unable to find an element',
);
});
});
4 changes: 2 additions & 2 deletions __tests__/components/CTSIText.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('CTSI Text component', () => {
options={{ maximumFractionDigits: 2 }}
>
<Text>Wallet Balance</Text>
</Component>
</Component>,
);

expect(screen.getByText('Wallet Balance')).toBeInTheDocument();
Expand All @@ -47,7 +47,7 @@ describe('CTSI Text component', () => {
icon={<Icon as={TbIcons} />}
>
<Text>Staked Balance</Text>
</Component>
</Component>,
);
expect(container.querySelector('svg > path')).toBeInTheDocument();
expect(screen.getByText('Staked Balance')).toBeInTheDocument();
Expand Down
4 changes: 2 additions & 2 deletions __tests__/components/Card.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('Card component', () => {
title="Create a private node"
subtitle="Run your own node"
buttonText="CREATE NODE"
/>
/>,
);

expect(screen.getByText('Create a private node')).toBeInTheDocument();
Expand All @@ -43,7 +43,7 @@ describe('Card component', () => {
expect(screen.getByText('Hello')).toBeInTheDocument();
expect(screen.queryByTestId('card-subtitle')).not.toBeInTheDocument();
expect(
screen.queryByTestId('card-action-button')
screen.queryByTestId('card-action-button'),
).not.toBeInTheDocument();
});

Expand Down
2 changes: 1 addition & 1 deletion __tests__/components/Footer.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ describe('Footer component', () => {
it('should display Cartesi twitter link', () => {
const { container } = render(<Component {...defaultProps} />);
const twitterLink = container.querySelector(
`a[href="https://twitter.com/cartesiproject"]`
`a[href="https://twitter.com/cartesiproject"]`,
);
const isLinkInDom =
typeof twitterLink === 'object' && twitterLink !== null;
Expand Down
2 changes: 1 addition & 1 deletion __tests__/components/MarketInfo.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe('MarketInfo component', () => {
it('should not display unit when value is zero', () => {
render(<Component {...props} value={0} />);
expect(() => screen.getByText(props.unit)).toThrow(
'Unable to find an element'
'Unable to find an element',
);
});
});
6 changes: 3 additions & 3 deletions __tests__/components/Notification.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ describe('Notification component', () => {
<ENotification
title="Title message"
subtitle="That is a subtitle message"
/>
/>,
);

expect(screen.getByText('Title message')).toBeInTheDocument();
expect(
screen.getByText('That is a subtitle message')
screen.getByText('That is a subtitle message'),
).toBeInTheDocument();
});

Expand All @@ -61,7 +61,7 @@ describe('Notification component', () => {
render(
<ENotification title="Wallet is disconnected">
<DummyComp />
</ENotification>
</ENotification>,
);

expect(screen.getByText('Wallet is disconnected')).toBeInTheDocument();
Expand Down
6 changes: 3 additions & 3 deletions __tests__/components/OrderedContent.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ describe('OrderedContent component', () => {
];

const { container } = render(
<Component title={title} orderedItems={activities} />
<Component title={title} orderedItems={activities} />,
);

expect(container.querySelector('ol')).toBeInTheDocument();

expect(screen.getByText('Proposed activities')).toBeInTheDocument();
expect(
screen.getByText('Research about the technology X')
screen.getByText('Research about the technology X'),
).toBeInTheDocument();
expect(
screen.getByText('Apply hotfix for feature B')
screen.getByText('Apply hotfix for feature B'),
).toBeInTheDocument();
});
});
Loading
Loading