Skip to content

Commit

Permalink
Deploy eclipse fi warp (#3062)
Browse files Browse the repository at this point in the history
  • Loading branch information
yorhodes authored Dec 15, 2023
1 parent 0d9d1d2 commit 10c0ab1
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 2 deletions.
2 changes: 1 addition & 1 deletion typescript/cli/src/commands/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
*/
export const deployCommand: CommandModule = {
command: 'deploy',
describe: 'Permisionslessly deploy a Hyperlane contracts or extensions',
describe: 'Permissionlessly deploy a Hyperlane contracts or extensions',
builder: (yargs) =>
yargs
.command(coreCommand)
Expand Down
2 changes: 1 addition & 1 deletion typescript/infra/config/environments/mainnet3/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const nonEthereumMainnetConfigs: ChainMap<ChainMetadata> = {

export const mainnetConfigs: ChainMap<ChainMetadata> = {
...ethereumMainnetConfigs,
...nonEthereumMainnetConfigs,
// ...nonEthereumMainnetConfigs,
};

export type MainnetChains = keyof typeof mainnetConfigs;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"arbitrum": {
"router": "0x93ca0d85837FF83158Cd14D65B169CdB223b1921"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"arbitrum": [
{
"name": "HypERC20",
"address": "0x93ca0d85837FF83158Cd14D65B169CdB223b1921",
"constructorArguments": "0000000000000000000000000000000000000000000000000000000000000006000000000000000000000000979ca5202784112f4738403dbec5d0f3b9daabb9",
"isProxy": false
},
{
"name": "HypERC20",
"address": "0x93ca0d85837FF83158Cd14D65B169CdB223b1921",
"constructorArguments": "0000000000000000000000000000000000000000000000000000000000000006000000000000000000000000979ca5202784112f4738403dbec5d0f3b9daabb9",
"isProxy": false
}
]
}
37 changes: 37 additions & 0 deletions typescript/infra/scripts/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { prompt } from 'prompts';
import { HelloWorldDeployer } from '@hyperlane-xyz/helloworld';
import {
ChainMap,
Chains,
HypERC20Deployer,
HyperlaneCore,
HyperlaneCoreDeployer,
HyperlaneDeployer,
Expand All @@ -13,7 +15,9 @@ import {
InterchainAccountDeployer,
InterchainQueryDeployer,
LiquidityLayerDeployer,
TokenConfig,
} from '@hyperlane-xyz/sdk';
import { TokenDecimals, TokenType } from '@hyperlane-xyz/sdk/dist/token/config';
import { objMap } from '@hyperlane-xyz/utils';

import { Contexts } from '../config/contexts';
Expand Down Expand Up @@ -75,6 +79,39 @@ async function main() {
multiProvider,
);
deployer = new HyperlaneCoreDeployer(multiProvider, ismFactory);
} else if (module === Modules.WARP) {
const owner = deployerAddress;
const neutronRouter =
'6b04c49fcfd98bc4ea9c05cd5790462a39537c00028333474aebe6ddf20b73a3';
const ismFactory = HyperlaneIsmFactory.fromAddressesMap(
getAddresses(environment, Modules.PROXY_FACTORY),
multiProvider,
);
const tokenConfig: TokenConfig & TokenDecimals = {
type: TokenType.synthetic,
name: 'Eclipse Fi',
symbol: 'ECLIP',
decimals: 6,
totalSupply: 0,
};
const core = HyperlaneCore.fromEnvironment(
deployEnvToSdkEnv[environment],
multiProvider,
);
const routerConfig = core.getRouterConfig(owner);
const targetChains = [Chains.arbitrum];
config = {
arbitrum: {
...routerConfig['arbitrum'],
...tokenConfig,
interchainSecurityModule: '0x53A5c239d62ff35c98E0EC9612c86517748ffF59',
gas: 600_000,
},
neutron: {
foreignDeployment: neutronRouter,
},
};
deployer = new HypERC20Deployer(multiProvider, ismFactory);
} else if (module === Modules.INTERCHAIN_GAS_PAYMASTER) {
config = envConfig.igp;
deployer = new HyperlaneIgpDeployer(multiProvider);
Expand Down

0 comments on commit 10c0ab1

Please sign in to comment.