Skip to content

docs: warn that profitMargin overrides don't retroactively update built fee configs - #96

Open
munikes wants to merge 1 commit into
Railgun-Community:mainfrom
munikes:docs/profitmargin-frozen-fees-gotcha
Open

docs: warn that profitMargin overrides don't retroactively update built fee configs#96
munikes wants to merge 1 commit into
Railgun-Community:mainfrom
munikes:docs/profitmargin-frozen-fees-gotcha

Conversation

@munikes

@munikes munikes commented Aug 21, 2026

Copy link
Copy Markdown

profit defaults to configDefaults.transactionFees.profitMargin, but that default parameter is resolved at call time, not read live afterwards. Default network fee configs are built once at module load time in config-networks.ts using whatever profitMargin holds at that point. Overriding profitMargin later in MY-CONFIG.ts silently does nothing to fee configs already built for a network — you have to call setFeesForNetworkEVM(chain, feeConfigL1(ratio)) again after the override for it to take effect. Added an explicit comment next to feeConfigL1 warning about this.

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.

1 participant