Commit graph

15 commits

Author SHA1 Message Date
IGI-111
b68a3861db
Bump to v0.69.1 (#7289)
Some checks are pending
CI / forc-fmt-check-sway-examples (push) Waiting to run
CI / forc-fmt-check-panic (push) Waiting to run
CI / check-sdk-harness-test-suite-compatibility (push) Waiting to run
CI / build-mdbook (push) Waiting to run
CI / build-forc-doc-sway-lib-std (push) Waiting to run
CI / build-forc-test-project (push) Waiting to run
CI / cargo-build-workspace (push) Waiting to run
CI / cargo-clippy (push) Waiting to run
CI / cargo-toml-fmt-check (push) Waiting to run
CI / cargo-fmt-check (push) Waiting to run
CI / cargo-run-e2e-test (push) Blocked by required conditions
CI / cargo-run-e2e-test-release (push) Blocked by required conditions
CI / cargo-run-e2e-test-evm (push) Waiting to run
CI / cargo-test-lib-std (push) Waiting to run
CI / forc-run-benchmarks (push) Waiting to run
CI / forc-unit-tests (push) Waiting to run
CI / forc-pkg-fuels-deps-check (push) Waiting to run
CI / cargo-test-forc-debug (push) Blocked by required conditions
CI / cargo-test-forc-client (push) Blocked by required conditions
CI / cargo-test-forc-node (push) Blocked by required conditions
github pages / deploy (push) Waiting to run
CI / cargo-test-sway-lsp (push) Waiting to run
CI / cargo-test-forc (push) Waiting to run
CI / cargo-test-workspace (push) Waiting to run
CI / cargo-unused-deps-check (push) Waiting to run
CI / notify-slack-on-failure (push) Blocked by required conditions
CI / pre-publish-check (push) Waiting to run
CI / publish (push) Blocked by required conditions
CI / publish-sway-lib-std (push) Blocked by required conditions
CI / Build and upload forc binaries to release (push) Blocked by required conditions
2025-07-17 11:48:56 -07:00
zees-dev
5c22e33987
Bump/0.69.0 (#7248)
Some checks failed
CI / forc-fmt-check-panic (push) Has been cancelled
CI / check-sdk-harness-test-suite-compatibility (push) Has been cancelled
CI / build-mdbook (push) Has been cancelled
CI / build-forc-doc-sway-lib-std (push) Has been cancelled
CI / build-forc-test-project (push) Has been cancelled
CI / cargo-build-workspace (push) Has been cancelled
CI / cargo-clippy (push) Has been cancelled
CI / cargo-toml-fmt-check (push) Has been cancelled
CI / cargo-fmt-check (push) Has been cancelled
CI / cargo-run-e2e-test-evm (push) Has been cancelled
CI / cargo-test-lib-std (push) Has been cancelled
CI / forc-run-benchmarks (push) Has been cancelled
CI / forc-unit-tests (push) Has been cancelled
CI / forc-pkg-fuels-deps-check (push) Has been cancelled
CI / cargo-test-sway-lsp (push) Has been cancelled
CI / cargo-test-forc (push) Has been cancelled
CI / cargo-test-workspace (push) Has been cancelled
CI / cargo-unused-deps-check (push) Has been cancelled
CI / pre-publish-check (push) Has been cancelled
github pages / deploy (push) Has been cancelled
CI / verifications-complete (push) Has been cancelled
CI / cargo-run-e2e-test (push) Has been cancelled
CI / cargo-run-e2e-test-release (push) Has been cancelled
CI / cargo-test-forc-debug (push) Has been cancelled
CI / cargo-test-forc-client (push) Has been cancelled
CI / cargo-test-forc-node (push) Has been cancelled
CI / notify-slack-on-failure (push) Has been cancelled
CI / publish (push) Has been cancelled
CI / publish-sway-lib-std (push) Has been cancelled
CI / Build and upload forc binaries to release (push) Has been cancelled
## Description

This pull request updates the version of all workspace packages and
dependencies from `0.68.9` to `0.69.0` in preparation for a new release.

## Checklist

- [ ] I have linked to any relevant issues.
- [ ] I have commented my code, particularly in hard-to-understand
areas.
- [ ] I have updated the documentation where relevant (API docs, the
reference, and the Sway book).
- [ ] If my change requires substantial documentation changes, I have
[requested support from the DevRel
team](https://github.com/FuelLabs/devrel-requests/issues/new/choose)
- [ ] I have added tests that prove my fix is effective or that my
feature works.
- [ ] I have added (or requested a maintainer to add) the necessary
`Breaking*` or `New Feature` labels where relevant.
- [ ] I have done my best to ensure that my PR adheres to [the Fuel Labs
Code Review
Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md).
- [ ] I have requested a review from the relevant team or maintainers.

---------

Co-authored-by: z <zees-dev@users.noreply.github.com>
Co-authored-by: IGI-111 <igi-111@protonmail.com>
2025-06-23 19:25:04 +04:00
Joshua Batty
e054b39628
bump to 0.68.9 (#7247)
Some checks are pending
CI / forc-fmt-check-sway-lib-std (push) Waiting to run
CI / forc-fmt-check-sway-examples (push) Waiting to run
CI / forc-fmt-check-panic (push) Waiting to run
CI / check-sdk-harness-test-suite-compatibility (push) Waiting to run
CI / build-mdbook (push) Waiting to run
CI / build-forc-doc-sway-lib-std (push) Waiting to run
CI / build-forc-test-project (push) Waiting to run
CI / cargo-build-workspace (push) Waiting to run
CI / cargo-clippy (push) Waiting to run
CI / cargo-toml-fmt-check (push) Waiting to run
CI / cargo-fmt-check (push) Waiting to run
CI / cargo-run-e2e-test (push) Blocked by required conditions
CI / cargo-run-e2e-test-release (push) Blocked by required conditions
CI / cargo-run-e2e-test-evm (push) Waiting to run
CI / cargo-test-lib-std (push) Waiting to run
CI / forc-run-benchmarks (push) Waiting to run
CI / forc-pkg-fuels-deps-check (push) Waiting to run
CI / cargo-test-forc-debug (push) Blocked by required conditions
CI / cargo-test-forc-client (push) Blocked by required conditions
CI / cargo-test-forc-node (push) Blocked by required conditions
CI / cargo-test-sway-lsp (push) Waiting to run
CI / cargo-test-forc (push) Waiting to run
CI / cargo-test-workspace (push) Waiting to run
CI / cargo-unused-deps-check (push) Waiting to run
CI / notify-slack-on-failure (push) Blocked by required conditions
CI / pre-publish-check (push) Waiting to run
CI / publish (push) Blocked by required conditions
CI / publish-sway-lib-std (push) Blocked by required conditions
CI / Build and upload forc binaries to release (push) Blocked by required conditions
github pages / deploy (push) Waiting to run
## Description
~~waiting on #7246 which fixes a critical bug in `forc pkg`~~

## Checklist

- [x] I have linked to any relevant issues.
- [ ] I have commented my code, particularly in hard-to-understand
areas.
- [ ] I have updated the documentation where relevant (API docs, the
reference, and the Sway book).
- [ ] If my change requires substantial documentation changes, I have
[requested support from the DevRel
team](https://github.com/FuelLabs/devrel-requests/issues/new/choose)
- [ ] I have added tests that prove my fix is effective or that my
feature works.
- [ ] I have added (or requested a maintainer to add) the necessary
`Breaking*` or `New Feature` labels where relevant.
- [ ] I have done my best to ensure that my PR adheres to [the Fuel Labs
Code Review
Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md).
- [ ] I have requested a review from the relevant team or maintainers.

---------

Co-authored-by: IGI-111 <igi-111@protonmail.com>
2025-06-23 16:09:30 +10:00
IGI-111
b9ac2a9bdb
Bump to 0.68.8 (#7235)
waiting on #7214
2025-06-19 02:35:35 +04:00
IGI-111
58bf38ef9c
Bump to 0.68.7 (#7219)
Some checks are pending
CI / forc-fmt-check-panic (push) Waiting to run
CI / check-sdk-harness-test-suite-compatibility (push) Waiting to run
CI / cargo-build-workspace (push) Waiting to run
CI / build-mdbook (push) Waiting to run
CI / cargo-test-sway-lsp (push) Waiting to run
CI / build-forc-doc-sway-lib-std (push) Waiting to run
CI / build-forc-test-project (push) Waiting to run
CI / cargo-clippy (push) Waiting to run
CI / cargo-toml-fmt-check (push) Waiting to run
CI / cargo-fmt-check (push) Waiting to run
CI / cargo-test-forc (push) Waiting to run
CI / cargo-run-e2e-test (push) Blocked by required conditions
CI / cargo-run-e2e-test-release (push) Blocked by required conditions
CI / cargo-run-e2e-test-evm (push) Waiting to run
CI / cargo-test-lib-std (push) Waiting to run
CI / forc-run-benchmarks (push) Waiting to run
CI / forc-pkg-fuels-deps-check (push) Waiting to run
CI / cargo-test-forc-debug (push) Blocked by required conditions
CI / cargo-test-forc-client (push) Blocked by required conditions
CI / cargo-test-forc-node (push) Blocked by required conditions
CI / cargo-test-workspace (push) Waiting to run
CI / cargo-unused-deps-check (push) Waiting to run
CI / notify-slack-on-failure (push) Blocked by required conditions
CI / pre-publish-check (push) Waiting to run
CI / publish (push) Blocked by required conditions
CI / build-publish-master-image (push) Blocked by required conditions
CI / publish-sway-lib-std (push) Blocked by required conditions
CI / build-publish-release-image (push) Blocked by required conditions
CI / Build and upload forc binaries to release (push) Blocked by required conditions
github pages / deploy (push) Waiting to run
2025-06-04 09:11:55 -03:00
IGI-111
5d8a240cce
Bump to 0.68.6 (#7200)
Some checks are pending
CI / build-mdbook (push) Waiting to run
CI / build-forc-doc-sway-lib-std (push) Waiting to run
CI / build-forc-test-project (push) Waiting to run
CI / cargo-build-workspace (push) Waiting to run
CI / cargo-clippy (push) Waiting to run
CI / cargo-toml-fmt-check (push) Waiting to run
CI / cargo-run-e2e-test (push) Blocked by required conditions
CI / forc-run-benchmarks (push) Waiting to run
CI / cargo-test-forc-client (push) Blocked by required conditions
CI / build-publish-master-image (push) Blocked by required conditions
CI / forc-fmt-check-sway-examples (push) Waiting to run
CI / forc-fmt-check-panic (push) Waiting to run
CI / check-sdk-harness-test-suite-compatibility (push) Waiting to run
CI / cargo-run-e2e-test-release (push) Blocked by required conditions
CI / cargo-run-e2e-test-evm (push) Waiting to run
CI / cargo-test-lib-std (push) Waiting to run
CI / forc-pkg-fuels-deps-check (push) Waiting to run
CI / cargo-test-forc-debug (push) Blocked by required conditions
CI / cargo-test-forc-node (push) Blocked by required conditions
CI / cargo-test-sway-lsp (push) Waiting to run
CI / cargo-test-forc (push) Waiting to run
CI / cargo-test-workspace (push) Waiting to run
CI / cargo-unused-deps-check (push) Waiting to run
CI / notify-slack-on-failure (push) Blocked by required conditions
CI / pre-publish-check (push) Waiting to run
CI / publish (push) Blocked by required conditions
CI / publish-sway-lib-std (push) Blocked by required conditions
CI / build-publish-release-image (push) Blocked by required conditions
CI / Build and upload forc binaries to release (push) Blocked by required conditions
github pages / deploy (push) Waiting to run
2025-05-28 13:02:56 +04:00
Sophie Dankel
512bbfccdb
chore: bump to 0.68.5 (#7185)
## Description


## Checklist

- [ ] I have linked to any relevant issues.
- [ ] I have commented my code, particularly in hard-to-understand
areas.
- [ ] I have updated the documentation where relevant (API docs, the
reference, and the Sway book).
- [ ] If my change requires substantial documentation changes, I have
[requested support from the DevRel
team](https://github.com/FuelLabs/devrel-requests/issues/new/choose)
- [ ] I have added tests that prove my fix is effective or that my
feature works.
- [ ] I have added (or requested a maintainer to add) the necessary
`Breaking*` or `New Feature` labels where relevant.
- [ ] I have done my best to ensure that my PR adheres to [the Fuel Labs
Code Review
Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md).
- [ ] I have requested a review from the relevant team or maintainers.
2025-05-20 08:47:20 -07:00
Sophie Dankel
1fb61fdc42
chore: bump to v0.68.4 (#7171)
Some checks are pending
CI / cargo-test-workspace (push) Waiting to run
CI / cargo-unused-deps-check (push) Waiting to run
CI / get-fuel-core-version (push) Waiting to run
CI / verifications-complete (push) Blocked by required conditions
CI / check-dependency-version-formats (push) Waiting to run
CI / check-forc-manifest-version (push) Waiting to run
CI / check-sdk-harness-test-suite-compatibility (push) Waiting to run
CI / build-mdbook (push) Waiting to run
CI / build-forc-doc-sway-lib-std (push) Waiting to run
CI / build-forc-test-project (push) Waiting to run
CI / cargo-build-workspace (push) Waiting to run
CI / cargo-clippy (push) Waiting to run
CI / cargo-toml-fmt-check (push) Waiting to run
CI / cargo-run-e2e-test-release (push) Blocked by required conditions
CI / cargo-run-e2e-test-evm (push) Waiting to run
CI / cargo-test-lib-std (push) Waiting to run
CI / forc-run-benchmarks (push) Waiting to run
CI / forc-unit-tests (push) Waiting to run
CI / forc-pkg-fuels-deps-check (push) Waiting to run
CI / cargo-test-forc-debug (push) Blocked by required conditions
CI / cargo-test-forc-client (push) Blocked by required conditions
CI / cargo-test-forc-node (push) Blocked by required conditions
CI / notify-slack-on-failure (push) Blocked by required conditions
CI / pre-publish-check (push) Waiting to run
CI / publish (push) Blocked by required conditions
CI / build-publish-master-image (push) Blocked by required conditions
CI / publish-sway-lib-std (push) Blocked by required conditions
CI / build-publish-release-image (push) Blocked by required conditions
CI / Build and upload forc binaries to release (push) Blocked by required conditions
github pages / deploy (push) Waiting to run
## Description


## Checklist

- [ ] I have linked to any relevant issues.
- [ ] I have commented my code, particularly in hard-to-understand
areas.
- [ ] I have updated the documentation where relevant (API docs, the
reference, and the Sway book).
- [ ] If my change requires substantial documentation changes, I have
[requested support from the DevRel
team](https://github.com/FuelLabs/devrel-requests/issues/new/choose)
- [ ] I have added tests that prove my fix is effective or that my
feature works.
- [ ] I have added (or requested a maintainer to add) the necessary
`Breaking*` or `New Feature` labels where relevant.
- [ ] I have done my best to ensure that my PR adheres to [the Fuel Labs
Code Review
Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md).
- [ ] I have requested a review from the relevant team or maintainers.
2025-05-14 10:29:12 +10:00
Sophie Dankel
48d95fc22e
chore: bump to 0.68.3 (#7167)
## Description


## Checklist

- [ ] I have linked to any relevant issues.
- [ ] I have commented my code, particularly in hard-to-understand
areas.
- [ ] I have updated the documentation where relevant (API docs, the
reference, and the Sway book).
- [ ] If my change requires substantial documentation changes, I have
[requested support from the DevRel
team](https://github.com/FuelLabs/devrel-requests/issues/new/choose)
- [ ] I have added tests that prove my fix is effective or that my
feature works.
- [ ] I have added (or requested a maintainer to add) the necessary
`Breaking*` or `New Feature` labels where relevant.
- [ ] I have done my best to ensure that my PR adheres to [the Fuel Labs
Code Review
Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md).
- [ ] I have requested a review from the relevant team or maintainers.
2025-05-12 21:14:29 -07:00
Sophie Dankel
a37e3cdc99
ci: Ensure that std-lib version matches forc version (#7154)
## Description

Sway `std` library will be released when `forc` is released. To keep it
simple, we'll ensure that the version of sway `std` matches the version
of `forc`. This PR adds a CI step to enforce this.

## Checklist

- [ ] I have linked to any relevant issues.
- [ ] I have commented my code, particularly in hard-to-understand
areas.
- [ ] I have updated the documentation where relevant (API docs, the
reference, and the Sway book).
- [ ] If my change requires substantial documentation changes, I have
[requested support from the DevRel
team](https://github.com/FuelLabs/devrel-requests/issues/new/choose)
- [ ] I have added tests that prove my fix is effective or that my
feature works.
- [ ] I have added (or requested a maintainer to add) the necessary
`Breaking*` or `New Feature` labels where relevant.
- [ ] I have done my best to ensure that my PR adheres to [the Fuel Labs
Code Review
Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md).
- [ ] I have requested a review from the relevant team or maintainers.
2025-05-08 08:12:35 +04:00
Sophie Dankel
f46a2dc453
chore: add more information to lib-std project manifest (#7003)
## Description

These fields will be used when the package is published to forc.pub
registry.

## Checklist

- [ ] I have linked to any relevant issues.
- [ ] I have commented my code, particularly in hard-to-understand
areas.
- [ ] I have updated the documentation where relevant (API docs, the
reference, and the Sway book).
- [ ] If my change requires substantial documentation changes, I have
[requested support from the DevRel
team](https://github.com/FuelLabs/devrel-requests/issues/new/choose)
- [ ] I have added tests that prove my fix is effective or that my
feature works.
- [ ] I have added (or requested a maintainer to add) the necessary
`Breaking*` or `New Feature` labels where relevant.
- [ ] I have done my best to ensure that my PR adheres to [the Fuel Labs
Code Review
Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md).
- [ ] I have requested a review from the relevant team or maintainers.

---------

Co-authored-by: Joshua Batty <joshpbatty@gmail.com>
2025-03-17 17:17:18 -07:00
SwayStar123
a5d9d2835f
Merge std and core libraries (#6729)
## Description
Merges the two libraries. They were initially separate to separate the
core logic and fuel vm specific functionality, but that separation is no
longer maintained so having a merged library is better.

Closes #6708

## Checklist

- [ ] I have linked to any relevant issues.
- [ ] I have commented my code, particularly in hard-to-understand
areas.
- [ ] I have updated the documentation where relevant (API docs, the
reference, and the Sway book).
- [ ] If my change requires substantial documentation changes, I have
[requested support from the DevRel
team](https://github.com/FuelLabs/devrel-requests/issues/new/choose)
- [ ] I have added tests that prove my fix is effective or that my
feature works.
- [ ] I have added (or requested a maintainer to add) the necessary
`Breaking*` or `New Feature` labels where relevant.
- [ ] I have done my best to ensure that my PR adheres to [the Fuel Labs
Code Review
Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md).
- [ ] I have requested a review from the relevant team or maintainers.

---------

Co-authored-by: Sophie <47993817+sdankel@users.noreply.github.com>
Co-authored-by: Igor Rončević <ironcev@hotmail.com>
2025-03-12 23:52:38 +01:00
Nick Furfaro
f1632e5437
Furnic/revert b256 add (#1961)
* feat: Implement Add for b256

* modify: make U128 functions public

* feat: add b256_ops module to stdlib

* docs: add comments

* reorganize: move b256_ops tests to e2e harness

* test: stuff

* refactor: cleanup unneeded mut variables

* feat: add core-utils lib

* fixup

* refactor: use new lib for compostion

* chore: fix manifest project name

* refactor: rename module to compose

* cleanup

* refactor: rename to core_utils

* fixup

* chore: rename new lib and update manifests

* test: fix last assert

* docs: add module level docs

* fixup

* chore: remove and rebuild for lock files

* fixup

* test: cleanup

* chore: rebuild basic_predicate

* chore: rebuild

* fix: restore test project

* fix: add oracle file

* chore: rebuild sdk-harness tests

* Revert "Implement Add for b256 (#1707)"

This reverts commit 560ca4b4c6.

* chore: rebuild lockfiles
2022-06-13 16:05:16 -05:00
Nick Furfaro
560ca4b4c6
Implement Add for b256 (#1707)
* feat: Implement Add for b256

* modify: make U128 functions public

* feat: add b256_ops module to stdlib

* docs: add comments

* reorganize: move b256_ops tests to e2e harness

* test: stuff

* refactor: cleanup unneeded mut variables

* feat: add core-utils lib

* fixup

* refactor: use new lib for compostion

* chore: fix manifest project name

* refactor: rename module to compose

* cleanup

* refactor: rename to core_utils

* fixup

* chore: rename new lib and update manifests

* test: fix last assert

* docs: add module level docs

* fixup

* chore: remove and rebuild for lock files

* fixup

* test: cleanup

* chore: rebuild basic_predicate

* chore: rebuild

* fix: restore test project

* fix: add oracle file

* chore: rebuild sdk-harness tests
2022-06-10 18:24:27 -07:00
mitchmindtree
fbdce29268
Merge sway-lib-core and sway-lib-std into this repository (#1052)
* Initial commit

* Initial commit

* initial commit

* intial commit

* update manifest to use git core dependency

* add README

* Add README

* Fix link to forc (#1)

* Fix link to forc (#1)

* Add basic build CI workflow (#2)

* Add basic build CI workflow.

* Remove installation and use of fuel-core.

* Implement Modulo (#3)

Added "modulo" function so the % operator works

Very simple implementation to all the other functions just wrapping the mod opcode

* .gitattributes to highlight .sw syntax as rust (#3)

* .gitattributes to highlight .sw syntax as rust (#5)

* Add Result type (#6)

* Add Result type.

* Fix syntax.

* Add basic build CI workflow. (#8)

* Add in rsh and lsh operations (#6)

* Update ops.sw

* Weird spacing thing

* ec-recover (#5)

* Add ecr lib

* Add todo comment

* Add recover_pubkey and refactor ecr

* Fixup

* Update comments

* Add comments to ec-recover asm block

* Modify asm

* Clean up asm

* Fix B512 field assignment

* Fix ordering of lib deps

* Remove ec_recover, to be added in separate PR

* Clean up comments

* Adding the missing `ec_recover`functionality (#18)

* Add todo comment

* Add working ec_recover implementation

* Format manifest file. (#10)

* Adding the `mint` and `burn` token operations. (#26)

* Add token lib

* Add todo comment

* Rename token_id to asset_id

* Rename token_id to asset_id

* Rename token_id to asset_id

* Fix register names in asm block

* Fixup

* Refactor ugly  while loop

* Fixup

* Remove ecr from branch

* Fix review issues

* Modify type definition to silence warning re losing precision via type-cast

* Fix asm block registers

* Add only the mint function

* Ad burn to token lib

* "fix toml file"

* Split `eq` out of `Ord` and put it in `Eq` (#9)

* Moved eq into its own trait (Eq)

Moved eq into it's own trait (Eq) and then added all the implementations for u64, u32, u16, u8, and b256

* Forgot to delete u16's old Eq implementation

* Move le to a test implementation

* Fixed ge, le, and neq to not use eq and instead use inline assembly

* Update ops.sw

* Formatting changes

* Adding the force_transfer function to the token lib. (#27)

* Add force_transfer function to token lib

* Add import of ContractID type

* Implement the Eq trait for Address (#25)

* Impl Ord for Address

* Fix todo comment

* Fix toml formatting

* Add comment to use meq

* Impl Eq for Address

* Fix formatting

* Remove todo

* Add more methods to Result. (#16)

* Add more methods to Result.

* Don't use catch all.

* Use catch up, but fix typo.

* Fix return type.

* Compile workarounds.

* fmt

* Remove todo comments.

* fmt

* Make Result public.

* Add Option type & is_some/is_none methods (#31)

* Feat:Add Option type & is_some/is_none methods

* Doc:Improve module-level docs

* Fix:Add generic type T to match

* Simplify the B512 (and therefore ECR) code. (#33)

* Simplify the B512 (and therefore ECR) code.

Instead of 2 b256 fields in a struct we can use a 2 element array
instead.

I found that both the assumptions about memory layout and all the
copying was producing brittle code, and simplifying the ASM blocks as
much as possible is a good thing.

* Do a `forc fmt`.

* Adding the transfer_to_output function to token library (#32)

* Add force_transfer function to token lib

* Add import of ContractID type

* Add transfer_to_output function to token lib

* Add imports and temp remove constants

* Add else clause to if branch

* Add better comment

* Add final else clause to if branch

* Add semicolons to if-else

* style: add a comment and remove trailing semicolon from if statement in return position

* fix: make some comments internal

* fix: re-enable constants

* fix: change OUTPUT_LENGTH_LOCATION from 48 to 56

* fix: clean up assembly and incorporate PR review feedback

* docs: fix comments to reflect change to OUTPUT_LENGTH_LOCATION

* fix: remove redundent local variable assignment

* refactor: split asm blocks to avoid a second usage of the xos opcode

* style: forc fmt

* fix:change offset to 40 for getting amount

* Implementing an initial version of a msg_sender function (#30)

* Add module level docstring description

* Rearrange lib.sw order

* Use result type and add Sender type

* Improve function documentation

* refactor: improve clarity by removing the ! operator

* refactor: pass in constants to asm blocks

* fix: remove redundent `dep address;` from lib.sw

* fix: switch consts to enum

* refactor: revert to using constants for now but added TODO

* Minimal viable test harness for the stdlib (#37)

* config:update gitignore to ignore all tagket dirs

* feat:add working demo of test harness

* fix:add modules

* Add new demo_script_test project

* build:update dep versions in manifest files

* fix:update code in mod and main

* fix:change author email

* fixup

* fix:use local path to ttest current stdlib

* test:remove dummy test

* cleanup:remove dummy tests in prep for merge

* style:cargo fmt

* Porting token ops tests to the new stdlib test harness (#42)

* test:add token-ops tests

* test:update structure

* test:add more test

* test:adds more comments to failing tests

* test:remove failing tests from PR

* style:cargo fmt

* stle:forc fmt

* style:fix formatting I missed

* test:cleanup and remove logs

* bugfix: remove second register from gm opcode (#46)

* fix:remove second register from gm opcode

* docs:add link to gm opcode spec

* Add out directory to gitignore. (#50)

* Implement Square Root into the Standard Library (#49)

* Implement Square Root Function for uint types

* Update math.sw

* Update lib.sw

* Update math.sw

* Update math.sw

* Update math.sw

* Add Square Trait to uint

* Fix fmt

* Update math.sw

* Update math.sw

* Bump test dependencies. (#52)

* Bump test dependencies.

* Remove patch version.

* Use `t` instead of `T` for `Result` matches. (#53)

* Use t instead of T for Result matches.

* Update option.sw

* change author to authors in Forc.toml (#11)

* change author to authors in Forc.toml files (#56)

* switch from matches to if lets for enum destructuring (#62)

* switch from matches to if lets

* fmt

* Temporarily remove the Option and Result implementations (#63)

* fix:temp removal of result & option implementations

* fix:remove option & result from lib.sw

* fix:remove import of Result & change return type of msg_sender temporarily

* Fix return types of context::contract_id & context::msg_asset_id (#59)

* style:fix weird forc fmt issue

* fix:correct the return type for context module funcs

* test:add contract and json abi file

* test:add module to harness

* build:add manifest file

* test:add tests for context module

* style:forc fmt

* style:cargo fmt

* style:formatting

* fix:remove context test_project, coming in follow-up PR

* style:forc fmt

* Update token ops tests (#64)

* cleanup:remove duplicate abi

* build:update deps for sdk

* build:bump fuels-rs versions

* fix:remove salt field

* test:update to use newest syntax

* style:cargo fmt

* Adding a registers.sw module (#61)

* feat:add bare module registers

* feat:add registers.sw to expose16 reserved registers

* test:add new test project "registers"

* build:update forc manifest file

* test:add contract and abi.json

* test:add test file and empty tests

* test:temp disable ret & retl, add simple tests

* test:enable ret & retl again

* build:update manifest authors field

* build:remove redundant abi file

* fix:remove unneeded zero and one functions

* fix:remove zero and one funcs from abi and contract

* test:remove tests for zero and one & updates paths to abi file

* test:fix expected values and function calls

* style:forc fmt

* fix: add dep registers to context.sw

* style: forc fmt

* build:bump sdk version and add fuels-signers as a dep

* update tests to use new syntax

* style:cargo fmt & forc fmt

* Avoid implicit cast warning (#65)

* avoid implicit cast warning

* minor variable naming change

Co-authored-by: Mohammad <mohammad@Mohammads-MacBook-Pro.local>

* Fix test formatting. (#51)

* Ignore Forc lockfile (#69)

* Use new contract call syntax. (#70)

* Use new contract call syntax.

* Missed one

* Make core branch explicit (#71)

* Make core branch explicit

* Update Forc.toml

* fix:correct inline docs for registers.sw (#72)

* Fix some `path`s in the test project dependencies (#73)

The `path`s of dependencies should be point to the directory containing
the dependency's `Forc.toml` (not the `src`). This commit fixes the
`Forc.toml`s of the test projects to account for this.

There was also a spuriuos Forc.toml at `tests/Forc.toml` which has been
removed.

* Rename param in the ContractId::into() implementation (#76)

* fix:rename param

* docs:update comment and link tracking issue

* fixup

* Prefer `https` over `http` for forc git dependency URLs (#77)

This helps to resolve some dependency double-ups pending a proper
solution fix in `forc`.

See https://github.com/FuelLabs/sway/issues/931 and https://github.com/FuelLabs/fuels-rs/pull/150#discussion_r825312119

* Add `out` and `Forc.lock` to gitignore (#13)

* Bump SDK version (#78)

* build:bump SDK and dep versions

* test;update tests to use new SDK version syntax

* style:cargo fmt

* build:add fule-vm as a dep

* test:add an is_within_range() function to avoid hardcoded vals

* style:cargo fmt

* Rename ETH_ID to NATIVE_ASSET_ID (#79)

* b256 -> contractId params for context functions which get balance from a contract (this or other) (#81)

* hotfix:complete param type changes (#82)

* Implement the `EQ` trait for `ContractId` (#83)

* feat:impl eq for ContractId

* test:add test project for contractId eq implementation

* test:wip on sscript test

* test:add script call draft

* test: finish script test

* test:finish test for contractId eq impl

* fix: remove comment

* style: cargo fmt

* build:remove core as unneeded dep

* Change `[project]` name from `lib-std` to `std` (#80)

See https://github.com/FuelLabs/sway/issues/977 for motivation.

* bump sdk to 0.7. Use test-helpers to cut down on boilerplate (#84)

* Cleanup stdlib tests (#85)

* cleanup: remove compiler warnings

* style: cargo fmt

* Adding a call_frames module (#66)

* test:add new test project call_frames

* test:add bare call_frames module

* feat:add initial call_frames.sw module

* feat:add new call frame access constants

* feat:add call_frames.sw and refactor context mod

* fix:reorder lib.sw

* style:cleanup comments'

* style:forc fmt

* refactor:reorganize functions by module and expose under context namespace

* cleanup:remove unneeded files from test project

* test:add initial draft test

* test:add first test

* temp:remove use of constants

* test:setup test project and artifact for call_frames

* test:outline primary tests

* test:fix test assertions

* cleanup:remove helper functions from call_frames until they can be tested

* style:cargo fmt & forc fmt

* test:cleanup forc tomls

* test:use new contract call syntax

* fix:update return types for call_frames functions

* test:update to SDK v 0.6

* test:update tests

* style: cargo fmt

* fix:rename var to satisfy compiler

* style: forc fmt

* cleanup: remove unused CONSTs until needed

* build: remove core as a dep

* Disable default features from fuel-core (#86)

* Implement Eq for bool (#14)

* Re-add Option and Result. (#68)

* Re-add Option and Result.

* Re-add to auth.

* fmt

* Fix option and result, and add tests.

* Remove redundant gitignores.

* Fix tests.

* Fix to actually compile.

* Fix function naming.

* Fix test.

* Add missing semicolon.

* move option dep up

* Add `Result.unwrap()` (#90)

* Refactor panic into separate library.

* Update tests to use new panic.

* Implement unwrap.

* Add test.

* Add Option.unwrap() (#91)

* Bump fuels-rs to v0.8 (#92)

* Refactor the context module & port tests to SDK (#89)

* test:add new context test project

* test:add context module to harness

* test:add context testing contract and abi

* test:add context_testing_abi

* test:add the first tests

* test:fix contract path

* refactor:context.sw balance functions now use a common balance func

* test:add context_caller_contract to test_artifacts

* temp:ignore failing tests

* reorg:remove tests which belong elsewhere

* build:fix manifest fields

* test:add get_global_gas to context contract

* test:update context_testing_abi

* test:update context_caller abi & contract

* test:add and fix tests for context

* fix:fix types in context module

* build:cleanup/fix forc toml files

* test:cleanup types & contract calls

* build:update deps in cargo toml

* fix:update types in token_ops

* test:update to new sdk version

* test:update import paths to use .bin files

* test:update more tests to use new build path and comparison values

* test:cleanup

* fix:update contract call in caller contract

* test:fix test call to use correct contract

* build: bump SDK to 7

* style: forc fmt

* style: forc fmt

* test: refactor & bump to SDK 7

* style: cargo fmt

* test: update SDK usage to use latest features

* test:work on fixing tests

* improvement: rename contract_id to target

* fix: rename balance() and refactor imports

* style: use multi import syntax

* test: refactor test helper funcs

* test: fix function call names

* refactor: rename functions for clarity

* test: remove use of helper funcs bc/ContractNotFound

* style: cargo fmt

* fix: add gas param to all inter-contract calls

* test: refactor helper to share provider

* fix: update abis and contracts

* test: fix balance test

* fix: remove minting from contract functions

* test: add minting step to tests

* test: cleanup tests

* test: get all tests passing

* test:remove failing duplicate test

* style: cargo fmt && forc fmt

* build: remove core as a dep

* refactor: balance reg & balance_of funcs

* fix: update function names in contracts

* style: forc fmt

* test: fix tests by removing call_params

* style: cargo fmt

* cleanup: remove all compiler warnings

* Walk git dependency repo to discover nested forc dependencies

Closes #952.

This should be complete for the most part, though depends on implementing #977 first.

* Remove implied pkg from names of pkg discovery fns

* Update `Cargo.lock` for the addition of `walkdir`

`walkdir` is used to traverse the git repository when searching for
dependency packages.

* Change `std`'s `core` dep to use the local path

Yet to test whether `forc` can handle `path` dependencies within
dependencies. In theory I these should work provided that the `path` is
relative and points to a location within the same git repository. If
this *does* work, the behaviour should be discussed, documented and
enforced by `forc`.

* Update examples `std` dependency declarations to use local `path`

* Update all tests to depend on `std` via local `path`

This should assist in ensuring that all tests must always pass for any
change to `sway`, `lib-core`, `lib-std` or `forc`.

* Build sway-lib-core and sway-lib-std under unique CI jobs

* Add successful `sway-lib-core` and `sway-lib-std` reqs for publish

* Add tx module. (#93)

* Add tx module.

* Add functions.

* Clean up.

* Add skeleton test artifact project.

* Use hard-coded constants since compiler can't handle consts.

* Fill in skeleton.

* Make untested get typed script data non-pub.

* Add output functions.

* Comment out unreachable.

* Improve name.

* Add remaining functions.

* Fix name.

* Register tests to harness.

* Add tests.

* Fix script start offset test.

* Fix script start offset get.

* Fix test with todo.

* Add non-working test for input coin owner.

* Return wallet.

* Fix test.

* Update transfer to output (#94)

* fixing transfer_to_output

* Update transfer_to_output

* Improving a comment

* fmt

* Auth method 3 (#54)

* Add changes from prior work

* Remove import of ops

* Cleanup and format

* Rename functions to match opcode naming

* Re-order lib.sw

* Fix types to use ContractId

* Refactor and cleanup

* Reorder lib.sw

* Clean up comments and types

* FIx lib deps ordering

* cleanup

* congig:update gitignore

* Commit stashed changes with get_coin_owner WIP

* Fix:cleanup merge conflict resolution mistake

* Clean up a bit and use Result.

* General cleanup.

* Improve comment.

* Fix a bunch of type errors.

* Add missed assert.

* Fix order to make compile.

* Refactor.

* fix

* Fix build errors.

* Update offsets for 255 max inputs.

* Remove warnings.

* Improve error name.

* Fix some asm.

* Fix more asm

* space

* Fix comment

* Fix offsets.

* Refactor to use new tx module.

* test: add auth test project

* test: register auth tests

* test: add tests to mod.rs

* test: add auth testing abi & contract

* test: add auth caller contract & script

* test: fix enum variant name

* test: fix import of result

* test: refactor types to workaround MissingData error from SDK

* test: fix number of args passed

* test: ignore script test

* style: forc fmt

* style: cargo fmt

* test: work on script test

* Remove redundant assert.

* Clean up tests, not working yet.

* Fix test for some reason.

* Fix test.

Co-authored-by: Nick Furfaro <nfurfaro33@gmail.com>

* Update path to assert (#97)

* test: update path to assert

* Delete build.sh

Added by accident.

* test: remove redundant test (#99)

* Update examples and tests for chain::assert -> assert::assert

* Update newly merged test for chain::assert -> assert::assert

Co-authored-by: John Adler <adlerjohn@users.noreply.github.com>
Co-authored-by: Alex Hansen <alex@alex-hansen.com>
Co-authored-by: ControlCplusControlV <44706811+ControlCplusControlV@users.noreply.github.com>
Co-authored-by: wolflo <33909953+wolflo@users.noreply.github.com>
Co-authored-by: Nick Furfaro <nfurfaro33@gmail.com>
Co-authored-by: Toby Hutton <toby@grusly.com>
Co-authored-by: Joshua Batty <joshpbatty@gmail.com>
Co-authored-by: Mohammad Fawaz <mohammadfawaz89@gmail.com>
Co-authored-by: Mohammad <mohammad@Mohammads-MacBook-Pro.local>
Co-authored-by: Simon Roberts <46566889+simonr0204@users.noreply.github.com>
Co-authored-by: Brandon Kite <brandonkite92@gmail.com>
2022-03-29 12:30:23 +11:00