feat: add weETHs warp route, some drive-by cleanup (#4826)
### Description - Deploys weETHs between Ethereum and Eclipsemainnet - Removes all the warp route generation scripts in favor of a single one - Renames some things throughout infra to be closer to the canonical warp IDs (e.g. add all chain names, sort them, etc) - Removes a bunch of now unnecessary ts-ignores - Moves toward using router configs for non-EVM chains in the warp configs Waiting to merge https://github.com/hyperlane-xyz/hyperlane-registry/pull/362 before updating the registryrc in here so the warp config checker works ### Drive-by changes <!-- Are there any minor or drive-by changes also included? --> ### Related issues <!-- - Fixes #[issue number here] --> ### Backward compatibility <!-- Are these changes backward compatible? Are there any infrastructure implications, e.g. changes that would prohibit deploying older commits using this infra tooling? Yes/No --> ### Testing <!-- What kind of testing have these changes undergone? None/Manual/Unit Tests -->pull/4834/head
parent
f0e8f74087
commit
e6f9d5c4fd
@ -0,0 +1,5 @@ |
||||
--- |
||||
'@hyperlane-xyz/utils': patch |
||||
--- |
||||
|
||||
Added a mustGet helper |
@ -0,0 +1,10 @@ |
||||
{ |
||||
"eclipsemainnet": { |
||||
"hex": "0x6196f9127d2caa0f4265d0870d077e6bf979c585b87cceb7537fc6d2c81729b7", |
||||
"base58": "7Zx4wU1QAw98MfvnPFqRh1oyumek7G5VAX6TKB3U1tcn" |
||||
}, |
||||
"ethereum": { |
||||
"hex": "0x000000000000000000000000ef899e92da472e014be795ecce948308958e25a2", |
||||
"base58": "1111111111114LZDAaWurQERWF32Wqjijy9NWQRX" |
||||
} |
||||
} |
@ -0,0 +1,17 @@ |
||||
{ |
||||
"eclipsemainnet": { |
||||
"type": "synthetic", |
||||
"decimals": 9, |
||||
"remoteDecimals": 18, |
||||
"name": "Super Symbiotic LRT", |
||||
"symbol": "weETHs", |
||||
"uri": "https://raw.githubusercontent.com/hyperlane-xyz/hyperlane-registry/6ce62e9330ae1af0786f60d9fe6da8541b6b2988/deployments/warp_routes/weETHs/metadata.json", |
||||
"interchainGasPaymaster": "3Wp4qKkgf4tjXz1soGyTSndCgBPLZFSrZkiDZ8Qp9EEj" |
||||
}, |
||||
"ethereum": { |
||||
"type": "collateral", |
||||
"decimals": 18, |
||||
"token": "0x917cee801a67f933f2e6b33fc0cd1ed2d5909d88", |
||||
"foreignDeployment": "0xef899e92DA472E014bE795Ecce948308958E25A2" |
||||
} |
||||
} |
@ -0,0 +1,36 @@ |
||||
import { ethers } from 'ethers'; |
||||
|
||||
import { |
||||
ChainMap, |
||||
RouterConfig, |
||||
TokenRouterConfig, |
||||
TokenType, |
||||
} from '@hyperlane-xyz/sdk'; |
||||
|
||||
import { tokens } from '../../../../../src/config/warp.js'; |
||||
import { DEPLOYER } from '../../owners.js'; |
||||
|
||||
export const getEclipseEthereumWeEthsWarpConfig = async ( |
||||
routerConfig: ChainMap<RouterConfig>, |
||||
): Promise<ChainMap<TokenRouterConfig>> => { |
||||
const eclipsemainnet: TokenRouterConfig = { |
||||
...routerConfig.eclipsemainnet, |
||||
type: TokenType.synthetic, |
||||
foreignDeployment: '7Zx4wU1QAw98MfvnPFqRh1oyumek7G5VAX6TKB3U1tcn', |
||||
gas: 300_000, |
||||
interchainSecurityModule: ethers.constants.AddressZero, |
||||
}; |
||||
|
||||
let ethereum: TokenRouterConfig = { |
||||
...routerConfig.ethereum, |
||||
type: TokenType.collateral, |
||||
token: tokens.ethereum.weETHs, |
||||
interchainSecurityModule: ethers.constants.AddressZero, |
||||
owner: DEPLOYER, |
||||
}; |
||||
|
||||
return { |
||||
eclipsemainnet, |
||||
ethereum, |
||||
}; |
||||
}; |
@ -1,26 +0,0 @@ |
||||
import { writeFileSync } from 'fs'; |
||||
import { stringify as yamlStringify } from 'yaml'; |
||||
|
||||
import { WarpRouteDeployConfigSchema } from '@hyperlane-xyz/sdk'; |
||||
|
||||
import { getEclipseEthereumUSDTWarpConfig } from '../config/environments/mainnet3/warp/configGetters/getEclipseEthereumUSDTWarpConfig.js'; |
||||
|
||||
import { getRouterConfig } from './warp-routes/utils.js'; |
||||
|
||||
async function main() { |
||||
const routerConfig = await getRouterConfig(); |
||||
const tokenConfig = await getEclipseEthereumUSDTWarpConfig(routerConfig); |
||||
const parsed = WarpRouteDeployConfigSchema.safeParse(tokenConfig); |
||||
|
||||
if (!parsed.success) { |
||||
console.dir(parsed.error.format(), { depth: null }); |
||||
return; |
||||
} |
||||
|
||||
writeFileSync( |
||||
'eclipse-usdt-warp-route-config.yaml', |
||||
yamlStringify(parsed.data, null, 2), |
||||
); |
||||
} |
||||
|
||||
main().catch(console.error).then(console.log); |
@ -1,26 +0,0 @@ |
||||
import { writeFileSync } from 'fs'; |
||||
import { stringify as yamlStringify } from 'yaml'; |
||||
|
||||
import { WarpRouteDeployConfigSchema } from '@hyperlane-xyz/sdk'; |
||||
|
||||
import { getEclipseEthereumWBTCWarpConfig } from '../config/environments/mainnet3/warp/configGetters/getEclipseEthereumWBTCWarpConfig.js'; |
||||
|
||||
import { getRouterConfig } from './warp-routes/utils.js'; |
||||
|
||||
async function main() { |
||||
const routerConfig = await getRouterConfig(); |
||||
const tokenConfig = await getEclipseEthereumWBTCWarpConfig(routerConfig); |
||||
const parsed = WarpRouteDeployConfigSchema.safeParse(tokenConfig); |
||||
|
||||
if (!parsed.success) { |
||||
console.dir(parsed.error.format(), { depth: null }); |
||||
return; |
||||
} |
||||
|
||||
writeFileSync( |
||||
'eclipse-wbtc-warp-route-config.yaml', |
||||
yamlStringify(parsed.data, null, 2), |
||||
); |
||||
} |
||||
|
||||
main().catch(console.error).then(console.log); |
@ -1,23 +0,0 @@ |
||||
import { writeFileSync } from 'fs'; |
||||
import { stringify as yamlStringify } from 'yaml'; |
||||
|
||||
import { WarpRouteDeployConfigSchema } from '@hyperlane-xyz/sdk'; |
||||
|
||||
import { getRenzoEZETHWarpConfig } from '../config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.js'; |
||||
|
||||
async function main() { |
||||
const tokenConfig = await getRenzoEZETHWarpConfig(); |
||||
const parsed = WarpRouteDeployConfigSchema.safeParse(tokenConfig); |
||||
|
||||
if (!parsed.success) { |
||||
console.dir(parsed.error.format(), { depth: null }); |
||||
return; |
||||
} |
||||
|
||||
writeFileSync( |
||||
'renzo-ezeth-warp-route-config.yaml', |
||||
yamlStringify(parsed.data, null, 2), |
||||
); |
||||
} |
||||
|
||||
main().catch(console.error).then(console.log); |
@ -1,23 +0,0 @@ |
||||
import { writeFileSync } from 'fs'; |
||||
import { stringify as yamlStringify } from 'yaml'; |
||||
|
||||
import { WarpRouteDeployConfigSchema } from '@hyperlane-xyz/sdk'; |
||||
|
||||
import { getRenzoPZETHWarpConfig } from '../config/environments/mainnet3/warp/configGetters/getRenzoPZETHWarpConfig.js'; |
||||
|
||||
async function main() { |
||||
const tokenConfig = await getRenzoPZETHWarpConfig(); |
||||
const parsed = WarpRouteDeployConfigSchema.safeParse(tokenConfig); |
||||
|
||||
if (!parsed.success) { |
||||
console.dir(parsed.error.format(), { depth: null }); |
||||
return; |
||||
} |
||||
|
||||
writeFileSync( |
||||
'renzo-pzeth-warp-route-config.yaml', |
||||
yamlStringify(parsed.data, null, 2), |
||||
); |
||||
} |
||||
|
||||
main().catch(console.error).then(console.log); |
@ -0,0 +1,37 @@ |
||||
import { stringify as yamlStringify } from 'yaml'; |
||||
|
||||
import { WarpRouteDeployConfigSchema } from '@hyperlane-xyz/sdk'; |
||||
|
||||
import { getWarpConfig } from '../../config/warp.js'; |
||||
import { writeYamlAtPath } from '../../src/utils/utils.js'; |
||||
import { getArgs, withWarpRouteIdRequired } from '../agent-utils.js'; |
||||
import { getEnvironmentConfig, getHyperlaneCore } from '../core-utils.js'; |
||||
|
||||
async function main() { |
||||
const { warpRouteId, environment, outFile } = await withWarpRouteIdRequired( |
||||
getArgs(), |
||||
) |
||||
.string('outFile') |
||||
.describe('outFile', 'The file to write the config to').argv; |
||||
|
||||
const { multiProvider } = await getHyperlaneCore(environment); |
||||
const envConfig = getEnvironmentConfig(environment); |
||||
|
||||
const warpConfig = await getWarpConfig(multiProvider, envConfig, warpRouteId); |
||||
const parsed = WarpRouteDeployConfigSchema.safeParse(warpConfig); |
||||
|
||||
if (!parsed.success) { |
||||
console.dir(parsed.error.format(), { depth: null }); |
||||
return; |
||||
} |
||||
|
||||
console.log('Warp config:'); |
||||
console.log(yamlStringify(parsed.data, null, 2)); |
||||
|
||||
if (outFile) { |
||||
console.log(`Writing config to ${outFile}`); |
||||
writeYamlAtPath(outFile, parsed.data); |
||||
} |
||||
} |
||||
|
||||
main().catch(console.error).then(console.log); |
Loading…
Reference in new issue