Skip to content

Commit

Permalink
chore: update nightly docs (#185)
Browse files Browse the repository at this point in the history
Co-authored-by: Sarah Schwartz <[email protected]>
  • Loading branch information
github-actions[bot] and sarahschwartz authored Feb 22, 2024
1 parent 5f960e3 commit 045c711
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/fuelup
4 changes: 2 additions & 2 deletions docs/guides/docs/intro-to-sway/typescript-sdk.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ npm install [email protected] @fuel-wallet/[email protected] @fuel-wallet/[email protected]

## Generate contract types

The `fuels init` command generates a `fuels.config.json` file that is used by the SDK to generate contract types.
The `fuels init` command generates a `fuels.config.ts` file that is used by the SDK to generate contract types.
Use the `contracts` flag to define where your contract folder is located, and the `output` flag to define where you want the generated files to be created.

Run the command below in your frontend folder to generate the config file:
Expand All @@ -63,7 +63,7 @@ action={{
npx fuels init --contracts ../contract/ --output ./src/contracts
```

Now that you have a `fuels.config.json` file, you can use the `fuels build` command to rebuild your contract and generate types.
Now that you have a `fuels.config.ts` file, you can use the `fuels build` command to rebuild your contract and generate types.
Running this command will interpret the output ABI JSON from your contract and generate the correct TypeScript definitions.
If you see the folder `fuel-project/counter-contract/out` you will be able to see the ABI JSON there.

Expand Down
4 changes: 2 additions & 2 deletions docs/guides/docs/quickstart/building-a-frontend.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ action={{
## Generate contract types

<ConditionalContent versionSet={props.versionSet} showForVersions={['default', 'nightly']}>
The `fuels init` command generates a `fuels.config.json` file that is used by the SDK to generate contract types.
The `fuels init` command generates a `fuels.config.ts` file that is used by the SDK to generate contract types.
Use the `contracts` flag to define where your contract folder is located, and the `output` flag to define where you want the generated files to be created.

Run the command below in your frontend folder to generate the config file:
Expand All @@ -168,7 +168,7 @@ action={{
npx fuels init --contracts ../counter-contract/ --output ./src/sway-api
```

Now that you have a `fuels.config.json` file, you can use the `fuels build` command to rebuild your contract and generate types.
Now that you have a `fuels.config.ts` file, you can use the `fuels build` command to rebuild your contract and generate types.
Running this command will interpret the output ABI JSON from your contract and generate the correct TypeScript definitions.
If you see the folder `fuel-project/counter-contract/out` you will be able to see the ABI JSON there.

Expand Down
2 changes: 1 addition & 1 deletion docs/nightly/fuels-ts
Submodule fuels-ts updated 618 files

0 comments on commit 045c711

Please sign in to comment.