feat!: remove NETNA_CONFIG and default ABIs to testnet#12
Open
feat!: remove NETNA_CONFIG and default ABIs to testnet#12
Conversation
This commit modifies the README and various example scripts to replace instances of NETNA_CONFIG with TESTNET_CONFIG, ensuring consistency in the configuration used for test network operations. This change enhances clarity and aligns with the intended usage of the Decibel library.
Contributor
There was a problem hiding this comment.
Pull request overview
Removes the legacy Netna (chain id 208) configuration/ABI path and changes the SDK’s default ABI selection and unknown chain_id fallback to Aptos testnet, updating exports, docs, examples, and tests accordingly.
Changes:
- Removed
NETNA_CONFIGfrom public exports andNAMED_CONFIGS; adjusted gas station defaults to drop Netna-specific URL handling. - Updated ABI registry/generation logic to remove chain id 208 and default/fallback to
testnet.json; deleted the Netna ABI bundle. - Migrated all README/examples from
NETNA_CONFIGtoTESTNET_CONFIGand added a runnablemarket_maker_bot.pyexample.
Reviewed changes
Copilot reviewed 73 out of 73 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/abi/test_registry.py | Updates ABI registry tests for testnet default/fallback behavior. |
| src/decibel/abi/json/netna.json | Removes the Netna ABI JSON bundle. |
| src/decibel/abi/generate.py | Removes Netna filename mapping; keeps testnet/mainnet mapping and default naming. |
| src/decibel/abi/_registry.py | Drops chain id 208 handling; defaults and unknown chain fallback now use testnet ABIs. |
| src/decibel/_fee_pay.py | Removes Netna-specific gas station URL default branch. |
| src/decibel/_constants.py | Removes NETNA_CONFIG constant and NAMED_CONFIGS["netna"] entry. |
| src/decibel/init.py | Removes NETNA_CONFIG from top-level exports. |
| README.md | Updates documentation examples and config list to use TESTNET_CONFIG instead of NETNA_CONFIG. |
| examples/write/withdraw.py | Migrates example to TESTNET_CONFIG. |
| examples/write/withdraw_from_vault.py | Migrates example to TESTNET_CONFIG. |
| examples/write/update_tp_sl_order.py | Migrates example to TESTNET_CONFIG and updates address derivations. |
| examples/write/trigger_matching.py | Migrates example to TESTNET_CONFIG and updates address derivations. |
| examples/write/revoke_delegation.py | Migrates example to TESTNET_CONFIG. |
| examples/write/revoke_builder_fee.py | Migrates example to TESTNET_CONFIG. |
| examples/write/place_twap_order.py | Migrates example to TESTNET_CONFIG. |
| examples/write/place_tp_sl_for_position.py | Migrates example to TESTNET_CONFIG and updates address derivations. |
| examples/write/place_stop_order.py | Migrates example to TESTNET_CONFIG. |
| examples/write/place_order_with_tp_sl.py | Migrates example to TESTNET_CONFIG. |
| examples/write/place_market_order.py | Migrates example to TESTNET_CONFIG. |
| examples/write/place_limit_order.py | Migrates example to TESTNET_CONFIG. |
| examples/write/place_bulk_orders.py | Migrates example to TESTNET_CONFIG. |
| examples/write/market_maker_bot.py | Adds a reference market maker bot example using named configs and read/write clients. |
| examples/write/deposit.py | Migrates example to TESTNET_CONFIG. |
| examples/write/deposit_to_vault.py | Migrates example to TESTNET_CONFIG and updates subaccount derivation inputs. |
| examples/write/delegate_vault_actions.py | Migrates example to TESTNET_CONFIG. |
| examples/write/delegate_trading.py | Migrates example to TESTNET_CONFIG and updates subaccount derivation inputs. |
| examples/write/deactivate_subaccount.py | Migrates example to TESTNET_CONFIG. |
| examples/write/create_vault.py | Migrates example to TESTNET_CONFIG. |
| examples/write/create_subaccount.py | Migrates example to TESTNET_CONFIG. |
| examples/write/configure_market_settings.py | Migrates example to TESTNET_CONFIG and updates address derivations. |
| examples/write/cancel_twap_order.py | Migrates example to TESTNET_CONFIG and updates address derivations. |
| examples/write/cancel_tp_sl_order.py | Migrates example to TESTNET_CONFIG and updates address derivations. |
| examples/write/cancel_order.py | Migrates example to TESTNET_CONFIG. |
| examples/write/cancel_order_by_client_id.py | Migrates example to TESTNET_CONFIG. |
| examples/write/cancel_bulk_order.py | Migrates example to TESTNET_CONFIG. |
| examples/write/approve_builder_fee.py | Migrates example to TESTNET_CONFIG. |
| examples/write/activate_vault.py | Migrates example to TESTNET_CONFIG. |
| examples/read/ws/subscribe_user_trade_history.py | Migrates WS example to TESTNET_CONFIG. |
| examples/read/ws/subscribe_user_positions.py | Migrates WS example to TESTNET_CONFIG. |
| examples/read/ws/subscribe_user_order_history.py | Migrates WS example to TESTNET_CONFIG. |
| examples/read/ws/subscribe_user_open_orders.py | Migrates WS example to TESTNET_CONFIG. |
| examples/read/ws/subscribe_user_notifications.py | Migrates WS example to TESTNET_CONFIG. |
| examples/read/ws/subscribe_user_bulk_orders.py | Migrates WS example to TESTNET_CONFIG. |
| examples/read/ws/subscribe_user_active_twaps.py | Migrates WS example to TESTNET_CONFIG. |
| examples/read/ws/subscribe_market_trades.py | Migrates WS example to TESTNET_CONFIG. |
| examples/read/ws/subscribe_market_price.py | Migrates WS example to TESTNET_CONFIG. |
| examples/read/ws/subscribe_market_depth.py | Migrates WS example to TESTNET_CONFIG. |
| examples/read/ws/subscribe_candlesticks.py | Migrates WS example to TESTNET_CONFIG. |
| examples/read/ws/subscribe_all_market_prices.py | Migrates WS example to TESTNET_CONFIG. |
| examples/read/ws/subscribe_account_overview.py | Migrates WS example to TESTNET_CONFIG. |
| examples/read/list_market_addresses.py | Migrates read example to TESTNET_CONFIG. |
| examples/read/get_user_twap_history.py | Migrates read example to TESTNET_CONFIG. |
| examples/read/get_user_trade_history.py | Migrates read example to TESTNET_CONFIG. |
| examples/read/get_user_subaccounts.py | Migrates read example to TESTNET_CONFIG. |
| examples/read/get_user_positions.py | Migrates read example to TESTNET_CONFIG. |
| examples/read/get_user_order_history.py | Migrates read example to TESTNET_CONFIG. |
| examples/read/get_user_open_orders.py | Migrates read example to TESTNET_CONFIG. |
| examples/read/get_user_funding_history.py | Migrates read example to TESTNET_CONFIG. |
| examples/read/get_user_fund_history.py | Migrates read example to TESTNET_CONFIG. |
| examples/read/get_user_bulk_orders.py | Migrates read example to TESTNET_CONFIG. |
| examples/read/get_user_active_twaps.py | Migrates read example to TESTNET_CONFIG. |
| examples/read/get_trading_points.py | Migrates read example to TESTNET_CONFIG. |
| examples/read/get_portfolio_chart.py | Migrates read example to TESTNET_CONFIG. |
| examples/read/get_market_trades.py | Migrates read example to TESTNET_CONFIG. |
| examples/read/get_market_price.py | Migrates read example to TESTNET_CONFIG. |
| examples/read/get_market_depth.py | Migrates read example to TESTNET_CONFIG. |
| examples/read/get_market_contexts.py | Migrates read example to TESTNET_CONFIG. |
| examples/read/get_leaderboard.py | Migrates read example to TESTNET_CONFIG. |
| examples/read/get_delegations.py | Migrates read example to TESTNET_CONFIG. |
| examples/read/get_candlesticks.py | Migrates read example to TESTNET_CONFIG. |
| examples/read/get_all_markets.py | Migrates read example to TESTNET_CONFIG. |
| examples/read/get_all_market_prices.py | Migrates read example to TESTNET_CONFIG. |
| examples/read/get_account_overview.py | Migrates read example to TESTNET_CONFIG. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This commit improves the logging format for margin usage in the market maker bot and updates the Network and CompatVersion classes to inherit from StrEnum for better string representation. These changes enhance code clarity and maintainability.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 73 out of 73 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
src/decibel/abi/generate.py:53
get_abi_filename()now falls back tof"{config.network.value}.json"for non-testnet/mainnet configs. Since bothLOCAL_CONFIGandDOCKER_CONFIGuseNetwork.CUSTOM, this will generate the same filename (custom.json) and can overwrite outputs when fetching multiple networks. Consider special-casingLOCAL_CONFIG/DOCKER_CONFIG(e.g.,local.json/docker.json) or incorporating a stable discriminator (like the named config key or chain_id) into the filename.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
gregnazario
reviewed
Apr 13, 2026
gregnazario
approved these changes
Apr 14, 2026
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.
Summary
This PR removes the legacy Netna (chain id 208) deployment path, deletes the Netna ABI bundle, and aligns the SDK’s default ABI selection and unknown-
chain_idfallback behavior with Aptos testnet (testnet.json). Public configuration exports dropNETNA_CONFIGin favor ofTESTNET_CONFIG, with README and all read/write/WebSocket examples updated accordingly. It also adds a runnableexamples/write/market_maker_bot.pyreference implementation and updates ABI registry tests.Changes
NETNA_CONFIGfrom exports and migrateNAMED_CONFIGSusage consistently to testnet.CHAIN_ID_NETNAhandling; default ABI data and warnings now fall back to testnet instead of Netna.src/decibel/abi/json/netna.json.get_abi_filenamemapping to match the new configuration surface.chain_id == 208.NETNA_CONFIGwithTESTNET_CONFIGacross examples; addmarket_maker_bot.py.tests/abi/test_registry.pyfor the new default/fallback behavior.Motivation
Netna-specific ABIs and configuration increase maintenance burden and confuse onboarding relative to the current Aptos testnet deployment model. Centralizing on
TESTNET_CONFIGreduces ambiguity and keeps defaults aligned with supported environments.Verification
tests/abi/test_registry.py).Breaking changes
NETNA_CONFIGis removed fromdecibelexports.