Skip to content

feat(deps): upgrade to algosdk v3 and algokit-utils v8#330

Merged
drichar merged 14 commits intodevfrom
feat/algosdk-v3
Jan 9, 2025
Merged

feat(deps): upgrade to algosdk v3 and algokit-utils v8#330
drichar merged 14 commits intodevfrom
feat/algosdk-v3

Conversation

@drichar
Copy link
Copy Markdown
Collaborator

@drichar drichar commented Dec 4, 2024

Description

This PR upgrades core dependencies to their latest major versions: algosdk v3, @algorandfoundation/algokit-utils v8, and @txnlab/use-wallet-react v4. These updates require code changes to handle breaking changes in the SDKs, particularly around address handling and REST API types.

Details

  • Update dependencies in package.json files across ui/ and contracts/ directories
  • Update types to use algosdk.modelsv2.* instead of custom interfaces
  • Update model parameter access to use camelCase (e.g. unitName instead of unit-name)
  • Migrate code to use toString() for Algorand address handling
  • Remove AuthAddressProvider and custom transaction signer now that rekeyed account simulation is fixed

Migrate to latest versions of core dependencies:
- algosdk v3
- @algorandfoundation/algokit-utils v8
- @txnlab/use-wallet-react v4

Update code to use new APIs:
- Use `toString()` for address handling
- Update types to use `algosdk.modelsv2.*`
- Refactor balance calculations to use `BigInt`
- Update transaction signing and simulation interfaces
@drichar drichar requested a review from pbennett as a code owner December 4, 2024 18:40
@vercel
Copy link
Copy Markdown

vercel bot commented Dec 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
reti ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 9, 2025 3:31pm

…ions for algosdk v3 changes.

Also update to latest algokit-client-generator and commit latest generated clients
Update test fixtures and interfaces to match the actual Algorand REST API format
rather than the SDK v3 types. While migrating to algosdk v3.0.0, the mock data
should continue using kebab-case and JSON format as returned by the REST API.

Also fix `Application` approval/clear program properties in fixtures to use base64
strings instead of Uint8Arrays to match actual node responses.
- Remove redundant `BigInt` conversion since `entryRound` is already a bigint type
- Fix import sort order
Comment thread ui/src/utils/tests/msw/handlers.ts
Remove custom `makeEmptyTransactionSigner` implementation and `AuthAddressProvider`
since algosdk now correctly handles simulate calls from rekeyed accounts. This
was originally added as a workaround in #89 but is no longer needed after
algorand/go-algorand#5942.
Remove `makeEmptyTransactionSigner` in favor of `skipSignatures` flag for
simulate transactions. This aligns with updated algosdk best practices for
handling simulate calls without signatures (from normal or rekeyed accounts).
Upgraded @algorandfoundation/algokit-utils to 8.0.3 across all packages. Updated @algorandfoundation/algokit-client-generator to 4.0.6 and @algorandfoundation/tealscript to 0.106.1 in contracts for better compatibility
Updated multiple dependencies in go.mod and go.sum, including `go-algorand-sdk` to v2.7.0, `prometheus/client_golang` to v1.20.5, and `crypto` to v0.31.0.
- @blockshake/defly-connect from 1.1.6 to 1.2.1
- @perawallet/connect from 1.3.5 to 1.4.1
- @txnlab/use-wallet-react from 4.0.0-beta.2 to 4.0.0-beta.4
@drichar drichar merged commit e8e8e91 into dev Jan 9, 2025
@drichar drichar deleted the feat/algosdk-v3 branch January 9, 2025 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants