-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
fix: option coder decoding incorrect value #2870
Merged
arboleya
merged 5 commits into
aa/feat/adding-abi-transpiler
from
ps/fix/option-coder-incorrect-decode-value
Jul 31, 2024
Merged
fix: option coder decoding incorrect value #2870
arboleya
merged 5 commits into
aa/feat/adding-abi-transpiler
from
ps/fix/option-coder-incorrect-decode-value
Jul 31, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
petertonysmith94
requested review from
digorithm,
arboleya,
Torres-ssf,
Dhaiwat10,
danielbate,
nedsalk and
maschad
as code owners
July 31, 2024 15:06
danielbate
reviewed
Jul 31, 2024
nedsalk
reviewed
Jul 31, 2024
Co-authored-by: Daniel Bate <djbate23@gmail.com>
arboleya
merged commit Jul 31, 2024
fed8d3a
into
aa/feat/adding-abi-transpiler
15 of 20 checks passed
This was referenced Jul 31, 2024
arboleya
added a commit
that referenced
this pull request
Aug 19, 2024
* Upgrading forc to temp branch * Adding ABI transpiler and integrating it with related areas * Updating typegen fixtures * Fixing broken typegen tests; updating outdated IDs * Re-instating the order * Loading forc projects the standard and proper way * Updating coder’s types, regexes, and fixing type matching everywhere * Updating test using callpath-based naming for Option * Fixing test, intercepting ABI loading so it can be transpiled * Adding changeset * Adjusting changeset * Excluding sway-repo source files in `forc:check` script * Ensuring branches are up to date before building * Building internal packages in `--release` mode * Fixing directory path for new build target * Merging duplicated variables, standardizing terminologies * Improving validation to handle strings / non-objects as well * fix: option coder decoding incorrect value (#2870) * Revert "Improving validation to handle strings / non-objects as well" This reverts commit 45f3ef2. * chore: fixing types on OptionCoder * fix: match full qualifying type name with regex * chore: added test groups Co-authored-by: Daniel Bate <djbate23@gmail.com> * chore: revert StructCoder name change --------- Co-authored-by: Daniel Bate <djbate23@gmail.com> * Standardizing timeout limits across workflows * Ignoring `sway-repo`in links check when building things from source * Fixing ignore path * Stop deleting `concreteTypeId`, used in public API * Update .changeset/odd-horses-cheer.md * Ignoring also `fuel-core-repo` for the same reasons as `sway-repo` * Update .changeset/odd-horses-cheer.md * Updating more fixtures * Updating snippet * Fixing random lint warning * Incrasing test timeout limit * Fixing ignored paths * chore!: internalize old `JsonAbi` format (#2862) * use `transpileAbi` in `Interface` * add new interfaces to typegen * no need for `debug` build anymore * fix `getTypegenForcProject` return type * added `as JsonAbi` type assertions to fix type errors * fix typegen tests * rename variable * stop exporting `JsonAbi` from typegen * revert changes that should be in another PR * contttinue exporting * rename to match `master` * fix encode-and-decode test * Renamed `JsonAbiNew` to `JsonAbi` and the old format to `JsonAbiOld` * fix compilation errors * Stop exporting `AbiCoder` and update `encode-and-decode` example * Removed `Interface.findTypeById` method * stop casting `as unknown as JsonAbi` * use `argument` directly * fix import * fix: `Interface.encodeType/decodeType` * Update packages/abi-coder/src/types/JsonAbi.ts Co-authored-by: Peter Smith <peter@blueoceancomputing.co.uk> * Update packages/abi-coder/src/types/JsonAbiNew.ts Co-authored-by: Peter Smith <peter@blueoceancomputing.co.uk> * Update packages/abi-typegen/src/types/interfaces/JsonAbi.ts Co-authored-by: Peter Smith <peter@blueoceancomputing.co.uk> * Update packages/account/test/fuel-wallet-connector.test.ts Co-authored-by: Peter Smith <peter@blueoceancomputing.co.uk> * Update packages/abi-typegen/src/utils/transpile-abi.ts Co-authored-by: Peter Smith <peter@blueoceancomputing.co.uk> * copy/paste transpile-abi * fix compilation error * eslint disable todo type * use `{ transpile: T }` params object * update `encode-and-decode.md` docs * fix: spellcheck * Update apps/docs/src/guide/encoding/encode-and-decode.md Co-authored-by: Anderson Arboleya <anderson@arboleya.me> * Update apps/docs/src/guide/encoding/encode-and-decode.md Co-authored-by: Anderson Arboleya <anderson@arboleya.me> * Update apps/docs/src/guide/encoding/encode-and-decode.md Co-authored-by: Anderson Arboleya <anderson@arboleya.me> --------- Co-authored-by: Anderson Arboleya <anderson@arboleya.me> Co-authored-by: Peter Smith <peter@blueoceancomputing.co.uk> * Getting around non-null assertions * Adjusting changeset * Adjusting scripts * Updating template fixtures/snapshots * Triggering CI * The branch is gone - temporarily switching to `master` * Temporarily patching sway std lib * Temporarily skipping problematic sway projects and related tests * Lintfix - deprecations, types mismatch, and broken imports * DRYing test setup/teardown * Fixing broken tests * Patching base library individually * Unskipping problematic workspace members * Adjusting predicate data handling * Undoing undesired changed * Adjuting more projects * Revert "Temporarily skipping problematic sway projects and related tests" This reverts commit dc054ff. * Formatting * Revert "Temporarily patching sway std lib" This reverts commit 48b0ab3. * Revert "Patching base library individually" This reverts commit b97c944. * Replacing sway `branch` by `0.63.0` version * Update .changeset/odd-horses-cheer.md Co-authored-by: Peter Smith <peter@blueoceancomputing.co.uk> * Updating forc version --------- Co-authored-by: Peter Smith <peter@blueoceancomputing.co.uk> Co-authored-by: Nedim Salkić <nedim.salkic@fuel.sh> Co-authored-by: Daniel Bate <djbate23@gmail.com>
maschad
pushed a commit
that referenced
this pull request
Aug 21, 2024
* Upgrading forc to temp branch * Adding ABI transpiler and integrating it with related areas * Updating typegen fixtures * Fixing broken typegen tests; updating outdated IDs * Re-instating the order * Loading forc projects the standard and proper way * Updating coder’s types, regexes, and fixing type matching everywhere * Updating test using callpath-based naming for Option * Fixing test, intercepting ABI loading so it can be transpiled * Adding changeset * Adjusting changeset * Excluding sway-repo source files in `forc:check` script * Ensuring branches are up to date before building * Building internal packages in `--release` mode * Fixing directory path for new build target * Merging duplicated variables, standardizing terminologies * Improving validation to handle strings / non-objects as well * fix: option coder decoding incorrect value (#2870) * Revert "Improving validation to handle strings / non-objects as well" This reverts commit 45f3ef2. * chore: fixing types on OptionCoder * fix: match full qualifying type name with regex * chore: added test groups Co-authored-by: Daniel Bate <djbate23@gmail.com> * chore: revert StructCoder name change --------- Co-authored-by: Daniel Bate <djbate23@gmail.com> * Standardizing timeout limits across workflows * Ignoring `sway-repo`in links check when building things from source * Fixing ignore path * Stop deleting `concreteTypeId`, used in public API * Update .changeset/odd-horses-cheer.md * Ignoring also `fuel-core-repo` for the same reasons as `sway-repo` * Update .changeset/odd-horses-cheer.md * Updating more fixtures * Updating snippet * Fixing random lint warning * Incrasing test timeout limit * Fixing ignored paths * chore!: internalize old `JsonAbi` format (#2862) * use `transpileAbi` in `Interface` * add new interfaces to typegen * no need for `debug` build anymore * fix `getTypegenForcProject` return type * added `as JsonAbi` type assertions to fix type errors * fix typegen tests * rename variable * stop exporting `JsonAbi` from typegen * revert changes that should be in another PR * contttinue exporting * rename to match `master` * fix encode-and-decode test * Renamed `JsonAbiNew` to `JsonAbi` and the old format to `JsonAbiOld` * fix compilation errors * Stop exporting `AbiCoder` and update `encode-and-decode` example * Removed `Interface.findTypeById` method * stop casting `as unknown as JsonAbi` * use `argument` directly * fix import * fix: `Interface.encodeType/decodeType` * Update packages/abi-coder/src/types/JsonAbi.ts Co-authored-by: Peter Smith <peter@blueoceancomputing.co.uk> * Update packages/abi-coder/src/types/JsonAbiNew.ts Co-authored-by: Peter Smith <peter@blueoceancomputing.co.uk> * Update packages/abi-typegen/src/types/interfaces/JsonAbi.ts Co-authored-by: Peter Smith <peter@blueoceancomputing.co.uk> * Update packages/account/test/fuel-wallet-connector.test.ts Co-authored-by: Peter Smith <peter@blueoceancomputing.co.uk> * Update packages/abi-typegen/src/utils/transpile-abi.ts Co-authored-by: Peter Smith <peter@blueoceancomputing.co.uk> * copy/paste transpile-abi * fix compilation error * eslint disable todo type * use `{ transpile: T }` params object * update `encode-and-decode.md` docs * fix: spellcheck * Update apps/docs/src/guide/encoding/encode-and-decode.md Co-authored-by: Anderson Arboleya <anderson@arboleya.me> * Update apps/docs/src/guide/encoding/encode-and-decode.md Co-authored-by: Anderson Arboleya <anderson@arboleya.me> * Update apps/docs/src/guide/encoding/encode-and-decode.md Co-authored-by: Anderson Arboleya <anderson@arboleya.me> --------- Co-authored-by: Anderson Arboleya <anderson@arboleya.me> Co-authored-by: Peter Smith <peter@blueoceancomputing.co.uk> * Getting around non-null assertions * Adjusting changeset * Adjusting scripts * Updating template fixtures/snapshots * Triggering CI * The branch is gone - temporarily switching to `master` * Temporarily patching sway std lib * Temporarily skipping problematic sway projects and related tests * Lintfix - deprecations, types mismatch, and broken imports * DRYing test setup/teardown * Fixing broken tests * Patching base library individually * Unskipping problematic workspace members * Adjusting predicate data handling * Undoing undesired changed * Adjuting more projects * Revert "Temporarily skipping problematic sway projects and related tests" This reverts commit dc054ff. * Formatting * Revert "Temporarily patching sway std lib" This reverts commit 48b0ab3. * Revert "Patching base library individually" This reverts commit b97c944. * Replacing sway `branch` by `0.63.0` version * Update .changeset/odd-horses-cheer.md Co-authored-by: Peter Smith <peter@blueoceancomputing.co.uk> * Updating forc version --------- Co-authored-by: Peter Smith <peter@blueoceancomputing.co.uk> Co-authored-by: Nedim Salkić <nedim.salkic@fuel.sh> Co-authored-by: Daniel Bate <djbate23@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
abi
transpiler #2856 was throwing the following error in some test cases, which was investigated. Implemented the suggested solution and all test cases are green.TypeError: Cannot use 'in' operator to search for 'Some' in None
Checklist
tests
to prove my changesdocs