fix(devnet): migrate from REST API to JSON-RPC 2.0#837
Open
dik654 wants to merge 1 commit into
Open
Conversation
- Add JSON-RPC 2.0 client for devnet API calls - Convert Accounts() to use devnet_getPredeployedAccounts - Convert Mint() to use devnet_mint - Remove deprecated FeeToken() method - Bump devnet image to 0.7.1 in CI workflow - Update documentation Closes NethermindEth#833
This file contains hidden or 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
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.
Changes
devnet/devnet.go
rpcCall()helper with proper request/response handling and error parsingAccounts(): Convert fromGET /predeployed_accountsto JSON-RPCdevnet_getPredeployedAccountsmethodMint(): Convert fromPOST /mintto JSON-RPCdevnet_mintmethod with proper parameter serialization (address as hex string, amount as uint64, unit as "WEI")FeeToken(): This endpoint no longer exists in devnet-rs. The fee token information can be obtained through other Starknet RPC methods if needed.github/workflows/test_devnet.yml
0.5.0to0.7.1to use the latest stable releaseDocumentation
FeeTokendocumentation and example code (docs/docs/pages/docs/devnet/methods/fee-token.mdx)Removed
docs/tests/devnet/fee_token.go: Example test for the removedFeeToken()methodTest plan
Verified all devnet tests pass with the new implementation:
TestDevnet_IsAlive- Health check still uses REST endpoint (unchanged)TestDevnet_Accounts- Successfully retrieves predeployed accounts via JSON-RPCTestDevnet_Mint- Successfully mints tokens via JSON-RPCCloses #833