Skip to content
Merged
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
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,6 @@
[submodule "docs/nightly/sway-libs"]
path = docs/nightly/sway-libs
url = https://github.com/FuelLabs/sway-libs.git
[submodule "docs/chain-configuration"]
path = docs/chain-configuration
url = https://github.com/FuelLabs/chain-configuration
1 change: 1 addition & 0 deletions docs/chain-configuration
Submodule chain-configuration added at 6aa382
2 changes: 1 addition & 1 deletion docs/fuel-core
Submodule fuel-core updated 155 files
2 changes: 1 addition & 1 deletion docs/fuel-graphql-docs
2 changes: 1 addition & 1 deletion docs/fuel-specs
2 changes: 1 addition & 1 deletion docs/fuels-rs
Submodule fuels-rs updated 37 files
+9 −3 .github/workflows/ci.yml
+28 −22 Cargo.toml
+1 −1 docs/src/connecting/retrying.md
+2 −2 docs/src/connecting/short-lived.md
+2 −2 docs/src/getting-started.md
+1 −1 docs/src/types/asset-id.md
+1 −1 docs/src/types/contract-id.md
+10 −2 e2e/Cargo.toml
+0 −3 e2e/Forc.toml
+109 −0 e2e/build.rs
+2 −0 e2e/sway/contracts/contract_test/src/main.sw
+1 −0 e2e/sway/scripts/basic_script/src/main.sw
+18 −0 e2e/tests/bindings.rs
+51 −2 e2e/tests/providers.rs
+1 −1 e2e/tests/types_contracts.rs
+2 −2 examples/contracts/src/lib.rs
+2 −0 packages/fuels-accounts/src/provider.rs
+1 −0 packages/fuels-accounts/src/provider/supported_fuel_core_version.rs
+2 −6 packages/fuels-accounts/src/provider/supported_versions.rs
+32 −13 packages/fuels-code-gen/src/program_bindings/abigen/bindings/contract.rs
+18 −14 packages/fuels-code-gen/src/program_bindings/abigen/bindings/function_generator.rs
+6 −7 packages/fuels-code-gen/src/program_bindings/abigen/bindings/predicate.rs
+83 −9 packages/fuels-code-gen/src/program_bindings/abigen/bindings/script.rs
+1 −0 packages/fuels-core/Cargo.toml
+278 −2 packages/fuels-core/src/types/transaction_builders.rs
+30 −78 packages/fuels-core/src/types/wrappers/transaction.rs
+0 −1 packages/fuels-macros/Cargo.toml
+6 −7 packages/fuels-macros/src/setup_program_test/code_gen.rs
+2 −4 packages/fuels-programs/src/contract.rs
+10 −12 packages/fuels-programs/src/script_calls.rs
+1 −0 packages/fuels-programs/src/submit_response.rs
+1 −0 packages/fuels-test-helpers/Cargo.toml
+6 −0 packages/fuels-test-helpers/src/fuel_bin_service.rs
+5 −1 packages/fuels-test-helpers/src/lib.rs
+4 −2 packages/fuels/src/lib.rs
+17 −0 scripts/fuel-core-version/Cargo.toml
+84 −0 scripts/fuel-core-version/src/main.rs
2 changes: 1 addition & 1 deletion docs/fuels-ts
Submodule fuels-ts updated 116 files
2 changes: 1 addition & 1 deletion docs/fuels-wallet
Submodule fuels-wallet updated 48 files
+58 −58 .github/workflows/pr-tests.yml
+1 −0 biome.json
+2 −2 examples/cra-dapp/package.json
+3 −3 package.json
+1 −0 packages/app/.env.example
+41 −0 packages/app/CHANGELOG.md
+7 −7 packages/app/package.json
+1 −0 packages/app/playwright.config.ts
+2 −2 packages/app/playwright/crx/crx.test.ts
+61 −1 packages/app/playwright/crx/utils/popup.ts
+84 −2 packages/app/playwright/e2e/Accounts.test.ts
+2 −2 packages/app/playwright/e2e/Networks.test.ts
+13 −6 packages/app/playwright/mocks/database.ts
+1 −3 packages/app/src/App.tsx
+22 −11 packages/app/src/systems/CRX/background/services/VaultService.ts
+0 −1 packages/app/src/systems/Core/hooks/index.tsx
+0 −28 packages/app/src/systems/Core/hooks/useRecoverWelcomeFromError.ts
+2 −2 packages/app/src/systems/Core/utils/database.ts
+11 −7 packages/app/src/systems/Settings/hooks/useExportVault.tsx
+3 −6 packages/app/src/systems/Transaction/components/TxHeader/TxHeader.tsx
+4 −1 packages/app/src/systems/Transaction/services/transaction.tsx
+3 −0 packages/app/src/systems/Unlock/machines/unlockMachine.tsx
+15 −1 packages/app/src/systems/Vault/services/VaultServer.ts
+3 −0 packages/app/vite-utils/vite.base.config.ts
+14 −0 packages/connections/CHANGELOG.md
+2 −2 packages/connections/package.json
+2 −2 packages/docs/package.json
+10 −2 packages/docs/src/components/SDKSection.tsx
+3 −3 packages/e2e-contract-tests/package.json
+1 −0 packages/e2e-contract-tests/playwright.config.ts
+3 −1 packages/e2e-contract-tests/playwright/e2e/DepositHalfEth.test.ts
+3 −1 packages/e2e-contract-tests/playwright/e2e/ForwardAndMintMulticall.test.ts
+3 −1 packages/e2e-contract-tests/playwright/e2e/ForwardCustomAsset.test.ts
+3 −1 packages/e2e-contract-tests/playwright/e2e/ForwardEth.test.ts
+3 −1 packages/e2e-contract-tests/playwright/e2e/ForwardHalfAndExternalMint.test.ts
+3 −1 packages/e2e-contract-tests/playwright/e2e/ForwardHalfAndMint.test.ts
+3 −2 packages/e2e-contract-tests/playwright/e2e/ForwardHalfCustomAsset.test.ts
+3 −1 packages/e2e-contract-tests/playwright/e2e/MintAsset.test.ts
+7 −3 packages/e2e-contract-tests/playwright/e2e/test.ts
+2 −2 packages/e2e-contract-tests/src/contract-ids.json
+2 −2 packages/e2e-contract-tests/src/contracts/contracts/CustomAssetAbi.d.ts
+3 −3 packages/e2e-contract-tests/src/contracts/contracts/CustomAssetAbi.hex.ts
+8 −2 packages/e2e-contract-tests/src/contracts/contracts/common.d.ts
+4 −20 packages/e2e-contract-tests/src/contracts/contracts/factories/CustomAssetAbi__factory.ts
+2 −2 packages/e2e-contract-tests/src/contracts/contracts/index.ts
+14 −0 packages/types/CHANGELOG.md
+2 −2 packages/types/package.json
+683 −368 pnpm-lock.yaml
53 changes: 34 additions & 19 deletions docs/guides/docs/running-a-node/running-a-local-node.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,48 +42,63 @@ forc deploy --default-signer --node-url 127.0.0.1:4000/v1/graphql
To modify the initial state of the chain, you must configure the `state_config.json` file in your chain configuration folder.
Here is an example of what that looks like using version {props.fuelCoreVersion} of `fuel-core`:

<ConditionalContent versionSet={props.versionSet} showForVersions={["default", "nightly"]}>
Here is the [specific configuration](https://github.com/FuelLabs/fuel-core/tree/9fddeccb4d112c148f6793bc3d21131a13778a25/bin/fuel-core/chainspec/testnet)
For simplicity, clone the [repository](https://github.com/FuelLabs/chain-configuration/tree/master) into the directory of your choice.

`chain_config.json`
When using the `--snapshot` flag later, you can replace `./your/path/to/chain_config_folder` with the repository you just cloned `./chain-configuration/ignition/`.

<CodeImport
file="../../../fuel-core/bin/fuel-core/chainspec/testnet/chain_config.json"
/>
Inside you should find these [specific configuration files](https://github.com/FuelLabs/chain-configuration/tree/master/local)

`metadata.json`
`chain_config.json`

<CodeImport
file="../../../fuel-core/bin/fuel-core/chainspec/testnet/metadata.json"
/>
<CodeImport
file="../../../chain-configuration/local/chain_config.json"
/>

`state_config.json`
`metadata.json`

<CodeImport
file="../../../fuel-core/bin/fuel-core/chainspec/testnet/state_config.json"
/>
<CodeImport
file="../../../chain-configuration/local/metadata.json"
/>

`state_transition_bytecode.wasm`
`state_config.json`

Which is too large to display on this page, but you can find it [here](https://github.com/FuelLabs/fuel-core/blob/9fddeccb4d112c148f6793bc3d21131a13778a25/bin/fuel-core/chainspec/testnet/state_transition_bytecode.wasm)
<CodeImport
file="../../../chain-configuration/local/state_config.json"
/>

</ConditionalContent>
`state_transition_bytecode.wasm`

Which is too large to display on this page, but you can find it [here](https://github.com/FuelLabs/chain-configuration/blob/master/local/state_transition_bytecode.wasm)

To start the node with a custom configuration, you can use the command below:

```sh
fuel-core run --snapshot ./your/path/to/chain_config_folder --db-type in-memory --debug
```

To find an example chain configuration folder for a specific `fuel-core` version, refer to the [`fuel-core`](https://github.com/FuelLabs/fuel-core/tree/9fddeccb4d112c148f6793bc3d21131a13778a25/bin/fuel-core/chainspec/testnet) repo.
To find an example chain configuration folder for a specific `fuel-core` version, refer to the [`chain-configuration`](https://github.com/FuelLabs/chain-configuration/tree/master) repo.

### Funding a wallet locally

You can edit the `coins` array inside `state_config.json` to modify the initial assets owned by a given address.

The `owner` address must be a `B256` type address (begins with `0x`) instead of a `Bech32` type (begins with `fuel`).

The `amount` is a numerical value. In this example, the value translates to `11,152,921,504 ETH`.
The `amount` is a numerical value. In the example below, the value translates to 1 ETH.

```json
"coins": [
{
"tx_id": "0x0000000000000000000000000000000000000000000000000000000000000001",
"output_index": 0,
"tx_pointer_block_height": 0,
"tx_pointer_tx_idx": 0,
"owner": "0x488284d46414347c78221d3bad71dfebcff61ab2ae26d71129701d50796f714d",
"amount": 1000000000,
"asset_id": "0xf8f8b6283d7fa5b672b530cbb84fcccb4ff8dc40f8176ef4544ddb1f1952ad07"
}
]
```

## Local node (with state persistence)

Expand Down
73 changes: 29 additions & 44 deletions docs/guides/docs/running-a-node/running-a-testnet-node.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Running a Testnet Node
category: Running a Node
parent:
label: Guides
label: All Guides
link: /guides
---

Expand All @@ -24,15 +24,6 @@ parent:
trim="true"
/>

To run a `testnet` node, you will need to install the `testnet` toolchain.

You can do this by running the commands below.

```sh
fuelup toolchain install testnet
fuelup default testnet
```

<TextImport
file="../counter-dapp/building-a-smart-contract.mdx"
comment="install_help"
Expand Down Expand Up @@ -77,7 +68,6 @@ Note that using other network endpoints will result in the relayer failing to st
Generate a new P2P key pairing by running the following command:
{/*generate_fuel_p2p_key:example:end*/}

<ConditionalContent versionSet={props.versionSet} showForVersions={['default', 'nightly']}>
{/*// ANCHOR: generate_fuel_p2p_key_command*/}

```sh
Expand All @@ -90,8 +80,6 @@ fuel-core-keygen new --key-type peering
### Do not share or lose this private key! Press any key to complete. ###
```

</ConditionalContent>

{/*// ANCHOR_END: generate_fuel_p2p_key_command*/}

{/*generate_fuel_p2p_key_end:example:start*/}
Expand All @@ -102,61 +90,58 @@ Make sure you save this somewhere safe so you don't need to generate a new key p

To run a local node with persistence, you must have a folder with the following chain configuration files:

<ConditionalContent versionSet={props.versionSet} showForVersions={["default", "nightly"]}>
Here is the [specific configuration](https://github.com/FuelLabs/fuel-core/tree/9fddeccb4d112c148f6793bc3d21131a13778a25/bin/fuel-core/chainspec/testnet)
For simplicity, clone the [repository](https://github.com/FuelLabs/chain-configuration/tree/master) into the directory of your choice.

`chain_config.json`
When using the `--snapshot` flag later, you can replace `./your/path/to/chain_config_folder` with the repository you just cloned `./chain-configuration/ignition/`.

<CodeImport
file="../../../fuel-core/bin/fuel-core/chainspec/testnet/chain_config.json"
/>
Inside you should find these [specific configuration files](https://github.com/FuelLabs/chain-configuration/tree/master/ignition)

`metadata.json`
`chain_config.json`

<CodeImport
file="../../../fuel-core/bin/fuel-core/chainspec/testnet/metadata.json"
/>
<CodeImport
file="../../../chain-configuration/ignition/chain_config.json"
/>

`state_config.json`
`metadata.json`

<CodeImport
file="../../../fuel-core/bin/fuel-core/chainspec/testnet/state_config.json"
/>
<CodeImport
file="../../../chain-configuration/ignition/metadata.json"
/>

`state_transition_bytecode.wasm`
`state_config.json`

Which is too large to display on this page, but you can find it [here](https://github.com/FuelLabs/fuel-core/tree/9fddeccb4d112c148f6793bc3d21131a13778a25/bin/fuel-core/chainspec/testnet/state_transition_bytecode.wasm)
<CodeImport
file="../../../chain-configuration/ignition/state_config.json"
/>

</ConditionalContent>
`state_transition_bytecode.wasm`

Which is too large to display on this page, but you can find it [here](https://github.com/FuelLabs/chain-configuration/blob/master/ignition/state_transition_bytecode.wasm)

## Running a Local Node

{/*running_a_local_node:example:start*/}
Finally to put everything together to start the node, run the following command:
{/*running_a_local_node:example:end*/}

<ConditionalContent versionSet={props.versionSet} showForVersions={['default', 'nightly']}>

```sh
fuel-core run \
--service-name {ANY_SERVICE_NAME} \
--keypair {P2P_SECRET} \
--relayer {ETH_RPC_ENDPOINT} \
--ip 0.0.0.0 --port 4000 --peering-port 30333 \
--db-path ~/.testnet \
--service-name=fuel-sepolia-testnet-node \
--keypair {P2P_PRIVATE_KEY} \
--relayer {ETHEREUM_RPC_ENDPOINT} \
--ip=0.0.0.0 --port=4000 --peering-port=30333 \
--db-path=~/.fuel-sepolia-testnet \
--snapshot ./your/path/to/chain_config_folder \
--utxo-validation --poa-instant false --enable-p2p \
--min-gas-price 1 --max-block-size 18874368 --max-transmit-size 18874368 \
--reserved-nodes /dns4/p2p-devnet.fuel.network/tcp/30333/p2p/16Uiu2HAm6pmJUedRFjennk4A8yWL6zCApHCuykzRRroqMjjxZ8o6,/dns4/p2p-devnet.fuel.network/tcp/30334/p2p/16Uiu2HAm8dBwTRzqazCMqQDdR8thMa7BKiW4ep2B4DoQQp6Qhyfd \
--reserved-nodes /dns4/p2p-testnet.fuel.network/tcp/30333/p2p/16Uiu2HAmDxoChB7AheKNvCVpD4PHJwuDGn8rifMBEHmEynGHvHrf \
--sync-header-batch-size 100 \
--enable-relayer \
--relayer-v2-listening-contracts 0x01855B78C1f8868DE70e84507ec735983bf262dA \
--relayer-da-deploy-height 5827607 \
--relayer-log-page-size 2000
--relayer-v2-listening-contracts=0x01855B78C1f8868DE70e84507ec735983bf262dA \
--relayer-da-deploy-height=5827607 \
--relayer-log-page-size=500 \
--sync-block-stream-buffer-size 30
```

</ConditionalContent>

{/*running_a_local_node_end:example:start*/}
For the full description details of each flag above, run:
{/*running_a_local_node_end:example:end*/}
Expand Down
2 changes: 1 addition & 1 deletion scripts/wallet-patch-fixes/download-link.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function handleConstantsFile(filePath, version) {

if (start !== undefined && end !== undefined) {
const downloadLink =
'https://github.com/FuelLabs/fuels-wallet/releases/download/v0.19.0/fuel-wallet-0.19.0.zip';
'https://github.com/FuelLabs/fuels-wallet/releases/download/v0.21.0/fuel-wallet-0.21.0.zip';
const modifiedContent = `export const DOWNLOAD_LINK = '${downloadLink}';`;
lines.splice(start, end - start + 1, modifiedContent);
const newFileContent = lines.join(EOL);
Expand Down
2 changes: 1 addition & 1 deletion src/components/SidebarSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export function SidebarSection({
if (!version && book !== 'Intro') {
switch (book) {
case 'GraphQL':
githubLink = 'https://github.com/FuelLabs/fuel-core/tree/v0.26.0';
githubLink = 'https://github.com/FuelLabs/fuel-core/tree/v0.27.0';
break;
case 'Specs':
githubLink = 'https://github.com/FuelLabs/fuel-specs';
Expand Down
6 changes: 3 additions & 3 deletions src/config/versions.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"default": {
"forc": "0.60.0",
"rust": "0.62.0",
"ts": "0.89.0",
"wallet": "0.19.0"
"rust": "0.63.0",
"ts": "0.89.1",
"wallet": "0.21.0"
}
}