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!: fetch base asset ID from chain #1976

Merged
merged 231 commits into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from 221 commits
Commits
Show all changes
231 commits
Select commit Hold shift + click to select a range
5ad7472
Upgrading `forc` to `0.51.1`
arboleya Mar 28, 2024
c7a87ef
Merge branch 'master' into aa/chore/upgrading-forc-0.51.1
arboleya Mar 28, 2024
8c84082
Merge branch 'master' into aa/chore/upgrading-forc-0.51.1
petertonysmith94 Mar 29, 2024
da7aa98
feat: add base asset id to consensus params and add get method to pro…
danielbate Mar 29, 2024
87b5f6a
chore: update fuel gauge to use dynamic base asset
danielbate Mar 29, 2024
d17af2a
feat: migrate base asset id in account
danielbate Mar 29, 2024
e18da14
feat: migrate base asset id in docs snippets
danielbate Mar 29, 2024
d91cd0c
feat: add base asset id to fuel core chain config
danielbate Mar 29, 2024
5370033
feat: add base asset id fetch to demo apps
danielbate Mar 29, 2024
445118f
chore: add base asset id to test chain config
danielbate Mar 29, 2024
cea9c1d
chore: add base asset id to templates
danielbate Mar 29, 2024
dfd4a51
feat: add base asset id fetch to script test
danielbate Mar 29, 2024
62328bc
chore: lint
danielbate Mar 29, 2024
6397db7
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
danielbate Mar 29, 2024
d0691c3
TO FIX
danielbate Mar 29, 2024
204bffa
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
danielbate Apr 3, 2024
f21ca66
feat: pass base asset ID to tx request
danielbate Apr 3, 2024
3b09267
test: fix base asset id import
danielbate Apr 3, 2024
5613e17
test: fix transferring assets test import
danielbate Apr 3, 2024
c413bce
feat: add docs
danielbate Apr 3, 2024
15938b2
feat: make asset id required in coin quantityfy
danielbate Apr 3, 2024
990760f
feat: add zero bytes import check
danielbate Apr 3, 2024
229f9bf
chore: remove redundant await
danielbate Apr 3, 2024
7b418df
doc: improve type hint on tx request
danielbate Apr 3, 2024
16a20c9
test: fix transferring assets test
danielbate Apr 3, 2024
85298e4
chore: changeset
danielbate Apr 3, 2024
26ddfd4
chore: linting
danielbate Apr 3, 2024
11c3a30
chore: rebuild
danielbate Apr 3, 2024
702a53d
Merge branch 'master' into db/feat/dynamic-base-asset
danielbate Apr 4, 2024
1032e67
chore: fix casing
danielbate Apr 4, 2024
9d0054f
chore: spacing
danielbate Apr 4, 2024
08241a9
Merge branch 'master' into aa/chore/upgrading-forc-0.51.1
arboleya Apr 4, 2024
54d29f3
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
danielbate Apr 5, 2024
cab6e45
chore: linting
danielbate Apr 5, 2024
eca43e6
chore: fix import
danielbate Apr 5, 2024
3daad3d
chore: fix import
danielbate Apr 5, 2024
492e03f
chore: linting
danielbate Apr 5, 2024
d622856
Upgrading `forc` to `0.52.1`
arboleya Apr 5, 2024
cca95fe
Updating `prt()` accessor for `Vec`s
arboleya Apr 5, 2024
93e2d91
Applying new format for `AssetId`
arboleya Apr 5, 2024
ac1684f
Removing obsolete `forc` exceptions
arboleya Apr 5, 2024
eeffb2e
Adding [empty] changeset
arboleya Apr 5, 2024
2e60a57
Removing obsolete CI steps
arboleya Apr 5, 2024
42713ef
Temporarily disabling workflow step
arboleya Apr 5, 2024
de5abaf
Deleting obsolete changeset
arboleya Apr 5, 2024
abf4cd4
Adjusting changeset
arboleya Apr 5, 2024
e0bd6a6
Marking PR as a breaking change
arboleya Apr 5, 2024
73b51c6
Merge branch 'master' into db/feat/dynamic-base-asset
Torres-ssf Apr 6, 2024
65d7fff
Lintfix
arboleya Apr 7, 2024
8c3d18b
Re-enabling workflow step
arboleya Apr 7, 2024
cb78ab3
Increasing verbosity for debugging purposes
arboleya Apr 7, 2024
856b2f5
Merge branch 'master' into aa/chore/upgrading-forc-0.52.1
arboleya Apr 7, 2024
56215b3
Debugging forc build
arboleya Apr 7, 2024
3c3dd80
More debugging
arboleya Apr 7, 2024
40826df
Fixing directory path
arboleya Apr 7, 2024
9ba6300
More paths adjustments
arboleya Apr 7, 2024
5be60b4
Polishing test assertions
arboleya Apr 8, 2024
84b4713
Merge branch 'master' into db/feat/dynamic-base-asset
petertonysmith94 Apr 8, 2024
bced881
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
danielbate Apr 9, 2024
cef28a3
chore: remove redundant import
danielbate Apr 9, 2024
00a5a17
chore: remove redundant import
danielbate Apr 9, 2024
1b97fc9
Merge branch 'master' into aa/chore/upgrading-forc-0.52.1
arboleya Apr 10, 2024
5097ac7
Enabling PR auto-release
arboleya Apr 10, 2024
cc243b0
Merge branch 'master' into db/feat/dynamic-base-asset
danielbate Apr 10, 2024
f26d2e5
Merge branch 'master' into db/feat/dynamic-base-asset
danielbate Apr 10, 2024
5cff246
feat: tx request now requires a base asset ID on instantiation
danielbate Apr 10, 2024
c2259eb
Merge branch 'db/feat/dynamic-base-asset' of https://github.com/FuelL…
danielbate Apr 10, 2024
3b4975e
chore: linting
danielbate Apr 10, 2024
1be6bb7
chore: remove rendundant file
danielbate Apr 10, 2024
5b768e9
Merge branch 'master' into aa/chore/upgrading-forc-0.52.1
arboleya Apr 11, 2024
47c511e
Temporarily commenting failing tests
arboleya Apr 11, 2024
1fa4e24
Merge branch 'master' into aa/chore/upgrading-forc-0.52.1
arboleya Apr 11, 2024
001229d
Upgrading `forc` to `0.53.0`
arboleya Apr 11, 2024
775d381
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
danielbate Apr 11, 2024
574e682
Merge branch 'master' into aa/chore/upgrading-forc-0.53.0
arboleya Apr 11, 2024
e26dc07
Adjusting changeset
arboleya Apr 11, 2024
c0d13cd
Rolling back debugging workflow steps
arboleya Apr 11, 2024
73d6a2a
Fixing broken tests (applying breaking changes)
arboleya Apr 11, 2024
7080ea5
Adjusting changeset
arboleya Apr 11, 2024
ac13cef
Grouping all skipped tests into a single `describe` block
arboleya Apr 11, 2024
d53c837
Fixing test; updating vector pointer assertion
arboleya Apr 11, 2024
82a656c
Skipping grouped tests
arboleya Apr 11, 2024
2d66ae6
Disabling PR auto-release
arboleya Apr 11, 2024
6b187e7
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
danielbate Apr 12, 2024
660a350
Merge branch 'master' into db/feat/dynamic-base-asset
danielbate Apr 12, 2024
f67d868
chore: use experimental build for all workspaces
danielbate Apr 12, 2024
d8f4141
chore: use correct casing for exhaustive example
danielbate Apr 12, 2024
b31ee6f
fix: use new vec capacity
danielbate Apr 12, 2024
29897ee
chore: use raw ptr patch branch
danielbate Apr 12, 2024
b0a9377
feat: fix for vec capacity and remove pointer encoding
danielbate Apr 12, 2024
f55e5e9
feat: correctly set script return type for coding
danielbate Apr 12, 2024
7b5c9cf
chore: remove experimental from ABI coder
danielbate Apr 12, 2024
26fccf1
feat: add multicall test to experimental contract
danielbate Apr 12, 2024
4041626
Merge branch 'master' into db/feat/dynamic-base-asset
danielbate Apr 15, 2024
2a4fa0a
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
danielbate Apr 15, 2024
40dfb97
Merge branch 'master' into db/feat/dynamic-base-asset
arboleya Apr 15, 2024
9213c9c
chore: forc format
danielbate Apr 15, 2024
b180bde
Merge branch 'master' into aa/chore/upgrading-forc-0.53.0
petertonysmith94 Apr 15, 2024
db8a1f5
fix: multicall issue in contract call script
danielbate Apr 16, 2024
6abc885
docs: remove redundant revert error docs
danielbate Apr 16, 2024
035102f
feat: update typegen templates
danielbate Apr 16, 2024
69fd3b2
test: update tx id for new encoding
danielbate Apr 16, 2024
68946e8
feat: enable vector tests
danielbate Apr 16, 2024
8ee87ba
Merge branch 'master' of http://github.com/FuelLabs/fuels-ts into db/…
danielbate Apr 16, 2024
654c1e3
test: adjust call params gas limits
danielbate Apr 16, 2024
b9c1621
chore: use call in std string lib tests
danielbate Apr 16, 2024
3a97943
Merge branch 'master' into aa/chore/upgrading-forc-0.53.0
arboleya Apr 16, 2024
9eadc6a
Re-generating changeset
arboleya Apr 16, 2024
2a7ceda
Merge branch 'aa/chore/upgrading-forc-0.53.0' of https://github.com/F…
danielbate Apr 16, 2024
98d8ea8
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
danielbate Apr 16, 2024
bdc6a31
fix: build
danielbate Apr 16, 2024
e02d002
Merge branch 'master' into db/feat/dynamic-base-asset
danielbate Apr 16, 2024
87a1cc4
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
danielbate Apr 17, 2024
e21b0ea
feat: update base asset id usage in new tests
danielbate Apr 17, 2024
9af7ade
Merge branch 'master' into aa/chore/upgrading-forc-0.53.0
petertonysmith94 Apr 17, 2024
dfee6e9
chore: linting
danielbate Apr 17, 2024
50b9def
fix: tests
danielbate Apr 17, 2024
3547b16
Merge branch 'aa/chore/upgrading-forc-0.53.0' into db/chore/experimen…
danielbate Apr 17, 2024
2bce803
chore: linting
danielbate Apr 17, 2024
19913b7
Merge branch 'db/chore/experimental-forc-in-all-projects' of https://…
danielbate Apr 17, 2024
5bda0c4
feat: use correct number type in script demo test
danielbate Apr 17, 2024
70c35ec
Merge branch 'master' into db/feat/dynamic-base-asset
danielbate Apr 17, 2024
dc529e0
Merge branch 'master' into db/feat/dynamic-base-asset
danielbate Apr 18, 2024
faf02f5
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into aa…
danielbate Apr 18, 2024
bb691e3
docs: pinned version of fuels for `beta-5` docs
petertonysmith94 Apr 18, 2024
d19a3de
chore: added changeset
petertonysmith94 Apr 18, 2024
0ff8743
chore: added fuelsVersion to create-fuels
petertonysmith94 Apr 18, 2024
7b58acc
chore: pinned back the create-fuels version to 0.81.0
petertonysmith94 Apr 18, 2024
4a4f3e6
fix spelling
petertonysmith94 Apr 18, 2024
35f52c8
chore: lint
petertonysmith94 Apr 18, 2024
99b93b1
chore: lint :'(
petertonysmith94 Apr 18, 2024
39031a2
Merge branch 'master' into db/feat/dynamic-base-asset
danielbate Apr 18, 2024
6f32dca
Merge branch 'master' into db/feat/dynamic-base-asset
danielbate Apr 19, 2024
cb152e8
Merge branch 'master' into db/feat/dynamic-base-asset
danielbate Apr 19, 2024
4de6c39
Merge branch 'master' into ps/docs/patch-beta-5-fuels-version
danielbate Apr 19, 2024
519ccd6
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
danielbate Apr 19, 2024
20a4875
test: skip failing tests to do with gas, arithemtic overflow and abi …
danielbate Apr 19, 2024
7508d6d
Fix spelling
petertonysmith94 Apr 19, 2024
b8d0722
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into aa…
danielbate Apr 19, 2024
3c3e47a
Merge branch 'master' into ps/docs/patch-beta-5-fuels-version
petertonysmith94 Apr 19, 2024
31f710e
chore: upgrade reentrant test to `forc@0.53.0` (#2121)
danielbate Apr 19, 2024
2261ae1
Merge branch 'aa/chore/upgrading-forc-0.53.0' of https://github.com/F…
danielbate Apr 19, 2024
851f85f
Merge branch 'master' into db/feat/dynamic-base-asset
danielbate Apr 19, 2024
9a94804
chore: update reentrant call test to check for return data reciept
danielbate Apr 19, 2024
11fb617
feat: correctly set heap registers and return data for v1 heaps
danielbate Apr 19, 2024
6eaa17e
Revert "test: skip failing tests to do with gas, arithemtic overflow …
danielbate Apr 19, 2024
b9d876a
chore: skip interface test
danielbate Apr 19, 2024
654d8d5
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
danielbate Apr 22, 2024
e507916
Upgrading `forc` to `0.55.0`
arboleya Apr 22, 2024
b457a67
Fixing broken tests
arboleya Apr 22, 2024
058601e
feat: enable option vecs and vecs in multicall
danielbate Apr 22, 2024
c147979
test: enable last multicall heap test
danielbate Apr 22, 2024
3304171
chore: linting
danielbate Apr 22, 2024
4cef4d7
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into ps…
petertonysmith94 Apr 22, 2024
6438abb
Adjusting changeset
arboleya Apr 22, 2024
5186989
Merge branch 'master' into aa/chore/upgrading-forc-0.53.0
arboleya Apr 22, 2024
9e14db5
Lintfix
arboleya Apr 22, 2024
862f8d4
Merge branch 'aa/chore/upgrading-forc-0.53.0' of https://github.com/F…
danielbate Apr 23, 2024
90c0aeb
chore: change std string doc test to use simulate
danielbate Apr 23, 2024
31c7f5d
chore: use correct return type in e2e test
danielbate Apr 23, 2024
61dde4c
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
danielbate Apr 23, 2024
d03244a
test: fix base asset ID in wallet test
danielbate Apr 23, 2024
aefd045
Merge branch 'master' into aa/chore/upgrading-forc-0.53.0
arboleya Apr 23, 2024
91b8bb8
Removing useless changeset
arboleya Apr 23, 2024
442534e
chore: remove sway patch branch
danielbate Apr 23, 2024
74e7b72
Merge branch 'aa/chore/upgrading-forc-0.53.0' into db/chore/experimen…
danielbate Apr 23, 2024
bdbd7e6
chore: use experimental encoding for abi coder
danielbate Apr 23, 2024
325c125
Merge branch 'aa/chore/upgrading-forc-0.53.0' of https://github.com/F…
danielbate Apr 23, 2024
348dff9
Merge branch 'db/chore/experimental-forc-in-all-projects' of https://…
danielbate Apr 23, 2024
3dbabdf
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into ps…
petertonysmith94 Apr 23, 2024
b6cc48b
Added fuelsInstallVersion
petertonysmith94 Apr 23, 2024
9810efa
Finalised fuels install version
petertonysmith94 Apr 23, 2024
80eeb74
Reverted changes to fuels template version
petertonysmith94 Apr 23, 2024
ba55261
Removed @ prefix from note about version
petertonysmith94 Apr 23, 2024
f091610
Added verbose note
petertonysmith94 Apr 23, 2024
3c6286e
Altered version to accept patches
petertonysmith94 Apr 23, 2024
a2152e4
Updated install version 0.82.0
petertonysmith94 Apr 23, 2024
a6c1510
Merge branch 'master' into ps/docs/patch-beta-5-fuels-version
petertonysmith94 Apr 23, 2024
d337203
Merge branch 'master' into aa/chore/upgrading-forc-0.53.0
Dhaiwat10 Apr 24, 2024
1d5fc2b
test: used named constant for tx id tx request test
danielbate Apr 24, 2024
c87509b
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
danielbate Apr 24, 2024
bbbca19
Merge branch 'aa/chore/upgrading-forc-0.53.0' of https://github.com/F…
danielbate Apr 24, 2024
c52b728
chore: changeset
danielbate Apr 24, 2024
14a7c55
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
danielbate Apr 24, 2024
b054de6
chore: fix import
danielbate Apr 24, 2024
c50ba4c
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
danielbate Apr 24, 2024
1239a4b
feat: make tx request base asset agnostic
danielbate Apr 24, 2024
5ebb1ee
test: remove base asset id from deploy contract tests
danielbate Apr 24, 2024
0e01463
test: cleanup further redundant base assets
danielbate Apr 24, 2024
e610ccf
chore: linting
danielbate Apr 24, 2024
d0bc963
test: remove redundant base asset ID
danielbate Apr 24, 2024
0767b4c
chore: disable pr release
danielbate Apr 24, 2024
55242b2
Merge branch 'db/chore/experimental-forc-in-all-projects' of https://…
danielbate Apr 24, 2024
34b4f48
Merge branch 'master' into ps/docs/patch-beta-5-fuels-version
danielbate Apr 24, 2024
64b5133
Merge branch 'ps/docs/patch-beta-5-fuels-version' into aa/chore/upgra…
Torres-ssf Apr 24, 2024
710f154
Merge branch 'aa/chore/upgrading-forc-0.53.0' into db/chore/experimen…
Torres-ssf Apr 24, 2024
b30b796
Merge branch 'db/chore/experimental-forc-in-all-projects' into db/fea…
Torres-ssf Apr 24, 2024
7246162
test: update script assertion to use correct type
danielbate Apr 24, 2024
55703b8
chore: litning
danielbate Apr 24, 2024
d529874
Rolling back verbosity increase
arboleya Apr 24, 2024
c13e148
Tyop
arboleya Apr 24, 2024
f627c3a
Merge branch 'master' into ps/docs/patch-beta-5-fuels-version
danielbate Apr 24, 2024
a9bc90b
Merge branch 'ps/docs/patch-beta-5-fuels-version' into aa/chore/upgra…
danielbate Apr 24, 2024
adeccb4
Merge branch 'aa/chore/upgrading-forc-0.53.0' into db/chore/experimen…
danielbate Apr 24, 2024
3984b05
Merge branch 'db/chore/experimental-forc-in-all-projects' into db/fea…
danielbate Apr 24, 2024
2318426
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
danielbate Apr 24, 2024
ba17ced
Merge branch 'db/feat/dynamic-base-asset' of https://github.com/FuelL…
danielbate Apr 24, 2024
567c34a
chore: fix changes in merged tests
danielbate Apr 24, 2024
0ee534d
chore: linting
danielbate Apr 24, 2024
83e4e1d
docs: correct base asset ID doc
danielbate Apr 25, 2024
8d5380b
chore: fix deploy contract options
danielbate Apr 25, 2024
075e955
chore: fix deploy contract options
danielbate Apr 25, 2024
816196f
chore: fix deploy contract options
danielbate Apr 25, 2024
147a9a4
fix: undefined val in coin quanitity
danielbate Apr 25, 2024
cf5e2ce
chore: revert update deps (#2157)
petertonysmith94 Apr 24, 2024
a5b1407
Removed `fuelsInstallVersion`
petertonysmith94 Apr 25, 2024
6896e59
Update apps/docs/src/guide/fuels-cli/commands.md
petertonysmith94 Apr 25, 2024
c57b6c9
Update apps/docs/src/guide/fuels-cli/commands.md
petertonysmith94 Apr 25, 2024
bad37a1
Merge branch 'ps/docs/patch-beta-5-fuels-version' into aa/chore/upgra…
arboleya Apr 25, 2024
9592ca2
Merge branch 'aa/chore/upgrading-forc-0.53.0' into db/chore/experimen…
arboleya Apr 25, 2024
5d09cc5
Merge branch 'db/chore/experimental-forc-in-all-projects' into db/fea…
arboleya Apr 25, 2024
bdebab4
chore: fix changeset
danielbate Apr 25, 2024
be3accd
Using hardcoded snippet temporarily
arboleya Apr 25, 2024
b6b0a87
Removing region notations from hardcoded snippet
arboleya Apr 25, 2024
9c08722
Merge branch 'aa/chore/upgrading-forc-0.53.0' into db/chore/experimen…
Torres-ssf Apr 25, 2024
f0189a9
Merge branch 'db/chore/experimental-forc-in-all-projects' into db/fea…
Torres-ssf Apr 25, 2024
d00b56d
Merge branch 'master' into aa/chore/upgrading-forc-0.53.0
arboleya Apr 25, 2024
e726f09
Merge branch 'aa/chore/upgrading-forc-0.53.0' into db/chore/experimen…
danielbate Apr 25, 2024
8f8bf60
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
danielbate Apr 25, 2024
2f40f9b
Merge branch 'db/chore/experimental-forc-in-all-projects' of https://…
danielbate Apr 25, 2024
bec0c23
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
danielbate Apr 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 9 additions & 0 deletions .changeset/calm-mails-wash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@fuel-ts/abi-typegen": minor
"@fuel-ts/abi-coder": minor
"@fuel-ts/program": minor
"@fuel-ts/script": minor
"@fuel-ts/utils": minor
---

feat!: enabling v1 encoding for everything
9 changes: 9 additions & 0 deletions .changeset/nine-oranges-impress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@fuel-ts/account": minor
"@fuel-ts/address": minor
"@fuel-ts/program": minor
"@fuel-ts/script": minor
"@fuel-ts/utils": minor
---

feat!: fetch base asset ID from chain
9 changes: 9 additions & 0 deletions .changeset/ninety-hotels-impress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@fuel-ts/abi-typegen": patch
"@fuel-ts/interfaces": patch
"@fuel-ts/versions": patch
"@fuel-ts/address": patch
"@fuel-ts/forc": patch
---

chore!: upgrading `forc` to `0.55.0`
2 changes: 2 additions & 0 deletions .changeset/sixty-actors-rescue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
3 changes: 2 additions & 1 deletion .fuel-core/configs/chainConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,8 @@
"fee_params": {
"gas_price_factor": 92,
"gas_per_byte": 4
}
},
"base_asset_id": "0x0000000000000000000000000000000000000000000000000000000000000000"
},
"gas_costs": {
"add": 1,
Expand Down
18 changes: 0 additions & 18 deletions .github/actions/test-setup/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,3 @@ runs:
- name: Build
run: pnpm build
shell: bash

- name: Install rust toolchain
uses: dtolnay/rust-toolchain@stable
# selecting a toolchain either by action or manual `rustup` calls should happen
# before the cache plugin, as it uses the current rustc version as its cache key
- uses: Swatinem/rust-cache@v2
with:
prefix-key: "v1-rust"

- name: Install forc for experimental builds
shell: bash
run: |
curl https://install.fuel.network > install-fuelup.sh
chmod +x install-fuelup.sh
./install-fuelup.sh --no-modify-path --skip-toolchain-installation
export PATH="${HOME}/.fuelup/bin:${PATH}"
fuelup toolchain new forc-experimental
fuelup component add forc@$(cat ./packages/forc/VERSION_EXPERIMENTAL)
2 changes: 1 addition & 1 deletion .github/workflows/pr-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
name: "Release PR to npm"
runs-on: ubuntu-latest
# comment out if:false to enable release PR to npm
if: false
# if: false
danielbate marked this conversation as resolved.
Show resolved Hide resolved
permissions: write-all
steps:
- name: Checkout
Expand Down
22 changes: 14 additions & 8 deletions apps/demo-fuels/src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@
import { generateTestWallet } from '@fuel-ts/account/test-utils';
import { safeExec } from '@fuel-ts/errors/test-utils';
import type { BN } from 'fuels';
import { ContractFactory, Provider, toHex, BaseAssetId, Wallet, FUEL_NETWORK_URL } from 'fuels';
import { ContractFactory, Provider, toHex, Wallet, FUEL_NETWORK_URL } from 'fuels';

import { SampleAbi__factory } from './sway-programs-api';
import bytecode from './sway-programs-api/contracts/SampleAbi.hex';

let gasPrice: BN;
let baseAssetId: string;

/**
* @group node
Expand All @@ -22,11 +23,12 @@ describe('ExampleContract', () => {
beforeAll(async () => {
const provider = await Provider.create(FUEL_NETWORK_URL);
({ minGasPrice: gasPrice } = provider.getGasConfig());
baseAssetId = provider.getBaseAssetId();
});

it('should return the input', async () => {
const provider = await Provider.create(FUEL_NETWORK_URL);
const wallet = await generateTestWallet(provider, [[500_000, BaseAssetId]]);
const wallet = await generateTestWallet(provider, [[500_000, baseAssetId]]);

// Deploy
const factory = new ContractFactory(bytecode, SampleAbi__factory.abi, wallet);
Expand All @@ -46,10 +48,12 @@ describe('ExampleContract', () => {

it('deployContract method', async () => {
const provider = await Provider.create(FUEL_NETWORK_URL);
const wallet = await generateTestWallet(provider, [[500_000, BaseAssetId]]);
const wallet = await generateTestWallet(provider, [[500_000, baseAssetId]]);

// Deploy
const contract = await SampleAbi__factory.deployContract(bytecode, wallet, { gasPrice });
const contract = await SampleAbi__factory.deployContract(bytecode, wallet, {
gasPrice
});

// Call
const { value } = await contract.functions.return_input(1337).call();
Expand All @@ -60,7 +64,7 @@ describe('ExampleContract', () => {

it('should throw when simulating via contract factory with wallet with no resources', async () => {
const provider = await Provider.create(FUEL_NETWORK_URL);
const fundedWallet = await generateTestWallet(provider, [[500_000, BaseAssetId]]);
const fundedWallet = await generateTestWallet(provider, [[500_000, baseAssetId]]);
const unfundedWallet = Wallet.generate({ provider });

const factory = new ContractFactory(bytecode, SampleAbi__factory.abi, fundedWallet);
Expand All @@ -76,7 +80,7 @@ describe('ExampleContract', () => {

it('should not throw when dry running via contract factory with wallet with no resources', async () => {
const provider = await Provider.create(FUEL_NETWORK_URL);
const fundedWallet = await generateTestWallet(provider, [[500_000, BaseAssetId]]);
const fundedWallet = await generateTestWallet(provider, [[500_000, baseAssetId]]);
const unfundedWallet = Wallet.generate({ provider });

const factory = new ContractFactory(bytecode, SampleAbi__factory.abi, fundedWallet);
Expand All @@ -88,8 +92,10 @@ describe('ExampleContract', () => {

it('should demo how to use generated files just fine', async () => {
const provider = await Provider.create(FUEL_NETWORK_URL);
const wallet = await generateTestWallet(provider, [[500_000, BaseAssetId]]);
const depoloyed = await SampleAbi__factory.deployContract(bytecode, wallet, { gasPrice });
const wallet = await generateTestWallet(provider, [[500_000, baseAssetId]]);
const depoloyed = await SampleAbi__factory.deployContract(bytecode, wallet, {
gasPrice
});
const contractsIds = {
sample: depoloyed.id,
};
Expand Down
4 changes: 2 additions & 2 deletions apps/demo-nextjs/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import * as asm from "@fuels/vm-asm";
import { BaseAssetId, decrypt, encrypt } from "fuels";
import { ZeroBytes32, decrypt, encrypt } from "fuels";
import Image from "next/image";

import styles from "./page.module.css";

export default function Home() {
const { log } = console;

log("Hello Fuels", BaseAssetId, encrypt, decrypt);
log("Hello Fuels", ZeroBytes32, encrypt, decrypt);
log("Hello ASM", asm);

return (
Expand Down
4 changes: 2 additions & 2 deletions apps/demo-react-cra/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import React from "react";
import logo from "./logo.svg";
import "./App.css";
import { BaseAssetId, encrypt, decrypt, bn } from "fuels";
import { ZeroBytes32, encrypt, decrypt, bn } from "fuels";
import * as asm from "@fuels/vm-asm";

function App() {
const { log } = console;

log("Hello Fuels", BaseAssetId, encrypt, decrypt);
log("Hello Fuels", ZeroBytes32, encrypt, decrypt);
log("Hello ASM", asm);
log("Hello BN", bn(1000));

Expand Down
4 changes: 2 additions & 2 deletions apps/demo-react-vite/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import viteLogo from "/vite.svg";
import "./App.css";

import * as asm from "@fuels/vm-asm";
import { BaseAssetId, encrypt, decrypt } from "fuels";
import { ZeroBytes32, encrypt, decrypt } from "fuels";

function App() {
const [count, setCount] = useState(0);

const { log } = console;

log("Hello Fuels", BaseAssetId, encrypt, decrypt);
log("Hello Fuels", ZeroBytes32, encrypt, decrypt);
log("Hello ASM", asm);

return (
Expand Down
6 changes: 3 additions & 3 deletions apps/demo-typegen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"scripts": {
"pretest": "run-s build:forc build:types",
"build:forc": "run-p forc:*",
"forc:contract": "pnpm fuels-forc build -p contract --release",
"forc:script": "pnpm fuels-forc build -p script --release",
"forc:predicate": "pnpm fuels-forc build -p predicate --release",
"forc:contract": "pnpm fuels-forc build -p contract --release --experimental-new-encoding",
"forc:script": "pnpm fuels-forc build -p script --release --experimental-new-encoding",
"forc:predicate": "pnpm fuels-forc build -p predicate --release --experimental-new-encoding",
"build:types": "run-p types:*",
"types:contract": "pnpm fuels typegen -i contract/out/release/demo-contract-abi.json -o src/contract-types",
"types:script": "pnpm fuels typegen -i script/out/release/script-abi.json -o src/script-types --script",
Expand Down
37 changes: 16 additions & 21 deletions apps/demo-typegen/src/demo.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,7 @@
import { generateTestWallet } from '@fuel-ts/account/test-utils';
import { safeExec } from '@fuel-ts/errors/test-utils';
import type { BN } from 'fuels';
import {
ContractFactory,
Provider,
toHex,
BaseAssetId,
Wallet,
FUEL_NETWORK_URL,
Address,
} from 'fuels';
import { ContractFactory, Provider, toHex, Wallet, FUEL_NETWORK_URL, Address } from 'fuels';

import storageSlots from '../contract/out/release/demo-contract-storage_slots.json';

Expand All @@ -21,6 +13,7 @@ import { PredicateAbi__factory } from './predicate-types';
import { ScriptAbi__factory } from './script-types';

let gasPrice: BN;
let baseAssetId: string;

/**
* @group node
Expand All @@ -29,10 +22,11 @@ describe('ExampleContract', () => {
beforeAll(async () => {
const provider = await Provider.create(FUEL_NETWORK_URL);
({ minGasPrice: gasPrice } = provider.getGasConfig());
baseAssetId = provider.getBaseAssetId();
});
it('with imported storage slots', async () => {
const provider = await Provider.create(FUEL_NETWORK_URL);
const wallet = await generateTestWallet(provider, [[500_000, BaseAssetId]]);
const wallet = await generateTestWallet(provider, [[500_000, baseAssetId]]);

// #region typegen-demo-contract-storage-slots
// #context import storageSlots from './contract/out/debug/demo-contract-storage_slots.json';
Expand All @@ -47,7 +41,7 @@ describe('ExampleContract', () => {
});
it('should return the input', async () => {
const provider = await Provider.create(FUEL_NETWORK_URL);
const wallet = await generateTestWallet(provider, [[500_000, BaseAssetId]]);
const wallet = await generateTestWallet(provider, [[500_000, baseAssetId]]);

// Deploy
const factory = new ContractFactory(bytecode, DemoContractAbi__factory.abi, wallet);
Expand All @@ -72,14 +66,16 @@ describe('ExampleContract', () => {

it('deployContract method', async () => {
const provider = await Provider.create(FUEL_NETWORK_URL);
const wallet = await generateTestWallet(provider, [[500_000, BaseAssetId]]);
const wallet = await generateTestWallet(provider, [[500_000, baseAssetId]]);

// #region typegen-demo-contract-factory-deploy
// #context import { DemoContractAbi__factory } from './types';
// #context import bytecode from './types/DemoContractAbi.hex';

// Deploy
const contract = await DemoContractAbi__factory.deployContract(bytecode, wallet, { gasPrice });
const contract = await DemoContractAbi__factory.deployContract(bytecode, wallet, {
gasPrice,
});
// #endregion typegen-demo-contract-factory-deploy

// Call
Expand All @@ -93,7 +89,7 @@ describe('ExampleContract', () => {

it('should throw when simulating via contract factory with wallet with no resources', async () => {
const provider = await Provider.create(FUEL_NETWORK_URL);
const fundedWallet = await generateTestWallet(provider, [[500_000, BaseAssetId]]);
const fundedWallet = await generateTestWallet(provider, [[500_000, baseAssetId]]);
const unfundedWallet = Wallet.generate({ provider });

const factory = new ContractFactory(bytecode, DemoContractAbi__factory.abi, fundedWallet);
Expand All @@ -107,7 +103,7 @@ it('should throw when simulating via contract factory with wallet with no resour

it('should not throw when dry running via contract factory with wallet with no resources', async () => {
const provider = await Provider.create(FUEL_NETWORK_URL);
const fundedWallet = await generateTestWallet(provider, [[500_000, BaseAssetId]]);
const fundedWallet = await generateTestWallet(provider, [[500_000, baseAssetId]]);
const unfundedWallet = Wallet.generate({ provider });

const factory = new ContractFactory(bytecode, DemoContractAbi__factory.abi, fundedWallet);
Expand All @@ -119,16 +115,15 @@ it('should not throw when dry running via contract factory with wallet with no r

test('Example script', async () => {
const provider = await Provider.create(FUEL_NETWORK_URL);
const wallet = await generateTestWallet(provider, [[500_000, BaseAssetId]]);
const wallet = await generateTestWallet(provider, [[500_000, baseAssetId]]);

// #region typegen-demo-script
// #context import { ScriptAbi__factory } from './types';

const script = ScriptAbi__factory.createInstance(wallet);
const { value } = await script.functions.main().call();
// #endregion typegen-demo-script
// @ts-expect-error TODO: investitage - typegen is expecting value to be a number but the value being returned is the string '0xa'
expect(value.toNumber()).toBe(10);
expect(value).toStrictEqual(10);
});

test('Example predicate', async () => {
Expand All @@ -138,19 +133,19 @@ test('Example predicate', async () => {

// In this exchange, we are first transferring some coins to the predicate
const provider = await Provider.create(FUEL_NETWORK_URL);
const wallet = await generateTestWallet(provider, [[500_000, BaseAssetId]]);
const wallet = await generateTestWallet(provider, [[500_000, baseAssetId]]);
const receiver = Wallet.fromAddress(Address.fromRandom(), provider);

const predicateData: PredicateAbiInputs = [];
const predicate = PredicateAbi__factory.createInstance(provider, predicateData);

const tx = await wallet.transfer(predicate.address, 100_000, BaseAssetId);
const tx = await wallet.transfer(predicate.address, 100_000, baseAssetId);
await tx.wait();

const initialPredicateBalance = await predicate.getBalance();

// Then we are transferring some coins from the predicate to a random address (receiver)
const tx2 = await predicate.transfer(receiver.address, 50_000, BaseAssetId, {
const tx2 = await predicate.transfer(receiver.address, 50_000, baseAssetId, {
gasPrice: provider.getGasConfig().minGasPrice,
gasLimit: 50,
});
Expand Down
2 changes: 1 addition & 1 deletion apps/docs-snippets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"private": true,
"scripts": {
"pretest": "pnpm build:forc",
"build:forc": "pnpm fuels-forc build -p test/fixtures/forc-projects --release"
"build:forc": "pnpm fuels-forc build -p test/fixtures/forc-projects --release --experimental-new-encoding"
},
"devDependencies": {
"@fuel-ts/account": "workspace:*",
Expand Down
14 changes: 8 additions & 6 deletions apps/docs-snippets/src/guide/contracts/add-transfer.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ASSET_A, ASSET_B } from '@fuel-ts/utils/test-utils';
import type { Account, Contract, Provider } from 'fuels';
import { BaseAssetId, Wallet } from 'fuels';
import { Wallet } from 'fuels';

import { DocSnippetProjectsEnum } from '../../../test/fixtures/forc-projects';
import { createAndDeployContractFromProject, getTestWallet } from '../../utils';
Expand All @@ -12,12 +12,14 @@ describe(__filename, () => {
let contract: Contract;
let provider: Provider;
let wallet: Account;
let baseAssetId: string;

beforeAll(async () => {
contract = await createAndDeployContractFromProject(DocSnippetProjectsEnum.ECHO_VALUES);
provider = contract.provider;
baseAssetId = provider.getBaseAssetId();
wallet = await getTestWallet([
[5000, BaseAssetId],
[5000, baseAssetId],
[5000, ASSET_A],
[5000, ASSET_B],
]);
Expand All @@ -29,10 +31,10 @@ describe(__filename, () => {
// #region add-transfer-1
const recipient = Wallet.generate({ provider });

await contract.functions.echo_u64(100).addTransfer(recipient.address, 100, BaseAssetId).call();
await contract.functions.echo_u64(100).addTransfer(recipient.address, 100, baseAssetId).call();
// #endregion add-transfer-1

const recipientBalance = await recipient.getBalance(BaseAssetId);
const recipientBalance = await recipient.getBalance(baseAssetId);

expect(recipientBalance.toNumber()).toBe(100);
});
Expand All @@ -44,13 +46,13 @@ describe(__filename, () => {

await contract.functions
.echo_u64(100)
.addTransfer(recipient1.address, 100, BaseAssetId)
.addTransfer(recipient1.address, 100, baseAssetId)
.addTransfer(recipient1.address, 400, ASSET_A)
.addTransfer(recipient2.address, 300, ASSET_B)
.call();
// #endregion add-transfer-2

const recipient1BalanceBaseAsset = await recipient1.getBalance(BaseAssetId);
const recipient1BalanceBaseAsset = await recipient1.getBalance(baseAssetId);
const recipient1BalanceAssetA = await recipient1.getBalance(ASSET_A);

const recipient2BalanceAssetB = await recipient2.getBalance(ASSET_B);
Expand Down