Skip to content

feat: add configurable ERC20 token addresses - #49

Open
ptrus wants to merge 1 commit into
masterfrom
ptrus/feature/configurable-tokens
Open

feat: add configurable ERC20 token addresses#49
ptrus wants to merge 1 commit into
masterfrom
ptrus/feature/configurable-tokens

Conversation

@ptrus

@ptrus ptrus commented Feb 27, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread src/config/__init__.py
for addr, symbol in chain_tokens.items():
# Check for env override: ERC20_{SYMBOL}_{CHAIN_ID}
env_key = f"ERC20_{symbol}_{chain_id}"
override_addr = os.getenv(env_key)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a check if the value is an address with Web3.is_address() I think would be good

Comment thread src/config/__init__.py
}


def _build_erc20_tokens() -> Dict[int, Dict[str, str]]:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't fully get the use case here, is this for local deployments with custom tokens?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes or even for the main deployments, when/if we decide to add new tokens, i dont see why we would require code changes for that?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this would still require restarts/down time.
Maybe we should think about a token config smart contract, and a endpoint which fetches them?

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.

2 participants