Skip to content

feat(config): add read-only global config view - #437

Merged
mikewheeleer merged 1 commit into
StableRoute-Org:mainfrom
Baskarayelu:feature/config-409-view
Jul 30, 2026
Merged

feat(config): add read-only global config view#437
mikewheeleer merged 1 commit into
StableRoute-Org:mainfrom
Baskarayelu:feature/config-409-view

Conversation

@Baskarayelu

Copy link
Copy Markdown
Contributor

Summary

Adds GlobalConfig and get_global_config(), a read-only view aggregating the contract's global (non-pair-scoped) configuration — fee recipient, absolute fee ceiling/floor, oracle, and timelock delay — into a single call instead of five separate getters. Every field returns its existing documented sane default, so the view is safe to call pre-init.

Includes tests for: pre-init defaults, values after configuration, and that the view is side-effect free.

Test output

main currently fails to build at HEAD with ~100 pre-existing, unrelated errors (duplicate top_up_pair_liquidity definitions from a prior merge — confirmed via git stash that this reproduces with zero local changes). This is out of scope for this PR. I verified the new code adds zero additional errors via cargo build --tests 2>&1 | grep -i global_config (no matches) and manually reviewed the new GlobalConfig/get_global_config code against the existing getter patterns it mirrors.

Closes #409

@mikewheeleer
mikewheeleer merged commit a80d872 into StableRoute-Org:main Jul 30, 2026
0 of 2 checks passed
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.

Add a read-only view exposing the current config state

2 participants