|
|
|
@ -20,6 +20,7 @@ import { |
|
|
|
|
HyperlaneModuleParams, |
|
|
|
|
} from '../core/AbstractHyperlaneModule.js'; |
|
|
|
|
import { EvmModuleDeployer } from '../deploy/EvmModuleDeployer.js'; |
|
|
|
|
import { proxyAdminOwnershipUpdateTxs } from '../deploy/proxy.js'; |
|
|
|
|
import { EvmIsmModule } from '../ism/EvmIsmModule.js'; |
|
|
|
|
import { DerivedIsmConfig } from '../ism/EvmIsmReader.js'; |
|
|
|
|
import { MultiProvider } from '../providers/MultiProvider.js'; |
|
|
|
@ -97,7 +98,11 @@ export class EvmERC20WarpModule extends HyperlaneModule< |
|
|
|
|
...(await this.createIsmUpdateTxs(actualConfig, expectedConfig)), |
|
|
|
|
...this.createRemoteRoutersUpdateTxs(actualConfig, expectedConfig), |
|
|
|
|
...this.createOwnershipUpdateTxs(actualConfig, expectedConfig), |
|
|
|
|
...this.updateProxyAdminOwnershipTxs(actualConfig, expectedConfig), |
|
|
|
|
...proxyAdminOwnershipUpdateTxs( |
|
|
|
|
actualConfig, |
|
|
|
|
expectedConfig, |
|
|
|
|
this.domainId, |
|
|
|
|
), |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
return transactions; |
|
|
|
@ -224,38 +229,6 @@ export class EvmERC20WarpModule extends HyperlaneModule< |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
updateProxyAdminOwnershipTxs( |
|
|
|
|
actualConfig: Readonly<TokenRouterConfig>, |
|
|
|
|
expectedConfig: Readonly<TokenRouterConfig>, |
|
|
|
|
): AnnotatedEV5Transaction[] { |
|
|
|
|
const transactions: AnnotatedEV5Transaction[] = []; |
|
|
|
|
|
|
|
|
|
// Return early because old warp config files did not have the
|
|
|
|
|
// proxyAdmin property
|
|
|
|
|
if (!expectedConfig.proxyAdmin) { |
|
|
|
|
return transactions; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const actualProxyAdmin = actualConfig.proxyAdmin!; |
|
|
|
|
assert( |
|
|
|
|
actualProxyAdmin.address === expectedConfig.proxyAdmin.address, |
|
|
|
|
`ProxyAdmin contract addresses do not match. Expected ${expectedConfig.proxyAdmin.address}, got ${actualProxyAdmin.address}`, |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
transactions.push( |
|
|
|
|
// Internally the createTransferOwnershipTx method already checks if the
|
|
|
|
|
// two owner values are the same and produces an empty tx batch if they are
|
|
|
|
|
...EvmModuleDeployer.createTransferOwnershipTx({ |
|
|
|
|
actualOwner: actualProxyAdmin.owner, |
|
|
|
|
expectedOwner: expectedConfig.proxyAdmin.owner, |
|
|
|
|
deployedAddress: actualProxyAdmin.address!, |
|
|
|
|
chainId: this.domainId, |
|
|
|
|
}), |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
return transactions; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Updates or deploys the ISM using the provided configuration. |
|
|
|
|
* |
|
|
|
|