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

chore: add DerivedTokenRouterConfig to EvmERC20WarpModule #4932

Open
ltyu opened this issue Dec 2, 2024 · 0 comments
Open

chore: add DerivedTokenRouterConfig to EvmERC20WarpModule #4932

ltyu opened this issue Dec 2, 2024 · 0 comments
Labels

Comments

@ltyu
Copy link
Contributor

ltyu commented Dec 2, 2024

Problem

Currently, we return TokenRouterConfig within the EvmERC20WarpModule functions. However, we derive a lot of the config using the other modules, namely Hook and ISM. During derivation, address is added to the config. This causes a lot of casting logic and is unclear to devs that derived configs contain an address.

async createIsmUpdateTxs(
actualConfig: TokenRouterConfig,
expectedConfig: TokenRouterConfig,
): Promise<AnnotatedEV5Transaction[]> {
const updateTransactions: AnnotatedEV5Transaction[] = [];
if (!expectedConfig.interchainSecurityModule) {
return [];
}
const actualDeployedIsm = (
actualConfig.interchainSecurityModule as DerivedIsmConfig
).address;

Solution

Create and replace the TokenRouterConfig with WarpTokenRouterConfig.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

No branches or pull requests

1 participant