Skip to content

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

@imrane

Description

@imrane

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions