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(docs) update all docs to purge bigint #475

Closed
wants to merge 14 commits into from
Closed
31 changes: 31 additions & 0 deletions .changeset/silent-beans-smell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
"@fuel-ts/abi-coder": patch
"@fuel-ts/address": patch
"@fuel-ts/constants": patch
"@fuel-ts/contract": patch
"@fuel-ts/example-contract": patch
"forc-bin": patch
"fuels": patch
"@fuel-ts/hasher": patch
"@fuel-ts/hdwallet": patch
"@fuel-ts/interfaces": patch
"@fuel-ts/keystore": patch
"@fuel-ts/math": patch
"@fuel-ts/merkle": patch
"@fuel-ts/merkle-shared": patch
"@fuel-ts/merklesum": patch
"@fuel-ts/mnemonic": patch
"@fuel-ts/predicate": patch
"@fuel-ts/providers": patch
"@fuel-ts/script": patch
"@fuel-ts/signer": patch
"@fuel-ts/sparsemerkle": patch
"@fuel-ts/testcases": patch
"@fuel-ts/transactions": patch
"typechain-target-fuels": patch
"@fuel-ts/wallet": patch
"@fuel-ts/wallet-manager": patch
"@fuel-ts/wordlists": patch
---

Refactor to use bn.js instead of bigint.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ const contract = new Contract(contractId, abi, wallet);
// All contract methods are available under functions
// with the correct types
const { transactionId, value } = await contract.functions
.foo<[string], bigint>("bar")
.foo<[string], string>("bar")
.call();

console.log(transactionId, value);
Expand Down
2 changes: 1 addition & 1 deletion docs/QUICKSTART.md
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ To make it easier to interact with our contract we use `typechain` to interpret
Inside `my-fuel-dapp/frontend` run;

```sh
npx typechain --target=fuels --out-dir=./src/contracts ../contract/out/debug/contract-abi.json
npx typechain --target=fuels --out-dir=./src/contracts ../contract/out/debug/contracts-abi.json
```

You should see something like this:
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const contract = new Contract(contractId, abi, wallet);
// All contract methods are available under functions
// with the correct types
const { transactionId, value } = await contract.functions
.foo<[string], bigint>("bar")
.foo<[string], string>("bar")
.call();

console.log(transactionId, value);
Expand Down
5 changes: 5 additions & 0 deletions docs/packages/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,23 @@ nav_order: 1
## Modules

- [@fuel-ts/abi-coder](fuel-ts-abi-coder/index.md)
- [@fuel-ts/address](fuel-ts-address/index.md)
- [@fuel-ts/constants](fuel-ts-constants/index.md)
- [@fuel-ts/contract](fuel-ts-contract/index.md)
- [@fuel-ts/hasher](fuel-ts-hasher/index.md)
- [@fuel-ts/hdwallet](fuel-ts-hdwallet/index.md)
- [@fuel-ts/interfaces](fuel-ts-interfaces/index.md)
- [@fuel-ts/keystore](fuel-ts-keystore/index.md)
- [@fuel-ts/math](fuel-ts-math/index.md)
- [@fuel-ts/merkle](fuel-ts-merkle/index.md)
- [@fuel-ts/merkle-shared](fuel-ts-merkle-shared/index.md)
- [@fuel-ts/merklesum](fuel-ts-merklesum/index.md)
- [@fuel-ts/mnemonic](fuel-ts-mnemonic/index.md)
- [@fuel-ts/predicate](fuel-ts-predicate/index.md)
- [@fuel-ts/providers](fuel-ts-providers/index.md)
- [@fuel-ts/signer](fuel-ts-signer/index.md)
- [@fuel-ts/sparsemerkle](fuel-ts-sparsemerkle/index.md)
- [@fuel-ts/transactions](fuel-ts-transactions/index.md)
- [@fuel-ts/wallet](fuel-ts-wallet/index.md)
- [@fuel-ts/wallet-manager](fuel-ts-wallet-manager/index.md)
- [@fuel-ts/wordlists](fuel-ts-wordlists/index.md)
Expand Down
102 changes: 102 additions & 0 deletions docs/packages/fuel-ts-abi-coder/classes/ABI.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
---
layout: default
title: ABI
parent: "@fuel-ts/abi-coder"
nav_order: 1

---

# Class: ABI

[@fuel-ts/abi-coder](../index.md).ABI

## Constructors

### constructor

• **new ABI**(`jsonAbi`)

#### Parameters

| Name | Type |
| :------ | :------ |
| `jsonAbi` | [`JsonFlatAbi`](../interfaces/JsonFlatAbi.md) |

#### Defined in

[packages/abi-coder/src/json-abi.ts:62](https://github.com/FuelLabs/fuels-ts/blob/master/packages/abi-coder/src/json-abi.ts#L62)

## Properties

### functions

• `Readonly` **functions**: readonly [`JsonFlatAbiFragmentFunction`](../interfaces/JsonFlatAbiFragmentFunction.md)[]

#### Defined in

[packages/abi-coder/src/json-abi.ts:60](https://github.com/FuelLabs/fuels-ts/blob/master/packages/abi-coder/src/json-abi.ts#L60)

___

### types

• `Readonly` **types**: readonly [`JsonFlatAbiFragmentType`](../interfaces/JsonFlatAbiFragmentType.md)[]

#### Defined in

[packages/abi-coder/src/json-abi.ts:59](https://github.com/FuelLabs/fuels-ts/blob/master/packages/abi-coder/src/json-abi.ts#L59)

## Methods

### parseInput

▸ **parseInput**(`input`, `typeArgumentsList?`): [`JsonAbiFragmentType`](../interfaces/JsonAbiFragmentType.md)

#### Parameters

| Name | Type |
| :------ | :------ |
| `input` | [`JsonFlatAbiFragmentArgumentType`](../interfaces/JsonFlatAbiFragmentArgumentType.md) |
| `typeArgumentsList` | `Map`<`number`, [`JsonAbiFragmentType`](../interfaces/JsonAbiFragmentType.md)\> |

#### Returns

[`JsonAbiFragmentType`](../interfaces/JsonAbiFragmentType.md)

#### Defined in

[packages/abi-coder/src/json-abi.ts:67](https://github.com/FuelLabs/fuels-ts/blob/master/packages/abi-coder/src/json-abi.ts#L67)

___

### unflatten

▸ **unflatten**(): readonly [`JsonAbiFragment`](../interfaces/JsonAbiFragment.md)[]

#### Returns

readonly [`JsonAbiFragment`](../interfaces/JsonAbiFragment.md)[]

#### Defined in

[packages/abi-coder/src/json-abi.ts:121](https://github.com/FuelLabs/fuels-ts/blob/master/packages/abi-coder/src/json-abi.ts#L121)

___

### unflatten

▸ `Static` **unflatten**(`jsonAbi`): readonly [`JsonAbiFragment`](../interfaces/JsonAbiFragment.md)[]

#### Parameters

| Name | Type |
| :------ | :------ |
| `jsonAbi` | [`JsonAbi`](../index.md#jsonabi) |

#### Returns

readonly [`JsonAbiFragment`](../interfaces/JsonAbiFragment.md)[]

#### Defined in

[packages/abi-coder/src/json-abi.ts:113](https://github.com/FuelLabs/fuels-ts/blob/master/packages/abi-coder/src/json-abi.ts#L113)
4 changes: 2 additions & 2 deletions docs/packages/fuel-ts-abi-coder/classes/AbiCoder.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ nav_order: 1

#### Defined in

[packages/abi-coder/src/abi-coder.ts:29](https://github.com/FuelLabs/fuels-ts/blob/master/packages/abi-coder/src/abi-coder.ts#L29)
[packages/abi-coder/src/abi-coder.ts:31](https://github.com/FuelLabs/fuels-ts/blob/master/packages/abi-coder/src/abi-coder.ts#L31)

## Methods

Expand Down Expand Up @@ -80,4 +80,4 @@ ___

#### Defined in

[packages/abi-coder/src/abi-coder.ts:33](https://github.com/FuelLabs/fuels-ts/blob/master/packages/abi-coder/src/abi-coder.ts#L33)
[packages/abi-coder/src/abi-coder.ts:35](https://github.com/FuelLabs/fuels-ts/blob/master/packages/abi-coder/src/abi-coder.ts#L35)
18 changes: 16 additions & 2 deletions docs/packages/fuel-ts-abi-coder/classes/ArrayCoder.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,20 @@ nav_order: 1

___

### encodedLength

• `Readonly` **encodedLength**: `number`

#### Inherited from

[Coder](Coder.md).[encodedLength](Coder.md#encodedlength)

#### Defined in

[packages/abi-coder/src/coders/abstract-coder.ts:36](https://github.com/FuelLabs/fuels-ts/blob/master/packages/abi-coder/src/coders/abstract-coder.ts#L36)

___

### length

• **length**: `number`
Expand Down Expand Up @@ -95,7 +109,7 @@ ___

#### Defined in

[packages/abi-coder/src/coders/abstract-coder.ts:38](https://github.com/FuelLabs/fuels-ts/blob/master/packages/abi-coder/src/coders/abstract-coder.ts#L38)
[packages/abi-coder/src/coders/abstract-coder.ts:35](https://github.com/FuelLabs/fuels-ts/blob/master/packages/abi-coder/src/coders/abstract-coder.ts#L35)

## Methods

Expand Down Expand Up @@ -169,4 +183,4 @@ ___

#### Defined in

[packages/abi-coder/src/coders/abstract-coder.ts:46](https://github.com/FuelLabs/fuels-ts/blob/master/packages/abi-coder/src/coders/abstract-coder.ts#L46)
[packages/abi-coder/src/coders/abstract-coder.ts:44](https://github.com/FuelLabs/fuels-ts/blob/master/packages/abi-coder/src/coders/abstract-coder.ts#L44)
18 changes: 16 additions & 2 deletions docs/packages/fuel-ts-abi-coder/classes/B256Coder.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,20 @@ nav_order: 1

## Properties

### encodedLength

• `Readonly` **encodedLength**: `number`

#### Inherited from

[Coder](Coder.md).[encodedLength](Coder.md#encodedlength)

#### Defined in

[packages/abi-coder/src/coders/abstract-coder.ts:36](https://github.com/FuelLabs/fuels-ts/blob/master/packages/abi-coder/src/coders/abstract-coder.ts#L36)

___

### name

• `Readonly` **name**: `string`
Expand All @@ -56,7 +70,7 @@ ___

#### Defined in

[packages/abi-coder/src/coders/abstract-coder.ts:38](https://github.com/FuelLabs/fuels-ts/blob/master/packages/abi-coder/src/coders/abstract-coder.ts#L38)
[packages/abi-coder/src/coders/abstract-coder.ts:35](https://github.com/FuelLabs/fuels-ts/blob/master/packages/abi-coder/src/coders/abstract-coder.ts#L35)

## Methods

Expand Down Expand Up @@ -130,4 +144,4 @@ ___

#### Defined in

[packages/abi-coder/src/coders/abstract-coder.ts:46](https://github.com/FuelLabs/fuels-ts/blob/master/packages/abi-coder/src/coders/abstract-coder.ts#L46)
[packages/abi-coder/src/coders/abstract-coder.ts:44](https://github.com/FuelLabs/fuels-ts/blob/master/packages/abi-coder/src/coders/abstract-coder.ts#L44)
24 changes: 19 additions & 5 deletions docs/packages/fuel-ts-abi-coder/classes/BooleanCoder.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,24 @@ nav_order: 1

#### Defined in

[packages/abi-coder/src/coders/boolean.ts:7](https://github.com/FuelLabs/fuels-ts/blob/master/packages/abi-coder/src/coders/boolean.ts#L7)
[packages/abi-coder/src/coders/boolean.ts:6](https://github.com/FuelLabs/fuels-ts/blob/master/packages/abi-coder/src/coders/boolean.ts#L6)

## Properties

### encodedLength

• `Readonly` **encodedLength**: `number`

#### Inherited from

[Coder](Coder.md).[encodedLength](Coder.md#encodedlength)

#### Defined in

[packages/abi-coder/src/coders/abstract-coder.ts:36](https://github.com/FuelLabs/fuels-ts/blob/master/packages/abi-coder/src/coders/abstract-coder.ts#L36)

___

### name

• `Readonly` **name**: `string`
Expand All @@ -56,7 +70,7 @@ ___

#### Defined in

[packages/abi-coder/src/coders/abstract-coder.ts:38](https://github.com/FuelLabs/fuels-ts/blob/master/packages/abi-coder/src/coders/abstract-coder.ts#L38)
[packages/abi-coder/src/coders/abstract-coder.ts:35](https://github.com/FuelLabs/fuels-ts/blob/master/packages/abi-coder/src/coders/abstract-coder.ts#L35)

## Methods

Expand All @@ -81,7 +95,7 @@ ___

#### Defined in

[packages/abi-coder/src/coders/boolean.ts:26](https://github.com/FuelLabs/fuels-ts/blob/master/packages/abi-coder/src/coders/boolean.ts#L26)
[packages/abi-coder/src/coders/boolean.ts:25](https://github.com/FuelLabs/fuels-ts/blob/master/packages/abi-coder/src/coders/boolean.ts#L25)

___

Expand All @@ -105,7 +119,7 @@ ___

#### Defined in

[packages/abi-coder/src/coders/boolean.ts:11](https://github.com/FuelLabs/fuels-ts/blob/master/packages/abi-coder/src/coders/boolean.ts#L11)
[packages/abi-coder/src/coders/boolean.ts:10](https://github.com/FuelLabs/fuels-ts/blob/master/packages/abi-coder/src/coders/boolean.ts#L10)

___

Expand All @@ -130,4 +144,4 @@ ___

#### Defined in

[packages/abi-coder/src/coders/abstract-coder.ts:46](https://github.com/FuelLabs/fuels-ts/blob/master/packages/abi-coder/src/coders/abstract-coder.ts#L46)
[packages/abi-coder/src/coders/abstract-coder.ts:44](https://github.com/FuelLabs/fuels-ts/blob/master/packages/abi-coder/src/coders/abstract-coder.ts#L44)
24 changes: 19 additions & 5 deletions docs/packages/fuel-ts-abi-coder/classes/ByteCoder.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,24 @@ nav_order: 1

#### Defined in

[packages/abi-coder/src/coders/byte.ts:7](https://github.com/FuelLabs/fuels-ts/blob/master/packages/abi-coder/src/coders/byte.ts#L7)
[packages/abi-coder/src/coders/byte.ts:6](https://github.com/FuelLabs/fuels-ts/blob/master/packages/abi-coder/src/coders/byte.ts#L6)

## Properties

### encodedLength

• `Readonly` **encodedLength**: `number`

#### Inherited from

[Coder](Coder.md).[encodedLength](Coder.md#encodedlength)

#### Defined in

[packages/abi-coder/src/coders/abstract-coder.ts:36](https://github.com/FuelLabs/fuels-ts/blob/master/packages/abi-coder/src/coders/abstract-coder.ts#L36)

___

### name

• `Readonly` **name**: `string`
Expand All @@ -56,7 +70,7 @@ ___

#### Defined in

[packages/abi-coder/src/coders/abstract-coder.ts:38](https://github.com/FuelLabs/fuels-ts/blob/master/packages/abi-coder/src/coders/abstract-coder.ts#L38)
[packages/abi-coder/src/coders/abstract-coder.ts:35](https://github.com/FuelLabs/fuels-ts/blob/master/packages/abi-coder/src/coders/abstract-coder.ts#L35)

## Methods

Expand All @@ -81,7 +95,7 @@ ___

#### Defined in

[packages/abi-coder/src/coders/byte.ts:26](https://github.com/FuelLabs/fuels-ts/blob/master/packages/abi-coder/src/coders/byte.ts#L26)
[packages/abi-coder/src/coders/byte.ts:22](https://github.com/FuelLabs/fuels-ts/blob/master/packages/abi-coder/src/coders/byte.ts#L22)

___

Expand All @@ -105,7 +119,7 @@ ___

#### Defined in

[packages/abi-coder/src/coders/byte.ts:11](https://github.com/FuelLabs/fuels-ts/blob/master/packages/abi-coder/src/coders/byte.ts#L11)
[packages/abi-coder/src/coders/byte.ts:10](https://github.com/FuelLabs/fuels-ts/blob/master/packages/abi-coder/src/coders/byte.ts#L10)

___

Expand All @@ -130,4 +144,4 @@ ___

#### Defined in

[packages/abi-coder/src/coders/abstract-coder.ts:46](https://github.com/FuelLabs/fuels-ts/blob/master/packages/abi-coder/src/coders/abstract-coder.ts#L46)
[packages/abi-coder/src/coders/abstract-coder.ts:44](https://github.com/FuelLabs/fuels-ts/blob/master/packages/abi-coder/src/coders/abstract-coder.ts#L44)
Loading