Skip to content

Commit 511106b

Browse files
committed
Merge branch 'main' into matt-user/fix-script-highlighting
2 parents 626c12c + bf69d6c commit 511106b

File tree

595 files changed

+24425
-6455
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

595 files changed

+24425
-6455
lines changed

.eslintignore

+25-19
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,31 @@
1-
.changeset
2-
.eslintrc.js
3-
.lintstagedrc.js
4-
node_modules
5-
**/node_modules/**
1+
**/**/.*
2+
**/build/**
63
**/coverage/
7-
dist
84
**/dist/**
9-
build
10-
**/build/**
11-
CHANGELOG.md
12-
*.typegen.ts
13-
*.html
14-
.next/*
15-
generated
5+
**/fuel-v2-contracts
166
**/generated/**
17-
storybook
7+
**/node_modules/**
8+
**/public/storybook/**
9+
**/public/ui/**
10+
**/storybook-static
11+
**/storybook-static/**
1812
**/storybook/**
13+
*.html
14+
*.typegen.ts
15+
.changeset
16+
.eslintrc.js
17+
.lintstagedrc.js
18+
.next/*
1919
.turbo
20+
CHANGELOG.md
21+
build
22+
dist
23+
generated
24+
generated
25+
node_modules
26+
packages/app-portal/public/**
27+
packages/app-portal/src/types
2028
pnpm-lock.yaml
21-
**/**/.*
22-
.*/
23-
packages/app/public/**
24-
contracts/predicate/vitest.config.ts
25-
./tailwind.config.ts
29+
scripts/bridge/fuel-bridge
30+
**/**/tsconfig.json
31+
**.js

.eslintrc.js

+2-10
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
1-
const { resolve } = require('path');
2-
const { dependencies } = require('./packages/app/package.json');
3-
4-
const project = [
5-
resolve(__dirname, './tsconfig.json'),
6-
resolve(__dirname, './packages/**/tsconfig.json'),
7-
resolve(__dirname, './contracts/**/tsconfig.json'),
8-
];
1+
const { dependencies } = require('./packages/app-explorer/package.json');
92

103
module.exports = {
114
root: true,
@@ -16,7 +9,6 @@ module.exports = {
169
],
1710
parserOptions: {
1811
tsconfigRootDir: __dirname,
19-
project,
2012
},
2113
settings: {
2214
react: {
@@ -29,7 +21,6 @@ module.exports = {
2921
},
3022
[require.resolve('eslint-import-resolver-typescript')]: {
3123
alwaysTryTypes: true,
32-
project,
3324
},
3425
},
3526
},
@@ -40,6 +31,7 @@ module.exports = {
4031
{ prefer: 'type-imports', fixStyle: 'separate-type-imports' },
4132
],
4233
'import/consistent-type-specifier-style': ['error', 'prefer-top-level'],
34+
'import/namespace': 'off',
4335
'import/order': [
4436
'error',
4537
{

.lintstagedrc.mjs

+1-10
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,4 @@
1-
import { getTsconfig } from 'get-tsconfig';
2-
import { relative } from 'node:path';
3-
41
export default {
52
'**/*.(js|jsx|ts|jsx|md|mdx|json|html|css)': ['prettier --write'],
6-
'**/*.ts?(x)': (files) => {
7-
const commands = files.flatMap((file) => {
8-
const tsConfig = relative(process.cwd(), getTsconfig(file).path);
9-
return [`tsc -p ${tsConfig} --noEmit`, `eslint .`];
10-
});
11-
return Array.from(new Set(commands));
12-
},
3+
'**/*.ts?(x)': ['eslint'],
134
};

.npmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
node-version=18.19.0
1+
node-version=20.11.0
22

33
# Not always possible to be strict, but if it works for you, keep it to true.
44
# https://pnpm.io/next/npmrc#strict-peer-dependencies

.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
18.19.0
1+
20.11.0

.prettierignore

+19-19
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
.changeset
2-
**/node_modules/
1+
**/**/.*
2+
**/build/**
33
**/coverage/
4-
dist
54
**/dist/**
6-
build
7-
**/build/**
8-
CHANGELOG.md
9-
*.typegen.ts
10-
*.html
11-
.next/*
12-
generated
5+
**/fuel-v2-contracts
136
**/generated/**
14-
storybook
15-
**/storybook/**
16-
storybook-static
17-
**/storybook-static/**
18-
**/public/ui/**
7+
**/node_modules/**
198
**/public/storybook/**
9+
**/public/ui/**
10+
**/storybook-static
11+
**/storybook-static/**
12+
**/storybook/**
13+
*.typegen.ts
14+
.next/*
2015
.turbo
21-
pnpm-lock.yaml
22-
.next
23-
graphql.schema.json
16+
CHANGELOG.md
17+
build
18+
dist
19+
generated
2420
helm
25-
packages/graphql/src/schemas/*.graphql
21+
node_modules
22+
packages/app-portal/public/**
23+
packages/app-portal/src/types
24+
pnpm-lock.yaml
25+
scripts/bridge/fuel-bridge

.prettierrc

-1
This file was deleted.

.prettierrc.js

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
const fuelPrettierConfig = require('@fuels/prettier-config');
2+
3+
/** @type {import("prettier").Config} */
4+
module.exports = {
5+
...fuelPrettierConfig,
6+
// trailingComma always adds comma on the end of functions params, that can cause
7+
// issues, when a second param can't be undefined.
8+
trailingComma: 'es5',
9+
overrides: [
10+
{
11+
files: '*.json',
12+
options: {
13+
trailingComma: 'none',
14+
},
15+
},
16+
],
17+
};

.vscode/settings.json

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"editor.codeActionsOnSave": {
55
"source.fixAll.eslint": "explicit"
66
},
7-
"rust-analyzer.linkedProjects": ["./packages/indexer/Cargo.toml"],
87
"editor.quickSuggestions": {
98
"strings": "on"
109
},

README.md

+34-14
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,40 @@
33

44
## 📗 Table of contents
55

6-
- [Getting Started](./docs/GETTING_STARTED.md)
7-
- [Requirements](./docs/GETTING_STARTED.md#requirements)
8-
- [Running Project Locally](./docs/GETTING_STARTED.md#running-project-locally)
9-
- [📚 - Getting the Repository](./docs/GETTING_STARTED.md#---getting-the-repository)
10-
- [📦 - Install Dependencies](./docs/GETTING_STARTED.md#---install-dependencies)
11-
- [📒 - Run Local Node](./docs/GETTING_STARTED.md#---run-local-node)
12-
- [💻 - Run Web App](./docs/GETTING_STARTED.md#---run-web-app)
13-
- [📗 Project Overview](./docs/GETTING_STARTED.md#-project-overview)
14-
- [🧰 Useful Scripts](./docs/GETTING_STARTED.md#-useful-scripts)
15-
- [Running Tests](./docs/GETTING_STARTED.md#run-tests)
16-
- [Run Tests in Development Mode](./docs/GETTING_STARTED.md#run-tests)
17-
- [Contribution Guide](./docs/CONTRIBUTING.md)
18-
- [Finding Something to Work On](./docs/CONTRIBUTING.md#finding-something-to-work-on)
19-
- [Contribution Flow](./docs/CONTRIBUTING.md#contribution-flow)
6+
### Explorer
7+
8+
- [Getting Started](./docs/explorer/GETTING_STARTED.md)
9+
- [Requirements](./docs/explorer/GETTING_STARTED.md#requirements)
10+
- [Running Project Locally](./docs/explorer/GETTING_STARTED.md#running-project-locally)
11+
- [📚 - Getting the Repository](./docs/explorer/GETTING_STARTED.md#---getting-the-repository)
12+
- [📦 - Install Dependencies](./docs/explorer/GETTING_STARTED.md#---install-dependencies)
13+
- [📒 - Run Local Node](./docs/explorer/GETTING_STARTED.md#---run-local-node)
14+
- [💻 - Run Web App](./docs/explorer/GETTING_STARTED.md#---run-web-app)
15+
- [📗 Project Overview](./docs/explorer/GETTING_STARTED.md#-project-overview)
16+
- [🧰 Useful Scripts](./docs/explorer/GETTING_STARTED.md#-useful-scripts)
17+
- [Running Tests](./docs/explorer/GETTING_STARTED.md#run-tests)
18+
- [Run Tests in Development Mode](./docs/explorer/GETTING_STARTED.md#run-tests)
19+
- [Contribution Guide](./docs/explorer/CONTRIBUTING.md)
20+
- [Finding Something to Work On](./docs/explorer/CONTRIBUTING.md#finding-something-to-work-on)
21+
- [Contribution Flow](./docs/explorer/CONTRIBUTING.md#contribution-flow)
22+
- [License](#license)
23+
24+
### Portal
25+
26+
- [Getting Started](./docs/portal/GETTING_STARTED.md)
27+
- [Requirements](./docs/portal/GETTING_STARTED.md#requirements)
28+
- [Running Project Locally](./docs/portal/GETTING_STARTED.md#running-project-locally)
29+
- [📚 - Getting the Repository](./docs/portal/GETTING_STARTED.md#---getting-the-repository)
30+
- [📦 - Install Dependencies](./docs/portal/GETTING_STARTED.md#---install-dependencies)
31+
- [📒 - Run Local Node](./docs/portal/GETTING_STARTED.md#---run-local-node)
32+
- [💻 - Run Web App](./docs/portal/GETTING_STARTED.md#---run-web-app)
33+
- [📗 Project Overview](./docs/portal/GETTING_STARTED.md#-project-overview)
34+
- [🧰 Useful Scripts](./docs/portal/GETTING_STARTED.md#-useful-scripts)
35+
- [Running Tests](./docs/portal/GETTING_STARTED.md#run-tests)
36+
- [Run Tests in Development Mode](./docs/portal/GETTING_STARTED.md#run-tests)
37+
- [Contribution Guide](./docs/portal/CONTRIBUTING.md)
38+
- [Finding Something to Work On](./docs/portal/CONTRIBUTING.md#finding-something-to-work-on)
39+
- [Contribution Flow](./docs/portal/CONTRIBUTING.md#contribution-flow)
2040
- [License](#license)
2141

2242
## License

contracts/predicate/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
"author": "",
1313
"license": "ISC",
1414
"devDependencies": {
15-
"dotenv": "16.3.1",
16-
"fuels": "0.71.0",
17-
"vitest": "1.1.3",
15+
"dotenv": "16.4.1",
16+
"fuels": "0.71.1",
17+
"vitest": "1.2.1",
1818
"tsx": "4.7.0"
1919
}
2020
}

contracts/predicate/scripts/run-predicate.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ async function main() {
4343
BaseAssetId,
4444
{
4545
gasPrice,
46-
},
46+
}
4747
);
4848
const res2 = await tx2.waitForResult();
4949
console.log(`→ Transaction Id: ${res2.id}`);

deployment/Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ ENV PATH="$PNPM_HOME:$PATH"
1111
# Enable pnpm using corepack form node.js
1212
RUN corepack enable
1313

14-
COPY . /app
15-
WORKDIR /app
14+
COPY . /app-explorer
15+
WORKDIR /app-explorer
1616

1717
RUN pnpm install --frozen-lockfile
1818

1919
EXPOSE 4444
2020

21-
WORKDIR /app/packages/graphql
21+
WORKDIR /app-explorer/packages/graphql
2222

2323
CMD ["pnpm", "start"]

docker/.env

-2
This file was deleted.

docker/Makefile

+8-10
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
1-
start:
2-
# sh ./scripts/start.sh
3-
# docker compose up
4-
echo "Docker env is temporary disabled on this project";
5-
echo "Run pnpm dev for development";
1+
build:
2+
docker compose --env-file ./envs/ports.env build
63

7-
down:
8-
docker compose down
4+
start:
5+
docker compose --env-file ./envs/ports.env up -d --build
96

10-
restart:
11-
docker compose restart
7+
stop:
8+
docker compose stop
129

1310
clean:
14-
docker compose down --rmi local -v --remove-orphans
11+
docker compose down --rmi local -v
1512

1613
logs:
1714
docker compose logs -f
15+

docker/README.md

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Fuel Development Environment
2+
3+
This project runs a local Fuel development environment with both an L1 node and a Fuel node.
4+
5+
## Requirements
6+
7+
- docker
8+
- docker-compose
9+
- make
10+
11+
_Note_: Docker Desktop only allocates 2GB of memory by default, which isn't enough to run the docker-compose services reliably.
12+
13+
To allocate more memory, go to Settings > Resources in the Docker UI and use the slider to change the value (_8GB recommended_). Make sure to click Apply & Restart for the changes to take effect.
14+
15+
## Commands
16+
17+
### Starting containers
18+
19+
To start all containers and build it, use;
20+
21+
```
22+
make up
23+
```
24+
25+
### Stop containers
26+
27+
To stop to containers, use;
28+
29+
```
30+
make stop
31+
```
32+
33+
### Clean containers
34+
35+
To remove all images and containers, use;
36+
37+
```
38+
make clean
39+
```
40+
41+
### View logs
42+
43+
To open the logs from the env, use;
44+
45+
```
46+
make logs
47+
```
48+
49+
## Config options
50+
51+
A set of environment variables can be set before running.
52+
53+
You can change these configs on the env files;
54+
55+
- [Fuel Core env](./envs/fuel_core.env) Fuel Core configurations.
56+
- [L1 env](./envs/l1_chain.env) L1 configurations.
57+
- [PORTS](./envs/ports.env): Exposed ports on host machine.
58+
59+
## License
60+
61+
This repo is licensed under the `Apache-2.0` license. See [`LICENSE`](./LICENSE) for more information.

0 commit comments

Comments
 (0)