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

Test: Solana web3 js two dot oh #15536

Open
wants to merge 19 commits into
base: develop
Choose a base branch
from
Open

Commits on Nov 26, 2024

  1. Configuration menu
    Copy the full SHA
    ac0b466 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b40149a View commit details
    Browse the repository at this point in the history
  3. chore: Update the Solana types in @trezor/blockchain-link-types

    This change attempts to largely replicate the old account and transaction shapes, but also represents a breaking change as some of the old types (like `PublicKey`) no longer exist in `@solana/web3.js` version 2.
    
    Some type utilties were added so that we could source the _actual_ data shapes from the API calls themselves. For instance, we choose the return type that results from calling `getTransaction` with the config `"encoding": "jsonParsed"` _in particular_.
    steveluscher authored and martykan committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    2380149 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    90f9e22 View commit details
    Browse the repository at this point in the history
  5. chore: Port @trezor/blockchain-link to @solana/web3.js v2

    1. Added an RPC subscriptions instance to the `API` type
    2. Added code to throw in the event that the transaction is a durable nonce transaction. A little extra work would have to be done to import and construct the durable nonce transaction confirmer.
    3. Added a `FIXME` explaining why it would be better to save the `lastValidBlockhash` at the time the transaction was first given a blockhash lifetime, instead of fetching a too-new one in `pushTransaction`
    4. Eliminated all of the custom transaction confirmation code, in favour of the new built-in routines.
    5. Added a `FIXME` to note that the `fetch()` API typically doesn't allow you to override the `Origin` header. I didn't test whether your runtime actually allows it or not.
    
    Note that all RPC methods are now cancellable via `AbortController`, if you supply an `AbortSignal` to the send/subscribe methods (ie. `.send({ abortSignal })`)
    steveluscher authored and martykan committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    3acd9ad View commit details
    Browse the repository at this point in the history
  6. chore: Port @suite-common/wallet-core and `@suite-common/wallet-uti…

    …ls` to `@solana/web3.js` v2
    
    1. Corrected a decimal amount in one of the fixtures. That `amount` field is denominated in basis points.
    2. Deleted most of the custom transaction instruction formatting code, in favour of the new auto-generated program clients for the System, Compute Budget, and Token programs.
    3. Added a note that `lastValidBlockHeight` is sometimes `undefined` in tests
    steveluscher authored and martykan committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    425d03d View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    35393a8 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    abc9856 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    ed171e3 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    41a60d0 View commit details
    Browse the repository at this point in the history
  11. fixup! chore: Port @suite-common/wallet-core and `@suite-common/wal…

    …let-utils` to `@solana/web3.js` v2
    martykan committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    7decab1 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    2b31c09 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    e636762 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    5b20f63 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    f0b363d View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    fbc419f View commit details
    Browse the repository at this point in the history
  17. fixup! chore: Port @suite-common/wallet-core and `@suite-common/wal…

    …let-utils` to `@solana/web3.js` v2
    martykan committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    8cdbbaf View commit details
    Browse the repository at this point in the history
  18. fixup! chore: Port @suite-common/wallet-core and `@suite-common/wal…

    …let-utils` to `@solana/web3.js` v2
    martykan committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    34dc334 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    ec2125b View commit details
    Browse the repository at this point in the history