Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get Token Address By Chain [APE-1401] #34

Open
imrane opened this issue Sep 19, 2023 · 1 comment
Open

Get Token Address By Chain [APE-1401] #34

imrane opened this issue Sep 19, 2023 · 1 comment

Comments

@imrane
Copy link

imrane commented Sep 19, 2023

Overview

I'm looking to bridge a token to another chain and it would be helpful to get the contract address on the destination chain without having to switch networks....

Specification

Would be helpful to pass an optional argument to the getitem method and conditionally retrieve the address on that chain.

    def __getitem__(self, symbol: str, chain_id: int) -> ContractInstance:
        try:
            token_info = self._manager.get_token_info(
                symbol, chain_id=chain_id if chain_id else self.network_manager.network.chain_id
            )

Dependencies

None

@vany365 vany365 changed the title Get Token Address By Chain Get Token Address By Chain [APE-1401] Sep 19, 2023
@fubuloubu
Copy link
Member

Note: expose tokens._manager.get_token_info

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

No branches or pull requests

2 participants