refactor: add BzzAddress to ChainConfig and remove LookupERC20Address#5476
Open
martinconic wants to merge 4 commits into
Open
refactor: add BzzAddress to ChainConfig and remove LookupERC20Address#5476martinconic wants to merge 4 commits into
martinconic wants to merge 4 commits into
Conversation
7 tasks
akrem-chabchoub
requested changes
May 27, 2026
Contributor
akrem-chabchoub
left a comment
There was a problem hiding this comment.
Maybe you can just add the bzz-token-address to the docker-compose.yml file ?
Also the beekeeper integration test is failing, not sure if its related to this pr ?
Per @gacevicljubisa's review: surface the new flag through the docker packaging so operators using the docker-compose setup can configure it without dropping to a config file. Adds the env-var declaration in docker-compose.yml and a documented (commented) entry in env, both alphabetically placed between BEE_BOOTNODE_MODE and BEE_CACHE_CAPACITY.
c77e9fe to
f6e6847
Compare
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.
Checklist
Description
Follow-up to #5468 and the review comment there. Resolves the long-standing TODO in
pkg/config/chain.goto source the BZZ token address from static config instead of looking it up on-chain at runtime.The address is deterministic per chain but was resolved on-chain twice during node bootstrap:
chequebookFactory.ERC20Address(ctx)→ feedserc20Service(and the/walletendpoint), andpostagecontract.LookupERC20Address→ feeds the postage stamp and staking contracts.Changes:
BzzAddresstoChainConfig, populated for mainnet and testnet from thego-storage-incentives-abiconstants (same source already used for the staking/postage addresses).--bzz-token-addressoverride for custom chains.erc20Serviceand the postage/staking contracts; removepostagecontract.LookupERC20Addressand its test.swap-enable=truewith the chain backend disabled. Removing the factoryERC20Addresscall also removed the implicit fail-fast it provided for that misconfiguration; the guard restores it with a clearer message instead of a later nil panic on swap endpoints.Fixes #5457
Open API Spec Version Changes (if applicable)
Motivation and Context (Optional)
Related Issue (Optional)
Screenshots (if appropriate):
AI Disclosure