Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/nambrot/repro-only-…
Browse files Browse the repository at this point in the history
…merkle-tree' into nambrot/repro-only-merkle-tree
  • Loading branch information
aroralanuk committed Nov 7, 2023
2 parents be099d0 + 97660b1 commit 409a2fa
Show file tree
Hide file tree
Showing 58 changed files with 4,795 additions and 226 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
typescript/sdk/src/cw-types/*.types.ts linguist-generated=true
rust/chains/hyperlane-ethereum/abis/*.abi.json linguist-generated=true
4 changes: 2 additions & 2 deletions solidity/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "@hyperlane-xyz/core",
"description": "Core solidity contracts for Hyperlane",
"version": "1.5.4-beta0",
"version": "3.1.0-beta0",
"dependencies": {
"@eth-optimism/contracts": "^0.6.0",
"@hyperlane-xyz/utils": "1.5.4-beta0",
"@hyperlane-xyz/utils": "3.1.0-beta0",
"@openzeppelin/contracts": "^4.8.0",
"@openzeppelin/contracts-upgradeable": "^4.8.0"
},
Expand Down
6 changes: 3 additions & 3 deletions typescript/helloworld/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "@hyperlane-xyz/helloworld",
"description": "A basic skeleton of an Hyperlane app",
"version": "1.5.4-beta0",
"version": "3.1.0-beta0",
"dependencies": {
"@hyperlane-xyz/core": "1.5.4-beta0",
"@hyperlane-xyz/sdk": "1.5.4-beta0",
"@hyperlane-xyz/core": "3.1.0-beta0",
"@hyperlane-xyz/sdk": "3.1.0-beta0",
"@openzeppelin/contracts-upgradeable": "^4.8.0",
"ethers": "^5.7.2"
},
Expand Down
11 changes: 9 additions & 2 deletions typescript/infra/config/environments/mainnet3/liquidityLayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,22 @@ import {
Chains,
RpcConsensusType,
chainMetadata,
getDomainId,
} from '@hyperlane-xyz/sdk';

import { LiquidityLayerRelayerConfig } from '../../../src/config/middleware';

import { environment } from './chains';

const circleDomainMapping = [
{ hyperlaneDomain: chainMetadata[Chains.ethereum].chainId, circleDomain: 0 },
{ hyperlaneDomain: chainMetadata[Chains.avalanche].chainId, circleDomain: 1 },
{
hyperlaneDomain: getDomainId(chainMetadata[Chains.ethereum]),
circleDomain: 0,
},
{
hyperlaneDomain: getDomainId(chainMetadata[Chains.avalanche]),
circleDomain: 1,
},
];

export const bridgeAdapterConfigs: ChainMap<BridgeAdapterConfig> = {
Expand Down
8 changes: 6 additions & 2 deletions typescript/infra/config/environments/mainnet3/token-bridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@ import {
Chains,
CircleBridgeAdapterConfig,
chainMetadata,
getDomainId,
} from '@hyperlane-xyz/sdk';

const circleDomainMapping = [
{ hyperlaneDomain: chainMetadata[Chains.goerli].chainId, circleDomain: 0 },
{ hyperlaneDomain: chainMetadata[Chains.fuji].chainId, circleDomain: 1 },
{
hyperlaneDomain: getDomainId(chainMetadata[Chains.goerli]),
circleDomain: 0,
},
{ hyperlaneDomain: getDomainId(chainMetadata[Chains.fuji]), circleDomain: 1 },
];

// Circle deployed contracts
Expand Down
27 changes: 20 additions & 7 deletions typescript/infra/config/environments/testnet4/liquidityLayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,36 @@ import {
ChainMap,
Chains,
chainMetadata,
getDomainId,
} from '@hyperlane-xyz/sdk';

const circleDomainMapping = [
{ hyperlaneDomain: chainMetadata[Chains.goerli].chainId, circleDomain: 0 },
{ hyperlaneDomain: chainMetadata[Chains.fuji].chainId, circleDomain: 1 },
{
hyperlaneDomain: getDomainId(chainMetadata[Chains.goerli]),
circleDomain: 0,
},
{ hyperlaneDomain: getDomainId(chainMetadata[Chains.fuji]), circleDomain: 1 },
];

const wormholeDomainMapping = [
{ hyperlaneDomain: chainMetadata[Chains.goerli].chainId, wormholeDomain: 2 },
{ hyperlaneDomain: chainMetadata[Chains.fuji].chainId, wormholeDomain: 6 },
{ hyperlaneDomain: chainMetadata[Chains.mumbai].chainId, wormholeDomain: 5 },
{
hyperlaneDomain: chainMetadata[Chains.bsctestnet].chainId,
hyperlaneDomain: getDomainId(chainMetadata[Chains.goerli]),
wormholeDomain: 2,
},
{
hyperlaneDomain: getDomainId(chainMetadata[Chains.fuji]),
wormholeDomain: 6,
},
{
hyperlaneDomain: getDomainId(chainMetadata[Chains.mumbai]),
wormholeDomain: 5,
},
{
hyperlaneDomain: getDomainId(chainMetadata[Chains.bsctestnet]),
wormholeDomain: 4,
},
{
hyperlaneDomain: chainMetadata[Chains.alfajores].chainId,
hyperlaneDomain: getDomainId(chainMetadata[Chains.alfajores]),
wormholeDomain: 14,
},
];
Expand Down
27 changes: 20 additions & 7 deletions typescript/infra/config/environments/testnet4/token-bridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,36 @@ import {
ChainMap,
Chains,
chainMetadata,
getDomainId,
} from '@hyperlane-xyz/sdk';

const circleDomainMapping = [
{ hyperlaneDomain: chainMetadata[Chains.goerli].chainId, circleDomain: 0 },
{ hyperlaneDomain: chainMetadata[Chains.fuji].chainId, circleDomain: 1 },
{
hyperlaneDomain: getDomainId(chainMetadata[Chains.goerli]),
circleDomain: 0,
},
{ hyperlaneDomain: getDomainId(chainMetadata[Chains.fuji]), circleDomain: 1 },
];

const wormholeDomainMapping = [
{ hyperlaneDomain: chainMetadata[Chains.goerli].chainId, wormholeDomain: 2 },
{ hyperlaneDomain: chainMetadata[Chains.fuji].chainId, wormholeDomain: 6 },
{ hyperlaneDomain: chainMetadata[Chains.mumbai].chainId, wormholeDomain: 5 },
{
hyperlaneDomain: chainMetadata[Chains.bsctestnet].chainId,
hyperlaneDomain: getDomainId(chainMetadata[Chains.goerli]),
wormholeDomain: 2,
},
{
hyperlaneDomain: getDomainId(chainMetadata[Chains.fuji]),
wormholeDomain: 6,
},
{
hyperlaneDomain: getDomainId(chainMetadata[Chains.mumbai]),
wormholeDomain: 5,
},
{
hyperlaneDomain: getDomainId(chainMetadata[Chains.bsctestnet]),
wormholeDomain: 4,
},
{
hyperlaneDomain: chainMetadata[Chains.alfajores].chainId,
hyperlaneDomain: getDomainId(chainMetadata[Chains.alfajores]),
wormholeDomain: 14,
},
];
Expand Down
4 changes: 3 additions & 1 deletion typescript/infra/helm/warp-routes/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ The warp-routes container
command:
- ./node_modules/.bin/ts-node
- ./typescript/infra/scripts/warp-routes/monitor-warp-routes-balances.ts
- -c
- -l
- "10000"
- -c
- {{ .Values.config }}
{{- end }}
6 changes: 3 additions & 3 deletions typescript/infra/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"@ethersproject/experimental": "^5.7.0",
"@ethersproject/hardware-wallets": "^5.7.0",
"@ethersproject/providers": "^5.7.2",
"@hyperlane-xyz/helloworld": "1.5.4-beta0",
"@hyperlane-xyz/sdk": "1.5.4-beta0",
"@hyperlane-xyz/utils": "1.5.4-beta0",
"@hyperlane-xyz/helloworld": "3.1.0-beta0",
"@hyperlane-xyz/sdk": "3.1.0-beta0",
"@hyperlane-xyz/utils": "3.1.0-beta0",
"@nomiclabs/hardhat-etherscan": "^3.0.3",
"@safe-global/api-kit": "^1.3.0",
"@safe-global/protocol-kit": "^1.2.0",
Expand Down
6 changes: 5 additions & 1 deletion typescript/infra/scripts/warp-routes/deploy-warp-monitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ import { HelmCommand } from '../../src/utils/helm';
import { runWarpRouteHelmCommand } from './helm';

async function main() {
await runWarpRouteHelmCommand(HelmCommand.InstallOrUpgrade, 'mainnet3');
await runWarpRouteHelmCommand(
HelmCommand.InstallOrUpgrade,
'mainnet3',
'neutron',
);
}

main()
Expand Down
12 changes: 7 additions & 5 deletions typescript/infra/scripts/warp-routes/helm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,32 @@ import { assertCorrectKubeContext, getEnvironmentConfig } from '../utils';
export async function runWarpRouteHelmCommand(
helmCommand: HelmCommand,
runEnv: DeployEnvironment,
config: string,
) {
const envConfig = getEnvironmentConfig(runEnv);
await assertCorrectKubeContext(envConfig);
const values = getWarpRoutesHelmValues();
const values = getWarpRoutesHelmValues(config);

return execCmd(
`helm ${helmCommand} ${getHelmReleaseName(
'zebec',
config,
)} ./helm/warp-routes --namespace ${runEnv} ${values.join(
' ',
)} --set fullnameOverride="${getHelmReleaseName('zebec')}"`,
)} --set fullnameOverride="${getHelmReleaseName(config)}"`,
);
}

function getHelmReleaseName(route: string): string {
return `hyperlane-warp-route-${route}`;
}

function getWarpRoutesHelmValues() {
function getWarpRoutesHelmValues(config: string) {
const values = {
image: {
repository: 'gcr.io/abacus-labs-dev/hyperlane-monorepo',
tag: '962d34b-20230905-194531',
tag: 'ae8ce44-20231101-012032',
},
config: config, // nautilus or neutron
};
return helmifyValues(values);
}
Loading

0 comments on commit 409a2fa

Please sign in to comment.