Skip to content

Conversation

tabaktoni
Copy link
Member

@tabaktoni tabaktoni commented Feb 18, 2025

Motivation and Resolution

Starknet 0.13.4

RPC version (if applicable)

RPC 0.8

Usage related changes

  • Changes on provider types (do tests and checks on Provider)

Some test captured BreakingChanged:

  • new feeMarginPercentage type
  • removed enum FeeMarginPercentage from constants
  • added new FeeMarginPercentage to DEFAULT_GLOBAL_CONFIG
  • Transaction Receipt Typing refactor, also removed non-existing isRejected status

Development related changes

When specVersion is not defined in constructor options, prefer usage of the provider = await RpcProvider.create() for safe spec version/ channel resolution based on the node. Else it fail back to config default rpc version that could be false based on node rpc.

  • Replace internal usage of default exported api types (in this case 0.8)
  • Consider disabling default export api (in this case 0.8)
  • Use merged types in all cases except channels

Testing

  • backward compatibility RPC 0.7 V2
  • backward compatibility RPC 0.7 V3_old
  • compatibility RPC 0.8 V3_new

Checklist:

  • Performed a self-review of the code
  • Rebased to the last commit of the target branch (or merged it into my branch)
  • Linked the issues which this PR resolves
  • Documented the changes in code (API docs will be generated automatically)
  • Updated the tests
  • All tests are passing

describe('Error utility tests', () => {
test('RpcError', () => {
const baseError: RPC.Errors.UNEXPECTED_ERROR = {
// TODO: @penovicp types 0.8 exporta u top level sve 0.7 exporta po komponentama, neznan jeli treba minjat test i mod da ocukuje oba tipa
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The type export change shouldn't be an issue. The RPC error utility relies on the mappings set up in src/types/errors.ts, so when the mapping is updated the utility should work regardless of how the underlying types are imported. It should work even without an update since the 0.7 errors are a subset of the 0.8 errors, the difference is that without it the new 0.8 errors wouldn't be recognised for type narrowing.

@tabaktoni tabaktoni marked this pull request as ready for review March 3, 2025 01:34
@penovicp penovicp merged commit 316ae27 into beta Mar 4, 2025
2 of 3 checks passed
github-actions bot pushed a commit that referenced this pull request Mar 4, 2025
# [7.0.0-beta.1](v6.24.0-beta.1...v7.0.0-beta.1) (2025-03-04)

* Implement RPC 0.8 and V3 transactions ([#1328](#1328)) ([316ae27](316ae27))

### BREAKING CHANGES

* Library defaults to RPC 0.8 with the corresponding API changes, dropped RPC 0.6 support
Copy link
Contributor

github-actions bot commented Mar 4, 2025

🎉 This PR is included in version 7.0.0-beta.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

github-actions bot pushed a commit that referenced this pull request Mar 28, 2025
# [7.0.0](v6.24.1...v7.0.0) (2025-03-28)

* Implement RPC 0.8 and V3 transactions ([#1328](#1328)) ([316ae27](316ae27))

### Bug Fixes

* contract withOptions Fix/1252 ([#1255](#1255)) ([b59952e](b59952e))
* update ws impl, add TEST_WS_URL, update token constants ([411eeec](411eeec))

### Features

* drop fetch-cookie dependency ([9a57daf](9a57daf))
* drop isomorphic-fetch dependency ([9da0083](9da0083))
* prune deprecated functionalities ([cbd18f5](cbd18f5))
* the WebSockets ([#1251](#1251)) ([fabca27](fabca27)), closes [#1272](#1272)
* Update Beta to latest Develop ([#1312](#1312)) ([2958051](2958051)), closes [#949](#949) [#970](#970)
* v7 fee, new methods, tests ([#1337](#1337)) ([00743de](00743de))

### BREAKING CHANGES

* Removed multiple functionalities that have been marked as deprecated
* Library defaults to RPC 0.8 with the corresponding API changes, dropped RPC 0.6 support
PhilippeR26 added a commit to PhilippeR26/starknet.js that referenced this pull request May 5, 2025
docs: update guide

build: ledger app v2.3.0

chore: upgrade name to 2.3.1 and polish doc

docs: update guide

chore: upgrade name to 2.3.1 and polish doc

feat: prune deprecated functionalities

BREAKING CHANGE: Removed multiple functionalities that have been marked as deprecated

chore(release): 7.0.0-beta.4 [skip ci]

* repair snip-12 enum type nested dependency ([starknet-io#1289](starknet-io#1289)) ([1cd4219](starknet-io@1cd4219))

* drop fetch-cookie dependency ([9a57daf](starknet-io@9a57daf))
* drop isomorphic-fetch dependency ([9da0083](starknet-io@9da0083))
* prune deprecated functionalities ([cbd18f5](starknet-io@cbd18f5))

* Removed multiple functionalities that have been marked as deprecated

chore(release): 7.0.0 [skip ci]

* Implement RPC 0.8 and V3 transactions ([starknet-io#1328](starknet-io#1328)) ([316ae27](starknet-io@316ae27))

* contract withOptions Fix/1252 ([starknet-io#1255](starknet-io#1255)) ([b59952e](starknet-io@b59952e))
* update ws impl, add TEST_WS_URL, update token constants ([411eeec](starknet-io@411eeec))

* drop fetch-cookie dependency ([9a57daf](starknet-io@9a57daf))
* drop isomorphic-fetch dependency ([9da0083](starknet-io@9da0083))
* prune deprecated functionalities ([cbd18f5](starknet-io@cbd18f5))
* the WebSockets ([starknet-io#1251](starknet-io#1251)) ([fabca27](starknet-io@fabca27)), closes [starknet-io#1272](starknet-io#1272)
* Update Beta to latest Develop ([starknet-io#1312](starknet-io#1312)) ([2958051](starknet-io@2958051)), closes [starknet-io#949](starknet-io#949) [starknet-io#970](starknet-io#970)
* v7 fee, new methods, tests ([starknet-io#1337](starknet-io#1337)) ([00743de](starknet-io@00743de))

* Removed multiple functionalities that have been marked as deprecated
* Library defaults to RPC 0.8 with the corresponding API changes, dropped RPC 0.6 support

fix: preserve value for numeric arguments within address padding utility

chore(release): 7.0.1 [skip ci]

* preserve value for numeric arguments within address padding utility ([abc7958](starknet-io@abc7958))

docs: generate documentation version

docs: expand v7 migration guide (starknet-io#1368)

---------
Co-authored-by: Petar Penovic <[email protected]>

fix: make the provider create method generic to enable it when mixins are applied (starknet-io#1370)

fix: ensure enum replacement objects are reachable for type resolution (starknet-io#1375)

docs: update guides for v7 (starknet-io#1376)

---------
Co-authored-by: Petar Penovic <[email protected]>

feat: update to rpc 0.8.1

chore(release): 7.1.0 [skip ci]

* ensure enum replacement objects are reachable for type resolution ([starknet-io#1375](starknet-io#1375)) ([eb8b10d](starknet-io@eb8b10d))
* make the provider create method generic to enable it when mixins are applied ([starknet-io#1370](starknet-io#1370)) ([1f48dc6](starknet-io@1f48dc6))

* update to rpc 0.8.1 ([83e17b8](starknet-io@83e17b8))

style: remove comment
@penovicp penovicp deleted the prepare-beta-v7 branch August 27, 2025 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants